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
079835774a61e8e81ad6a988e9607d0ec5c18205
resources/assets/js/mixins/filterableMixin.js
resources/assets/js/mixins/filterableMixin.js
/* * To use this mixin, a component needs: * - A computed property called "items" containing items we want to filter. * - A data/computed property called "filters", which is an array of strings * that represent the nested props to filter by. * * To use the filter, you simply need to update the "searchInput" property. */ import _ from 'lodash'; export default { created() { if(!this.items || !Array.isArray(this.items)) { throw new Error( '[filterableMixin] "items" must exist in your data object and be an array' ); } }, data() { return { // these are just generic filters to be replaced filters: ['name', 'username', 'email'], searchInput: '' }; }, computed: { filteredItems() { return ( this.searchInput.length > 1 ? this.items.filter( this.createFilter( this.filters, this.searchInput.toLowerCase() ) ) : this.items ); } }, methods: { createFilter(searchKeys, searchTerm) { return user => searchKeys.some( key => { const value = _.get(user, key); return value && value.toLowerCase().indexOf(searchTerm) !== -1; } ); } } };
/* * To use this mixin, a component needs: * - A computed property called "items" containing items we want to filter. * - A data/computed property called "filters", which is an array of strings * that represent the nested props to filter by. * * To use the filter, you simply need to update the "searchInput" property. */ import _ from 'lodash'; export default { created() { if(!this.items || !Array.isArray(this.items)) { throw new Error( '[filterableMixin] "items" must exist in your data object and be an array' ); } }, data() { return { // these are just generic filters to be replaced filters: ['name', 'username', 'email'], searchInput: '' }; }, computed: { filteredItems() { return ( this.searchInput.length > 1 ? this.items.filter( this.createFilter( this.filters, this.searchInput.toLowerCase() ) ) : this.items ); } }, methods: { createFilter(searchKeys, searchTerm) { const searchTerms = searchTerm.toLowerCase().split(' '); return item => searchKeys.some( key => { const value = _.get(item, key); return value && searchTerms.some( term => ( term.length > 1 && value.toLowerCase().indexOf(term) !== -1 ) ) } ); } } };
Update filterable mixin so multiple terms (separated by a space) can be used to filter data.
Update filterable mixin so multiple terms (separated by a space) can be used to filter data.
JavaScript
mit
unikent/astro,unikent/astro,unikent/astro,unikent/astro,unikent/astro
javascript
## Code Before: /* * To use this mixin, a component needs: * - A computed property called "items" containing items we want to filter. * - A data/computed property called "filters", which is an array of strings * that represent the nested props to filter by. * * To use the filter, you simply need to update the "searchInput" property. */ import _ from 'lodash'; export default { created() { if(!this.items || !Array.isArray(this.items)) { throw new Error( '[filterableMixin] "items" must exist in your data object and be an array' ); } }, data() { return { // these are just generic filters to be replaced filters: ['name', 'username', 'email'], searchInput: '' }; }, computed: { filteredItems() { return ( this.searchInput.length > 1 ? this.items.filter( this.createFilter( this.filters, this.searchInput.toLowerCase() ) ) : this.items ); } }, methods: { createFilter(searchKeys, searchTerm) { return user => searchKeys.some( key => { const value = _.get(user, key); return value && value.toLowerCase().indexOf(searchTerm) !== -1; } ); } } }; ## Instruction: Update filterable mixin so multiple terms (separated by a space) can be used to filter data. ## Code After: /* * To use this mixin, a component needs: * - A computed property called "items" containing items we want to filter. * - A data/computed property called "filters", which is an array of strings * that represent the nested props to filter by. * * To use the filter, you simply need to update the "searchInput" property. */ import _ from 'lodash'; export default { created() { if(!this.items || !Array.isArray(this.items)) { throw new Error( '[filterableMixin] "items" must exist in your data object and be an array' ); } }, data() { return { // these are just generic filters to be replaced filters: ['name', 'username', 'email'], searchInput: '' }; }, computed: { filteredItems() { return ( this.searchInput.length > 1 ? this.items.filter( this.createFilter( this.filters, this.searchInput.toLowerCase() ) ) : this.items ); } }, methods: { createFilter(searchKeys, searchTerm) { const searchTerms = searchTerm.toLowerCase().split(' '); return item => searchKeys.some( key => { const value = _.get(item, key); return value && searchTerms.some( term => ( term.length > 1 && value.toLowerCase().indexOf(term) !== -1 ) ) } ); } } };
/* * To use this mixin, a component needs: * - A computed property called "items" containing items we want to filter. * - A data/computed property called "filters", which is an array of strings * that represent the nested props to filter by. * * To use the filter, you simply need to update the "searchInput" property. */ import _ from 'lodash'; export default { created() { if(!this.items || !Array.isArray(this.items)) { throw new Error( '[filterableMixin] "items" must exist in your data object and be an array' ); } }, data() { return { // these are just generic filters to be replaced filters: ['name', 'username', 'email'], searchInput: '' }; }, computed: { filteredItems() { return ( this.searchInput.length > 1 ? this.items.filter( this.createFilter( this.filters, this.searchInput.toLowerCase() ) ) : this.items ); } }, methods: { createFilter(searchKeys, searchTerm) { + const searchTerms = searchTerm.toLowerCase().split(' '); + - return user => searchKeys.some( ? ^^ ^ + return item => searchKeys.some( ? ^^ ^ key => { - const value = _.get(user, key); ? ^^ ^ + const value = _.get(item, key); ? ^^ ^ + + return value && searchTerms.some( + term => ( + term.length > 1 && - return value && value.toLowerCase().indexOf(searchTerm) !== -1; ? ^^^^^^^^^^^^^^^^ ^^^^^^^ - + value.toLowerCase().indexOf(term) !== -1 ? ^^ ^ + ) + ) } ); } } };
14
0.254545
11
3
41a5597d18c298d7a5830ff8554d26e8e94096de
lib/um/preprocessor.rb
lib/um/preprocessor.rb
require 'time' # template preprocessor module Preprocessor def self.preprocess(template, page_name, topic) template.gsub(/\$\w+/) do |match| case match when '$name' page_name when '$topic' topic when '$time' Time.now.rfc2822 else '' end end end end
require 'time' require 'date' # template preprocessor module Preprocessor def self.preprocess(template, page_name, topic) template.gsub(/\$\w+/) do |match| case match when '$name' page_name when '$NAME' page_name.upcase when '$topic' topic when '$time' Time.now.rfc2822 when '$date' Date.today.strftime("%B %d, %Y") else match end end end end
Add support for $NAME and $date in templates.
Add support for $NAME and $date in templates.
Ruby
mit
sinclairtarget/um,sinclairtarget/um
ruby
## Code Before: require 'time' # template preprocessor module Preprocessor def self.preprocess(template, page_name, topic) template.gsub(/\$\w+/) do |match| case match when '$name' page_name when '$topic' topic when '$time' Time.now.rfc2822 else '' end end end end ## Instruction: Add support for $NAME and $date in templates. ## Code After: require 'time' require 'date' # template preprocessor module Preprocessor def self.preprocess(template, page_name, topic) template.gsub(/\$\w+/) do |match| case match when '$name' page_name when '$NAME' page_name.upcase when '$topic' topic when '$time' Time.now.rfc2822 when '$date' Date.today.strftime("%B %d, %Y") else match end end end end
require 'time' + require 'date' # template preprocessor module Preprocessor def self.preprocess(template, page_name, topic) template.gsub(/\$\w+/) do |match| case match when '$name' page_name + when '$NAME' + page_name.upcase when '$topic' topic when '$time' Time.now.rfc2822 + when '$date' + Date.today.strftime("%B %d, %Y") else - '' + match end end end end
7
0.368421
6
1
1f727966e6416ca11789722552f52ee27297c2ab
gulpfile.js
gulpfile.js
'use strict'; var gulp = require('gulp'), run = require('gulp-run'), del = require('del'), scrollrack = require('scroll-rack'); // Config var path = { files: 'docs/', dest: 'build' } /** * Clean up project. */ gulp.task('clean', function ( done ) { del([ path.dest ], done); }); /** * Generate documentation with ScrollRack. * Call with `--serve` to start local server. */ gulp.task('build', function ( done ) { scrollrack({ files: path.files, dest: path.dest, nav: { order: ['typescript', 'angular', 'coding'] }, callback: done }); }); /** * Generate Github Pages */ gulp.task('release', ['build'], function ( done ) { run('git subtree push --prefix ' + path.dest + ' origin gh-pages') .exec(done); });
'use strict'; var gulp = require('gulp'), run = require('gulp-run'), del = require('del'), scrollrack = require('scroll-rack'); // Config var path = { files: 'docs/', dest: 'build' } /** * Clean up project. */ gulp.task('clean', function ( done ) { del([ path.dest ], done); }); /** * Generate documentation with ScrollRack. * Call with `--serve` to start local server. */ gulp.task('build', function ( done ) { scrollrack({ files: path.files, dest: path.dest, nav: { order: ['typescript', 'angular', 'coding'] }, callback: done }); }); /** * Generate Github Pages */ gulp.task('release', function ( done ) { run('git subtree push --prefix ' + path.dest + ' origin gh-pages') .exec(done); });
Remove build as dependency from release task.
chore(gulp): Remove build as dependency from release task.
JavaScript
mit
sebald/guidelines,sebald/guidelines
javascript
## Code Before: 'use strict'; var gulp = require('gulp'), run = require('gulp-run'), del = require('del'), scrollrack = require('scroll-rack'); // Config var path = { files: 'docs/', dest: 'build' } /** * Clean up project. */ gulp.task('clean', function ( done ) { del([ path.dest ], done); }); /** * Generate documentation with ScrollRack. * Call with `--serve` to start local server. */ gulp.task('build', function ( done ) { scrollrack({ files: path.files, dest: path.dest, nav: { order: ['typescript', 'angular', 'coding'] }, callback: done }); }); /** * Generate Github Pages */ gulp.task('release', ['build'], function ( done ) { run('git subtree push --prefix ' + path.dest + ' origin gh-pages') .exec(done); }); ## Instruction: chore(gulp): Remove build as dependency from release task. ## Code After: 'use strict'; var gulp = require('gulp'), run = require('gulp-run'), del = require('del'), scrollrack = require('scroll-rack'); // Config var path = { files: 'docs/', dest: 'build' } /** * Clean up project. */ gulp.task('clean', function ( done ) { del([ path.dest ], done); }); /** * Generate documentation with ScrollRack. * Call with `--serve` to start local server. */ gulp.task('build', function ( done ) { scrollrack({ files: path.files, dest: path.dest, nav: { order: ['typescript', 'angular', 'coding'] }, callback: done }); }); /** * Generate Github Pages */ gulp.task('release', function ( done ) { run('git subtree push --prefix ' + path.dest + ' origin gh-pages') .exec(done); });
'use strict'; var gulp = require('gulp'), run = require('gulp-run'), del = require('del'), scrollrack = require('scroll-rack'); // Config var path = { files: 'docs/', dest: 'build' } /** * Clean up project. */ gulp.task('clean', function ( done ) { del([ path.dest ], done); }); /** * Generate documentation with ScrollRack. * Call with `--serve` to start local server. */ gulp.task('build', function ( done ) { scrollrack({ files: path.files, dest: path.dest, nav: { order: ['typescript', 'angular', 'coding'] }, callback: done }); }); /** * Generate Github Pages */ - gulp.task('release', ['build'], function ( done ) { ? ----------- + gulp.task('release', function ( done ) { run('git subtree push --prefix ' + path.dest + ' origin gh-pages') .exec(done); });
2
0.040816
1
1
b2be53e36d2131b4b1ccc80b77410a1ce7f5bdff
app/styles/components/new-curriculum-inventory-sequence-block.scss
app/styles/components/new-curriculum-inventory-sequence-block.scss
.new-curriculum-inventory-sequence-block { border: 1px solid $header-grey; margin: .5rem; padding: 1rem; .form { @include ilios-form; } .item { @include ilios-form-item; &.last { @include ilios-form-last-item; } } .course { .details { font-size: smaller; } } .description { grid-column: 1 / -1; min-height: 10rem; } .clear-dates { grid-column: 1 / -1; height: 4rem; } .buttons { @include ilios-form-buttons; } .selective { grid-column: 1 / -1; height: 2rem; label { font-style: italic; }; } }
.new-curriculum-inventory-sequence-block { border: 1px solid $header-grey; margin: .5rem; padding: 1rem; .form { @include ilios-form; } .item { @include ilios-form-item; &.last { @include ilios-form-last-item; } } .course { .details { font-size: smaller; } } .description { grid-column: 1 / -1; min-height: 10rem; } .clear-dates { grid-column: 1 / -1; button { max-width: 20rem; } } .buttons { @include ilios-form-buttons; } .selective { grid-column: 1 / -1; height: 2rem; label { font-style: italic; }; } }
Fix width of clear dates button
Fix width of clear dates button
SCSS
mit
dartajax/frontend,ilios/frontend,jrjohnson/frontend,thecoolestguy/frontend,ilios/frontend,djvoa12/frontend,jrjohnson/frontend,dartajax/frontend,thecoolestguy/frontend,djvoa12/frontend
scss
## Code Before: .new-curriculum-inventory-sequence-block { border: 1px solid $header-grey; margin: .5rem; padding: 1rem; .form { @include ilios-form; } .item { @include ilios-form-item; &.last { @include ilios-form-last-item; } } .course { .details { font-size: smaller; } } .description { grid-column: 1 / -1; min-height: 10rem; } .clear-dates { grid-column: 1 / -1; height: 4rem; } .buttons { @include ilios-form-buttons; } .selective { grid-column: 1 / -1; height: 2rem; label { font-style: italic; }; } } ## Instruction: Fix width of clear dates button ## Code After: .new-curriculum-inventory-sequence-block { border: 1px solid $header-grey; margin: .5rem; padding: 1rem; .form { @include ilios-form; } .item { @include ilios-form-item; &.last { @include ilios-form-last-item; } } .course { .details { font-size: smaller; } } .description { grid-column: 1 / -1; min-height: 10rem; } .clear-dates { grid-column: 1 / -1; button { max-width: 20rem; } } .buttons { @include ilios-form-buttons; } .selective { grid-column: 1 / -1; height: 2rem; label { font-style: italic; }; } }
.new-curriculum-inventory-sequence-block { border: 1px solid $header-grey; margin: .5rem; padding: 1rem; .form { @include ilios-form; } .item { @include ilios-form-item; &.last { @include ilios-form-last-item; } } .course { .details { font-size: smaller; } } .description { grid-column: 1 / -1; min-height: 10rem; } .clear-dates { grid-column: 1 / -1; - height: 4rem; + + button { + max-width: 20rem; + } } .buttons { @include ilios-form-buttons; } .selective { grid-column: 1 / -1; height: 2rem; label { font-style: italic; }; } }
5
0.108696
4
1
834b49f1b9c8967feb2af790d98a2a0ef87e68ab
.travis.yml
.travis.yml
language: python python: - '3.6' install: - pip install . before_script: - "ls -R" - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - sleep 3 # give xvfb some time to start script: - py.test
language: python python: - '3.6' install: - pip install . before_script: - "ls -R" script: - xvfb-run py.test
Update how xvfb is started in Travis.
Update how xvfb is started in Travis. At some point Travis introduced a new way to start xvfb, and apparently broke the old way (possibly depending on which distribution you ask for). In any case, I needed to update my tests. See below for more details: https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-xvfb-to-run-tests-that-require-a-gui
YAML
mit
kxgames/glooey,kxgames/glooey
yaml
## Code Before: language: python python: - '3.6' install: - pip install . before_script: - "ls -R" - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" - sleep 3 # give xvfb some time to start script: - py.test ## Instruction: Update how xvfb is started in Travis. At some point Travis introduced a new way to start xvfb, and apparently broke the old way (possibly depending on which distribution you ask for). In any case, I needed to update my tests. See below for more details: https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-xvfb-to-run-tests-that-require-a-gui ## Code After: language: python python: - '3.6' install: - pip install . before_script: - "ls -R" script: - xvfb-run py.test
language: python python: - '3.6' install: - pip install . before_script: - "ls -R" - - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" - - sleep 3 # give xvfb some time to start script: - - py.test + - xvfb-run py.test
5
0.416667
1
4
560915fdf48c44622920ff2148edf6433b474e5c
README.md
README.md
LightStripServer ================ Will allow remote control of a raspberry pi running an AdaFruit Digital Addressable RGB LED light strip. Currently this is highly specalized to the KSP mod that I'm designing - the client sends UDP messages to the PI specifying the altitude of the ship above the surface of the planet. The raspberry pi uses that information to display the position of the ship on the light strip as a yellow dot. When I am done, the pi will also have a voiceover that narrates scale changes such as "Scale changed to 32 meters for final descent" or "Radar lock acquired" It will be fun.
LightStripServer ================ Will allow remote control of a raspberry pi running an AdaFruit Digital Addressable RGB LED light strip. Simply open a TCP connection with the PI on the specified port, and send it a message like "40:0:40" which should produce a dim purplish color (message format is "red:green:blue" where each color goes from 0-255.) I have also coded a few server-side animations, such as "rainbow", "hyperspace", and "strobe". The strobe light is highly annoying, and I do not recommend using it for long periods of time. Hyperspace is kinda cool, but the best animation so far is "rainbow." There's also an android app that allows remote control, but it might not be in this github repo. This used to be highly specalized to the KSP mod that I was designing. More recently I have given up the Kerbal Space Program angle of this software. The KSP client would send UDP messages to the PI specifying the altitude of the ship above the surface of the planet. The raspberry pi useed that information to display the position of the ship on the light strip as a yellow dot. I was planning to have the pi do a voiceover that narrateed scale changes such as "Scale changed to 32 meters for final descent" or "Radar lock acquired" It will be fun.
Update to reflect current state of the project
Update to reflect current state of the project
Markdown
mit
NanoExplorer/LightStripServer,NanoExplorer/LightStripServer,NanoExplorer/LightStripServer
markdown
## Code Before: LightStripServer ================ Will allow remote control of a raspberry pi running an AdaFruit Digital Addressable RGB LED light strip. Currently this is highly specalized to the KSP mod that I'm designing - the client sends UDP messages to the PI specifying the altitude of the ship above the surface of the planet. The raspberry pi uses that information to display the position of the ship on the light strip as a yellow dot. When I am done, the pi will also have a voiceover that narrates scale changes such as "Scale changed to 32 meters for final descent" or "Radar lock acquired" It will be fun. ## Instruction: Update to reflect current state of the project ## Code After: LightStripServer ================ Will allow remote control of a raspberry pi running an AdaFruit Digital Addressable RGB LED light strip. Simply open a TCP connection with the PI on the specified port, and send it a message like "40:0:40" which should produce a dim purplish color (message format is "red:green:blue" where each color goes from 0-255.) I have also coded a few server-side animations, such as "rainbow", "hyperspace", and "strobe". The strobe light is highly annoying, and I do not recommend using it for long periods of time. Hyperspace is kinda cool, but the best animation so far is "rainbow." There's also an android app that allows remote control, but it might not be in this github repo. This used to be highly specalized to the KSP mod that I was designing. More recently I have given up the Kerbal Space Program angle of this software. The KSP client would send UDP messages to the PI specifying the altitude of the ship above the surface of the planet. The raspberry pi useed that information to display the position of the ship on the light strip as a yellow dot. I was planning to have the pi do a voiceover that narrateed scale changes such as "Scale changed to 32 meters for final descent" or "Radar lock acquired" It will be fun.
LightStripServer ================ Will allow remote control of a raspberry pi running an AdaFruit Digital Addressable RGB LED light strip. + Simply open a TCP connection with the PI on the specified port, and send it a message like "40:0:40" which should produce a dim purplish color (message format is "red:green:blue" where each color goes from 0-255.) + + I have also coded a few server-side animations, such as "rainbow", "hyperspace", and "strobe". The strobe light is highly annoying, and I do not recommend using it for long periods of time. Hyperspace is kinda cool, but the best animation so far is "rainbow." + + There's also an android app that allows remote control, but it might not be in this github repo. + + - Currently this is highly specalized to the KSP mod that I'm designing - the client sends UDP messages to the PI specifying the altitude of the ship above the surface of the planet. The raspberry pi uses that information to display the position of the ship on the light strip as a yellow dot. When I am done, the pi will also have a voiceover that narrates scale changes such as "Scale changed to 32 meters for final descent" or "Radar lock acquired" ? ^^^^^^^^^^^^^^^^^ ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ ----- ---------------- ^^^^^^^ ^ + This used to be highly specalized to the KSP mod that I was designing. More recently I have given up the Kerbal Space Program angle of this software. The KSP client would send UDP messages to the PI specifying the altitude of the ship above the surface of the planet. The raspberry pi useed that information to display the position of the ship on the light strip as a yellow dot. I was planning to have the pi do a voiceover that narrateed scale changes such as "Scale changed to 32 meters for final descent" or "Radar lock acquired" ? ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^^^^^^^^^ ++++++++++ ^^ It will be fun.
9
1.125
8
1
2cc9c97612b77c950c205277c0cd3725ed5f5191
app/views/brexit_checker/_question_multiple_grouped_choice.html.erb
app/views/brexit_checker/_question_multiple_grouped_choice.html.erb
<%= render "govuk_publishing_components/components/title", { title: current_question.text, } %> <%= formatted_description %> <% current_question.options.each do | group | %> <%= render "govuk_publishing_components/components/checkboxes", { name: "c[]", heading: group.label, no_hint_text: true, items: format_question_options(group.sub_options, criteria_keys) } %> <% end %>
<%= render "govuk_publishing_components/components/title", { title: current_question.text, margin_bottom: 5 } %> <%= formatted_description %> <% if current_question.hint_text.present? %> <%= render "govuk_publishing_components/components/hint", { text: current_question.hint_text } %> <% end %> <% current_question.options.each do | group | %> <%= render "govuk_publishing_components/components/checkboxes", { name: "c[]", heading: group.label, no_hint_text: true, items: format_question_options(group.sub_options, criteria_keys) } %> <% end %>
Support hint text for multiple grouped questions
Support hint text for multiple grouped questions Previously the hint text was not shown for this question type, but is required for the work/study question. This adds support for hint text and adjusts the title margin to be consistent with other question types.
HTML+ERB
mit
alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend
html+erb
## Code Before: <%= render "govuk_publishing_components/components/title", { title: current_question.text, } %> <%= formatted_description %> <% current_question.options.each do | group | %> <%= render "govuk_publishing_components/components/checkboxes", { name: "c[]", heading: group.label, no_hint_text: true, items: format_question_options(group.sub_options, criteria_keys) } %> <% end %> ## Instruction: Support hint text for multiple grouped questions Previously the hint text was not shown for this question type, but is required for the work/study question. This adds support for hint text and adjusts the title margin to be consistent with other question types. ## Code After: <%= render "govuk_publishing_components/components/title", { title: current_question.text, margin_bottom: 5 } %> <%= formatted_description %> <% if current_question.hint_text.present? %> <%= render "govuk_publishing_components/components/hint", { text: current_question.hint_text } %> <% end %> <% current_question.options.each do | group | %> <%= render "govuk_publishing_components/components/checkboxes", { name: "c[]", heading: group.label, no_hint_text: true, items: format_question_options(group.sub_options, criteria_keys) } %> <% end %>
<%= render "govuk_publishing_components/components/title", { title: current_question.text, + margin_bottom: 5 } %> + <%= formatted_description %> + + <% if current_question.hint_text.present? %> + <%= render "govuk_publishing_components/components/hint", { + text: current_question.hint_text + } %> + <% end %> <% current_question.options.each do | group | %> <%= render "govuk_publishing_components/components/checkboxes", { name: "c[]", heading: group.label, no_hint_text: true, items: format_question_options(group.sub_options, criteria_keys) } %> <% end %>
8
0.615385
8
0
709944ba8295b37f3f728e51fb266c016e08bac8
mysite/_config/injector.yml
mysite/_config/injector.yml
--- name: 'addonsinjector' --- Injector: AddonBuilder: constructor: - %$PackagistService - %$SilverStripe\ModuleRatings\CheckSuite AddonUpdater: constructor: - %$PackagistService - %$ElasticaService - %$Composer\Package\Version\VersionParser RequestProcessor: properties: filters: - %$SiteErrorPageFilter SilverStripeVersionUpdater: constructor: - %$PackagistService UpdateAddonsTask: constructor: - %$AddonUpdater UpdateSilverStripeVersionsTask: constructor: - %$SilverStripeVersionUpdater BuildAddonsTask: constructor: - %$AddonBuilder --- Only: environment: 'live' After: - '#elastica' --- Injector: ElasticaService: class: SilverStripe\Elastica\ElasticaService constructor: client: %$ElasticClient index: addons --- Except: environment: 'live' After: - '#elastica' --- Injector: ElasticaService: class: SilverStripe\Elastica\ElasticaService constructor: client: %$ElasticClient index: addons-dev
--- name: 'addonsinjector' --- Injector: AddonBuilder: constructor: - %$PackagistService - %$SilverStripe\ModuleRatings\CheckSuite SilverStripe\ModuleRatings\CheckSuite: type: prototype AddonUpdater: constructor: - %$PackagistService - %$ElasticaService - %$Composer\Package\Version\VersionParser RequestProcessor: properties: filters: - %$SiteErrorPageFilter SilverStripeVersionUpdater: constructor: - %$PackagistService UpdateAddonsTask: constructor: - %$AddonUpdater UpdateSilverStripeVersionsTask: constructor: - %$SilverStripeVersionUpdater BuildAddonsTask: constructor: - %$AddonBuilder --- Only: environment: 'live' After: - '#elastica' --- Injector: ElasticaService: class: SilverStripe\Elastica\ElasticaService constructor: client: %$ElasticClient index: addons --- Except: environment: 'live' After: - '#elastica' --- Injector: ElasticaService: class: SilverStripe\Elastica\ElasticaService constructor: client: %$ElasticClient index: addons-dev
FIX Instantiate CheckSuite as prototype rather than singleton
FIX Instantiate CheckSuite as prototype rather than singleton
YAML
bsd-3-clause
silverstripe/addons.silverstripe.org,silverstripe/addons.silverstripe.org,silverstripe/addons.silverstripe.org
yaml
## Code Before: --- name: 'addonsinjector' --- Injector: AddonBuilder: constructor: - %$PackagistService - %$SilverStripe\ModuleRatings\CheckSuite AddonUpdater: constructor: - %$PackagistService - %$ElasticaService - %$Composer\Package\Version\VersionParser RequestProcessor: properties: filters: - %$SiteErrorPageFilter SilverStripeVersionUpdater: constructor: - %$PackagistService UpdateAddonsTask: constructor: - %$AddonUpdater UpdateSilverStripeVersionsTask: constructor: - %$SilverStripeVersionUpdater BuildAddonsTask: constructor: - %$AddonBuilder --- Only: environment: 'live' After: - '#elastica' --- Injector: ElasticaService: class: SilverStripe\Elastica\ElasticaService constructor: client: %$ElasticClient index: addons --- Except: environment: 'live' After: - '#elastica' --- Injector: ElasticaService: class: SilverStripe\Elastica\ElasticaService constructor: client: %$ElasticClient index: addons-dev ## Instruction: FIX Instantiate CheckSuite as prototype rather than singleton ## Code After: --- name: 'addonsinjector' --- Injector: AddonBuilder: constructor: - %$PackagistService - %$SilverStripe\ModuleRatings\CheckSuite SilverStripe\ModuleRatings\CheckSuite: type: prototype AddonUpdater: constructor: - %$PackagistService - %$ElasticaService - %$Composer\Package\Version\VersionParser RequestProcessor: properties: filters: - %$SiteErrorPageFilter SilverStripeVersionUpdater: constructor: - %$PackagistService UpdateAddonsTask: constructor: - %$AddonUpdater UpdateSilverStripeVersionsTask: constructor: - %$SilverStripeVersionUpdater BuildAddonsTask: constructor: - %$AddonBuilder --- Only: environment: 'live' After: - '#elastica' --- Injector: ElasticaService: class: SilverStripe\Elastica\ElasticaService constructor: client: %$ElasticClient index: addons --- Except: environment: 'live' After: - '#elastica' --- Injector: ElasticaService: class: SilverStripe\Elastica\ElasticaService constructor: client: %$ElasticClient index: addons-dev
--- name: 'addonsinjector' --- Injector: AddonBuilder: constructor: - %$PackagistService - %$SilverStripe\ModuleRatings\CheckSuite + SilverStripe\ModuleRatings\CheckSuite: + type: prototype AddonUpdater: constructor: - %$PackagistService - %$ElasticaService - %$Composer\Package\Version\VersionParser RequestProcessor: properties: filters: - %$SiteErrorPageFilter SilverStripeVersionUpdater: constructor: - %$PackagistService UpdateAddonsTask: constructor: - %$AddonUpdater UpdateSilverStripeVersionsTask: constructor: - %$SilverStripeVersionUpdater BuildAddonsTask: constructor: - %$AddonBuilder --- Only: environment: 'live' After: - '#elastica' --- Injector: ElasticaService: class: SilverStripe\Elastica\ElasticaService constructor: client: %$ElasticClient index: addons --- Except: environment: 'live' After: - '#elastica' --- Injector: ElasticaService: class: SilverStripe\Elastica\ElasticaService constructor: client: %$ElasticClient index: addons-dev
2
0.037736
2
0
e105b44e4c07b43c36290a8f5d703f4ff0b26953
sqlshare_rest/util/query_queue.py
sqlshare_rest/util/query_queue.py
from sqlshare_rest.util.db import get_backend from sqlshare_rest.models import Query from django.utils import timezone def process_queue(): filtered = Query.objects.filter(is_finished=False) try: oldest_query = filtered.order_by('id')[:1].get() except Query.DoesNotExist: return backend = get_backend() try: res = backend.run_query(oldest_query.sql, oldest_query.owner) except Exception as ex: oldest_query.has_error = True oldest_query.error = str(ex) oldest_query.is_finished = True oldest_query.date_finished = timezone.now() print "Finished: ", oldest_query.date_finished oldest_query.save()
from sqlshare_rest.util.db import get_backend from sqlshare_rest.models import Query from django.utils import timezone def process_queue(): filtered = Query.objects.filter(is_finished=False) try: oldest_query = filtered.order_by('id')[:1].get() except Query.DoesNotExist: return backend = get_backend() try: res = backend.run_query(oldest_query.sql, oldest_query.owner) except Exception as ex: oldest_query.has_error = True oldest_query.error = str(ex) oldest_query.is_finished = True oldest_query.date_finished = timezone.now() oldest_query.save()
Remove a print statement that was dumb and breaking python3
Remove a print statement that was dumb and breaking python3
Python
apache-2.0
uw-it-aca/sqlshare-rest,uw-it-aca/sqlshare-rest,uw-it-aca/sqlshare-rest,uw-it-aca/sqlshare-rest
python
## Code Before: from sqlshare_rest.util.db import get_backend from sqlshare_rest.models import Query from django.utils import timezone def process_queue(): filtered = Query.objects.filter(is_finished=False) try: oldest_query = filtered.order_by('id')[:1].get() except Query.DoesNotExist: return backend = get_backend() try: res = backend.run_query(oldest_query.sql, oldest_query.owner) except Exception as ex: oldest_query.has_error = True oldest_query.error = str(ex) oldest_query.is_finished = True oldest_query.date_finished = timezone.now() print "Finished: ", oldest_query.date_finished oldest_query.save() ## Instruction: Remove a print statement that was dumb and breaking python3 ## Code After: from sqlshare_rest.util.db import get_backend from sqlshare_rest.models import Query from django.utils import timezone def process_queue(): filtered = Query.objects.filter(is_finished=False) try: oldest_query = filtered.order_by('id')[:1].get() except Query.DoesNotExist: return backend = get_backend() try: res = backend.run_query(oldest_query.sql, oldest_query.owner) except Exception as ex: oldest_query.has_error = True oldest_query.error = str(ex) oldest_query.is_finished = True oldest_query.date_finished = timezone.now() oldest_query.save()
from sqlshare_rest.util.db import get_backend from sqlshare_rest.models import Query from django.utils import timezone def process_queue(): filtered = Query.objects.filter(is_finished=False) try: oldest_query = filtered.order_by('id')[:1].get() except Query.DoesNotExist: return backend = get_backend() try: res = backend.run_query(oldest_query.sql, oldest_query.owner) except Exception as ex: oldest_query.has_error = True oldest_query.error = str(ex) oldest_query.is_finished = True oldest_query.date_finished = timezone.now() - print "Finished: ", oldest_query.date_finished oldest_query.save()
1
0.041667
0
1
23a8112f12640892fe6fc67b83b4b3e8dcb1484e
appveyor.yml
appveyor.yml
#--------------------------------# # environment configuration # #--------------------------------# nuget: project_feed: true #--------------------------# # build configuration # #--------------------------# before_build: - nuget restore build: publish_nuget: true publish_nuget_symbols: true #-------------------------------# # deployment configuration # #-------------------------------# deploy: provider: NuGet api_key: secure: rGnzrQ4lRcTN4BXSukxZBNlIi5UKi9d92cnQwRH29Re/xff8muk63Yb3f+DXSXAH skip_symbols: false
#--------------------------------# # environment configuration # #--------------------------------# nuget: project_feed: true #--------------------------# # build configuration # #--------------------------# before_build: - nuget restore build: publish_nuget: true publish_nuget_symbols: true #-------------------------------# # deployment configuration # #-------------------------------# deploy: provider: NuGet api_key: secure: rGnzrQ4lRcTN4BXSukxZBNlIi5UKi9d92cnQwRH29Re/xff8muk63Yb3f+DXSXAH skip_symbols: false on: appveyor_repo_tag: true # Only deploy packages when a tag is pushed
Make CI server only deploy updated packages when a release is tagged.
Make CI server only deploy updated packages when a release is tagged.
YAML
mit
dneelyep/MonoGameUtils
yaml
## Code Before: #--------------------------------# # environment configuration # #--------------------------------# nuget: project_feed: true #--------------------------# # build configuration # #--------------------------# before_build: - nuget restore build: publish_nuget: true publish_nuget_symbols: true #-------------------------------# # deployment configuration # #-------------------------------# deploy: provider: NuGet api_key: secure: rGnzrQ4lRcTN4BXSukxZBNlIi5UKi9d92cnQwRH29Re/xff8muk63Yb3f+DXSXAH skip_symbols: false ## Instruction: Make CI server only deploy updated packages when a release is tagged. ## Code After: #--------------------------------# # environment configuration # #--------------------------------# nuget: project_feed: true #--------------------------# # build configuration # #--------------------------# before_build: - nuget restore build: publish_nuget: true publish_nuget_symbols: true #-------------------------------# # deployment configuration # #-------------------------------# deploy: provider: NuGet api_key: secure: rGnzrQ4lRcTN4BXSukxZBNlIi5UKi9d92cnQwRH29Re/xff8muk63Yb3f+DXSXAH skip_symbols: false on: appveyor_repo_tag: true # Only deploy packages when a tag is pushed
#--------------------------------# # environment configuration # #--------------------------------# nuget: project_feed: true #--------------------------# # build configuration # #--------------------------# before_build: - nuget restore build: publish_nuget: true publish_nuget_symbols: true #-------------------------------# # deployment configuration # #-------------------------------# deploy: provider: NuGet api_key: secure: rGnzrQ4lRcTN4BXSukxZBNlIi5UKi9d92cnQwRH29Re/xff8muk63Yb3f+DXSXAH skip_symbols: false + on: + appveyor_repo_tag: true # Only deploy packages when a tag is pushed
2
0.083333
2
0
aaefbd2bcbacea9e1c8eca8014b1e2c314eca37a
.travis.yml
.travis.yml
language: php php: [5.3.3, 5.3, 5.4, 5.5, 5.6, hhvm, hhvm-nightly] before_install: - echo 'hhvm.libxml.ext_entity_whitelist = file' > travis.hhvm.ini install: - COMPOSER_ROOT_VERSION=dev-master composer install --prefer-source script: - sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini bin/phpspec run; else bin/phpspec run; fi;' - sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini ./vendor/bin/behat --format=pretty; else ./vendor/bin/behat --format=pretty; fi;'
language: php php: [5.3.3, 5.3, 5.4, 5.5, 5.6, hhvm, hhvm-nightly] env: - COMPOSER_OPTIONS='install --prefer-source' matrix: include: - php: 5.3.3 env: COMPOSER_OPTIONS='update --prefer-lowest --prefer-source' before_install: - echo 'hhvm.libxml.ext_entity_whitelist = file' > travis.hhvm.ini - composer selfupdate install: - COMPOSER_ROOT_VERSION=dev-master composer $COMPOSER_OPTIONS script: - sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini bin/phpspec run; else bin/phpspec run; fi;' - sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini ./vendor/bin/behat --format=pretty; else ./vendor/bin/behat --format=pretty; fi;'
Add lowest dependencies to build matrix
Add lowest dependencies to build matrix
YAML
mit
nosun/phpspec,nosun/phpspec,gnugat-forks/phpspec,ghamoron/phpspec,rawkode/phpspec,jon-acker/phpspec,jon-acker/phpspec,iakio/phpspec,sroze/phpspec,iakio/phpspec,rawkode/phpspec,ulabox/phpspec,javi-dev/phpspec,gnugat-forks/phpspec,docteurklein/phpspec,Elfiggo/phpspec,ulabox/phpspec,localheinz/phpspec,sroze/phpspec,pamil/phpspec,bestform/phpspec,ghamoron/phpspec,javi-dev/phpspec,carlosV2/phpspec,Dragonrun1/phpspec,docteurklein/phpspec,localheinz/phpspec,shanethehat/phpspec,Elfiggo/phpspec,bestform/phpspec,danielkmariam/phpspec,carlosV2/phpspec,shanethehat/phpspec,danielkmariam/phpspec,Harrisonbro/phpspec,pamil/phpspec,Dragonrun1/phpspec,Harrisonbro/phpspec
yaml
## Code Before: language: php php: [5.3.3, 5.3, 5.4, 5.5, 5.6, hhvm, hhvm-nightly] before_install: - echo 'hhvm.libxml.ext_entity_whitelist = file' > travis.hhvm.ini install: - COMPOSER_ROOT_VERSION=dev-master composer install --prefer-source script: - sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini bin/phpspec run; else bin/phpspec run; fi;' - sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini ./vendor/bin/behat --format=pretty; else ./vendor/bin/behat --format=pretty; fi;' ## Instruction: Add lowest dependencies to build matrix ## Code After: language: php php: [5.3.3, 5.3, 5.4, 5.5, 5.6, hhvm, hhvm-nightly] env: - COMPOSER_OPTIONS='install --prefer-source' matrix: include: - php: 5.3.3 env: COMPOSER_OPTIONS='update --prefer-lowest --prefer-source' before_install: - echo 'hhvm.libxml.ext_entity_whitelist = file' > travis.hhvm.ini - composer selfupdate install: - COMPOSER_ROOT_VERSION=dev-master composer $COMPOSER_OPTIONS script: - sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini bin/phpspec run; else bin/phpspec run; fi;' - sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini ./vendor/bin/behat --format=pretty; else ./vendor/bin/behat --format=pretty; fi;'
language: php php: [5.3.3, 5.3, 5.4, 5.5, 5.6, hhvm, hhvm-nightly] + env: + - COMPOSER_OPTIONS='install --prefer-source' + + matrix: + include: + - php: 5.3.3 + env: COMPOSER_OPTIONS='update --prefer-lowest --prefer-source' + before_install: - echo 'hhvm.libxml.ext_entity_whitelist = file' > travis.hhvm.ini + - composer selfupdate install: - - COMPOSER_ROOT_VERSION=dev-master composer install --prefer-source + - COMPOSER_ROOT_VERSION=dev-master composer $COMPOSER_OPTIONS script: - sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini bin/phpspec run; else bin/phpspec run; fi;' - sh -c 'if [ "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "hhvm-nightly" ]; then hhvm -c travis.hhvm.ini ./vendor/bin/behat --format=pretty; else ./vendor/bin/behat --format=pretty; fi;'
11
0.846154
10
1
4626684ec2921c9250ddaf73339352eb946d0d49
.github/PULL_REQUEST_TEMPLATE.md
.github/PULL_REQUEST_TEMPLATE.md
Fixes issue #44242, or potential issue that ... ## Design of the fix, or a new feature Please make sure you outline all assumptions, operations, possible triggers. Also it must include expected results and actual results, making the difference clear. ## Related Issue, Pull Request or Code ## Wanted reviewer
Fixes issue #44242, or potential issue that ... ## Design of the fix, or a new feature Please make sure you outline all assumptions, operations, possible triggers. Also it must include expected results and actual results, making the difference clear. ## Related Issue, Pull Request or Code
Remove reviewer section from PR template
Remove reviewer section from PR template
Markdown
apache-2.0
asakusafw/asakusafw-shafu,ashigeru/asakusafw-shafu
markdown
## Code Before: Fixes issue #44242, or potential issue that ... ## Design of the fix, or a new feature Please make sure you outline all assumptions, operations, possible triggers. Also it must include expected results and actual results, making the difference clear. ## Related Issue, Pull Request or Code ## Wanted reviewer ## Instruction: Remove reviewer section from PR template ## Code After: Fixes issue #44242, or potential issue that ... ## Design of the fix, or a new feature Please make sure you outline all assumptions, operations, possible triggers. Also it must include expected results and actual results, making the difference clear. ## Related Issue, Pull Request or Code
Fixes issue #44242, or potential issue that ... ## Design of the fix, or a new feature Please make sure you outline all assumptions, operations, possible triggers. Also it must include expected results and actual results, making the difference clear. ## Related Issue, Pull Request or Code - - ## Wanted reviewer
2
0.166667
0
2
d165ae667c8b2d31c29111cd2a9627eda84dbfad
shared/_palette.scss
shared/_palette.scss
$palette-primary: #3CAFDA !default; $palette-alternate: #22537A !default; $palette-affirmative: #37C0C9 !default; $palette-warning: #F3BC26 !default; $palette-danger: #DD3B4C !default; $palette-snow: #E6E9EE !default; $palette-white: $palette-snow !default; $palette-alert: #CED4DA !default; $palette-light: $palette-alert !default; $palette-zinc: #9DAAB1 !default; $palette-medium: $palette-zinc !default; $palette-slate: #576265 !default; $palette-dark: $palette-slate !default; $palette-black: #354042 !default; $palette-mid: mix($palette-light, $palette-dark) !default; $palette-shadow: rgba($palette-black, 0.25) !default;
$palette-primary: #3CAFDA !default; $palette-alternate: #22537A !default; $palette-affirmative: #37C0C9 !default; $palette-warning: #F3BC26 !default; $palette-danger: #DD3B4C !default; $palette-snow: #E6E9EE !default; $palette-white: #FFFFFF !default; $palette-alert: #CED4DA !default; $palette-light: $palette-alert !default; $palette-zinc: #9DAAB1 !default; $palette-medium: $palette-zinc !default; $palette-slate: #576265 !default; $palette-dark: $palette-slate !default; $palette-black: #354042 !default; $palette-mid: mix($palette-light, $palette-dark) !default; $palette-shadow: rgba($palette-black, 0.25) !default;
Update $palette-white to be white
Update $palette-white to be white Design review mentioned the text on n-button--primary should be #fff
SCSS
isc
nioinnovation/nio-css-theme,nioinnovation/nio-css-theme
scss
## Code Before: $palette-primary: #3CAFDA !default; $palette-alternate: #22537A !default; $palette-affirmative: #37C0C9 !default; $palette-warning: #F3BC26 !default; $palette-danger: #DD3B4C !default; $palette-snow: #E6E9EE !default; $palette-white: $palette-snow !default; $palette-alert: #CED4DA !default; $palette-light: $palette-alert !default; $palette-zinc: #9DAAB1 !default; $palette-medium: $palette-zinc !default; $palette-slate: #576265 !default; $palette-dark: $palette-slate !default; $palette-black: #354042 !default; $palette-mid: mix($palette-light, $palette-dark) !default; $palette-shadow: rgba($palette-black, 0.25) !default; ## Instruction: Update $palette-white to be white Design review mentioned the text on n-button--primary should be #fff ## Code After: $palette-primary: #3CAFDA !default; $palette-alternate: #22537A !default; $palette-affirmative: #37C0C9 !default; $palette-warning: #F3BC26 !default; $palette-danger: #DD3B4C !default; $palette-snow: #E6E9EE !default; $palette-white: #FFFFFF !default; $palette-alert: #CED4DA !default; $palette-light: $palette-alert !default; $palette-zinc: #9DAAB1 !default; $palette-medium: $palette-zinc !default; $palette-slate: #576265 !default; $palette-dark: $palette-slate !default; $palette-black: #354042 !default; $palette-mid: mix($palette-light, $palette-dark) !default; $palette-shadow: rgba($palette-black, 0.25) !default;
$palette-primary: #3CAFDA !default; $palette-alternate: #22537A !default; $palette-affirmative: #37C0C9 !default; $palette-warning: #F3BC26 !default; $palette-danger: #DD3B4C !default; $palette-snow: #E6E9EE !default; - $palette-white: $palette-snow !default; + $palette-white: #FFFFFF !default; $palette-alert: #CED4DA !default; $palette-light: $palette-alert !default; $palette-zinc: #9DAAB1 !default; $palette-medium: $palette-zinc !default; $palette-slate: #576265 !default; $palette-dark: $palette-slate !default; $palette-black: #354042 !default; $palette-mid: mix($palette-light, $palette-dark) !default; $palette-shadow: rgba($palette-black, 0.25) !default;
2
0.105263
1
1
a06816b5b380a6c095e01fefb6c16628e4224eb6
CHANGELOG.md
CHANGELOG.md
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ## 0.1.0 - 2016-08-12 ### Added - Initial implementation of skippy-badge slack command - Random response selection - Handle ssl_check commands from slack [Unreleased]: https://github.com/houseofdross/slack-skippybadge/compare/v0.1.0...HEAD [0.1.0]: https://github.com/houseofdross/slack-skippybadge/compare/0.1.0...0.0.0
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ## 0.1.1 - 2016-08-12 ### Added - Initial implementation of skippy-badge slack command - Random response selection - Handle ssl_check commands from slack - Add a Heroku Procfile to manage the public webroot [Unreleased]: https://github.com/houseofdross/slack-skippybadge/compare/v0.1.1...HEAD [0.1.0]: https://github.com/houseofdross/slack-skippybadge/compare/0.1.1...0.0.0
Add 0.1.1 details to the Change Log
Add 0.1.1 details to the Change Log
Markdown
mit
houseofdross/slack-skippybadge
markdown
## Code Before: All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ## 0.1.0 - 2016-08-12 ### Added - Initial implementation of skippy-badge slack command - Random response selection - Handle ssl_check commands from slack [Unreleased]: https://github.com/houseofdross/slack-skippybadge/compare/v0.1.0...HEAD [0.1.0]: https://github.com/houseofdross/slack-skippybadge/compare/0.1.0...0.0.0 ## Instruction: Add 0.1.1 details to the Change Log ## Code After: All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] ## 0.1.1 - 2016-08-12 ### Added - Initial implementation of skippy-badge slack command - Random response selection - Handle ssl_check commands from slack - Add a Heroku Procfile to manage the public webroot [Unreleased]: https://github.com/houseofdross/slack-skippybadge/compare/v0.1.1...HEAD [0.1.0]: https://github.com/houseofdross/slack-skippybadge/compare/0.1.1...0.0.0
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - ## 0.1.0 - 2016-08-12 ? ^ + ## 0.1.1 - 2016-08-12 ? ^ ### Added - Initial implementation of skippy-badge slack command - Random response selection - Handle ssl_check commands from slack + - Add a Heroku Procfile to manage the public webroot - [Unreleased]: https://github.com/houseofdross/slack-skippybadge/compare/v0.1.0...HEAD ? ^ + [Unreleased]: https://github.com/houseofdross/slack-skippybadge/compare/v0.1.1...HEAD ? ^ - [0.1.0]: https://github.com/houseofdross/slack-skippybadge/compare/0.1.0...0.0.0 ? ^ + [0.1.0]: https://github.com/houseofdross/slack-skippybadge/compare/0.1.1...0.0.0 ? ^
7
0.538462
4
3
5118c78a3a89424e0577d538b2f85b1753284344
setup.py
setup.py
import os import re from setuptools import setup, find_packages def get_version(): with open(os.path.join(os.path.dirname(__file__), 'gitlab_mr.py')) as f: for line in f.readlines(): m = re.match(r"__version__ = '(.*?)'", line) if m: return m.group(1) raise ValueError('Cannot find version') def parse_requirements(req_file_path): with open(req_file_path) as f: return f.readlines() setup( name="gitlab-merge-request", version=get_version(), author="Alexander Koval", author_email="kovalidis@gmail.com", description=("Console utility to create gitlab merge requests."), license="Apache License 2.0", keywords="git gitlab merge-request", url="https://github.com/anti-social/gitlab-merge-request", py_modules=[ 'gitlab_mr', ], entry_points = { 'console_scripts': ['gitlab-mr = gitlab_mr:main'], }, install_requires=parse_requirements('requirements.txt'), classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Environment :: Console", "Topic :: Software Development :: Version Control", "Topic :: Utilities", ], )
import os import re import sys from setuptools import setup, find_packages PY_VER = sys.version_info if PY_VER >= (3, 4): pass else: raise RuntimeError("Only support Python version >= 3.4") def get_version(): with open(os.path.join(os.path.dirname(__file__), 'gitlab_mr.py')) as f: for line in f.readlines(): m = re.match(r"__version__ = '(.*?)'", line) if m: return m.group(1) raise ValueError('Cannot find version') def parse_requirements(req_file_path): with open(req_file_path) as f: return f.readlines() setup( name="gitlab-merge-request", version=get_version(), author="Alexander Koval", author_email="kovalidis@gmail.com", description=("Console utility to create gitlab merge requests."), license="Apache License 2.0", keywords="git gitlab merge-request", url="https://github.com/anti-social/gitlab-merge-request", py_modules=[ 'gitlab_mr', ], entry_points = { 'console_scripts': ['gitlab-mr = gitlab_mr:main'], }, install_requires=parse_requirements('requirements.txt'), classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Environment :: Console", "Topic :: Software Development :: Version Control", "Topic :: Utilities", ], )
Support only python >= 3.4
Support only python >= 3.4
Python
apache-2.0
anti-social/gitlab-merge-request
python
## Code Before: import os import re from setuptools import setup, find_packages def get_version(): with open(os.path.join(os.path.dirname(__file__), 'gitlab_mr.py')) as f: for line in f.readlines(): m = re.match(r"__version__ = '(.*?)'", line) if m: return m.group(1) raise ValueError('Cannot find version') def parse_requirements(req_file_path): with open(req_file_path) as f: return f.readlines() setup( name="gitlab-merge-request", version=get_version(), author="Alexander Koval", author_email="kovalidis@gmail.com", description=("Console utility to create gitlab merge requests."), license="Apache License 2.0", keywords="git gitlab merge-request", url="https://github.com/anti-social/gitlab-merge-request", py_modules=[ 'gitlab_mr', ], entry_points = { 'console_scripts': ['gitlab-mr = gitlab_mr:main'], }, install_requires=parse_requirements('requirements.txt'), classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Environment :: Console", "Topic :: Software Development :: Version Control", "Topic :: Utilities", ], ) ## Instruction: Support only python >= 3.4 ## Code After: import os import re import sys from setuptools import setup, find_packages PY_VER = sys.version_info if PY_VER >= (3, 4): pass else: raise RuntimeError("Only support Python version >= 3.4") def get_version(): with open(os.path.join(os.path.dirname(__file__), 'gitlab_mr.py')) as f: for line in f.readlines(): m = re.match(r"__version__ = '(.*?)'", line) if m: return m.group(1) raise ValueError('Cannot find version') def parse_requirements(req_file_path): with open(req_file_path) as f: return f.readlines() setup( name="gitlab-merge-request", version=get_version(), author="Alexander Koval", author_email="kovalidis@gmail.com", description=("Console utility to create gitlab merge requests."), license="Apache License 2.0", keywords="git gitlab merge-request", url="https://github.com/anti-social/gitlab-merge-request", py_modules=[ 'gitlab_mr', ], entry_points = { 'console_scripts': ['gitlab-mr = gitlab_mr:main'], }, install_requires=parse_requirements('requirements.txt'), classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Environment :: Console", "Topic :: Software Development :: Version Control", "Topic :: Utilities", ], )
import os import re + import sys from setuptools import setup, find_packages + + + PY_VER = sys.version_info + + if PY_VER >= (3, 4): + pass + else: + raise RuntimeError("Only support Python version >= 3.4") def get_version(): with open(os.path.join(os.path.dirname(__file__), 'gitlab_mr.py')) as f: for line in f.readlines(): m = re.match(r"__version__ = '(.*?)'", line) if m: return m.group(1) raise ValueError('Cannot find version') def parse_requirements(req_file_path): with open(req_file_path) as f: return f.readlines() setup( name="gitlab-merge-request", version=get_version(), author="Alexander Koval", author_email="kovalidis@gmail.com", description=("Console utility to create gitlab merge requests."), license="Apache License 2.0", keywords="git gitlab merge-request", url="https://github.com/anti-social/gitlab-merge-request", py_modules=[ 'gitlab_mr', ], entry_points = { 'console_scripts': ['gitlab-mr = gitlab_mr:main'], }, install_requires=parse_requirements('requirements.txt'), classifiers=[ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Environment :: Console", "Topic :: Software Development :: Version Control", "Topic :: Utilities", ], )
9
0.195652
9
0
0186c8c9da24193c5006aa0aa3ceedb3e1f6a4b0
examples/src/site/site.xml
examples/src/site/site.xml
<?xml version="1.0" encoding="utf-8"?> <project> <body> <menu ref="parent" /> <menu ref="reports" /> </body> </project>
<?xml version="1.0" encoding="utf-8"?> <project> <body> <menu ref="parent" /> <menu name="Details"> <item name="Transformers" href="../transformers/transformers.html" /> <item name="JSON Transformers" href="../transformers/json-transformers.html" /> <item name="Transformer Builders" href="../transformers/transformer-builders.html" /> <item name="Stream Builders" href="../streams/stream-builders.html" /> <item name="Updater Builders" href="../updaters/updater-builders.html" /> <item name="Messaging" href="../messaging/messaging.html" /> </menu> <menu ref="reports" /> </body> </project>
Add Details menu to examples module section.
Add Details menu to examples module section.
XML
apache-2.0
pushtechnology/diffusion-transform
xml
## Code Before: <?xml version="1.0" encoding="utf-8"?> <project> <body> <menu ref="parent" /> <menu ref="reports" /> </body> </project> ## Instruction: Add Details menu to examples module section. ## Code After: <?xml version="1.0" encoding="utf-8"?> <project> <body> <menu ref="parent" /> <menu name="Details"> <item name="Transformers" href="../transformers/transformers.html" /> <item name="JSON Transformers" href="../transformers/json-transformers.html" /> <item name="Transformer Builders" href="../transformers/transformer-builders.html" /> <item name="Stream Builders" href="../streams/stream-builders.html" /> <item name="Updater Builders" href="../updaters/updater-builders.html" /> <item name="Messaging" href="../messaging/messaging.html" /> </menu> <menu ref="reports" /> </body> </project>
<?xml version="1.0" encoding="utf-8"?> <project> <body> <menu ref="parent" /> + <menu name="Details"> + <item name="Transformers" href="../transformers/transformers.html" /> + <item name="JSON Transformers" href="../transformers/json-transformers.html" /> + <item name="Transformer Builders" href="../transformers/transformer-builders.html" /> + <item name="Stream Builders" href="../streams/stream-builders.html" /> + <item name="Updater Builders" href="../updaters/updater-builders.html" /> + <item name="Messaging" href="../messaging/messaging.html" /> + </menu> <menu ref="reports" /> </body> </project>
8
1.142857
8
0
cf44429c6018e60fad21080c4d60b9ecde1d9881
contrib/chatops/actions/workflows/post_result.yaml
contrib/chatops/actions/workflows/post_result.yaml
--- chain: - name: "format_execution_result" ref: "chatops.format_execution_result" parameters: execution_id: "{{execution_id}}" publish: message: "{{format_execution_result.result.message}}" extra: "{{format_execution_result.result.extra}}" on-success: "post_message" - name: "post_message" ref: "chatops.post_message" parameters: user: "{{user}}" channel: "{{channel}}" whisper: "{{whisper}}" message: "{{message}}" extra: "{{extra}}"
--- chain: - name: "format_execution_result" ref: "chatops.format_execution_result" parameters: execution_id: "{{execution_id}}" publish: message: "{{format_execution_result.result.message}}" extra: "{% if 'extra' in format_execution_result.result %}{{format_execution_result.result.extra}}{% endif %}" on-success: "post_message" - name: "post_message" ref: "chatops.post_message" parameters: user: "{{user}}" channel: "{{channel}}" whisper: "{{whisper}}" message: "{{message}}" extra: "{{extra}}"
Fix for publishing `extra` in post_message
Fix for publishing `extra` in post_message
YAML
apache-2.0
peak6/st2,pixelrebel/st2,pixelrebel/st2,nzlosh/st2,lakshmi-kannan/st2,punalpatel/st2,StackStorm/st2,nzlosh/st2,peak6/st2,nzlosh/st2,Plexxi/st2,tonybaloney/st2,emedvedev/st2,punalpatel/st2,Plexxi/st2,StackStorm/st2,tonybaloney/st2,punalpatel/st2,StackStorm/st2,Plexxi/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,emedvedev/st2,peak6/st2,lakshmi-kannan/st2,pixelrebel/st2,emedvedev/st2,lakshmi-kannan/st2,tonybaloney/st2
yaml
## Code Before: --- chain: - name: "format_execution_result" ref: "chatops.format_execution_result" parameters: execution_id: "{{execution_id}}" publish: message: "{{format_execution_result.result.message}}" extra: "{{format_execution_result.result.extra}}" on-success: "post_message" - name: "post_message" ref: "chatops.post_message" parameters: user: "{{user}}" channel: "{{channel}}" whisper: "{{whisper}}" message: "{{message}}" extra: "{{extra}}" ## Instruction: Fix for publishing `extra` in post_message ## Code After: --- chain: - name: "format_execution_result" ref: "chatops.format_execution_result" parameters: execution_id: "{{execution_id}}" publish: message: "{{format_execution_result.result.message}}" extra: "{% if 'extra' in format_execution_result.result %}{{format_execution_result.result.extra}}{% endif %}" on-success: "post_message" - name: "post_message" ref: "chatops.post_message" parameters: user: "{{user}}" channel: "{{channel}}" whisper: "{{whisper}}" message: "{{message}}" extra: "{{extra}}"
--- chain: - name: "format_execution_result" ref: "chatops.format_execution_result" parameters: execution_id: "{{execution_id}}" publish: message: "{{format_execution_result.result.message}}" - extra: "{{format_execution_result.result.extra}}" + extra: "{% if 'extra' in format_execution_result.result %}{{format_execution_result.result.extra}}{% endif %}" on-success: "post_message" - name: "post_message" ref: "chatops.post_message" parameters: user: "{{user}}" channel: "{{channel}}" whisper: "{{whisper}}" message: "{{message}}" extra: "{{extra}}"
2
0.1
1
1
132dd61e209440f91a50743dc2030d884cc9ae02
app/models/gobierto_people/department.rb
app/models/gobierto_people/department.rb
require_dependency "gobierto_people" module GobiertoPeople class Department < ApplicationRecord include GobiertoCommon::Sluggable belongs_to :site has_many :events, class_name: "GobiertoCalendars::Event" has_many :gifts has_many :invitations has_many :trips scope :sorted, -> { order(name: :asc) } validates :name, presence: true def to_param slug end def parameterize { id: slug } end def attributes_for_slug [name] end end end
require_dependency "gobierto_people" module GobiertoPeople class Department < ApplicationRecord include GobiertoCommon::Metadatable include GobiertoCommon::UrlBuildable include GobiertoCommon::Sluggable belongs_to :site has_many :events, class_name: "GobiertoCalendars::Event" has_many :gifts has_many :invitations has_many :trips scope :sorted, -> { order(name: :asc) } validates :name, presence: true def to_param slug end def parameterize { id: slug } end def attributes_for_slug [name] end end end
Add concerns to GobiertoCommon::Department model
Add concerns to GobiertoCommon::Department model
Ruby
agpl-3.0
PopulateTools/gobierto-dev,PopulateTools/gobierto-dev,PopulateTools/gobierto,PopulateTools/gobierto,PopulateTools/gobierto-dev,PopulateTools/gobierto-dev,PopulateTools/gobierto,PopulateTools/gobierto
ruby
## Code Before: require_dependency "gobierto_people" module GobiertoPeople class Department < ApplicationRecord include GobiertoCommon::Sluggable belongs_to :site has_many :events, class_name: "GobiertoCalendars::Event" has_many :gifts has_many :invitations has_many :trips scope :sorted, -> { order(name: :asc) } validates :name, presence: true def to_param slug end def parameterize { id: slug } end def attributes_for_slug [name] end end end ## Instruction: Add concerns to GobiertoCommon::Department model ## Code After: require_dependency "gobierto_people" module GobiertoPeople class Department < ApplicationRecord include GobiertoCommon::Metadatable include GobiertoCommon::UrlBuildable include GobiertoCommon::Sluggable belongs_to :site has_many :events, class_name: "GobiertoCalendars::Event" has_many :gifts has_many :invitations has_many :trips scope :sorted, -> { order(name: :asc) } validates :name, presence: true def to_param slug end def parameterize { id: slug } end def attributes_for_slug [name] end end end
require_dependency "gobierto_people" module GobiertoPeople class Department < ApplicationRecord + include GobiertoCommon::Metadatable + include GobiertoCommon::UrlBuildable include GobiertoCommon::Sluggable belongs_to :site has_many :events, class_name: "GobiertoCalendars::Event" has_many :gifts has_many :invitations has_many :trips scope :sorted, -> { order(name: :asc) } validates :name, presence: true def to_param slug end def parameterize { id: slug } end def attributes_for_slug [name] end end end
2
0.064516
2
0
43303565151cfd6f1dc2fb435dabb8ef8c8dc4c0
.travis.yml
.travis.yml
language: python python: - '2.7' services: - elasticsearch before_script: - sleep 10 env: - DATABASE_URL=postgres://postgres@localhost:5432/postgres install: - "pip install 'tox>=2.0.2,<3.0.0'" - pip install coveralls script: - tox after_success: coveralls deploy: provider: heroku strategy: git api_key: secure: CGv5mHV8SFnFkdwpRl2EGRU5kvnl7xfxZPgl5DvqJHZ6xBreDpGFQOyQDVVqRAt7s9Dq/JD8qMCvm15rVRdXN9rKMDFV9ilPiR2dTBPs5rzE+upA/W2N2+pkQrnXEP+80EF3Wy3ODUAUb4aUlCwG1NqZCWnn4NzuZNCtAYEqwuk= app: master: lore-ci release: lore-release run: - "sleep 15" - "python manage.py migrate --noinput" - "python manage.py update_index" - "python manage.py sync_permissions"
language: python python: - '2.7' services: - elasticsearch before_script: - sleep 10 env: - DATABASE_URL=postgres://postgres@localhost:5432/postgres install: - "pip install 'tox>=2.0.2,<3.0.0'" - pip install coveralls script: - tox after_success: coveralls deploy: provider: heroku api_key: secure: CGv5mHV8SFnFkdwpRl2EGRU5kvnl7xfxZPgl5DvqJHZ6xBreDpGFQOyQDVVqRAt7s9Dq/JD8qMCvm15rVRdXN9rKMDFV9ilPiR2dTBPs5rzE+upA/W2N2+pkQrnXEP+80EF3Wy3ODUAUb4aUlCwG1NqZCWnn4NzuZNCtAYEqwuk= app: master: lore-ci release: lore-release run: - "sleep 15" - "python manage.py migrate --noinput" - "python manage.py update_index --verbosity=0" - "python manage.py sync_permissions"
Fix deployment issues with Travis - Reverted to default API deployment - Changed verbosity of index update management command to 0
Fix deployment issues with Travis - Reverted to default API deployment - Changed verbosity of index update management command to 0
YAML
agpl-3.0
amir-qayyum-khan/lore,amir-qayyum-khan/lore,mitodl/lore,mitodl/lore,amir-qayyum-khan/lore,amir-qayyum-khan/lore,mitodl/lore,mitodl/lore,amir-qayyum-khan/lore,mitodl/lore
yaml
## Code Before: language: python python: - '2.7' services: - elasticsearch before_script: - sleep 10 env: - DATABASE_URL=postgres://postgres@localhost:5432/postgres install: - "pip install 'tox>=2.0.2,<3.0.0'" - pip install coveralls script: - tox after_success: coveralls deploy: provider: heroku strategy: git api_key: secure: CGv5mHV8SFnFkdwpRl2EGRU5kvnl7xfxZPgl5DvqJHZ6xBreDpGFQOyQDVVqRAt7s9Dq/JD8qMCvm15rVRdXN9rKMDFV9ilPiR2dTBPs5rzE+upA/W2N2+pkQrnXEP+80EF3Wy3ODUAUb4aUlCwG1NqZCWnn4NzuZNCtAYEqwuk= app: master: lore-ci release: lore-release run: - "sleep 15" - "python manage.py migrate --noinput" - "python manage.py update_index" - "python manage.py sync_permissions" ## Instruction: Fix deployment issues with Travis - Reverted to default API deployment - Changed verbosity of index update management command to 0 ## Code After: language: python python: - '2.7' services: - elasticsearch before_script: - sleep 10 env: - DATABASE_URL=postgres://postgres@localhost:5432/postgres install: - "pip install 'tox>=2.0.2,<3.0.0'" - pip install coveralls script: - tox after_success: coveralls deploy: provider: heroku api_key: secure: CGv5mHV8SFnFkdwpRl2EGRU5kvnl7xfxZPgl5DvqJHZ6xBreDpGFQOyQDVVqRAt7s9Dq/JD8qMCvm15rVRdXN9rKMDFV9ilPiR2dTBPs5rzE+upA/W2N2+pkQrnXEP+80EF3Wy3ODUAUb4aUlCwG1NqZCWnn4NzuZNCtAYEqwuk= app: master: lore-ci release: lore-release run: - "sleep 15" - "python manage.py migrate --noinput" - "python manage.py update_index --verbosity=0" - "python manage.py sync_permissions"
language: python python: - '2.7' services: - elasticsearch before_script: - sleep 10 env: - DATABASE_URL=postgres://postgres@localhost:5432/postgres install: - "pip install 'tox>=2.0.2,<3.0.0'" - pip install coveralls script: - tox after_success: coveralls deploy: provider: heroku - strategy: git api_key: secure: CGv5mHV8SFnFkdwpRl2EGRU5kvnl7xfxZPgl5DvqJHZ6xBreDpGFQOyQDVVqRAt7s9Dq/JD8qMCvm15rVRdXN9rKMDFV9ilPiR2dTBPs5rzE+upA/W2N2+pkQrnXEP+80EF3Wy3ODUAUb4aUlCwG1NqZCWnn4NzuZNCtAYEqwuk= app: master: lore-ci release: lore-release run: - "sleep 15" - "python manage.py migrate --noinput" - - "python manage.py update_index" + - "python manage.py update_index --verbosity=0" ? ++++++++++++++ - "python manage.py sync_permissions"
3
0.107143
1
2
ce6e46263f1e3a6b2f103f62cad1d6d9fb6fa7aa
app/views/issues/_all_map.html.haml
app/views/issues/_all_map.html.haml
- @map = basic_map do |map, page| - page << map.setCenter(OpenLayers::LonLat.new(@start_location.x, @start_location.y).transform(projection, map.getProjectionObject()),@start_location.z); - vectorlayer = MapLayers::JsVar.new("vectorlayer") - protocol = OpenLayers::Protocol::HTTP.new( url: all_geometries_issues_path(:json), format: :format_plain ) - page.assign(vectorlayer, OpenLayers::Layer::Vector.new("Issues", protocol: protocol, projection: projection, strategies: [OpenLayers::Strategy::BBOX.new()])) - page << map.add_layer(vectorlayer) %div#map != @map.to_html
- @map = display_bbox_map(@start_location, all_geometries_issues_path(:json)) do |map, page| %div#map != @map.to_html
Update issues map to use the new display_bbox_map helper
Update issues map to use the new display_bbox_map helper
Haml
mit
auto-mat/toolkit,cyclestreets/cyclescape,auto-mat/toolkit,cyclestreets/cyclescape,cyclestreets/cyclescape
haml
## Code Before: - @map = basic_map do |map, page| - page << map.setCenter(OpenLayers::LonLat.new(@start_location.x, @start_location.y).transform(projection, map.getProjectionObject()),@start_location.z); - vectorlayer = MapLayers::JsVar.new("vectorlayer") - protocol = OpenLayers::Protocol::HTTP.new( url: all_geometries_issues_path(:json), format: :format_plain ) - page.assign(vectorlayer, OpenLayers::Layer::Vector.new("Issues", protocol: protocol, projection: projection, strategies: [OpenLayers::Strategy::BBOX.new()])) - page << map.add_layer(vectorlayer) %div#map != @map.to_html ## Instruction: Update issues map to use the new display_bbox_map helper ## Code After: - @map = display_bbox_map(@start_location, all_geometries_issues_path(:json)) do |map, page| %div#map != @map.to_html
+ - @map = display_bbox_map(@start_location, all_geometries_issues_path(:json)) do |map, page| - - @map = basic_map do |map, page| - - page << map.setCenter(OpenLayers::LonLat.new(@start_location.x, @start_location.y).transform(projection, map.getProjectionObject()),@start_location.z); - - - vectorlayer = MapLayers::JsVar.new("vectorlayer") - - protocol = OpenLayers::Protocol::HTTP.new( url: all_geometries_issues_path(:json), format: :format_plain ) - - page.assign(vectorlayer, OpenLayers::Layer::Vector.new("Issues", protocol: protocol, projection: projection, strategies: [OpenLayers::Strategy::BBOX.new()])) - - page << map.add_layer(vectorlayer) - - %div#map + %div#map ? ++ != @map.to_html
11
1.1
2
9
b6075360deb86d444c0df453389414eaee39f9fe
coding/coding_tests/mem_file_writer_test.cpp
coding/coding_tests/mem_file_writer_test.cpp
UNIT_TEST(MemWriterEmpty) { vector<char> data; { MemWriter< vector<char> > writer(data); } TEST(data.empty(), (data)); } UNIT_TEST(MemWriterSimple) { vector<char> data; MemWriter< vector<char> > writer(data); writer.Write("Hello", 5); writer.Write(",", 1); writer.Write("world!", 6); char const expected_string[] = "Hello,world!"; vector<char> expected_data(&expected_string[0], &expected_string[ARRAY_SIZE(expected_string)-1]); TEST_EQUAL(data, expected_data, ()); }
UNIT_TEST(MemWriterEmpty) { vector<char> data; { MemWriter< vector<char> > writer(data); } TEST(data.empty(), (data)); } UNIT_TEST(MemWriterSimple) { vector<char> data; MemWriter< vector<char> > writer(data); writer.Write("Hello", 5); writer.Write(",", 1); writer.Write("world!", 6); char const expected[] = "Hello,world!"; TEST_EQUAL(data.size(), ARRAY_SIZE(expected)-1, ()); TEST(equal(data.begin(), data.end(), &expected[0]), (data)); } /* UNIT_TEST(FileWriter_NoDiskSpace) { FileWriter w("/Volumes/Untitled/file.bin"); vector<uint8_t> bytes(100000000); for (size_t i = 0; i < 10; ++i) w.Write(&bytes[0], bytes.size()); } */
Test for FileWriter (not enough disk space).
Test for FileWriter (not enough disk space).
C++
apache-2.0
andrewshadura/omim,augmify/omim,felipebetancur/omim,AlexanderMatveenko/omim,andrewshadura/omim,AlexanderMatveenko/omim,yunikkk/omim,mgsergio/omim,goblinr/omim,programming086/omim,Zverik/omim,therearesomewhocallmetim/omim,Komzpa/omim,sidorov-panda/omim,guard163/omim,mpimenov/omim,felipebetancur/omim,Transtech/omim,UdjinM6/omim,Zverik/omim,krasin/omim,UdjinM6/omim,Transtech/omim,VladiMihaylenko/omim,rokuz/omim,AlexanderMatveenko/omim,AlexanderMatveenko/omim,guard163/omim,trashkalmar/omim,vng/omim,alexzatsepin/omim,alexzatsepin/omim,simon247/omim,rokuz/omim,yunikkk/omim,edl00k/omim,programming086/omim,programming086/omim,syershov/omim,Zverik/omim,Komzpa/omim,milchakov/omim,Zverik/omim,AlexanderMatveenko/omim,matsprea/omim,guard163/omim,syershov/omim,darina/omim,rokuz/omim,edl00k/omim,mapsme/omim,dobriy-eeh/omim,milchakov/omim,rokuz/omim,mapsme/omim,darina/omim,trashkalmar/omim,Endika/omim,Saicheg/omim,krasin/omim,vladon/omim,lydonchandra/omim,matsprea/omim,goblinr/omim,darina/omim,matsprea/omim,UdjinM6/omim,Komzpa/omim,dkorolev/omim,andrewshadura/omim,victorbriz/omim,Transtech/omim,stangls/omim,darina/omim,programming086/omim,sidorov-panda/omim,lydonchandra/omim,Volcanoscar/omim,syershov/omim,trashkalmar/omim,bykoianko/omim,kw217/omim,programming086/omim,TimurTarasenko/omim,goblinr/omim,jam891/omim,albertshift/omim,mpimenov/omim,dkorolev/omim,65apps/omim,simon247/omim,andrewshadura/omim,edl00k/omim,igrechuhin/omim,albertshift/omim,augmify/omim,vasilenkomike/omim,edl00k/omim,dobriy-eeh/omim,mpimenov/omim,Endika/omim,krasin/omim,victorbriz/omim,wersoo/omim,VladiMihaylenko/omim,vladon/omim,syershov/omim,Komzpa/omim,TimurTarasenko/omim,TimurTarasenko/omim,Zverik/omim,victorbriz/omim,jam891/omim,Volcanoscar/omim,andrewshadura/omim,victorbriz/omim,VladiMihaylenko/omim,65apps/omim,Transtech/omim,therearesomewhocallmetim/omim,milchakov/omim,dobriy-eeh/omim,albertshift/omim,mpimenov/omim,felipebetancur/omim,dkorolev/omim,Saicheg/omim,dobriy-eeh/omim,therearesomewhocallmetim/omim,krasin/omim,jam891/omim,Endika/omim,syershov/omim,stangls/omim,mpimenov/omim,sidorov-panda/omim,Zverik/omim,mpimenov/omim,therearesomewhocallmetim/omim,yunikkk/omim,albertshift/omim,AlexanderMatveenko/omim,gardster/omim,vng/omim,milchakov/omim,alexzatsepin/omim,mgsergio/omim,AlexanderMatveenko/omim,jam891/omim,dkorolev/omim,vasilenkomike/omim,bykoianko/omim,krasin/omim,jam891/omim,Endika/omim,bykoianko/omim,victorbriz/omim,guard163/omim,vladon/omim,sidorov-panda/omim,Volcanoscar/omim,victorbriz/omim,augmify/omim,simon247/omim,milchakov/omim,vng/omim,ygorshenin/omim,mapsme/omim,VladiMihaylenko/omim,albertshift/omim,VladiMihaylenko/omim,wersoo/omim,sidorov-panda/omim,ygorshenin/omim,albertshift/omim,igrechuhin/omim,albertshift/omim,igrechuhin/omim,milchakov/omim,Transtech/omim,trashkalmar/omim,simon247/omim,alexzatsepin/omim,Volcanoscar/omim,mgsergio/omim,milchakov/omim,matsprea/omim,65apps/omim,edl00k/omim,VladiMihaylenko/omim,ygorshenin/omim,darina/omim,vng/omim,dobriy-eeh/omim,alexzatsepin/omim,65apps/omim,vng/omim,simon247/omim,igrechuhin/omim,UdjinM6/omim,stangls/omim,guard163/omim,jam891/omim,goblinr/omim,vng/omim,edl00k/omim,lydonchandra/omim,vladon/omim,TimurTarasenko/omim,rokuz/omim,goblinr/omim,milchakov/omim,guard163/omim,lydonchandra/omim,sidorov-panda/omim,vladon/omim,goblinr/omim,goblinr/omim,bykoianko/omim,bykoianko/omim,andrewshadura/omim,TimurTarasenko/omim,bykoianko/omim,Transtech/omim,65apps/omim,kw217/omim,UdjinM6/omim,mpimenov/omim,kw217/omim,stangls/omim,dkorolev/omim,gardster/omim,Saicheg/omim,vladon/omim,therearesomewhocallmetim/omim,yunikkk/omim,bykoianko/omim,stangls/omim,kw217/omim,lydonchandra/omim,yunikkk/omim,mapsme/omim,jam891/omim,stangls/omim,simon247/omim,rokuz/omim,65apps/omim,Volcanoscar/omim,jam891/omim,jam891/omim,sidorov-panda/omim,krasin/omim,felipebetancur/omim,bykoianko/omim,TimurTarasenko/omim,Zverik/omim,matsprea/omim,matsprea/omim,stangls/omim,Volcanoscar/omim,guard163/omim,syershov/omim,felipebetancur/omim,trashkalmar/omim,dobriy-eeh/omim,vng/omim,guard163/omim,syershov/omim,mgsergio/omim,andrewshadura/omim,mpimenov/omim,alexzatsepin/omim,igrechuhin/omim,trashkalmar/omim,VladiMihaylenko/omim,andrewshadura/omim,alexzatsepin/omim,vladon/omim,UdjinM6/omim,ygorshenin/omim,dkorolev/omim,igrechuhin/omim,wersoo/omim,andrewshadura/omim,lydonchandra/omim,dobriy-eeh/omim,mapsme/omim,edl00k/omim,augmify/omim,lydonchandra/omim,ygorshenin/omim,therearesomewhocallmetim/omim,VladiMihaylenko/omim,simon247/omim,syershov/omim,stangls/omim,wersoo/omim,milchakov/omim,darina/omim,AlexanderMatveenko/omim,kw217/omim,therearesomewhocallmetim/omim,bykoianko/omim,felipebetancur/omim,ygorshenin/omim,mapsme/omim,vladon/omim,milchakov/omim,therearesomewhocallmetim/omim,Endika/omim,igrechuhin/omim,Transtech/omim,mpimenov/omim,TimurTarasenko/omim,felipebetancur/omim,Transtech/omim,Zverik/omim,sidorov-panda/omim,programming086/omim,dobriy-eeh/omim,dobriy-eeh/omim,rokuz/omim,milchakov/omim,alexzatsepin/omim,65apps/omim,igrechuhin/omim,Saicheg/omim,albertshift/omim,lydonchandra/omim,Endika/omim,Endika/omim,rokuz/omim,Komzpa/omim,alexzatsepin/omim,rokuz/omim,andrewshadura/omim,igrechuhin/omim,yunikkk/omim,vasilenkomike/omim,Zverik/omim,mapsme/omim,UdjinM6/omim,bykoianko/omim,kw217/omim,darina/omim,UdjinM6/omim,gardster/omim,UdjinM6/omim,mgsergio/omim,TimurTarasenko/omim,darina/omim,vasilenkomike/omim,augmify/omim,ygorshenin/omim,mapsme/omim,dobriy-eeh/omim,simon247/omim,mgsergio/omim,trashkalmar/omim,simon247/omim,Zverik/omim,vasilenkomike/omim,kw217/omim,dkorolev/omim,vasilenkomike/omim,victorbriz/omim,milchakov/omim,vladon/omim,ygorshenin/omim,syershov/omim,wersoo/omim,mapsme/omim,vasilenkomike/omim,mapsme/omim,programming086/omim,mgsergio/omim,wersoo/omim,Saicheg/omim,matsprea/omim,rokuz/omim,simon247/omim,syershov/omim,goblinr/omim,Saicheg/omim,jam891/omim,Komzpa/omim,dobriy-eeh/omim,Transtech/omim,bykoianko/omim,gardster/omim,Zverik/omim,syershov/omim,matsprea/omim,guard163/omim,Endika/omim,bykoianko/omim,VladiMihaylenko/omim,sidorov-panda/omim,lydonchandra/omim,65apps/omim,edl00k/omim,Saicheg/omim,programming086/omim,sidorov-panda/omim,victorbriz/omim,Transtech/omim,edl00k/omim,mgsergio/omim,victorbriz/omim,alexzatsepin/omim,Komzpa/omim,mgsergio/omim,mapsme/omim,wersoo/omim,therearesomewhocallmetim/omim,Komzpa/omim,goblinr/omim,wersoo/omim,dobriy-eeh/omim,rokuz/omim,milchakov/omim,programming086/omim,alexzatsepin/omim,augmify/omim,augmify/omim,AlexanderMatveenko/omim,augmify/omim,Volcanoscar/omim,VladiMihaylenko/omim,Saicheg/omim,UdjinM6/omim,wersoo/omim,victorbriz/omim,Saicheg/omim,goblinr/omim,gardster/omim,gardster/omim,vng/omim,mpimenov/omim,vladon/omim,Komzpa/omim,kw217/omim,TimurTarasenko/omim,vasilenkomike/omim,programming086/omim,gardster/omim,darina/omim,igrechuhin/omim,rokuz/omim,stangls/omim,yunikkk/omim,AlexanderMatveenko/omim,yunikkk/omim,Volcanoscar/omim,felipebetancur/omim,ygorshenin/omim,albertshift/omim,matsprea/omim,trashkalmar/omim,krasin/omim,krasin/omim,goblinr/omim,albertshift/omim,goblinr/omim,darina/omim,vng/omim,ygorshenin/omim,Komzpa/omim,65apps/omim,vng/omim,goblinr/omim,ygorshenin/omim,VladiMihaylenko/omim,VladiMihaylenko/omim,krasin/omim,dkorolev/omim,mapsme/omim,vasilenkomike/omim,mgsergio/omim,darina/omim,Zverik/omim,Transtech/omim,stangls/omim,mgsergio/omim,krasin/omim,kw217/omim,ygorshenin/omim,trashkalmar/omim,syershov/omim,darina/omim,wersoo/omim,dobriy-eeh/omim,trashkalmar/omim,Saicheg/omim,Transtech/omim,trashkalmar/omim,alexzatsepin/omim,augmify/omim,vasilenkomike/omim,darina/omim,mpimenov/omim,rokuz/omim,mpimenov/omim,syershov/omim,stangls/omim,yunikkk/omim,VladiMihaylenko/omim,TimurTarasenko/omim,lydonchandra/omim,augmify/omim,bykoianko/omim,kw217/omim,felipebetancur/omim,gardster/omim,yunikkk/omim,trashkalmar/omim,guard163/omim,65apps/omim,felipebetancur/omim,Volcanoscar/omim,matsprea/omim,therearesomewhocallmetim/omim,yunikkk/omim,gardster/omim,dkorolev/omim,65apps/omim,Endika/omim,dkorolev/omim,Zverik/omim,Volcanoscar/omim,alexzatsepin/omim,gardster/omim,mpimenov/omim,edl00k/omim,mgsergio/omim,Endika/omim,mapsme/omim
c++
## Code Before: UNIT_TEST(MemWriterEmpty) { vector<char> data; { MemWriter< vector<char> > writer(data); } TEST(data.empty(), (data)); } UNIT_TEST(MemWriterSimple) { vector<char> data; MemWriter< vector<char> > writer(data); writer.Write("Hello", 5); writer.Write(",", 1); writer.Write("world!", 6); char const expected_string[] = "Hello,world!"; vector<char> expected_data(&expected_string[0], &expected_string[ARRAY_SIZE(expected_string)-1]); TEST_EQUAL(data, expected_data, ()); } ## Instruction: Test for FileWriter (not enough disk space). ## Code After: UNIT_TEST(MemWriterEmpty) { vector<char> data; { MemWriter< vector<char> > writer(data); } TEST(data.empty(), (data)); } UNIT_TEST(MemWriterSimple) { vector<char> data; MemWriter< vector<char> > writer(data); writer.Write("Hello", 5); writer.Write(",", 1); writer.Write("world!", 6); char const expected[] = "Hello,world!"; TEST_EQUAL(data.size(), ARRAY_SIZE(expected)-1, ()); TEST(equal(data.begin(), data.end(), &expected[0]), (data)); } /* UNIT_TEST(FileWriter_NoDiskSpace) { FileWriter w("/Volumes/Untitled/file.bin"); vector<uint8_t> bytes(100000000); for (size_t i = 0; i < 10; ++i) w.Write(&bytes[0], bytes.size()); } */
+ UNIT_TEST(MemWriterEmpty) { vector<char> data; { MemWriter< vector<char> > writer(data); } TEST(data.empty(), (data)); } UNIT_TEST(MemWriterSimple) { vector<char> data; MemWriter< vector<char> > writer(data); writer.Write("Hello", 5); writer.Write(",", 1); writer.Write("world!", 6); + - char const expected_string[] = "Hello,world!"; ? ------- + char const expected[] = "Hello,world!"; - vector<char> expected_data(&expected_string[0], &expected_string[ARRAY_SIZE(expected_string)-1]); - TEST_EQUAL(data, expected_data, ()); + TEST_EQUAL(data.size(), ARRAY_SIZE(expected)-1, ()); + TEST(equal(data.begin(), data.end(), &expected[0]), (data)); } + + /* + UNIT_TEST(FileWriter_NoDiskSpace) + { + FileWriter w("/Volumes/Untitled/file.bin"); + + vector<uint8_t> bytes(100000000); + + for (size_t i = 0; i < 10; ++i) + w.Write(&bytes[0], bytes.size()); + } + */
20
0.952381
17
3
0ea2acfd56903186b7f4bba38b5c23dfca05fe9e
component/Session/Core.php
component/Session/Core.php
<?php namespace Perfumer\Component\Session; use Stash\Pool as Cache; class Core { /** * @var \Stash\Pool */ protected $cache; protected $items = []; protected $lifetime = 3600; public function __construct(Cache $cache, array $options = []) { $this->cache = $cache; if (isset($options['lifetime'])) $this->lifetime = (int) $options['lifetime']; } public function get($id = null) { if ($id === null) $id = $this->generateId(); if (isset($this->items[$id])) return $this->items[$id]; $this->items[$id] = new Item($this, $this->cache, [ 'id' => $id, 'lifetime' => $this->lifetime ]); return $this->items[$id]; } public function has($id) { return !$this->cache->getItem('_session/' . $id)->isMiss(); } public function destroy($id) { $this->get($id)->destroy(); } protected function generateId() { $id = uniqid('', true); do { $id = md5($id); $item = $this->cache->getItem('_session/' . $id); } while (!$item->isMiss() || isset($this->items[$id])); return $id; } }
<?php namespace Perfumer\Component\Session; use Perfumer\Helper\Text; use Stash\Pool as Cache; class Core { /** * @var \Stash\Pool */ protected $cache; protected $items = []; protected $lifetime = 3600; public function __construct(Cache $cache, array $options = []) { $this->cache = $cache; if (isset($options['lifetime'])) $this->lifetime = (int) $options['lifetime']; } public function get($id = null) { if ($id === null) $id = $this->generateId(); if (isset($this->items[$id])) return $this->items[$id]; $this->items[$id] = new Item($this, $this->cache, [ 'id' => $id, 'lifetime' => $this->lifetime ]); return $this->items[$id]; } public function has($id) { return !$this->cache->getItem('_session/' . $id)->isMiss(); } public function destroy($id) { $this->get($id)->destroy(); } protected function generateId() { do { $id = Text::generateString(20); $item = $this->cache->getItem('_session/' . $id); } while (!$item->isMiss() || isset($this->items[$id])); return $id; } }
Change a way of generating session ids
Change a way of generating session ids
PHP
apache-2.0
perfumer/framework
php
## Code Before: <?php namespace Perfumer\Component\Session; use Stash\Pool as Cache; class Core { /** * @var \Stash\Pool */ protected $cache; protected $items = []; protected $lifetime = 3600; public function __construct(Cache $cache, array $options = []) { $this->cache = $cache; if (isset($options['lifetime'])) $this->lifetime = (int) $options['lifetime']; } public function get($id = null) { if ($id === null) $id = $this->generateId(); if (isset($this->items[$id])) return $this->items[$id]; $this->items[$id] = new Item($this, $this->cache, [ 'id' => $id, 'lifetime' => $this->lifetime ]); return $this->items[$id]; } public function has($id) { return !$this->cache->getItem('_session/' . $id)->isMiss(); } public function destroy($id) { $this->get($id)->destroy(); } protected function generateId() { $id = uniqid('', true); do { $id = md5($id); $item = $this->cache->getItem('_session/' . $id); } while (!$item->isMiss() || isset($this->items[$id])); return $id; } } ## Instruction: Change a way of generating session ids ## Code After: <?php namespace Perfumer\Component\Session; use Perfumer\Helper\Text; use Stash\Pool as Cache; class Core { /** * @var \Stash\Pool */ protected $cache; protected $items = []; protected $lifetime = 3600; public function __construct(Cache $cache, array $options = []) { $this->cache = $cache; if (isset($options['lifetime'])) $this->lifetime = (int) $options['lifetime']; } public function get($id = null) { if ($id === null) $id = $this->generateId(); if (isset($this->items[$id])) return $this->items[$id]; $this->items[$id] = new Item($this, $this->cache, [ 'id' => $id, 'lifetime' => $this->lifetime ]); return $this->items[$id]; } public function has($id) { return !$this->cache->getItem('_session/' . $id)->isMiss(); } public function destroy($id) { $this->get($id)->destroy(); } protected function generateId() { do { $id = Text::generateString(20); $item = $this->cache->getItem('_session/' . $id); } while (!$item->isMiss() || isset($this->items[$id])); return $id; } }
<?php namespace Perfumer\Component\Session; + use Perfumer\Helper\Text; use Stash\Pool as Cache; class Core { /** * @var \Stash\Pool */ protected $cache; protected $items = []; protected $lifetime = 3600; public function __construct(Cache $cache, array $options = []) { $this->cache = $cache; if (isset($options['lifetime'])) $this->lifetime = (int) $options['lifetime']; } public function get($id = null) { if ($id === null) $id = $this->generateId(); if (isset($this->items[$id])) return $this->items[$id]; $this->items[$id] = new Item($this, $this->cache, [ 'id' => $id, 'lifetime' => $this->lifetime ]); return $this->items[$id]; } public function has($id) { return !$this->cache->getItem('_session/' . $id)->isMiss(); } public function destroy($id) { $this->get($id)->destroy(); } protected function generateId() { - $id = uniqid('', true); - do { - $id = md5($id); + $id = Text::generateString(20); $item = $this->cache->getItem('_session/' . $id); } while (!$item->isMiss() || isset($this->items[$id])); return $id; } }
5
0.075758
2
3
fac280a022c8728f14bbe1194cf74af761b7ec3f
vfp2py/__main__.py
vfp2py/__main__.py
import argparse import vfp2py def parse_args(argv=None): parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python') parser.add_argument("infile", help="file to convert", type=str) parser.add_argument("outfile", help="file to output to", type=str) parser.add_argument("search", help="directories to search for included files", type=str, nargs='*') return parser.parse_args(argv) def main(argv=None): args = parse_args(argv) global SEARCH_PATH SEARCH_PATH = args.search vfp2py.convert_file(args.infile, args.outfile) if __name__ == '__main__': try: main() except KeyboardInterrupt: pass
import argparse import vfp2py def parse_args(argv=None): parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python') parser.add_argument("infile", help="file to convert", type=str) parser.add_argument("outfile", help="file to output to", type=str) parser.add_argument("search", help="directories to search for included files", type=str, nargs='*') return parser.parse_args(argv) def main(argv=None): args = parse_args(argv) vfp2py.SEARCH_PATH += args.search vfp2py.convert_file(args.infile, args.outfile) if __name__ == '__main__': try: main() except KeyboardInterrupt: pass
Fix search paths not being added from arguments.
Fix search paths not being added from arguments.
Python
mit
mwisslead/vfp2py,mwisslead/vfp2py
python
## Code Before: import argparse import vfp2py def parse_args(argv=None): parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python') parser.add_argument("infile", help="file to convert", type=str) parser.add_argument("outfile", help="file to output to", type=str) parser.add_argument("search", help="directories to search for included files", type=str, nargs='*') return parser.parse_args(argv) def main(argv=None): args = parse_args(argv) global SEARCH_PATH SEARCH_PATH = args.search vfp2py.convert_file(args.infile, args.outfile) if __name__ == '__main__': try: main() except KeyboardInterrupt: pass ## Instruction: Fix search paths not being added from arguments. ## Code After: import argparse import vfp2py def parse_args(argv=None): parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python') parser.add_argument("infile", help="file to convert", type=str) parser.add_argument("outfile", help="file to output to", type=str) parser.add_argument("search", help="directories to search for included files", type=str, nargs='*') return parser.parse_args(argv) def main(argv=None): args = parse_args(argv) vfp2py.SEARCH_PATH += args.search vfp2py.convert_file(args.infile, args.outfile) if __name__ == '__main__': try: main() except KeyboardInterrupt: pass
import argparse import vfp2py def parse_args(argv=None): parser = argparse.ArgumentParser(description='Tool for rewriting Foxpro code in Python') parser.add_argument("infile", help="file to convert", type=str) parser.add_argument("outfile", help="file to output to", type=str) parser.add_argument("search", help="directories to search for included files", type=str, nargs='*') return parser.parse_args(argv) def main(argv=None): args = parse_args(argv) - global SEARCH_PATH - SEARCH_PATH = args.search + vfp2py.SEARCH_PATH += args.search ? +++++++ + vfp2py.convert_file(args.infile, args.outfile) if __name__ == '__main__': try: main() except KeyboardInterrupt: pass
3
0.136364
1
2
750dad21868304cbe06b2039e5a8f0f561caa924
.travis.yml
.travis.yml
language: cpp dist: trusty sudo: required only: - master - develop - \/feature\/.+ - \/fix\/.+ - \/hotfix\/.+ - \/release\/.+ addons: apt: sources: - ubuntu-toolchain-r-test before_install: - sudo apt-get update - sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck - sudo apt-get install -f clang-format-3.6 script: - cppcheck --force -isrc/3rd_party -isrc/3rd_party-static --quiet --error-exitcode=1 src - ./tools/infrastructure/check_style.sh - mkdir build && cd build - cmake ../ -DBUILD_TESTS=ON - make install && sudo ldconfig after_success: - make test env: global: - LC_CTYPE=en_US.UTF-8 - CTEST_OUTPUT_ON_FAILURE=TRUE - LD_LIBRARY_PATH=.
language: cpp dist: trusty sudo: required only: - master - develop - \/feature\/.+ - \/fix\/.+ - \/hotfix\/.+ - \/release\/.+ addons: apt: sources: - ubuntu-toolchain-r-test before_install: - sudo apt-get update - sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck - sudo apt-get install -f clang-format-3.6 script: - cppcheck --force -isrc/3rd_party -isrc/3rd_party-static --quiet --error-exitcode=1 src - ./tools/infrastructure/check_style.sh - mkdir build && cd build - cmake ../ -DBUILD_TESTS=ON - make install-3rd_party && make -j `nproc` install && sudo ldconfig - make test env: global: - LC_CTYPE=en_US.UTF-8 - CTEST_OUTPUT_ON_FAILURE=TRUE - LD_LIBRARY_PATH=.
Add multithread and move tests into main build
Add multithread and move tests into main build
YAML
bsd-3-clause
smartdevicelink/sdl_core,smartdevicelink/sdl_core,smartdevicelink/sdl_core,smartdevicelink/sdl_core
yaml
## Code Before: language: cpp dist: trusty sudo: required only: - master - develop - \/feature\/.+ - \/fix\/.+ - \/hotfix\/.+ - \/release\/.+ addons: apt: sources: - ubuntu-toolchain-r-test before_install: - sudo apt-get update - sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck - sudo apt-get install -f clang-format-3.6 script: - cppcheck --force -isrc/3rd_party -isrc/3rd_party-static --quiet --error-exitcode=1 src - ./tools/infrastructure/check_style.sh - mkdir build && cd build - cmake ../ -DBUILD_TESTS=ON - make install && sudo ldconfig after_success: - make test env: global: - LC_CTYPE=en_US.UTF-8 - CTEST_OUTPUT_ON_FAILURE=TRUE - LD_LIBRARY_PATH=. ## Instruction: Add multithread and move tests into main build ## Code After: language: cpp dist: trusty sudo: required only: - master - develop - \/feature\/.+ - \/fix\/.+ - \/hotfix\/.+ - \/release\/.+ addons: apt: sources: - ubuntu-toolchain-r-test before_install: - sudo apt-get update - sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck - sudo apt-get install -f clang-format-3.6 script: - cppcheck --force -isrc/3rd_party -isrc/3rd_party-static --quiet --error-exitcode=1 src - ./tools/infrastructure/check_style.sh - mkdir build && cd build - cmake ../ -DBUILD_TESTS=ON - make install-3rd_party && make -j `nproc` install && sudo ldconfig - make test env: global: - LC_CTYPE=en_US.UTF-8 - CTEST_OUTPUT_ON_FAILURE=TRUE - LD_LIBRARY_PATH=.
language: cpp dist: trusty sudo: required only: - master - develop - \/feature\/.+ - \/fix\/.+ - \/hotfix\/.+ - \/release\/.+ addons: apt: sources: - ubuntu-toolchain-r-test before_install: - sudo apt-get update - sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck - sudo apt-get install -f clang-format-3.6 script: - cppcheck --force -isrc/3rd_party -isrc/3rd_party-static --quiet --error-exitcode=1 src - ./tools/infrastructure/check_style.sh - mkdir build && cd build - cmake ../ -DBUILD_TESTS=ON + - make install-3rd_party && make -j `nproc` install && sudo ldconfig - - make install && sudo ldconfig - after_success: - make test env: global: - LC_CTYPE=en_US.UTF-8 - CTEST_OUTPUT_ON_FAILURE=TRUE - LD_LIBRARY_PATH=.
3
0.088235
1
2
612544b9b367e5a0d7c46a948718c39e7d70ea61
requirements/common.txt
requirements/common.txt
tornado==1.1 http://bueda.public.s3.amazonaws.com/JPype-0.5.4.1.zip http://bueda.public.s3.amazonaws.com/neo4j.tar.gz
tornado==1.1 http://bueda.public.s3.amazonaws.com/JPype-0.5.4.1.zip http://bueda.public.s3.amazonaws.com/neo4j.tar.gz networkx==1.3
Add networkx python package requirement.
Add networkx python package requirement.
Text
mit
peplin/trinity
text
## Code Before: tornado==1.1 http://bueda.public.s3.amazonaws.com/JPype-0.5.4.1.zip http://bueda.public.s3.amazonaws.com/neo4j.tar.gz ## Instruction: Add networkx python package requirement. ## Code After: tornado==1.1 http://bueda.public.s3.amazonaws.com/JPype-0.5.4.1.zip http://bueda.public.s3.amazonaws.com/neo4j.tar.gz networkx==1.3
tornado==1.1 http://bueda.public.s3.amazonaws.com/JPype-0.5.4.1.zip http://bueda.public.s3.amazonaws.com/neo4j.tar.gz + networkx==1.3
1
0.333333
1
0
04674ad10d047c0448c469e8f9f91e17a5f039b7
templates/default/fulldoc/html/full_list.erb
templates/default/fulldoc/html/full_list.erb
<!DOCTYPE html> <html> <head> <meta charset="<%= charset %>" /> <% stylesheets_full_list.each do |stylesheet| %> <link rel="stylesheet" href="<%= url_for(stylesheet) %>" type="text/css" media="screen" charset="utf-8" /> <% end %> <% javascripts_full_list.each do |javascript| %> <script type="text/javascript" charset="utf-8" src="<%= url_for(javascript) %>"></script> <% end %> <title><%= @list_title %></title> <base id="base_target" target="_parent" /> </head> <body> <div id="content"> <div class="fixed_header"> <h1 id="full_list_header"><%= @list_title %></h1> <div id="full_list_nav"> <% menu_lists.each do |list| %> <span><a target="_self" href="<%= url_for_list list[:type] %>"> <%= list[:title] %> </a></span> <% end %> </div> <!-- don't auto-focus on search --> <input type="text" autofocus="autofocus" style="position:absolute;top:-10000px" /> <div id="search">Search: <input type="text" /></div> </div> <ul id="full_list" class="<%= @list_class || @list_type %>"> <%= erb "full_list_#{@list_type}" %> </ul> </div> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="<%= charset %>" /> <% stylesheets_full_list.each do |stylesheet| %> <link rel="stylesheet" href="<%= url_for(stylesheet) %>" type="text/css" media="screen" charset="utf-8" /> <% end %> <% javascripts_full_list.each do |javascript| %> <script type="text/javascript" charset="utf-8" src="<%= url_for(javascript) %>"></script> <% end %> <title><%= @list_title %></title> <base id="base_target" target="_parent" /> </head> <body> <div id="content"> <div class="fixed_header"> <h1 id="full_list_header"><%= @list_title %></h1> <div id="full_list_nav"> <% menu_lists.each do |list| %> <span><a target="_self" href="<%= url_for_list list[:type] %>"> <%= list[:title] %> </a></span> <% end %> </div> <div id="search">Search: <input type="text" /></div> </div> <ul id="full_list" class="<%= @list_class || @list_type %>"> <%= erb "full_list_#{@list_type}" %> </ul> </div> </body> </html>
Fix focus issue when anchor is present in URL
Fix focus issue when anchor is present in URL
HTML+ERB
mit
ohai/yard,amclain/yard,alexdowad/yard,ohai/yard,jreinert/yard,ohai/yard,thomthom/yard,alexdowad/yard,iankronquist/yard,thomthom/yard,iankronquist/yard,amclain/yard,jreinert/yard,amclain/yard,thomthom/yard,jreinert/yard,herosky/yard,lsegal/yard,iankronquist/yard,herosky/yard,alexdowad/yard,lsegal/yard,lsegal/yard,herosky/yard
html+erb
## Code Before: <!DOCTYPE html> <html> <head> <meta charset="<%= charset %>" /> <% stylesheets_full_list.each do |stylesheet| %> <link rel="stylesheet" href="<%= url_for(stylesheet) %>" type="text/css" media="screen" charset="utf-8" /> <% end %> <% javascripts_full_list.each do |javascript| %> <script type="text/javascript" charset="utf-8" src="<%= url_for(javascript) %>"></script> <% end %> <title><%= @list_title %></title> <base id="base_target" target="_parent" /> </head> <body> <div id="content"> <div class="fixed_header"> <h1 id="full_list_header"><%= @list_title %></h1> <div id="full_list_nav"> <% menu_lists.each do |list| %> <span><a target="_self" href="<%= url_for_list list[:type] %>"> <%= list[:title] %> </a></span> <% end %> </div> <!-- don't auto-focus on search --> <input type="text" autofocus="autofocus" style="position:absolute;top:-10000px" /> <div id="search">Search: <input type="text" /></div> </div> <ul id="full_list" class="<%= @list_class || @list_type %>"> <%= erb "full_list_#{@list_type}" %> </ul> </div> </body> </html> ## Instruction: Fix focus issue when anchor is present in URL ## Code After: <!DOCTYPE html> <html> <head> <meta charset="<%= charset %>" /> <% stylesheets_full_list.each do |stylesheet| %> <link rel="stylesheet" href="<%= url_for(stylesheet) %>" type="text/css" media="screen" charset="utf-8" /> <% end %> <% javascripts_full_list.each do |javascript| %> <script type="text/javascript" charset="utf-8" src="<%= url_for(javascript) %>"></script> <% end %> <title><%= @list_title %></title> <base id="base_target" target="_parent" /> </head> <body> <div id="content"> <div class="fixed_header"> <h1 id="full_list_header"><%= @list_title %></h1> <div id="full_list_nav"> <% menu_lists.each do |list| %> <span><a target="_self" href="<%= url_for_list list[:type] %>"> <%= list[:title] %> </a></span> <% end %> </div> <div id="search">Search: <input type="text" /></div> </div> <ul id="full_list" class="<%= @list_class || @list_type %>"> <%= erb "full_list_#{@list_type}" %> </ul> </div> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="<%= charset %>" /> <% stylesheets_full_list.each do |stylesheet| %> <link rel="stylesheet" href="<%= url_for(stylesheet) %>" type="text/css" media="screen" charset="utf-8" /> <% end %> <% javascripts_full_list.each do |javascript| %> <script type="text/javascript" charset="utf-8" src="<%= url_for(javascript) %>"></script> <% end %> <title><%= @list_title %></title> <base id="base_target" target="_parent" /> </head> <body> <div id="content"> <div class="fixed_header"> <h1 id="full_list_header"><%= @list_title %></h1> <div id="full_list_nav"> <% menu_lists.each do |list| %> <span><a target="_self" href="<%= url_for_list list[:type] %>"> <%= list[:title] %> </a></span> <% end %> </div> - <!-- don't auto-focus on search --> - <input type="text" autofocus="autofocus" - style="position:absolute;top:-10000px" /> - <div id="search">Search: <input type="text" /></div> </div> <ul id="full_list" class="<%= @list_class || @list_type %>"> <%= erb "full_list_#{@list_type}" %> </ul> </div> </body> </html>
4
0.1
0
4
178b39611ec6bc32e4bb0ccd481660a0364872d7
src/tests/test_utils.py
src/tests/test_utils.py
import numpy as np import skimage.filter as filters def generate_linear_structure(size, with_noise=False): """Generate a basic linear structure, optionally with noise""" linear_structure = np.zeros(shape=(size,size)) linear_structure[:,size/2] = np.ones(size) if with_noise: linear_structure = np.identity(size) noise = np.random.rand(size, size) * 0.1 linear_structure += noise linear_structure = filters.gaussian_filter(linear_structure, 1.5) return linear_structure
import numpy as np import skimage.filter as filters def generate_linear_structure(size, with_noise=False): """Generate a basic linear structure, optionally with noise""" linear_structure = np.zeros(shape=(size,size)) linear_structure[:,size/2] = np.ones(size) if with_noise: linear_structure = np.identity(size) noise = np.random.rand(size, size) * 0.1 linear_structure += noise linear_structure = filters.gaussian_filter(linear_structure, 1.5) return linear_structure def generate_blob(): """ Generate a blob by drawing from the normal distribution across two axes and binning it to the required size """ mean = [0,0] cov = [[1,1],[10,100]] # diagonal covariance, points lie on x or y-axis x,y = np.random.multivariate_normal(mean,cov,5000).T h, xedges, yedges = np.histogram2d(x,y, bins=100) return h
Add testing function for blobs
Add testing function for blobs
Python
mit
samueljackson92/major-project,samueljackson92/major-project,samueljackson92/major-project,samueljackson92/major-project
python
## Code Before: import numpy as np import skimage.filter as filters def generate_linear_structure(size, with_noise=False): """Generate a basic linear structure, optionally with noise""" linear_structure = np.zeros(shape=(size,size)) linear_structure[:,size/2] = np.ones(size) if with_noise: linear_structure = np.identity(size) noise = np.random.rand(size, size) * 0.1 linear_structure += noise linear_structure = filters.gaussian_filter(linear_structure, 1.5) return linear_structure ## Instruction: Add testing function for blobs ## Code After: import numpy as np import skimage.filter as filters def generate_linear_structure(size, with_noise=False): """Generate a basic linear structure, optionally with noise""" linear_structure = np.zeros(shape=(size,size)) linear_structure[:,size/2] = np.ones(size) if with_noise: linear_structure = np.identity(size) noise = np.random.rand(size, size) * 0.1 linear_structure += noise linear_structure = filters.gaussian_filter(linear_structure, 1.5) return linear_structure def generate_blob(): """ Generate a blob by drawing from the normal distribution across two axes and binning it to the required size """ mean = [0,0] cov = [[1,1],[10,100]] # diagonal covariance, points lie on x or y-axis x,y = np.random.multivariate_normal(mean,cov,5000).T h, xedges, yedges = np.histogram2d(x,y, bins=100) return h
import numpy as np import skimage.filter as filters def generate_linear_structure(size, with_noise=False): """Generate a basic linear structure, optionally with noise""" linear_structure = np.zeros(shape=(size,size)) linear_structure[:,size/2] = np.ones(size) if with_noise: linear_structure = np.identity(size) noise = np.random.rand(size, size) * 0.1 linear_structure += noise linear_structure = filters.gaussian_filter(linear_structure, 1.5) return linear_structure + + + def generate_blob(): + """ Generate a blob by drawing from the normal distribution across two axes + and binning it to the required size + """ + mean = [0,0] + cov = [[1,1],[10,100]] # diagonal covariance, points lie on x or y-axis + x,y = np.random.multivariate_normal(mean,cov,5000).T + h, xedges, yedges = np.histogram2d(x,y, bins=100) + return h
11
0.733333
11
0
9330c22cf8db86781cd1d759b4f586ea79fb82a1
README.md
README.md
![Banner](banner.png) Bromium ======= Engine for simulating reactions using Brownian motion. Sub-libraries ------------- Bromium consists of the following set of smaller libraries: - `bromium.math` Collection of general mathematical algorithms - `bromium.views` Additional typed views - `bromium.structs` Data structures for the simulation - `bromium.kinetics` Simulation kinetics algorithms - `bromium.nodes` Library for node based scene modeling - `bromium.engine` Controller for an isolated simulation with nodes - `bromium.gpgpu` Helpers for GPU computations using WebGL - `bromium.glutils` WebGL utility library - `bromium.renderer` Simulation 3D renderer - `bromium.editor` Scene editor for Bromium Conventions ----------- ### Types In almost all circumstances it is preferred to use types from the `vector_math` library to keep the code more readable. Array to vector conversion should be minimized. ### Loops Prefer `for-in` loops over `forEach` loops. Always use `for-in` when possible. ### Comments Meaningless comments such as `/// Constructor` or copied comments from the super class should be omitted.
![Banner](banner.png) Bromium ======= Engine for simulating reactions using Brownian motion. Sub-libraries ------------- Bromium consists of the following set of smaller libraries: - `bromium.math` Collection of general mathematical algorithms - `bromium.views` Additional typed views - `bromium.structs` Data structures for the simulation - `bromium.kinetics` Simulation kinetics algorithms - `bromium.nodes` Library for node based scene modeling - `bromium.engine` Controller for an isolated simulation with nodes - `bromium.gpgpu` Helpers for GPU computations using WebGL - `bromium.glutils` WebGL utility library - `bromium.renderer` Simulation 3D renderer - `bromium.editor` Scene editor for Bromium Conventions ----------- ### Types In almost all circumstances it is preferred to use types from the `vector_math` library to keep the code more readable. Array to vector conversion should be minimized. ### Loops Prefer `for-in` loops over `forEach` loops. Always use `for-in` when possible. ### Comments Meaningless comments such as `/// Constructor` or copied comments from the super class should be omitted. Topics for further research --------------------------- ### Optimization of reaction finding Currently a voxel based approach is used where all inter-voxel reactions are implicitly discarded. Alternative approaches have shown significant lower performance. More performance might be gained by caching results from previous cycles. A very interesting question is how much the voxel approach hurts the accuracy of the entire simulation. ### Accuracy of brownian motion Currently a not too accurate approach is used to compute the random motion. Each cycle the particle is displaced by a normalized vector that points in a random direction times a random number between 0 and 1.
Add some notes on physical accuracy
Add some notes on physical accuracy
Markdown
agpl-3.0
molview/bromium,molview/bromium,molview/bromium
markdown
## Code Before: ![Banner](banner.png) Bromium ======= Engine for simulating reactions using Brownian motion. Sub-libraries ------------- Bromium consists of the following set of smaller libraries: - `bromium.math` Collection of general mathematical algorithms - `bromium.views` Additional typed views - `bromium.structs` Data structures for the simulation - `bromium.kinetics` Simulation kinetics algorithms - `bromium.nodes` Library for node based scene modeling - `bromium.engine` Controller for an isolated simulation with nodes - `bromium.gpgpu` Helpers for GPU computations using WebGL - `bromium.glutils` WebGL utility library - `bromium.renderer` Simulation 3D renderer - `bromium.editor` Scene editor for Bromium Conventions ----------- ### Types In almost all circumstances it is preferred to use types from the `vector_math` library to keep the code more readable. Array to vector conversion should be minimized. ### Loops Prefer `for-in` loops over `forEach` loops. Always use `for-in` when possible. ### Comments Meaningless comments such as `/// Constructor` or copied comments from the super class should be omitted. ## Instruction: Add some notes on physical accuracy ## Code After: ![Banner](banner.png) Bromium ======= Engine for simulating reactions using Brownian motion. Sub-libraries ------------- Bromium consists of the following set of smaller libraries: - `bromium.math` Collection of general mathematical algorithms - `bromium.views` Additional typed views - `bromium.structs` Data structures for the simulation - `bromium.kinetics` Simulation kinetics algorithms - `bromium.nodes` Library for node based scene modeling - `bromium.engine` Controller for an isolated simulation with nodes - `bromium.gpgpu` Helpers for GPU computations using WebGL - `bromium.glutils` WebGL utility library - `bromium.renderer` Simulation 3D renderer - `bromium.editor` Scene editor for Bromium Conventions ----------- ### Types In almost all circumstances it is preferred to use types from the `vector_math` library to keep the code more readable. Array to vector conversion should be minimized. ### Loops Prefer `for-in` loops over `forEach` loops. Always use `for-in` when possible. ### Comments Meaningless comments such as `/// Constructor` or copied comments from the super class should be omitted. Topics for further research --------------------------- ### Optimization of reaction finding Currently a voxel based approach is used where all inter-voxel reactions are implicitly discarded. Alternative approaches have shown significant lower performance. More performance might be gained by caching results from previous cycles. A very interesting question is how much the voxel approach hurts the accuracy of the entire simulation. ### Accuracy of brownian motion Currently a not too accurate approach is used to compute the random motion. Each cycle the particle is displaced by a normalized vector that points in a random direction times a random number between 0 and 1.
![Banner](banner.png) Bromium ======= Engine for simulating reactions using Brownian motion. Sub-libraries ------------- Bromium consists of the following set of smaller libraries: - `bromium.math` Collection of general mathematical algorithms - `bromium.views` Additional typed views - `bromium.structs` Data structures for the simulation - `bromium.kinetics` Simulation kinetics algorithms - `bromium.nodes` Library for node based scene modeling - `bromium.engine` Controller for an isolated simulation with nodes - `bromium.gpgpu` Helpers for GPU computations using WebGL - `bromium.glutils` WebGL utility library - `bromium.renderer` Simulation 3D renderer - `bromium.editor` Scene editor for Bromium Conventions ----------- ### Types In almost all circumstances it is preferred to use types from the `vector_math` library to keep the code more readable. Array to vector conversion should be minimized. ### Loops Prefer `for-in` loops over `forEach` loops. Always use `for-in` when possible. ### Comments Meaningless comments such as `/// Constructor` or copied comments from the super class should be omitted. + + Topics for further research + --------------------------- + ### Optimization of reaction finding + Currently a voxel based approach is used where all inter-voxel reactions are + implicitly discarded. Alternative approaches have shown significant lower + performance. More performance might be gained by caching results from previous + cycles. A very interesting question is how much the voxel approach hurts the + accuracy of the entire simulation. + + ### Accuracy of brownian motion + Currently a not too accurate approach is used to compute the random motion. Each + cycle the particle is displaced by a normalized vector that points in a random + direction times a random number between 0 and 1.
14
0.411765
14
0
f8cb8a428be10a8d2978994e8c9874d2d8ebab1a
app/controllers/users_controller.rb
app/controllers/users_controller.rb
class UsersController < ApplicationController before_action :authenticate_user! def dashboard flash.notice = "Welcome #{current_user.email}! It's currently #{Time.new}" render 'dashboard' end end
class UsersController < ApplicationController before_action :authenticate_user! def dashboard flash.notice = "Welcome to Not Bored Tonight, todd@example.com!" render 'dashboard' end end
Fix User Controller to make user_sign_up_spec test pass
Fix User Controller to make user_sign_up_spec test pass
Ruby
mit
TerrenceLJones/not-bored-tonight,TerrenceLJones/not-bored-tonight
ruby
## Code Before: class UsersController < ApplicationController before_action :authenticate_user! def dashboard flash.notice = "Welcome #{current_user.email}! It's currently #{Time.new}" render 'dashboard' end end ## Instruction: Fix User Controller to make user_sign_up_spec test pass ## Code After: class UsersController < ApplicationController before_action :authenticate_user! def dashboard flash.notice = "Welcome to Not Bored Tonight, todd@example.com!" render 'dashboard' end end
class UsersController < ApplicationController before_action :authenticate_user! def dashboard - flash.notice = "Welcome #{current_user.email}! It's currently #{Time.new}" + flash.notice = "Welcome to Not Bored Tonight, todd@example.com!" render 'dashboard' end end
2
0.2
1
1
371b5cffd0e20c540b01d00076ec38ccc0bda504
spec/leaflet_spec.js
spec/leaflet_spec.js
describe('LeafletMap Ext Component', function() { describe('Basics', function() { var Map = vrs.ux.touch.LeafletMap; it('provides new mapping events', function() { var map = new Map(); expect(map.events.repPicked).toBeDefined(); }); it('provides new mapping events', function() { var map = new Map(); expect(map.events.repPicked).toBeDefined(); }); }); });
/* Disable Leaflet for now describe('LeafletMap Ext Component', function() { describe('Basics', function() { var Map = vrs.ux.touch.LeafletMap; it('provides new mapping events', function() { var map = new Map(); expect(map.events.repPicked).toBeDefined(); }); it('provides new mapping events', function() { var map = new Map(); expect(map.events.repPicked).toBeDefined(); }); }); }); */
Comment out leaflet test for now since it depends upon manually installing leaflet to a given directory path.
Comment out leaflet test for now since it depends upon manually installing leaflet to a given directory path.
JavaScript
mit
vrsource/vrs.ux.touch,vrsource/vrs.ux.touch,vrsource/vrs.ux.touch,vrsource/vrs.ux.touch
javascript
## Code Before: describe('LeafletMap Ext Component', function() { describe('Basics', function() { var Map = vrs.ux.touch.LeafletMap; it('provides new mapping events', function() { var map = new Map(); expect(map.events.repPicked).toBeDefined(); }); it('provides new mapping events', function() { var map = new Map(); expect(map.events.repPicked).toBeDefined(); }); }); }); ## Instruction: Comment out leaflet test for now since it depends upon manually installing leaflet to a given directory path. ## Code After: /* Disable Leaflet for now describe('LeafletMap Ext Component', function() { describe('Basics', function() { var Map = vrs.ux.touch.LeafletMap; it('provides new mapping events', function() { var map = new Map(); expect(map.events.repPicked).toBeDefined(); }); it('provides new mapping events', function() { var map = new Map(); expect(map.events.repPicked).toBeDefined(); }); }); }); */
- + /* Disable Leaflet for now describe('LeafletMap Ext Component', function() { describe('Basics', function() { var Map = vrs.ux.touch.LeafletMap; it('provides new mapping events', function() { var map = new Map(); expect(map.events.repPicked).toBeDefined(); }); it('provides new mapping events', function() { var map = new Map(); expect(map.events.repPicked).toBeDefined(); }); }); }); + */
3
0.157895
2
1
dcb2bfdf85dafaeb9afe9e3fc44d87e50967d85c
app/views/layouts/resume.pdf.erb
app/views/layouts/resume.pdf.erb
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css"> <%= wicked_pdf_stylesheet_link_tag "pdf" %> <!-- have to load from remote CDN for icons to load under wkhtmltopdf --> <%= stylesheet_link_tag "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css", media: "all" %> <%= wicked_pdf_javascript_include_tag "application" %> </head> <body> <div class="container"> <%= yield %> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" type="text/css"> <%= wicked_pdf_stylesheet_link_tag "pdf" %> <!-- have to load from remote CDN for icons to load under wkhtmltopdf --> <%= stylesheet_link_tag "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css", media: "all" %> <%= wicked_pdf_javascript_include_tag "application" %> </head> <body> <div class="container"> <%= yield %> </div> </body> </html>
Include Lora font in PDF layout
Include Lora font in PDF layout Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com>
HTML+ERB
apache-2.0
maxfierke/resumis,maxfierke/resumis,maxfierke/resumis,maxfierke/resumis
html+erb
## Code Before: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css"> <%= wicked_pdf_stylesheet_link_tag "pdf" %> <!-- have to load from remote CDN for icons to load under wkhtmltopdf --> <%= stylesheet_link_tag "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css", media: "all" %> <%= wicked_pdf_javascript_include_tag "application" %> </head> <body> <div class="container"> <%= yield %> </div> </body> </html> ## Instruction: Include Lora font in PDF layout Signed-off-by: Max Fierke <0706025b2bbcec1ed8d64822f4eccd96314938d0@maxfierke.com> ## Code After: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" type="text/css"> <%= wicked_pdf_stylesheet_link_tag "pdf" %> <!-- have to load from remote CDN for icons to load under wkhtmltopdf --> <%= stylesheet_link_tag "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css", media: "all" %> <%= wicked_pdf_javascript_include_tag "application" %> </head> <body> <div class="container"> <%= yield %> </div> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,700" rel="stylesheet" type="text/css"> + <link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" type="text/css"> <%= wicked_pdf_stylesheet_link_tag "pdf" %> <!-- have to load from remote CDN for icons to load under wkhtmltopdf --> <%= stylesheet_link_tag "https://netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css", media: "all" %> <%= wicked_pdf_javascript_include_tag "application" %> </head> <body> <div class="container"> <%= yield %> </div> </body> </html>
1
0.058824
1
0
1d578854ab58d30795ce8a10e390d642484960e2
spec/requests/messages/library_item_messages_spec.rb
spec/requests/messages/library_item_messages_spec.rb
require "spec_helper" describe "Library item messages" do let(:thread) { FactoryGirl.create(:message_thread) } let(:document) { FactoryGirl.create(:library_document) } let(:note) { FactoryGirl.create(:library_note) } let(:documents) { FactoryGirl.create_list(:library_document, 3) } let!(:notes) { FactoryGirl.create_list(:library_note, 3) } def library_item_form within("#new-library-item-message") { yield } end context "new", as: :site_user do before do visit thread_path(thread) end it "should post a library item message" do library_item_form do select notes.first.title, from: "Item" fill_in "Message", with: "This note seems relevant." click_on "Add Library Item" end page.should have_link(notes.first.title) page.should have_content("This note seems relevant") end end context "document" do it "should have a link to the document" end context "note" do it "should have a link to the note" it "should show the content of the note" context "with document" do include_context "signed in as a site user" let!(:note) { FactoryGirl.create(:library_note_with_document) } before do visit thread_path(thread) library_item_form do select note.title, from: "Item" fill_in "Message", with: "This note has a document attached." click_on "Add Library Item" end end it "should show a referenced document" do page.should have_content("Attached to document") page.should have_link(note.document.title) end end end end
require "spec_helper" describe "Library item messages" do let(:thread) { FactoryGirl.create(:message_thread) } let(:document) { FactoryGirl.create(:library_document) } let(:note) { FactoryGirl.create(:library_note) } let(:documents) { FactoryGirl.create_list(:library_document, 3) } let!(:notes) { FactoryGirl.create_list(:library_note, 3) } context "new", as: :site_user do before do visit thread_path(thread) end it "should post a library item message" end context "document" do it "should have a link to the document" end context "note" do it "should have a link to the note" it "should show the content of the note" context "with document" do include_context "signed in as a site user" let!(:note) { FactoryGirl.create(:library_note_with_document) } before do visit thread_path(thread) end it "should show a referenced document" end end end
Remove library item message tests for design changes.
Remove library item message tests for design changes.
Ruby
mit
cyclestreets/cyclescape,auto-mat/toolkit,auto-mat/toolkit,cyclestreets/cyclescape,cyclestreets/cyclescape
ruby
## Code Before: require "spec_helper" describe "Library item messages" do let(:thread) { FactoryGirl.create(:message_thread) } let(:document) { FactoryGirl.create(:library_document) } let(:note) { FactoryGirl.create(:library_note) } let(:documents) { FactoryGirl.create_list(:library_document, 3) } let!(:notes) { FactoryGirl.create_list(:library_note, 3) } def library_item_form within("#new-library-item-message") { yield } end context "new", as: :site_user do before do visit thread_path(thread) end it "should post a library item message" do library_item_form do select notes.first.title, from: "Item" fill_in "Message", with: "This note seems relevant." click_on "Add Library Item" end page.should have_link(notes.first.title) page.should have_content("This note seems relevant") end end context "document" do it "should have a link to the document" end context "note" do it "should have a link to the note" it "should show the content of the note" context "with document" do include_context "signed in as a site user" let!(:note) { FactoryGirl.create(:library_note_with_document) } before do visit thread_path(thread) library_item_form do select note.title, from: "Item" fill_in "Message", with: "This note has a document attached." click_on "Add Library Item" end end it "should show a referenced document" do page.should have_content("Attached to document") page.should have_link(note.document.title) end end end end ## Instruction: Remove library item message tests for design changes. ## Code After: require "spec_helper" describe "Library item messages" do let(:thread) { FactoryGirl.create(:message_thread) } let(:document) { FactoryGirl.create(:library_document) } let(:note) { FactoryGirl.create(:library_note) } let(:documents) { FactoryGirl.create_list(:library_document, 3) } let!(:notes) { FactoryGirl.create_list(:library_note, 3) } context "new", as: :site_user do before do visit thread_path(thread) end it "should post a library item message" end context "document" do it "should have a link to the document" end context "note" do it "should have a link to the note" it "should show the content of the note" context "with document" do include_context "signed in as a site user" let!(:note) { FactoryGirl.create(:library_note_with_document) } before do visit thread_path(thread) end it "should show a referenced document" end end end
require "spec_helper" describe "Library item messages" do let(:thread) { FactoryGirl.create(:message_thread) } let(:document) { FactoryGirl.create(:library_document) } let(:note) { FactoryGirl.create(:library_note) } let(:documents) { FactoryGirl.create_list(:library_document, 3) } let!(:notes) { FactoryGirl.create_list(:library_note, 3) } - def library_item_form - within("#new-library-item-message") { yield } - end - context "new", as: :site_user do before do visit thread_path(thread) end - it "should post a library item message" do ? --- + it "should post a library item message" - library_item_form do - select notes.first.title, from: "Item" - fill_in "Message", with: "This note seems relevant." - click_on "Add Library Item" - end - page.should have_link(notes.first.title) - page.should have_content("This note seems relevant") - end end context "document" do it "should have a link to the document" end context "note" do it "should have a link to the note" it "should show the content of the note" context "with document" do include_context "signed in as a site user" let!(:note) { FactoryGirl.create(:library_note_with_document) } before do visit thread_path(thread) - library_item_form do - select note.title, from: "Item" - fill_in "Message", with: "This note has a document attached." - click_on "Add Library Item" - end end - it "should show a referenced document" do ? --- + it "should show a referenced document" - page.should have_content("Attached to document") - page.should have_link(note.document.title) - end end end end
24
0.421053
2
22
1d33fea772ce3e1f92cf8d4f2e42bb8628a8ed35
manifest.json
manifest.json
{ "name": "SO Dark Chat +", "description": "Provides a new dark theme for stackoverflow chat.", "version": "0.1.5", "manifest_version": 2, "content_scripts": [ { "matches": [ "*://chat.stackoverflow.com/*", "*://chat.stackexchange.com/*", "*://chat.meta.stackexchange.com/*" ], "js": [ "dist/main.js" ], "css": [ "css/style.css", "CodeMirror/css/codemirror.css", "CodeMirror/css/monokai.css" ] } ], "background": { "scripts": [ "background.js" ] }, "icons": { "128": "img/icon_128.png" }, "web_accessible_resources": [ "js/*.js", "css/*.css", "images/*.svg", "CodeMirror/*", "CodeMirror/*/*" ] }
{ "name": "SO Dark Chat +", "description": "Provides a new dark theme for stackoverflow chat.", "version": "0.1.5", "manifest_version": 2, "content_scripts": [ { "matches": [ "*://chat.stackoverflow.com/*", "*://chat.stackexchange.com/*", "*://chat.meta.stackexchange.com/*" ], "js": [ "dist/main.js" ], "css": [ "dist/main.css" ] } ], "background": { "scripts": [ "background.js" ] }, "icons": { "128": "img/icon_128.png" }, "permissions": [ "storage" ], "web_accessible_resources": [ "js/*.js", "css/*.css", "images/*.svg", "CodeMirror/*", "CodeMirror/*/*" ] }
Use new dist/main.css file and add back in storage permissions
Use new dist/main.css file and add back in storage permissions
JSON
isc
MadaraUchiha/se-chat-dark-theme-plus
json
## Code Before: { "name": "SO Dark Chat +", "description": "Provides a new dark theme for stackoverflow chat.", "version": "0.1.5", "manifest_version": 2, "content_scripts": [ { "matches": [ "*://chat.stackoverflow.com/*", "*://chat.stackexchange.com/*", "*://chat.meta.stackexchange.com/*" ], "js": [ "dist/main.js" ], "css": [ "css/style.css", "CodeMirror/css/codemirror.css", "CodeMirror/css/monokai.css" ] } ], "background": { "scripts": [ "background.js" ] }, "icons": { "128": "img/icon_128.png" }, "web_accessible_resources": [ "js/*.js", "css/*.css", "images/*.svg", "CodeMirror/*", "CodeMirror/*/*" ] } ## Instruction: Use new dist/main.css file and add back in storage permissions ## Code After: { "name": "SO Dark Chat +", "description": "Provides a new dark theme for stackoverflow chat.", "version": "0.1.5", "manifest_version": 2, "content_scripts": [ { "matches": [ "*://chat.stackoverflow.com/*", "*://chat.stackexchange.com/*", "*://chat.meta.stackexchange.com/*" ], "js": [ "dist/main.js" ], "css": [ "dist/main.css" ] } ], "background": { "scripts": [ "background.js" ] }, "icons": { "128": "img/icon_128.png" }, "permissions": [ "storage" ], "web_accessible_resources": [ "js/*.js", "css/*.css", "images/*.svg", "CodeMirror/*", "CodeMirror/*/*" ] }
{ "name": "SO Dark Chat +", "description": "Provides a new dark theme for stackoverflow chat.", "version": "0.1.5", "manifest_version": 2, "content_scripts": [ { "matches": [ "*://chat.stackoverflow.com/*", "*://chat.stackexchange.com/*", "*://chat.meta.stackexchange.com/*" ], "js": [ "dist/main.js" ], "css": [ + "dist/main.css" - "css/style.css", - "CodeMirror/css/codemirror.css", - "CodeMirror/css/monokai.css" ] } ], "background": { "scripts": [ "background.js" ] }, "icons": { "128": "img/icon_128.png" }, + "permissions": [ + "storage" + ], "web_accessible_resources": [ "js/*.js", "css/*.css", "images/*.svg", "CodeMirror/*", "CodeMirror/*/*" ] }
7
0.184211
4
3
e01590bbda6cbdf245d1c8b54938a40f6aa2363c
app/package.json
app/package.json
{ "name": "lovely-forks", "id": "github-forks-addon@musicallyut.in", "title": "Lovely forks", "description": "Show notable forks of Github projects.", "author": "Utkarsh Upadhyay", "license": "MPL 2.0", "version": "2.6.0", "icon": "data/images/Heart_and_fork_inside_128.png", "main": "lib/main.js", "engines": { "fennec": ">=20.0", "firefox": ">=20.0", "seamonkey": ">=2.40 <=2.46" } }
{ "name": "lovely-forks", "id": "github-forks-addon@musicallyut.in", "title": "Lovely forks", "description": "Show notable forks of Github projects.", "author": "Utkarsh Upadhyay", "license": "MPL 2.0", "version": "2.6.0", "icon": "data/images/Heart_and_fork_inside_128.png", "main": "lib/main.js", "permissions": { "multiprocess": true }, "engines": { "fennec": ">=20.0", "firefox": ">=20.0", "seamonkey": ">=2.40 <=2.46" } }
Add multiprocess permission to Firefox extension.
Add multiprocess permission to Firefox extension.
JSON
mpl-2.0
musically-ut/lovely-forks,musically-ut/github-forks-addon,musically-ut/lovely-forks
json
## Code Before: { "name": "lovely-forks", "id": "github-forks-addon@musicallyut.in", "title": "Lovely forks", "description": "Show notable forks of Github projects.", "author": "Utkarsh Upadhyay", "license": "MPL 2.0", "version": "2.6.0", "icon": "data/images/Heart_and_fork_inside_128.png", "main": "lib/main.js", "engines": { "fennec": ">=20.0", "firefox": ">=20.0", "seamonkey": ">=2.40 <=2.46" } } ## Instruction: Add multiprocess permission to Firefox extension. ## Code After: { "name": "lovely-forks", "id": "github-forks-addon@musicallyut.in", "title": "Lovely forks", "description": "Show notable forks of Github projects.", "author": "Utkarsh Upadhyay", "license": "MPL 2.0", "version": "2.6.0", "icon": "data/images/Heart_and_fork_inside_128.png", "main": "lib/main.js", "permissions": { "multiprocess": true }, "engines": { "fennec": ">=20.0", "firefox": ">=20.0", "seamonkey": ">=2.40 <=2.46" } }
{ "name": "lovely-forks", "id": "github-forks-addon@musicallyut.in", "title": "Lovely forks", "description": "Show notable forks of Github projects.", "author": "Utkarsh Upadhyay", "license": "MPL 2.0", "version": "2.6.0", "icon": "data/images/Heart_and_fork_inside_128.png", "main": "lib/main.js", + "permissions": { + "multiprocess": true + }, "engines": { "fennec": ">=20.0", "firefox": ">=20.0", "seamonkey": ">=2.40 <=2.46" } }
3
0.1875
3
0
03b6ec4b605095ec02358553485050a11fdb7bc2
spec/adminable/attributes/base_spec.rb
spec/adminable/attributes/base_spec.rb
describe Adminable::Attributes::Base do describe '#initialize' do it 'raise error' do expect { Adminable::Attributes::Base.new('user') }.to raise_error end end end
describe Adminable::Attributes::Base do describe '#initialize' do it 'raises an error' do expect { Adminable::Attributes::Base.new('title') }.to raise_error end end let(:title) { Adminable::Attributes::Types::String.new('title') } describe Adminable::Attributes::Types::String do describe '#ransack_name' do it 'returns correct string for ransack' do expect(title.ransack_name).to eq('title_cont') end end describe '#type' do it 'returns correct attribute type' do expect(title.type).to eq(:string) end end describe '#index_partial_path' do it 'returns correct path for index partial' do expect(title.index_partial_path).to eq('index/string') end end describe '#form_partial_path' do it 'returns correct path for form partial' do expect(title.form_partial_path).to eq('adminable/resources/form/string') end end end end
Add specs for attributes classes
Add specs for attributes classes
Ruby
mit
droptheplot/adminable,droptheplot/adminable,droptheplot/adminable
ruby
## Code Before: describe Adminable::Attributes::Base do describe '#initialize' do it 'raise error' do expect { Adminable::Attributes::Base.new('user') }.to raise_error end end end ## Instruction: Add specs for attributes classes ## Code After: describe Adminable::Attributes::Base do describe '#initialize' do it 'raises an error' do expect { Adminable::Attributes::Base.new('title') }.to raise_error end end let(:title) { Adminable::Attributes::Types::String.new('title') } describe Adminable::Attributes::Types::String do describe '#ransack_name' do it 'returns correct string for ransack' do expect(title.ransack_name).to eq('title_cont') end end describe '#type' do it 'returns correct attribute type' do expect(title.type).to eq(:string) end end describe '#index_partial_path' do it 'returns correct path for index partial' do expect(title.index_partial_path).to eq('index/string') end end describe '#form_partial_path' do it 'returns correct path for form partial' do expect(title.form_partial_path).to eq('adminable/resources/form/string') end end end end
describe Adminable::Attributes::Base do describe '#initialize' do - it 'raise error' do + it 'raises an error' do ? ++++ - expect { Adminable::Attributes::Base.new('user') }.to raise_error ? ^^ - + expect { Adminable::Attributes::Base.new('title') }.to raise_error ? ^^^^ + end + end + + let(:title) { Adminable::Attributes::Types::String.new('title') } + + describe Adminable::Attributes::Types::String do + describe '#ransack_name' do + it 'returns correct string for ransack' do + expect(title.ransack_name).to eq('title_cont') + end + end + + describe '#type' do + it 'returns correct attribute type' do + expect(title.type).to eq(:string) + end + end + + describe '#index_partial_path' do + it 'returns correct path for index partial' do + expect(title.index_partial_path).to eq('index/string') + end + end + + describe '#form_partial_path' do + it 'returns correct path for form partial' do + expect(title.form_partial_path).to eq('adminable/resources/form/string') + end end end end
32
4.571429
30
2
55ed96e015999ae5f4f23b3372d6a487b2f4c4cc
README.md
README.md
According to the HTML specification, "An HTML user agent should treat end of line in any of its variations as a word space in all contexts except preformatted text". This is okay in English, but we don't use spaces to separate words in Chinese. That unnecessary space make the sentence looks weird. This javascript file is aim to solve this problem. # Usage Just include the `cjk_space_fix.js` and invoke `cjkSpaceFix()`. <script type="text/javascript" src="path/to/cjk_space_fix.js"></script> <script type="text/javascript"> window.onload = function () { cjkSpaceFix(); } </script>
According to the HTML specification, "An HTML user agent should treat end of line in any of its variations as a word space in all contexts except preformatted text". This is okay in English, but we don't use spaces to separate words in Chinese. That unnecessary space make the sentence looks weird. This javascript file is aim to solve this problem. 根據 HTML 規格書: "所有的換行字元都應該被視為空白, 只有 preformatted text 是例外"。 這在英文中是沒有問題的,但是在中文,我們並不使用空白來分隔字詞。 這些多餘的空白會使得句子看起來很奇怪,而這支 javascript 程式就是用來解決此問題。 # Example HTML source: <p> 這是一句很長的話 中間有換行。 </p> What the browser show: 這是一句很長的話 中間有換行。 What we actually want: 這是一句很長的話中間有換行。 # Usage Just include the `cjk_space_fix.js` and invoke `cjkSpaceFix()`. <script type="text/javascript" src="path/to/cjk_space_fix.js"></script> <script type="text/javascript"> window.onload = function () { cjkSpaceFix(); }; </script>
Add Chinese description and example
Add Chinese description and example
Markdown
mit
sayuan/CJK-space-fix
markdown
## Code Before: According to the HTML specification, "An HTML user agent should treat end of line in any of its variations as a word space in all contexts except preformatted text". This is okay in English, but we don't use spaces to separate words in Chinese. That unnecessary space make the sentence looks weird. This javascript file is aim to solve this problem. # Usage Just include the `cjk_space_fix.js` and invoke `cjkSpaceFix()`. <script type="text/javascript" src="path/to/cjk_space_fix.js"></script> <script type="text/javascript"> window.onload = function () { cjkSpaceFix(); } </script> ## Instruction: Add Chinese description and example ## Code After: According to the HTML specification, "An HTML user agent should treat end of line in any of its variations as a word space in all contexts except preformatted text". This is okay in English, but we don't use spaces to separate words in Chinese. That unnecessary space make the sentence looks weird. This javascript file is aim to solve this problem. 根據 HTML 規格書: "所有的換行字元都應該被視為空白, 只有 preformatted text 是例外"。 這在英文中是沒有問題的,但是在中文,我們並不使用空白來分隔字詞。 這些多餘的空白會使得句子看起來很奇怪,而這支 javascript 程式就是用來解決此問題。 # Example HTML source: <p> 這是一句很長的話 中間有換行。 </p> What the browser show: 這是一句很長的話 中間有換行。 What we actually want: 這是一句很長的話中間有換行。 # Usage Just include the `cjk_space_fix.js` and invoke `cjkSpaceFix()`. <script type="text/javascript" src="path/to/cjk_space_fix.js"></script> <script type="text/javascript"> window.onload = function () { cjkSpaceFix(); }; </script>
+ According to the HTML specification, "An HTML user agent should treat end of line in any of its variations as a word space in all contexts except preformatted text". This is okay in English, but we don't use spaces to separate words in Chinese. That unnecessary space make the sentence looks weird. This javascript file is aim to solve this problem. + 根據 HTML 規格書: "所有的換行字元都應該被視為空白, + 只有 preformatted text 是例外"。 + + 這在英文中是沒有問題的,但是在中文,我們並不使用空白來分隔字詞。 + 這些多餘的空白會使得句子看起來很奇怪,而這支 javascript 程式就是用來解決此問題。 + + # Example + + HTML source: + + <p> + 這是一句很長的話 + 中間有換行。 + </p> + + What the browser show: + + 這是一句很長的話 中間有換行。 + + What we actually want: + + 這是一句很長的話中間有換行。 + # Usage Just include the `cjk_space_fix.js` and invoke `cjkSpaceFix()`. <script type="text/javascript" src="path/to/cjk_space_fix.js"></script> <script type="text/javascript"> window.onload = function () { cjkSpaceFix(); - } + }; ? + </script>
26
1.444444
25
1
6ee261309f4492994b52403d485bdfd08739a072
kolibri/utils/tests/test_handler.py
kolibri/utils/tests/test_handler.py
import os from time import sleep from django.conf import settings from django.test import TestCase from kolibri.utils import cli class KolibriTimedRotatingFileHandlerTestCase(TestCase): def test_do_rollover(self): archive_dir = os.path.join(os.environ["KOLIBRI_HOME"], "logs", "archive") orig_value = settings.LOGGING["handlers"]["file"]["when"] # Temporarily set the rotation time of the log file to be every second settings.LOGGING["handlers"]["file"]["when"] = "s" # make sure that kolibri will be running for more than one second try: cli.main(["--skipupdate", "manage", "help"]) except SystemExit: pass sleep(1) try: cli.main(["--skipupdate", "manage", "help"]) except SystemExit: pass # change back to the original rotation time settings.LOGGING["handlers"]["file"]["when"] = orig_value self.assertNotEqual(os.listdir(archive_dir), [])
import os from time import sleep from django.conf import settings from django.test import TestCase from kolibri.utils import cli class KolibriTimedRotatingFileHandlerTestCase(TestCase): def test_do_rollover(self): archive_dir = os.path.join(os.environ["KOLIBRI_HOME"], "logs", "archive") orig_value = settings.LOGGING["handlers"]["file"]["when"] # Temporarily set the rotation time of the log file to be every second settings.LOGGING["handlers"]["file"]["when"] = "s" # make sure that kolibri will be running for more than one second try: cli.main(["manage", "--skipupdate", "help"]) except SystemExit: pass sleep(1) try: cli.main(["manage", "--skipupdate", "help"]) except SystemExit: pass # change back to the original rotation time settings.LOGGING["handlers"]["file"]["when"] = orig_value self.assertNotEqual(os.listdir(archive_dir), [])
Fix argument ordering in log handler test.
Fix argument ordering in log handler test.
Python
mit
indirectlylit/kolibri,indirectlylit/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,learningequality/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri
python
## Code Before: import os from time import sleep from django.conf import settings from django.test import TestCase from kolibri.utils import cli class KolibriTimedRotatingFileHandlerTestCase(TestCase): def test_do_rollover(self): archive_dir = os.path.join(os.environ["KOLIBRI_HOME"], "logs", "archive") orig_value = settings.LOGGING["handlers"]["file"]["when"] # Temporarily set the rotation time of the log file to be every second settings.LOGGING["handlers"]["file"]["when"] = "s" # make sure that kolibri will be running for more than one second try: cli.main(["--skipupdate", "manage", "help"]) except SystemExit: pass sleep(1) try: cli.main(["--skipupdate", "manage", "help"]) except SystemExit: pass # change back to the original rotation time settings.LOGGING["handlers"]["file"]["when"] = orig_value self.assertNotEqual(os.listdir(archive_dir), []) ## Instruction: Fix argument ordering in log handler test. ## Code After: import os from time import sleep from django.conf import settings from django.test import TestCase from kolibri.utils import cli class KolibriTimedRotatingFileHandlerTestCase(TestCase): def test_do_rollover(self): archive_dir = os.path.join(os.environ["KOLIBRI_HOME"], "logs", "archive") orig_value = settings.LOGGING["handlers"]["file"]["when"] # Temporarily set the rotation time of the log file to be every second settings.LOGGING["handlers"]["file"]["when"] = "s" # make sure that kolibri will be running for more than one second try: cli.main(["manage", "--skipupdate", "help"]) except SystemExit: pass sleep(1) try: cli.main(["manage", "--skipupdate", "help"]) except SystemExit: pass # change back to the original rotation time settings.LOGGING["handlers"]["file"]["when"] = orig_value self.assertNotEqual(os.listdir(archive_dir), [])
import os from time import sleep from django.conf import settings from django.test import TestCase from kolibri.utils import cli class KolibriTimedRotatingFileHandlerTestCase(TestCase): def test_do_rollover(self): archive_dir = os.path.join(os.environ["KOLIBRI_HOME"], "logs", "archive") orig_value = settings.LOGGING["handlers"]["file"]["when"] # Temporarily set the rotation time of the log file to be every second settings.LOGGING["handlers"]["file"]["when"] = "s" # make sure that kolibri will be running for more than one second try: - cli.main(["--skipupdate", "manage", "help"]) ? ---------- + cli.main(["manage", "--skipupdate", "help"]) ? ++++++++++ except SystemExit: pass sleep(1) try: - cli.main(["--skipupdate", "manage", "help"]) ? ---------- + cli.main(["manage", "--skipupdate", "help"]) ? ++++++++++ except SystemExit: pass # change back to the original rotation time settings.LOGGING["handlers"]["file"]["when"] = orig_value self.assertNotEqual(os.listdir(archive_dir), [])
4
0.133333
2
2
da8b931738de689af9a92621f0a6bad18d24d010
pkgs/applications/editors/emacs-modes/writegood/default.nix
pkgs/applications/editors/emacs-modes/writegood/default.nix
{stdenv, fetchurl, emacs}: let version = "1.3"; in stdenv.mkDerivation { name = "writegood-mode-${version}"; src = fetchurl { url = "https://github.com/bnbeckwith/writegood-mode/archive/v${version}.tar.gz"; sha256 = "0p34rgawnqg94vk4lcw14x99rrvsd23dmbwkxz2vax5kq6l8y5yf"; }; buildInputs = [ emacs ]; buildPhase = '' emacs -L . --batch -f batch-byte-compile *.el ''; installPhase = '' install -d $out/share/emacs/site-lisp install *.el *.elc $out/share/emacs/site-lisp ''; meta = { description = "Emacs minor mode that aids in finding common writing problems"; homepage = https://github.com/bnbeckwith/writegood-mode; platforms = stdenv.lib.platforms.all; maintainers = [ stdenv.lib.maintainers.pSub ]; license = "GPL3"; }; }
{stdenv, fetchurl, emacs}: let version = "2.0"; in stdenv.mkDerivation { name = "writegood-mode-${version}"; src = fetchurl { url = "https://github.com/bnbeckwith/writegood-mode/archive/v${version}.tar.gz"; sha256 = "0wf7bj9d00ggy3xigym885a3njfr98i3aqrrawf8x6lgbfc56dgp"; }; buildInputs = [ emacs ]; buildPhase = '' emacs -L . --batch -f batch-byte-compile *.el ''; installPhase = '' install -d $out/share/emacs/site-lisp install *.el *.elc $out/share/emacs/site-lisp ''; meta = { description = "Emacs minor mode that aids in finding common writing problems"; homepage = https://github.com/bnbeckwith/writegood-mode; platforms = stdenv.lib.platforms.all; maintainers = [ stdenv.lib.maintainers.pSub ]; license = "GPL3"; }; }
Update writegood-mode from 1.3 to 2.0
Update writegood-mode from 1.3 to 2.0
Nix
mit
SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,triton/triton,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,triton/triton,NixOS/nixpkgs
nix
## Code Before: {stdenv, fetchurl, emacs}: let version = "1.3"; in stdenv.mkDerivation { name = "writegood-mode-${version}"; src = fetchurl { url = "https://github.com/bnbeckwith/writegood-mode/archive/v${version}.tar.gz"; sha256 = "0p34rgawnqg94vk4lcw14x99rrvsd23dmbwkxz2vax5kq6l8y5yf"; }; buildInputs = [ emacs ]; buildPhase = '' emacs -L . --batch -f batch-byte-compile *.el ''; installPhase = '' install -d $out/share/emacs/site-lisp install *.el *.elc $out/share/emacs/site-lisp ''; meta = { description = "Emacs minor mode that aids in finding common writing problems"; homepage = https://github.com/bnbeckwith/writegood-mode; platforms = stdenv.lib.platforms.all; maintainers = [ stdenv.lib.maintainers.pSub ]; license = "GPL3"; }; } ## Instruction: Update writegood-mode from 1.3 to 2.0 ## Code After: {stdenv, fetchurl, emacs}: let version = "2.0"; in stdenv.mkDerivation { name = "writegood-mode-${version}"; src = fetchurl { url = "https://github.com/bnbeckwith/writegood-mode/archive/v${version}.tar.gz"; sha256 = "0wf7bj9d00ggy3xigym885a3njfr98i3aqrrawf8x6lgbfc56dgp"; }; buildInputs = [ emacs ]; buildPhase = '' emacs -L . --batch -f batch-byte-compile *.el ''; installPhase = '' install -d $out/share/emacs/site-lisp install *.el *.elc $out/share/emacs/site-lisp ''; meta = { description = "Emacs minor mode that aids in finding common writing problems"; homepage = https://github.com/bnbeckwith/writegood-mode; platforms = stdenv.lib.platforms.all; maintainers = [ stdenv.lib.maintainers.pSub ]; license = "GPL3"; }; }
{stdenv, fetchurl, emacs}: - let version = "1.3"; ? ^ ^ + let version = "2.0"; ? ^ ^ in stdenv.mkDerivation { name = "writegood-mode-${version}"; src = fetchurl { url = "https://github.com/bnbeckwith/writegood-mode/archive/v${version}.tar.gz"; - sha256 = "0p34rgawnqg94vk4lcw14x99rrvsd23dmbwkxz2vax5kq6l8y5yf"; + sha256 = "0wf7bj9d00ggy3xigym885a3njfr98i3aqrrawf8x6lgbfc56dgp"; }; buildInputs = [ emacs ]; buildPhase = '' emacs -L . --batch -f batch-byte-compile *.el ''; installPhase = '' install -d $out/share/emacs/site-lisp install *.el *.elc $out/share/emacs/site-lisp ''; meta = { description = "Emacs minor mode that aids in finding common writing problems"; homepage = https://github.com/bnbeckwith/writegood-mode; platforms = stdenv.lib.platforms.all; maintainers = [ stdenv.lib.maintainers.pSub ]; license = "GPL3"; }; }
4
0.133333
2
2
62d468622ca2274771382aae21e684b694db9df3
src/libmaliit-plugins.pri
src/libmaliit-plugins.pri
INCLUDEPATH += $$TOP_DIR/src LIBS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_PLUGINS_LIB}) POST_TARGETDEPS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_PLUGINS_LIB})
INCLUDEPATH += $$TOP_DIR/src $$OUT_PWD/$$TOP_DIR/src LIBS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_PLUGINS_LIB}) POST_TARGETDEPS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_PLUGINS_LIB})
Fix out-of-tree build of ut_mimonscreenplugins.
Fix out-of-tree build of ut_mimonscreenplugins. RevBy: TrustMe Added build tree /src directory to include paths, because ut_mimonscreenplugins includes config.h which is generated and put into build tree, not source tree.
QMake
lgpl-2.1
binlaten/framework,jpetersen/framework,RHawkeyed/framework,jpetersen/framework,Elleo/framework,RHawkeyed/framework,Elleo/framework
qmake
## Code Before: INCLUDEPATH += $$TOP_DIR/src LIBS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_PLUGINS_LIB}) POST_TARGETDEPS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_PLUGINS_LIB}) ## Instruction: Fix out-of-tree build of ut_mimonscreenplugins. RevBy: TrustMe Added build tree /src directory to include paths, because ut_mimonscreenplugins includes config.h which is generated and put into build tree, not source tree. ## Code After: INCLUDEPATH += $$TOP_DIR/src $$OUT_PWD/$$TOP_DIR/src LIBS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_PLUGINS_LIB}) POST_TARGETDEPS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_PLUGINS_LIB})
- INCLUDEPATH += $$TOP_DIR/src + INCLUDEPATH += $$TOP_DIR/src $$OUT_PWD/$$TOP_DIR/src LIBS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_PLUGINS_LIB}) POST_TARGETDEPS += $$TOP_DIR/lib/$$maliitDynamicLib($${MALIIT_PLUGINS_LIB})
2
0.5
1
1
ead2ddad26b912f4f011922b392b359a8d0cadda
src/plugins/local/components/TableBodyContainer.js
src/plugins/local/components/TableBodyContainer.js
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { getContext, mapProps, compose } from 'recompose'; import { visibleRowIdsSelector, classNamesForComponentSelector, stylesForComponentSelector } from '../selectors/localSelectors'; const ComposedTableBodyContainer = OriginalComponent => compose( getContext({ components: PropTypes.object, selectors: PropTypes.object, }), connect(state => ({ visibleRowIds: visibleRowIdsSelector(state), className: classNamesForComponentSelector(state, 'TableBody'), style: stylesForComponentSelector(state, 'TableBody'), })), mapProps(props => ({ Row: props.components.Row, ...props })), // withHandlers({ // Row: props => props.components.Row // }) )(({ Row, visibleRowIds, style, className }) => ( <OriginalComponent rowIds={visibleRowIds} Row={Row} style={style} className={className} /> )); export default ComposedTableBodyContainer;
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { getContext, mapProps, compose } from 'recompose'; import { visibleRowIdsSelector, classNamesForComponentSelector, stylesForComponentSelector } from '../selectors/localSelectors'; const ComposedTableBodyContainer = OriginalComponent => compose( getContext({ components: PropTypes.object, selectors: PropTypes.object, }), mapProps(props => ({ Row: props.components.Row, visibleRowIdsSelector: props.selectors.visibleRowIdsSelector, ...props })), connect((state, props) => ({ visibleRowIds: props.visibleRowIdsSelector(state), className: classNamesForComponentSelector(state, 'TableBody'), style: stylesForComponentSelector(state, 'TableBody'), })), // withHandlers({ // Row: props => props.components.Row // }) )(({ Row, visibleRowIds, style, className }) => ( <OriginalComponent rowIds={visibleRowIds} Row={Row} style={style} className={className} /> )); export default ComposedTableBodyContainer;
Fix virtual scrolling for table with local data.
Fix virtual scrolling for table with local data.
JavaScript
mit
ttrentham/Griddle,GriddleGriddle/Griddle,joellanciaux/Griddle,GriddleGriddle/Griddle,joellanciaux/Griddle
javascript
## Code Before: import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { getContext, mapProps, compose } from 'recompose'; import { visibleRowIdsSelector, classNamesForComponentSelector, stylesForComponentSelector } from '../selectors/localSelectors'; const ComposedTableBodyContainer = OriginalComponent => compose( getContext({ components: PropTypes.object, selectors: PropTypes.object, }), connect(state => ({ visibleRowIds: visibleRowIdsSelector(state), className: classNamesForComponentSelector(state, 'TableBody'), style: stylesForComponentSelector(state, 'TableBody'), })), mapProps(props => ({ Row: props.components.Row, ...props })), // withHandlers({ // Row: props => props.components.Row // }) )(({ Row, visibleRowIds, style, className }) => ( <OriginalComponent rowIds={visibleRowIds} Row={Row} style={style} className={className} /> )); export default ComposedTableBodyContainer; ## Instruction: Fix virtual scrolling for table with local data. ## Code After: import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { getContext, mapProps, compose } from 'recompose'; import { visibleRowIdsSelector, classNamesForComponentSelector, stylesForComponentSelector } from '../selectors/localSelectors'; const ComposedTableBodyContainer = OriginalComponent => compose( getContext({ components: PropTypes.object, selectors: PropTypes.object, }), mapProps(props => ({ Row: props.components.Row, visibleRowIdsSelector: props.selectors.visibleRowIdsSelector, ...props })), connect((state, props) => ({ visibleRowIds: props.visibleRowIdsSelector(state), className: classNamesForComponentSelector(state, 'TableBody'), style: stylesForComponentSelector(state, 'TableBody'), })), // withHandlers({ // Row: props => props.components.Row // }) )(({ Row, visibleRowIds, style, className }) => ( <OriginalComponent rowIds={visibleRowIds} Row={Row} style={style} className={className} /> )); export default ComposedTableBodyContainer;
import React, { PropTypes } from 'react'; import { connect } from 'react-redux'; import { getContext, mapProps, compose } from 'recompose'; import { visibleRowIdsSelector, classNamesForComponentSelector, stylesForComponentSelector } from '../selectors/localSelectors'; const ComposedTableBodyContainer = OriginalComponent => compose( getContext({ components: PropTypes.object, selectors: PropTypes.object, }), + mapProps(props => ({ + Row: props.components.Row, + visibleRowIdsSelector: props.selectors.visibleRowIdsSelector, + ...props + })), - connect(state => ({ + connect((state, props) => ({ ? + ++++++++ - visibleRowIds: visibleRowIdsSelector(state), + visibleRowIds: props.visibleRowIdsSelector(state), ? ++++++ className: classNamesForComponentSelector(state, 'TableBody'), style: stylesForComponentSelector(state, 'TableBody'), - })), - mapProps(props => ({ - Row: props.components.Row, - ...props })), // withHandlers({ // Row: props => props.components.Row // }) )(({ Row, visibleRowIds, style, className }) => ( <OriginalComponent rowIds={visibleRowIds} Row={Row} style={style} className={className} /> )); export default ComposedTableBodyContainer;
13
0.393939
7
6
06bd0fabba0acaa31ad66e9116cc55c746fff09b
setup.cfg
setup.cfg
[metadata] name = atrope summary = Atrope will download images from a image lists and dispatch them. description-file = README.md author = Alvaro Lopez Garcia author-email = aloga@ifca.unican.es home-page = https://github.com/alvarolopez/atrope/ project_urls = Bug Tracker = https://github.com/alvarolopez/atrope license = Apache-2 license_file = LICENSE python-requires = >=3.6 classifier = Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 [files] packages = atrope data_files = etc/atrope = etc/* [entry_points] oslo.config.opts = atrope = atrope.opts:list_opts console_scripts = atrope = atrope.cmd.cli:main
[metadata] name = atrope summary = Atrope will download images from a image lists and dispatch them. description-file = README.md description-content-type = text/markdown; charset=UTF-8 author = Alvaro Lopez Garcia author-email = aloga@ifca.unican.es home-page = https://github.com/alvarolopez/atrope/ project_urls = Bug Tracker = https://github.com/alvarolopez/atrope license = Apache-2 license_file = LICENSE python-requires = >=3.6 classifier = Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 [files] packages = atrope data_files = etc/atrope = etc/* [entry_points] oslo.config.opts = atrope = atrope.opts:list_opts console_scripts = atrope = atrope.cmd.cli:main
Set correct content file for README
Set correct content file for README
INI
apache-2.0
alvarolopez/atrope
ini
## Code Before: [metadata] name = atrope summary = Atrope will download images from a image lists and dispatch them. description-file = README.md author = Alvaro Lopez Garcia author-email = aloga@ifca.unican.es home-page = https://github.com/alvarolopez/atrope/ project_urls = Bug Tracker = https://github.com/alvarolopez/atrope license = Apache-2 license_file = LICENSE python-requires = >=3.6 classifier = Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 [files] packages = atrope data_files = etc/atrope = etc/* [entry_points] oslo.config.opts = atrope = atrope.opts:list_opts console_scripts = atrope = atrope.cmd.cli:main ## Instruction: Set correct content file for README ## Code After: [metadata] name = atrope summary = Atrope will download images from a image lists and dispatch them. description-file = README.md description-content-type = text/markdown; charset=UTF-8 author = Alvaro Lopez Garcia author-email = aloga@ifca.unican.es home-page = https://github.com/alvarolopez/atrope/ project_urls = Bug Tracker = https://github.com/alvarolopez/atrope license = Apache-2 license_file = LICENSE python-requires = >=3.6 classifier = Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 [files] packages = atrope data_files = etc/atrope = etc/* [entry_points] oslo.config.opts = atrope = atrope.opts:list_opts console_scripts = atrope = atrope.cmd.cli:main
[metadata] name = atrope summary = Atrope will download images from a image lists and dispatch them. - description-file = + description-file = README.md ? ++++++++++ - README.md + description-content-type = text/markdown; charset=UTF-8 + author = Alvaro Lopez Garcia author-email = aloga@ifca.unican.es home-page = https://github.com/alvarolopez/atrope/ project_urls = Bug Tracker = https://github.com/alvarolopez/atrope license = Apache-2 license_file = LICENSE python-requires = >=3.6 classifier = Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 3 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 [files] packages = atrope data_files = etc/atrope = etc/* [entry_points] oslo.config.opts = atrope = atrope.opts:list_opts console_scripts = atrope = atrope.cmd.cli:main
5
0.121951
3
2
49c4a507b18125caee6f994d968921252aab926d
requirements.txt
requirements.txt
humanize parsedatetime progressbar2 scandir tabulate # Command line web gourde futures # Memory driver sortedcontainers # Cassandra driver cassandra-driver scales # ElasticSearch elasticsearch elasticsearch-dsl # To support https certifi # Core six enum34 cachetools prometheus_client # Metadata cache lmdb # For bgutil shell ipython
humanize parsedatetime progressbar2 scandir tabulate # Command line web gourde futures # Memory driver sortedcontainers # Cassandra driver cassandra-driver scales # ElasticSearch elasticsearch elasticsearch-dsl # To support https certifi # Core six enum34 cachetools prometheus_client # Metadata cache lmdb # Optional, for bgutil shell: # ipython
Revert "bgutil won't start without IPython"
Revert "bgutil won't start without IPython" """IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2.""" And it's used only for bgutil shell. This reverts commit 938e2d1d70f175263bb1f821f6e936135c9a72b9.
Text
apache-2.0
criteo/biggraphite,criteo/biggraphite,criteo/biggraphite,iksaif/biggraphite,Thib17/biggraphite,iksaif/biggraphite,criteo/biggraphite,iksaif/biggraphite,iksaif/biggraphite,Thib17/biggraphite,Thib17/biggraphite,Thib17/biggraphite
text
## Code Before: humanize parsedatetime progressbar2 scandir tabulate # Command line web gourde futures # Memory driver sortedcontainers # Cassandra driver cassandra-driver scales # ElasticSearch elasticsearch elasticsearch-dsl # To support https certifi # Core six enum34 cachetools prometheus_client # Metadata cache lmdb # For bgutil shell ipython ## Instruction: Revert "bgutil won't start without IPython" """IPython 6.0+ does not support Python 2.6, 2.7, 3.0, 3.1, or 3.2.""" And it's used only for bgutil shell. This reverts commit 938e2d1d70f175263bb1f821f6e936135c9a72b9. ## Code After: humanize parsedatetime progressbar2 scandir tabulate # Command line web gourde futures # Memory driver sortedcontainers # Cassandra driver cassandra-driver scales # ElasticSearch elasticsearch elasticsearch-dsl # To support https certifi # Core six enum34 cachetools prometheus_client # Metadata cache lmdb # Optional, for bgutil shell: # ipython
humanize parsedatetime progressbar2 scandir tabulate # Command line web gourde futures # Memory driver sortedcontainers # Cassandra driver cassandra-driver scales # ElasticSearch elasticsearch elasticsearch-dsl # To support https certifi # Core six enum34 cachetools prometheus_client # Metadata cache lmdb - # For bgutil shell + # Optional, for bgutil shell: - ipython + # ipython ? ++
4
0.117647
2
2
62eb104059e1e83b2e9bb6e1be8efdd3e1296088
99-utilities/_utilities__aligments.scss
99-utilities/_utilities__aligments.scss
/* ------------------------------------------------------------------------- * ALIGNMENTS * * Force text alignment * * Params: * ALIGNMENTS .......................... Horizontal alignments * */ // Utility variables // -------------------------------------------------- // Utility toggling $u-align--enabled: true !default; // Alignments $u-align__alignments: (left, center, right) !default; // Modifiers Breakpoints $u-align__mod-bp--enabled: true !default; $u-align__mod-bp: map_remove($s-breakpoints, "xxs") !default; // Utility as a mixin // -------------------------------------------------- @mixin u-alignment($_direction: left, $_bp: null) { .u-align-#{$_direction}#{s-breakpoint-suffix($_bp)} { text-align: $_direction !important; } } // Utility selector output // -------------------------------------------------- @if ($u-align--enabled) { @each $_alignment in $u-align__alignments { @include u-alignment($_alignment); } } // Breakpoints modifiers // -------------------------------------------------- @if ($u-align--enabled and $u-align__mod-bp--enabled) { @each $_bp-name, $_bp-value in $u-align__mod-bp { @include mq($from: $_bp-name) { @each $_alignment in $u-align__alignments { @include u-alignment($_alignment, $_bp-name); } } } }
/* ------------------------------------------------------------------------- * ALIGNMENTS * * Force text alignment * * Params: * ALIGNMENTS .......................... Horizontal alignments * */ // Utility variables // -------------------------------------------------- // Utility toggling $u-align--enabled: true !default; // Alignments $u-align__alignments: (left, center, right) !default; // Modifiers Breakpoints $u-align__mod-bp--enabled: true !default; $u-align__mod-bp: map_remove($s-breakpoints, "xxs") !default; // Utility selector output // -------------------------------------------------- @if ($u-align--enabled) { @each $_alignment in $u-align__alignments { .u-align-#{$_alignment} { text-align: $_alignment !important; } } } // Breakpoints modifiers // -------------------------------------------------- @if ($u-align--enabled and $u-align__mod-bp--enabled) { @each $_bp-name, $_bp-value in $u-align__mod-bp { @include mq($from: $_bp-name) { @each $_alignment in $u-align__alignments { .u-align-#{$_alignment}#{s-breakpoint-suffix($_bp-name)} { text-align: $_alignment !important; } } } } }
Remove utility as a mixin Fix output class selector
Remove utility as a mixin Fix output class selector
SCSS
mit
haiticss/haiticss,danifornells/haiticss,danifornells/haiticss,haiticss/haiticss
scss
## Code Before: /* ------------------------------------------------------------------------- * ALIGNMENTS * * Force text alignment * * Params: * ALIGNMENTS .......................... Horizontal alignments * */ // Utility variables // -------------------------------------------------- // Utility toggling $u-align--enabled: true !default; // Alignments $u-align__alignments: (left, center, right) !default; // Modifiers Breakpoints $u-align__mod-bp--enabled: true !default; $u-align__mod-bp: map_remove($s-breakpoints, "xxs") !default; // Utility as a mixin // -------------------------------------------------- @mixin u-alignment($_direction: left, $_bp: null) { .u-align-#{$_direction}#{s-breakpoint-suffix($_bp)} { text-align: $_direction !important; } } // Utility selector output // -------------------------------------------------- @if ($u-align--enabled) { @each $_alignment in $u-align__alignments { @include u-alignment($_alignment); } } // Breakpoints modifiers // -------------------------------------------------- @if ($u-align--enabled and $u-align__mod-bp--enabled) { @each $_bp-name, $_bp-value in $u-align__mod-bp { @include mq($from: $_bp-name) { @each $_alignment in $u-align__alignments { @include u-alignment($_alignment, $_bp-name); } } } } ## Instruction: Remove utility as a mixin Fix output class selector ## Code After: /* ------------------------------------------------------------------------- * ALIGNMENTS * * Force text alignment * * Params: * ALIGNMENTS .......................... Horizontal alignments * */ // Utility variables // -------------------------------------------------- // Utility toggling $u-align--enabled: true !default; // Alignments $u-align__alignments: (left, center, right) !default; // Modifiers Breakpoints $u-align__mod-bp--enabled: true !default; $u-align__mod-bp: map_remove($s-breakpoints, "xxs") !default; // Utility selector output // -------------------------------------------------- @if ($u-align--enabled) { @each $_alignment in $u-align__alignments { .u-align-#{$_alignment} { text-align: $_alignment !important; } } } // Breakpoints modifiers // -------------------------------------------------- @if ($u-align--enabled and $u-align__mod-bp--enabled) { @each $_bp-name, $_bp-value in $u-align__mod-bp { @include mq($from: $_bp-name) { @each $_alignment in $u-align__alignments { .u-align-#{$_alignment}#{s-breakpoint-suffix($_bp-name)} { text-align: $_alignment !important; } } } } }
/* ------------------------------------------------------------------------- * ALIGNMENTS * * Force text alignment * * Params: * ALIGNMENTS .......................... Horizontal alignments * */ // Utility variables // -------------------------------------------------- // Utility toggling $u-align--enabled: true !default; // Alignments $u-align__alignments: (left, center, right) !default; // Modifiers Breakpoints $u-align__mod-bp--enabled: true !default; $u-align__mod-bp: map_remove($s-breakpoints, "xxs") !default; - // Utility as a mixin - // -------------------------------------------------- - - @mixin u-alignment($_direction: left, $_bp: null) { - .u-align-#{$_direction}#{s-breakpoint-suffix($_bp)} { - text-align: $_direction !important; - } - } - // Utility selector output // -------------------------------------------------- @if ($u-align--enabled) { @each $_alignment in $u-align__alignments { - @include u-alignment($_alignment); + .u-align-#{$_alignment} { + text-align: $_alignment !important; + } } } // Breakpoints modifiers // -------------------------------------------------- @if ($u-align--enabled and $u-align__mod-bp--enabled) { @each $_bp-name, $_bp-value in $u-align__mod-bp { @include mq($from: $_bp-name) { @each $_alignment in $u-align__alignments { - @include u-alignment($_alignment, $_bp-name); + .u-align-#{$_alignment}#{s-breakpoint-suffix($_bp-name)} { + text-align: $_alignment !important; + } } } } }
17
0.293103
6
11
ae2a34d00a1991a1d831c6381df564f267e6263c
lib/http/instance-request.js
lib/http/instance-request.js
var logger = require('../support/logger'); var ItemSchema = require('../domain/item-schema'); var instanceSchemaCorrelator = require('../http/instance-schema-correlator'); var instanceRequest = module.exports = { handle: function(ljsReq, res, callback) { var collectionName = ljsReq.ljsUrl().collectionName; ItemSchema.findByCollectionName(collectionName, function(err, itemSchema) { if (err) { callback(err); } else { if (itemSchema) { handleRequest(itemSchema, ljsReq); handleResponse(itemSchema, ljsReq, res); } callback(); } }); } }; function handleRequest(itemSchema, ljsReq) { itemSchema.registerLoopbackModel(ljsReq.req.app); logger.info('Loopback Model created for JSON Schema collectionName: ', itemSchema.collectionName); }; function handleResponse(itemSchema, ljsReq, res) { instanceSchemaCorrelator.correlate(itemSchema, ljsReq, res); };
var logger = require('../support/logger'); var ItemSchema = require('../domain/item-schema'); var instanceSchemaCorrelator = require('../http/instance-schema-correlator'); var instanceRequest = module.exports = { handle: function(ljsReq, res, callback) { var collectionName = ljsReq.ljsUrl().collectionName; ItemSchema.findByCollectionName(collectionName, function(err, itemSchema) { if (err) { return callback(err); }; if (itemSchema) { handleRequest(itemSchema, ljsReq); handleResponse(itemSchema, ljsReq, res); } callback(); }); } }; function handleRequest(itemSchema, ljsReq) { itemSchema.registerLoopbackModel(ljsReq.req.app); logger.info('Loopback Model created for JSON Schema collectionName: ', itemSchema.collectionName); }; function handleResponse(itemSchema, ljsReq, res) { instanceSchemaCorrelator.correlate(itemSchema, ljsReq, res); };
Improve readability on error handling.
Improve readability on error handling.
JavaScript
mit
backstage/loopback-jsonschema,globocom/loopback-jsonschema
javascript
## Code Before: var logger = require('../support/logger'); var ItemSchema = require('../domain/item-schema'); var instanceSchemaCorrelator = require('../http/instance-schema-correlator'); var instanceRequest = module.exports = { handle: function(ljsReq, res, callback) { var collectionName = ljsReq.ljsUrl().collectionName; ItemSchema.findByCollectionName(collectionName, function(err, itemSchema) { if (err) { callback(err); } else { if (itemSchema) { handleRequest(itemSchema, ljsReq); handleResponse(itemSchema, ljsReq, res); } callback(); } }); } }; function handleRequest(itemSchema, ljsReq) { itemSchema.registerLoopbackModel(ljsReq.req.app); logger.info('Loopback Model created for JSON Schema collectionName: ', itemSchema.collectionName); }; function handleResponse(itemSchema, ljsReq, res) { instanceSchemaCorrelator.correlate(itemSchema, ljsReq, res); }; ## Instruction: Improve readability on error handling. ## Code After: var logger = require('../support/logger'); var ItemSchema = require('../domain/item-schema'); var instanceSchemaCorrelator = require('../http/instance-schema-correlator'); var instanceRequest = module.exports = { handle: function(ljsReq, res, callback) { var collectionName = ljsReq.ljsUrl().collectionName; ItemSchema.findByCollectionName(collectionName, function(err, itemSchema) { if (err) { return callback(err); }; if (itemSchema) { handleRequest(itemSchema, ljsReq); handleResponse(itemSchema, ljsReq, res); } callback(); }); } }; function handleRequest(itemSchema, ljsReq) { itemSchema.registerLoopbackModel(ljsReq.req.app); logger.info('Loopback Model created for JSON Schema collectionName: ', itemSchema.collectionName); }; function handleResponse(itemSchema, ljsReq, res) { instanceSchemaCorrelator.correlate(itemSchema, ljsReq, res); };
var logger = require('../support/logger'); var ItemSchema = require('../domain/item-schema'); var instanceSchemaCorrelator = require('../http/instance-schema-correlator'); var instanceRequest = module.exports = { handle: function(ljsReq, res, callback) { var collectionName = ljsReq.ljsUrl().collectionName; ItemSchema.findByCollectionName(collectionName, function(err, itemSchema) { - if (err) { - callback(err); + if (err) { return callback(err); }; ? ++ +++++ + ++++++ +++ - } else { + - if (itemSchema) { ? ---- + if (itemSchema) { - handleRequest(itemSchema, ljsReq); ? ---- + handleRequest(itemSchema, ljsReq); - handleResponse(itemSchema, ljsReq, res); ? ---- + handleResponse(itemSchema, ljsReq, res); - } - callback(); } + callback(); }); } }; function handleRequest(itemSchema, ljsReq) { itemSchema.registerLoopbackModel(ljsReq.req.app); logger.info('Loopback Model created for JSON Schema collectionName: ', itemSchema.collectionName); }; function handleResponse(itemSchema, ljsReq, res) { instanceSchemaCorrelator.correlate(itemSchema, ljsReq, res); };
14
0.4375
6
8
1183d651843cd6ed0657b5c320f1c5cc8fdebe25
module/Core/src/Repository/ShortUrlRepositoryInterface.php
module/Core/src/Repository/ShortUrlRepositoryInterface.php
<?php declare(strict_types=1); namespace Shlinkio\Shlink\Core\Repository; use Doctrine\Common\Persistence\ObjectRepository; use Shlinkio\Shlink\Core\Entity\ShortUrl; interface ShortUrlRepositoryInterface extends ObjectRepository { /** * Gets a list of elements using provided filtering data * * @param string|array|null $orderBy */ public function findList( ?int $limit = null, ?int $offset = null, ?string $searchTerm = null, array $tags = [], $orderBy = null ): array; /** * Counts the number of elements in a list using provided filtering data */ public function countList(?string $searchTerm = null, array $tags = []): int; public function findOneByShortCode(string $shortCode, ?string $domain = null): ?ShortUrl; public function shortCodeIsInUse(string $slug, ?string $domain): bool; }
<?php declare(strict_types=1); namespace Shlinkio\Shlink\Core\Repository; use Doctrine\Common\Persistence\ObjectRepository; use Shlinkio\Shlink\Common\Util\DateRange; use Shlinkio\Shlink\Core\Entity\ShortUrl; interface ShortUrlRepositoryInterface extends ObjectRepository { /** * Gets a list of elements using provided filtering data * * @param string|array|null $orderBy */ public function findList( ?int $limit = null, ?int $offset = null, ?string $searchTerm = null, array $tags = [], $orderBy = null, ?DateRange $dateRange = null ): array; /** * Counts the number of elements in a list using provided filtering data */ public function countList(?string $searchTerm = null, array $tags = []): int; public function findOneByShortCode(string $shortCode, ?string $domain = null): ?ShortUrl; public function shortCodeIsInUse(string $slug, ?string $domain): bool; }
Add date range filter to short url repository interface
Add date range filter to short url repository interface
PHP
mit
acelaya/url-shortener,shlinkio/shlink,acelaya/shlink,acelaya/shlink,acelaya/shlink,acelaya/url-shortener,shlinkio/shlink,shlinkio/shlink
php
## Code Before: <?php declare(strict_types=1); namespace Shlinkio\Shlink\Core\Repository; use Doctrine\Common\Persistence\ObjectRepository; use Shlinkio\Shlink\Core\Entity\ShortUrl; interface ShortUrlRepositoryInterface extends ObjectRepository { /** * Gets a list of elements using provided filtering data * * @param string|array|null $orderBy */ public function findList( ?int $limit = null, ?int $offset = null, ?string $searchTerm = null, array $tags = [], $orderBy = null ): array; /** * Counts the number of elements in a list using provided filtering data */ public function countList(?string $searchTerm = null, array $tags = []): int; public function findOneByShortCode(string $shortCode, ?string $domain = null): ?ShortUrl; public function shortCodeIsInUse(string $slug, ?string $domain): bool; } ## Instruction: Add date range filter to short url repository interface ## Code After: <?php declare(strict_types=1); namespace Shlinkio\Shlink\Core\Repository; use Doctrine\Common\Persistence\ObjectRepository; use Shlinkio\Shlink\Common\Util\DateRange; use Shlinkio\Shlink\Core\Entity\ShortUrl; interface ShortUrlRepositoryInterface extends ObjectRepository { /** * Gets a list of elements using provided filtering data * * @param string|array|null $orderBy */ public function findList( ?int $limit = null, ?int $offset = null, ?string $searchTerm = null, array $tags = [], $orderBy = null, ?DateRange $dateRange = null ): array; /** * Counts the number of elements in a list using provided filtering data */ public function countList(?string $searchTerm = null, array $tags = []): int; public function findOneByShortCode(string $shortCode, ?string $domain = null): ?ShortUrl; public function shortCodeIsInUse(string $slug, ?string $domain): bool; }
<?php declare(strict_types=1); namespace Shlinkio\Shlink\Core\Repository; use Doctrine\Common\Persistence\ObjectRepository; + use Shlinkio\Shlink\Common\Util\DateRange; use Shlinkio\Shlink\Core\Entity\ShortUrl; interface ShortUrlRepositoryInterface extends ObjectRepository { /** * Gets a list of elements using provided filtering data * * @param string|array|null $orderBy */ public function findList( ?int $limit = null, ?int $offset = null, ?string $searchTerm = null, array $tags = [], - $orderBy = null + $orderBy = null, ? + + ?DateRange $dateRange = null ): array; /** * Counts the number of elements in a list using provided filtering data */ public function countList(?string $searchTerm = null, array $tags = []): int; public function findOneByShortCode(string $shortCode, ?string $domain = null): ?ShortUrl; public function shortCodeIsInUse(string $slug, ?string $domain): bool; }
4
0.121212
3
1
32c6c1747b798b03a8d200dbf5dc3b84fd7fa487
index.js
index.js
/* eslint-disable */ 'use strict'; module.exports = { name: 'ember-flatpickr', included: function(app) { let cssPath = 'themes/'; if(app.options && app.options.flatpickr && app.options.flatpickr.theme) { cssPath += app.options.flatpickr.theme; } else { cssPath += 'dark'; } cssPath += '.css'; this.theme = cssPath; this._super.included.apply(this, arguments); }, options: { nodeAssets: { flatpickr: function() { if (!process.env.EMBER_CLI_FASTBOOT) { return { srcDir: 'dist', import: [ 'flatpickr.js', this.theme ] }; } } } } };
/* eslint-disable */ 'use strict'; module.exports = { name: 'ember-flatpickr', included: function(app) { let cssPath = 'themes/'; if (app.options && app.options.flatpickr && app.options.flatpickr.theme) { cssPath += app.options.flatpickr.theme; } else { cssPath += 'dark'; } cssPath += '.css'; this.theme = cssPath; this._super.included.apply(this, arguments); }, options: { nodeAssets: { flatpickr: function() { return { enabled: !process.env.EMBER_CLI_FASTBOOT, srcDir: 'dist', import: [ 'flatpickr.js', this.theme ] }; } } } };
Fix node assets with fastboot
Fix node assets with fastboot
JavaScript
mit
shipshapecode/ember-flatpickr,shipshapecode/ember-flatpickr,shipshapecode/ember-flatpickr
javascript
## Code Before: /* eslint-disable */ 'use strict'; module.exports = { name: 'ember-flatpickr', included: function(app) { let cssPath = 'themes/'; if(app.options && app.options.flatpickr && app.options.flatpickr.theme) { cssPath += app.options.flatpickr.theme; } else { cssPath += 'dark'; } cssPath += '.css'; this.theme = cssPath; this._super.included.apply(this, arguments); }, options: { nodeAssets: { flatpickr: function() { if (!process.env.EMBER_CLI_FASTBOOT) { return { srcDir: 'dist', import: [ 'flatpickr.js', this.theme ] }; } } } } }; ## Instruction: Fix node assets with fastboot ## Code After: /* eslint-disable */ 'use strict'; module.exports = { name: 'ember-flatpickr', included: function(app) { let cssPath = 'themes/'; if (app.options && app.options.flatpickr && app.options.flatpickr.theme) { cssPath += app.options.flatpickr.theme; } else { cssPath += 'dark'; } cssPath += '.css'; this.theme = cssPath; this._super.included.apply(this, arguments); }, options: { nodeAssets: { flatpickr: function() { return { enabled: !process.env.EMBER_CLI_FASTBOOT, srcDir: 'dist', import: [ 'flatpickr.js', this.theme ] }; } } } };
/* eslint-disable */ 'use strict'; module.exports = { name: 'ember-flatpickr', included: function(app) { let cssPath = 'themes/'; - if(app.options && app.options.flatpickr && app.options.flatpickr.theme) { + if (app.options && app.options.flatpickr && app.options.flatpickr.theme) { ? + cssPath += app.options.flatpickr.theme; - } ? - + } else { cssPath += 'dark'; } cssPath += '.css'; this.theme = cssPath; this._super.included.apply(this, arguments); }, options: { nodeAssets: { flatpickr: function() { - if (!process.env.EMBER_CLI_FASTBOOT) { - return { ? -- + return { + enabled: !process.env.EMBER_CLI_FASTBOOT, - srcDir: 'dist', ? -- + srcDir: 'dist', - import: [ ? -- + import: [ - 'flatpickr.js', ? -- + 'flatpickr.js', - this.theme ? -- + this.theme - ] ? -- + ] - }; - } + }; ? + } } } };
21
0.617647
10
11
015557ac2d373caa09a98a56e8110320d7977eb4
README.md
README.md
An Haskell implementation of the [Pure Type System](http://ncatlab.org/nlab/show/pure+type+system) ##Installation Run the following commands at the top: ``` cabal configure cabal install ```
An Haskell implementation of the [Pure Type System](http://ncatlab.org/nlab/show/pure+type+system) ##Installation Run the following commands at the top: ``` cabal install ```
Remove redundant 'cabal configure' call.
Remove redundant 'cabal configure' call.
Markdown
bsd-3-clause
Blaisorblade/pts,Toxaris/pts
markdown
## Code Before: An Haskell implementation of the [Pure Type System](http://ncatlab.org/nlab/show/pure+type+system) ##Installation Run the following commands at the top: ``` cabal configure cabal install ``` ## Instruction: Remove redundant 'cabal configure' call. ## Code After: An Haskell implementation of the [Pure Type System](http://ncatlab.org/nlab/show/pure+type+system) ##Installation Run the following commands at the top: ``` cabal install ```
An Haskell implementation of the [Pure Type System](http://ncatlab.org/nlab/show/pure+type+system) ##Installation Run the following commands at the top: ``` - cabal configure cabal install ```
1
0.076923
0
1
1944548e8ea77174d0929230e07a78220d3fe2ff
app/assets/javascripts/url-helpers.js
app/assets/javascripts/url-helpers.js
var getUrlVar = function(key) { var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search); return result && unescape(result[1]) || ""; }; var getIDFromURL = function(key) { var result = new RegExp(key + "/([0-9a-zA-Z\-]*)", "i").exec(window.location.pathname); if (result === 'new') { return ''; } return result && unescape(result[1]) || ''; };
var getUrlVar = function(key) { var result = new RegExp(key + '=([^&]*)', 'i').exec(window.location.search); return result && decodeURIComponent(result[1]) || ''; }; var getIDFromURL = function(key) { var result = new RegExp(key + '/([0-9a-zA-Z\-]*)', 'i').exec(window.location.pathname); if (result === 'new') { return ''; } return result && decodeURIComponent(result[1]) || ''; };
Fix mixture of quotes and deprecated unescape method usage
Fix mixture of quotes and deprecated unescape method usage
JavaScript
mit
openfarmcc/OpenFarm,RickCarlino/OpenFarm,CloCkWeRX/OpenFarm,openfarmcc/OpenFarm,RickCarlino/OpenFarm,openfarmcc/OpenFarm,RickCarlino/OpenFarm,CloCkWeRX/OpenFarm,CloCkWeRX/OpenFarm,CloCkWeRX/OpenFarm,openfarmcc/OpenFarm,RickCarlino/OpenFarm
javascript
## Code Before: var getUrlVar = function(key) { var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search); return result && unescape(result[1]) || ""; }; var getIDFromURL = function(key) { var result = new RegExp(key + "/([0-9a-zA-Z\-]*)", "i").exec(window.location.pathname); if (result === 'new') { return ''; } return result && unescape(result[1]) || ''; }; ## Instruction: Fix mixture of quotes and deprecated unescape method usage ## Code After: var getUrlVar = function(key) { var result = new RegExp(key + '=([^&]*)', 'i').exec(window.location.search); return result && decodeURIComponent(result[1]) || ''; }; var getIDFromURL = function(key) { var result = new RegExp(key + '/([0-9a-zA-Z\-]*)', 'i').exec(window.location.pathname); if (result === 'new') { return ''; } return result && decodeURIComponent(result[1]) || ''; };
var getUrlVar = function(key) { - var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search); ? ^ ^ ^ ^ + var result = new RegExp(key + '=([^&]*)', 'i').exec(window.location.search); ? ^ ^ ^ ^ - return result && unescape(result[1]) || ""; ? ^ ^^^^^ ^^ + return result && decodeURIComponent(result[1]) || ''; ? ^^^^^^^^^^^^^^ ^^ ^^ }; var getIDFromURL = function(key) { - var result = new RegExp(key + "/([0-9a-zA-Z\-]*)", "i").exec(window.location.pathname); ? ^ ^ ^ ^ + var result = new RegExp(key + '/([0-9a-zA-Z\-]*)', 'i').exec(window.location.pathname); ? ^ ^ ^ ^ if (result === 'new') { return ''; } - return result && unescape(result[1]) || ''; ? ^ ^^^^^ + return result && decodeURIComponent(result[1]) || ''; ? ^^^^^^^^^^^^^^ ^^ };
8
0.666667
4
4
341a658d3973f0d3396b3197841748763a74818d
scripts/NuclearFallout.sh
scripts/NuclearFallout.sh
always_clean() { cat <<EOF /system/app/Provision.apk /system/app/QuickSearchBox.apk /system/app/SetupWizard.apk /system/app/Vending.apk EOF } always_clean | while read FILE; do rm -f $FILE done . /tmp/NuclearFalloutHelpers.sh # copy system files into place AND generate 70-gapps.sh while we do backuptool_header copy_files /tmp/system /system backuptool_footer # copy data files into place (if there are any) copy_files /tmp/data /data
always_clean() { cat <<EOF /system/app/Provision.apk /system/app/QuickSearchBox.apk /system/app/priv-app/SetupWizard.apk /system/app/priv-app/Velvet.apk /system/app/Vending.apk /system/app/BrowserProviderProxy.apk /system/app/PartnerBookmarksProvider.apk EOF } always_clean | while read FILE; do rm -f $FILE done . /tmp/NuclearFalloutHelpers.sh # copy system files into place AND generate 70-gapps.sh while we do backuptool_header copy_files /tmp/system /system backuptool_footer # copy data files into place (if there are any) copy_files /tmp/data /data
Update some stuff in list_files... which you should customize for your gapps, slacker.
Update some stuff in list_files... which you should customize for your gapps, slacker.
Shell
mit
nuclearmistake/AnyGapps
shell
## Code Before: always_clean() { cat <<EOF /system/app/Provision.apk /system/app/QuickSearchBox.apk /system/app/SetupWizard.apk /system/app/Vending.apk EOF } always_clean | while read FILE; do rm -f $FILE done . /tmp/NuclearFalloutHelpers.sh # copy system files into place AND generate 70-gapps.sh while we do backuptool_header copy_files /tmp/system /system backuptool_footer # copy data files into place (if there are any) copy_files /tmp/data /data ## Instruction: Update some stuff in list_files... which you should customize for your gapps, slacker. ## Code After: always_clean() { cat <<EOF /system/app/Provision.apk /system/app/QuickSearchBox.apk /system/app/priv-app/SetupWizard.apk /system/app/priv-app/Velvet.apk /system/app/Vending.apk /system/app/BrowserProviderProxy.apk /system/app/PartnerBookmarksProvider.apk EOF } always_clean | while read FILE; do rm -f $FILE done . /tmp/NuclearFalloutHelpers.sh # copy system files into place AND generate 70-gapps.sh while we do backuptool_header copy_files /tmp/system /system backuptool_footer # copy data files into place (if there are any) copy_files /tmp/data /data
always_clean() { cat <<EOF /system/app/Provision.apk /system/app/QuickSearchBox.apk - /system/app/SetupWizard.apk + /system/app/priv-app/SetupWizard.apk ? +++++++++ + /system/app/priv-app/Velvet.apk /system/app/Vending.apk + /system/app/BrowserProviderProxy.apk + /system/app/PartnerBookmarksProvider.apk EOF } always_clean | while read FILE; do rm -f $FILE done . /tmp/NuclearFalloutHelpers.sh # copy system files into place AND generate 70-gapps.sh while we do backuptool_header copy_files /tmp/system /system backuptool_footer # copy data files into place (if there are any) copy_files /tmp/data /data
5
0.217391
4
1
ff19cc4f551f28f3fd89bbf976cec1a10450fd19
Magic/src/main/resources/examples/survival/mobs/atm.yml
Magic/src/main/resources/examples/survival/mobs/atm.yml
atm: inherit: base_npc requires: Vault type: armor_stand show_name: true invisible: true marker: true mount: type: zombie name: "Grumm" interact_spell: atm show_name: false helmet: skull:http://textures.minecraft.net/texture/71ead16d94045873da861abf94703e489f9cf498db5a2a33a41cabda93ae1825 ai: false silent: true baby: false potion_effects: invisibility: 0
atm: inherit: base_npc requires: Vault type: armor_stand show_name: true invisible: true marker: true remove_mounts: "*" mount: type: zombie name: "Grumm" interact_spell: atm show_name: false helmet: skull:http://textures.minecraft.net/texture/71ead16d94045873da861abf94703e489f9cf498db5a2a33a41cabda93ae1825 ai: false silent: true baby: false potion_effects: invisibility: 0
Fix ATM leaving its bottom half after removal
Fix ATM leaving its bottom half after removal
YAML
mit
elBukkit/MagicPlugin,elBukkit/MagicPlugin,elBukkit/MagicPlugin
yaml
## Code Before: atm: inherit: base_npc requires: Vault type: armor_stand show_name: true invisible: true marker: true mount: type: zombie name: "Grumm" interact_spell: atm show_name: false helmet: skull:http://textures.minecraft.net/texture/71ead16d94045873da861abf94703e489f9cf498db5a2a33a41cabda93ae1825 ai: false silent: true baby: false potion_effects: invisibility: 0 ## Instruction: Fix ATM leaving its bottom half after removal ## Code After: atm: inherit: base_npc requires: Vault type: armor_stand show_name: true invisible: true marker: true remove_mounts: "*" mount: type: zombie name: "Grumm" interact_spell: atm show_name: false helmet: skull:http://textures.minecraft.net/texture/71ead16d94045873da861abf94703e489f9cf498db5a2a33a41cabda93ae1825 ai: false silent: true baby: false potion_effects: invisibility: 0
atm: inherit: base_npc requires: Vault type: armor_stand show_name: true invisible: true marker: true + remove_mounts: "*" mount: type: zombie name: "Grumm" interact_spell: atm show_name: false helmet: skull:http://textures.minecraft.net/texture/71ead16d94045873da861abf94703e489f9cf498db5a2a33a41cabda93ae1825 ai: false silent: true baby: false potion_effects: invisibility: 0
1
0.055556
1
0
0178ee1c94589270d78af013cf7ad493de04b637
src/reducers/index.js
src/reducers/index.js
import { combineReducers } from 'redux' import { RECEIVE_STOP_DATA } from '../actions' const cardsReducer = () => { return {cards: [{name: 'Fruängen', stopId: '9260', updating: false, error: false},{name: 'Slussen', stopId: '9192', updating: false, error: false}]} } const stopsReducer = (state, action) => { switch (action.type) { case RECEIVE_STOP_DATA: var s = Object.assign({}, state) s.stops[action.stop] = action.data.departures return s default: return state == undefined ? {stops: {}} : state } } const departuresApp = combineReducers({ cardsReducer, stopsReducer }) export default departuresApp
import { combineReducers } from 'redux' import { RECEIVE_STOP_DATA } from '../actions' const cardsReducer = () => { return {cards: [ { name: 'Fruängen', stopId: '9260', updating: false, error: false, lines: [{ line: '14', direction: 1 }] }, { name: 'Slussen', stopId: '9192', updating: false, error: false, lines: [{ line: '14', direction: 2 }] }]} } /* * Filter new stop information and add them to the new state */ const stopsReducer = (state, action) => { switch (action.type) { case RECEIVE_STOP_DATA: var newState = Object.assign({}, state) newState.stops[action.stop] = action.data.departures return newState default: return state == undefined ? {stops: {}} : state } } const departuresApp = combineReducers({ cardsReducer, stopsReducer }) export default departuresApp
Add direction information to cards
Add direction information to cards
JavaScript
apache-2.0
Ozzee/sl-departures,Ozzee/sl-departures
javascript
## Code Before: import { combineReducers } from 'redux' import { RECEIVE_STOP_DATA } from '../actions' const cardsReducer = () => { return {cards: [{name: 'Fruängen', stopId: '9260', updating: false, error: false},{name: 'Slussen', stopId: '9192', updating: false, error: false}]} } const stopsReducer = (state, action) => { switch (action.type) { case RECEIVE_STOP_DATA: var s = Object.assign({}, state) s.stops[action.stop] = action.data.departures return s default: return state == undefined ? {stops: {}} : state } } const departuresApp = combineReducers({ cardsReducer, stopsReducer }) export default departuresApp ## Instruction: Add direction information to cards ## Code After: import { combineReducers } from 'redux' import { RECEIVE_STOP_DATA } from '../actions' const cardsReducer = () => { return {cards: [ { name: 'Fruängen', stopId: '9260', updating: false, error: false, lines: [{ line: '14', direction: 1 }] }, { name: 'Slussen', stopId: '9192', updating: false, error: false, lines: [{ line: '14', direction: 2 }] }]} } /* * Filter new stop information and add them to the new state */ const stopsReducer = (state, action) => { switch (action.type) { case RECEIVE_STOP_DATA: var newState = Object.assign({}, state) newState.stops[action.stop] = action.data.departures return newState default: return state == undefined ? {stops: {}} : state } } const departuresApp = combineReducers({ cardsReducer, stopsReducer }) export default departuresApp
import { combineReducers } from 'redux' import { RECEIVE_STOP_DATA } from '../actions' const cardsReducer = () => { - return {cards: [{name: 'Fruängen', stopId: '9260', updating: false, error: false},{name: 'Slussen', stopId: '9192', updating: false, error: false}]} + return {cards: [ + { + name: 'Fruängen', + stopId: '9260', + updating: false, + error: false, + lines: [{ + line: '14', + direction: 1 + }] + }, + { + name: 'Slussen', + stopId: '9192', + updating: false, + error: false, + lines: [{ + line: '14', + direction: 2 + }] + }]} } + /* + * Filter new stop information and add them to the new state + */ const stopsReducer = (state, action) => { switch (action.type) { case RECEIVE_STOP_DATA: - var s = Object.assign({}, state) ? ^ + var newState = Object.assign({}, state) ? ^^^^^^^^ - s.stops[action.stop] = action.data.departures ? ^ + newState.stops[action.stop] = action.data.departures ? ^^^^^^^^ - return s + return newState default: return state == undefined ? {stops: {}} : state } } const departuresApp = combineReducers({ cardsReducer, stopsReducer }) export default departuresApp
31
1.24
27
4
b7f75ac653d23749bbf181034f49e2a796848c58
app/models/role.rb
app/models/role.rb
class Role < ActiveRecord::Base validates :name, :presence => true, :uniqueness => true has_many :feature_permissions, :dependent => :destroy has_many :features, :through => :feature_permissions def read_only_features list = [] feature_permissions.each do |fp| list << fp.feature if fp.read_only end list end def list_features list = feature_permissions.map do |fp| name = fp.feature.name name += ' (Read-Only)' if fp.read_only name end list.sort.join(', ') end end
class Role < ActiveRecord::Base validates :name, :presence => true, :uniqueness => true has_many :feature_permissions, :dependent => :destroy has_many :features, :through => :feature_permissions def read_only_features list = [] feature_permissions.each do |fp| list << fp.feature if fp.read_only end list end def list_features list = feature_permissions.map do |fp| name = I18n.t("admin.features.#{fp.feature.name}") name = fp.feature.name if name.include? 'translation missing' name += ' (Read-Only)' if fp.read_only name end list.sort.join(', ') end end
Use use translations when listing features (if available).
Use use translations when listing features (if available).
Ruby
mit
eclubb/creature_feature,eclubb/creature_feature
ruby
## Code Before: class Role < ActiveRecord::Base validates :name, :presence => true, :uniqueness => true has_many :feature_permissions, :dependent => :destroy has_many :features, :through => :feature_permissions def read_only_features list = [] feature_permissions.each do |fp| list << fp.feature if fp.read_only end list end def list_features list = feature_permissions.map do |fp| name = fp.feature.name name += ' (Read-Only)' if fp.read_only name end list.sort.join(', ') end end ## Instruction: Use use translations when listing features (if available). ## Code After: class Role < ActiveRecord::Base validates :name, :presence => true, :uniqueness => true has_many :feature_permissions, :dependent => :destroy has_many :features, :through => :feature_permissions def read_only_features list = [] feature_permissions.each do |fp| list << fp.feature if fp.read_only end list end def list_features list = feature_permissions.map do |fp| name = I18n.t("admin.features.#{fp.feature.name}") name = fp.feature.name if name.include? 'translation missing' name += ' (Read-Only)' if fp.read_only name end list.sort.join(', ') end end
class Role < ActiveRecord::Base validates :name, :presence => true, :uniqueness => true has_many :feature_permissions, :dependent => :destroy has_many :features, :through => :feature_permissions def read_only_features list = [] feature_permissions.each do |fp| list << fp.feature if fp.read_only end list end def list_features list = feature_permissions.map do |fp| - name = fp.feature.name + name = I18n.t("admin.features.#{fp.feature.name}") + name = fp.feature.name if name.include? 'translation missing' name += ' (Read-Only)' if fp.read_only name end list.sort.join(', ') end end
3
0.115385
2
1
0d01cf33b683508d077de79b754d4f2d83c7074f
index.js
index.js
const express = require('express'); const fileExists = require('file-exists'); const bodyParser = require('body-parser'); const fs = require('fs'); const { port = 8123 } = require('minimist')(process.argv.slice(2)); const app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); app.get('*', (req, res) => { const filePath = req.get('X-Requested-File-Path'); if (!filePath) { return res.status(500).send('Server did not provide file path'); } if (!fileExists(filePath)) { return res.status(500).send('Cannot find such file on the server'); } try { require(filePath)(req, res); // eslint-disable-line global-require } catch (e) { return res.status(500).send(`<pre>${e.stack}</pre>`); } const watcher = fs.watch(filePath, (eventType) => { if (eventType === 'change') { delete require.cache[filePath]; watcher.close(); } }); return undefined; }); app.listen(port, () => { console.log(`node-direct listening on port ${port}!`); });
const express = require('express'); const fileExists = require('file-exists'); const bodyParser = require('body-parser'); const fs = require('fs'); const { port = 8123 } = require('minimist')(process.argv.slice(2)); const app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); app.get('*', (req, res) => { const filePath = req.get('X-Requested-File-Path'); if (!filePath) { return res.status(500).send('Server did not provide file path'); } if (!fileExists(filePath)) { return res.status(500).send('Cannot find such file on the server'); } try { require(filePath)(req, res); // eslint-disable-line global-require } catch (e) { return res.status(500).send(`<pre>${e.stack}</pre>`); } const watcher = fs.watch(filePath, (eventType) => { if (eventType === 'change') { delete require.cache[require.resolve(filePath)]; watcher.close(); } }); return undefined; }); app.listen(port, () => { console.log(`node-direct listening on port ${port}!`); });
Use require.resolve to clean up require cache
fix: Use require.resolve to clean up require cache
JavaScript
mit
finom/node-direct,finom/node-direct
javascript
## Code Before: const express = require('express'); const fileExists = require('file-exists'); const bodyParser = require('body-parser'); const fs = require('fs'); const { port = 8123 } = require('minimist')(process.argv.slice(2)); const app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); app.get('*', (req, res) => { const filePath = req.get('X-Requested-File-Path'); if (!filePath) { return res.status(500).send('Server did not provide file path'); } if (!fileExists(filePath)) { return res.status(500).send('Cannot find such file on the server'); } try { require(filePath)(req, res); // eslint-disable-line global-require } catch (e) { return res.status(500).send(`<pre>${e.stack}</pre>`); } const watcher = fs.watch(filePath, (eventType) => { if (eventType === 'change') { delete require.cache[filePath]; watcher.close(); } }); return undefined; }); app.listen(port, () => { console.log(`node-direct listening on port ${port}!`); }); ## Instruction: fix: Use require.resolve to clean up require cache ## Code After: const express = require('express'); const fileExists = require('file-exists'); const bodyParser = require('body-parser'); const fs = require('fs'); const { port = 8123 } = require('minimist')(process.argv.slice(2)); const app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); app.get('*', (req, res) => { const filePath = req.get('X-Requested-File-Path'); if (!filePath) { return res.status(500).send('Server did not provide file path'); } if (!fileExists(filePath)) { return res.status(500).send('Cannot find such file on the server'); } try { require(filePath)(req, res); // eslint-disable-line global-require } catch (e) { return res.status(500).send(`<pre>${e.stack}</pre>`); } const watcher = fs.watch(filePath, (eventType) => { if (eventType === 'change') { delete require.cache[require.resolve(filePath)]; watcher.close(); } }); return undefined; }); app.listen(port, () => { console.log(`node-direct listening on port ${port}!`); });
const express = require('express'); const fileExists = require('file-exists'); const bodyParser = require('body-parser'); const fs = require('fs'); const { port = 8123 } = require('minimist')(process.argv.slice(2)); const app = express(); app.use(bodyParser.urlencoded({ extended: false })); app.use(bodyParser.json()); app.get('*', (req, res) => { const filePath = req.get('X-Requested-File-Path'); if (!filePath) { return res.status(500).send('Server did not provide file path'); } if (!fileExists(filePath)) { return res.status(500).send('Cannot find such file on the server'); } try { require(filePath)(req, res); // eslint-disable-line global-require } catch (e) { return res.status(500).send(`<pre>${e.stack}</pre>`); } const watcher = fs.watch(filePath, (eventType) => { if (eventType === 'change') { - delete require.cache[filePath]; + delete require.cache[require.resolve(filePath)]; ? ++++++++++++++++ + watcher.close(); } }); return undefined; }); app.listen(port, () => { console.log(`node-direct listening on port ${port}!`); });
2
0.04878
1
1
0fad6587b525a7924d775fc62e333ccdd3699d6b
config/initializers/airbrake.rb
config/initializers/airbrake.rb
require 'airbrake/sidekiq/error_handler' Airbrake.configure do |c| c.project_id = ENV['AIRBRAKE_PROJECT_ID'] c.project_key = ENV['AIRBRAKE_API_KEY'] c.root_directory = Rails.root c.logger = Rails.logger c.environment = Rails.env c.ignore_environments = %w[test development] # A list of parameters that should be filtered out of what is sent to # Airbrake. By default, all "password" attributes will have their contents # replaced. # https://github.com/airbrake/airbrake-ruby#blacklist_keys # Alternatively, you can integrate with Rails' filter_parameters. # Read more: https://goo.gl/gqQ1xS # c.blacklist_keys = Rails.application.config.filter_parameters c.blacklist_keys = [/password/i, /authorization/i] end
if ENV['AIRBRAKE_PROJECT_ID'].present? && ENV['AIRBRAKE_API_KEY'].present? require 'airbrake/sidekiq/error_handler' Airbrake.configure do |c| c.project_id = ENV['AIRBRAKE_PROJECT_ID'] c.project_key = ENV['AIRBRAKE_API_KEY'] c.root_directory = Rails.root c.logger = Rails.logger c.environment = Rails.env c.ignore_environments = %w[development test] # A list of parameters that should be filtered out of what is sent to # Airbrake. By default, all "password" attributes will have their contents # replaced. # https://github.com/airbrake/airbrake-ruby#blacklist_keys # Alternatively, you can integrate with Rails' filter_parameters. # Read more: https://goo.gl/gqQ1xS # c.blacklist_keys = Rails.application.config.filter_parameters c.blacklist_keys = [/password/i, /authorization/i] end end
Allow apps to run without Airbrake
Allow apps to run without Airbrake
Ruby
apache-2.0
worknation/server.work.nation,worknation/server.work.nation
ruby
## Code Before: require 'airbrake/sidekiq/error_handler' Airbrake.configure do |c| c.project_id = ENV['AIRBRAKE_PROJECT_ID'] c.project_key = ENV['AIRBRAKE_API_KEY'] c.root_directory = Rails.root c.logger = Rails.logger c.environment = Rails.env c.ignore_environments = %w[test development] # A list of parameters that should be filtered out of what is sent to # Airbrake. By default, all "password" attributes will have their contents # replaced. # https://github.com/airbrake/airbrake-ruby#blacklist_keys # Alternatively, you can integrate with Rails' filter_parameters. # Read more: https://goo.gl/gqQ1xS # c.blacklist_keys = Rails.application.config.filter_parameters c.blacklist_keys = [/password/i, /authorization/i] end ## Instruction: Allow apps to run without Airbrake ## Code After: if ENV['AIRBRAKE_PROJECT_ID'].present? && ENV['AIRBRAKE_API_KEY'].present? require 'airbrake/sidekiq/error_handler' Airbrake.configure do |c| c.project_id = ENV['AIRBRAKE_PROJECT_ID'] c.project_key = ENV['AIRBRAKE_API_KEY'] c.root_directory = Rails.root c.logger = Rails.logger c.environment = Rails.env c.ignore_environments = %w[development test] # A list of parameters that should be filtered out of what is sent to # Airbrake. By default, all "password" attributes will have their contents # replaced. # https://github.com/airbrake/airbrake-ruby#blacklist_keys # Alternatively, you can integrate with Rails' filter_parameters. # Read more: https://goo.gl/gqQ1xS # c.blacklist_keys = Rails.application.config.filter_parameters c.blacklist_keys = [/password/i, /authorization/i] end end
- require 'airbrake/sidekiq/error_handler' + if ENV['AIRBRAKE_PROJECT_ID'].present? && ENV['AIRBRAKE_API_KEY'].present? + require 'airbrake/sidekiq/error_handler' - Airbrake.configure do |c| - c.project_id = ENV['AIRBRAKE_PROJECT_ID'] - c.project_key = ENV['AIRBRAKE_API_KEY'] - c.root_directory = Rails.root - c.logger = Rails.logger - c.environment = Rails.env - c.ignore_environments = %w[test development] + Airbrake.configure do |c| + c.project_id = ENV['AIRBRAKE_PROJECT_ID'] + c.project_key = ENV['AIRBRAKE_API_KEY'] + c.root_directory = Rails.root + c.logger = Rails.logger + c.environment = Rails.env + c.ignore_environments = %w[development test] + - # A list of parameters that should be filtered out of what is sent to + # A list of parameters that should be filtered out of what is sent to ? ++ - # Airbrake. By default, all "password" attributes will have their contents + # Airbrake. By default, all "password" attributes will have their contents ? ++ - # replaced. + # replaced. ? ++ - # https://github.com/airbrake/airbrake-ruby#blacklist_keys + # https://github.com/airbrake/airbrake-ruby#blacklist_keys ? ++ - # Alternatively, you can integrate with Rails' filter_parameters. + # Alternatively, you can integrate with Rails' filter_parameters. ? ++ - # Read more: https://goo.gl/gqQ1xS + # Read more: https://goo.gl/gqQ1xS ? ++ - # c.blacklist_keys = Rails.application.config.filter_parameters + # c.blacklist_keys = Rails.application.config.filter_parameters ? ++ - c.blacklist_keys = [/password/i, /authorization/i] + c.blacklist_keys = [/password/i, /authorization/i] ? ++ + end + end
36
1.894737
20
16
2186a2f8cc224c9207a2b3f684f4bb1040a89a1d
functions.php
functions.php
<?php function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function footer_customizerrr() { ?> <a href="https://twitter.com/arborwx">@ArborWX</a> by <a href="https://www.dzombak.com">Chris Dzombak</a>. During severe weather, listen to <a href="http://arborwx.com/washtenaw-county-emergency-broadcasters/">local emergency broadcasters</a> for reliable and accurate updates. <script type="text/javascript"> var _gauges = _gauges || []; (function() { var t = document.createElement('script'); t.type = 'text/javascript'; t.async = true; t.id = 'gauges-tracker'; t.setAttribute('data-site-id', '561d558592c6ac04c90055de'); t.setAttribute('data-track-path', 'https://track.gaug.es/track.gif'); t.src = 'https://track.gaug.es/track.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(t, s); })(); </script> <?php } add_filter( 'twentyfifteen_credits', 'footer_customizerrr' );
<?php function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function footer_customizerrr() { ?> <a href="https://twitter.com/arborwx">@ArborWX</a> by <a href="https://www.dzombak.com">Chris Dzombak</a>. During severe weather, listen to <a href="http://arborwx.com/washtenaw-county-emergency-broadcasters/">local emergency broadcasters</a> for reliable and accurate updates. <?php } add_filter( 'twentyfifteen_credits', 'footer_customizerrr' );
Remove gaug.es code now that they have an official WP plugin
Remove gaug.es code now that they have an official WP plugin
PHP
mit
cdzombak/twentyfifteen-arborwx-child
php
## Code Before: <?php function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function footer_customizerrr() { ?> <a href="https://twitter.com/arborwx">@ArborWX</a> by <a href="https://www.dzombak.com">Chris Dzombak</a>. During severe weather, listen to <a href="http://arborwx.com/washtenaw-county-emergency-broadcasters/">local emergency broadcasters</a> for reliable and accurate updates. <script type="text/javascript"> var _gauges = _gauges || []; (function() { var t = document.createElement('script'); t.type = 'text/javascript'; t.async = true; t.id = 'gauges-tracker'; t.setAttribute('data-site-id', '561d558592c6ac04c90055de'); t.setAttribute('data-track-path', 'https://track.gaug.es/track.gif'); t.src = 'https://track.gaug.es/track.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(t, s); })(); </script> <?php } add_filter( 'twentyfifteen_credits', 'footer_customizerrr' ); ## Instruction: Remove gaug.es code now that they have an official WP plugin ## Code After: <?php function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function footer_customizerrr() { ?> <a href="https://twitter.com/arborwx">@ArborWX</a> by <a href="https://www.dzombak.com">Chris Dzombak</a>. During severe weather, listen to <a href="http://arborwx.com/washtenaw-county-emergency-broadcasters/">local emergency broadcasters</a> for reliable and accurate updates. <?php } add_filter( 'twentyfifteen_credits', 'footer_customizerrr' );
<?php function theme_enqueue_styles() { wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); } add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); function footer_customizerrr() { ?> <a href="https://twitter.com/arborwx">@ArborWX</a> by <a href="https://www.dzombak.com">Chris Dzombak</a>. During severe weather, listen to <a href="http://arborwx.com/washtenaw-county-emergency-broadcasters/">local emergency broadcasters</a> for reliable and accurate updates. - - <script type="text/javascript"> - var _gauges = _gauges || []; - (function() { - var t = document.createElement('script'); - t.type = 'text/javascript'; - t.async = true; - t.id = 'gauges-tracker'; - t.setAttribute('data-site-id', '561d558592c6ac04c90055de'); - t.setAttribute('data-track-path', 'https://track.gaug.es/track.gif'); - t.src = 'https://track.gaug.es/track.js'; - var s = document.getElementsByTagName('script')[0]; - s.parentNode.insertBefore(t, s); - })(); - </script> <?php } add_filter( 'twentyfifteen_credits', 'footer_customizerrr' );
15
0.535714
0
15
5a695d9e91ba8783e6fe9cbe48ed7544f6642a94
lib/lint_css.js
lib/lint_css.js
var _ = require('lodash'); var stylelint = require('stylelint'); var STYLELINT_CONFIG = require('./config/stylelint'); var glob = require('glob'); var ruleUtils = require('./rule_utils'); var customRules = {}; var runLinter = function(contents, file, context) { var customRules = context.customRules || {}; _.merge(stylelint.rules, customRules); var config = context.lintConfig; var configs = [{}, STYLELINT_CONFIG]; if (_.isObject(config)) { configs.push(config); } config = _.merge.apply(_, configs); return stylelint.lint( { code: contents, codeFileName: file, config: config, formatter: 'json', syntax: 'scss' } ); }; var globOptions = { cwd: __dirname }; module.exports = function(contents, file, context) { context.customRules = customRules; glob.sync( './lint_css_rules/*.js', globOptions ).forEach( function(item, index) { var id = ruleUtils.getRuleId(item); customRules[id] = require(item); } ); return runLinter(contents, file, context); }; module.exports.stylelint = stylelint; module.exports.linter = stylelint.linter; module.exports.runLinter = runLinter;
var _ = require('lodash'); var path = require('path'); var stylelint = require('stylelint'); var STYLELINT_CONFIG = require('./config/stylelint'); var glob = require('glob'); var ruleUtils = require('./rule_utils'); var customRules = {}; var runLinter = function(contents, file, context) { var customRules = context.customRules || {}; _.merge(stylelint.rules, customRules); var config = context.lintConfig; var configs = [{}, STYLELINT_CONFIG]; if (_.isObject(config)) { configs.push(config); } config = _.merge.apply(_, configs); return stylelint.lint( { code: contents, codeFileName: file, config: config, configBasedir: path.resolve(__dirname, '..'), formatter: 'json', syntax: 'scss' } ); }; var globOptions = { cwd: __dirname }; module.exports = function(contents, file, context) { context.customRules = customRules; glob.sync( './lint_css_rules/*.js', globOptions ).forEach( function(item, index) { var id = ruleUtils.getRuleId(item); customRules[id] = require(item); } ); return runLinter(contents, file, context); }; module.exports.stylelint = stylelint; module.exports.linter = stylelint.linter; module.exports.runLinter = runLinter;
Add configBasedir to properly look up the plugins
Add configBasedir to properly look up the plugins
JavaScript
mit
natecavanaugh/check-source-formatting,natecavanaugh/check-source-formatting,natecavanaugh/check-source-formatting
javascript
## Code Before: var _ = require('lodash'); var stylelint = require('stylelint'); var STYLELINT_CONFIG = require('./config/stylelint'); var glob = require('glob'); var ruleUtils = require('./rule_utils'); var customRules = {}; var runLinter = function(contents, file, context) { var customRules = context.customRules || {}; _.merge(stylelint.rules, customRules); var config = context.lintConfig; var configs = [{}, STYLELINT_CONFIG]; if (_.isObject(config)) { configs.push(config); } config = _.merge.apply(_, configs); return stylelint.lint( { code: contents, codeFileName: file, config: config, formatter: 'json', syntax: 'scss' } ); }; var globOptions = { cwd: __dirname }; module.exports = function(contents, file, context) { context.customRules = customRules; glob.sync( './lint_css_rules/*.js', globOptions ).forEach( function(item, index) { var id = ruleUtils.getRuleId(item); customRules[id] = require(item); } ); return runLinter(contents, file, context); }; module.exports.stylelint = stylelint; module.exports.linter = stylelint.linter; module.exports.runLinter = runLinter; ## Instruction: Add configBasedir to properly look up the plugins ## Code After: var _ = require('lodash'); var path = require('path'); var stylelint = require('stylelint'); var STYLELINT_CONFIG = require('./config/stylelint'); var glob = require('glob'); var ruleUtils = require('./rule_utils'); var customRules = {}; var runLinter = function(contents, file, context) { var customRules = context.customRules || {}; _.merge(stylelint.rules, customRules); var config = context.lintConfig; var configs = [{}, STYLELINT_CONFIG]; if (_.isObject(config)) { configs.push(config); } config = _.merge.apply(_, configs); return stylelint.lint( { code: contents, codeFileName: file, config: config, configBasedir: path.resolve(__dirname, '..'), formatter: 'json', syntax: 'scss' } ); }; var globOptions = { cwd: __dirname }; module.exports = function(contents, file, context) { context.customRules = customRules; glob.sync( './lint_css_rules/*.js', globOptions ).forEach( function(item, index) { var id = ruleUtils.getRuleId(item); customRules[id] = require(item); } ); return runLinter(contents, file, context); }; module.exports.stylelint = stylelint; module.exports.linter = stylelint.linter; module.exports.runLinter = runLinter;
var _ = require('lodash'); + var path = require('path'); var stylelint = require('stylelint'); var STYLELINT_CONFIG = require('./config/stylelint'); var glob = require('glob'); var ruleUtils = require('./rule_utils'); var customRules = {}; var runLinter = function(contents, file, context) { var customRules = context.customRules || {}; _.merge(stylelint.rules, customRules); var config = context.lintConfig; var configs = [{}, STYLELINT_CONFIG]; if (_.isObject(config)) { configs.push(config); } config = _.merge.apply(_, configs); return stylelint.lint( { code: contents, codeFileName: file, config: config, + configBasedir: path.resolve(__dirname, '..'), formatter: 'json', syntax: 'scss' } ); }; var globOptions = { cwd: __dirname }; module.exports = function(contents, file, context) { context.customRules = customRules; glob.sync( './lint_css_rules/*.js', globOptions ).forEach( function(item, index) { var id = ruleUtils.getRuleId(item); customRules[id] = require(item); } ); return runLinter(contents, file, context); }; module.exports.stylelint = stylelint; module.exports.linter = stylelint.linter; module.exports.runLinter = runLinter;
2
0.033898
2
0
7ee2e56b1b52af97dc191df7ac7d0d4b023851ff
migrations/20160511210549_initial.js
migrations/20160511210549_initial.js
exports.up = function(knex, Promise) { return knex.schema.createTable('course', function(table) { table.increments('id').primary(); table.string('name'); table.string('code'); }); }; exports.down = function(knex, Promise) { return knex.schema.dropTable('course'); };
// Migrations define the database schema so you can easily // create tables and modify the schema of your database. // See: http://knexjs.org/#Migrations // You can create a migration file template (like this one) with: // $ knex migrate:make migration_name // The up function migrates the database forward, // applying our change to the database schema. // In this migration, we create a table named 'course' with // the columns 'id', 'name', and 'code'. 'id' is an // autoincrementing column, so it will get filled in // automatically whenever a new row is created. exports.up = function(knex, Promise) { return knex.schema.createTable('course', function(table) { table.increments('id').primary(); table.string('name'); table.string('code'); }); }; // The down function specifies the steps to roll back the migration. // In the up function, we created the 'course' table, so in // the down function, we drop the 'course' table. exports.down = function(knex, Promise) { return knex.schema.dropTable('course'); };
Add comments to the initial migration.
Add comments to the initial migration.
JavaScript
mit
danasilver/middleendian-workshop-demo
javascript
## Code Before: exports.up = function(knex, Promise) { return knex.schema.createTable('course', function(table) { table.increments('id').primary(); table.string('name'); table.string('code'); }); }; exports.down = function(knex, Promise) { return knex.schema.dropTable('course'); }; ## Instruction: Add comments to the initial migration. ## Code After: // Migrations define the database schema so you can easily // create tables and modify the schema of your database. // See: http://knexjs.org/#Migrations // You can create a migration file template (like this one) with: // $ knex migrate:make migration_name // The up function migrates the database forward, // applying our change to the database schema. // In this migration, we create a table named 'course' with // the columns 'id', 'name', and 'code'. 'id' is an // autoincrementing column, so it will get filled in // automatically whenever a new row is created. exports.up = function(knex, Promise) { return knex.schema.createTable('course', function(table) { table.increments('id').primary(); table.string('name'); table.string('code'); }); }; // The down function specifies the steps to roll back the migration. // In the up function, we created the 'course' table, so in // the down function, we drop the 'course' table. exports.down = function(knex, Promise) { return knex.schema.dropTable('course'); };
+ // Migrations define the database schema so you can easily + // create tables and modify the schema of your database. + // See: http://knexjs.org/#Migrations + // You can create a migration file template (like this one) with: + // $ knex migrate:make migration_name + + // The up function migrates the database forward, + // applying our change to the database schema. + // In this migration, we create a table named 'course' with + // the columns 'id', 'name', and 'code'. 'id' is an + // autoincrementing column, so it will get filled in + // automatically whenever a new row is created. exports.up = function(knex, Promise) { return knex.schema.createTable('course', function(table) { table.increments('id').primary(); table.string('name'); table.string('code'); }); }; + // The down function specifies the steps to roll back the migration. + // In the up function, we created the 'course' table, so in + // the down function, we drop the 'course' table. exports.down = function(knex, Promise) { return knex.schema.dropTable('course'); };
15
1.25
15
0
0694b75256965a71d7bc443583d91149a447468b
app/src/js/modules/buic/select.js
app/src/js/modules/buic/select.js
/** * Handling of BUIC selects. * * @mixin * @namespace Bolt.buic.select * * @param {Object} bolt - The Bolt module. * @param {Object} $ - jQuery. */ (function (bolt, $) { /** * Bolt.buic.select mixin container. * * @private * @type {Object} */ var select = {}; /** * Bind BUIC selects. * * @static * @function init * @memberof Bolt.buic.select * * @param {Object} buic */ select.init = function (buic) { }; // Apply mixin container bolt.buic.select = select; })(Bolt || {}, jQuery);
/** * Handling of BUIC selects. * * @mixin * @namespace Bolt.buic.select * * @param {Object} bolt - The Bolt module. * @param {Object} $ - jQuery. */ (function (bolt, $) { /** * Bolt.buic.select mixin container. * * @private * @type {Object} */ var select = {}; /** * Bind BUIC selects. * * @static * @function init * @memberof Bolt.buic.select * * @param {Object} buic */ select.init = function (buic) { var select = $(buic).find('select'), buttonAll = $(buic).find('.select-all'), buttonNone = $(buic).find('.select-none'); // Initialize the select-all button. buttonAll.prop('title', buttonAll.text().trim()); buttonAll.on('click', function () { select.find('option').prop('selected', true).trigger('change'); this.blur(); }); // Initialize the select-none button. buttonNone.prop('title', buttonNone.text().trim()); buttonNone.on('click', function () { select.val(null).trigger('change'); this.blur(); }); }; // Apply mixin container bolt.buic.select = select; })(Bolt || {}, jQuery);
Handle slect all and clear buttuns on buic side
Handle slect all and clear buttuns on buic side
JavaScript
mit
Intendit/bolt,tekjava/bolt,pygillier/bolt,kendoctor/bolt,Calinou/bolt,Raistlfiren/bolt,Eiskis/bolt-base,marcin-piela/bolt,nantunes/bolt,CarsonF/bolt,romulo1984/bolt,bolt/bolt,Raistlfiren/bolt,GawainLynch/bolt,Raistlfiren/bolt,lenvanessen/bolt,pygillier/bolt,Calinou/bolt,nikgo/bolt,hugin2005/bolt,rossriley/bolt,bolt/bolt,rarila/bolt,HonzaMikula/masivnipostele,kendoctor/bolt,Intendit/bolt,marcin-piela/bolt,electrolinux/bolt,one988/cm,codesman/bolt,richardhinkamp/bolt,richardhinkamp/bolt,electrolinux/bolt,GawainLynch/bolt,tekjava/bolt,tekjava/bolt,bolt/bolt,richardhinkamp/bolt,rarila/bolt,HonzaMikula/masivnipostele,nantunes/bolt,GawainLynch/bolt,Intendit/bolt,one988/cm,nikgo/bolt,tekjava/bolt,electrolinux/bolt,lenvanessen/bolt,cdowdy/bolt,kendoctor/bolt,richardhinkamp/bolt,codesman/bolt,Raistlfiren/bolt,winiceo/bolt,xeddmc/bolt,winiceo/bolt,rossriley/bolt,xeddmc/bolt,nantunes/bolt,Eiskis/bolt-base,GawainLynch/bolt,hannesl/bolt,joshuan/bolt,lenvanessen/bolt,bolt/bolt,romulo1984/bolt,joshuan/bolt,one988/cm,nikgo/bolt,winiceo/bolt,hugin2005/bolt,cdowdy/bolt,electrolinux/bolt,cdowdy/bolt,hannesl/bolt,Calinou/bolt,one988/cm,xeddmc/bolt,hannesl/bolt,Eiskis/bolt-base,Intendit/bolt,nikgo/bolt,kendoctor/bolt,hannesl/bolt,romulo1984/bolt,marcin-piela/bolt,joshuan/bolt,Eiskis/bolt-base,codesman/bolt,CarsonF/bolt,hugin2005/bolt,Calinou/bolt,rossriley/bolt,CarsonF/bolt,codesman/bolt,rarila/bolt,cdowdy/bolt,nantunes/bolt,joshuan/bolt,winiceo/bolt,xeddmc/bolt,hugin2005/bolt,HonzaMikula/masivnipostele,pygillier/bolt,romulo1984/bolt,lenvanessen/bolt,rarila/bolt,CarsonF/bolt,rossriley/bolt,pygillier/bolt,HonzaMikula/masivnipostele,marcin-piela/bolt
javascript
## Code Before: /** * Handling of BUIC selects. * * @mixin * @namespace Bolt.buic.select * * @param {Object} bolt - The Bolt module. * @param {Object} $ - jQuery. */ (function (bolt, $) { /** * Bolt.buic.select mixin container. * * @private * @type {Object} */ var select = {}; /** * Bind BUIC selects. * * @static * @function init * @memberof Bolt.buic.select * * @param {Object} buic */ select.init = function (buic) { }; // Apply mixin container bolt.buic.select = select; })(Bolt || {}, jQuery); ## Instruction: Handle slect all and clear buttuns on buic side ## Code After: /** * Handling of BUIC selects. * * @mixin * @namespace Bolt.buic.select * * @param {Object} bolt - The Bolt module. * @param {Object} $ - jQuery. */ (function (bolt, $) { /** * Bolt.buic.select mixin container. * * @private * @type {Object} */ var select = {}; /** * Bind BUIC selects. * * @static * @function init * @memberof Bolt.buic.select * * @param {Object} buic */ select.init = function (buic) { var select = $(buic).find('select'), buttonAll = $(buic).find('.select-all'), buttonNone = $(buic).find('.select-none'); // Initialize the select-all button. buttonAll.prop('title', buttonAll.text().trim()); buttonAll.on('click', function () { select.find('option').prop('selected', true).trigger('change'); this.blur(); }); // Initialize the select-none button. buttonNone.prop('title', buttonNone.text().trim()); buttonNone.on('click', function () { select.val(null).trigger('change'); this.blur(); }); }; // Apply mixin container bolt.buic.select = select; })(Bolt || {}, jQuery);
/** * Handling of BUIC selects. * * @mixin * @namespace Bolt.buic.select * * @param {Object} bolt - The Bolt module. * @param {Object} $ - jQuery. */ (function (bolt, $) { /** * Bolt.buic.select mixin container. * * @private * @type {Object} */ var select = {}; /** * Bind BUIC selects. * * @static * @function init * @memberof Bolt.buic.select * * @param {Object} buic */ select.init = function (buic) { + var select = $(buic).find('select'), + buttonAll = $(buic).find('.select-all'), + buttonNone = $(buic).find('.select-none'); + + // Initialize the select-all button. + buttonAll.prop('title', buttonAll.text().trim()); + buttonAll.on('click', function () { + select.find('option').prop('selected', true).trigger('change'); + this.blur(); + }); + + // Initialize the select-none button. + buttonNone.prop('title', buttonNone.text().trim()); + buttonNone.on('click', function () { + select.val(null).trigger('change'); + this.blur(); + }); }; // Apply mixin container bolt.buic.select = select; })(Bolt || {}, jQuery);
17
0.485714
17
0
70c6fd31c77424b37507fa8f385f20b7ffbc20ea
gulpfile.js
gulpfile.js
/** * Created by Chance Snow on 12/7/14. */ var gulp = require('gulp'); var del = require('del'); var path = require('path'); var compass = require('gulp-for-compass'); var ts = require('gulp-typescript'); var tsConfig = require('./tsconfig.json'); var source = tsConfig.filesGlob; var tsProject = ts.createProject('tsconfig.json', { sourceMap: false, noExternalResolve: true }); gulp.task('clean', function (callback) { del(['js/**/*.js', '!js/lib/*.js'], function (error) { if (error) { return callback(error); } callback(); }); }); gulp.task('compass', function () { gulp.src('scss/*.scss') .pipe(compass({ config: 'config/compass.rb', sassDir: 'scss', cssDir: 'css' })); }); gulp.task('watch', ['typescript'], function () { var watcher = gulp.watch(source, ['typescript']); watcher.on('change', function (event) { var filename = path.basename(event.path); console.log(filename + ' was ' + event.type + ', compiling project...'); }); }); gulp.task('build', ['clean']); gulp.task('default', ['watch']);
/** * Created by Chance Snow on 12/7/14. */ var gulp = require('gulp'); var del = require('del'); var path = require('path'); var exec = require('child_process').exec; var compass = require('gulp-for-compass'); var ts = require('gulp-typescript'); var tsConfig = require('./tsconfig.json'); var source = tsConfig.filesGlob; var tsProject = ts.createProject('tsconfig.json', { sourceMap: false, noExternalResolve: true }); gulp.task('clean', function (callback) { del(['js/**/*.js', '!js/lib/*.js'], function (error) { if (error) { return callback(error); } callback(); }); }); gulp.task('compass', function () { gulp.src('scss/*.scss') .pipe(compass({ config: 'config/compass.rb', sassDir: 'scss', cssDir: 'css' })); }); gulp.task('typescript', function (callback) { exec('tsc -p ' + __dirname, function (err, stdout, stderr) { console.log(stdout); callback(); }); }); gulp.task('watch', ['typescript'], function () { var watcher = gulp.watch(source, ['typescript']); watcher.on('change', function (event) { var filename = path.basename(event.path); console.log(filename + ' was ' + event.type + ', compiling project...'); }); }); gulp.task('ts', ['typescript']); gulp.task('build', ['clean', 'typescript']); gulp.task('default', ['watch']);
Update TypeScript task to use tsc command line
Update TypeScript task to use tsc command line
JavaScript
mit
chances/Animatum-Infinitas,chances/Animatum-Infinitas,chances/Animatum-Infinitas
javascript
## Code Before: /** * Created by Chance Snow on 12/7/14. */ var gulp = require('gulp'); var del = require('del'); var path = require('path'); var compass = require('gulp-for-compass'); var ts = require('gulp-typescript'); var tsConfig = require('./tsconfig.json'); var source = tsConfig.filesGlob; var tsProject = ts.createProject('tsconfig.json', { sourceMap: false, noExternalResolve: true }); gulp.task('clean', function (callback) { del(['js/**/*.js', '!js/lib/*.js'], function (error) { if (error) { return callback(error); } callback(); }); }); gulp.task('compass', function () { gulp.src('scss/*.scss') .pipe(compass({ config: 'config/compass.rb', sassDir: 'scss', cssDir: 'css' })); }); gulp.task('watch', ['typescript'], function () { var watcher = gulp.watch(source, ['typescript']); watcher.on('change', function (event) { var filename = path.basename(event.path); console.log(filename + ' was ' + event.type + ', compiling project...'); }); }); gulp.task('build', ['clean']); gulp.task('default', ['watch']); ## Instruction: Update TypeScript task to use tsc command line ## Code After: /** * Created by Chance Snow on 12/7/14. */ var gulp = require('gulp'); var del = require('del'); var path = require('path'); var exec = require('child_process').exec; var compass = require('gulp-for-compass'); var ts = require('gulp-typescript'); var tsConfig = require('./tsconfig.json'); var source = tsConfig.filesGlob; var tsProject = ts.createProject('tsconfig.json', { sourceMap: false, noExternalResolve: true }); gulp.task('clean', function (callback) { del(['js/**/*.js', '!js/lib/*.js'], function (error) { if (error) { return callback(error); } callback(); }); }); gulp.task('compass', function () { gulp.src('scss/*.scss') .pipe(compass({ config: 'config/compass.rb', sassDir: 'scss', cssDir: 'css' })); }); gulp.task('typescript', function (callback) { exec('tsc -p ' + __dirname, function (err, stdout, stderr) { console.log(stdout); callback(); }); }); gulp.task('watch', ['typescript'], function () { var watcher = gulp.watch(source, ['typescript']); watcher.on('change', function (event) { var filename = path.basename(event.path); console.log(filename + ' was ' + event.type + ', compiling project...'); }); }); gulp.task('ts', ['typescript']); gulp.task('build', ['clean', 'typescript']); gulp.task('default', ['watch']);
/** * Created by Chance Snow on 12/7/14. */ var gulp = require('gulp'); var del = require('del'); var path = require('path'); + var exec = require('child_process').exec; var compass = require('gulp-for-compass'); var ts = require('gulp-typescript'); var tsConfig = require('./tsconfig.json'); var source = tsConfig.filesGlob; var tsProject = ts.createProject('tsconfig.json', { sourceMap: false, noExternalResolve: true }); gulp.task('clean', function (callback) { del(['js/**/*.js', '!js/lib/*.js'], function (error) { if (error) { return callback(error); } callback(); }); }); gulp.task('compass', function () { gulp.src('scss/*.scss') .pipe(compass({ config: 'config/compass.rb', sassDir: 'scss', cssDir: 'css' })); }); + gulp.task('typescript', function (callback) { + exec('tsc -p ' + __dirname, function (err, stdout, stderr) { + console.log(stdout); + callback(); + }); + }); + gulp.task('watch', ['typescript'], function () { var watcher = gulp.watch(source, ['typescript']); watcher.on('change', function (event) { var filename = path.basename(event.path); console.log(filename + ' was ' + event.type + ', compiling project...'); }); }); + gulp.task('ts', ['typescript']); - gulp.task('build', ['clean']); + gulp.task('build', ['clean', 'typescript']); ? ++++++++++++++ gulp.task('default', ['watch']);
11
0.23913
10
1
522e8d25fc55768dea4fbcfc35dc1fb63e651e6b
nakadi-java-client/src/main/java/nakadi/StreamOffsetObserver.java
nakadi-java-client/src/main/java/nakadi/StreamOffsetObserver.java
package nakadi; /** * Can be called by the {@link StreamObserver} to indicate a batch has been processed. * * Typically this is used to implement a checkpointer that can store the position of the * client in the stream to track their progress. */ public interface StreamOffsetObserver { /** * Receives a {@link StreamCursorContext} that can be used to checkpoint (or more generally, * observe) progress in the stream. * <p></p> * The default observer for a subscription based {@link StreamProcessor} (one which has been * given a subscription id via {@link StreamConfiguration#subscriptionId} is * {@link SubscriptionOffsetObserver}. This will checkpoint back to the server each time * it's called. This behaviour can be replaced by supplying a different checkpointer via * {@link StreamProcessor.Builder#streamOffsetObserver}. * * @param streamCursorContext the batch's {@link StreamCursorContext}. * * todo: see if we need to declare checked exceptions here to force the observer to handle. */ void onNext(StreamCursorContext streamCursorContext) throws NakadiException; }
package nakadi; /** * Can be called by the {@link StreamObserver} to indicate a batch has been processed. * * Typically this is used to implement a checkpointer that can store the position of the * client in the stream to track their progress. */ public interface StreamOffsetObserver { /** * Receives a {@link StreamCursorContext} that can be used to checkpoint (or more generally, * observe) progress in the stream. * <p></p> * The default observer for a subscription based {@link StreamProcessor} (one which has been * given a subscription id via {@link StreamConfiguration#subscriptionId} is * {@link SubscriptionOffsetObserver}. This will checkpoint back to the server each time * it's called. This behaviour can be replaced by supplying a different checkpointer via * {@link StreamProcessor.Builder#streamOffsetObserver}. * * @param streamCursorContext the batch's {@link StreamCursorContext}. * */ void onNext(StreamCursorContext streamCursorContext) throws NakadiException; }
Remove comment, offset observer will throw runtime exceptions
Remove comment, offset observer will throw runtime exceptions
Java
mit
dehora/nakadi-java
java
## Code Before: package nakadi; /** * Can be called by the {@link StreamObserver} to indicate a batch has been processed. * * Typically this is used to implement a checkpointer that can store the position of the * client in the stream to track their progress. */ public interface StreamOffsetObserver { /** * Receives a {@link StreamCursorContext} that can be used to checkpoint (or more generally, * observe) progress in the stream. * <p></p> * The default observer for a subscription based {@link StreamProcessor} (one which has been * given a subscription id via {@link StreamConfiguration#subscriptionId} is * {@link SubscriptionOffsetObserver}. This will checkpoint back to the server each time * it's called. This behaviour can be replaced by supplying a different checkpointer via * {@link StreamProcessor.Builder#streamOffsetObserver}. * * @param streamCursorContext the batch's {@link StreamCursorContext}. * * todo: see if we need to declare checked exceptions here to force the observer to handle. */ void onNext(StreamCursorContext streamCursorContext) throws NakadiException; } ## Instruction: Remove comment, offset observer will throw runtime exceptions ## Code After: package nakadi; /** * Can be called by the {@link StreamObserver} to indicate a batch has been processed. * * Typically this is used to implement a checkpointer that can store the position of the * client in the stream to track their progress. */ public interface StreamOffsetObserver { /** * Receives a {@link StreamCursorContext} that can be used to checkpoint (or more generally, * observe) progress in the stream. * <p></p> * The default observer for a subscription based {@link StreamProcessor} (one which has been * given a subscription id via {@link StreamConfiguration#subscriptionId} is * {@link SubscriptionOffsetObserver}. This will checkpoint back to the server each time * it's called. This behaviour can be replaced by supplying a different checkpointer via * {@link StreamProcessor.Builder#streamOffsetObserver}. * * @param streamCursorContext the batch's {@link StreamCursorContext}. * */ void onNext(StreamCursorContext streamCursorContext) throws NakadiException; }
package nakadi; /** * Can be called by the {@link StreamObserver} to indicate a batch has been processed. * * Typically this is used to implement a checkpointer that can store the position of the * client in the stream to track their progress. */ public interface StreamOffsetObserver { /** * Receives a {@link StreamCursorContext} that can be used to checkpoint (or more generally, * observe) progress in the stream. * <p></p> * The default observer for a subscription based {@link StreamProcessor} (one which has been * given a subscription id via {@link StreamConfiguration#subscriptionId} is * {@link SubscriptionOffsetObserver}. This will checkpoint back to the server each time * it's called. This behaviour can be replaced by supplying a different checkpointer via * {@link StreamProcessor.Builder#streamOffsetObserver}. * * @param streamCursorContext the batch's {@link StreamCursorContext}. * - * todo: see if we need to declare checked exceptions here to force the observer to handle. */ void onNext(StreamCursorContext streamCursorContext) throws NakadiException; }
1
0.038462
0
1
7e80549b8587e1c1c53898188da34b2362484e68
.travis.yml
.travis.yml
language: python python: - 2.7 - 3.3 - 3.4 - 3.5 install: - pip install coveralls - python setup.py install script: # Unit testing. - coverage run --source=csv2sql setup.py test # Integrated testing. - coverage run csv2sql all -r table_name < data/test-input.csv - coverage run csv2sql schema -r table_name < data/test-input.csv - coverage run csv2sql data table_name < data/test-input.csv - coverage run csv2sql pattern after_success: - coveralls notifications: - email: false
language: python python: - 2.7 - 3.3 - 3.4 - 3.5 install: - pip install coveralls - python setup.py install script: # Unit testing. - coverage run --source=csv2sql setup.py test # Integrated testing. - coverage run --source=csv2sql csv2sql all -r table_name < data/test-input.csv - coverage run --source=csv2sql csv2sql schema -r table_name < data/test-input.csv - coverage run --source=csv2sql csv2sql data table_name < data/test-input.csv - coverage run --source=csv2sql csv2sql pattern after_success: - coveralls notifications: - email: false
Fix bugs on coverage measurement.
Fix bugs on coverage measurement.
YAML
mit
ymoch/csv2sql,ymoch/csv2sql
yaml
## Code Before: language: python python: - 2.7 - 3.3 - 3.4 - 3.5 install: - pip install coveralls - python setup.py install script: # Unit testing. - coverage run --source=csv2sql setup.py test # Integrated testing. - coverage run csv2sql all -r table_name < data/test-input.csv - coverage run csv2sql schema -r table_name < data/test-input.csv - coverage run csv2sql data table_name < data/test-input.csv - coverage run csv2sql pattern after_success: - coveralls notifications: - email: false ## Instruction: Fix bugs on coverage measurement. ## Code After: language: python python: - 2.7 - 3.3 - 3.4 - 3.5 install: - pip install coveralls - python setup.py install script: # Unit testing. - coverage run --source=csv2sql setup.py test # Integrated testing. - coverage run --source=csv2sql csv2sql all -r table_name < data/test-input.csv - coverage run --source=csv2sql csv2sql schema -r table_name < data/test-input.csv - coverage run --source=csv2sql csv2sql data table_name < data/test-input.csv - coverage run --source=csv2sql csv2sql pattern after_success: - coveralls notifications: - email: false
language: python python: - 2.7 - 3.3 - 3.4 - 3.5 install: - pip install coveralls - python setup.py install script: # Unit testing. - coverage run --source=csv2sql setup.py test # Integrated testing. - - coverage run csv2sql all -r table_name < data/test-input.csv + - coverage run --source=csv2sql csv2sql all -r table_name < data/test-input.csv ? +++++++++++++++++ - - coverage run csv2sql schema -r table_name < data/test-input.csv + - coverage run --source=csv2sql csv2sql schema -r table_name < data/test-input.csv ? +++++++++++++++++ - - coverage run csv2sql data table_name < data/test-input.csv + - coverage run --source=csv2sql csv2sql data table_name < data/test-input.csv ? +++++++++++++++++ - - coverage run csv2sql pattern + - coverage run --source=csv2sql csv2sql pattern ? +++++++++++++++++ after_success: - coveralls notifications: - email: false
8
0.380952
4
4
34b132f9cbbbc5e9df51f33e50f21c3929a960f1
bin/run_sanitizers.sh
bin/run_sanitizers.sh
set -e main() { # Check the number of arguments. If the user supplies an argument, assume # they want to run a single sanitiser. if [[ $# -eq 0 ]]; then for sanitizer in address memory; do RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly run \ --manifest-path fitsio/Cargo.toml \ --example full_example \ --target x86_64-unknown-linux-gnu || true done elif [[ $# -eq 1 ]]; then sanitizer=$1 RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly run \ --manifest-path fitsio/Cargo.toml \ --example full_example \ --target x86_64-unknown-linux-gnu else echo "Program usage: $0 [sanitiser]" >&2 return 1 fi } main "$@"
set -e main() { # Assume we are in a subdirectory of `fitsio` and move upwards while [ ! -f fitsio/Cargo.toml ]; do if [[ $PWD = "/" ]]; then # Top of the file system echo "Cannot find fitsio dir" >&2 exit 1 fi cd .. done # Check the number of arguments. If the user supplies an argument, assume # they want to run a single sanitiser. if [[ $# -eq 0 ]]; then for sanitizer in address memory; do RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly run \ --manifest-path fitsio/Cargo.toml \ --example full_example \ --target x86_64-unknown-linux-gnu || true done elif [[ $# -eq 1 ]]; then sanitizer=$1 RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly run \ --manifest-path fitsio/Cargo.toml \ --example full_example \ --target x86_64-unknown-linux-gnu else echo "Program usage: $0 [sanitiser]" >&2 return 1 fi } main "$@"
Check that we are running the sanitizers from the correct directory
Check that we are running the sanitizers from the correct directory
Shell
apache-2.0
mindriot101/rust-cfitsio,mindriot101/rust-fitsio,mindriot101/rust-fitsio,mindriot101/rust-fitsio,mindriot101/rust-cfitsio,mindriot101/rust-fitsio,mindriot101/rust-fitsio
shell
## Code Before: set -e main() { # Check the number of arguments. If the user supplies an argument, assume # they want to run a single sanitiser. if [[ $# -eq 0 ]]; then for sanitizer in address memory; do RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly run \ --manifest-path fitsio/Cargo.toml \ --example full_example \ --target x86_64-unknown-linux-gnu || true done elif [[ $# -eq 1 ]]; then sanitizer=$1 RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly run \ --manifest-path fitsio/Cargo.toml \ --example full_example \ --target x86_64-unknown-linux-gnu else echo "Program usage: $0 [sanitiser]" >&2 return 1 fi } main "$@" ## Instruction: Check that we are running the sanitizers from the correct directory ## Code After: set -e main() { # Assume we are in a subdirectory of `fitsio` and move upwards while [ ! -f fitsio/Cargo.toml ]; do if [[ $PWD = "/" ]]; then # Top of the file system echo "Cannot find fitsio dir" >&2 exit 1 fi cd .. done # Check the number of arguments. If the user supplies an argument, assume # they want to run a single sanitiser. if [[ $# -eq 0 ]]; then for sanitizer in address memory; do RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly run \ --manifest-path fitsio/Cargo.toml \ --example full_example \ --target x86_64-unknown-linux-gnu || true done elif [[ $# -eq 1 ]]; then sanitizer=$1 RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly run \ --manifest-path fitsio/Cargo.toml \ --example full_example \ --target x86_64-unknown-linux-gnu else echo "Program usage: $0 [sanitiser]" >&2 return 1 fi } main "$@"
set -e main() { + + # Assume we are in a subdirectory of `fitsio` and move upwards + while [ ! -f fitsio/Cargo.toml ]; do + if [[ $PWD = "/" ]]; then + # Top of the file system + echo "Cannot find fitsio dir" >&2 + exit 1 + fi + + cd .. + done # Check the number of arguments. If the user supplies an argument, assume # they want to run a single sanitiser. if [[ $# -eq 0 ]]; then for sanitizer in address memory; do RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly run \ --manifest-path fitsio/Cargo.toml \ --example full_example \ --target x86_64-unknown-linux-gnu || true done elif [[ $# -eq 1 ]]; then sanitizer=$1 RUSTFLAGS="-Z sanitizer=$sanitizer" cargo +nightly run \ --manifest-path fitsio/Cargo.toml \ --example full_example \ --target x86_64-unknown-linux-gnu else echo "Program usage: $0 [sanitiser]" >&2 return 1 fi } main "$@"
11
0.407407
11
0
ceed67d1e3dbe831d5301406d15eec583d85825f
blueplayer/__main__.py
blueplayer/__main__.py
import sys import serial from blueplayer import blueplayer def main(args): # first argument should be a serial terminal to open if not len(args): port = "/dev/ttyAMA0" else: port = args[0] player = None with serial.Serial(port) as serial_port: try: player = blueplayer.BluePlayer(serial_port) player.start() except KeyboardInterrupt as ex: print("\nBluePlayer cancelled by user") except Exception as ex: print("How embarrassing. The following error occurred {}".format(ex)) finally: if player: player.end() player.stop() if __name__ == "__main__": main(sys.argv[1:])
import sys import serial from blueplayer import blueplayer def main(): args = sys.argv[1:] # first argument should be a serial terminal to open if not len(args): port = "/dev/ttyAMA0" else: port = args[0] player = None with serial.Serial(port) as serial_port: try: player = blueplayer.BluePlayer(serial_port) player.start() except KeyboardInterrupt as ex: print("\nBluePlayer cancelled by user") except Exception as ex: print("How embarrassing. The following error occurred {}".format(ex)) finally: if player: player.end() player.stop() if __name__ == "__main__": main()
Fix args in entry point
Fix args in entry point
Python
mit
dylwhich/rpi-ipod-emulator
python
## Code Before: import sys import serial from blueplayer import blueplayer def main(args): # first argument should be a serial terminal to open if not len(args): port = "/dev/ttyAMA0" else: port = args[0] player = None with serial.Serial(port) as serial_port: try: player = blueplayer.BluePlayer(serial_port) player.start() except KeyboardInterrupt as ex: print("\nBluePlayer cancelled by user") except Exception as ex: print("How embarrassing. The following error occurred {}".format(ex)) finally: if player: player.end() player.stop() if __name__ == "__main__": main(sys.argv[1:]) ## Instruction: Fix args in entry point ## Code After: import sys import serial from blueplayer import blueplayer def main(): args = sys.argv[1:] # first argument should be a serial terminal to open if not len(args): port = "/dev/ttyAMA0" else: port = args[0] player = None with serial.Serial(port) as serial_port: try: player = blueplayer.BluePlayer(serial_port) player.start() except KeyboardInterrupt as ex: print("\nBluePlayer cancelled by user") except Exception as ex: print("How embarrassing. The following error occurred {}".format(ex)) finally: if player: player.end() player.stop() if __name__ == "__main__": main()
import sys import serial from blueplayer import blueplayer - def main(args): ? ---- + def main(): + args = sys.argv[1:] # first argument should be a serial terminal to open if not len(args): port = "/dev/ttyAMA0" else: port = args[0] player = None with serial.Serial(port) as serial_port: try: player = blueplayer.BluePlayer(serial_port) player.start() except KeyboardInterrupt as ex: print("\nBluePlayer cancelled by user") except Exception as ex: print("How embarrassing. The following error occurred {}".format(ex)) finally: if player: player.end() player.stop() if __name__ == "__main__": - main(sys.argv[1:]) + main()
5
0.172414
3
2
cfc95643733244275e605a8ff0c00d4861067a13
character_shift/character_shift.py
character_shift/character_shift.py
def shift(string, key, decipher=False): return ''.join( chr((ord(c.upper())-65+key*(1-2*decipher)) % 26+65+32*c.islower()) if c.isalpha() else c for c in string) if __name__ == '__main__': assert shift('abcz+', 1) == 'bcda+', shift('abcz+', 1) assert shift('ABCZ+', 1) == 'BCDA+', shift('ABCZ+', 1) assert shift('bcda+', 1, True) == 'abcz+', shift('bcda+', 1, True)
def shift(string, key, decipher=False): return ''.join( chr((ord(c) & 224)+((ord(c) & 31)+25+key*(-2*decipher+1)*c.isalpha()) % 26+1) for c in string) if __name__ == '__main__': assert shift('abcz+', 1) == 'bcda+', shift('abcz+', 1) assert shift('ABCZ+', 1) == 'BCDA+', shift('ABCZ+', 1) assert shift('bcda+', 1, True) == 'abcz+', shift('bcda+', 1, True)
Use bitwise operators on ordinals to reduce code size
Use bitwise operators on ordinals to reduce code size The ASCII standard neatly organizes the characters in such a way that it is easy to manipulate and classify them using bitwise operators.
Python
mit
TotempaaltJ/tiniest-code,TotempaaltJ/tiniest-code
python
## Code Before: def shift(string, key, decipher=False): return ''.join( chr((ord(c.upper())-65+key*(1-2*decipher)) % 26+65+32*c.islower()) if c.isalpha() else c for c in string) if __name__ == '__main__': assert shift('abcz+', 1) == 'bcda+', shift('abcz+', 1) assert shift('ABCZ+', 1) == 'BCDA+', shift('ABCZ+', 1) assert shift('bcda+', 1, True) == 'abcz+', shift('bcda+', 1, True) ## Instruction: Use bitwise operators on ordinals to reduce code size The ASCII standard neatly organizes the characters in such a way that it is easy to manipulate and classify them using bitwise operators. ## Code After: def shift(string, key, decipher=False): return ''.join( chr((ord(c) & 224)+((ord(c) & 31)+25+key*(-2*decipher+1)*c.isalpha()) % 26+1) for c in string) if __name__ == '__main__': assert shift('abcz+', 1) == 'bcda+', shift('abcz+', 1) assert shift('ABCZ+', 1) == 'BCDA+', shift('ABCZ+', 1) assert shift('bcda+', 1, True) == 'abcz+', shift('bcda+', 1, True)
def shift(string, key, decipher=False): return ''.join( - chr((ord(c.upper())-65+key*(1-2*decipher)) % 26+65+32*c.islower()) - if c.isalpha() else c for c in string) + chr((ord(c) & 224)+((ord(c) & 31)+25+key*(-2*decipher+1)*c.isalpha()) + % 26+1) for c in string) if __name__ == '__main__': assert shift('abcz+', 1) == 'bcda+', shift('abcz+', 1) assert shift('ABCZ+', 1) == 'BCDA+', shift('ABCZ+', 1) assert shift('bcda+', 1, True) == 'abcz+', shift('bcda+', 1, True)
4
0.444444
2
2
9199baec3a372a43e27f159b58556d55af20eaaf
src/main/scala/predictor/PredictorProvider.scala
src/main/scala/predictor/PredictorProvider.scala
package predictor import java.io.File import git._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.sys.process._ /** * A provider implementation for the predictor. */ class PredictorProvider extends Provider { if (!PredictorSettings.validate) throw new IllegalArgumentException("Invalid predictor configuration.") private var _owner: String = _ private var _repository: String = _ def owner = _owner def repository = _repository def modelDirectory = new File(new File(PredictorSettings.directory, owner), repository).getPath override def getTotalDecorator(list: TotalList): TotalList = new PredictorTotalDecorator(list, this) override def init(provider: Provider): Future[Unit] = { if (provider != null && provider.pullRequestProvider.orNull != null) { _owner = provider.pullRequestProvider.get.owner _repository = provider.pullRequestProvider.get.repository } // Make sure the model is trained train map { _ => } } def train = Future(parseCommand("train").! == 0) def predict = Future(parseCommand("predict").! == 0) private def parseCommand(action: String) = PredictorSettings.command .replace("$action", action) .replace("$owner", owner) .replace("$repository", repository) }
package predictor import java.io.File import git._ import utils.Extensions._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.sys.process._ /** * A provider implementation for the predictor. */ class PredictorProvider extends Provider { if (!PredictorSettings.validate) throw new IllegalArgumentException("Invalid predictor configuration.") private var _owner: String = _ private var _repository: String = _ def owner = _owner def repository = _repository def modelDirectory = { val ownerDir = owner.toLowerCase.safeFileName val repoDir = repository.toLowerCase.safeFileName new File(new File(PredictorSettings.directory, ownerDir), repoDir).getPath } override def getTotalDecorator(list: TotalList): TotalList = new PredictorTotalDecorator(list, this) override def init(provider: Provider): Future[Unit] = { if (provider != null && provider.pullRequestProvider.orNull != null) { _owner = provider.pullRequestProvider.get.owner _repository = provider.pullRequestProvider.get.repository } // Make sure the model is trained train map { _ => } } def train = Future(parseCommand("train").! == 0) def predict = Future(parseCommand("predict").! == 0) private def parseCommand(action: String) = PredictorSettings.command .replace("$action", action) .replace("$owner", owner) .replace("$repository", repository) }
Write prediction to lowercase directory structure
Write prediction to lowercase directory structure
Scala
mit
PRioritizer/PRioritizer-analyzer
scala
## Code Before: package predictor import java.io.File import git._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.sys.process._ /** * A provider implementation for the predictor. */ class PredictorProvider extends Provider { if (!PredictorSettings.validate) throw new IllegalArgumentException("Invalid predictor configuration.") private var _owner: String = _ private var _repository: String = _ def owner = _owner def repository = _repository def modelDirectory = new File(new File(PredictorSettings.directory, owner), repository).getPath override def getTotalDecorator(list: TotalList): TotalList = new PredictorTotalDecorator(list, this) override def init(provider: Provider): Future[Unit] = { if (provider != null && provider.pullRequestProvider.orNull != null) { _owner = provider.pullRequestProvider.get.owner _repository = provider.pullRequestProvider.get.repository } // Make sure the model is trained train map { _ => } } def train = Future(parseCommand("train").! == 0) def predict = Future(parseCommand("predict").! == 0) private def parseCommand(action: String) = PredictorSettings.command .replace("$action", action) .replace("$owner", owner) .replace("$repository", repository) } ## Instruction: Write prediction to lowercase directory structure ## Code After: package predictor import java.io.File import git._ import utils.Extensions._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.sys.process._ /** * A provider implementation for the predictor. */ class PredictorProvider extends Provider { if (!PredictorSettings.validate) throw new IllegalArgumentException("Invalid predictor configuration.") private var _owner: String = _ private var _repository: String = _ def owner = _owner def repository = _repository def modelDirectory = { val ownerDir = owner.toLowerCase.safeFileName val repoDir = repository.toLowerCase.safeFileName new File(new File(PredictorSettings.directory, ownerDir), repoDir).getPath } override def getTotalDecorator(list: TotalList): TotalList = new PredictorTotalDecorator(list, this) override def init(provider: Provider): Future[Unit] = { if (provider != null && provider.pullRequestProvider.orNull != null) { _owner = provider.pullRequestProvider.get.owner _repository = provider.pullRequestProvider.get.repository } // Make sure the model is trained train map { _ => } } def train = Future(parseCommand("train").! == 0) def predict = Future(parseCommand("predict").! == 0) private def parseCommand(action: String) = PredictorSettings.command .replace("$action", action) .replace("$owner", owner) .replace("$repository", repository) }
package predictor import java.io.File import git._ + import utils.Extensions._ import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent.Future import scala.sys.process._ /** * A provider implementation for the predictor. */ class PredictorProvider extends Provider { if (!PredictorSettings.validate) throw new IllegalArgumentException("Invalid predictor configuration.") private var _owner: String = _ private var _repository: String = _ def owner = _owner def repository = _repository + def modelDirectory = { + val ownerDir = owner.toLowerCase.safeFileName + val repoDir = repository.toLowerCase.safeFileName - def modelDirectory = new File(new File(PredictorSettings.directory, owner), repository).getPath ? --- ---------------- ^ -- - + new File(new File(PredictorSettings.directory, ownerDir), repoDir).getPath ? +++ ^ + } override def getTotalDecorator(list: TotalList): TotalList = new PredictorTotalDecorator(list, this) override def init(provider: Provider): Future[Unit] = { if (provider != null && provider.pullRequestProvider.orNull != null) { _owner = provider.pullRequestProvider.get.owner _repository = provider.pullRequestProvider.get.repository } // Make sure the model is trained train map { _ => } } def train = Future(parseCommand("train").! == 0) def predict = Future(parseCommand("predict").! == 0) private def parseCommand(action: String) = PredictorSettings.command .replace("$action", action) .replace("$owner", owner) .replace("$repository", repository) }
7
0.152174
6
1
e64ce61a4f4590e20b8cee43e2631fb948bfdc92
README.md
README.md
Allows to parse Java byte code to find invocations of method/class/field signatures and fail build (Apache Ant or Apache Maven). See also: http://blog.thetaphi.de/2012/07/default-locales-default-charsets-and.html Project homepage: https://github.com/policeman-tools/forbidden-apis The checker is available as Apache Ant Task or as Apache Maven Mojo. For documentation refer to the folowing web pages: * [Apache Ant](https://github.com/policeman-tools/forbidden-apis/wiki/AntUsage) * [Apache Maven](https://github.com/policeman-tools/forbidden-apis/wiki/MavenUsage) * [Command Line](https://github.com/policeman-tools/forbidden-apis/wiki/CliUsage) This project uses Apache Ant (and Apache Ivy) to build. The minimum Ant version is 1.8.0 and it is recommended to not have Apache Ivy in the Ant lib folder, because the build script will download the correct version of Ant automatically.
Allows to parse Java byte code to find invocations of method/class/field signatures and fail build (Apache Ant or Apache Maven). See also: * [Blog Post](http://blog.thetaphi.de/2012/07/default-locales-default-charsets-and.html) * [Project Homepage](https://github.com/policeman-tools/forbidden-apis) The checker is available as Apache Ant Task or as Apache Maven Mojo. For documentation refer to the [Wiki & Documentation](https://github.com/policeman-tools/forbidden-apis/wiki): * [Apache Ant](https://github.com/policeman-tools/forbidden-apis/wiki/AntUsage) * [Apache Maven](https://github.com/policeman-tools/forbidden-apis/wiki/MavenUsage) * [Command Line](https://github.com/policeman-tools/forbidden-apis/wiki/CliUsage) This project uses Apache Ant (and Apache Ivy) to build. The minimum Ant version is 1.8.0 and it is recommended to not have Apache Ivy in the Ant lib folder, because the build script will download the correct version of Ant automatically.
Reformat documentation with markdown links
Reformat documentation with markdown links
Markdown
apache-2.0
pickypg/forbidden-apis,thomasdarimont/forbidden-apis,pickypg/forbidden-apis,policeman-tools/forbidden-apis,thomasdarimont/forbidden-apis,policeman-tools/forbidden-apis,dweiss/forbidden-apis,dweiss/forbidden-apis
markdown
## Code Before: Allows to parse Java byte code to find invocations of method/class/field signatures and fail build (Apache Ant or Apache Maven). See also: http://blog.thetaphi.de/2012/07/default-locales-default-charsets-and.html Project homepage: https://github.com/policeman-tools/forbidden-apis The checker is available as Apache Ant Task or as Apache Maven Mojo. For documentation refer to the folowing web pages: * [Apache Ant](https://github.com/policeman-tools/forbidden-apis/wiki/AntUsage) * [Apache Maven](https://github.com/policeman-tools/forbidden-apis/wiki/MavenUsage) * [Command Line](https://github.com/policeman-tools/forbidden-apis/wiki/CliUsage) This project uses Apache Ant (and Apache Ivy) to build. The minimum Ant version is 1.8.0 and it is recommended to not have Apache Ivy in the Ant lib folder, because the build script will download the correct version of Ant automatically. ## Instruction: Reformat documentation with markdown links ## Code After: Allows to parse Java byte code to find invocations of method/class/field signatures and fail build (Apache Ant or Apache Maven). See also: * [Blog Post](http://blog.thetaphi.de/2012/07/default-locales-default-charsets-and.html) * [Project Homepage](https://github.com/policeman-tools/forbidden-apis) The checker is available as Apache Ant Task or as Apache Maven Mojo. For documentation refer to the [Wiki & Documentation](https://github.com/policeman-tools/forbidden-apis/wiki): * [Apache Ant](https://github.com/policeman-tools/forbidden-apis/wiki/AntUsage) * [Apache Maven](https://github.com/policeman-tools/forbidden-apis/wiki/MavenUsage) * [Command Line](https://github.com/policeman-tools/forbidden-apis/wiki/CliUsage) This project uses Apache Ant (and Apache Ivy) to build. The minimum Ant version is 1.8.0 and it is recommended to not have Apache Ivy in the Ant lib folder, because the build script will download the correct version of Ant automatically.
Allows to parse Java byte code to find invocations of method/class/field signatures and fail build (Apache Ant or Apache Maven). See also: - http://blog.thetaphi.de/2012/07/default-locales-default-charsets-and.html - Project homepage: + * [Blog Post](http://blog.thetaphi.de/2012/07/default-locales-default-charsets-and.html) - https://github.com/policeman-tools/forbidden-apis + * [Project Homepage](https://github.com/policeman-tools/forbidden-apis) ? +++++++++++++++++++++++ + - The checker is available as Apache Ant Task or as Apache Maven Mojo. For + The checker is available as Apache Ant Task or as Apache Maven Mojo. For documentation ? ++++++++++++++ - documentation refer to the folowing web pages: + refer to the [Wiki & Documentation](https://github.com/policeman-tools/forbidden-apis/wiki): * [Apache Ant](https://github.com/policeman-tools/forbidden-apis/wiki/AntUsage) * [Apache Maven](https://github.com/policeman-tools/forbidden-apis/wiki/MavenUsage) * [Command Line](https://github.com/policeman-tools/forbidden-apis/wiki/CliUsage) This project uses Apache Ant (and Apache Ivy) to build. The minimum Ant version is 1.8.0 and it is recommended to not have Apache Ivy in the Ant lib folder, because the build script will download the correct version of Ant automatically.
9
0.428571
4
5
814a286af62bac05fabb3410dfd74cfc00faa349
app/controllers/user_info_controller.rb
app/controllers/user_info_controller.rb
class UserInfoController < ApplicationController before_filter :require_user_access_token after_filter do |c| logger.info c.response.body end rescue_from FbGraph::Exception, Rack::OAuth2::Client::Error do |e| provider = case e when FbGraph::Exception 'Facebook' when Rack::OAuth2::Client::Error 'Google' end raise Rack::OAuth2::Server::Resource::Bearer::BadRequest.new( :invalid_request, [ "Your access token is valid, but we failed to fetch profile data from #{provider}.", "#{provider}'s access token on our side seems expired/revoked." ].join(' ') ) end def show render json: current_token.account.to_response_object(current_token) end private def required_scopes Scope::OPENID end end
class UserInfoController < ApplicationController before_filter :require_user_access_token rescue_from FbGraph::Exception, Rack::OAuth2::Client::Error do |e| provider = case e when FbGraph::Exception 'Facebook' when Rack::OAuth2::Client::Error 'Google' end raise Rack::OAuth2::Server::Resource::Bearer::BadRequest.new( :invalid_request, [ "Your access token is valid, but we failed to fetch profile data from #{provider}.", "#{provider}'s access token on our side seems expired/revoked." ].join(' ') ) end def show render json: current_token.account.to_response_object(current_token) end private def required_scopes Scope::OPENID end end
Revert "try to log user_info response"
Revert "try to log user_info response" This reverts commit eec3c5aa32e50aa98a06c79a3ab26bce85e1b0c7.
Ruby
mit
nov/openid_connect_sample,gbirchmeier/openid_connect_sample,calh/openid_connect_sample,nov/openid_connect_sample,calh/openid_connect_sample,calh/openid_connect_sample,nov/openid_connect_sample,gbirchmeier/openid_connect_sample,gbirchmeier/openid_connect_sample
ruby
## Code Before: class UserInfoController < ApplicationController before_filter :require_user_access_token after_filter do |c| logger.info c.response.body end rescue_from FbGraph::Exception, Rack::OAuth2::Client::Error do |e| provider = case e when FbGraph::Exception 'Facebook' when Rack::OAuth2::Client::Error 'Google' end raise Rack::OAuth2::Server::Resource::Bearer::BadRequest.new( :invalid_request, [ "Your access token is valid, but we failed to fetch profile data from #{provider}.", "#{provider}'s access token on our side seems expired/revoked." ].join(' ') ) end def show render json: current_token.account.to_response_object(current_token) end private def required_scopes Scope::OPENID end end ## Instruction: Revert "try to log user_info response" This reverts commit eec3c5aa32e50aa98a06c79a3ab26bce85e1b0c7. ## Code After: class UserInfoController < ApplicationController before_filter :require_user_access_token rescue_from FbGraph::Exception, Rack::OAuth2::Client::Error do |e| provider = case e when FbGraph::Exception 'Facebook' when Rack::OAuth2::Client::Error 'Google' end raise Rack::OAuth2::Server::Resource::Bearer::BadRequest.new( :invalid_request, [ "Your access token is valid, but we failed to fetch profile data from #{provider}.", "#{provider}'s access token on our side seems expired/revoked." ].join(' ') ) end def show render json: current_token.account.to_response_object(current_token) end private def required_scopes Scope::OPENID end end
class UserInfoController < ApplicationController before_filter :require_user_access_token - after_filter do |c| - logger.info c.response.body - end rescue_from FbGraph::Exception, Rack::OAuth2::Client::Error do |e| provider = case e when FbGraph::Exception 'Facebook' when Rack::OAuth2::Client::Error 'Google' end raise Rack::OAuth2::Server::Resource::Bearer::BadRequest.new( :invalid_request, [ "Your access token is valid, but we failed to fetch profile data from #{provider}.", "#{provider}'s access token on our side seems expired/revoked." ].join(' ') ) end def show render json: current_token.account.to_response_object(current_token) end private def required_scopes Scope::OPENID end end
3
0.096774
0
3
faf268a0f659383ac6a882a5be59f9a04d28d54c
clang-rename/CMakeLists.txt
clang-rename/CMakeLists.txt
set(LLVM_LINK_COMPONENTS support) add_clang_library(clangRename USRFinder.cpp USRFindingAction.cpp USRLocFinder.cpp RenamingAction.cpp LINK_LIBS clangAST clangBasic clangIndex clangLex clangToolingCore ) add_subdirectory(tool)
set(LLVM_LINK_COMPONENTS support) add_clang_library(clangRename USRFinder.cpp USRFindingAction.cpp USRLocFinder.cpp RenamingAction.cpp LINK_LIBS clangAST clangASTMatchers clangBasic clangIndex clangLex clangToolingCore ) add_subdirectory(tool)
Update libdeps to add clangASTMatchers.
clangRename: Update libdeps to add clangASTMatchers. Note, ClangRenameTests is linking USRFindingAction.cpp directly. git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@275986 91177308-0d34-0410-b5e6-96231b3b80d8
Text
apache-2.0
llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra
text
## Code Before: set(LLVM_LINK_COMPONENTS support) add_clang_library(clangRename USRFinder.cpp USRFindingAction.cpp USRLocFinder.cpp RenamingAction.cpp LINK_LIBS clangAST clangBasic clangIndex clangLex clangToolingCore ) add_subdirectory(tool) ## Instruction: clangRename: Update libdeps to add clangASTMatchers. Note, ClangRenameTests is linking USRFindingAction.cpp directly. git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@275986 91177308-0d34-0410-b5e6-96231b3b80d8 ## Code After: set(LLVM_LINK_COMPONENTS support) add_clang_library(clangRename USRFinder.cpp USRFindingAction.cpp USRLocFinder.cpp RenamingAction.cpp LINK_LIBS clangAST clangASTMatchers clangBasic clangIndex clangLex clangToolingCore ) add_subdirectory(tool)
set(LLVM_LINK_COMPONENTS support) add_clang_library(clangRename USRFinder.cpp USRFindingAction.cpp USRLocFinder.cpp RenamingAction.cpp LINK_LIBS clangAST + clangASTMatchers clangBasic clangIndex clangLex clangToolingCore ) add_subdirectory(tool)
1
0.058824
1
0
b4fbe38beaaa426e0e74a1337f5189729aa7ad10
README.md
README.md
MemC3 ===== MemC3 is an in-memory key-value cache, derived from Memcached but improved with memory-efficient and concurrent data structures. MemC3 applies multi-reader concurrent cuckoo hashing as its key-value index and CLOCK-replacement algorithm as cache eviction policy. As a result, MemC3 scales better, runs faster, and uses less memory. For details about the algorithms, performance evaluation and citations, please refer to [our paper in NSDI 2013][1]. [1]: http://www.cs.cmu.edu/~dga/papers/memc3-nsdi2013.pdf "MemC3: Compact and Concurrent Memcache with Dumber Caching and Smarter Hashing" Authors ======= Bin Fan (binfan@cs.cmu.edu), David G. Andersen (dga@cs.cmu.edu), and Michael Kaminsky (michael.e.kaminsky@intel.com) Building ========== $ autoreconf -fis $ ./configure $ make
MemC3 ===== MemC3 is an in-memory key-value cache, derived from Memcached but improved with memory-efficient and concurrent data structures. MemC3 applies multi-reader concurrent cuckoo hashing as its key-value index and CLOCK-replacement algorithm as cache eviction policy. As a result, MemC3 scales better, runs faster, and uses less memory. For details about the algorithms, performance evaluation and citations, please refer to [our paper in NSDI 2013][1]. [1]: http://www.cs.cmu.edu/~dga/papers/memc3-nsdi2013.pdf "MemC3: Compact and Concurrent Memcache with Dumber Caching and Smarter Hashing" Authors ======= MemC3 is developed by Bin Fan, David G. Andersen, and Michael Kaminsky. You can also email us at [libcuckoo-dev@googlegroups.com](mailto:libcuckoo-dev@googlegroups.com). Building ========== $ autoreconf -fis $ ./configure $ make
Change email addresses to libcuckoo-dev
Change email addresses to libcuckoo-dev
Markdown
bsd-3-clause
efficient/memc3,efficient/memc3,efficient/memc3,efficient/memc3
markdown
## Code Before: MemC3 ===== MemC3 is an in-memory key-value cache, derived from Memcached but improved with memory-efficient and concurrent data structures. MemC3 applies multi-reader concurrent cuckoo hashing as its key-value index and CLOCK-replacement algorithm as cache eviction policy. As a result, MemC3 scales better, runs faster, and uses less memory. For details about the algorithms, performance evaluation and citations, please refer to [our paper in NSDI 2013][1]. [1]: http://www.cs.cmu.edu/~dga/papers/memc3-nsdi2013.pdf "MemC3: Compact and Concurrent Memcache with Dumber Caching and Smarter Hashing" Authors ======= Bin Fan (binfan@cs.cmu.edu), David G. Andersen (dga@cs.cmu.edu), and Michael Kaminsky (michael.e.kaminsky@intel.com) Building ========== $ autoreconf -fis $ ./configure $ make ## Instruction: Change email addresses to libcuckoo-dev ## Code After: MemC3 ===== MemC3 is an in-memory key-value cache, derived from Memcached but improved with memory-efficient and concurrent data structures. MemC3 applies multi-reader concurrent cuckoo hashing as its key-value index and CLOCK-replacement algorithm as cache eviction policy. As a result, MemC3 scales better, runs faster, and uses less memory. For details about the algorithms, performance evaluation and citations, please refer to [our paper in NSDI 2013][1]. [1]: http://www.cs.cmu.edu/~dga/papers/memc3-nsdi2013.pdf "MemC3: Compact and Concurrent Memcache with Dumber Caching and Smarter Hashing" Authors ======= MemC3 is developed by Bin Fan, David G. Andersen, and Michael Kaminsky. You can also email us at [libcuckoo-dev@googlegroups.com](mailto:libcuckoo-dev@googlegroups.com). Building ========== $ autoreconf -fis $ ./configure $ make
MemC3 ===== MemC3 is an in-memory key-value cache, derived from Memcached but improved with memory-efficient and concurrent data structures. MemC3 applies multi-reader concurrent cuckoo hashing as its key-value index and CLOCK-replacement algorithm as cache eviction policy. As a result, MemC3 scales better, runs faster, and uses less memory. For details about the algorithms, performance evaluation and citations, please refer to [our paper in NSDI 2013][1]. [1]: http://www.cs.cmu.edu/~dga/papers/memc3-nsdi2013.pdf "MemC3: Compact and Concurrent Memcache with Dumber Caching and Smarter Hashing" Authors ======= - Bin Fan (binfan@cs.cmu.edu), David G. Andersen (dga@cs.cmu.edu), and Michael Kaminsky (michael.e.kaminsky@intel.com) + MemC3 is developed by Bin Fan, David G. Andersen, and Michael Kaminsky. You can also email us at [libcuckoo-dev@googlegroups.com](mailto:libcuckoo-dev@googlegroups.com). + Building ========== $ autoreconf -fis $ ./configure $ make
3
0.166667
2
1
17d0988266ab2243d8ae0e0fc9a5c6bafeffa42e
.github/workflows/issue-auto-unassign.yml
.github/workflows/issue-auto-unassign.yml
on: schedule: # * is a special character in YAML so you have to quote this string - cron: '0 0 * * *' workflow_dispatch: # Enable manual runs of the bot jobs: unassign_issues: runs-on: ubuntu-latest name: Unassign issues steps: - name: Unassign issues uses: rubyforgood/unassign-issues@1.2 id: unassign_issues with: token: ${{secrets.GITHUB_TOKEN}} warning_inactive_in_hours: 336 # 14 days unassign_inactive_in_hours: 408 # 3 days later office_hours: 'n/a' warning_inactive_message: "If you are still working on this issue, that's fine. Please comment here to tell the bot to give you more time." - name: Print the unassigned issues run: echo "Unassigned issues = ${{steps.unassign_issues.outputs.unassigned_issues}}" - name: Print the warned issues run: echo "Warned issues = ${{steps.unassign_issues.outputs.warned_issues}}"
on: schedule: # * is a special character in YAML so you have to quote this string - cron: '0 0 * * *' workflow_dispatch: # Enable manual runs of the bot jobs: unassign_issues: runs-on: ubuntu-latest name: Unassign issues steps: - name: Unassign issues uses: codethesaurus/unassign-issues@1.2 id: unassign_issues with: token: ${{secrets.GITHUB_TOKEN}} warning_inactive_in_hours: 336 # 14 days unassign_inactive_in_hours: 408 # 3 days later office_hours: 'n/a' warning_inactive_message: "If you are still working on this issue, that's fine. Please comment here to tell the bot to give you more time." - name: Print the unassigned issues run: echo "Unassigned issues = ${{steps.unassign_issues.outputs.unassigned_issues}}" - name: Print the warned issues run: echo "Warned issues = ${{steps.unassign_issues.outputs.warned_issues}}"
Change unassignbot from RubyForGood's to CodeThesaurus's fork
Change unassignbot from RubyForGood's to CodeThesaurus's fork
YAML
agpl-3.0
codethesaurus/codethesaur.us,codethesaurus/codethesaur.us
yaml
## Code Before: on: schedule: # * is a special character in YAML so you have to quote this string - cron: '0 0 * * *' workflow_dispatch: # Enable manual runs of the bot jobs: unassign_issues: runs-on: ubuntu-latest name: Unassign issues steps: - name: Unassign issues uses: rubyforgood/unassign-issues@1.2 id: unassign_issues with: token: ${{secrets.GITHUB_TOKEN}} warning_inactive_in_hours: 336 # 14 days unassign_inactive_in_hours: 408 # 3 days later office_hours: 'n/a' warning_inactive_message: "If you are still working on this issue, that's fine. Please comment here to tell the bot to give you more time." - name: Print the unassigned issues run: echo "Unassigned issues = ${{steps.unassign_issues.outputs.unassigned_issues}}" - name: Print the warned issues run: echo "Warned issues = ${{steps.unassign_issues.outputs.warned_issues}}" ## Instruction: Change unassignbot from RubyForGood's to CodeThesaurus's fork ## Code After: on: schedule: # * is a special character in YAML so you have to quote this string - cron: '0 0 * * *' workflow_dispatch: # Enable manual runs of the bot jobs: unassign_issues: runs-on: ubuntu-latest name: Unassign issues steps: - name: Unassign issues uses: codethesaurus/unassign-issues@1.2 id: unassign_issues with: token: ${{secrets.GITHUB_TOKEN}} warning_inactive_in_hours: 336 # 14 days unassign_inactive_in_hours: 408 # 3 days later office_hours: 'n/a' warning_inactive_message: "If you are still working on this issue, that's fine. Please comment here to tell the bot to give you more time." - name: Print the unassigned issues run: echo "Unassigned issues = ${{steps.unassign_issues.outputs.unassigned_issues}}" - name: Print the warned issues run: echo "Warned issues = ${{steps.unassign_issues.outputs.warned_issues}}"
on: schedule: # * is a special character in YAML so you have to quote this string - cron: '0 0 * * *' workflow_dispatch: # Enable manual runs of the bot jobs: unassign_issues: runs-on: ubuntu-latest name: Unassign issues steps: - name: Unassign issues - uses: rubyforgood/unassign-issues@1.2 ? ^^^^^^^^^ + uses: codethesaurus/unassign-issues@1.2 ? ++++++++++ ^ id: unassign_issues with: token: ${{secrets.GITHUB_TOKEN}} warning_inactive_in_hours: 336 # 14 days unassign_inactive_in_hours: 408 # 3 days later office_hours: 'n/a' warning_inactive_message: "If you are still working on this issue, that's fine. Please comment here to tell the bot to give you more time." - name: Print the unassigned issues run: echo "Unassigned issues = ${{steps.unassign_issues.outputs.unassigned_issues}}" - name: Print the warned issues run: echo "Warned issues = ${{steps.unassign_issues.outputs.warned_issues}}"
2
0.083333
1
1
c867124695b5518dc4189bb2751c1dae81bf9142
app/views/page/_status.rhtml
app/views/page/_status.rhtml
<%= link_to_if @page.write_by?(@current_user), "Revision #{@page.revision}", revision_history_url(:id => @page) %>, ändrad för <%= @page.updated_on.age_in_swedish_words(:minutes => true) -%> sen av <%= user_show_link(@page.updater) -%>
<%= link_to_if @page.write_by?(@current_user), "Revision #{@page.revision}", revision_history_url(:id => @page) %>, <% if @page.revision == 1 %> skapad för <%= @page.updated_on.age_in_swedish_words(:minutes => true) %> sen <% else%> <%= link_to "ändrad för #{@page.updated_on.age_in_swedish_words(:minutes => true)} sen", revision_diff_url(:id => @page, :new => @page.revision, :old => @page.previous), :title => 'Se skillnaden mot tidigare version' %> <% end %> av <%= user_show_link(@page.updater) -%>
Add link to the latest diff
Add link to the latest diff
RHTML
mit
Starkast/wikimum,Starkast/wikimum
rhtml
## Code Before: <%= link_to_if @page.write_by?(@current_user), "Revision #{@page.revision}", revision_history_url(:id => @page) %>, ändrad för <%= @page.updated_on.age_in_swedish_words(:minutes => true) -%> sen av <%= user_show_link(@page.updater) -%> ## Instruction: Add link to the latest diff ## Code After: <%= link_to_if @page.write_by?(@current_user), "Revision #{@page.revision}", revision_history_url(:id => @page) %>, <% if @page.revision == 1 %> skapad för <%= @page.updated_on.age_in_swedish_words(:minutes => true) %> sen <% else%> <%= link_to "ändrad för #{@page.updated_on.age_in_swedish_words(:minutes => true)} sen", revision_diff_url(:id => @page, :new => @page.revision, :old => @page.previous), :title => 'Se skillnaden mot tidigare version' %> <% end %> av <%= user_show_link(@page.updater) -%>
- <%= link_to_if @page.write_by?(@current_user), "Revision #{@page.revision}", revision_history_url(:id => @page) %>, ändrad för <%= @page.updated_on.age_in_swedish_words(:minutes => true) -%> sen av <%= user_show_link(@page.updater) -%> + <%= link_to_if @page.write_by?(@current_user), "Revision #{@page.revision}", revision_history_url(:id => @page) %>, + <% if @page.revision == 1 %> + skapad för <%= @page.updated_on.age_in_swedish_words(:minutes => true) %> sen + <% else%> + <%= link_to "ändrad för #{@page.updated_on.age_in_swedish_words(:minutes => true)} sen", + revision_diff_url(:id => @page, :new => @page.revision, :old => @page.previous), :title => 'Se skillnaden mot tidigare version' %> + <% end %> + av <%= user_show_link(@page.updater) -%>
9
9
8
1
e00fb0d87b60a982c2d932864a67a70e7d5b4312
src/apps/rDSN.monitor/rDSN.Monitor.py
src/apps/rDSN.monitor/rDSN.Monitor.py
import sys import os import threading import time sys.path.append(os.getcwd() + '/app_package') from MonitorApp import * def start_dsn(): service_app = ServiceApp() app_dict['monitor'] = MonitorService service_app.register_app('monitor') if len(sys.argv) < 2: #rDSN.Monitor run as an embedded service print "rDSN.Monitor runs in embedded mode" Native.dsn_app_loader_signal() time.sleep(1) elif sys.argv[1] == 'standalone': #rDSN.Monitor run as a caller calling the monitored program print "rDSN.Monitor runs in standalone mode" argv = (c_char_p*2)() argv[0] = b'rDSN.Monitor.exe' argv[1] = b'config.ini' Native.dsn_run(2, argv, c_bool(1)) if __name__ == '__main__': start_dsn()
import sys import os import threading sys.path.append(os.getcwd() + '/app_package') from MonitorApp import * def start_dsn(): service_app = ServiceApp() app_dict['monitor'] = MonitorService service_app.register_app('monitor') if len(sys.argv) < 2: #rDSN.Monitor run as an embedded service print "rDSN.Monitor runs in embedded mode" Native.dsn_app_loader_signal() #to be fix, hangs forever now to keep python interpreter alive dummy_event = threading.Event() dummy_event.wait() elif sys.argv[1] == 'standalone': #rDSN.Monitor run as a caller calling the monitored program print "rDSN.Monitor runs in standalone mode" argv = (c_char_p*2)() argv[0] = b'rDSN.Monitor.exe' argv[1] = b'config.ini' Native.dsn_run(2, argv, c_bool(1)) if __name__ == '__main__': start_dsn()
Replace sleep() with wait() forever after monitor registers, this ensures the python interpreter alive before app starts
Replace sleep() with wait() forever after monitor registers, this ensures the python interpreter alive before app starts
Python
mit
mcfatealan/rDSN.Python,rDSN-Projects/rDSN.Python,mcfatealan/rDSN.Python,mcfatealan/rDSN.Python,rDSN-Projects/rDSN.Python,mcfatealan/rDSN.Python,rDSN-Projects/rDSN.Python,rDSN-Projects/rDSN.Python,rDSN-Projects/rDSN.Python,mcfatealan/rDSN.Python
python
## Code Before: import sys import os import threading import time sys.path.append(os.getcwd() + '/app_package') from MonitorApp import * def start_dsn(): service_app = ServiceApp() app_dict['monitor'] = MonitorService service_app.register_app('monitor') if len(sys.argv) < 2: #rDSN.Monitor run as an embedded service print "rDSN.Monitor runs in embedded mode" Native.dsn_app_loader_signal() time.sleep(1) elif sys.argv[1] == 'standalone': #rDSN.Monitor run as a caller calling the monitored program print "rDSN.Monitor runs in standalone mode" argv = (c_char_p*2)() argv[0] = b'rDSN.Monitor.exe' argv[1] = b'config.ini' Native.dsn_run(2, argv, c_bool(1)) if __name__ == '__main__': start_dsn() ## Instruction: Replace sleep() with wait() forever after monitor registers, this ensures the python interpreter alive before app starts ## Code After: import sys import os import threading sys.path.append(os.getcwd() + '/app_package') from MonitorApp import * def start_dsn(): service_app = ServiceApp() app_dict['monitor'] = MonitorService service_app.register_app('monitor') if len(sys.argv) < 2: #rDSN.Monitor run as an embedded service print "rDSN.Monitor runs in embedded mode" Native.dsn_app_loader_signal() #to be fix, hangs forever now to keep python interpreter alive dummy_event = threading.Event() dummy_event.wait() elif sys.argv[1] == 'standalone': #rDSN.Monitor run as a caller calling the monitored program print "rDSN.Monitor runs in standalone mode" argv = (c_char_p*2)() argv[0] = b'rDSN.Monitor.exe' argv[1] = b'config.ini' Native.dsn_run(2, argv, c_bool(1)) if __name__ == '__main__': start_dsn()
import sys import os import threading - import time sys.path.append(os.getcwd() + '/app_package') from MonitorApp import * def start_dsn(): service_app = ServiceApp() app_dict['monitor'] = MonitorService service_app.register_app('monitor') if len(sys.argv) < 2: #rDSN.Monitor run as an embedded service print "rDSN.Monitor runs in embedded mode" Native.dsn_app_loader_signal() - - time.sleep(1) + #to be fix, hangs forever now to keep python interpreter alive + dummy_event = threading.Event() + dummy_event.wait() elif sys.argv[1] == 'standalone': #rDSN.Monitor run as a caller calling the monitored program print "rDSN.Monitor runs in standalone mode" argv = (c_char_p*2)() argv[0] = b'rDSN.Monitor.exe' argv[1] = b'config.ini' Native.dsn_run(2, argv, c_bool(1)) if __name__ == '__main__': start_dsn()
6
0.176471
3
3
d10199e4e3cd5b0557cf2dc2f4aea1014f18a290
lib/wordfilter.py
lib/wordfilter.py
import os import json class Wordfilter: def __init__(self): # json is in same directory as this class, given by __location__. __location__ = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__))) with open(os.path.join(__location__, 'badwords.json')) as f: self.blacklist = json.loads(f.read()) def blacklisted(self, string): test_string = string.lower() for badword in self.blacklist: if test_string.find(badword) != -1: return True return False def addWords(self, words): self.blacklist.extend(words.lower()) def clearList(self): self.blacklist = []
import os import json class Wordfilter: def __init__(self): # json is in same directory as this class, given by __location__. __location__ = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__))) with open(os.path.join(__location__, 'badwords.json')) as f: self.blacklist = json.loads(f.read()) def blacklisted(self, string): test_string = string.lower() for badword in self.blacklist: if test_string.find(badword) != -1: return True return False def addWords(self, words): self.blacklist.extend([word.lower() for word in words]]) def clearList(self): self.blacklist = []
Fix AttributeError: 'list' object has no attribute 'lower'
Fix AttributeError: 'list' object has no attribute 'lower'
Python
mit
dariusk/wordfilter,hugovk/wordfilter,hugovk/wordfilter,mwatson/wordfilter,hugovk/wordfilter,dariusk/wordfilter,mwatson/wordfilter,dariusk/wordfilter,mwatson/wordfilter,mwatson/wordfilter,dariusk/wordfilter,hugovk/wordfilter
python
## Code Before: import os import json class Wordfilter: def __init__(self): # json is in same directory as this class, given by __location__. __location__ = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__))) with open(os.path.join(__location__, 'badwords.json')) as f: self.blacklist = json.loads(f.read()) def blacklisted(self, string): test_string = string.lower() for badword in self.blacklist: if test_string.find(badword) != -1: return True return False def addWords(self, words): self.blacklist.extend(words.lower()) def clearList(self): self.blacklist = [] ## Instruction: Fix AttributeError: 'list' object has no attribute 'lower' ## Code After: import os import json class Wordfilter: def __init__(self): # json is in same directory as this class, given by __location__. __location__ = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__))) with open(os.path.join(__location__, 'badwords.json')) as f: self.blacklist = json.loads(f.read()) def blacklisted(self, string): test_string = string.lower() for badword in self.blacklist: if test_string.find(badword) != -1: return True return False def addWords(self, words): self.blacklist.extend([word.lower() for word in words]]) def clearList(self): self.blacklist = []
import os import json class Wordfilter: def __init__(self): # json is in same directory as this class, given by __location__. __location__ = os.path.realpath( os.path.join(os.getcwd(), os.path.dirname(__file__))) with open(os.path.join(__location__, 'badwords.json')) as f: self.blacklist = json.loads(f.read()) def blacklisted(self, string): test_string = string.lower() for badword in self.blacklist: if test_string.find(badword) != -1: return True return False - + def addWords(self, words): - self.blacklist.extend(words.lower()) ? - + self.blacklist.extend([word.lower() for word in words]]) ? + ++++++++++++++++++++ def clearList(self): self.blacklist = []
4
0.166667
2
2
d2877c5eb4bde385f15327c87f0a51a21947826a
tests/codeStyleTest.php
tests/codeStyleTest.php
<?php /** * JBZoo SimpleTypes * * This file is part of the JBZoo CCK package. * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @package SimpleTypes * @license MIT * @copyright Copyright (C) JBZoo.com, All rights reserved. * @link https://github.com/JBZoo/SimpleTypes * @author Denis Smetannikov <denis@jbzoo.com> */ namespace JBZoo\PHPUnit; /** * Class CodeStyleTest * @package JBZoo\SimpleTypes */ class CodeStyleTest extends Codestyle { protected $_packageName = 'SimpleTypes'; protected $_packageAuthor = 'Denis Smetannikov <denis@jbzoo.com>'; public function testCyrillic() { $this->_excludeFiles[] = 'outputTest.php'; $this->_excludeFiles[] = 'Money.php'; parent::testCyrillic(); } }
<?php /** * JBZoo SimpleTypes * * This file is part of the JBZoo CCK package. * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @package SimpleTypes * @license MIT * @copyright Copyright (C) JBZoo.com, All rights reserved. * @link https://github.com/JBZoo/SimpleTypes * @author Denis Smetannikov <denis@jbzoo.com> */ namespace JBZoo\PHPUnit; /** * Class CodeStyleTest * @package JBZoo\SimpleTypes */ class CodeStyleTest extends Codestyle { protected $_packageName = 'SimpleTypes'; protected $_packageAuthor = 'Denis Smetannikov <denis@jbzoo.com>'; public function testCyrillic() { $GLOBALS['_jbzoo_fileExcludes'][] = 'outputTest.php'; $GLOBALS['_jbzoo_fileExcludes'][] = 'Money.php'; parent::testCyrillic(); } }
Fix compatibility with JBZoo/PHPUnit 1.2.x
Fix compatibility with JBZoo/PHPUnit 1.2.x
PHP
mit
smetdenis/SimpleTypes,JBZoo/SimpleTypes
php
## Code Before: <?php /** * JBZoo SimpleTypes * * This file is part of the JBZoo CCK package. * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @package SimpleTypes * @license MIT * @copyright Copyright (C) JBZoo.com, All rights reserved. * @link https://github.com/JBZoo/SimpleTypes * @author Denis Smetannikov <denis@jbzoo.com> */ namespace JBZoo\PHPUnit; /** * Class CodeStyleTest * @package JBZoo\SimpleTypes */ class CodeStyleTest extends Codestyle { protected $_packageName = 'SimpleTypes'; protected $_packageAuthor = 'Denis Smetannikov <denis@jbzoo.com>'; public function testCyrillic() { $this->_excludeFiles[] = 'outputTest.php'; $this->_excludeFiles[] = 'Money.php'; parent::testCyrillic(); } } ## Instruction: Fix compatibility with JBZoo/PHPUnit 1.2.x ## Code After: <?php /** * JBZoo SimpleTypes * * This file is part of the JBZoo CCK package. * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @package SimpleTypes * @license MIT * @copyright Copyright (C) JBZoo.com, All rights reserved. * @link https://github.com/JBZoo/SimpleTypes * @author Denis Smetannikov <denis@jbzoo.com> */ namespace JBZoo\PHPUnit; /** * Class CodeStyleTest * @package JBZoo\SimpleTypes */ class CodeStyleTest extends Codestyle { protected $_packageName = 'SimpleTypes'; protected $_packageAuthor = 'Denis Smetannikov <denis@jbzoo.com>'; public function testCyrillic() { $GLOBALS['_jbzoo_fileExcludes'][] = 'outputTest.php'; $GLOBALS['_jbzoo_fileExcludes'][] = 'Money.php'; parent::testCyrillic(); } }
<?php /** * JBZoo SimpleTypes * * This file is part of the JBZoo CCK package. * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @package SimpleTypes * @license MIT * @copyright Copyright (C) JBZoo.com, All rights reserved. * @link https://github.com/JBZoo/SimpleTypes * @author Denis Smetannikov <denis@jbzoo.com> */ namespace JBZoo\PHPUnit; /** * Class CodeStyleTest * @package JBZoo\SimpleTypes */ class CodeStyleTest extends Codestyle { protected $_packageName = 'SimpleTypes'; protected $_packageAuthor = 'Denis Smetannikov <denis@jbzoo.com>'; public function testCyrillic() { - $this->_excludeFiles[] = 'outputTest.php'; - $this->_excludeFiles[] = 'Money.php'; + $GLOBALS['_jbzoo_fileExcludes'][] = 'outputTest.php'; + $GLOBALS['_jbzoo_fileExcludes'][] = 'Money.php'; parent::testCyrillic(); } }
4
0.111111
2
2
951031a5881ed951d3f09567224139168218cd25
search/index.html
search/index.html
--- layout: default title: search pageId: search permalink: /search/ --- <form action="/search/"> <input type="search" name="q"/> <input type="submit" value="Go"/> </form> <script src="http://cse.google.com/cse.js?cx=000850824335660518947:0_row7sqyso"></script> <gcse:searchresults-only></gcse:searchresults-only>
--- layout: default title: search pageId: search permalink: /search/ --- <script src="http://cse.google.com/cse.js?cx=000850824335660518947:0_row7sqyso"></script> <gcse:searchresults-only></gcse:searchresults-only>
Delete search form in the search page
Delete search form in the search page
HTML
mit
woneob/1upnote,woneob/1upnote,woneob/woneob.github.io,woneob/woneob.github.io,woneob/1upnote,woneob/woneob.github.io
html
## Code Before: --- layout: default title: search pageId: search permalink: /search/ --- <form action="/search/"> <input type="search" name="q"/> <input type="submit" value="Go"/> </form> <script src="http://cse.google.com/cse.js?cx=000850824335660518947:0_row7sqyso"></script> <gcse:searchresults-only></gcse:searchresults-only> ## Instruction: Delete search form in the search page ## Code After: --- layout: default title: search pageId: search permalink: /search/ --- <script src="http://cse.google.com/cse.js?cx=000850824335660518947:0_row7sqyso"></script> <gcse:searchresults-only></gcse:searchresults-only>
--- layout: default title: search pageId: search permalink: /search/ --- - <form action="/search/"> - <input type="search" name="q"/> - <input type="submit" value="Go"/> - </form> - <script src="http://cse.google.com/cse.js?cx=000850824335660518947:0_row7sqyso"></script> <gcse:searchresults-only></gcse:searchresults-only>
5
0.357143
0
5
b7186a4bbdd6dc825515e73544aee962876cda44
python/doc/tutorials.rst
python/doc/tutorials.rst
.. _tutorials: thunder tutorials ================= Basics ------ .. toctree:: :maxdepth: 2 tutorials/basic_usage tutorials/thunder_context tutorials/input_formats Data types ---------- .. toctree:: :maxdepth: 2 tutorials/images tutorials/series tutorials/multi_index Analayses --------- .. toctree:: :maxdepth: 2 tutorials/clustering tutorials/factorization tutorials/regression
.. _tutorials: thunder tutorials ================= Basics ------ .. toctree:: :maxdepth: 2 tutorials/basic_usage tutorials/thunder_context tutorials/input_formats Data types ---------- .. toctree:: :maxdepth: 2 tutorials/images tutorials/series tutorials/multi_index Image processing ---------------- .. toctree:: :maxdepth: 2 tutorials/image_regression Analayses --------- .. toctree:: :maxdepth: 2 tutorials/clustering tutorials/factorization tutorials/regression
Add new tutorial to index
Add new tutorial to index
reStructuredText
apache-2.0
jwittenbach/thunder,pearsonlab/thunder,kcompher/thunder,zhwa/thunder,poolio/thunder,mikarubi/thunder,broxtronix/thunder,j-friedrich/thunder,kunallillaney/thunder,kunallillaney/thunder,broxtronix/thunder,poolio/thunder,zhwa/thunder,oliverhuangchao/thunder,oliverhuangchao/thunder,mikarubi/thunder,thunder-project/thunder,j-friedrich/thunder,pearsonlab/thunder,kcompher/thunder
restructuredtext
## Code Before: .. _tutorials: thunder tutorials ================= Basics ------ .. toctree:: :maxdepth: 2 tutorials/basic_usage tutorials/thunder_context tutorials/input_formats Data types ---------- .. toctree:: :maxdepth: 2 tutorials/images tutorials/series tutorials/multi_index Analayses --------- .. toctree:: :maxdepth: 2 tutorials/clustering tutorials/factorization tutorials/regression ## Instruction: Add new tutorial to index ## Code After: .. _tutorials: thunder tutorials ================= Basics ------ .. toctree:: :maxdepth: 2 tutorials/basic_usage tutorials/thunder_context tutorials/input_formats Data types ---------- .. toctree:: :maxdepth: 2 tutorials/images tutorials/series tutorials/multi_index Image processing ---------------- .. toctree:: :maxdepth: 2 tutorials/image_regression Analayses --------- .. toctree:: :maxdepth: 2 tutorials/clustering tutorials/factorization tutorials/regression
.. _tutorials: thunder tutorials ================= Basics ------ .. toctree:: :maxdepth: 2 tutorials/basic_usage tutorials/thunder_context tutorials/input_formats Data types ---------- .. toctree:: :maxdepth: 2 tutorials/images tutorials/series tutorials/multi_index + Image processing + ---------------- + + .. toctree:: + :maxdepth: 2 + + tutorials/image_regression + Analayses --------- .. toctree:: :maxdepth: 2 tutorials/clustering tutorials/factorization tutorials/regression
8
0.235294
8
0
d324bf4def2f3e27279fa6b5629612e5f35b28a9
package.json
package.json
{ "name": "@scoop/eslint-config-scoop", "version": "4.0.0", "description": "Scoop's custom eslint configuration", "repository": { "type": "git", "url": "https://github.com/TakeScoop/eslint-config-scoop.git" }, "main": "index.js", "scripts": { "//": "This ensures we're not using any old rules, mostly, when upgrading eslint devDependency", "test": "test/run" }, "author": "Scoop Technologies Inc", "license": "MIT", "devDependencies": { "eslint": "^5.11.1", "eslint-plugin-dependencies": "^2.4.0", "eslint-plugin-implicit-dependencies": "^1.0.4" }, "peerDependencies": { "eslint": "^5.11.1", "eslint-plugin-dependencies": "^2.4.0", "eslint-plugin-implicit-dependencies": "^1.0.4" } }
{ "name": "@scoop/eslint-config-scoop", "version": "4.0.0", "description": "Scoop's custom eslint configuration", "engines" : { "node" : ">=6.0.0" }, "repository": { "type": "git", "url": "https://github.com/TakeScoop/eslint-config-scoop.git" }, "main": "index.js", "scripts": { "//": "This ensures we're not using any old rules, mostly, when upgrading eslint devDependency", "test": "test/run" }, "author": "Scoop Technologies Inc", "license": "MIT", "devDependencies": { "eslint": "^5.11.1", "eslint-plugin-dependencies": "^2.4.0", "eslint-plugin-implicit-dependencies": "^1.0.4" }, "peerDependencies": { "eslint": "^5.11.1", "eslint-plugin-dependencies": "^2.4.0", "eslint-plugin-implicit-dependencies": "^1.0.4" } }
Add engines to denote node 6 or higher
Add engines to denote node 6 or higher
JSON
mit
TakeScoop/eslint-config-scoop,TakeScoop/eslint-config-scoop
json
## Code Before: { "name": "@scoop/eslint-config-scoop", "version": "4.0.0", "description": "Scoop's custom eslint configuration", "repository": { "type": "git", "url": "https://github.com/TakeScoop/eslint-config-scoop.git" }, "main": "index.js", "scripts": { "//": "This ensures we're not using any old rules, mostly, when upgrading eslint devDependency", "test": "test/run" }, "author": "Scoop Technologies Inc", "license": "MIT", "devDependencies": { "eslint": "^5.11.1", "eslint-plugin-dependencies": "^2.4.0", "eslint-plugin-implicit-dependencies": "^1.0.4" }, "peerDependencies": { "eslint": "^5.11.1", "eslint-plugin-dependencies": "^2.4.0", "eslint-plugin-implicit-dependencies": "^1.0.4" } } ## Instruction: Add engines to denote node 6 or higher ## Code After: { "name": "@scoop/eslint-config-scoop", "version": "4.0.0", "description": "Scoop's custom eslint configuration", "engines" : { "node" : ">=6.0.0" }, "repository": { "type": "git", "url": "https://github.com/TakeScoop/eslint-config-scoop.git" }, "main": "index.js", "scripts": { "//": "This ensures we're not using any old rules, mostly, when upgrading eslint devDependency", "test": "test/run" }, "author": "Scoop Technologies Inc", "license": "MIT", "devDependencies": { "eslint": "^5.11.1", "eslint-plugin-dependencies": "^2.4.0", "eslint-plugin-implicit-dependencies": "^1.0.4" }, "peerDependencies": { "eslint": "^5.11.1", "eslint-plugin-dependencies": "^2.4.0", "eslint-plugin-implicit-dependencies": "^1.0.4" } }
{ "name": "@scoop/eslint-config-scoop", "version": "4.0.0", "description": "Scoop's custom eslint configuration", + "engines" : { + "node" : ">=6.0.0" + }, "repository": { "type": "git", "url": "https://github.com/TakeScoop/eslint-config-scoop.git" }, "main": "index.js", "scripts": { "//": "This ensures we're not using any old rules, mostly, when upgrading eslint devDependency", "test": "test/run" }, "author": "Scoop Technologies Inc", "license": "MIT", "devDependencies": { "eslint": "^5.11.1", "eslint-plugin-dependencies": "^2.4.0", "eslint-plugin-implicit-dependencies": "^1.0.4" }, "peerDependencies": { "eslint": "^5.11.1", "eslint-plugin-dependencies": "^2.4.0", "eslint-plugin-implicit-dependencies": "^1.0.4" } }
3
0.115385
3
0
8279f95246ec46031030e6cf72a4eb802d5d9a7c
.travis.yml
.travis.yml
sudo: required services: - docker language: php php: - 5.5 - 5.6 - 7.0 cache: false env: global: - PRODUCT=php-phalcon - ENABLED_BRANCHES="master" - RELEASE=0 matrix: - OS=ubuntu DIST=trusty PACK=deb PACKAGECLOUD_REPO="phalcon/dist" matrix: fast_finish: true allow_failures: - env: OS=ubuntu DIST=trusty PACK=deb before_script: - export LAST_COMMIT=$(cd cphalcon; git rev-parse --short=8 HEAD) - export PARTIAL_VERSION=$(cd cphalcon; cat config.json | jq ".version" | sed -E 's/\"//g') - export VERSION="$PARTIAL_VERSION-$RELEASE-$LAST_COMMIT" script: - git clone https://github.com/tarantool/build.git - build/pack/travis.sh notifications: email: recipients: - serghei@phalconphp.com on_success: change on_failure: always
sudo: required services: - docker language: php php: - 5.5 - 5.6 #- 7.0 cache: false env: global: - PRODUCT=php-phalcon - ENABLED_BRANCHES="master" - RELEASE=0 - PACKAGECLOUD_REPO="phalcon/stable" matrix: - OS=ubuntu DIST=precise PACK=deb - OS=ubuntu DIST=trusty PACK=deb - OS=ubuntu DIST=wily PACK=deb matrix: fast_finish: true allow_failures: - env: OS=ubuntu DIST=precise PACK=deb - env: OS=ubuntu DIST=trusty PACK=deb - env: OS=ubuntu DIST=wily PACK=deb before_script: - export LAST_COMMIT=$(cd cphalcon; git rev-parse --short=8 HEAD) - export PARTIAL_VERSION=$(cd cphalcon; cat config.json | jq ".version" | sed -E 's/\"//g') - export VERSION="$PARTIAL_VERSION-$RELEASE-$LAST_COMMIT" - echo $TRAVIS_BUILD_NUMBER - echo $TRAVIS_BUILD_ID script: - git clone https://github.com/tarantool/build.git - build/pack/travis.sh notifications: email: recipients: - serghei@phalconphp.com on_success: change on_failure: always
Enable building for precise && wily
Enable building for precise && wily
YAML
bsd-3-clause
phalcongelist/packagecloud
yaml
## Code Before: sudo: required services: - docker language: php php: - 5.5 - 5.6 - 7.0 cache: false env: global: - PRODUCT=php-phalcon - ENABLED_BRANCHES="master" - RELEASE=0 matrix: - OS=ubuntu DIST=trusty PACK=deb PACKAGECLOUD_REPO="phalcon/dist" matrix: fast_finish: true allow_failures: - env: OS=ubuntu DIST=trusty PACK=deb before_script: - export LAST_COMMIT=$(cd cphalcon; git rev-parse --short=8 HEAD) - export PARTIAL_VERSION=$(cd cphalcon; cat config.json | jq ".version" | sed -E 's/\"//g') - export VERSION="$PARTIAL_VERSION-$RELEASE-$LAST_COMMIT" script: - git clone https://github.com/tarantool/build.git - build/pack/travis.sh notifications: email: recipients: - serghei@phalconphp.com on_success: change on_failure: always ## Instruction: Enable building for precise && wily ## Code After: sudo: required services: - docker language: php php: - 5.5 - 5.6 #- 7.0 cache: false env: global: - PRODUCT=php-phalcon - ENABLED_BRANCHES="master" - RELEASE=0 - PACKAGECLOUD_REPO="phalcon/stable" matrix: - OS=ubuntu DIST=precise PACK=deb - OS=ubuntu DIST=trusty PACK=deb - OS=ubuntu DIST=wily PACK=deb matrix: fast_finish: true allow_failures: - env: OS=ubuntu DIST=precise PACK=deb - env: OS=ubuntu DIST=trusty PACK=deb - env: OS=ubuntu DIST=wily PACK=deb before_script: - export LAST_COMMIT=$(cd cphalcon; git rev-parse --short=8 HEAD) - export PARTIAL_VERSION=$(cd cphalcon; cat config.json | jq ".version" | sed -E 's/\"//g') - export VERSION="$PARTIAL_VERSION-$RELEASE-$LAST_COMMIT" - echo $TRAVIS_BUILD_NUMBER - echo $TRAVIS_BUILD_ID script: - git clone https://github.com/tarantool/build.git - build/pack/travis.sh notifications: email: recipients: - serghei@phalconphp.com on_success: change on_failure: always
sudo: required services: - docker language: php php: - 5.5 - 5.6 - - 7.0 + #- 7.0 ? + cache: false env: global: - PRODUCT=php-phalcon - ENABLED_BRANCHES="master" - RELEASE=0 + - PACKAGECLOUD_REPO="phalcon/stable" matrix: - - OS=ubuntu DIST=trusty PACK=deb PACKAGECLOUD_REPO="phalcon/dist" + - OS=ubuntu DIST=precise PACK=deb + - OS=ubuntu DIST=trusty PACK=deb + - OS=ubuntu DIST=wily PACK=deb matrix: fast_finish: true allow_failures: + - env: OS=ubuntu DIST=precise PACK=deb - env: OS=ubuntu DIST=trusty PACK=deb + - env: OS=ubuntu DIST=wily PACK=deb before_script: - export LAST_COMMIT=$(cd cphalcon; git rev-parse --short=8 HEAD) - export PARTIAL_VERSION=$(cd cphalcon; cat config.json | jq ".version" | sed -E 's/\"//g') - export VERSION="$PARTIAL_VERSION-$RELEASE-$LAST_COMMIT" + - echo $TRAVIS_BUILD_NUMBER + - echo $TRAVIS_BUILD_ID script: - git clone https://github.com/tarantool/build.git - build/pack/travis.sh notifications: email: recipients: - serghei@phalconphp.com on_success: change on_failure: always
11
0.268293
9
2
3587f9a08a8a6fe40d3a7fa353e25b35cca9f7ca
lib/generators/devise_jwt/install_generator.rb
lib/generators/devise_jwt/install_generator.rb
module DeviseJwt class InstallGenerator < Rails::Generators::Base desc 'Creates a Devise JWT initializer and copy locale files to your application.' source_root File.expand_path('../templates', __FILE__) argument :resource_class, type: :string, default: 'User' def create_initializer_file copy_file 'devise_jwt.rb', 'config/initializers/devise_jwt.rb' end def copy_initializer_file # TODO end def copy_locale copy_file '../../../../config/locales/en.yml', 'config/locales/devise_jwt.en.yml' end # def copy_migrations # # TODO # end # # def create_user_model # # TODO # end end end
module DeviseJwt class InstallGenerator < Rails::Generators::Base desc 'Creates a Devise JWT initializer and copy locale files to your application.' source_root File.expand_path('../templates', __FILE__) argument :resource_class, type: :string, default: 'User' def create_initializer_file copy_file 'initializers/devise_jwt.rb', 'config/initializers/devise_jwt.rb' end def copy_locale copy_file '../../../../config/locales/en.yml', 'config/locales/devise_jwt.en.yml' end end end
Fix incorrect path to initializer devise_jwt.rb file.
Fix incorrect path to initializer devise_jwt.rb file.
Ruby
mit
Alexey79/devise_jwt
ruby
## Code Before: module DeviseJwt class InstallGenerator < Rails::Generators::Base desc 'Creates a Devise JWT initializer and copy locale files to your application.' source_root File.expand_path('../templates', __FILE__) argument :resource_class, type: :string, default: 'User' def create_initializer_file copy_file 'devise_jwt.rb', 'config/initializers/devise_jwt.rb' end def copy_initializer_file # TODO end def copy_locale copy_file '../../../../config/locales/en.yml', 'config/locales/devise_jwt.en.yml' end # def copy_migrations # # TODO # end # # def create_user_model # # TODO # end end end ## Instruction: Fix incorrect path to initializer devise_jwt.rb file. ## Code After: module DeviseJwt class InstallGenerator < Rails::Generators::Base desc 'Creates a Devise JWT initializer and copy locale files to your application.' source_root File.expand_path('../templates', __FILE__) argument :resource_class, type: :string, default: 'User' def create_initializer_file copy_file 'initializers/devise_jwt.rb', 'config/initializers/devise_jwt.rb' end def copy_locale copy_file '../../../../config/locales/en.yml', 'config/locales/devise_jwt.en.yml' end end end
module DeviseJwt class InstallGenerator < Rails::Generators::Base desc 'Creates a Devise JWT initializer and copy locale files to your application.' source_root File.expand_path('../templates', __FILE__) argument :resource_class, type: :string, default: 'User' def create_initializer_file - copy_file 'devise_jwt.rb', 'config/initializers/devise_jwt.rb' + copy_file 'initializers/devise_jwt.rb', 'config/initializers/devise_jwt.rb' ? +++++++++++++ - end - - def copy_initializer_file - # TODO end def copy_locale copy_file '../../../../config/locales/en.yml', 'config/locales/devise_jwt.en.yml' end - - # def copy_migrations - # # TODO - # end - # - # def create_user_model - # # TODO - # end end end
14
0.466667
1
13
e6b92e96cfefdd36dd025c12bf54ae0bdf8262f1
APP/Controllers/PostController.php
APP/Controllers/PostController.php
<?php namespace Examples\blog\APP\Controllers; use Phramework\Phramework; use Phramework\Validate\Validate; use Phramework\Models\Request; use Examples\blog\APP\Models\Post; class PostController { public static function GET($params, $method, $headers) { /*if (($id = Request::resourceId($params)) !== FALSE) { echo '<pre>'; print_r([$params, $method, $headers]); echo '</pre>'; throw new \Phramework\Exceptions\NotImplemented(); }*/ $posts = Post::getAll(); Phramework::view([ 'posts' => $posts, ], 'blog', 'My blog'); //will load viewers/page/blog.php } public static function GETSingle($params, $method, $headers) { $id = Request::requireId($params); $posts = Post::getAll(); array_unshift($posts, []); if ($id == 0 || $id > count($posts) - 1) { throw new \Phramework\Exceptions\NotFound('Post not found'); } Phramework::view([ 'posts' => [$posts[$id]], ], 'blog', 'My blog #' . $id); //will load viewers/page/blog.php } }
<?php namespace Examples\blog\APP\Controllers; use Phramework\Phramework; use Phramework\Validate\Validate; use Phramework\Models\Request; use Examples\blog\APP\Models\Post; class PostController { public static function GET($params, $method, $headers) { /*if (($id = Request::resourceId($params)) !== FALSE) { echo '<pre>'; print_r([$params, $method, $headers]); echo '</pre>'; throw new \Phramework\Exceptions\MissingParametersException\NotImplemented(); }*/ $posts = Post::getAll(); Phramework::view([ 'posts' => $posts, ], 'blog', 'My blog'); //will load viewers/page/blog.php } public static function GETSingle($params, $method, $headers) { $id = Request::requireId($params); $posts = Post::getAll(); array_unshift($posts, []); if ($id == 0 || $id > count($posts) - 1) { throw new \Phramework\Exceptions\NotFoundException('Post not found'); } Phramework::view([ 'posts' => [$posts[$id]], ], 'blog', 'My blog #' . $id); //will load viewers/page/blog.php } }
Change all Exception classes with Exceptions suffix
Change all Exception classes with Exceptions suffix Allow array to be set as method argument in URITemplate
PHP
apache-2.0
phramework/examples-blog
php
## Code Before: <?php namespace Examples\blog\APP\Controllers; use Phramework\Phramework; use Phramework\Validate\Validate; use Phramework\Models\Request; use Examples\blog\APP\Models\Post; class PostController { public static function GET($params, $method, $headers) { /*if (($id = Request::resourceId($params)) !== FALSE) { echo '<pre>'; print_r([$params, $method, $headers]); echo '</pre>'; throw new \Phramework\Exceptions\NotImplemented(); }*/ $posts = Post::getAll(); Phramework::view([ 'posts' => $posts, ], 'blog', 'My blog'); //will load viewers/page/blog.php } public static function GETSingle($params, $method, $headers) { $id = Request::requireId($params); $posts = Post::getAll(); array_unshift($posts, []); if ($id == 0 || $id > count($posts) - 1) { throw new \Phramework\Exceptions\NotFound('Post not found'); } Phramework::view([ 'posts' => [$posts[$id]], ], 'blog', 'My blog #' . $id); //will load viewers/page/blog.php } } ## Instruction: Change all Exception classes with Exceptions suffix Allow array to be set as method argument in URITemplate ## Code After: <?php namespace Examples\blog\APP\Controllers; use Phramework\Phramework; use Phramework\Validate\Validate; use Phramework\Models\Request; use Examples\blog\APP\Models\Post; class PostController { public static function GET($params, $method, $headers) { /*if (($id = Request::resourceId($params)) !== FALSE) { echo '<pre>'; print_r([$params, $method, $headers]); echo '</pre>'; throw new \Phramework\Exceptions\MissingParametersException\NotImplemented(); }*/ $posts = Post::getAll(); Phramework::view([ 'posts' => $posts, ], 'blog', 'My blog'); //will load viewers/page/blog.php } public static function GETSingle($params, $method, $headers) { $id = Request::requireId($params); $posts = Post::getAll(); array_unshift($posts, []); if ($id == 0 || $id > count($posts) - 1) { throw new \Phramework\Exceptions\NotFoundException('Post not found'); } Phramework::view([ 'posts' => [$posts[$id]], ], 'blog', 'My blog #' . $id); //will load viewers/page/blog.php } }
<?php namespace Examples\blog\APP\Controllers; use Phramework\Phramework; use Phramework\Validate\Validate; use Phramework\Models\Request; use Examples\blog\APP\Models\Post; class PostController { public static function GET($params, $method, $headers) { /*if (($id = Request::resourceId($params)) !== FALSE) { echo '<pre>'; print_r([$params, $method, $headers]); echo '</pre>'; - throw new \Phramework\Exceptions\NotImplemented(); + throw new \Phramework\Exceptions\MissingParametersException\NotImplemented(); ? +++++++++++++++++++++++++++ }*/ $posts = Post::getAll(); Phramework::view([ 'posts' => $posts, ], 'blog', 'My blog'); //will load viewers/page/blog.php } public static function GETSingle($params, $method, $headers) { $id = Request::requireId($params); $posts = Post::getAll(); array_unshift($posts, []); if ($id == 0 || $id > count($posts) - 1) { - throw new \Phramework\Exceptions\NotFound('Post not found'); + throw new \Phramework\Exceptions\NotFoundException('Post not found'); ? +++++++++ } Phramework::view([ 'posts' => [$posts[$id]], ], 'blog', 'My blog #' . $id); //will load viewers/page/blog.php } }
4
0.090909
2
2
f20b754995f218050a24052abccfc93777d0419b
test/fastech/string.lisp
test/fastech/string.lisp
(defpackage :test.fastech.string (:use :cl :cl-test-more :fastech)) (in-package :test.fastech.string) (plan 3) (diag "str") (is (parse (str "foo") "foobar") (values "foo" "bar") "parses a string") (diag "satisfy") (flet ((pred (char) (eq char #\a))) (is (parse (satisfy #'pred) "abc") (values #\a "bc") "parses the satisfied char") (is-error (parse (satisfy #'pred) "bac") 'parse-error "failes parsing the satisfied char")) (finalize)
(defpackage :test.fastech.string (:use :cl :cl-test-more :fastech)) (in-package :test.fastech.string) (plan 4) (diag "str") (is (parse (str "foo") "foobar") (values "foo" "bar") "parses a string") (is-error (parse (str "foo") "barfoo") 'parse-error "fails parsing invalid input") (diag "satisfy") (flet ((pred (char) (eq char #\a))) (is (parse (satisfy #'pred) "abc") (values #\a "bc") "parses the satisfied char") (is-error (parse (satisfy #'pred) "bac") 'parse-error "fails parsing the unsatisfied char")) (finalize)
Add a test about str
Add a test about str
Common Lisp
bsd-3-clause
keitax/fastech
common-lisp
## Code Before: (defpackage :test.fastech.string (:use :cl :cl-test-more :fastech)) (in-package :test.fastech.string) (plan 3) (diag "str") (is (parse (str "foo") "foobar") (values "foo" "bar") "parses a string") (diag "satisfy") (flet ((pred (char) (eq char #\a))) (is (parse (satisfy #'pred) "abc") (values #\a "bc") "parses the satisfied char") (is-error (parse (satisfy #'pred) "bac") 'parse-error "failes parsing the satisfied char")) (finalize) ## Instruction: Add a test about str ## Code After: (defpackage :test.fastech.string (:use :cl :cl-test-more :fastech)) (in-package :test.fastech.string) (plan 4) (diag "str") (is (parse (str "foo") "foobar") (values "foo" "bar") "parses a string") (is-error (parse (str "foo") "barfoo") 'parse-error "fails parsing invalid input") (diag "satisfy") (flet ((pred (char) (eq char #\a))) (is (parse (satisfy #'pred) "abc") (values #\a "bc") "parses the satisfied char") (is-error (parse (satisfy #'pred) "bac") 'parse-error "fails parsing the unsatisfied char")) (finalize)
(defpackage :test.fastech.string (:use :cl :cl-test-more :fastech)) (in-package :test.fastech.string) - (plan 3) ? ^ + (plan 4) ? ^ (diag "str") (is (parse (str "foo") "foobar") (values "foo" "bar") "parses a string") + (is-error (parse (str "foo") "barfoo") + 'parse-error + "fails parsing invalid input") (diag "satisfy") (flet ((pred (char) (eq char #\a))) (is (parse (satisfy #'pred) "abc") (values #\a "bc") "parses the satisfied char") (is-error (parse (satisfy #'pred) "bac") 'parse-error - "failes parsing the satisfied char")) ? - + "fails parsing the unsatisfied char")) ? ++ (finalize)
7
0.291667
5
2
ffe5ca2cd9532fc1e8be45eb2c3f5da02b5e7553
findaconf/blueprints/site/coffeescript/init.coffee
findaconf/blueprints/site/coffeescript/init.coffee
$(document).ready -> $('#query').autocompleter { source: '/autocomplete/keywords', offset: 'results', highlightMatches: true } $('#location').autocompleter { source: '/autocomplete/places', offset: 'results', minLength: 4, highlightMatches: true } $('#flash a.close').click(sweet_hide) fix_lang_menu() sweet_hide = -> alert_box = $(this).parent() properties = { height: 'toggle', marginBottom: 'toggle', marginTop: 'toogle', opacity: 'toggle', paddingBottom: 'toggle', paddingTop: 'toogle' } alert_box.animate properties, 'fast', check_flash check_flash = -> flash_area = $('#flash') flash_area.slideUp() if $('li', flash_area).length? fix_lang_menu = -> lang_menu = $('li.lang').first() lang_submenu = $('ul', lang_menu).first() lang_menu_w = lang_menu.width() lang_submenu_w = lang_submenu.width() left_margin = lang_menu_w - (lang_submenu_w + 1) lang_submenu.css 'margin-left', left_margin + 'px'
$(document).ready -> $('#query').autocompleter { source: '/autocomplete/keywords', offset: 'results', highlightMatches: true } $('#location').autocompleter { source: '/autocomplete/places', offset: 'results', minLength: 4, highlightMatches: true } $('#flash a.close').click(sweet_hide) fix_lang_menu() sweet_hide = -> alert_box = $(this).parent() properties = { height: 'toggle', marginBottom: 'toggle', marginTop: 'toogle', opacity: 'toggle', paddingBottom: 'toggle', paddingTop: 'toogle' } alert_box.animate properties, 'fast', check_flash check_flash = -> flash_area = $('#flash') flash_area.slideUp() if not flash_area.find('li:visible').length fix_lang_menu = -> lang_menu = $('li.lang').first() lang_submenu = $('ul', lang_menu).first() lang_menu_w = lang_menu.width() lang_submenu_w = lang_submenu.width() left_margin = lang_menu_w - (lang_submenu_w + 1) lang_submenu.css 'margin-left', left_margin + 'px'
Fix flash message dismiss bug
Fix flash message dismiss bug
CoffeeScript
mit
koorukuroo/findaconf,cuducos/findaconf,koorukuroo/findaconf,cuducos/findaconf,cuducos/findaconf,koorukuroo/findaconf
coffeescript
## Code Before: $(document).ready -> $('#query').autocompleter { source: '/autocomplete/keywords', offset: 'results', highlightMatches: true } $('#location').autocompleter { source: '/autocomplete/places', offset: 'results', minLength: 4, highlightMatches: true } $('#flash a.close').click(sweet_hide) fix_lang_menu() sweet_hide = -> alert_box = $(this).parent() properties = { height: 'toggle', marginBottom: 'toggle', marginTop: 'toogle', opacity: 'toggle', paddingBottom: 'toggle', paddingTop: 'toogle' } alert_box.animate properties, 'fast', check_flash check_flash = -> flash_area = $('#flash') flash_area.slideUp() if $('li', flash_area).length? fix_lang_menu = -> lang_menu = $('li.lang').first() lang_submenu = $('ul', lang_menu).first() lang_menu_w = lang_menu.width() lang_submenu_w = lang_submenu.width() left_margin = lang_menu_w - (lang_submenu_w + 1) lang_submenu.css 'margin-left', left_margin + 'px' ## Instruction: Fix flash message dismiss bug ## Code After: $(document).ready -> $('#query').autocompleter { source: '/autocomplete/keywords', offset: 'results', highlightMatches: true } $('#location').autocompleter { source: '/autocomplete/places', offset: 'results', minLength: 4, highlightMatches: true } $('#flash a.close').click(sweet_hide) fix_lang_menu() sweet_hide = -> alert_box = $(this).parent() properties = { height: 'toggle', marginBottom: 'toggle', marginTop: 'toogle', opacity: 'toggle', paddingBottom: 'toggle', paddingTop: 'toogle' } alert_box.animate properties, 'fast', check_flash check_flash = -> flash_area = $('#flash') flash_area.slideUp() if not flash_area.find('li:visible').length fix_lang_menu = -> lang_menu = $('li.lang').first() lang_submenu = $('ul', lang_menu).first() lang_menu_w = lang_menu.width() lang_submenu_w = lang_submenu.width() left_margin = lang_menu_w - (lang_submenu_w + 1) lang_submenu.css 'margin-left', left_margin + 'px'
$(document).ready -> $('#query').autocompleter { source: '/autocomplete/keywords', offset: 'results', highlightMatches: true } $('#location').autocompleter { source: '/autocomplete/places', offset: 'results', minLength: 4, highlightMatches: true } $('#flash a.close').click(sweet_hide) fix_lang_menu() sweet_hide = -> alert_box = $(this).parent() properties = { height: 'toggle', marginBottom: 'toggle', marginTop: 'toogle', opacity: 'toggle', paddingBottom: 'toggle', paddingTop: 'toogle' } alert_box.animate properties, 'fast', check_flash check_flash = -> flash_area = $('#flash') - flash_area.slideUp() if $('li', flash_area).length? ? ^^^^^^^ - + flash_area.slideUp() if not flash_area.find('li:visible').length ? ^^^ ++++++++++++++++++ fix_lang_menu = -> lang_menu = $('li.lang').first() lang_submenu = $('ul', lang_menu).first() lang_menu_w = lang_menu.width() lang_submenu_w = lang_submenu.width() left_margin = lang_menu_w - (lang_submenu_w + 1) lang_submenu.css 'margin-left', left_margin + 'px'
2
0.047619
1
1
4f9d03c3cc85abd4778762a289c2d966c2f39d89
README.md
README.md
Example Voting App ================== This is an example Docker app with multiple services. It is run with Docker Compose and uses Docker Networking to connect containers together. More info at https://blog.docker.com/2015/11/docker-toolbox-compose/ Architecture ----- * A Python webapp which lets you vote between two options * A Redis queue which collects new votes * A Java worker which consumes votes and stores them in… * A Postgres database backed by a Docker volume * A Node.js webapp which shows the results of the voting in real time Running ------- Since this app makes use of Compose's experimental networking support, it must be started with: $ cd vote-apps/ $ docker-compose --x-networking up -d The app will be running on port 5000 on your Docker host, and the results will be on port 5001.
Example Voting App ================== This is an example Docker app with multiple services. It is run with Docker Compose and uses Docker Networking to connect containers together. More info at https://blog.docker.com/2015/11/docker-toolbox-compose/ Architecture ----- * A Python webapp which lets you vote between two options * A Redis queue which collects new votes * A Java worker which consumes votes and stores them in… * A Postgres database backed by a Docker volume * A Node.js webapp which shows the results of the voting in real time Running ------- Since this app makes use of Compose's experimental networking support, it must be started with: $ cd vote-apps/ $ docker-compose --x-networking up -d The app will be running on port 5000 on your Docker host, and the results will be on port 5001. Docker Hub images ----------------- Docker Hub images for services in this app are built automatically from master: - [docker/example-voting-app-voting-app](https://hub.docker.com/r/docker/example-voting-app-voting-app/) - [docker/example-voting-app-results-app](https://hub.docker.com/r/docker/example-voting-app-results-app/) - [docker/example-voting-app-worker](https://hub.docker.com/r/docker/example-voting-app-worker/)
Add Docker Hub images to readme
Add Docker Hub images to readme Signed-off-by: Ben Firshman <73675debcd8a436be48ec22211dcf44fe0df0a64@firshman.co.uk>
Markdown
apache-2.0
chrisdias/example-voting-app,TeamHeqing/voting-app,reshma-k/example-voting-app,ashikmohammed12/testrepo,monisallam/docker_jenkins_app,sergey-korolev/demo-app,ashikmohammed12/testrepo,reshma-k/example-voting-app,reshma-k/example-voting-app,TeamHeqing/voting-app,kavisuresh/example-voting-app,reedflinch/example-voting-app,sergey-korolev/demo-app,reedflinch/example-voting-app,chrisdias/example-voting-app,monisallam/docker_jenkins_app,TeamHeqing/voting-app,kavisuresh/example-voting-app,monisallam/docker_jenkins_app,sergey-korolev/demo-app,reshma-k/example-voting-app,ashikmohammed12/testrepo,sergey-korolev/demo-app,TeamHeqing/voting-app,sergey-korolev/demo-app,TeamHeqing/voting-app,reedflinch/example-voting-app,monisallam/docker_jenkins_app,chrisdias/example-voting-app,chrisdias/example-voting-app,sergey-korolev/demo-app,reshma-k/example-voting-app,chrisdias/example-voting-app,ashikmohammed12/testrepo,reshma-k/example-voting-app,kavisuresh/example-voting-app,reedflinch/example-voting-app,monisallam/docker_jenkins_app
markdown
## Code Before: Example Voting App ================== This is an example Docker app with multiple services. It is run with Docker Compose and uses Docker Networking to connect containers together. More info at https://blog.docker.com/2015/11/docker-toolbox-compose/ Architecture ----- * A Python webapp which lets you vote between two options * A Redis queue which collects new votes * A Java worker which consumes votes and stores them in… * A Postgres database backed by a Docker volume * A Node.js webapp which shows the results of the voting in real time Running ------- Since this app makes use of Compose's experimental networking support, it must be started with: $ cd vote-apps/ $ docker-compose --x-networking up -d The app will be running on port 5000 on your Docker host, and the results will be on port 5001. ## Instruction: Add Docker Hub images to readme Signed-off-by: Ben Firshman <73675debcd8a436be48ec22211dcf44fe0df0a64@firshman.co.uk> ## Code After: Example Voting App ================== This is an example Docker app with multiple services. It is run with Docker Compose and uses Docker Networking to connect containers together. More info at https://blog.docker.com/2015/11/docker-toolbox-compose/ Architecture ----- * A Python webapp which lets you vote between two options * A Redis queue which collects new votes * A Java worker which consumes votes and stores them in… * A Postgres database backed by a Docker volume * A Node.js webapp which shows the results of the voting in real time Running ------- Since this app makes use of Compose's experimental networking support, it must be started with: $ cd vote-apps/ $ docker-compose --x-networking up -d The app will be running on port 5000 on your Docker host, and the results will be on port 5001. Docker Hub images ----------------- Docker Hub images for services in this app are built automatically from master: - [docker/example-voting-app-voting-app](https://hub.docker.com/r/docker/example-voting-app-voting-app/) - [docker/example-voting-app-results-app](https://hub.docker.com/r/docker/example-voting-app-results-app/) - [docker/example-voting-app-worker](https://hub.docker.com/r/docker/example-voting-app-worker/)
Example Voting App ================== This is an example Docker app with multiple services. It is run with Docker Compose and uses Docker Networking to connect containers together. More info at https://blog.docker.com/2015/11/docker-toolbox-compose/ Architecture ----- * A Python webapp which lets you vote between two options * A Redis queue which collects new votes * A Java worker which consumes votes and stores them in… * A Postgres database backed by a Docker volume * A Node.js webapp which shows the results of the voting in real time Running ------- Since this app makes use of Compose's experimental networking support, it must be started with: $ cd vote-apps/ $ docker-compose --x-networking up -d The app will be running on port 5000 on your Docker host, and the results will be on port 5001. + + Docker Hub images + ----------------- + + Docker Hub images for services in this app are built automatically from master: + + - [docker/example-voting-app-voting-app](https://hub.docker.com/r/docker/example-voting-app-voting-app/) + - [docker/example-voting-app-results-app](https://hub.docker.com/r/docker/example-voting-app-results-app/) + - [docker/example-voting-app-worker](https://hub.docker.com/r/docker/example-voting-app-worker/)
9
0.36
9
0
62758b5a857407a1d4ee633021b5c927bfc90639
system/kissmvc.php
system/kissmvc.php
<?php require('kissmvc_core.php'); //=============================================================== // Engine //=============================================================== class Engine extends KISS_Engine { function request_not_found( $msg='' ) { header( "HTTP/1.0 404 Not Found" ); die( '<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p>Please go <a href="javascript: history.back( 1 )">back</a> and try again.</p><hr /><p>Powered By: <a href="http://kissmvc.com">KISSMVC</a></p></body></html>' ); } } //=============================================================== // Controller //=============================================================== class Controller extends KISS_Controller { } //=============================================================== // Model/ORM //=============================================================== class Model extends KISS_Model { } //=============================================================== // View //=============================================================== class View extends KISS_View { }
<?php require('kissmvc_core.php'); //=============================================================== // Engine //=============================================================== class Engine extends KISS_Engine { function request_not_found( $msg='' ) { header( "HTTP/1.0 404 Not Found" ); die( '<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p>Please go <a href="javascript: history.back( 1 )">back</a> and try again.</p><hr /><p>Powered By: <a href="http://kissmvc.com">KISSMVC</a></p></body></html>' ); } } //=============================================================== // Controller //=============================================================== class Controller extends KISS_Controller { } //=============================================================== // Model/ORM //=============================================================== class Model extends KISS_Model { function save() { // one function to either create or update! if ($this->rs[$this->pkname] == '') { //primary key is empty, so create $this->create(); } else { //primary key exists, so update $this->update(); } } } //=============================================================== // View //=============================================================== class View extends KISS_View { }
Include missing save method for Model class
Include missing save method for Model class
PHP
mit
matt-cahill/munkireport-php,n8felton/munkireport-php,matt-cahill/munkireport-php,munkireport/munkireport-php,poundbangbash/munkireport-php,poundbangbash/munkireport-php,childrss/munkireport-php,gmarnin/munkireport-php,childrss/munkireport-php,n8felton/munkireport-php,gmarnin/munkireport-php,dannooooo/munkireport-php,gmarnin/munkireport-php,dannooooo/munkireport-php,matt-cahill/munkireport-php,munkireport/munkireport-php,matt-cahill/munkireport-php,childrss/munkireport-php,n8felton/munkireport-php,childrss/munkireport-php,n8felton/munkireport-php,gmarnin/munkireport-php,matt-cahill/munkireport-php,n8felton/munkireport-php,n8felton/munkireport-php,poundbangbash/munkireport-php,dannooooo/munkireport-php,munkireport/munkireport-php,dannooooo/munkireport-php,munkireport/munkireport-php,poundbangbash/munkireport-php,childrss/munkireport-php,dannooooo/munkireport-php,matt-cahill/munkireport-php,dannooooo/munkireport-php,childrss/munkireport-php,gmarnin/munkireport-php,poundbangbash/munkireport-php,munkireport/munkireport-php
php
## Code Before: <?php require('kissmvc_core.php'); //=============================================================== // Engine //=============================================================== class Engine extends KISS_Engine { function request_not_found( $msg='' ) { header( "HTTP/1.0 404 Not Found" ); die( '<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p>Please go <a href="javascript: history.back( 1 )">back</a> and try again.</p><hr /><p>Powered By: <a href="http://kissmvc.com">KISSMVC</a></p></body></html>' ); } } //=============================================================== // Controller //=============================================================== class Controller extends KISS_Controller { } //=============================================================== // Model/ORM //=============================================================== class Model extends KISS_Model { } //=============================================================== // View //=============================================================== class View extends KISS_View { } ## Instruction: Include missing save method for Model class ## Code After: <?php require('kissmvc_core.php'); //=============================================================== // Engine //=============================================================== class Engine extends KISS_Engine { function request_not_found( $msg='' ) { header( "HTTP/1.0 404 Not Found" ); die( '<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p>Please go <a href="javascript: history.back( 1 )">back</a> and try again.</p><hr /><p>Powered By: <a href="http://kissmvc.com">KISSMVC</a></p></body></html>' ); } } //=============================================================== // Controller //=============================================================== class Controller extends KISS_Controller { } //=============================================================== // Model/ORM //=============================================================== class Model extends KISS_Model { function save() { // one function to either create or update! if ($this->rs[$this->pkname] == '') { //primary key is empty, so create $this->create(); } else { //primary key exists, so update $this->update(); } } } //=============================================================== // View //=============================================================== class View extends KISS_View { }
<?php require('kissmvc_core.php'); //=============================================================== // Engine //=============================================================== class Engine extends KISS_Engine { function request_not_found( $msg='' ) { header( "HTTP/1.0 404 Not Found" ); die( '<html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p><p>Please go <a href="javascript: history.back( 1 )">back</a> and try again.</p><hr /><p>Powered By: <a href="http://kissmvc.com">KISSMVC</a></p></body></html>' ); } } //=============================================================== // Controller //=============================================================== class Controller extends KISS_Controller { } //=============================================================== // Model/ORM //=============================================================== class Model extends KISS_Model { - + function save() { + // one function to either create or update! + if ($this->rs[$this->pkname] == '') + { + //primary key is empty, so create + $this->create(); + } + else + { + //primary key exists, so update + $this->update(); + } + } } //=============================================================== // View //=============================================================== class View extends KISS_View { }
14
0.35
13
1
2a17b9fdb55806d6397f506066a2a7e8c480020b
pylinks/main/tests.py
pylinks/main/tests.py
from django.test import TestCase from analytics.models import GoogleAnalytics class GoogleAnalyticsTests(TestCase): def test_ga_tracking(self): GoogleAnalytics(site_id=1, web_property_id='12345').save() response = self.client.get('/') self.assertContains(response, "_gaq.push(['_setAccount', '12345']);")
from django.test import TestCase from analytics.models import GoogleAnalytics class GoogleAnalyticsTests(TestCase): def test_ga_tracking(self): GoogleAnalytics(site_id=1, web_property_id='12345').save() response = self.client.get('/') self.assertContains(response, "_gaq.push(['_setAccount', '12345']);") class AdminTests(TestCase): def test_admin_login_loads(self): self.assertEqual(self.client.get('/admin/login/').status_code, 200)
Add simple admin test just so we catch breakage early
Add simple admin test just so we catch breakage early
Python
mit
michaelmior/pylinks,michaelmior/pylinks,michaelmior/pylinks
python
## Code Before: from django.test import TestCase from analytics.models import GoogleAnalytics class GoogleAnalyticsTests(TestCase): def test_ga_tracking(self): GoogleAnalytics(site_id=1, web_property_id='12345').save() response = self.client.get('/') self.assertContains(response, "_gaq.push(['_setAccount', '12345']);") ## Instruction: Add simple admin test just so we catch breakage early ## Code After: from django.test import TestCase from analytics.models import GoogleAnalytics class GoogleAnalyticsTests(TestCase): def test_ga_tracking(self): GoogleAnalytics(site_id=1, web_property_id='12345').save() response = self.client.get('/') self.assertContains(response, "_gaq.push(['_setAccount', '12345']);") class AdminTests(TestCase): def test_admin_login_loads(self): self.assertEqual(self.client.get('/admin/login/').status_code, 200)
from django.test import TestCase from analytics.models import GoogleAnalytics class GoogleAnalyticsTests(TestCase): def test_ga_tracking(self): GoogleAnalytics(site_id=1, web_property_id='12345').save() response = self.client.get('/') self.assertContains(response, "_gaq.push(['_setAccount', '12345']);") + + class AdminTests(TestCase): + def test_admin_login_loads(self): + self.assertEqual(self.client.get('/admin/login/').status_code, 200)
4
0.444444
4
0
eb53145bdda3888bab7e94809d6a412ae0edb733
_includes/activity-stream.html
_includes/activity-stream.html
<div class=""><!-- <div class="pin-wall pat-packery"> --> {% for item in site.data.[include.src] %} <div class=""><!-- <div class="item columns-2"> --> {% include post.html %} </div> {% endfor %} </div>
{% for item in site.data.[include.src] %} {% include post.html %} {% endfor %}
Tidy up activity stream template
Tidy up activity stream template
HTML
bsd-3-clause
garbas/ploneintranet.prototype,garbas/ploneintranet.prototype,garbas/ploneintranet.prototype
html
## Code Before: <div class=""><!-- <div class="pin-wall pat-packery"> --> {% for item in site.data.[include.src] %} <div class=""><!-- <div class="item columns-2"> --> {% include post.html %} </div> {% endfor %} </div> ## Instruction: Tidy up activity stream template ## Code After: {% for item in site.data.[include.src] %} {% include post.html %} {% endfor %}
- <div class=""><!-- <div class="pin-wall pat-packery"> --> - {% for item in site.data.[include.src] %} ? ---- + {% for item in site.data.[include.src] %} - <div class=""><!-- <div class="item columns-2"> --> - {% include post.html %} ? -------- + {% include post.html %} - </div> - {% endfor %} ? - + {% endfor %} - </div>
10
1.428571
3
7
d623b9904e4fa1967d8f83b45d39c9b57d2a4b0e
DDSP/Header.py
DDSP/Header.py
import struct import random from MessageType import MessageType class Header: """docstring for Header""" def __init__(self, type = MessageType.undefined): self.type = type self.length = 0 self.port = 0 def encapsulate(self): return struct.pack("!BHH", self.type, self.length, self.port) def decapsulate(self, data): header = struct.unpack("!BHH", data) self.type = header[0] self.length = header[1] self.port = header[2] """Write the test code here""" if __name__ == '__main__': header = Header(MessageType.query) print str(header.port) header.length = 1 header.decapsulate(header.encapsulate()) print header.type print header.length print header.port print "Header class should work if you see this"
import struct import random from MessageType import MessageType class Header: """docstring for Header""" def __init__(self, type = MessageType.undefined): self.version = 1 self.type = type self.length = 0 self.port = 0 def encapsulate(self): return struct.pack("!BBHH", self.version, self.type, self.length, self.port) def decapsulate(self, data): header = struct.unpack("!BBHH", data) self.version = header[0] self.type = header[1] self.length = header[2] self.port = header[3] """Write the test code here""" if __name__ == '__main__': header = Header(MessageType.query) print str(header.port) header.length = 1 header.decapsulate(header.encapsulate()) print header.version print header.type print header.length print header.port print "Header class should work if you see this"
Add a version field into the header.
Add a version field into the header.
Python
mit
CharKwayTeow/ddsp
python
## Code Before: import struct import random from MessageType import MessageType class Header: """docstring for Header""" def __init__(self, type = MessageType.undefined): self.type = type self.length = 0 self.port = 0 def encapsulate(self): return struct.pack("!BHH", self.type, self.length, self.port) def decapsulate(self, data): header = struct.unpack("!BHH", data) self.type = header[0] self.length = header[1] self.port = header[2] """Write the test code here""" if __name__ == '__main__': header = Header(MessageType.query) print str(header.port) header.length = 1 header.decapsulate(header.encapsulate()) print header.type print header.length print header.port print "Header class should work if you see this" ## Instruction: Add a version field into the header. ## Code After: import struct import random from MessageType import MessageType class Header: """docstring for Header""" def __init__(self, type = MessageType.undefined): self.version = 1 self.type = type self.length = 0 self.port = 0 def encapsulate(self): return struct.pack("!BBHH", self.version, self.type, self.length, self.port) def decapsulate(self, data): header = struct.unpack("!BBHH", data) self.version = header[0] self.type = header[1] self.length = header[2] self.port = header[3] """Write the test code here""" if __name__ == '__main__': header = Header(MessageType.query) print str(header.port) header.length = 1 header.decapsulate(header.encapsulate()) print header.version print header.type print header.length print header.port print "Header class should work if you see this"
import struct import random from MessageType import MessageType class Header: """docstring for Header""" def __init__(self, type = MessageType.undefined): + self.version = 1 self.type = type self.length = 0 self.port = 0 def encapsulate(self): - return struct.pack("!BHH", self.type, self.length, self.port) + return struct.pack("!BBHH", self.version, self.type, self.length, self.port) ? + ++++++++++++++ def decapsulate(self, data): - header = struct.unpack("!BHH", data) + header = struct.unpack("!BBHH", data) ? + + self.version = header[0] - self.type = header[0] ? ^ + self.type = header[1] ? ^ - self.length = header[1] ? ^ + self.length = header[2] ? ^ - self.port = header[2] ? ^ + self.port = header[3] ? ^ """Write the test code here""" if __name__ == '__main__': header = Header(MessageType.query) print str(header.port) header.length = 1 header.decapsulate(header.encapsulate()) + print header.version print header.type print header.length print header.port print "Header class should work if you see this"
13
0.419355
8
5
38308241335cff596feadfa3fe9f8dfdeb7ebec7
app/scripts/configs/modes/cost-tracking.js
app/scripts/configs/modes/cost-tracking.js
'use strict'; angular.module('ncsaas') .constant('MODE', { modeName: 'modeCostTracking', toBeFeatures: [ 'resources', 'payment', 'eventlog', 'localSignup', 'users', 'people', 'backups', 'templates', 'monitoring', 'projectGroups' ], featuresVisible: false, homeTemplate: 'views/home/costtracking/home.html', initialDataTemplate: 'views/initial-data/initial-data.html' });
'use strict'; angular.module('ncsaas') .constant('MODE', { modeName: 'modeCostTracking', toBeFeatures: [ 'resources', 'payment', 'eventlog', 'localSignup', 'users', 'people', 'backups', 'templates', 'monitoring', 'projectGroups', 'premiumSupport' ], featuresVisible: false, homeTemplate: 'views/home/costtracking/home.html', initialDataTemplate: 'views/initial-data/initial-data.html' });
Disable premium support for cost mode (SAAS-751)
Disable premium support for cost mode (SAAS-751)
JavaScript
mit
opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport
javascript
## Code Before: 'use strict'; angular.module('ncsaas') .constant('MODE', { modeName: 'modeCostTracking', toBeFeatures: [ 'resources', 'payment', 'eventlog', 'localSignup', 'users', 'people', 'backups', 'templates', 'monitoring', 'projectGroups' ], featuresVisible: false, homeTemplate: 'views/home/costtracking/home.html', initialDataTemplate: 'views/initial-data/initial-data.html' }); ## Instruction: Disable premium support for cost mode (SAAS-751) ## Code After: 'use strict'; angular.module('ncsaas') .constant('MODE', { modeName: 'modeCostTracking', toBeFeatures: [ 'resources', 'payment', 'eventlog', 'localSignup', 'users', 'people', 'backups', 'templates', 'monitoring', 'projectGroups', 'premiumSupport' ], featuresVisible: false, homeTemplate: 'views/home/costtracking/home.html', initialDataTemplate: 'views/initial-data/initial-data.html' });
'use strict'; angular.module('ncsaas') .constant('MODE', { modeName: 'modeCostTracking', toBeFeatures: [ 'resources', 'payment', 'eventlog', 'localSignup', 'users', 'people', 'backups', 'templates', 'monitoring', - 'projectGroups' + 'projectGroups', ? + + 'premiumSupport' ], featuresVisible: false, homeTemplate: 'views/home/costtracking/home.html', initialDataTemplate: 'views/initial-data/initial-data.html' });
3
0.142857
2
1
d6c8bcdb9f6368a4d7eb5c33fa23c8e2be35b180
doc/recipes/apache-reverse.md
doc/recipes/apache-reverse.md
As XO-web and XO-server communicates with *WebSockets*, you need to have the `mod_proxy_tunnel` in Apache (please [check the Apache documentation](http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html) about it). It's available for Apache 2.4.5 and later. Please use this configuration in this order or it will not work: ``` ProxyPass /api/ ws://<xo-server ip>:<xo-server port>/api/ ProxyPassReverse /api/ ws://<xo-server ip>:<xo-server port>/api/ ProxyPass /consoles/ ws://<xo-server ip>:<xo-server port>/consoles/ ProxyPassReverse /consoles/ ws://<xo-server ip>:<xo-server port>/consoles/ ProxyPass / http://<xo-server ip>:<xo-server port>/ ProxyPassReverse / http://<xo-server ip>:<xo-server port>/ ```
As XO-web and XO-server communicates with *WebSockets*, you need to have the `mod_proxy_wstunnel` in Apache (please [check the Apache documentation](http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html) about it). It's available for Apache 2.4.5 and later. Please use this configuration in this order or it will not work: ```apache ProxyPass /[<path>] http://<xo-server ip>:<xo-server port>/ ProxyPass /[<path>] ws://<xo-server ip>:<xo-server port>/ ProxyPassReverse /[<path>] / ```
Fix path in Apache proxy.
Fix path in Apache proxy.
Markdown
agpl-3.0
vatesfr/xo-web,lmcro/xo-web,vatesfr/xo-web,lmcro/xo-web,lmcro/xo-web
markdown
## Code Before: As XO-web and XO-server communicates with *WebSockets*, you need to have the `mod_proxy_tunnel` in Apache (please [check the Apache documentation](http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html) about it). It's available for Apache 2.4.5 and later. Please use this configuration in this order or it will not work: ``` ProxyPass /api/ ws://<xo-server ip>:<xo-server port>/api/ ProxyPassReverse /api/ ws://<xo-server ip>:<xo-server port>/api/ ProxyPass /consoles/ ws://<xo-server ip>:<xo-server port>/consoles/ ProxyPassReverse /consoles/ ws://<xo-server ip>:<xo-server port>/consoles/ ProxyPass / http://<xo-server ip>:<xo-server port>/ ProxyPassReverse / http://<xo-server ip>:<xo-server port>/ ``` ## Instruction: Fix path in Apache proxy. ## Code After: As XO-web and XO-server communicates with *WebSockets*, you need to have the `mod_proxy_wstunnel` in Apache (please [check the Apache documentation](http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html) about it). It's available for Apache 2.4.5 and later. Please use this configuration in this order or it will not work: ```apache ProxyPass /[<path>] http://<xo-server ip>:<xo-server port>/ ProxyPass /[<path>] ws://<xo-server ip>:<xo-server port>/ ProxyPassReverse /[<path>] / ```
- As XO-web and XO-server communicates with *WebSockets*, you need to have the `mod_proxy_tunnel` in Apache (please [check the Apache documentation](http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html) about it). It's available for Apache 2.4.5 and later. + As XO-web and XO-server communicates with *WebSockets*, you need to have the `mod_proxy_wstunnel` in Apache (please [check the Apache documentation](http://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html) about it). It's available for Apache 2.4.5 and later. ? ++ Please use this configuration in this order or it will not work: + ```apache + ProxyPass /[<path>] http://<xo-server ip>:<xo-server port>/ + ProxyPass /[<path>] ws://<xo-server ip>:<xo-server port>/ + + ProxyPassReverse /[<path>] / ``` - ProxyPass /api/ ws://<xo-server ip>:<xo-server port>/api/ - ProxyPassReverse /api/ ws://<xo-server ip>:<xo-server port>/api/ - - ProxyPass /consoles/ ws://<xo-server ip>:<xo-server port>/consoles/ - ProxyPassReverse /consoles/ ws://<xo-server ip>:<xo-server port>/consoles/ - - ProxyPass / http://<xo-server ip>:<xo-server port>/ - ProxyPassReverse / http://<xo-server ip>:<xo-server port>/ - ```
16
1
6
10
123819a1d4e5982f34d7245500adf8e6b20c1cbd
.travis.yml
.travis.yml
language: go go: - 1.5 env: - GOARCH=amd64 install: - make ci_bootstrap script: - GO15VENDOREXPERIMENT=1 make ci_test notifications: email: on_success: change on_failure: always
language: go go: - 1.5 env: - GOARCH=amd64 install: - GO15VENDOREXPERIMENT=1 make ci_bootstrap script: - GO15VENDOREXPERIMENT=1 make ci_test notifications: email: on_success: change on_failure: always
Set GO15VENDOREXPERIMENT=1 variable on ci bootstrap
Set GO15VENDOREXPERIMENT=1 variable on ci bootstrap Signed-off-by: Xabier Larrakoetxea <30fb0ea44f2104eb1a81e793d922a064c3916c2f@gmail.com>
YAML
apache-2.0
slok/khronos,slok/khronos
yaml
## Code Before: language: go go: - 1.5 env: - GOARCH=amd64 install: - make ci_bootstrap script: - GO15VENDOREXPERIMENT=1 make ci_test notifications: email: on_success: change on_failure: always ## Instruction: Set GO15VENDOREXPERIMENT=1 variable on ci bootstrap Signed-off-by: Xabier Larrakoetxea <30fb0ea44f2104eb1a81e793d922a064c3916c2f@gmail.com> ## Code After: language: go go: - 1.5 env: - GOARCH=amd64 install: - GO15VENDOREXPERIMENT=1 make ci_bootstrap script: - GO15VENDOREXPERIMENT=1 make ci_test notifications: email: on_success: change on_failure: always
language: go go: - 1.5 env: - GOARCH=amd64 install: - - make ci_bootstrap + - GO15VENDOREXPERIMENT=1 make ci_bootstrap script: - GO15VENDOREXPERIMENT=1 make ci_test notifications: email: on_success: change on_failure: always
2
0.111111
1
1
8495c2cc9f0cd718de5f2bedc8ef3bac1b590134
src/Oro/Bundle/EmailBundle/Tests/Unit/Form/Model/EmailTest.php
src/Oro/Bundle/EmailBundle/Tests/Unit/Form/Model/EmailTest.php
<?php namespace Oro\Bundle\EmailBundle\Tests\Unit\Form\Model; use Symfony\Component\PropertyAccess\PropertyAccess; use Oro\Bundle\EmailBundle\Form\Model\Email; class EmailTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider propertiesDataProvider * @param string $property * @param mixed $value */ public function testSettersAndGetters($property, $value) { $obj = new Email(); $accessor = PropertyAccess::createPropertyAccessor(); $accessor->setValue($obj, $property, $value); $this->assertEquals($value, $accessor->getValue($obj, $property)); } public function propertiesDataProvider() { return [ ['gridName', 'testGridName'], ['entityClass', 'testEntityClass'], ['entityId', 123], ['from', 'test@example.com'], ['to', ['testGridName']], ['subject', 'testSubject'], ['body', 'testBody'], ['gridName', 'testGridName'], ['gridName', 'testGridName'], ['gridName', 'testGridName'], ['gridName', 'testGridName'], ]; } public function testHasEntity() { $obj = new Email(); $this->assertFalse($obj->hasEntity()); $obj->setEntityClass('Test\Entity'); $this->assertFalse($obj->hasEntity()); $obj->setEntityId(123); $this->assertTrue($obj->hasEntity()); $obj->setEntityClass(null); $this->assertFalse($obj->hasEntity()); } }
<?php namespace Oro\Bundle\EmailBundle\Tests\Unit\Form\Model; use Oro\Bundle\EmailBundle\Entity\EmailTemplate; use Symfony\Component\PropertyAccess\PropertyAccess; use Oro\Bundle\EmailBundle\Form\Model\Email; class EmailTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider propertiesDataProvider * @param string $property * @param mixed $value */ public function testSettersAndGetters($property, $value) { $obj = new Email(); $accessor = PropertyAccess::createPropertyAccessor(); $accessor->setValue($obj, $property, $value); $this->assertEquals($value, $accessor->getValue($obj, $property)); } public function propertiesDataProvider() { return [ ['gridName', 'testGridName'], ['entityClass', 'testEntityClass'], ['entityId', 123], ['from', 'test@example.com'], ['to', ['testGridName']], ['subject', 'testSubject'], ['body', 'testBody'], ['gridName', 'testGridName'], ['template', new EmailTemplate('test')], ]; } public function testHasEntity() { $obj = new Email(); $this->assertFalse($obj->hasEntity()); $obj->setEntityClass('Test\Entity'); $this->assertFalse($obj->hasEntity()); $obj->setEntityId(123); $this->assertTrue($obj->hasEntity()); $obj->setEntityClass(null); $this->assertFalse($obj->hasEntity()); } }
Adjust EmailType form type to use email templates selector - update unit tests
CRM-1648: Adjust EmailType form type to use email templates selector - update unit tests
PHP
mit
hugeval/platform,northdakota/platform,Djamy/platform,northdakota/platform,hugeval/platform,ramunasd/platform,geoffroycochard/platform,morontt/platform,trustify/oroplatform,2ndkauboy/platform,trustify/oroplatform,ramunasd/platform,trustify/oroplatform,orocrm/platform,geoffroycochard/platform,Djamy/platform,hugeval/platform,morontt/platform,geoffroycochard/platform,2ndkauboy/platform,ramunasd/platform,Djamy/platform,2ndkauboy/platform,orocrm/platform,northdakota/platform,orocrm/platform,morontt/platform
php
## Code Before: <?php namespace Oro\Bundle\EmailBundle\Tests\Unit\Form\Model; use Symfony\Component\PropertyAccess\PropertyAccess; use Oro\Bundle\EmailBundle\Form\Model\Email; class EmailTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider propertiesDataProvider * @param string $property * @param mixed $value */ public function testSettersAndGetters($property, $value) { $obj = new Email(); $accessor = PropertyAccess::createPropertyAccessor(); $accessor->setValue($obj, $property, $value); $this->assertEquals($value, $accessor->getValue($obj, $property)); } public function propertiesDataProvider() { return [ ['gridName', 'testGridName'], ['entityClass', 'testEntityClass'], ['entityId', 123], ['from', 'test@example.com'], ['to', ['testGridName']], ['subject', 'testSubject'], ['body', 'testBody'], ['gridName', 'testGridName'], ['gridName', 'testGridName'], ['gridName', 'testGridName'], ['gridName', 'testGridName'], ]; } public function testHasEntity() { $obj = new Email(); $this->assertFalse($obj->hasEntity()); $obj->setEntityClass('Test\Entity'); $this->assertFalse($obj->hasEntity()); $obj->setEntityId(123); $this->assertTrue($obj->hasEntity()); $obj->setEntityClass(null); $this->assertFalse($obj->hasEntity()); } } ## Instruction: CRM-1648: Adjust EmailType form type to use email templates selector - update unit tests ## Code After: <?php namespace Oro\Bundle\EmailBundle\Tests\Unit\Form\Model; use Oro\Bundle\EmailBundle\Entity\EmailTemplate; use Symfony\Component\PropertyAccess\PropertyAccess; use Oro\Bundle\EmailBundle\Form\Model\Email; class EmailTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider propertiesDataProvider * @param string $property * @param mixed $value */ public function testSettersAndGetters($property, $value) { $obj = new Email(); $accessor = PropertyAccess::createPropertyAccessor(); $accessor->setValue($obj, $property, $value); $this->assertEquals($value, $accessor->getValue($obj, $property)); } public function propertiesDataProvider() { return [ ['gridName', 'testGridName'], ['entityClass', 'testEntityClass'], ['entityId', 123], ['from', 'test@example.com'], ['to', ['testGridName']], ['subject', 'testSubject'], ['body', 'testBody'], ['gridName', 'testGridName'], ['template', new EmailTemplate('test')], ]; } public function testHasEntity() { $obj = new Email(); $this->assertFalse($obj->hasEntity()); $obj->setEntityClass('Test\Entity'); $this->assertFalse($obj->hasEntity()); $obj->setEntityId(123); $this->assertTrue($obj->hasEntity()); $obj->setEntityClass(null); $this->assertFalse($obj->hasEntity()); } }
<?php namespace Oro\Bundle\EmailBundle\Tests\Unit\Form\Model; + use Oro\Bundle\EmailBundle\Entity\EmailTemplate; use Symfony\Component\PropertyAccess\PropertyAccess; use Oro\Bundle\EmailBundle\Form\Model\Email; class EmailTest extends \PHPUnit_Framework_TestCase { /** * @dataProvider propertiesDataProvider * @param string $property * @param mixed $value */ public function testSettersAndGetters($property, $value) { $obj = new Email(); $accessor = PropertyAccess::createPropertyAccessor(); $accessor->setValue($obj, $property, $value); $this->assertEquals($value, $accessor->getValue($obj, $property)); } public function propertiesDataProvider() { return [ ['gridName', 'testGridName'], ['entityClass', 'testEntityClass'], ['entityId', 123], ['from', 'test@example.com'], ['to', ['testGridName']], ['subject', 'testSubject'], ['body', 'testBody'], ['gridName', 'testGridName'], + ['template', new EmailTemplate('test')], - ['gridName', 'testGridName'], - ['gridName', 'testGridName'], - ['gridName', 'testGridName'], ]; } public function testHasEntity() { $obj = new Email(); $this->assertFalse($obj->hasEntity()); $obj->setEntityClass('Test\Entity'); $this->assertFalse($obj->hasEntity()); $obj->setEntityId(123); $this->assertTrue($obj->hasEntity()); $obj->setEntityClass(null); $this->assertFalse($obj->hasEntity()); } }
5
0.089286
2
3
d354c3164e96c94af68c3b192addf5fd669f3ad4
lib/vagrant-proxyconf/action.rb
lib/vagrant-proxyconf/action.rb
require_relative 'action/configure_apt_proxy' require_relative 'action/configure_chef_proxy' require_relative 'action/configure_env_proxy' module VagrantPlugins module ProxyConf # Middleware stack builders class Action # Returns an action middleware stack that configures the VM def self.configure @configure ||= Vagrant::Action::Builder.new.tap do |b| b.use ConfigureEnvProxy b.use ConfigureChefProxy b.use ConfigureAptProxy end end end end end
require_relative 'action/configure_apt_proxy' require_relative 'action/configure_chef_proxy' require_relative 'action/configure_env_proxy' require_relative 'action/only_once' module VagrantPlugins module ProxyConf # Middleware stack builders class Action # Returns an action middleware stack that configures the VM # # @param opts [Hash] the options to be passed to {OnlyOnce} # @option (see OnlyOnce#initialize) def self.configure(opts = {}) Vagrant::Action::Builder.build(OnlyOnce, opts, &config_actions) end private # @return [Proc] the block that adds config actions to the specified # middleware builder def self.config_actions @actions ||= Proc.new do |builder| builder.use ConfigureEnvProxy builder.use ConfigureChefProxy builder.use ConfigureAptProxy end end end end end
Use OnlyOnce to build the middleware stack
Use OnlyOnce to build the middleware stack
Ruby
mit
mrsheepuk/vagrant-proxyconf,tmatilai/vagrant-proxyconf,otahi/vagrant-proxyconf,tmatilai/vagrant-proxyconf
ruby
## Code Before: require_relative 'action/configure_apt_proxy' require_relative 'action/configure_chef_proxy' require_relative 'action/configure_env_proxy' module VagrantPlugins module ProxyConf # Middleware stack builders class Action # Returns an action middleware stack that configures the VM def self.configure @configure ||= Vagrant::Action::Builder.new.tap do |b| b.use ConfigureEnvProxy b.use ConfigureChefProxy b.use ConfigureAptProxy end end end end end ## Instruction: Use OnlyOnce to build the middleware stack ## Code After: require_relative 'action/configure_apt_proxy' require_relative 'action/configure_chef_proxy' require_relative 'action/configure_env_proxy' require_relative 'action/only_once' module VagrantPlugins module ProxyConf # Middleware stack builders class Action # Returns an action middleware stack that configures the VM # # @param opts [Hash] the options to be passed to {OnlyOnce} # @option (see OnlyOnce#initialize) def self.configure(opts = {}) Vagrant::Action::Builder.build(OnlyOnce, opts, &config_actions) end private # @return [Proc] the block that adds config actions to the specified # middleware builder def self.config_actions @actions ||= Proc.new do |builder| builder.use ConfigureEnvProxy builder.use ConfigureChefProxy builder.use ConfigureAptProxy end end end end end
require_relative 'action/configure_apt_proxy' require_relative 'action/configure_chef_proxy' require_relative 'action/configure_env_proxy' + require_relative 'action/only_once' module VagrantPlugins module ProxyConf # Middleware stack builders class Action # Returns an action middleware stack that configures the VM + # + # @param opts [Hash] the options to be passed to {OnlyOnce} + # @option (see OnlyOnce#initialize) - def self.configure + def self.configure(opts = {}) ? +++++++++++ - @configure ||= Vagrant::Action::Builder.new.tap do |b| + Vagrant::Action::Builder.build(OnlyOnce, opts, &config_actions) + end + + private + + # @return [Proc] the block that adds config actions to the specified + # middleware builder + def self.config_actions + @actions ||= Proc.new do |builder| - b.use ConfigureEnvProxy + builder.use ConfigureEnvProxy ? ++++++ - b.use ConfigureChefProxy + builder.use ConfigureChefProxy ? ++++++ - b.use ConfigureAptProxy + builder.use ConfigureAptProxy ? ++++++ end end end end end
22
1.157895
17
5
fa1a3ba874cc45d0275461d007666d96ec6ca13e
lib/savannah.rb
lib/savannah.rb
require "savannah/version" require 'rack' module Savannah class Main def call(env) [200, {}, ["Hello", "Whatever"]] end end end
require "savannah/version" require 'rack' module Savannah class Main attr_accessor :router def initialize(env={}) @router = Router.new end def call(env) route = @router.route_for(env) if route response = route.execute(env) response.rack_response else [404, {}, ["Page not found"]] end end end class Response attr_accessor :status_code, :headers, :body def initialize @headers = {} end def rack_response [status_code, headers, Array(body)] end end class Router attr_reader :routes def initialize @routes = Hash.new { |hash, key| hash[key] = [] } end def config(&block) instance_eval &block end def route_for(env) path = env["PATH_INFO"] method = env["REQUEST_METHOD"].downcase.to_sym route_array = @routes[method].detect do |route| case route.first when String path == route.first when Regexp path =~ route.first end end return Route.new(route_array) if route_array return nil #No route matched end def get(path, options = {}) @routes[:get] << [path, parse_to(options[:to])] end private def parse_to(controller_action) klass, method = controller_action.split('#') { klass: klass.capitalize, method: method } end end class Route attr_accessor :klass_name, :path, :instance_method def initialize(route_array) @path = route_array.first @klass_name = route_array.last[:klass] @instance_method = route_array.last[:method] #handle_requires end def klass Module.const_get(@klass_name) end def execute(env) klass.new(env).send(@instance_method.to_sym) end def handle_requires require File.join(File.dirname(__FILE__), '../', 'app', 'controllers', klass_name.downcase + '.rb') end end end
Add initial Rack request/response handling classes.
Add initial Rack request/response handling classes.
Ruby
mit
billpatrianakos/savannah
ruby
## Code Before: require "savannah/version" require 'rack' module Savannah class Main def call(env) [200, {}, ["Hello", "Whatever"]] end end end ## Instruction: Add initial Rack request/response handling classes. ## Code After: require "savannah/version" require 'rack' module Savannah class Main attr_accessor :router def initialize(env={}) @router = Router.new end def call(env) route = @router.route_for(env) if route response = route.execute(env) response.rack_response else [404, {}, ["Page not found"]] end end end class Response attr_accessor :status_code, :headers, :body def initialize @headers = {} end def rack_response [status_code, headers, Array(body)] end end class Router attr_reader :routes def initialize @routes = Hash.new { |hash, key| hash[key] = [] } end def config(&block) instance_eval &block end def route_for(env) path = env["PATH_INFO"] method = env["REQUEST_METHOD"].downcase.to_sym route_array = @routes[method].detect do |route| case route.first when String path == route.first when Regexp path =~ route.first end end return Route.new(route_array) if route_array return nil #No route matched end def get(path, options = {}) @routes[:get] << [path, parse_to(options[:to])] end private def parse_to(controller_action) klass, method = controller_action.split('#') { klass: klass.capitalize, method: method } end end class Route attr_accessor :klass_name, :path, :instance_method def initialize(route_array) @path = route_array.first @klass_name = route_array.last[:klass] @instance_method = route_array.last[:method] #handle_requires end def klass Module.const_get(@klass_name) end def execute(env) klass.new(env).send(@instance_method.to_sym) end def handle_requires require File.join(File.dirname(__FILE__), '../', 'app', 'controllers', klass_name.downcase + '.rb') end end end
require "savannah/version" require 'rack' module Savannah class Main + attr_accessor :router + + def initialize(env={}) + @router = Router.new + end + def call(env) - [200, {}, ["Hello", "Whatever"]] + route = @router.route_for(env) + if route + response = route.execute(env) + response.rack_response + else + [404, {}, ["Page not found"]] + end + end + end + + class Response + attr_accessor :status_code, :headers, :body + + def initialize + @headers = {} + end + + def rack_response + [status_code, headers, Array(body)] + end + end + + class Router + attr_reader :routes + + def initialize + @routes = Hash.new { |hash, key| hash[key] = [] } + end + + def config(&block) + instance_eval &block + end + + def route_for(env) + path = env["PATH_INFO"] + method = env["REQUEST_METHOD"].downcase.to_sym + route_array = @routes[method].detect do |route| + case route.first + when String + path == route.first + when Regexp + path =~ route.first + end + end + + return Route.new(route_array) if route_array + return nil #No route matched + end + + def get(path, options = {}) + @routes[:get] << [path, parse_to(options[:to])] + end + + private + def parse_to(controller_action) + klass, method = controller_action.split('#') + { klass: klass.capitalize, method: method } + end + end + + class Route + attr_accessor :klass_name, :path, :instance_method + + def initialize(route_array) + @path = route_array.first + @klass_name = route_array.last[:klass] + @instance_method = route_array.last[:method] + #handle_requires + end + + def klass + Module.const_get(@klass_name) + end + + def execute(env) + klass.new(env).send(@instance_method.to_sym) + end + + def handle_requires + require File.join(File.dirname(__FILE__), '../', 'app', 'controllers', klass_name.downcase + '.rb') end end end
87
8.7
86
1
cf02e0f8ea5e2a0a561fcdce18293f3b2e2f6aa2
src/main/resources/templates/index.ftl
src/main/resources/templates/index.ftl
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title>Platon comment server</title> <#include "head.ftl" /> </head> <body> <h1>The Platon comment server</h1> <p><a href="https://github.com/pvorb/platon">GitHub Repository</a></p> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title>Platon comment server</title> </head> <body> <h1>The Platon comment server</h1> <p><a href="https://github.com/pvorb/platon">GitHub Repository</a></p> </body> </html>
Remove reference to missing head.ftl
Remove reference to missing head.ftl
FreeMarker
apache-2.0
pvorb/platon,pvorb/platon,pvorb/platon
freemarker
## Code Before: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title>Platon comment server</title> <#include "head.ftl" /> </head> <body> <h1>The Platon comment server</h1> <p><a href="https://github.com/pvorb/platon">GitHub Repository</a></p> </body> </html> ## Instruction: Remove reference to missing head.ftl ## Code After: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title>Platon comment server</title> </head> <body> <h1>The Platon comment server</h1> <p><a href="https://github.com/pvorb/platon">GitHub Repository</a></p> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title>Platon comment server</title> - <#include "head.ftl" /> </head> <body> <h1>The Platon comment server</h1> <p><a href="https://github.com/pvorb/platon">GitHub Repository</a></p> </body> </html>
1
0.076923
0
1
77ac49a5536cdd82619c59a4f6f2dbd188a7ccd5
Cargo.toml
Cargo.toml
[workspace] members = [ "eth2/fork_choice", "eth2/operation_pool", "eth2/state_processing", "eth2/types", "eth2/utils/bls", "eth2/utils/boolean-bitfield", "eth2/utils/cached_tree_hash", "eth2/utils/fixed_len_vec", "eth2/utils/hashing", "eth2/utils/honey-badger-split", "eth2/utils/merkle_proof", "eth2/utils/int_to_bytes", "eth2/utils/serde_hex", "eth2/utils/slot_clock", "eth2/utils/ssz", "eth2/utils/ssz_derive", "eth2/utils/swap_or_not_shuffle", "eth2/utils/tree_hash", "eth2/utils/tree_hash_derive", "eth2/utils/fisher_yates_shuffle", "eth2/utils/test_random_derive", "beacon_node", "beacon_node/db", "beacon_node/client", "beacon_node/network", "beacon_node/eth2-libp2p", "beacon_node/rpc", "beacon_node/version", "beacon_node/beacon_chain", "protos", "validator_client", "account_manager", ] [profile.release] debug = true
[workspace] members = [ "eth2/fork_choice", "eth2/operation_pool", "eth2/state_processing", "eth2/types", "eth2/utils/bls", "eth2/utils/boolean-bitfield", "eth2/utils/cached_tree_hash", "eth2/utils/fixed_len_vec", "eth2/utils/hashing", "eth2/utils/honey-badger-split", "eth2/utils/merkle_proof", "eth2/utils/int_to_bytes", "eth2/utils/serde_hex", "eth2/utils/slot_clock", "eth2/utils/ssz", "eth2/utils/ssz_derive", "eth2/utils/swap_or_not_shuffle", "eth2/utils/tree_hash", "eth2/utils/tree_hash_derive", "eth2/utils/fisher_yates_shuffle", "eth2/utils/test_random_derive", "beacon_node", "beacon_node/db", "beacon_node/client", "beacon_node/network", "beacon_node/eth2-libp2p", "beacon_node/rpc", "beacon_node/version", "beacon_node/beacon_chain", "protos", "validator_client", "account_manager", ]
Remove profile.release debug from workspace
Remove profile.release debug from workspace
TOML
apache-2.0
sigp/lighthouse,sigp/lighthouse,sigp/lighthouse,sigp/lighthouse
toml
## Code Before: [workspace] members = [ "eth2/fork_choice", "eth2/operation_pool", "eth2/state_processing", "eth2/types", "eth2/utils/bls", "eth2/utils/boolean-bitfield", "eth2/utils/cached_tree_hash", "eth2/utils/fixed_len_vec", "eth2/utils/hashing", "eth2/utils/honey-badger-split", "eth2/utils/merkle_proof", "eth2/utils/int_to_bytes", "eth2/utils/serde_hex", "eth2/utils/slot_clock", "eth2/utils/ssz", "eth2/utils/ssz_derive", "eth2/utils/swap_or_not_shuffle", "eth2/utils/tree_hash", "eth2/utils/tree_hash_derive", "eth2/utils/fisher_yates_shuffle", "eth2/utils/test_random_derive", "beacon_node", "beacon_node/db", "beacon_node/client", "beacon_node/network", "beacon_node/eth2-libp2p", "beacon_node/rpc", "beacon_node/version", "beacon_node/beacon_chain", "protos", "validator_client", "account_manager", ] [profile.release] debug = true ## Instruction: Remove profile.release debug from workspace ## Code After: [workspace] members = [ "eth2/fork_choice", "eth2/operation_pool", "eth2/state_processing", "eth2/types", "eth2/utils/bls", "eth2/utils/boolean-bitfield", "eth2/utils/cached_tree_hash", "eth2/utils/fixed_len_vec", "eth2/utils/hashing", "eth2/utils/honey-badger-split", "eth2/utils/merkle_proof", "eth2/utils/int_to_bytes", "eth2/utils/serde_hex", "eth2/utils/slot_clock", "eth2/utils/ssz", "eth2/utils/ssz_derive", "eth2/utils/swap_or_not_shuffle", "eth2/utils/tree_hash", "eth2/utils/tree_hash_derive", "eth2/utils/fisher_yates_shuffle", "eth2/utils/test_random_derive", "beacon_node", "beacon_node/db", "beacon_node/client", "beacon_node/network", "beacon_node/eth2-libp2p", "beacon_node/rpc", "beacon_node/version", "beacon_node/beacon_chain", "protos", "validator_client", "account_manager", ]
[workspace] members = [ "eth2/fork_choice", "eth2/operation_pool", "eth2/state_processing", "eth2/types", "eth2/utils/bls", "eth2/utils/boolean-bitfield", "eth2/utils/cached_tree_hash", "eth2/utils/fixed_len_vec", "eth2/utils/hashing", "eth2/utils/honey-badger-split", "eth2/utils/merkle_proof", "eth2/utils/int_to_bytes", "eth2/utils/serde_hex", "eth2/utils/slot_clock", "eth2/utils/ssz", "eth2/utils/ssz_derive", "eth2/utils/swap_or_not_shuffle", "eth2/utils/tree_hash", "eth2/utils/tree_hash_derive", "eth2/utils/fisher_yates_shuffle", "eth2/utils/test_random_derive", "beacon_node", "beacon_node/db", "beacon_node/client", "beacon_node/network", "beacon_node/eth2-libp2p", "beacon_node/rpc", "beacon_node/version", "beacon_node/beacon_chain", "protos", "validator_client", "account_manager", ] - - [profile.release] - debug = true
3
0.078947
0
3
75e9422c48445168b622bc8b7faa1b5a0b637b38
app/models/transaction_split.rb
app/models/transaction_split.rb
class TransactionSplit < ActiveRecord::Base belongs_to :transaction_record has_many :pie_piece_transaction_splits has_many :pie_pieces, through: :pie_piece_transaction_splits end
class TransactionSplit < ActiveRecord::Base belongs_to :transaction_record has_many :pie_piece_transaction_splits has_many :pie_pieces, through: :pie_piece_transaction_splits scope :user, ->(id) { joins(:transaction_record) .where('transaction_records.user_id = ?', id) } end
Add a way to retrieve all transaction splits for a user
Add a way to retrieve all transaction splits for a user
Ruby
mit
lightster/pienancial-rails,lightster/pienancial-rails,lightster/pienancial-rails
ruby
## Code Before: class TransactionSplit < ActiveRecord::Base belongs_to :transaction_record has_many :pie_piece_transaction_splits has_many :pie_pieces, through: :pie_piece_transaction_splits end ## Instruction: Add a way to retrieve all transaction splits for a user ## Code After: class TransactionSplit < ActiveRecord::Base belongs_to :transaction_record has_many :pie_piece_transaction_splits has_many :pie_pieces, through: :pie_piece_transaction_splits scope :user, ->(id) { joins(:transaction_record) .where('transaction_records.user_id = ?', id) } end
class TransactionSplit < ActiveRecord::Base belongs_to :transaction_record has_many :pie_piece_transaction_splits has_many :pie_pieces, through: :pie_piece_transaction_splits + scope :user, ->(id) { + joins(:transaction_record) + .where('transaction_records.user_id = ?', id) + } end
4
0.8
4
0
c460eb1c57f4e8c7afb2c83aebcdbbbda89191d9
master_backup.sh
master_backup.sh
arch_on=true atom_on=true gnome_on=true # These are the directories for the scripts home_dir=~/git/dotfiles arch_dir=~/git/dotfiles/arch atom_dir=~/git/dotfiles/atom gnome_dir=~/git/dotfiles/gnome # This determines if you want to push your backup to git push_to_git=true timestamp=$(date +"%m-%d-%Y") ######## cd $home_dir # Backup Arch Linux packages and pacman.conf if $arch_on; then echo "Beginning Arch backup..." cd $arch_dir ./backup-arch.sh cd $home_dir else echo "Skipping Arch backup..." fi # Backup for Atom packages, themes, and settings if $atom_on; then echo "Beginning Atom backup..." cd $atom_dir ./backup-packages.sh cd $home_dir else echo "Skipping Atom backup..." fi # Backup for Gnome extensions, settings, and gconf if $gnome_on; then echo "Beginning Gnome backup..." cd $gnome_dir ./backup.sh cd $home_dir else echo "Skipping Gnome backup..." fi echo "Backup finished" if $push_to_git; then cd $home_dir git add . git commit -m "$timestamp : Automatic backup" git push fi
arch_on=true atom_on=true gnome_on=true # These are the directories for the scripts home_dir=~/git/dotfiles arch_dir=~/git/dotfiles/arch atom_dir=~/git/dotfiles/atom gnome_dir=~/git/dotfiles/gnome # This determines if you want to push your backup to git push_to_git=true timestamp=$(date +"%m-%d-%Y") ######## cd $home_dir # Backup Arch Linux packages and pacman.conf if $arch_on; then echo "Beginning Arch backup..." cd $arch_dir ./backup-arch.sh cd $home_dir else echo "Skipping Arch backup..." fi # Backup for Atom packages, themes, and settings if $atom_on; then echo "Beginning Atom backup..." cd $atom_dir ./backup-packages.sh cd $home_dir else echo "Skipping Atom backup..." fi # Backup for Gnome extensions, settings, and gconf if $gnome_on; then echo "Beginning Gnome backup..." cd $gnome_dir ./backup.sh cd $home_dir else echo "Skipping Gnome backup..." fi echo "Backup finished" if $push_to_git; then cd $home_dir echo "Pushing to Git..." git add . git commit -m "$timestamp : Automatic backup" git push fi
Add a notification that git is being pushed to
Add a notification that git is being pushed to
Shell
mit
mikestephens/dotfiles,mikestephens/dotfiles
shell
## Code Before: arch_on=true atom_on=true gnome_on=true # These are the directories for the scripts home_dir=~/git/dotfiles arch_dir=~/git/dotfiles/arch atom_dir=~/git/dotfiles/atom gnome_dir=~/git/dotfiles/gnome # This determines if you want to push your backup to git push_to_git=true timestamp=$(date +"%m-%d-%Y") ######## cd $home_dir # Backup Arch Linux packages and pacman.conf if $arch_on; then echo "Beginning Arch backup..." cd $arch_dir ./backup-arch.sh cd $home_dir else echo "Skipping Arch backup..." fi # Backup for Atom packages, themes, and settings if $atom_on; then echo "Beginning Atom backup..." cd $atom_dir ./backup-packages.sh cd $home_dir else echo "Skipping Atom backup..." fi # Backup for Gnome extensions, settings, and gconf if $gnome_on; then echo "Beginning Gnome backup..." cd $gnome_dir ./backup.sh cd $home_dir else echo "Skipping Gnome backup..." fi echo "Backup finished" if $push_to_git; then cd $home_dir git add . git commit -m "$timestamp : Automatic backup" git push fi ## Instruction: Add a notification that git is being pushed to ## Code After: arch_on=true atom_on=true gnome_on=true # These are the directories for the scripts home_dir=~/git/dotfiles arch_dir=~/git/dotfiles/arch atom_dir=~/git/dotfiles/atom gnome_dir=~/git/dotfiles/gnome # This determines if you want to push your backup to git push_to_git=true timestamp=$(date +"%m-%d-%Y") ######## cd $home_dir # Backup Arch Linux packages and pacman.conf if $arch_on; then echo "Beginning Arch backup..." cd $arch_dir ./backup-arch.sh cd $home_dir else echo "Skipping Arch backup..." fi # Backup for Atom packages, themes, and settings if $atom_on; then echo "Beginning Atom backup..." cd $atom_dir ./backup-packages.sh cd $home_dir else echo "Skipping Atom backup..." fi # Backup for Gnome extensions, settings, and gconf if $gnome_on; then echo "Beginning Gnome backup..." cd $gnome_dir ./backup.sh cd $home_dir else echo "Skipping Gnome backup..." fi echo "Backup finished" if $push_to_git; then cd $home_dir echo "Pushing to Git..." git add . git commit -m "$timestamp : Automatic backup" git push fi
arch_on=true atom_on=true gnome_on=true # These are the directories for the scripts home_dir=~/git/dotfiles arch_dir=~/git/dotfiles/arch atom_dir=~/git/dotfiles/atom gnome_dir=~/git/dotfiles/gnome # This determines if you want to push your backup to git push_to_git=true timestamp=$(date +"%m-%d-%Y") ######## cd $home_dir # Backup Arch Linux packages and pacman.conf if $arch_on; then echo "Beginning Arch backup..." cd $arch_dir ./backup-arch.sh cd $home_dir else echo "Skipping Arch backup..." fi # Backup for Atom packages, themes, and settings if $atom_on; then echo "Beginning Atom backup..." cd $atom_dir ./backup-packages.sh cd $home_dir else echo "Skipping Atom backup..." fi # Backup for Gnome extensions, settings, and gconf if $gnome_on; then echo "Beginning Gnome backup..." cd $gnome_dir ./backup.sh cd $home_dir else echo "Skipping Gnome backup..." fi echo "Backup finished" if $push_to_git; then cd $home_dir + echo "Pushing to Git..." git add . git commit -m "$timestamp : Automatic backup" git push fi
1
0.018868
1
0
fd3bef39b2a6a8bfc86d46f43465d5f1ab6298b8
t/whitelist_to.t
t/whitelist_to.t
use lib '.'; use lib 't'; use SATest; sa_t_init("whitelist_to"); use Test; BEGIN { plan tests => 1 }; # --------------------------------------------------------------------------- %patterns = ( q{ USER_IN_WHITELIST_TO }, 'hit-wl', ); tstprefs (" $default_cf_lines whitelist-to procmail* "); sarun ("-L -t < data/nice/005", \&patterns_run_cb); ok_all_patterns();
use lib '.'; use lib 't'; use SATest; sa_t_init("whitelist_to"); use Test; BEGIN { plan tests => 1 }; # --------------------------------------------------------------------------- %patterns = ( q{ USER_IN_WHITELIST_TO }, 'hit-wl', ); tstprefs (" $default_cf_lines whitelist_to announce* "); sarun ("-L -t < data/nice/016", \&patterns_run_cb); ok_all_patterns();
Test was bad, the test email had the USER_IN_WHITELIST_TO string inside the email text, change to a different email
Test was bad, the test email had the USER_IN_WHITELIST_TO string inside the email text, change to a different email git-svn-id: e9fe9b84e32fc5e57b7d09c40cd78b14ea28ed71@178574 13f79535-47bb-0310-9956-ffa450edef68
Perl
apache-2.0
apache/spamassassin,apache/spamassassin,apache/spamassassin,apache/spamassassin,apache/spamassassin
perl
## Code Before: use lib '.'; use lib 't'; use SATest; sa_t_init("whitelist_to"); use Test; BEGIN { plan tests => 1 }; # --------------------------------------------------------------------------- %patterns = ( q{ USER_IN_WHITELIST_TO }, 'hit-wl', ); tstprefs (" $default_cf_lines whitelist-to procmail* "); sarun ("-L -t < data/nice/005", \&patterns_run_cb); ok_all_patterns(); ## Instruction: Test was bad, the test email had the USER_IN_WHITELIST_TO string inside the email text, change to a different email git-svn-id: e9fe9b84e32fc5e57b7d09c40cd78b14ea28ed71@178574 13f79535-47bb-0310-9956-ffa450edef68 ## Code After: use lib '.'; use lib 't'; use SATest; sa_t_init("whitelist_to"); use Test; BEGIN { plan tests => 1 }; # --------------------------------------------------------------------------- %patterns = ( q{ USER_IN_WHITELIST_TO }, 'hit-wl', ); tstprefs (" $default_cf_lines whitelist_to announce* "); sarun ("-L -t < data/nice/016", \&patterns_run_cb); ok_all_patterns();
use lib '.'; use lib 't'; use SATest; sa_t_init("whitelist_to"); use Test; BEGIN { plan tests => 1 }; # --------------------------------------------------------------------------- %patterns = ( q{ USER_IN_WHITELIST_TO }, 'hit-wl', ); tstprefs (" $default_cf_lines - whitelist-to procmail* + whitelist_to announce* "); - sarun ("-L -t < data/nice/005", \&patterns_run_cb); ? ^^ + sarun ("-L -t < data/nice/016", \&patterns_run_cb); ? ^^ ok_all_patterns();
4
0.2
2
2
a0069221444d11e4b699bacaedc9cd37b4605c99
plugins/check_dctv.rb
plugins/check_dctv.rb
module Plugins class CheckDCTV include Cinch::Plugin listen_to :check_dctv def initialize(*args) super end def listen(m) channels = get_current_channels channels.each do |channel| output = "Ch. #{channel['channel']} - #{channel['friendlyalias']}" output += " - Live" if is_live(channel) output += " - Upcoming" if is_upcoming(channel) @bot.log(output) end end private def get_current_channels response = Net::HTTP.get_response(URI.parse('http://diamondclub.tv/api/channelsv2.php?v=3')) return JSON.parse(response.body)['assignedchannels'] end end end
module Plugins class CheckDCTV include Cinch::Plugin listen_to :check_dctv def initialize(*args) super # Set announced arrays so as to not re-announce what's already on @live_channels = Array.new @soon_channels = Array.new get_current_channels.each do |channel| @live_channels << channel if is_live channel @soon_channels << channel if is_upcoming channel end end def listen(m) channels = get_current_channels channels.each do |channel| output = "Ch. #{channel['channel']} - #{channel['friendlyalias']}" output += " - Live" if is_live(channel) output += " - Upcoming" if is_upcoming(channel) @bot.log(output) end end private def get_current_channels response = Net::HTTP.get_response(URI.parse('http://diamondclub.tv/api/channelsv2.php?v=3')) return JSON.parse(response.body)['assignedchannels'] end def is_live(channel) return channel['nowonline'] == 'yes' && !channel['yt_upcoming'] end def is_upcoming(channel) return channel['nowonline'] == 'no' && channel['yt_upcoming'] end end end
Set currently active channels on restart
Set currently active channels on restart
Ruby
mit
chatrealm/dctvbot
ruby
## Code Before: module Plugins class CheckDCTV include Cinch::Plugin listen_to :check_dctv def initialize(*args) super end def listen(m) channels = get_current_channels channels.each do |channel| output = "Ch. #{channel['channel']} - #{channel['friendlyalias']}" output += " - Live" if is_live(channel) output += " - Upcoming" if is_upcoming(channel) @bot.log(output) end end private def get_current_channels response = Net::HTTP.get_response(URI.parse('http://diamondclub.tv/api/channelsv2.php?v=3')) return JSON.parse(response.body)['assignedchannels'] end end end ## Instruction: Set currently active channels on restart ## Code After: module Plugins class CheckDCTV include Cinch::Plugin listen_to :check_dctv def initialize(*args) super # Set announced arrays so as to not re-announce what's already on @live_channels = Array.new @soon_channels = Array.new get_current_channels.each do |channel| @live_channels << channel if is_live channel @soon_channels << channel if is_upcoming channel end end def listen(m) channels = get_current_channels channels.each do |channel| output = "Ch. #{channel['channel']} - #{channel['friendlyalias']}" output += " - Live" if is_live(channel) output += " - Upcoming" if is_upcoming(channel) @bot.log(output) end end private def get_current_channels response = Net::HTTP.get_response(URI.parse('http://diamondclub.tv/api/channelsv2.php?v=3')) return JSON.parse(response.body)['assignedchannels'] end def is_live(channel) return channel['nowonline'] == 'yes' && !channel['yt_upcoming'] end def is_upcoming(channel) return channel['nowonline'] == 'no' && channel['yt_upcoming'] end end end
module Plugins class CheckDCTV include Cinch::Plugin listen_to :check_dctv def initialize(*args) super + # Set announced arrays so as to not re-announce what's already on + @live_channels = Array.new + @soon_channels = Array.new + get_current_channels.each do |channel| + @live_channels << channel if is_live channel + @soon_channels << channel if is_upcoming channel + end end def listen(m) channels = get_current_channels channels.each do |channel| output = "Ch. #{channel['channel']} - #{channel['friendlyalias']}" output += " - Live" if is_live(channel) output += " - Upcoming" if is_upcoming(channel) @bot.log(output) end end private def get_current_channels response = Net::HTTP.get_response(URI.parse('http://diamondclub.tv/api/channelsv2.php?v=3')) return JSON.parse(response.body)['assignedchannels'] end + def is_live(channel) + return channel['nowonline'] == 'yes' && !channel['yt_upcoming'] + end + + def is_upcoming(channel) + return channel['nowonline'] == 'no' && channel['yt_upcoming'] + end + end end
15
0.46875
15
0
cd1a10b140dce80a6ec3fb65bb275d1f71ddba4d
bower.json
bower.json
{ "name": "stencil", "version": "0.1.0", "description": "A set of common, reusable style patterns for Mobify’s client services team", "authors": [ "Mobify", "Jeff Kamo <jeffkamo@mobify.com>", "Kyle Peatt <kpeatt@gmail.com>", "Ryan Frederick <ryan@ryanfrederick.com>" ], "keywords": [ "mobify", "components", "patterns" ], "main": "", "dependencies": { "spline": "1.0.1" }, "devDependencies": { "modularized-normalize-scss": "~3.0.1" }, "ignore": [ "**/.*", "node_modules", "bower_components", "package.json", "Gruntfile.js", "tests", "test" ], "license": "MIT" }
{ "name": "stencil", "version": "0.1.0", "description": "A set of common, reusable style patterns for Mobify’s client services team", "authors": [ "Mobify", "Jeff Kamo <jeffkamo@mobify.com>", "Kyle Peatt <kpeatt@gmail.com>", "Ryan Frederick <ryan@ryanfrederick.com>" ], "keywords": [ "mobify", "components", "patterns" ], "main": "", "dependencies": { "spline": "1.0.1" }, "devDependencies": { "mobify/vellum": "~0.1.0", "modularized-normalize-scss": "~3.0.1" }, "ignore": [ "**/.*", "node_modules", "bower_components", "package.json", "Gruntfile.js", "tests", "test" ], "license": "MIT" }
Add vellum as dev dependency
Add vellum as dev dependency
JSON
mit
mobify/stencil,mobify/stencil
json
## Code Before: { "name": "stencil", "version": "0.1.0", "description": "A set of common, reusable style patterns for Mobify’s client services team", "authors": [ "Mobify", "Jeff Kamo <jeffkamo@mobify.com>", "Kyle Peatt <kpeatt@gmail.com>", "Ryan Frederick <ryan@ryanfrederick.com>" ], "keywords": [ "mobify", "components", "patterns" ], "main": "", "dependencies": { "spline": "1.0.1" }, "devDependencies": { "modularized-normalize-scss": "~3.0.1" }, "ignore": [ "**/.*", "node_modules", "bower_components", "package.json", "Gruntfile.js", "tests", "test" ], "license": "MIT" } ## Instruction: Add vellum as dev dependency ## Code After: { "name": "stencil", "version": "0.1.0", "description": "A set of common, reusable style patterns for Mobify’s client services team", "authors": [ "Mobify", "Jeff Kamo <jeffkamo@mobify.com>", "Kyle Peatt <kpeatt@gmail.com>", "Ryan Frederick <ryan@ryanfrederick.com>" ], "keywords": [ "mobify", "components", "patterns" ], "main": "", "dependencies": { "spline": "1.0.1" }, "devDependencies": { "mobify/vellum": "~0.1.0", "modularized-normalize-scss": "~3.0.1" }, "ignore": [ "**/.*", "node_modules", "bower_components", "package.json", "Gruntfile.js", "tests", "test" ], "license": "MIT" }
{ "name": "stencil", "version": "0.1.0", "description": "A set of common, reusable style patterns for Mobify’s client services team", "authors": [ "Mobify", "Jeff Kamo <jeffkamo@mobify.com>", "Kyle Peatt <kpeatt@gmail.com>", "Ryan Frederick <ryan@ryanfrederick.com>" ], "keywords": [ "mobify", "components", "patterns" ], "main": "", "dependencies": { "spline": "1.0.1" }, "devDependencies": { + "mobify/vellum": "~0.1.0", "modularized-normalize-scss": "~3.0.1" }, "ignore": [ "**/.*", "node_modules", "bower_components", "package.json", "Gruntfile.js", "tests", "test" ], "license": "MIT" }
1
0.030303
1
0