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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ba19357b54999d88997d615a9d214adf56be4357 | deploy/before_migrate.rb | deploy/before_migrate.rb | Chef::Log.info("Running deploy/before_migrate.rb...")
rails_env = new_resource.environment["RAILS_ENV"]
Chef::Log.info("Precompiling assets for #{rails_env}...")
current_release = release_path
execute "rake assets:precompile" do
cwd current_release
command "bundle exec rake assets:precompile --trace"
environment "RAILS_ENV" => rails_env
end
| Chef::Log.info("Running deploy/before_migrate.rb...")
Chef::Log.info("Symlinking #{release_path}/public/assets to #{new_resource.deploy_to}/shared/assets")
link "#{release_path}/public/assets" do
to "#{new_resource.deploy_to}/shared/assets"
end
rails_env = new_resource.environment["RAILS_ENV"]
Chef::Log.info("Precompiling assets for RAILS_ENV=#{rails_env}...")
execute "rake assets:precompile" do
cwd release_path
command "bundle exec rake assets:precompile"
environment "RAILS_ENV" => rails_env
end
| Deploy assets to a shared/assets path on Opsworks. | Deploy assets to a shared/assets path on Opsworks.
| Ruby | mit | measuredvoice/estuary,measuredvoice/estuary | ruby | ## Code Before:
Chef::Log.info("Running deploy/before_migrate.rb...")
rails_env = new_resource.environment["RAILS_ENV"]
Chef::Log.info("Precompiling assets for #{rails_env}...")
current_release = release_path
execute "rake assets:precompile" do
cwd current_release
command "bundle exec rake assets:precompile --trace"
environment "RAILS_ENV" => rails_env
end
## Instruction:
Deploy assets to a shared/assets path on Opsworks.
## Code After:
Chef::Log.info("Running deploy/before_migrate.rb...")
Chef::Log.info("Symlinking #{release_path}/public/assets to #{new_resource.deploy_to}/shared/assets")
link "#{release_path}/public/assets" do
to "#{new_resource.deploy_to}/shared/assets"
end
rails_env = new_resource.environment["RAILS_ENV"]
Chef::Log.info("Precompiling assets for RAILS_ENV=#{rails_env}...")
execute "rake assets:precompile" do
cwd release_path
command "bundle exec rake assets:precompile"
environment "RAILS_ENV" => rails_env
end
| Chef::Log.info("Running deploy/before_migrate.rb...")
-
+
+ Chef::Log.info("Symlinking #{release_path}/public/assets to #{new_resource.deploy_to}/shared/assets")
+
+ link "#{release_path}/public/assets" do
+ to "#{new_resource.deploy_to}/shared/assets"
+ end
+
rails_env = new_resource.environment["RAILS_ENV"]
- Chef::Log.info("Precompiling assets for #{rails_env}...")
+ Chef::Log.info("Precompiling assets for RAILS_ENV=#{rails_env}...")
? ++++++++++
+
-
- current_release = release_path
-
execute "rake assets:precompile" do
- cwd current_release
+ cwd release_path
- command "bundle exec rake assets:precompile --trace"
? --------
+ command "bundle exec rake assets:precompile"
environment "RAILS_ENV" => rails_env
end | 18 | 1.5 | 11 | 7 |
01d85ef56abcf98859b64647ee97a3ff0e0e3024 | packages/ma/mappy.yaml | packages/ma/mappy.yaml | homepage: https://github.com/PolyglotSymposium/mappy
changelog-type: ''
hash: 2fbad40a00c75bb83730506aef01e936bb024ab35358c35d2c05060399ad625c
test-bench-deps:
base: -any
mappy: -any
hspec: -any
parsec: -any
containers: -any
QuickCheck: -any
maintainer: mjg.py3@gmail.com
synopsis: A functional programming language focused around maps.
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
mappy: -any
parsec: -any
containers: -any
all-versions:
- '0.1.0.0'
- '0.1.0.1'
- '0.1.0.2'
- '0.1.1.0'
author: Michael Gilliland
latest: '0.1.1.0'
description-type: haddock
description: Please see README.md
license-name: BSD3
| homepage: https://github.com/PolyglotSymposium/mappy
changelog-type: ''
hash: a4c2cf288c079983d6dae8fca9abfd45f0169f45f44baafd32521705dc6b787a
test-bench-deps:
base: -any
mappy: -any
hspec: -any
parsec: -any
containers: -any
QuickCheck: -any
maintainer: mjg.py3@gmail.com
synopsis: A functional programming language focused around maps.
changelog: ''
basic-deps:
haskeline: -any
base: ! '>=4.7 && <5'
mappy: -any
parsec: -any
containers: -any
ansi-terminal: -any
directory: -any
all-versions:
- '0.1.0.0'
- '0.1.0.1'
- '0.1.0.2'
- '0.1.1.0'
- '0.1.2.0'
author: Michael Gilliland
latest: '0.1.2.0'
description-type: haddock
description: Please see README.md
license-name: BSD3
| Update from Hackage at 2016-02-03T02:41:36+0000 | Update from Hackage at 2016-02-03T02:41:36+0000
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/PolyglotSymposium/mappy
changelog-type: ''
hash: 2fbad40a00c75bb83730506aef01e936bb024ab35358c35d2c05060399ad625c
test-bench-deps:
base: -any
mappy: -any
hspec: -any
parsec: -any
containers: -any
QuickCheck: -any
maintainer: mjg.py3@gmail.com
synopsis: A functional programming language focused around maps.
changelog: ''
basic-deps:
base: ! '>=4.7 && <5'
mappy: -any
parsec: -any
containers: -any
all-versions:
- '0.1.0.0'
- '0.1.0.1'
- '0.1.0.2'
- '0.1.1.0'
author: Michael Gilliland
latest: '0.1.1.0'
description-type: haddock
description: Please see README.md
license-name: BSD3
## Instruction:
Update from Hackage at 2016-02-03T02:41:36+0000
## Code After:
homepage: https://github.com/PolyglotSymposium/mappy
changelog-type: ''
hash: a4c2cf288c079983d6dae8fca9abfd45f0169f45f44baafd32521705dc6b787a
test-bench-deps:
base: -any
mappy: -any
hspec: -any
parsec: -any
containers: -any
QuickCheck: -any
maintainer: mjg.py3@gmail.com
synopsis: A functional programming language focused around maps.
changelog: ''
basic-deps:
haskeline: -any
base: ! '>=4.7 && <5'
mappy: -any
parsec: -any
containers: -any
ansi-terminal: -any
directory: -any
all-versions:
- '0.1.0.0'
- '0.1.0.1'
- '0.1.0.2'
- '0.1.1.0'
- '0.1.2.0'
author: Michael Gilliland
latest: '0.1.2.0'
description-type: haddock
description: Please see README.md
license-name: BSD3
| homepage: https://github.com/PolyglotSymposium/mappy
changelog-type: ''
- hash: 2fbad40a00c75bb83730506aef01e936bb024ab35358c35d2c05060399ad625c
+ hash: a4c2cf288c079983d6dae8fca9abfd45f0169f45f44baafd32521705dc6b787a
test-bench-deps:
base: -any
mappy: -any
hspec: -any
parsec: -any
containers: -any
QuickCheck: -any
maintainer: mjg.py3@gmail.com
synopsis: A functional programming language focused around maps.
changelog: ''
basic-deps:
+ haskeline: -any
base: ! '>=4.7 && <5'
mappy: -any
parsec: -any
containers: -any
+ ansi-terminal: -any
+ directory: -any
all-versions:
- '0.1.0.0'
- '0.1.0.1'
- '0.1.0.2'
- '0.1.1.0'
+ - '0.1.2.0'
author: Michael Gilliland
- latest: '0.1.1.0'
? ^
+ latest: '0.1.2.0'
? ^
description-type: haddock
description: Please see README.md
license-name: BSD3 | 8 | 0.285714 | 6 | 2 |
8a770f2b1fa41a39d3693358d4f861e5b5535954 | app/routes/api/v2/TimelinesRoute.js | app/routes/api/v2/TimelinesRoute.js | import TimelinesController from '../../../controllers/api/v2/TimelinesController'
export default function addRoutes(app) {
const controller = new TimelinesController(app);
app.get('/v2/bestof', controller.bestOf);
app.get('/v2/timelines/home', controller.home);
}
| import TimelinesController from '../../../controllers/api/v2/TimelinesController'
export default function addRoutes(app) {
const controller = new TimelinesController(app);
app.get('/v2/bestof', controller.bestOf);
app.get('/v2/timelines/home', controller.home);
app.get('/v2/timelines/filter/discussions', controller.myDiscussions);
app.get('/v2/timelines/filter/directs', controller.directs);
app.get('/v2/timelines/:username', controller.userTimeline('Posts'))
app.get('/v2/timelines/:username/likes', controller.userTimeline('Likes'))
app.get('/v2/timelines/:username/comments', controller.userTimeline('Comments'))
}
| Add routes for all v2 timelines controllers | Add routes for all v2 timelines controllers
| JavaScript | mit | FreeFeed/freefeed-server,FreeFeed/freefeed-server,golozubov/freefeed-server,golozubov/freefeed-server | javascript | ## Code Before:
import TimelinesController from '../../../controllers/api/v2/TimelinesController'
export default function addRoutes(app) {
const controller = new TimelinesController(app);
app.get('/v2/bestof', controller.bestOf);
app.get('/v2/timelines/home', controller.home);
}
## Instruction:
Add routes for all v2 timelines controllers
## Code After:
import TimelinesController from '../../../controllers/api/v2/TimelinesController'
export default function addRoutes(app) {
const controller = new TimelinesController(app);
app.get('/v2/bestof', controller.bestOf);
app.get('/v2/timelines/home', controller.home);
app.get('/v2/timelines/filter/discussions', controller.myDiscussions);
app.get('/v2/timelines/filter/directs', controller.directs);
app.get('/v2/timelines/:username', controller.userTimeline('Posts'))
app.get('/v2/timelines/:username/likes', controller.userTimeline('Likes'))
app.get('/v2/timelines/:username/comments', controller.userTimeline('Comments'))
}
| import TimelinesController from '../../../controllers/api/v2/TimelinesController'
export default function addRoutes(app) {
const controller = new TimelinesController(app);
app.get('/v2/bestof', controller.bestOf);
app.get('/v2/timelines/home', controller.home);
+ app.get('/v2/timelines/filter/discussions', controller.myDiscussions);
+ app.get('/v2/timelines/filter/directs', controller.directs);
+ app.get('/v2/timelines/:username', controller.userTimeline('Posts'))
+ app.get('/v2/timelines/:username/likes', controller.userTimeline('Likes'))
+ app.get('/v2/timelines/:username/comments', controller.userTimeline('Comments'))
} | 5 | 0.555556 | 5 | 0 |
ccf61c99629e192875b6ee3781142976e7e3181e | algorithms/twoSum/twoSum.java | algorithms/twoSum/twoSum.java | /*
* Problem: https://leetcode.com/problems/two-sum/
*
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
public int[] twoSum(int[] numbers, int target) {
int[] result = new int[2];
Map<Integer, Integer> map = new HashMap<Integer, Integer>();
for (int i = 0; i < numbers.length; i++) {
if (map.containsKey(target - numbers[i])) {
result[1] = i + 1;
result[0] = map.get(target - numbers[i]);
return result;
}
map.put(numbers[i], i + 1);
}
return result;
} | /*
* Problem: https://leetcode.com/problems/two-sum/
*
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
public int[] twoSum(int[] nums, int target) {
Map<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < nums.length; i++) {
int complement = target - nums[i];
if (map.containsKey(complement)) {
return new int[] { map.get(complement), i };
}
map.put(nums[i], i);
}
throw new IllegalArgumentException("No two sum solution");
} | Use compact style java hash solution. | Use compact style java hash solution.
| Java | mit | Williammer/leetcode-js | java | ## Code Before:
/*
* Problem: https://leetcode.com/problems/two-sum/
*
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
public int[] twoSum(int[] numbers, int target) {
int[] result = new int[2];
Map<Integer, Integer> map = new HashMap<Integer, Integer>();
for (int i = 0; i < numbers.length; i++) {
if (map.containsKey(target - numbers[i])) {
result[1] = i + 1;
result[0] = map.get(target - numbers[i]);
return result;
}
map.put(numbers[i], i + 1);
}
return result;
}
## Instruction:
Use compact style java hash solution.
## Code After:
/*
* Problem: https://leetcode.com/problems/two-sum/
*
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
public int[] twoSum(int[] nums, int target) {
Map<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < nums.length; i++) {
int complement = target - nums[i];
if (map.containsKey(complement)) {
return new int[] { map.get(complement), i };
}
map.put(nums[i], i);
}
throw new IllegalArgumentException("No two sum solution");
} | /*
* Problem: https://leetcode.com/problems/two-sum/
*
* @param {number[]} nums
* @param {number} target
* @return {number[]}
*/
- public int[] twoSum(int[] numbers, int target) {
? ---
+ public int[] twoSum(int[] nums, int target) {
- int[] result = new int[2];
- Map<Integer, Integer> map = new HashMap<Integer, Integer>();
? ----------------
+ Map<Integer, Integer> map = new HashMap<>();
- for (int i = 0; i < numbers.length; i++) {
? ---
+ for (int i = 0; i < nums.length; i++) {
+ int complement = target - nums[i];
+ if (map.containsKey(complement)) {
+ return new int[] { map.get(complement), i };
- if (map.containsKey(target - numbers[i])) {
- result[1] = i + 1;
- result[0] = map.get(target - numbers[i]);
- return result;
}
- map.put(numbers[i], i + 1);
? --- ----
+ map.put(nums[i], i);
}
- return result;
+ throw new IllegalArgumentException("No two sum solution");
} | 18 | 0.9 | 8 | 10 |
4fc21537fcad9b281b2eeaeaefc150a072b9747d | src/components/PageLayout/PageLayout.scss | src/components/PageLayout/PageLayout.scss | @import 'variables';
.content {
flex-direction: column;
display: flex;
position: relative;
}
.body {
z-index: 1;
background-color: #fff;
min-height: 100vh;
}
| @import 'variables';
.content {
display: flex;
flex-direction: column;
min-height: 100vh;
position: relative;
}
.body {
flex: 1;
z-index: 1;
background-color: #fff;
}
| Make sure footer is sticking to the bottom | Make sure footer is sticking to the bottom
The previous behaviour would make the content of the page (excluding
header and footer) 100vh minimum. The issue with that is that we would
always have a scroll on small pages of the size of the header.
This allows to have the footer visible on pages with little content.
`flex: 1` allows the content of the page to grow, hence push the footer
to the bottom.
| SCSS | mit | sgmap/inspire,sgmap/inspire | scss | ## Code Before:
@import 'variables';
.content {
flex-direction: column;
display: flex;
position: relative;
}
.body {
z-index: 1;
background-color: #fff;
min-height: 100vh;
}
## Instruction:
Make sure footer is sticking to the bottom
The previous behaviour would make the content of the page (excluding
header and footer) 100vh minimum. The issue with that is that we would
always have a scroll on small pages of the size of the header.
This allows to have the footer visible on pages with little content.
`flex: 1` allows the content of the page to grow, hence push the footer
to the bottom.
## Code After:
@import 'variables';
.content {
display: flex;
flex-direction: column;
min-height: 100vh;
position: relative;
}
.body {
flex: 1;
z-index: 1;
background-color: #fff;
}
| @import 'variables';
.content {
+ display: flex;
flex-direction: column;
- display: flex;
+ min-height: 100vh;
position: relative;
}
.body {
+ flex: 1;
z-index: 1;
background-color: #fff;
- min-height: 100vh;
} | 5 | 0.384615 | 3 | 2 |
9945b41b36f4d71bdd03cc4b8a869972ae4f8c8e | app/controllers/neighborly/api/v1/sessions_controller.rb | app/controllers/neighborly/api/v1/sessions_controller.rb | module Neighborly::Api
module V1
class SessionsController < BaseController
skip_before_action :check_authorization!, only: :create
def create
user = User.find_by(email: params.fetch(:email))
if user && user.valid_password?(params.fetch(:password))
render status: :created, json: {
access_token: user.get_access_token,
user_id: user.id
}
else
head :unauthorized
end
rescue KeyError
head :bad_request
end
def destroy
access_token.try(:expire!)
end
end
end
end
| module Neighborly::Api
module V1
class SessionsController < BaseController
skip_before_action :check_authorization!, only: :create
def create
user = User.find_by(email: params.fetch(:email))
if user && user.valid_password?(params.fetch(:password))
render status: :created, json: {
access_token: user.get_access_token,
user_id: user.id
}
else
render status: :unauthorized, json: { }
end
rescue KeyError
render status: :bad_request, json: { }
end
def destroy
access_token.try(:expire!)
end
end
end
end
| Add empty json response when requests are 401 and 400 on sessions endpoint | Add empty json response when requests are 401 and 400 on sessions endpoint
This is necessary because some JS framework don't work well when the response
is empty.
| Ruby | mit | FromUte/dune-api | ruby | ## Code Before:
module Neighborly::Api
module V1
class SessionsController < BaseController
skip_before_action :check_authorization!, only: :create
def create
user = User.find_by(email: params.fetch(:email))
if user && user.valid_password?(params.fetch(:password))
render status: :created, json: {
access_token: user.get_access_token,
user_id: user.id
}
else
head :unauthorized
end
rescue KeyError
head :bad_request
end
def destroy
access_token.try(:expire!)
end
end
end
end
## Instruction:
Add empty json response when requests are 401 and 400 on sessions endpoint
This is necessary because some JS framework don't work well when the response
is empty.
## Code After:
module Neighborly::Api
module V1
class SessionsController < BaseController
skip_before_action :check_authorization!, only: :create
def create
user = User.find_by(email: params.fetch(:email))
if user && user.valid_password?(params.fetch(:password))
render status: :created, json: {
access_token: user.get_access_token,
user_id: user.id
}
else
render status: :unauthorized, json: { }
end
rescue KeyError
render status: :bad_request, json: { }
end
def destroy
access_token.try(:expire!)
end
end
end
end
| module Neighborly::Api
module V1
class SessionsController < BaseController
skip_before_action :check_authorization!, only: :create
def create
user = User.find_by(email: params.fetch(:email))
if user && user.valid_password?(params.fetch(:password))
render status: :created, json: {
access_token: user.get_access_token,
user_id: user.id
}
else
- head :unauthorized
+ render status: :unauthorized, json: { }
end
rescue KeyError
- head :bad_request
+ render status: :bad_request, json: { }
end
def destroy
access_token.try(:expire!)
end
end
end
end | 4 | 0.16 | 2 | 2 |
1f60e8ce2bca5ff88a3f270adf71e99d1544ddff | packages/sr/sr-extra.yaml | packages/sr/sr-extra.yaml | homepage: https://github.com/seereason/sr-extra
changelog-type: ''
hash: aca93e5d8f02ed8c00f6c499bc1bdc37f3ef628ebfaec60482d949e880e8ba76
test-bench-deps: {}
maintainer: David Fox <dsf@seereason.com>
synopsis: A grab bag of modules.
changelog: ''
basic-deps:
bytestring: -any
bzlib: -any
unix: -any
base: <5
time: ! '>=1.1'
Unixutils: ! '>=1.51'
filepath: -any
process: -any
pureMD5: -any
HUnit: -any
containers: -any
regex-compat: -any
old-time: -any
old-locale: -any
zlib: -any
network-uri: ! '>=2.6'
mtl: -any
random: -any
QuickCheck: ! '>=2 && <3'
pretty: -any
directory: -any
all-versions:
- '1.46.3'
- '1.46.3.1'
author: David Fox
latest: '1.46.3.1'
description-type: haddock
description: A hodge-podge of functions and modules that do not have a better home
license-name: BSD3
| homepage: https://github.com/seereason/sr-extra
changelog-type: ''
hash: d4eadfbd2238479559d9683dae6d0857534de87a67e05897f30fe582f7602713
test-bench-deps: {}
maintainer: David Fox <dsf@seereason.com>
synopsis: A grab bag of modules.
changelog: ''
basic-deps:
bytestring: -any
bzlib: -any
unix: -any
base: <5
time: ! '>=1.1'
Unixutils: ! '>=1.51'
filepath: -any
process: -any
pureMD5: -any
HUnit: -any
containers: -any
regex-compat: -any
old-time: -any
old-locale: -any
zlib: -any
network-uri: ! '>=2.6'
mtl: -any
random: -any
QuickCheck: ! '>=2 && <3'
pretty: -any
directory: -any
all-versions:
- '1.46.3'
- '1.46.3.1'
- '1.46.3.2'
author: David Fox
latest: '1.46.3.2'
description-type: haddock
description: A hodge-podge of functions and modules that do not have a better home
license-name: BSD3
| Update from Hackage at 2016-05-28T23:21:59+0000 | Update from Hackage at 2016-05-28T23:21:59+0000
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/seereason/sr-extra
changelog-type: ''
hash: aca93e5d8f02ed8c00f6c499bc1bdc37f3ef628ebfaec60482d949e880e8ba76
test-bench-deps: {}
maintainer: David Fox <dsf@seereason.com>
synopsis: A grab bag of modules.
changelog: ''
basic-deps:
bytestring: -any
bzlib: -any
unix: -any
base: <5
time: ! '>=1.1'
Unixutils: ! '>=1.51'
filepath: -any
process: -any
pureMD5: -any
HUnit: -any
containers: -any
regex-compat: -any
old-time: -any
old-locale: -any
zlib: -any
network-uri: ! '>=2.6'
mtl: -any
random: -any
QuickCheck: ! '>=2 && <3'
pretty: -any
directory: -any
all-versions:
- '1.46.3'
- '1.46.3.1'
author: David Fox
latest: '1.46.3.1'
description-type: haddock
description: A hodge-podge of functions and modules that do not have a better home
license-name: BSD3
## Instruction:
Update from Hackage at 2016-05-28T23:21:59+0000
## Code After:
homepage: https://github.com/seereason/sr-extra
changelog-type: ''
hash: d4eadfbd2238479559d9683dae6d0857534de87a67e05897f30fe582f7602713
test-bench-deps: {}
maintainer: David Fox <dsf@seereason.com>
synopsis: A grab bag of modules.
changelog: ''
basic-deps:
bytestring: -any
bzlib: -any
unix: -any
base: <5
time: ! '>=1.1'
Unixutils: ! '>=1.51'
filepath: -any
process: -any
pureMD5: -any
HUnit: -any
containers: -any
regex-compat: -any
old-time: -any
old-locale: -any
zlib: -any
network-uri: ! '>=2.6'
mtl: -any
random: -any
QuickCheck: ! '>=2 && <3'
pretty: -any
directory: -any
all-versions:
- '1.46.3'
- '1.46.3.1'
- '1.46.3.2'
author: David Fox
latest: '1.46.3.2'
description-type: haddock
description: A hodge-podge of functions and modules that do not have a better home
license-name: BSD3
| homepage: https://github.com/seereason/sr-extra
changelog-type: ''
- hash: aca93e5d8f02ed8c00f6c499bc1bdc37f3ef628ebfaec60482d949e880e8ba76
+ hash: d4eadfbd2238479559d9683dae6d0857534de87a67e05897f30fe582f7602713
test-bench-deps: {}
maintainer: David Fox <dsf@seereason.com>
synopsis: A grab bag of modules.
changelog: ''
basic-deps:
bytestring: -any
bzlib: -any
unix: -any
base: <5
time: ! '>=1.1'
Unixutils: ! '>=1.51'
filepath: -any
process: -any
pureMD5: -any
HUnit: -any
containers: -any
regex-compat: -any
old-time: -any
old-locale: -any
zlib: -any
network-uri: ! '>=2.6'
mtl: -any
random: -any
QuickCheck: ! '>=2 && <3'
pretty: -any
directory: -any
all-versions:
- '1.46.3'
- '1.46.3.1'
+ - '1.46.3.2'
author: David Fox
- latest: '1.46.3.1'
? ^
+ latest: '1.46.3.2'
? ^
description-type: haddock
description: A hodge-podge of functions and modules that do not have a better home
license-name: BSD3 | 5 | 0.135135 | 3 | 2 |
bbf74b2599b124849c59019e181f22e1801293f6 | tests/test-01-instantiation.js | tests/test-01-instantiation.js | describe('Syrup Instantiation', function() {
it('should instantiate without throwing an error', function() {
require('../index.js');
});
});
| describe('Syrup Instantiation', function() {
it('should instantiate without throwing an error', function() {
require('../index.js');
});
it('should instantiate with a faker object as a property', function() {
let assert = require('assert');
assert(typeof require('../index.js').faker == 'object');
});
});
| Check for instantiation of faker on the Syrup class | Check for instantiation of faker on the Syrup class
| JavaScript | mpl-2.0 | thejsninja/syrup | javascript | ## Code Before:
describe('Syrup Instantiation', function() {
it('should instantiate without throwing an error', function() {
require('../index.js');
});
});
## Instruction:
Check for instantiation of faker on the Syrup class
## Code After:
describe('Syrup Instantiation', function() {
it('should instantiate without throwing an error', function() {
require('../index.js');
});
it('should instantiate with a faker object as a property', function() {
let assert = require('assert');
assert(typeof require('../index.js').faker == 'object');
});
});
| describe('Syrup Instantiation', function() {
it('should instantiate without throwing an error', function() {
require('../index.js');
});
+ it('should instantiate with a faker object as a property', function() {
+ let assert = require('assert');
+ assert(typeof require('../index.js').faker == 'object');
+ });
}); | 4 | 0.8 | 4 | 0 |
94483acbe5b7c6fcaa293c5bd4e9f47fa5c76776 | README.md | README.md | Web based tool to label images for object. So that they can be used to train dlib or other object detectors.
# How to use
You can either import a file from a URL or from your computer. You can plot the landmark points by yourself or you can request to face++ API to collect the points which gets automatically plotted on the image (You will need to register on face++ to use the API.). If you feel that the result should be improved, you can drag a point to correct location.
# TO DO
* Delete an existing point
* Change landmark type
* export to file
* export to dlib compatible file
* draw the line between landmark points
* draw rectangle
* support for multi faces
| Web based tool to label images for object. So that they can be used to train dlib or other object detectors.
# How to use
You can either import a file from a URL or from your computer. You can plot the landmark points by yourself or you can request to face++ API to collect the points which gets automatically plotted on the image (You will need to register on face++ to use the API.). If you feel that the result should be improved, you can drag a point to correct location.
# TO DO
* API compatible landmark label
* export to file
* export to dlib compatible file
* draw the line between landmark points
* Send selected image file to the API
* Image scalling
* warn user on image switch when label is empty
* filter for (un)labelled images
* Delete all points of a box
* load data from ptn, xml file.
* Tool to draw points in straight line (eg nose, chin, eyebrows' center) | Update Read Me for TO DO | Update Read Me for TO DO
| Markdown | mit | NaturalIntelligence/imglab,NaturalIntelligence/imglab | markdown | ## Code Before:
Web based tool to label images for object. So that they can be used to train dlib or other object detectors.
# How to use
You can either import a file from a URL or from your computer. You can plot the landmark points by yourself or you can request to face++ API to collect the points which gets automatically plotted on the image (You will need to register on face++ to use the API.). If you feel that the result should be improved, you can drag a point to correct location.
# TO DO
* Delete an existing point
* Change landmark type
* export to file
* export to dlib compatible file
* draw the line between landmark points
* draw rectangle
* support for multi faces
## Instruction:
Update Read Me for TO DO
## Code After:
Web based tool to label images for object. So that they can be used to train dlib or other object detectors.
# How to use
You can either import a file from a URL or from your computer. You can plot the landmark points by yourself or you can request to face++ API to collect the points which gets automatically plotted on the image (You will need to register on face++ to use the API.). If you feel that the result should be improved, you can drag a point to correct location.
# TO DO
* API compatible landmark label
* export to file
* export to dlib compatible file
* draw the line between landmark points
* Send selected image file to the API
* Image scalling
* warn user on image switch when label is empty
* filter for (un)labelled images
* Delete all points of a box
* load data from ptn, xml file.
* Tool to draw points in straight line (eg nose, chin, eyebrows' center) | Web based tool to label images for object. So that they can be used to train dlib or other object detectors.
# How to use
You can either import a file from a URL or from your computer. You can plot the landmark points by yourself or you can request to face++ API to collect the points which gets automatically plotted on the image (You will need to register on face++ to use the API.). If you feel that the result should be improved, you can drag a point to correct location.
# TO DO
+ * API compatible landmark label
- * Delete an existing point
- * Change landmark type
* export to file
* export to dlib compatible file
* draw the line between landmark points
- * draw rectangle
- * support for multi faces
+ * Send selected image file to the API
+ * Image scalling
+ * warn user on image switch when label is empty
+ * filter for (un)labelled images
+ * Delete all points of a box
+ * load data from ptn, xml file.
+ * Tool to draw points in straight line (eg nose, chin, eyebrows' center) | 12 | 0.75 | 8 | 4 |
8e44088f7d9ffa6958306d370f44f1c20eb010bd | src/CollegeCrazies/Bundle/MainBundle/Resources/views/League/settings.html.twig | src/CollegeCrazies/Bundle/MainBundle/Resources/views/League/settings.html.twig | {% extends "CollegeCraziesMainBundle::layout.html.twig" %}
{% block content %}
<h2>League Settings</h2>
<dl>
<dt>League Name</dt>
<dd>{{ league.name }}</dd>
<dt>League ID</dt>
<dd>{{ league.id }}</dd>
<dt>League Type</dt>
<dd>{{ league.public ? 'Public' : 'Private' }}</dd>
<dt>League Password</dt>
<dd>{{ league.public ? 'Not Required' : league.password }}</dd>
<dt>Picks Lock</dt>
<dd>{{ league.lockTime ? league.lockTime|date("F jS \\a\\t g:ia") : 'Not Set' }}</dd>
</dl>
{% endblock %}
| {% extends "CollegeCraziesMainBundle::layout.html.twig" %}
{% block content %}
<h2>League Settings</h2>
<dl>
<dt>League Name</dt>
<dd>{{ league.name }}</dd>
<dt>League ID</dt>
<dd>{{ league.id }}</dd>
<dt>League Type</dt>
<dd>{{ league.public ? 'Public' : 'Private' }}</dd>
<dt>League Password</dt>
<dd>{{ league.public ? 'Not Required' : league.password }}</dd>
<dt>Picks Lock</dt>
<dd>{{ app.session.get('picks_locked')|date("F jS \\a\\t g:ia") }}</dd>
</dl>
{% endblock %}
| Use session info for league lock time | Use session info for league lock time
| Twig | mit | jsuggs/CollegeCrazies,jsuggs/CollegeCrazies,jsuggs/CollegeCrazies,jsuggs/CollegeCrazies,jsuggs/CollegeCrazies,jsuggs/CollegeCrazies | twig | ## Code Before:
{% extends "CollegeCraziesMainBundle::layout.html.twig" %}
{% block content %}
<h2>League Settings</h2>
<dl>
<dt>League Name</dt>
<dd>{{ league.name }}</dd>
<dt>League ID</dt>
<dd>{{ league.id }}</dd>
<dt>League Type</dt>
<dd>{{ league.public ? 'Public' : 'Private' }}</dd>
<dt>League Password</dt>
<dd>{{ league.public ? 'Not Required' : league.password }}</dd>
<dt>Picks Lock</dt>
<dd>{{ league.lockTime ? league.lockTime|date("F jS \\a\\t g:ia") : 'Not Set' }}</dd>
</dl>
{% endblock %}
## Instruction:
Use session info for league lock time
## Code After:
{% extends "CollegeCraziesMainBundle::layout.html.twig" %}
{% block content %}
<h2>League Settings</h2>
<dl>
<dt>League Name</dt>
<dd>{{ league.name }}</dd>
<dt>League ID</dt>
<dd>{{ league.id }}</dd>
<dt>League Type</dt>
<dd>{{ league.public ? 'Public' : 'Private' }}</dd>
<dt>League Password</dt>
<dd>{{ league.public ? 'Not Required' : league.password }}</dd>
<dt>Picks Lock</dt>
<dd>{{ app.session.get('picks_locked')|date("F jS \\a\\t g:ia") }}</dd>
</dl>
{% endblock %}
| {% extends "CollegeCraziesMainBundle::layout.html.twig" %}
{% block content %}
<h2>League Settings</h2>
<dl>
<dt>League Name</dt>
<dd>{{ league.name }}</dd>
<dt>League ID</dt>
<dd>{{ league.id }}</dd>
<dt>League Type</dt>
<dd>{{ league.public ? 'Public' : 'Private' }}</dd>
<dt>League Password</dt>
<dd>{{ league.public ? 'Not Required' : league.password }}</dd>
<dt>Picks Lock</dt>
- <dd>{{ league.lockTime ? league.lockTime|date("F jS \\a\\t g:ia") : 'Not Set' }}</dd>
+ <dd>{{ app.session.get('picks_locked')|date("F jS \\a\\t g:ia") }}</dd>
</dl>
{% endblock %} | 2 | 0.090909 | 1 | 1 |
d5063a6db3ae8a248f31fbd66fcd230fe5965c66 | app/views/advocates/claims/_evidence_list.html.haml | app/views/advocates/claims/_evidence_list.html.haml | %section
= link_to 'Edit', "#{edit_advocates_claim_path(@claim)}#evidence"
%ol#evidence-list
- @doc_types.each do |doc_type|
%li
= doc_type.description
- if @claim.has_doctype?(doc_type)
- document = @claim.doc_of_type(doc_type)
.item-controls
- if document.has_pdf_duplicate?
= link_to 'View', document_path(document), target: '_blank', class: 'view'
= link_to 'Download', download_document_path(document), class: 'download'
| %section
- if @claim.editable?
= link_to 'Edit', "#{edit_advocates_claim_path(@claim)}#evidence"
%ol#evidence-list
- @doc_types.each do |doc_type|
%li
= doc_type.description
- if @claim.has_doctype?(doc_type)
- document = @claim.doc_of_type(doc_type)
.item-controls
- if document.has_pdf_duplicate?
= link_to 'View', document_path(document), target: '_blank', class: 'view'
= link_to 'Download', download_document_path(document), class: 'download'
| Check if claim is editable before displaying link to edit claim evidence | Check if claim is editable before displaying link to edit claim evidence
| Haml | mit | ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments | haml | ## Code Before:
%section
= link_to 'Edit', "#{edit_advocates_claim_path(@claim)}#evidence"
%ol#evidence-list
- @doc_types.each do |doc_type|
%li
= doc_type.description
- if @claim.has_doctype?(doc_type)
- document = @claim.doc_of_type(doc_type)
.item-controls
- if document.has_pdf_duplicate?
= link_to 'View', document_path(document), target: '_blank', class: 'view'
= link_to 'Download', download_document_path(document), class: 'download'
## Instruction:
Check if claim is editable before displaying link to edit claim evidence
## Code After:
%section
- if @claim.editable?
= link_to 'Edit', "#{edit_advocates_claim_path(@claim)}#evidence"
%ol#evidence-list
- @doc_types.each do |doc_type|
%li
= doc_type.description
- if @claim.has_doctype?(doc_type)
- document = @claim.doc_of_type(doc_type)
.item-controls
- if document.has_pdf_duplicate?
= link_to 'View', document_path(document), target: '_blank', class: 'view'
= link_to 'Download', download_document_path(document), class: 'download'
| %section
+ - if @claim.editable?
- = link_to 'Edit', "#{edit_advocates_claim_path(@claim)}#evidence"
+ = link_to 'Edit', "#{edit_advocates_claim_path(@claim)}#evidence"
? ++
%ol#evidence-list
- @doc_types.each do |doc_type|
%li
= doc_type.description
- if @claim.has_doctype?(doc_type)
- document = @claim.doc_of_type(doc_type)
.item-controls
- if document.has_pdf_duplicate?
= link_to 'View', document_path(document), target: '_blank', class: 'view'
= link_to 'Download', download_document_path(document), class: 'download' | 3 | 0.25 | 2 | 1 |
ebbaad6e414338837c64dec0194c2bf3a00f7a52 | src/main/java/com/wwsean08/WeatherReport/pojo/RabbitMQJson.java | src/main/java/com/wwsean08/WeatherReport/pojo/RabbitMQJson.java | package com.wwsean08.WeatherReport.pojo;
import com.google.gson.annotations.SerializedName;
/**
* Created by wwsea_000 on 12/30/2015.
*/
public class RabbitMQJson
{
@SerializedName("location")
private String location;
@SerializedName("temperature")
private float temp;
@SerializedName("icon")
private String icon;
public String getLocation()
{
return location;
}
public void setLocation(String location)
{
this.location = location;
}
public float getTemp()
{
return temp;
}
public void setTemp(float temp)
{
this.temp = temp;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
}
| package com.wwsean08.WeatherReport.pojo;
import com.google.gson.annotations.SerializedName;
import com.sun.glass.ui.SystemClipboard;
/**
* Created by wwsea_000 on 12/30/2015.
*/
public class RabbitMQJson
{
@SerializedName("location")
private String location;
@SerializedName("temperature")
private float temp;
@SerializedName("icon")
private String icon;
@SerializedName("timestamp")
private long timestamp = System.currentTimeMillis();
public String getLocation()
{
return location;
}
public void setLocation(String location)
{
this.location = location;
}
public float getTemp()
{
return temp;
}
public void setTemp(float temp)
{
this.temp = temp;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
}
| Include a timestamp of when the data was requested from wunderground (roughly) | Include a timestamp of when the data was requested from wunderground (roughly)
| Java | apache-2.0 | wwsean08/WeatherReport | java | ## Code Before:
package com.wwsean08.WeatherReport.pojo;
import com.google.gson.annotations.SerializedName;
/**
* Created by wwsea_000 on 12/30/2015.
*/
public class RabbitMQJson
{
@SerializedName("location")
private String location;
@SerializedName("temperature")
private float temp;
@SerializedName("icon")
private String icon;
public String getLocation()
{
return location;
}
public void setLocation(String location)
{
this.location = location;
}
public float getTemp()
{
return temp;
}
public void setTemp(float temp)
{
this.temp = temp;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
}
## Instruction:
Include a timestamp of when the data was requested from wunderground (roughly)
## Code After:
package com.wwsean08.WeatherReport.pojo;
import com.google.gson.annotations.SerializedName;
import com.sun.glass.ui.SystemClipboard;
/**
* Created by wwsea_000 on 12/30/2015.
*/
public class RabbitMQJson
{
@SerializedName("location")
private String location;
@SerializedName("temperature")
private float temp;
@SerializedName("icon")
private String icon;
@SerializedName("timestamp")
private long timestamp = System.currentTimeMillis();
public String getLocation()
{
return location;
}
public void setLocation(String location)
{
this.location = location;
}
public float getTemp()
{
return temp;
}
public void setTemp(float temp)
{
this.temp = temp;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
}
| package com.wwsean08.WeatherReport.pojo;
import com.google.gson.annotations.SerializedName;
+ import com.sun.glass.ui.SystemClipboard;
/**
* Created by wwsea_000 on 12/30/2015.
*/
public class RabbitMQJson
{
@SerializedName("location")
private String location;
@SerializedName("temperature")
private float temp;
@SerializedName("icon")
private String icon;
+ @SerializedName("timestamp")
+ private long timestamp = System.currentTimeMillis();
public String getLocation()
{
return location;
}
public void setLocation(String location)
{
this.location = location;
}
public float getTemp()
{
return temp;
}
public void setTemp(float temp)
{
this.temp = temp;
}
public String getIcon()
{
return icon;
}
public void setIcon(String icon)
{
this.icon = icon;
}
} | 3 | 0.065217 | 3 | 0 |
33c651f59a8e86361687e6408420b397d544d74d | cgeo-contacts/proguard-project.txt | cgeo-contacts/proguard-project.txt | -dontnote **.ILicensingService
-optimizationpasses 2
-dontobfuscate
-allowaccessmodification
-optimizations !code/simplification/arithmetic,!code/allocation/variable
# apache.commons.collections has some bean related collections, which are undefined in Android
-dontwarn java.beans.*
#-dontnote org.apache.commons.logging.**
-keep public class cgeo.geocaching.*
-dontwarn cgeo.geocaching.utils.Log
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
} | -dontnote **.ILicensingService
-optimizationpasses 2
-dontobfuscate
-allowaccessmodification
-optimizations !code/simplification/arithmetic,!code/allocation/variable
# apache.commons.collections has some bean related collections, which are undefined in Android
-dontwarn java.beans.*
#-dontnote org.apache.commons.logging.**
-keep public class cgeo.geocaching.*
-dontwarn cgeo.geocaching.utils.Log
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
# Null analysis annotations of Eclipse JDT are just used by the Eclipse compiler, so ignore them here
-dontwarn org.eclipse.jdt.annotation.**
| Fix proguard for contacts plugin | Fix proguard for contacts plugin
| Text | apache-2.0 | Huertix/cgeo,kumy/cgeo,yummy222/cgeo,mucek4/cgeo,matej116/cgeo,pstorch/cgeo,cgeo/cgeo,S-Bartfast/cgeo,S-Bartfast/cgeo,madankb/cgeo,marco-dev/c-geo-opensource,ThibaultR/cgeo,matej116/cgeo,brok85/cgeo,samueltardieu/cgeo,samueltardieu/cgeo,schwabe/cgeo,brok85/cgeo,SammysHP/cgeo,cgeo/cgeo,vishwakulkarni/cgeo,madankb/cgeo,rsudev/c-geo-opensource,KublaikhanGeek/cgeo,kumy/cgeo,rsudev/c-geo-opensource,Bananeweizen/cgeo,tobiasge/cgeo,yummy222/cgeo,schwabe/cgeo,superspindel/cgeo,superspindel/cgeo,auricgoldfinger/cgeo,tobiasge/cgeo,rsudev/c-geo-opensource,lewurm/cgeo,samueltardieu/cgeo,tobiasge/cgeo,superspindel/cgeo,pstorch/cgeo,schwabe/cgeo,cgeo/cgeo,mucek4/cgeo,matej116/cgeo,xiaoyanit/cgeo,auricgoldfinger/cgeo,KublaikhanGeek/cgeo,yummy222/cgeo,xiaoyanit/cgeo,lewurm/cgeo,xiaoyanit/cgeo,madankb/cgeo,brok85/cgeo,cgeo/cgeo,marco-dev/c-geo-opensource,vishwakulkarni/cgeo,SammysHP/cgeo,vishwakulkarni/cgeo,KublaikhanGeek/cgeo,marco-dev/c-geo-opensource,Bananeweizen/cgeo,ThibaultR/cgeo,lewurm/cgeo,auricgoldfinger/cgeo,S-Bartfast/cgeo,Huertix/cgeo,mucek4/cgeo,kumy/cgeo,SammysHP/cgeo,Huertix/cgeo,pstorch/cgeo,ThibaultR/cgeo,Bananeweizen/cgeo,schwabe/cgeo | text | ## Code Before:
-dontnote **.ILicensingService
-optimizationpasses 2
-dontobfuscate
-allowaccessmodification
-optimizations !code/simplification/arithmetic,!code/allocation/variable
# apache.commons.collections has some bean related collections, which are undefined in Android
-dontwarn java.beans.*
#-dontnote org.apache.commons.logging.**
-keep public class cgeo.geocaching.*
-dontwarn cgeo.geocaching.utils.Log
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
## Instruction:
Fix proguard for contacts plugin
## Code After:
-dontnote **.ILicensingService
-optimizationpasses 2
-dontobfuscate
-allowaccessmodification
-optimizations !code/simplification/arithmetic,!code/allocation/variable
# apache.commons.collections has some bean related collections, which are undefined in Android
-dontwarn java.beans.*
#-dontnote org.apache.commons.logging.**
-keep public class cgeo.geocaching.*
-dontwarn cgeo.geocaching.utils.Log
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
# Null analysis annotations of Eclipse JDT are just used by the Eclipse compiler, so ignore them here
-dontwarn org.eclipse.jdt.annotation.**
| -dontnote **.ILicensingService
-optimizationpasses 2
-dontobfuscate
-allowaccessmodification
-optimizations !code/simplification/arithmetic,!code/allocation/variable
# apache.commons.collections has some bean related collections, which are undefined in Android
-dontwarn java.beans.*
#-dontnote org.apache.commons.logging.**
-keep public class cgeo.geocaching.*
-dontwarn cgeo.geocaching.utils.Log
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
+
+ # Null analysis annotations of Eclipse JDT are just used by the Eclipse compiler, so ignore them here
+ -dontwarn org.eclipse.jdt.annotation.** | 3 | 0.103448 | 3 | 0 |
875a794dd1d9c3e183b456b8fe826c04874bbf55 | Classes/YTConnector.h | Classes/YTConnector.h | //
// YTConnector.h
// AKYouTube
//
// Created by Anton Pomozov on 10.09.13.
// Copyright (c) 2013 Akademon Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class YTConnector;
@protocol YTLoginViewControllerInterface <NSObject>
@property (nonatomic, strong, readonly) UIWebView *webView;
@property (nonatomic, assign) BOOL shouldPresentCloseButton;
@property (nonatomic, strong) UIImage *closeButtonImageName;
@end
@protocol YTConnectorDelegate <NSObject>
- (void)presentLoginViewControler:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
- (void)connectionEstablished;
- (void)connectionDidFailWithError:(NSError *)error;
- (void)appDidFailAuthorize;
- (void)userRejectedApp;
@end
@interface YTConnector : NSObject
@property (nonatomic, weak) id<YTConnectorDelegate> delegate;
+ (YTConnector *)sharedInstance;
- (void)connectWithClientId:(NSString *)clientId andClientSecret:(NSString *)clientSecret;
- (void)authorizeAppWithScopesList:(NSString *)scopesList
inLoginViewController:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
@end
| //
// YTConnector.h
// AKYouTube
//
// Created by Anton Pomozov on 10.09.13.
// Copyright (c) 2013 Akademon Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class YTConnector;
@protocol YTLoginViewControllerInterface <NSObject>
@property (nonatomic, strong, readonly) UIWebView *webView;
@optional
@property (nonatomic, assign) BOOL shouldPresentCloseButton;
@property (nonatomic, strong) UIImage *closeButtonImageName;
@end
@protocol YTConnectorDelegate <NSObject>
- (void)presentLoginViewControler:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
- (void)connectionEstablished;
- (void)connectionDidFailWithError:(NSError *)error;
- (void)appDidFailAuthorize;
- (void)userRejectedApp;
@end
@interface YTConnector : NSObject
@property (nonatomic, weak) id<YTConnectorDelegate> delegate;
+ (YTConnector *)sharedInstance;
- (void)connectWithClientId:(NSString *)clientId andClientSecret:(NSString *)clientSecret;
- (void)authorizeAppWithScopesList:(NSString *)scopesList
inLoginViewController:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
@end
| Make close button properties optional. | [Mod]: Make close button properties optional.
| C | mit | pomozoff/AKYouTube,pomozoff/AKYouTube,pomozoff/AKYouTube | c | ## Code Before:
//
// YTConnector.h
// AKYouTube
//
// Created by Anton Pomozov on 10.09.13.
// Copyright (c) 2013 Akademon Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class YTConnector;
@protocol YTLoginViewControllerInterface <NSObject>
@property (nonatomic, strong, readonly) UIWebView *webView;
@property (nonatomic, assign) BOOL shouldPresentCloseButton;
@property (nonatomic, strong) UIImage *closeButtonImageName;
@end
@protocol YTConnectorDelegate <NSObject>
- (void)presentLoginViewControler:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
- (void)connectionEstablished;
- (void)connectionDidFailWithError:(NSError *)error;
- (void)appDidFailAuthorize;
- (void)userRejectedApp;
@end
@interface YTConnector : NSObject
@property (nonatomic, weak) id<YTConnectorDelegate> delegate;
+ (YTConnector *)sharedInstance;
- (void)connectWithClientId:(NSString *)clientId andClientSecret:(NSString *)clientSecret;
- (void)authorizeAppWithScopesList:(NSString *)scopesList
inLoginViewController:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
@end
## Instruction:
[Mod]: Make close button properties optional.
## Code After:
//
// YTConnector.h
// AKYouTube
//
// Created by Anton Pomozov on 10.09.13.
// Copyright (c) 2013 Akademon Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class YTConnector;
@protocol YTLoginViewControllerInterface <NSObject>
@property (nonatomic, strong, readonly) UIWebView *webView;
@optional
@property (nonatomic, assign) BOOL shouldPresentCloseButton;
@property (nonatomic, strong) UIImage *closeButtonImageName;
@end
@protocol YTConnectorDelegate <NSObject>
- (void)presentLoginViewControler:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
- (void)connectionEstablished;
- (void)connectionDidFailWithError:(NSError *)error;
- (void)appDidFailAuthorize;
- (void)userRejectedApp;
@end
@interface YTConnector : NSObject
@property (nonatomic, weak) id<YTConnectorDelegate> delegate;
+ (YTConnector *)sharedInstance;
- (void)connectWithClientId:(NSString *)clientId andClientSecret:(NSString *)clientSecret;
- (void)authorizeAppWithScopesList:(NSString *)scopesList
inLoginViewController:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
@end
| //
// YTConnector.h
// AKYouTube
//
// Created by Anton Pomozov on 10.09.13.
// Copyright (c) 2013 Akademon Ltd. All rights reserved.
//
#import <Foundation/Foundation.h>
@class YTConnector;
@protocol YTLoginViewControllerInterface <NSObject>
@property (nonatomic, strong, readonly) UIWebView *webView;
+
+ @optional
+
@property (nonatomic, assign) BOOL shouldPresentCloseButton;
@property (nonatomic, strong) UIImage *closeButtonImageName;
@end
@protocol YTConnectorDelegate <NSObject>
- (void)presentLoginViewControler:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
- (void)connectionEstablished;
- (void)connectionDidFailWithError:(NSError *)error;
- (void)appDidFailAuthorize;
- (void)userRejectedApp;
@end
@interface YTConnector : NSObject
@property (nonatomic, weak) id<YTConnectorDelegate> delegate;
+ (YTConnector *)sharedInstance;
- (void)connectWithClientId:(NSString *)clientId andClientSecret:(NSString *)clientSecret;
- (void)authorizeAppWithScopesList:(NSString *)scopesList
inLoginViewController:(UIViewController<YTLoginViewControllerInterface> *)loginViewController;
@end | 3 | 0.075 | 3 | 0 |
4002e67ef8db26db76abb41a43d9e5f682a36788 | index.js | index.js | var express = require('express');
var app = express();
app.get('/', function(req, res) {
});
app.get('/authenticate', function(req, res) {
});
app.get('/authenticate/callback', function(req, res) {
});
app.get('/display', function(req, res) {
});
app.listen(8060);
| 'use strict';
var express = require('express');
var session = require('express-session');
var passport = require('passport');
var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var app = express();
app.use(session({ secret: 'SOMEKEYONLYADMINSKNOWABOUT' }));
app.use(passport.initialize());
app.use(passport.session());
passport.serializeUser(function(user, done) {
done(null, user);
});
passport.deserializeUser(function(user, done) {
done(null, user);
});
passport.use(new GoogleStrategy({
clientID: '548770298027-6imrmo0s4sfatogovec2i9bsvr6ld1b4.apps.googleusercontent.com',
clientSecret: 'dpHPxrardhth48Ft_iK_v14z',
callbackURL: 'http://127.0.0.1:8060/authenticate/callback'
}, function(accessToken, refreshToken, profile, done) {
done(null, profile);
}));
app.get('/', function(req, res) {
res.send('<a href="/authenticate">Log in</a>');
});
app.get('/authenticate', passport.authenticate('google', {
scope: 'https://www.googleapis.com/auth/userinfo.profile'
}));
app.get('/authenticate/callback', passport.authenticate('google', {
successRedirect: '/display',
failureRedirect: '/authenticate'
}));
app.get('/display', function(req, res) {
if(!req.user) {
return res.redirect('/authenticate');
}
res.send('You are ' + req.user.displayName + ', and I claim my $1 million');
});
app.listen(8060);
| Allow authentication through google plus | Allow authentication through google plus
| JavaScript | mit | tolgaek/thinkful-auth-150905 | javascript | ## Code Before:
var express = require('express');
var app = express();
app.get('/', function(req, res) {
});
app.get('/authenticate', function(req, res) {
});
app.get('/authenticate/callback', function(req, res) {
});
app.get('/display', function(req, res) {
});
app.listen(8060);
## Instruction:
Allow authentication through google plus
## Code After:
'use strict';
var express = require('express');
var session = require('express-session');
var passport = require('passport');
var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var app = express();
app.use(session({ secret: 'SOMEKEYONLYADMINSKNOWABOUT' }));
app.use(passport.initialize());
app.use(passport.session());
passport.serializeUser(function(user, done) {
done(null, user);
});
passport.deserializeUser(function(user, done) {
done(null, user);
});
passport.use(new GoogleStrategy({
clientID: '548770298027-6imrmo0s4sfatogovec2i9bsvr6ld1b4.apps.googleusercontent.com',
clientSecret: 'dpHPxrardhth48Ft_iK_v14z',
callbackURL: 'http://127.0.0.1:8060/authenticate/callback'
}, function(accessToken, refreshToken, profile, done) {
done(null, profile);
}));
app.get('/', function(req, res) {
res.send('<a href="/authenticate">Log in</a>');
});
app.get('/authenticate', passport.authenticate('google', {
scope: 'https://www.googleapis.com/auth/userinfo.profile'
}));
app.get('/authenticate/callback', passport.authenticate('google', {
successRedirect: '/display',
failureRedirect: '/authenticate'
}));
app.get('/display', function(req, res) {
if(!req.user) {
return res.redirect('/authenticate');
}
res.send('You are ' + req.user.displayName + ', and I claim my $1 million');
});
app.listen(8060);
| + 'use strict';
+
var express = require('express');
+ var session = require('express-session');
+ var passport = require('passport');
+ var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
var app = express();
- app.get('/', function(req, res) {
+ app.use(session({ secret: 'SOMEKEYONLYADMINSKNOWABOUT' }));
+ app.use(passport.initialize());
+ app.use(passport.session());
+ passport.serializeUser(function(user, done) {
+ done(null, user);
});
- app.get('/authenticate', function(req, res) {
-
+ passport.deserializeUser(function(user, done) {
+ done(null, user);
});
- app.get('/authenticate/callback', function(req, res) {
+ passport.use(new GoogleStrategy({
+ clientID: '548770298027-6imrmo0s4sfatogovec2i9bsvr6ld1b4.apps.googleusercontent.com',
+ clientSecret: 'dpHPxrardhth48Ft_iK_v14z',
+ callbackURL: 'http://127.0.0.1:8060/authenticate/callback'
+ }, function(accessToken, refreshToken, profile, done) {
+ done(null, profile);
+ }));
+ app.get('/', function(req, res) {
+ res.send('<a href="/authenticate">Log in</a>');
});
+ app.get('/authenticate', passport.authenticate('google', {
+ scope: 'https://www.googleapis.com/auth/userinfo.profile'
+ }));
+
+ app.get('/authenticate/callback', passport.authenticate('google', {
+ successRedirect: '/display',
+ failureRedirect: '/authenticate'
+ }));
+
app.get('/display', function(req, res) {
+ if(!req.user) {
+ return res.redirect('/authenticate');
+ }
+ res.send('You are ' + req.user.displayName + ', and I claim my $1 million');
});
-
app.listen(8060); | 39 | 1.772727 | 34 | 5 |
b6ea1f74acca400709b5f3aca1c778a60e8b9bae | docker-test/check.sh | docker-test/check.sh |
set -x
set -e
# Check that I'm running under trusty
if [ $(lsb_release -c -s) != "trusty" ]; then
echo "Not running under trusty!"
exit 1
fi
# Check that I'm still running under the travis user id
if [ $(whoami) != "travis" ]; then
echo "Username $(whoami) not travis!"
exit 1
fi
# Check I can still use sudo
sudo /bin/true
# Check I can apt-get install
sudo apt-get -y --force-yes install vim
# Check I can compile something
cat > test.c <<EOF
int main(void) {
return 0;
}
EOF
gcc test.c -o test
./test
|
set -x
set -e
cd /tmp
# Check that I'm running under trusty
if [ $(lsb_release -c -s) != "trusty" ]; then
echo "Not running under trusty!"
exit 1
fi
# Check that I'm still running under the travis user id
if [ $(whoami) != "travis" ]; then
echo "Username $(whoami) not travis!"
exit 1
fi
# Check I can still use sudo
sudo /bin/true
# Check I can apt-get install
sudo apt-get -y --force-yes install vim
umask
# Check I can compile something
cat > test.c <<EOF
int main(void) {
return 0;
}
EOF
ls -l test.c
gcc test.c -o test
./test
| Change to a directory you can write too. | Change to a directory you can write too.
| Shell | apache-2.0 | mithro/travis-trusty-test | shell | ## Code Before:
set -x
set -e
# Check that I'm running under trusty
if [ $(lsb_release -c -s) != "trusty" ]; then
echo "Not running under trusty!"
exit 1
fi
# Check that I'm still running under the travis user id
if [ $(whoami) != "travis" ]; then
echo "Username $(whoami) not travis!"
exit 1
fi
# Check I can still use sudo
sudo /bin/true
# Check I can apt-get install
sudo apt-get -y --force-yes install vim
# Check I can compile something
cat > test.c <<EOF
int main(void) {
return 0;
}
EOF
gcc test.c -o test
./test
## Instruction:
Change to a directory you can write too.
## Code After:
set -x
set -e
cd /tmp
# Check that I'm running under trusty
if [ $(lsb_release -c -s) != "trusty" ]; then
echo "Not running under trusty!"
exit 1
fi
# Check that I'm still running under the travis user id
if [ $(whoami) != "travis" ]; then
echo "Username $(whoami) not travis!"
exit 1
fi
# Check I can still use sudo
sudo /bin/true
# Check I can apt-get install
sudo apt-get -y --force-yes install vim
umask
# Check I can compile something
cat > test.c <<EOF
int main(void) {
return 0;
}
EOF
ls -l test.c
gcc test.c -o test
./test
|
set -x
set -e
+
+ cd /tmp
# Check that I'm running under trusty
if [ $(lsb_release -c -s) != "trusty" ]; then
echo "Not running under trusty!"
exit 1
fi
# Check that I'm still running under the travis user id
if [ $(whoami) != "travis" ]; then
echo "Username $(whoami) not travis!"
exit 1
fi
# Check I can still use sudo
sudo /bin/true
# Check I can apt-get install
sudo apt-get -y --force-yes install vim
+ umask
+
# Check I can compile something
cat > test.c <<EOF
int main(void) {
return 0;
}
EOF
+ ls -l test.c
gcc test.c -o test
./test | 5 | 0.166667 | 5 | 0 |
86972a95268498cd248985ea918e2ec4ad8496de | lib/wiki-plugins/wikiplugin_center.php | lib/wiki-plugins/wikiplugin_center.php | <?php
// Centers the plugin content in the wiki page
// Usage
// {CENTER()}
// data
// {CENTER}
function wikiplugin_center_help() {
return tra("Centers the plugin content in the wiki page").":<br />~np~{CENTER()}".tra("text")."{CENTER}~/np~";
}
function wikiplugin_center_info() {
return array(
'name' => tra('Center'),
'documentation' => 'PluginCenter',
'description' => tra("Centers the plugin content in the wiki page"),
'prefs' => array('wikiplugin_center'),
'body' => tra('text'),
'params' => array(
),
);
}
function wikiplugin_center($data, $params) {
global $tikilib;
extract ($params,EXTR_SKIP);
$data = '<div align="center">' . trim($data). '</div>';
return $data;
}
| <?php
// Centers the plugin content in the wiki page
// Usage
// {CENTER()}
// data
// {CENTER}
function wikiplugin_center_help() {
return tra("Centers the plugin content in the wiki page").":<br />~np~{CENTER()}".tra("text")."{CENTER}~/np~";
}
function wikiplugin_center_info() {
return array(
'name' => tra('Center'),
'documentation' => 'PluginCenter',
'description' => tra("Centers the plugin content in the wiki page"),
'prefs' => array('wikiplugin_center'),
'body' => tra('text'),
'icon' => 'pics/icons/text_align_center.png',
'params' => array(
),
);
}
function wikiplugin_center($data, $params) {
global $tikilib;
extract ($params,EXTR_SKIP);
$data = '<div align="center">' . trim($data). '</div>';
return $data;
}
| Add missing icon to PluginCenter | [ENH] Add missing icon to PluginCenter
git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@20876 b456876b-0849-0410-b77d-98878d47e9d5
| PHP | lgpl-2.1 | changi67/tiki,changi67/tiki,tikiorg/tiki,oregional/tiki,changi67/tiki,oregional/tiki,tikiorg/tiki,tikiorg/tiki,oregional/tiki,changi67/tiki,oregional/tiki,changi67/tiki,tikiorg/tiki | php | ## Code Before:
<?php
// Centers the plugin content in the wiki page
// Usage
// {CENTER()}
// data
// {CENTER}
function wikiplugin_center_help() {
return tra("Centers the plugin content in the wiki page").":<br />~np~{CENTER()}".tra("text")."{CENTER}~/np~";
}
function wikiplugin_center_info() {
return array(
'name' => tra('Center'),
'documentation' => 'PluginCenter',
'description' => tra("Centers the plugin content in the wiki page"),
'prefs' => array('wikiplugin_center'),
'body' => tra('text'),
'params' => array(
),
);
}
function wikiplugin_center($data, $params) {
global $tikilib;
extract ($params,EXTR_SKIP);
$data = '<div align="center">' . trim($data). '</div>';
return $data;
}
## Instruction:
[ENH] Add missing icon to PluginCenter
git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@20876 b456876b-0849-0410-b77d-98878d47e9d5
## Code After:
<?php
// Centers the plugin content in the wiki page
// Usage
// {CENTER()}
// data
// {CENTER}
function wikiplugin_center_help() {
return tra("Centers the plugin content in the wiki page").":<br />~np~{CENTER()}".tra("text")."{CENTER}~/np~";
}
function wikiplugin_center_info() {
return array(
'name' => tra('Center'),
'documentation' => 'PluginCenter',
'description' => tra("Centers the plugin content in the wiki page"),
'prefs' => array('wikiplugin_center'),
'body' => tra('text'),
'icon' => 'pics/icons/text_align_center.png',
'params' => array(
),
);
}
function wikiplugin_center($data, $params) {
global $tikilib;
extract ($params,EXTR_SKIP);
$data = '<div align="center">' . trim($data). '</div>';
return $data;
}
| <?php
// Centers the plugin content in the wiki page
// Usage
// {CENTER()}
// data
// {CENTER}
function wikiplugin_center_help() {
return tra("Centers the plugin content in the wiki page").":<br />~np~{CENTER()}".tra("text")."{CENTER}~/np~";
}
function wikiplugin_center_info() {
return array(
'name' => tra('Center'),
'documentation' => 'PluginCenter',
'description' => tra("Centers the plugin content in the wiki page"),
'prefs' => array('wikiplugin_center'),
'body' => tra('text'),
+ 'icon' => 'pics/icons/text_align_center.png',
'params' => array(
),
);
}
function wikiplugin_center($data, $params) {
global $tikilib;
extract ($params,EXTR_SKIP);
$data = '<div align="center">' . trim($data). '</div>';
return $data;
} | 1 | 0.033333 | 1 | 0 |
bf7f726821f2ac74e99fd5fd06729ea2becab0c9 | ModuleInterface.py | ModuleInterface.py | import GlobalVars
class ModuleInterface(object):
triggers = []
acceptedTypes = ['PRIVMSG']
help = '<no help defined (yet)>'
def __init__(self):
self.onStart()
def onStart(self):
pass
def hasAlias(self, message):
if message.Type in self.acceptedTypes and message.Command in GlobalVars.commandAliases.keys():
return True
def shouldTrigger(self, message):
if message.Type not in self.acceptedTypes:
return False
if message.Command not in self.triggers:
return False
return True
def onTrigger(self, Hubbot, message):
pass | import GlobalVars
class ModuleInterface(object):
triggers = []
acceptedTypes = ['PRIVMSG']
help = '<no help defined (yet)>'
def __init__(self):
self.onStart()
def onStart(self):
pass
def hasAlias(self, message):
if message.Type in self.acceptedTypes and message.Command in GlobalVars.commandAliases.keys():
return True
else:
return False
def shouldTrigger(self, message):
if message.Type not in self.acceptedTypes:
return False
if message.Command not in self.triggers:
return False
return True
def onTrigger(self, Hubbot, message):
pass | Return false if no alias. | [ModuleInteface] Return false if no alias.
| Python | mit | HubbeKing/Hubbot_Twisted | python | ## Code Before:
import GlobalVars
class ModuleInterface(object):
triggers = []
acceptedTypes = ['PRIVMSG']
help = '<no help defined (yet)>'
def __init__(self):
self.onStart()
def onStart(self):
pass
def hasAlias(self, message):
if message.Type in self.acceptedTypes and message.Command in GlobalVars.commandAliases.keys():
return True
def shouldTrigger(self, message):
if message.Type not in self.acceptedTypes:
return False
if message.Command not in self.triggers:
return False
return True
def onTrigger(self, Hubbot, message):
pass
## Instruction:
[ModuleInteface] Return false if no alias.
## Code After:
import GlobalVars
class ModuleInterface(object):
triggers = []
acceptedTypes = ['PRIVMSG']
help = '<no help defined (yet)>'
def __init__(self):
self.onStart()
def onStart(self):
pass
def hasAlias(self, message):
if message.Type in self.acceptedTypes and message.Command in GlobalVars.commandAliases.keys():
return True
else:
return False
def shouldTrigger(self, message):
if message.Type not in self.acceptedTypes:
return False
if message.Command not in self.triggers:
return False
return True
def onTrigger(self, Hubbot, message):
pass | import GlobalVars
class ModuleInterface(object):
triggers = []
acceptedTypes = ['PRIVMSG']
help = '<no help defined (yet)>'
def __init__(self):
self.onStart()
def onStart(self):
pass
def hasAlias(self, message):
if message.Type in self.acceptedTypes and message.Command in GlobalVars.commandAliases.keys():
return True
+ else:
+ return False
def shouldTrigger(self, message):
if message.Type not in self.acceptedTypes:
return False
if message.Command not in self.triggers:
return False
return True
def onTrigger(self, Hubbot, message):
pass | 2 | 0.071429 | 2 | 0 |
217f20c41210da89571fc3be919f9e1f45e5dbe8 | roles/utilities/tasks/main.yml | roles/utilities/tasks/main.yml | ---
- name: Install the latest versions of utility packages using yum
yum: pkg={{item}} state=latest
with_items:
- asciidoc
- byobu
- curl
- git
- htop
- iotop
- lshw
- nmap
- p7zip
- pngcrush
- sos
- telnet
- unzip
- vim
- wget
- name: Install the latest versions of development packages using yum
yum: pkg={{item}} state=latest
with_items:
- '@Development Tools'
- php-cli
- python-devel
- python-pip
- ruby-devel
- name: Install the latest version of jekyll using rubygems
gem: name=jekyll state=latest
- name: Remove immutable bit from /usr/lib/udev/rules.d/60-net.rules
command: chattr -i /usr/lib/udev/rules.d/60-net.rules
- name: Upgrade all installed packages
yum: name=* state=latest
| ---
- name: Install the latest versions of utility packages using yum
yum: pkg={{item}} state=latest
with_items:
- asciidoc
- byobu
- curl
- git
- htop
- iotop
- lshw
- nmap
- p7zip
- pngcrush
- sos
- telnet
- unzip
- vim
- wget
# This could be done using yum but depending on the ansible version it's either "'@Development Tools'" or '@Development Tools'
- name: Install the 'Development Tools' group using yum
command: yum -y install '@Development Tools'
args:
creates: /usr/bin/svn
- name: Install the latest versions of additional development packages using yum
yum: pkg={{item}} state=latest
with_items:
- php-cli
- python-devel
- python-pip
- ruby-devel
- name: Install the latest version of jekyll using rubygems
gem: name=jekyll state=latest
- name: Remove immutable bit from /usr/lib/udev/rules.d/60-net.rules
command: chattr -i /usr/lib/udev/rules.d/60-net.rules
- name: Upgrade all installed packages
yum: name=* state=latest
| Split development tools group into its own task | Split development tools group into its own task
| YAML | mit | dylanmtaylor/dylanmtaylor-ansible,dylanmtaylor/dylanmtaylor-ansible | yaml | ## Code Before:
---
- name: Install the latest versions of utility packages using yum
yum: pkg={{item}} state=latest
with_items:
- asciidoc
- byobu
- curl
- git
- htop
- iotop
- lshw
- nmap
- p7zip
- pngcrush
- sos
- telnet
- unzip
- vim
- wget
- name: Install the latest versions of development packages using yum
yum: pkg={{item}} state=latest
with_items:
- '@Development Tools'
- php-cli
- python-devel
- python-pip
- ruby-devel
- name: Install the latest version of jekyll using rubygems
gem: name=jekyll state=latest
- name: Remove immutable bit from /usr/lib/udev/rules.d/60-net.rules
command: chattr -i /usr/lib/udev/rules.d/60-net.rules
- name: Upgrade all installed packages
yum: name=* state=latest
## Instruction:
Split development tools group into its own task
## Code After:
---
- name: Install the latest versions of utility packages using yum
yum: pkg={{item}} state=latest
with_items:
- asciidoc
- byobu
- curl
- git
- htop
- iotop
- lshw
- nmap
- p7zip
- pngcrush
- sos
- telnet
- unzip
- vim
- wget
# This could be done using yum but depending on the ansible version it's either "'@Development Tools'" or '@Development Tools'
- name: Install the 'Development Tools' group using yum
command: yum -y install '@Development Tools'
args:
creates: /usr/bin/svn
- name: Install the latest versions of additional development packages using yum
yum: pkg={{item}} state=latest
with_items:
- php-cli
- python-devel
- python-pip
- ruby-devel
- name: Install the latest version of jekyll using rubygems
gem: name=jekyll state=latest
- name: Remove immutable bit from /usr/lib/udev/rules.d/60-net.rules
command: chattr -i /usr/lib/udev/rules.d/60-net.rules
- name: Upgrade all installed packages
yum: name=* state=latest
| ---
- name: Install the latest versions of utility packages using yum
yum: pkg={{item}} state=latest
with_items:
- asciidoc
- byobu
- curl
- git
- htop
- iotop
- lshw
- nmap
- p7zip
- pngcrush
- sos
- telnet
- unzip
- vim
- wget
+ # This could be done using yum but depending on the ansible version it's either "'@Development Tools'" or '@Development Tools'
+ - name: Install the 'Development Tools' group using yum
+ command: yum -y install '@Development Tools'
+ args:
+ creates: /usr/bin/svn
+
- - name: Install the latest versions of development packages using yum
+ - name: Install the latest versions of additional development packages using yum
? +++++++++++
yum: pkg={{item}} state=latest
with_items:
- - '@Development Tools'
- php-cli
- python-devel
- python-pip
- ruby-devel
- name: Install the latest version of jekyll using rubygems
gem: name=jekyll state=latest
- name: Remove immutable bit from /usr/lib/udev/rules.d/60-net.rules
command: chattr -i /usr/lib/udev/rules.d/60-net.rules
- name: Upgrade all installed packages
yum: name=* state=latest | 9 | 0.243243 | 7 | 2 |
b52a19fbbb9e43e5431eb36053210b24ab690713 | src/docs/asciidoc/index.asciidoc | src/docs/asciidoc/index.asciidoc | = Reactor Netty
Stephane Maldini;
:appversion: 0.5.0 (wiki)
ifndef::host-github[:ext-relative: {outfilesuffix}]
{appversion}
:doctype: book
:icons: font
include::net.adoc[]
include::net-tcp.adoc[]
include::net-http.adoc[]
include::net-e2e.adoc[]
| = Reactor Netty
Stephane Maldini;
:appversion: 0.5.0 (wiki)
ifndef::host-github[:ext-relative: {outfilesuffix}]
{appversion}
:doctype: book
:icons: font
include::net.adoc[]
include::net-tcp.adoc[]
include::net-http.adoc[]
| Fix warning in asciidoc rendering | Fix warning in asciidoc rendering
| AsciiDoc | apache-2.0 | reactor/reactor-netty,reactor/reactor-netty | asciidoc | ## Code Before:
= Reactor Netty
Stephane Maldini;
:appversion: 0.5.0 (wiki)
ifndef::host-github[:ext-relative: {outfilesuffix}]
{appversion}
:doctype: book
:icons: font
include::net.adoc[]
include::net-tcp.adoc[]
include::net-http.adoc[]
include::net-e2e.adoc[]
## Instruction:
Fix warning in asciidoc rendering
## Code After:
= Reactor Netty
Stephane Maldini;
:appversion: 0.5.0 (wiki)
ifndef::host-github[:ext-relative: {outfilesuffix}]
{appversion}
:doctype: book
:icons: font
include::net.adoc[]
include::net-tcp.adoc[]
include::net-http.adoc[]
| = Reactor Netty
Stephane Maldini;
:appversion: 0.5.0 (wiki)
ifndef::host-github[:ext-relative: {outfilesuffix}]
{appversion}
:doctype: book
:icons: font
include::net.adoc[]
include::net-tcp.adoc[]
include::net-http.adoc[]
- include::net-e2e.adoc[]
| 1 | 0.076923 | 0 | 1 |
b28169a0c492fa64fdc437c94ee468cb6615422d | js-notes/javascript-notes.md | js-notes/javascript-notes.md | * ""
* False
* 0
* -0
* NAN
* null
* undefined
#Floating Point Numbers
* All numbers in JavaScript are double-precision floating-point numbers, 64-bit encoding of numbers, also known as "doubles".
* Bitwise operators implicitly converts integers to 32-bit integers.
# The 5 JavaScript Primitives Values
* Booleans
* Numbers
* Strings
* Null
* Undefined
* Symbols (ECMAScript 6)
# Think of Strings As Sequences of 16-Bit Code Units
* An element of a JavaScript string is a 16-bit code unit.
# Minimize Use of the Global Object
* Avoid declaring global variables.
* Declare variables as locally as possible.
* Avoid adding properties to the global object.
* Use the global object for platform feature detection.
# Always Declare Local Variables
* Always declare new local variables with var.
# Avoid 'with'
* Avoid using with statements.
* Use short variable names for repeated access to an object.
* Explicitly bind local variables to object properties instead of implicitly binding them with a 'with' statement.
| * ""
* False
* 0
* -0
* NAN
* null
* undefined
#Floating Point Numbers
* All numbers in JavaScript are double-precision floating-point numbers, 64-bit encoding of numbers, also known as "doubles".
* Bitwise operators implicitly converts integers to 32-bit integers.
# The 5 JavaScript Primitives Values
* Booleans
* Numbers
* Strings
* Null
* Undefined
* Symbols (ECMAScript 6)
# Think of Strings As Sequences of 16-Bit Code Units
* An element of a JavaScript string is a 16-bit code unit.
# Minimize Use of the Global Object
* Avoid declaring global variables.
* Declare variables as locally as possible.
* Avoid adding properties to the global object.
* Use the global object for platform feature detection.
# Always Declare Local Variables
* Always declare new local variables with var.
# Avoid 'with'
* Avoid using with statements.
* Use short variable names for repeated access to an object.
* Explicitly bind local variables to object properties instead of implicitly binding them with a 'with' statement.
# Get Comfortable with Closures
* Functions can refer to variables defined in outer scopes.
* Closures can outlive the function that creates them.
* Closures internally store references to their outer variables, and can both read and update their stored variables.
| Add closure notes to js notes | Add closure notes to js notes
| Markdown | mit | schaui6/geek_out,schaui6/geek_out,schaui6/geek_out | markdown | ## Code Before:
* ""
* False
* 0
* -0
* NAN
* null
* undefined
#Floating Point Numbers
* All numbers in JavaScript are double-precision floating-point numbers, 64-bit encoding of numbers, also known as "doubles".
* Bitwise operators implicitly converts integers to 32-bit integers.
# The 5 JavaScript Primitives Values
* Booleans
* Numbers
* Strings
* Null
* Undefined
* Symbols (ECMAScript 6)
# Think of Strings As Sequences of 16-Bit Code Units
* An element of a JavaScript string is a 16-bit code unit.
# Minimize Use of the Global Object
* Avoid declaring global variables.
* Declare variables as locally as possible.
* Avoid adding properties to the global object.
* Use the global object for platform feature detection.
# Always Declare Local Variables
* Always declare new local variables with var.
# Avoid 'with'
* Avoid using with statements.
* Use short variable names for repeated access to an object.
* Explicitly bind local variables to object properties instead of implicitly binding them with a 'with' statement.
## Instruction:
Add closure notes to js notes
## Code After:
* ""
* False
* 0
* -0
* NAN
* null
* undefined
#Floating Point Numbers
* All numbers in JavaScript are double-precision floating-point numbers, 64-bit encoding of numbers, also known as "doubles".
* Bitwise operators implicitly converts integers to 32-bit integers.
# The 5 JavaScript Primitives Values
* Booleans
* Numbers
* Strings
* Null
* Undefined
* Symbols (ECMAScript 6)
# Think of Strings As Sequences of 16-Bit Code Units
* An element of a JavaScript string is a 16-bit code unit.
# Minimize Use of the Global Object
* Avoid declaring global variables.
* Declare variables as locally as possible.
* Avoid adding properties to the global object.
* Use the global object for platform feature detection.
# Always Declare Local Variables
* Always declare new local variables with var.
# Avoid 'with'
* Avoid using with statements.
* Use short variable names for repeated access to an object.
* Explicitly bind local variables to object properties instead of implicitly binding them with a 'with' statement.
# Get Comfortable with Closures
* Functions can refer to variables defined in outer scopes.
* Closures can outlive the function that creates them.
* Closures internally store references to their outer variables, and can both read and update their stored variables.
| * ""
* False
* 0
* -0
* NAN
* null
* undefined
#Floating Point Numbers
* All numbers in JavaScript are double-precision floating-point numbers, 64-bit encoding of numbers, also known as "doubles".
* Bitwise operators implicitly converts integers to 32-bit integers.
# The 5 JavaScript Primitives Values
* Booleans
* Numbers
* Strings
* Null
* Undefined
* Symbols (ECMAScript 6)
# Think of Strings As Sequences of 16-Bit Code Units
* An element of a JavaScript string is a 16-bit code unit.
# Minimize Use of the Global Object
* Avoid declaring global variables.
* Declare variables as locally as possible.
* Avoid adding properties to the global object.
* Use the global object for platform feature detection.
# Always Declare Local Variables
* Always declare new local variables with var.
# Avoid 'with'
* Avoid using with statements.
* Use short variable names for repeated access to an object.
- * Explicitly bind local variables to object properties instead of implicitly binding them with a 'with' statement.
? -
+ * Explicitly bind local variables to object properties instead of implicitly binding them with a 'with' statement.
+
+ # Get Comfortable with Closures
+ * Functions can refer to variables defined in outer scopes.
+ * Closures can outlive the function that creates them.
+ * Closures internally store references to their outer variables, and can both read and update their stored variables. | 7 | 0.194444 | 6 | 1 |
71b0eaf260f3fcdaff835e3d9ba98260c3bf6f67 | app/controllers/app.rb | app/controllers/app.rb | require 'safe_yaml'
require 'sinatra/base'
require 'cocoapods-core/specification'
require 'cocoapods-core/specification/linter'
require 'db/config'
require 'app/models/github'
require 'app/models/pod'
SafeYAML::OPTIONS[:default_mode] = :safe
module Pod
module PushApp
class App < Sinatra::Base
before do
error 415 unless request.media_type == 'text/yaml'
content_type 'text/yaml'
end
post '/pods' do
# TODO
# * wrap in a transaction for error handling
# * store github pull-request progress state
if specification
linter = Specification::Linter.new(specification)
if linter.lint
pod_version = PodVersion.by_name_and_version(specification.name, specification.version.to_s)
halt 202
else
results = {}
results['warnings'] = linter.warnings.map(&:message) unless linter.warnings.empty?
results['errors'] = linter.errors.map(&:message) unless linter.errors.empty?
error 422, results.to_yaml
end
end
error 400
end
private
def specification
@specification ||= begin
hash = YAML.safe_load(request.body)
Specification.from_hash(hash) if hash.is_a?(Hash)
end
end
end
end
end
| require 'safe_yaml'
require 'sinatra/base'
require 'cocoapods-core/specification'
require 'cocoapods-core/specification/linter'
require 'db/config'
require 'app/models/github'
require 'app/models/pod'
SafeYAML::OPTIONS[:default_mode] = :safe
module Pod
module PushApp
class App < Sinatra::Base
before do
content_type 'text/yaml'
unless request.media_type == 'text/yaml'
error 415, "Unable to accept input with Content-Type `#{request.media_type}`, must be `text/yaml`.".to_yaml
end
end
post '/pods' do
if specification.nil?
error 400, 'Unable to load a Pod Specification from the provided input.'.to_yaml
end
linter = Specification::Linter.new(specification)
unless linter.lint
results = {}
results['warnings'] = linter.warnings.map(&:message) unless linter.warnings.empty?
results['errors'] = linter.errors.map(&:message) unless linter.errors.empty?
error 422, results.to_yaml
end
pod_version = PodVersion.by_name_and_version(specification.name, specification.version.to_s)
halt 202
end
private
def specification
@specification ||= begin
hash = YAML.safe_load(request.body)
Specification.from_hash(hash) if hash.is_a?(Hash)
end
end
end
end
end
| Refactor and add some more error messages. | Refactor and add some more error messages.
| Ruby | mit | billinghamj/trunk.cocoapods.org,k0nserv/trunk.cocoapods.org,CocoaPods/trunk.cocoapods.org,k0nserv/trunk.cocoapods.org,k0nserv/trunk.cocoapods.org,CocoaPods/trunk.cocoapods.org,billinghamj/trunk.cocoapods.org,Shawn-WangDapeng/trunk.cocoapods.org,Shawn-WangDapeng/trunk.cocoapods.org | ruby | ## Code Before:
require 'safe_yaml'
require 'sinatra/base'
require 'cocoapods-core/specification'
require 'cocoapods-core/specification/linter'
require 'db/config'
require 'app/models/github'
require 'app/models/pod'
SafeYAML::OPTIONS[:default_mode] = :safe
module Pod
module PushApp
class App < Sinatra::Base
before do
error 415 unless request.media_type == 'text/yaml'
content_type 'text/yaml'
end
post '/pods' do
# TODO
# * wrap in a transaction for error handling
# * store github pull-request progress state
if specification
linter = Specification::Linter.new(specification)
if linter.lint
pod_version = PodVersion.by_name_and_version(specification.name, specification.version.to_s)
halt 202
else
results = {}
results['warnings'] = linter.warnings.map(&:message) unless linter.warnings.empty?
results['errors'] = linter.errors.map(&:message) unless linter.errors.empty?
error 422, results.to_yaml
end
end
error 400
end
private
def specification
@specification ||= begin
hash = YAML.safe_load(request.body)
Specification.from_hash(hash) if hash.is_a?(Hash)
end
end
end
end
end
## Instruction:
Refactor and add some more error messages.
## Code After:
require 'safe_yaml'
require 'sinatra/base'
require 'cocoapods-core/specification'
require 'cocoapods-core/specification/linter'
require 'db/config'
require 'app/models/github'
require 'app/models/pod'
SafeYAML::OPTIONS[:default_mode] = :safe
module Pod
module PushApp
class App < Sinatra::Base
before do
content_type 'text/yaml'
unless request.media_type == 'text/yaml'
error 415, "Unable to accept input with Content-Type `#{request.media_type}`, must be `text/yaml`.".to_yaml
end
end
post '/pods' do
if specification.nil?
error 400, 'Unable to load a Pod Specification from the provided input.'.to_yaml
end
linter = Specification::Linter.new(specification)
unless linter.lint
results = {}
results['warnings'] = linter.warnings.map(&:message) unless linter.warnings.empty?
results['errors'] = linter.errors.map(&:message) unless linter.errors.empty?
error 422, results.to_yaml
end
pod_version = PodVersion.by_name_and_version(specification.name, specification.version.to_s)
halt 202
end
private
def specification
@specification ||= begin
hash = YAML.safe_load(request.body)
Specification.from_hash(hash) if hash.is_a?(Hash)
end
end
end
end
end
| require 'safe_yaml'
require 'sinatra/base'
require 'cocoapods-core/specification'
require 'cocoapods-core/specification/linter'
require 'db/config'
require 'app/models/github'
require 'app/models/pod'
SafeYAML::OPTIONS[:default_mode] = :safe
module Pod
module PushApp
class App < Sinatra::Base
before do
- error 415 unless request.media_type == 'text/yaml'
content_type 'text/yaml'
+ unless request.media_type == 'text/yaml'
+ error 415, "Unable to accept input with Content-Type `#{request.media_type}`, must be `text/yaml`.".to_yaml
+ end
end
post '/pods' do
- # TODO
- # * wrap in a transaction for error handling
- # * store github pull-request progress state
- if specification
+ if specification.nil?
? +++++
+ error 400, 'Unable to load a Pod Specification from the provided input.'.to_yaml
- linter = Specification::Linter.new(specification)
- if linter.lint
- pod_version = PodVersion.by_name_and_version(specification.name, specification.version.to_s)
- halt 202
- else
- results = {}
- results['warnings'] = linter.warnings.map(&:message) unless linter.warnings.empty?
- results['errors'] = linter.errors.map(&:message) unless linter.errors.empty?
- error 422, results.to_yaml
- end
end
- error 400
+
+ linter = Specification::Linter.new(specification)
+ unless linter.lint
+ results = {}
+ results['warnings'] = linter.warnings.map(&:message) unless linter.warnings.empty?
+ results['errors'] = linter.errors.map(&:message) unless linter.errors.empty?
+ error 422, results.to_yaml
+ end
+
+ pod_version = PodVersion.by_name_and_version(specification.name, specification.version.to_s)
+ halt 202
end
private
def specification
@specification ||= begin
hash = YAML.safe_load(request.body)
Specification.from_hash(hash) if hash.is_a?(Hash)
end
end
end
end
end | 32 | 0.64 | 16 | 16 |
ec6a4bef742a5e0f1bb0ddc3ba36965ee399b072 | .travis.yml | .travis.yml | language: go
go:
- 1.6
- tip
install: make deps
script:
- make integ
notifications:
flowdock:
secure: fZrcf9rlh2IrQrlch1sHkn3YI7SKvjGnAl/zyV5D6NROe1Bbr6d3QRMuCXWWdhJHzjKmXk5rIzbqJhUc0PNF7YjxGNKSzqWMQ56KcvN1k8DzlqxpqkcA3Jbs6fXCWo2fssRtZ7hj/wOP1f5n6cc7kzHDt9dgaYJ6nO2fqNPJiTc=
| language: go
go:
# Disabled until https://github.com/armon/go-metrics/issues/59 is fixed
# - 1.6
- 1.8
- 1.9
- tip
install: make deps
script:
- make integ
notifications:
flowdock:
secure: fZrcf9rlh2IrQrlch1sHkn3YI7SKvjGnAl/zyV5D6NROe1Bbr6d3QRMuCXWWdhJHzjKmXk5rIzbqJhUc0PNF7YjxGNKSzqWMQ56KcvN1k8DzlqxpqkcA3Jbs6fXCWo2fssRtZ7hj/wOP1f5n6cc7kzHDt9dgaYJ6nO2fqNPJiTc=
| Fix build and test against newer go versions | Travis: Fix build and test against newer go versions | YAML | mpl-2.0 | hashicorp/raft,hashicorp/raft,otoolep/raft | yaml | ## Code Before:
language: go
go:
- 1.6
- tip
install: make deps
script:
- make integ
notifications:
flowdock:
secure: fZrcf9rlh2IrQrlch1sHkn3YI7SKvjGnAl/zyV5D6NROe1Bbr6d3QRMuCXWWdhJHzjKmXk5rIzbqJhUc0PNF7YjxGNKSzqWMQ56KcvN1k8DzlqxpqkcA3Jbs6fXCWo2fssRtZ7hj/wOP1f5n6cc7kzHDt9dgaYJ6nO2fqNPJiTc=
## Instruction:
Travis: Fix build and test against newer go versions
## Code After:
language: go
go:
# Disabled until https://github.com/armon/go-metrics/issues/59 is fixed
# - 1.6
- 1.8
- 1.9
- tip
install: make deps
script:
- make integ
notifications:
flowdock:
secure: fZrcf9rlh2IrQrlch1sHkn3YI7SKvjGnAl/zyV5D6NROe1Bbr6d3QRMuCXWWdhJHzjKmXk5rIzbqJhUc0PNF7YjxGNKSzqWMQ56KcvN1k8DzlqxpqkcA3Jbs6fXCWo2fssRtZ7hj/wOP1f5n6cc7kzHDt9dgaYJ6nO2fqNPJiTc=
| language: go
go:
+ # Disabled until https://github.com/armon/go-metrics/issues/59 is fixed
- - 1.6
+ # - 1.6
? ++
+ - 1.8
+ - 1.9
- tip
install: make deps
script:
- make integ
notifications:
flowdock:
secure: fZrcf9rlh2IrQrlch1sHkn3YI7SKvjGnAl/zyV5D6NROe1Bbr6d3QRMuCXWWdhJHzjKmXk5rIzbqJhUc0PNF7YjxGNKSzqWMQ56KcvN1k8DzlqxpqkcA3Jbs6fXCWo2fssRtZ7hj/wOP1f5n6cc7kzHDt9dgaYJ6nO2fqNPJiTc=
| 5 | 0.357143 | 4 | 1 |
4b8838b347c97f50afcf02cbb8714da6ff685f0f | demo.html | demo.html | <!DOCTYPE html>
<html>
<head>
<title>Echo Conversations v{%=packageVersions.stable%} Demo</title>
<script type="text/javascript" src="//cdn.echoenabled.com/sdk/v3/loader.js"></script>
</head>
<body>
<div class="echo-canvas" data-canvas-id="echo/vmhrq53fen" data-canvas-mode="dev" style="margin: 0px auto; width: 50%; max-width: 440px;"></div>
<script type="text/javascript">
Echo.Loader.override("echo/vmhrq53fen", "j7v5dpmmb5", {
"streamingControl": {
"displayStreamingStateHeader": true
},
"postComposer": {
"contentTypes": {
"comments": {
"attachments": {"visible": true}
}
}
},
"replyComposer": {
"contentTypes": {
"comments": {
"attachments": {"visible": true}
}
}
},
"auth": {
"allowAnonymousSubmission": true
}
});
Echo.Loader.init();
</script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<title>Echo Conversations v{%=packageVersions.stable%} Demo</title>
<script type="text/javascript" src="//cdn.echoenabled.com/sdk/v3/loader.js"></script>
</head>
<body>
<div class="echo-canvas" data-canvas-id="echo/vmhrq53fen" data-canvas-mode="dev" style="margin: 0px auto; width: 50%; max-width: 440px;"></div>
<script type="text/javascript">
Echo.Loader.override("echo/vmhrq53fen", "w22qqwd0wy", {
"streamingControl": {
"displayStreamingStateHeader": true
},
"postComposer": {
"contentTypes": {
"comments": {
"attachments": {"visible": true}
}
}
},
"replyComposer": {
"contentTypes": {
"comments": {
"attachments": {"visible": true}
}
}
},
"auth": {
"allowAnonymousSubmission": true
}
});
Echo.Loader.init();
</script>
</body>
</html>
| Use proper instance id for overrides | Use proper instance id for overrides
| HTML | apache-2.0 | EchoAppsTeam/EchoConversations | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<title>Echo Conversations v{%=packageVersions.stable%} Demo</title>
<script type="text/javascript" src="//cdn.echoenabled.com/sdk/v3/loader.js"></script>
</head>
<body>
<div class="echo-canvas" data-canvas-id="echo/vmhrq53fen" data-canvas-mode="dev" style="margin: 0px auto; width: 50%; max-width: 440px;"></div>
<script type="text/javascript">
Echo.Loader.override("echo/vmhrq53fen", "j7v5dpmmb5", {
"streamingControl": {
"displayStreamingStateHeader": true
},
"postComposer": {
"contentTypes": {
"comments": {
"attachments": {"visible": true}
}
}
},
"replyComposer": {
"contentTypes": {
"comments": {
"attachments": {"visible": true}
}
}
},
"auth": {
"allowAnonymousSubmission": true
}
});
Echo.Loader.init();
</script>
</body>
</html>
## Instruction:
Use proper instance id for overrides
## Code After:
<!DOCTYPE html>
<html>
<head>
<title>Echo Conversations v{%=packageVersions.stable%} Demo</title>
<script type="text/javascript" src="//cdn.echoenabled.com/sdk/v3/loader.js"></script>
</head>
<body>
<div class="echo-canvas" data-canvas-id="echo/vmhrq53fen" data-canvas-mode="dev" style="margin: 0px auto; width: 50%; max-width: 440px;"></div>
<script type="text/javascript">
Echo.Loader.override("echo/vmhrq53fen", "w22qqwd0wy", {
"streamingControl": {
"displayStreamingStateHeader": true
},
"postComposer": {
"contentTypes": {
"comments": {
"attachments": {"visible": true}
}
}
},
"replyComposer": {
"contentTypes": {
"comments": {
"attachments": {"visible": true}
}
}
},
"auth": {
"allowAnonymousSubmission": true
}
});
Echo.Loader.init();
</script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<title>Echo Conversations v{%=packageVersions.stable%} Demo</title>
<script type="text/javascript" src="//cdn.echoenabled.com/sdk/v3/loader.js"></script>
</head>
<body>
<div class="echo-canvas" data-canvas-id="echo/vmhrq53fen" data-canvas-mode="dev" style="margin: 0px auto; width: 50%; max-width: 440px;"></div>
<script type="text/javascript">
- Echo.Loader.override("echo/vmhrq53fen", "j7v5dpmmb5", {
? ^^^^ ^^^^^
+ Echo.Loader.override("echo/vmhrq53fen", "w22qqwd0wy", {
? ^^^^^^ ^^^
"streamingControl": {
"displayStreamingStateHeader": true
},
"postComposer": {
"contentTypes": {
"comments": {
"attachments": {"visible": true}
}
}
},
"replyComposer": {
"contentTypes": {
"comments": {
"attachments": {"visible": true}
}
}
},
"auth": {
"allowAnonymousSubmission": true
}
});
Echo.Loader.init();
</script>
</body>
</html> | 2 | 0.052632 | 1 | 1 |
468d29251da81bb3a16380b4465becf35db2ba23 | app/views/layouts/header/_public.html.haml | app/views/layouts/header/_public.html.haml | %header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
.container
.header-logo
= link_to explore_root_path, class: "home" do
= brand_header_logo
.gitlab-text-container
%h3 GitLab
.header-content
- unless current_controller?('sessions')
.pull-right
= link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-success btn-sm'
%h1.title= title
= render 'shared/outdated_browser'
| %header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
%div{ class: fluid_layout ? "container-fluid" : "container-fluid container-limited" }
.header-content
- unless current_controller?('sessions')
.pull-right
= link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-success btn-sm'
%h1.title= title
= render 'shared/outdated_browser'
| Fix header for anonymous users too | Fix header for anonymous users too
Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>
| Haml | mit | iiet/iiet-git,dreampet/gitlab,mr-dxdy/gitlabhq,screenpages/gitlabhq,NKMR6194/gitlabhq,SVArago/gitlabhq,Datacom/gitlabhq,LUMC/gitlabhq,darkrasid/gitlabhq,axilleas/gitlabhq,aaronsnyder/gitlabhq,Telekom-PD/gitlabhq,liyakun/gitlabhq,chenrui2014/gitlabhq,ttasanen/gitlabhq,whluwit/gitlabhq,cui-liqiang/gitlab-ce,fpgentil/gitlabhq,theonlydoo/gitlabhq,SVArago/gitlabhq,stanhu/gitlabhq,shinexiao/gitlabhq,allysonbarros/gitlabhq,mrb/gitlabhq,H3Chief/gitlabhq,since2014/gitlabhq,liyakun/gitlabhq,wangcan2014/gitlabhq,sue445/gitlabhq,salipro4ever/gitlabhq,dplarson/gitlabhq,copystudy/gitlabhq,jaepyoung/gitlabhq,kemenaran/gitlabhq,Exeia/gitlabhq,fantasywind/gitlabhq,hacsoc/gitlabhq,pulkit21/gitlabhq,screenpages/gitlabhq,salipro4ever/gitlabhq,icedwater/gitlabhq,allistera/gitlabhq,salipro4ever/gitlabhq,OlegGirko/gitlab-ce,gopeter/gitlabhq,koreamic/gitlabhq,k4zzk/gitlabhq,yfaizal/gitlabhq,Soullivaneuh/gitlabhq,openwide-java/gitlabhq,chenrui2014/gitlabhq,louahola/gitlabhq,OlegGirko/gitlab-ce,fgbreel/gitlabhq,whluwit/gitlabhq,allysonbarros/gitlabhq,ikappas/gitlabhq,delkyd/gitlabhq,vjustov/gitlabhq,theonlydoo/gitlabhq,joalmeid/gitlabhq,htve/GitlabForChinese,jrjang/gitlabhq,koreamic/gitlabhq,Datacom/gitlabhq,stoplightio/gitlabhq,ksoichiro/gitlabhq,shinexiao/gitlabhq,fgbreel/gitlabhq,pjknkda/gitlabhq,fscherwi/gitlabhq,OlegGirko/gitlab-ce,TheWatcher/gitlabhq,daiyu/gitlab-zh,DanielZhangQingLong/gitlabhq,NKMR6194/gitlabhq,kemenaran/gitlabhq,daiyu/gitlab-zh,Razer6/gitlabhq,delkyd/gitlabhq,koreamic/gitlabhq,darkrasid/gitlabhq,martijnvermaat/gitlabhq,it33/gitlabhq,pjknkda/gitlabhq,dwrensha/gitlabhq,Devin001/gitlabhq,t-zuehlsdorff/gitlabhq,Tyrael/gitlabhq,Telekom-PD/gitlabhq,fscherwi/gitlabhq,Exeia/gitlabhq,kemenaran/gitlabhq,Tyrael/gitlabhq,jirutka/gitlabhq,nguyen-tien-mulodo/gitlabhq,dreampet/gitlab,whluwit/gitlabhq,k4zzk/gitlabhq,axilleas/gitlabhq,MauriceMohlek/gitlabhq,dplarson/gitlabhq,martijnvermaat/gitlabhq,pulkit21/gitlabhq,duduribeiro/gitlabhq,hacsoc/gitlabhq,louahola/gitlabhq,ferdinandrosario/gitlabhq,hacsoc/gitlabhq,dwrensha/gitlabhq,pulkit21/gitlabhq,duduribeiro/gitlabhq,wangcan2014/gitlabhq,dukex/gitlabhq,folpindo/gitlabhq,cui-liqiang/gitlab-ce,ordiychen/gitlabhq,joalmeid/gitlabhq,TheWatcher/gitlabhq,ttasanen/gitlabhq,fpgentil/gitlabhq,dreampet/gitlab,sue445/gitlabhq,stanhu/gitlabhq,Datacom/gitlabhq,screenpages/gitlabhq,it33/gitlabhq,martinma4/gitlabhq,ordiychen/gitlabhq,nguyen-tien-mulodo/gitlabhq,vjustov/gitlabhq,pjknkda/gitlabhq,szechyjs/gitlabhq,dukex/gitlabhq,jrjang/gitlabhq,SVArago/gitlabhq,yfaizal/gitlabhq,dwrensha/gitlabhq,MauriceMohlek/gitlabhq,shinexiao/gitlabhq,mrb/gitlabhq,NKMR6194/gitlabhq,ordiychen/gitlabhq,mmkassem/gitlabhq,fgbreel/gitlabhq,fgbreel/gitlabhq,fpgentil/gitlabhq,Razer6/gitlabhq,Exeia/gitlabhq,sonalkr132/gitlabhq,DanielZhangQingLong/gitlabhq,dukex/gitlabhq,cui-liqiang/gitlab-ce,fscherwi/gitlabhq,szechyjs/gitlabhq,nmav/gitlabhq,sonalkr132/gitlabhq,jrjang/gitlab-ce,Telekom-PD/gitlabhq,ksoichiro/gitlabhq,sonalkr132/gitlabhq,delkyd/gitlabhq,michaKFromParis/sparkslab,iiet/iiet-git,jaepyoung/gitlabhq,OtkurBiz/gitlabhq,fantasywind/gitlabhq,stoplightio/gitlabhq,dplarson/gitlabhq,salipro4ever/gitlabhq,htve/GitlabForChinese,TheWatcher/gitlabhq,OtkurBiz/gitlabhq,koreamic/gitlabhq,k4zzk/gitlabhq,ferdinandrosario/gitlabhq,nguyen-tien-mulodo/gitlabhq,allistera/gitlabhq,martijnvermaat/gitlabhq,bozaro/gitlabhq,martijnvermaat/gitlabhq,szechyjs/gitlabhq,k4zzk/gitlabhq,Telekom-PD/gitlabhq,michaKFromParis/sparkslab,allistera/gitlabhq,iiet/iiet-git,louahola/gitlabhq,whluwit/gitlabhq,michaKFromParis/sparkslab,sonalkr132/gitlabhq,ksoichiro/gitlabhq,larryli/gitlabhq,joalmeid/gitlabhq,gopeter/gitlabhq,jrjang/gitlab-ce,allistera/gitlabhq,Soullivaneuh/gitlabhq,martinma4/gitlabhq,t-zuehlsdorff/gitlabhq,jirutka/gitlabhq,fantasywind/gitlabhq,openwide-java/gitlabhq,yatish27/gitlabhq,mr-dxdy/gitlabhq,screenpages/gitlabhq,michaKFromParis/sparkslab,OlegGirko/gitlab-ce,sue445/gitlabhq,since2014/gitlabhq,dwrensha/gitlabhq,fpgentil/gitlabhq,nmav/gitlabhq,since2014/gitlabhq,mrb/gitlabhq,aaronsnyder/gitlabhq,nguyen-tien-mulodo/gitlabhq,theonlydoo/gitlabhq,MauriceMohlek/gitlabhq,stoplightio/gitlabhq,darkrasid/gitlabhq,ferdinandrosario/gitlabhq,mmkassem/gitlabhq,Datacom/gitlabhq,htve/GitlabForChinese,gopeter/gitlabhq,folpindo/gitlabhq,ttasanen/gitlabhq,ttasanen/gitlabhq,stanhu/gitlabhq,copystudy/gitlabhq,jrjang/gitlabhq,dplarson/gitlabhq,openwide-java/gitlabhq,gopeter/gitlabhq,wangcan2014/gitlabhq,Devin001/gitlabhq,icedwater/gitlabhq,ikappas/gitlabhq,aaronsnyder/gitlabhq,liyakun/gitlabhq,jaepyoung/gitlabhq,H3Chief/gitlabhq,allysonbarros/gitlabhq,larryli/gitlabhq,nmav/gitlabhq,folpindo/gitlabhq,larryli/gitlabhq,jrjang/gitlab-ce,daiyu/gitlab-zh,jrjang/gitlabhq,darkrasid/gitlabhq,larryli/gitlabhq,martinma4/gitlabhq,folpindo/gitlabhq,ferdinandrosario/gitlabhq,yatish27/gitlabhq,it33/gitlabhq,SVArago/gitlabhq,chenrui2014/gitlabhq,vjustov/gitlabhq,allysonbarros/gitlabhq,ikappas/gitlabhq,yatish27/gitlabhq,axilleas/gitlabhq,LUMC/gitlabhq,H3Chief/gitlabhq,DanielZhangQingLong/gitlabhq,bozaro/gitlabhq,copystudy/gitlabhq,ksoichiro/gitlabhq,mr-dxdy/gitlabhq,Devin001/gitlabhq,jirutka/gitlabhq,shinexiao/gitlabhq,martinma4/gitlabhq,yfaizal/gitlabhq,Razer6/gitlabhq,Tyrael/gitlabhq,pulkit21/gitlabhq,kemenaran/gitlabhq,bozaro/gitlabhq,jirutka/gitlabhq,OtkurBiz/gitlabhq,axilleas/gitlabhq,htve/GitlabForChinese,jrjang/gitlab-ce,liyakun/gitlabhq,vjustov/gitlabhq,duduribeiro/gitlabhq,mr-dxdy/gitlabhq,hacsoc/gitlabhq,MauriceMohlek/gitlabhq,DanielZhangQingLong/gitlabhq,t-zuehlsdorff/gitlabhq,OtkurBiz/gitlabhq,Devin001/gitlabhq,icedwater/gitlabhq,louahola/gitlabhq,jaepyoung/gitlabhq,Soullivaneuh/gitlabhq,delkyd/gitlabhq,ikappas/gitlabhq,cui-liqiang/gitlab-ce,stanhu/gitlabhq,dukex/gitlabhq,ordiychen/gitlabhq,Tyrael/gitlabhq,wangcan2014/gitlabhq,duduribeiro/gitlabhq,bozaro/gitlabhq,fantasywind/gitlabhq,sue445/gitlabhq,stoplightio/gitlabhq,pjknkda/gitlabhq,yatish27/gitlabhq,Exeia/gitlabhq,it33/gitlabhq,NKMR6194/gitlabhq,daiyu/gitlab-zh,nmav/gitlabhq,t-zuehlsdorff/gitlabhq,LUMC/gitlabhq,icedwater/gitlabhq,joalmeid/gitlabhq,Soullivaneuh/gitlabhq,dreampet/gitlab,szechyjs/gitlabhq,since2014/gitlabhq,mmkassem/gitlabhq,H3Chief/gitlabhq,TheWatcher/gitlabhq,openwide-java/gitlabhq,aaronsnyder/gitlabhq,chenrui2014/gitlabhq,Razer6/gitlabhq,mrb/gitlabhq,yfaizal/gitlabhq,copystudy/gitlabhq,mmkassem/gitlabhq,iiet/iiet-git,fscherwi/gitlabhq,LUMC/gitlabhq,theonlydoo/gitlabhq | haml | ## Code Before:
%header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
.container
.header-logo
= link_to explore_root_path, class: "home" do
= brand_header_logo
.gitlab-text-container
%h3 GitLab
.header-content
- unless current_controller?('sessions')
.pull-right
= link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-success btn-sm'
%h1.title= title
= render 'shared/outdated_browser'
## Instruction:
Fix header for anonymous users too
Signed-off-by: Dmitriy Zaporozhets <be23d75b156792e5acab51b196a2deb155d35d6a@gmail.com>
## Code After:
%header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
%div{ class: fluid_layout ? "container-fluid" : "container-fluid container-limited" }
.header-content
- unless current_controller?('sessions')
.pull-right
= link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-success btn-sm'
%h1.title= title
= render 'shared/outdated_browser'
| %header.navbar.navbar-fixed-top.navbar-gitlab{ class: nav_header_class }
+ %div{ class: fluid_layout ? "container-fluid" : "container-fluid container-limited" }
- .container
- .header-logo
- = link_to explore_root_path, class: "home" do
- = brand_header_logo
- .gitlab-text-container
- %h3 GitLab
.header-content
- unless current_controller?('sessions')
.pull-right
= link_to "Sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'btn btn-sign-in btn-success btn-sm'
%h1.title= title
= render 'shared/outdated_browser' | 7 | 0.466667 | 1 | 6 |
8a88ffa6544d46d243413b547357c46ea741131a | test/support/configuration_helper.rb | test/support/configuration_helper.rb |
module RouteTranslator
module ConfigurationHelper
BOOLEAN_OPTIONS = {
disable_fallback: false,
force_locale: false,
hide_locale: false,
generate_unlocalized_routes: false,
generate_unnamed_unlocalized_routes: false
}.freeze
# TODO: FALSE POSITIVE bbatsov/rubocop#5221
# rubocop:disable Layout/SpaceBeforeBlockBraces
def config_reset
config_available_locales []
config_default_locale_settings :en
config_host_locales {}
config_locale_segment_proc false
config_verify_host_path_consistency false
BOOLEAN_OPTIONS.each do |option, default_value|
send(:"config_#{option}", default_value)
end
end
# rubocop:enable Layout/SpaceBeforeBlockBraces
alias setup_config config_reset
alias teardown_config config_reset
def config_available_locales(arr)
RouteTranslator.config.available_locales = arr
end
def config_default_locale_settings(locale)
I18n.default_locale = locale
end
def config_host_locales(hash = {})
RouteTranslator.config.host_locales = hash
end
def config_locale_segment_proc(a_proc)
RouteTranslator.config.locale_segment_proc = a_proc
end
def config_verify_host_path_consistency(value)
RouteTranslator.config.verify_host_path_consistency = value
end
BOOLEAN_OPTIONS.each_key do |option|
define_method :"config_#{option}" do |bool|
RouteTranslator.config.send(:"#{option}=", bool)
end
end
end
end
|
module RouteTranslator
module ConfigurationHelper
BOOLEAN_OPTIONS = {
disable_fallback: false,
force_locale: false,
hide_locale: false,
generate_unlocalized_routes: false,
generate_unnamed_unlocalized_routes: false
}.freeze
def config_reset
config_available_locales []
config_default_locale_settings :en
config_host_locales {}
config_locale_segment_proc false
config_verify_host_path_consistency false
BOOLEAN_OPTIONS.each do |option, default_value|
send(:"config_#{option}", default_value)
end
end
alias setup_config config_reset
alias teardown_config config_reset
def config_available_locales(arr)
RouteTranslator.config.available_locales = arr
end
def config_default_locale_settings(locale)
I18n.default_locale = locale
end
def config_host_locales(hash = {})
RouteTranslator.config.host_locales = hash
end
def config_locale_segment_proc(a_proc)
RouteTranslator.config.locale_segment_proc = a_proc
end
def config_verify_host_path_consistency(value)
RouteTranslator.config.verify_host_path_consistency = value
end
BOOLEAN_OPTIONS.each_key do |option|
define_method :"config_#{option}" do |bool|
RouteTranslator.config.send(:"#{option}=", bool)
end
end
end
end
| Revert "Fix RuboCop false positive" | Revert "Fix RuboCop false positive"
This reverts commit ed245d90f16d09703b2504e14454c4ab91ffa551.
| Ruby | mit | enriclluelles/route_translator,enriclluelles/route_translator,jensb/route_translator,jensb/route_translator | ruby | ## Code Before:
module RouteTranslator
module ConfigurationHelper
BOOLEAN_OPTIONS = {
disable_fallback: false,
force_locale: false,
hide_locale: false,
generate_unlocalized_routes: false,
generate_unnamed_unlocalized_routes: false
}.freeze
# TODO: FALSE POSITIVE bbatsov/rubocop#5221
# rubocop:disable Layout/SpaceBeforeBlockBraces
def config_reset
config_available_locales []
config_default_locale_settings :en
config_host_locales {}
config_locale_segment_proc false
config_verify_host_path_consistency false
BOOLEAN_OPTIONS.each do |option, default_value|
send(:"config_#{option}", default_value)
end
end
# rubocop:enable Layout/SpaceBeforeBlockBraces
alias setup_config config_reset
alias teardown_config config_reset
def config_available_locales(arr)
RouteTranslator.config.available_locales = arr
end
def config_default_locale_settings(locale)
I18n.default_locale = locale
end
def config_host_locales(hash = {})
RouteTranslator.config.host_locales = hash
end
def config_locale_segment_proc(a_proc)
RouteTranslator.config.locale_segment_proc = a_proc
end
def config_verify_host_path_consistency(value)
RouteTranslator.config.verify_host_path_consistency = value
end
BOOLEAN_OPTIONS.each_key do |option|
define_method :"config_#{option}" do |bool|
RouteTranslator.config.send(:"#{option}=", bool)
end
end
end
end
## Instruction:
Revert "Fix RuboCop false positive"
This reverts commit ed245d90f16d09703b2504e14454c4ab91ffa551.
## Code After:
module RouteTranslator
module ConfigurationHelper
BOOLEAN_OPTIONS = {
disable_fallback: false,
force_locale: false,
hide_locale: false,
generate_unlocalized_routes: false,
generate_unnamed_unlocalized_routes: false
}.freeze
def config_reset
config_available_locales []
config_default_locale_settings :en
config_host_locales {}
config_locale_segment_proc false
config_verify_host_path_consistency false
BOOLEAN_OPTIONS.each do |option, default_value|
send(:"config_#{option}", default_value)
end
end
alias setup_config config_reset
alias teardown_config config_reset
def config_available_locales(arr)
RouteTranslator.config.available_locales = arr
end
def config_default_locale_settings(locale)
I18n.default_locale = locale
end
def config_host_locales(hash = {})
RouteTranslator.config.host_locales = hash
end
def config_locale_segment_proc(a_proc)
RouteTranslator.config.locale_segment_proc = a_proc
end
def config_verify_host_path_consistency(value)
RouteTranslator.config.verify_host_path_consistency = value
end
BOOLEAN_OPTIONS.each_key do |option|
define_method :"config_#{option}" do |bool|
RouteTranslator.config.send(:"#{option}=", bool)
end
end
end
end
|
module RouteTranslator
module ConfigurationHelper
BOOLEAN_OPTIONS = {
disable_fallback: false,
force_locale: false,
hide_locale: false,
generate_unlocalized_routes: false,
generate_unnamed_unlocalized_routes: false
}.freeze
- # TODO: FALSE POSITIVE bbatsov/rubocop#5221
- # rubocop:disable Layout/SpaceBeforeBlockBraces
def config_reset
config_available_locales []
config_default_locale_settings :en
config_host_locales {}
config_locale_segment_proc false
config_verify_host_path_consistency false
BOOLEAN_OPTIONS.each do |option, default_value|
send(:"config_#{option}", default_value)
end
end
- # rubocop:enable Layout/SpaceBeforeBlockBraces
alias setup_config config_reset
alias teardown_config config_reset
def config_available_locales(arr)
RouteTranslator.config.available_locales = arr
end
def config_default_locale_settings(locale)
I18n.default_locale = locale
end
def config_host_locales(hash = {})
RouteTranslator.config.host_locales = hash
end
def config_locale_segment_proc(a_proc)
RouteTranslator.config.locale_segment_proc = a_proc
end
def config_verify_host_path_consistency(value)
RouteTranslator.config.verify_host_path_consistency = value
end
BOOLEAN_OPTIONS.each_key do |option|
define_method :"config_#{option}" do |bool|
RouteTranslator.config.send(:"#{option}=", bool)
end
end
end
end | 3 | 0.053571 | 0 | 3 |
90e787723d4efbc080f0491e18a205f964c47326 | uploader/uploader_test.go | uploader/uploader_test.go | package uploader
import (
"github.com/matthew-andrews/s3up/objects"
"testing"
"time"
)
type stubS3Client struct{}
func (stub stubS3Client) UploadFile(string, objects.File) error {
time.Sleep(50 * time.Millisecond)
return nil
}
func uploadThreeFilesWithConcurrency(concurrency int) int64 {
startTime := time.Now()
Upload(stubS3Client{}, "", make([]objects.File, 3), concurrency)
duration := time.Since(startTime).Nanoseconds()
return int64(duration / int64(time.Millisecond))
}
func TestOneAtATime(t *testing.T) {
duration := uploadThreeFilesWithConcurrency(1)
if duration < 100 {
t.Fatalf("uploader was too quick. 3 times 50ms one at a time can't be less than 100ms. but it was %v", duration)
}
}
func TestThreeAtATime(t *testing.T) {
duration := uploadThreeFilesWithConcurrency(3)
if duration > 100 {
t.Fatalf("uploader was too slow. 3 times 50ms three at a time can't be more than 100ms. but it was %v", duration)
}
}
| package uploader
import (
"github.com/matthew-andrews/s3up/objects"
"strings"
"testing"
"time"
)
type stubS3Client struct{}
func (stub stubS3Client) UploadFile(string, objects.File) error {
time.Sleep(50 * time.Millisecond)
return nil
}
func uploadThreeFilesWithConcurrency(concurrency int) int64 {
startTime := time.Now()
Upload(stubS3Client{}, "", make([]objects.File, 3), concurrency)
duration := time.Since(startTime).Nanoseconds()
return int64(duration / int64(time.Millisecond))
}
func TestOneAtATime(t *testing.T) {
duration := uploadThreeFilesWithConcurrency(1)
if duration < 100 {
t.Fatalf("uploader was too quick. 3 times 50ms one at a time can't be less than 100ms. but it was %v", duration)
}
}
func TestThreeAtATime(t *testing.T) {
duration := uploadThreeFilesWithConcurrency(3)
if duration > 100 {
t.Fatalf("uploader was too slow. 3 times 50ms three at a time can't be more than 100ms. but it was %v", duration)
}
}
func TestNoFiles(t *testing.T) {
err := Upload(stubS3Client{}, "", make([]objects.File, 0), 1)
if strings.Contains(err.Error(), "No files found") == false {
t.Fatal("The error that was expected was not thrown")
}
}
| Add a test for no files | Add a test for no files
| Go | mit | matthew-andrews/s3up | go | ## Code Before:
package uploader
import (
"github.com/matthew-andrews/s3up/objects"
"testing"
"time"
)
type stubS3Client struct{}
func (stub stubS3Client) UploadFile(string, objects.File) error {
time.Sleep(50 * time.Millisecond)
return nil
}
func uploadThreeFilesWithConcurrency(concurrency int) int64 {
startTime := time.Now()
Upload(stubS3Client{}, "", make([]objects.File, 3), concurrency)
duration := time.Since(startTime).Nanoseconds()
return int64(duration / int64(time.Millisecond))
}
func TestOneAtATime(t *testing.T) {
duration := uploadThreeFilesWithConcurrency(1)
if duration < 100 {
t.Fatalf("uploader was too quick. 3 times 50ms one at a time can't be less than 100ms. but it was %v", duration)
}
}
func TestThreeAtATime(t *testing.T) {
duration := uploadThreeFilesWithConcurrency(3)
if duration > 100 {
t.Fatalf("uploader was too slow. 3 times 50ms three at a time can't be more than 100ms. but it was %v", duration)
}
}
## Instruction:
Add a test for no files
## Code After:
package uploader
import (
"github.com/matthew-andrews/s3up/objects"
"strings"
"testing"
"time"
)
type stubS3Client struct{}
func (stub stubS3Client) UploadFile(string, objects.File) error {
time.Sleep(50 * time.Millisecond)
return nil
}
func uploadThreeFilesWithConcurrency(concurrency int) int64 {
startTime := time.Now()
Upload(stubS3Client{}, "", make([]objects.File, 3), concurrency)
duration := time.Since(startTime).Nanoseconds()
return int64(duration / int64(time.Millisecond))
}
func TestOneAtATime(t *testing.T) {
duration := uploadThreeFilesWithConcurrency(1)
if duration < 100 {
t.Fatalf("uploader was too quick. 3 times 50ms one at a time can't be less than 100ms. but it was %v", duration)
}
}
func TestThreeAtATime(t *testing.T) {
duration := uploadThreeFilesWithConcurrency(3)
if duration > 100 {
t.Fatalf("uploader was too slow. 3 times 50ms three at a time can't be more than 100ms. but it was %v", duration)
}
}
func TestNoFiles(t *testing.T) {
err := Upload(stubS3Client{}, "", make([]objects.File, 0), 1)
if strings.Contains(err.Error(), "No files found") == false {
t.Fatal("The error that was expected was not thrown")
}
}
| package uploader
import (
"github.com/matthew-andrews/s3up/objects"
+ "strings"
"testing"
"time"
)
type stubS3Client struct{}
func (stub stubS3Client) UploadFile(string, objects.File) error {
time.Sleep(50 * time.Millisecond)
return nil
}
func uploadThreeFilesWithConcurrency(concurrency int) int64 {
startTime := time.Now()
Upload(stubS3Client{}, "", make([]objects.File, 3), concurrency)
duration := time.Since(startTime).Nanoseconds()
return int64(duration / int64(time.Millisecond))
}
func TestOneAtATime(t *testing.T) {
duration := uploadThreeFilesWithConcurrency(1)
if duration < 100 {
t.Fatalf("uploader was too quick. 3 times 50ms one at a time can't be less than 100ms. but it was %v", duration)
}
}
func TestThreeAtATime(t *testing.T) {
duration := uploadThreeFilesWithConcurrency(3)
if duration > 100 {
t.Fatalf("uploader was too slow. 3 times 50ms three at a time can't be more than 100ms. but it was %v", duration)
}
}
+
+ func TestNoFiles(t *testing.T) {
+ err := Upload(stubS3Client{}, "", make([]objects.File, 0), 1)
+ if strings.Contains(err.Error(), "No files found") == false {
+ t.Fatal("The error that was expected was not thrown")
+ }
+ } | 8 | 0.228571 | 8 | 0 |
a07023f2b7563c589ccef692c4ea8163b30d926d | _drafts/post-jack-of-all-trades-master-of-none.md | _drafts/post-jack-of-all-trades-master-of-none.md | ---
layout: blog
title: Some Post Title
category: blog
---
Come up with better title. Discuss everything I set out to do and learn 2016, my successes, and failures. And the speculate if I try to accomplish to much. Talk mostly about professional things, but mention personal things in a quick summary too.
https://www.google.com/search?q=what+is+the+point+trying+to+master+everything&oq=what+is+the+point+trying+to+master+everything&aqs=chrome..69i57j69i60j69i65j69i60j69i61j69i59.4803j0j7&sourceid=chrome&ie=UTF-8
https://www.google.com/search?q=trying+to+be+good+at+everything&oq=trying+to+be+good+at+everything&aqs=chrome..69i57.4589j0j7&sourceid=chrome&ie=UTF-8
https://www.google.com/search?q=trying+to+accomplish+too+much&oq=trying+to+accomplish+too+much&aqs=chrome..69i57j69i60j69i57j69i60l3.3653j0j7&sourceid=chrome&ie=UTF-8
| ---
layout: blog_post
title: Jack of all Trades, Master of None
category: blog
---
Come up with better title. Discuss everything I set out to do and learn 2016, my successes, and failures. And the speculate if I try to accomplish to much. Talk mostly about professional things, but mention personal things in a quick summary too.
https://www.google.com/search?q=what+is+the+point+trying+to+master+everything&oq=what+is+the+point+trying+to+master+everything&aqs=chrome..69i57j69i60j69i65j69i60j69i61j69i59.4803j0j7&sourceid=chrome&ie=UTF-8
https://www.google.com/search?q=trying+to+be+good+at+everything&oq=trying+to+be+good+at+everything&aqs=chrome..69i57.4589j0j7&sourceid=chrome&ie=UTF-8
https://www.google.com/search?q=trying+to+accomplish+too+much&oq=trying+to+accomplish+too+much&aqs=chrome..69i57j69i60j69i57j69i60l3.3653j0j7&sourceid=chrome&ie=UTF-8
| Update sample draft to correct template | Update sample draft to correct template
| Markdown | apache-2.0 | bill-c-martin/bill-c-martin.github.io,bill-c-martin/bill-c-martin.github.io,bill-c-martin/bill-c-martin.github.io,bill-c-martin/bill-c-martin.github.io,bill-c-martin/bill-c-martin.github.io | markdown | ## Code Before:
---
layout: blog
title: Some Post Title
category: blog
---
Come up with better title. Discuss everything I set out to do and learn 2016, my successes, and failures. And the speculate if I try to accomplish to much. Talk mostly about professional things, but mention personal things in a quick summary too.
https://www.google.com/search?q=what+is+the+point+trying+to+master+everything&oq=what+is+the+point+trying+to+master+everything&aqs=chrome..69i57j69i60j69i65j69i60j69i61j69i59.4803j0j7&sourceid=chrome&ie=UTF-8
https://www.google.com/search?q=trying+to+be+good+at+everything&oq=trying+to+be+good+at+everything&aqs=chrome..69i57.4589j0j7&sourceid=chrome&ie=UTF-8
https://www.google.com/search?q=trying+to+accomplish+too+much&oq=trying+to+accomplish+too+much&aqs=chrome..69i57j69i60j69i57j69i60l3.3653j0j7&sourceid=chrome&ie=UTF-8
## Instruction:
Update sample draft to correct template
## Code After:
---
layout: blog_post
title: Jack of all Trades, Master of None
category: blog
---
Come up with better title. Discuss everything I set out to do and learn 2016, my successes, and failures. And the speculate if I try to accomplish to much. Talk mostly about professional things, but mention personal things in a quick summary too.
https://www.google.com/search?q=what+is+the+point+trying+to+master+everything&oq=what+is+the+point+trying+to+master+everything&aqs=chrome..69i57j69i60j69i65j69i60j69i61j69i59.4803j0j7&sourceid=chrome&ie=UTF-8
https://www.google.com/search?q=trying+to+be+good+at+everything&oq=trying+to+be+good+at+everything&aqs=chrome..69i57.4589j0j7&sourceid=chrome&ie=UTF-8
https://www.google.com/search?q=trying+to+accomplish+too+much&oq=trying+to+accomplish+too+much&aqs=chrome..69i57j69i60j69i57j69i60l3.3653j0j7&sourceid=chrome&ie=UTF-8
| ---
- layout: blog
+ layout: blog_post
? +++++
- title: Some Post Title
+ title: Jack of all Trades, Master of None
category: blog
---
Come up with better title. Discuss everything I set out to do and learn 2016, my successes, and failures. And the speculate if I try to accomplish to much. Talk mostly about professional things, but mention personal things in a quick summary too.
https://www.google.com/search?q=what+is+the+point+trying+to+master+everything&oq=what+is+the+point+trying+to+master+everything&aqs=chrome..69i57j69i60j69i65j69i60j69i61j69i59.4803j0j7&sourceid=chrome&ie=UTF-8
https://www.google.com/search?q=trying+to+be+good+at+everything&oq=trying+to+be+good+at+everything&aqs=chrome..69i57.4589j0j7&sourceid=chrome&ie=UTF-8
https://www.google.com/search?q=trying+to+accomplish+too+much&oq=trying+to+accomplish+too+much&aqs=chrome..69i57j69i60j69i57j69i60l3.3653j0j7&sourceid=chrome&ie=UTF-8 | 4 | 0.363636 | 2 | 2 |
9204ad0b33c2515e0febe242be1032ac6d381a6d | app/templates/arethusa.exercise/fill_in_the_blank.html | app/templates/arethusa.exercise/fill_in_the_blank.html | <div class="small-12 columns small-text-center" ng-hide="plugin.started">
<em>Read the instructions and hit start when you're ready</em>
</div>
<div class="small-12 columns" ng-show="plugin.started">
<p>
<span ng-repeat="(id, token) in state.tokens">
<span ng-if="plugin.isExerciseTarget(id)">
<span fill-in-the-blank-form></span>
<span class="note"><em>({{ plugin.hintFor(id) }})</em></span>
</span>
<span ng-if="! plugin.isExerciseTarget(id)"
hover="true"
token="token">
</span>
</span>
</p>
</div>
| <div class="small-12 columns small-text-center" ng-hide="plugin.started">
<em>Read the instructions and hit start when you're ready</em>
</div>
<div class="small-12 columns" ng-show="plugin.started">
<p class="text-justify">
<span ng-repeat="(id, token) in state.tokens">
<span ng-if="plugin.isExerciseTarget(id)">
<span fill-in-the-blank-form></span>
<span class="note"><em>({{ plugin.hintFor(id) }})</em></span>
</span>
<span ng-if="! plugin.isExerciseTarget(id)"
hover="true"
token="token">
</span>
<br ng-if="aU.isTerminatingPunctuation(token.string)"/>
</span>
</p>
</div>
| Add line breaks and text justification in fITB | Add line breaks and text justification in fITB
| HTML | mit | PonteIneptique/arethusa,Masoumeh/arethusa,latin-language-toolkit/arethusa,latin-language-toolkit/arethusa,Masoumeh/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,alpheios-project/arethusa,fbaumgardt/arethusa,alpheios-project/arethusa,PonteIneptique/arethusa,fbaumgardt/arethusa | html | ## Code Before:
<div class="small-12 columns small-text-center" ng-hide="plugin.started">
<em>Read the instructions and hit start when you're ready</em>
</div>
<div class="small-12 columns" ng-show="plugin.started">
<p>
<span ng-repeat="(id, token) in state.tokens">
<span ng-if="plugin.isExerciseTarget(id)">
<span fill-in-the-blank-form></span>
<span class="note"><em>({{ plugin.hintFor(id) }})</em></span>
</span>
<span ng-if="! plugin.isExerciseTarget(id)"
hover="true"
token="token">
</span>
</span>
</p>
</div>
## Instruction:
Add line breaks and text justification in fITB
## Code After:
<div class="small-12 columns small-text-center" ng-hide="plugin.started">
<em>Read the instructions and hit start when you're ready</em>
</div>
<div class="small-12 columns" ng-show="plugin.started">
<p class="text-justify">
<span ng-repeat="(id, token) in state.tokens">
<span ng-if="plugin.isExerciseTarget(id)">
<span fill-in-the-blank-form></span>
<span class="note"><em>({{ plugin.hintFor(id) }})</em></span>
</span>
<span ng-if="! plugin.isExerciseTarget(id)"
hover="true"
token="token">
</span>
<br ng-if="aU.isTerminatingPunctuation(token.string)"/>
</span>
</p>
</div>
| <div class="small-12 columns small-text-center" ng-hide="plugin.started">
<em>Read the instructions and hit start when you're ready</em>
</div>
<div class="small-12 columns" ng-show="plugin.started">
- <p>
+ <p class="text-justify">
<span ng-repeat="(id, token) in state.tokens">
<span ng-if="plugin.isExerciseTarget(id)">
<span fill-in-the-blank-form></span>
<span class="note"><em>({{ plugin.hintFor(id) }})</em></span>
</span>
<span ng-if="! plugin.isExerciseTarget(id)"
hover="true"
token="token">
</span>
+ <br ng-if="aU.isTerminatingPunctuation(token.string)"/>
</span>
</p>
</div> | 3 | 0.166667 | 2 | 1 |
ea53aa1223a82904a0f2ba9f18237498d949c300 | packages/st/stm-queue.yaml | packages/st/stm-queue.yaml | homepage: https://github.com/SamuelSchlesinger/stm-queue
changelog-type: markdown
hash: e697d4afa0a359df0cd03db61cf475d058bb56579748d5cfb2e27610899b0c9d
test-bench-deps:
stm: '>=2.1'
base: '>=4.12 && <4.16'
hspec: '>=2.7.4'
async: '>=2.0'
stm-queue: -any
maintainer: sgschlesinger@gmail.com
synopsis: An implementation of a real-time concurrent queue
changelog: |
# Revision history for stm-queue
## 0.1.0.0 -- 2020-09-19
Created a basic Okasaki-style real-time queue
basic-deps:
stm: '>=2.1 && <3'
base: '>=4.12 && <4.16'
all-versions:
- 0.1.0.0
- 0.1.1.0
author: Samuel Schlesinger
latest: 0.1.1.0
description-type: haddock
description: An implementation of a real-time concurrent queue.
license-name: MIT
| homepage: https://github.com/SamuelSchlesinger/stm-queue
changelog-type: markdown
hash: 26a996b55dedde873bff4f4236ab3367b409b395ad46ab3d6f86a8cfa4629148
test-bench-deps:
stm: '>=2.1'
base: '>=4.12 && <4.16'
time: '>=1.8'
hspec: '>=2.7.4'
criterion: '>=1.5'
async: '>=2.0'
stm-queue: -any
deepseq: '>=1.4'
maintainer: sgschlesinger@gmail.com
synopsis: An implementation of a real-time concurrent queue
changelog: |
# Revision history for stm-queue
## 0.1.0.0 -- 2020-09-19
Created a basic Okasaki-style real-time queue
basic-deps:
stm: '>=2.1 && <3'
base: '>=4.12 && <4.16'
all-versions:
- 0.1.0.0
- 0.1.1.0
- 0.1.2.0
author: Samuel Schlesinger
latest: 0.1.2.0
description-type: haddock
description: An implementation of a real-time concurrent queue.
license-name: MIT
| Update from Hackage at 2020-09-20T19:28:38Z | Update from Hackage at 2020-09-20T19:28:38Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/SamuelSchlesinger/stm-queue
changelog-type: markdown
hash: e697d4afa0a359df0cd03db61cf475d058bb56579748d5cfb2e27610899b0c9d
test-bench-deps:
stm: '>=2.1'
base: '>=4.12 && <4.16'
hspec: '>=2.7.4'
async: '>=2.0'
stm-queue: -any
maintainer: sgschlesinger@gmail.com
synopsis: An implementation of a real-time concurrent queue
changelog: |
# Revision history for stm-queue
## 0.1.0.0 -- 2020-09-19
Created a basic Okasaki-style real-time queue
basic-deps:
stm: '>=2.1 && <3'
base: '>=4.12 && <4.16'
all-versions:
- 0.1.0.0
- 0.1.1.0
author: Samuel Schlesinger
latest: 0.1.1.0
description-type: haddock
description: An implementation of a real-time concurrent queue.
license-name: MIT
## Instruction:
Update from Hackage at 2020-09-20T19:28:38Z
## Code After:
homepage: https://github.com/SamuelSchlesinger/stm-queue
changelog-type: markdown
hash: 26a996b55dedde873bff4f4236ab3367b409b395ad46ab3d6f86a8cfa4629148
test-bench-deps:
stm: '>=2.1'
base: '>=4.12 && <4.16'
time: '>=1.8'
hspec: '>=2.7.4'
criterion: '>=1.5'
async: '>=2.0'
stm-queue: -any
deepseq: '>=1.4'
maintainer: sgschlesinger@gmail.com
synopsis: An implementation of a real-time concurrent queue
changelog: |
# Revision history for stm-queue
## 0.1.0.0 -- 2020-09-19
Created a basic Okasaki-style real-time queue
basic-deps:
stm: '>=2.1 && <3'
base: '>=4.12 && <4.16'
all-versions:
- 0.1.0.0
- 0.1.1.0
- 0.1.2.0
author: Samuel Schlesinger
latest: 0.1.2.0
description-type: haddock
description: An implementation of a real-time concurrent queue.
license-name: MIT
| homepage: https://github.com/SamuelSchlesinger/stm-queue
changelog-type: markdown
- hash: e697d4afa0a359df0cd03db61cf475d058bb56579748d5cfb2e27610899b0c9d
+ hash: 26a996b55dedde873bff4f4236ab3367b409b395ad46ab3d6f86a8cfa4629148
test-bench-deps:
stm: '>=2.1'
base: '>=4.12 && <4.16'
+ time: '>=1.8'
hspec: '>=2.7.4'
+ criterion: '>=1.5'
async: '>=2.0'
stm-queue: -any
+ deepseq: '>=1.4'
maintainer: sgschlesinger@gmail.com
synopsis: An implementation of a real-time concurrent queue
changelog: |
# Revision history for stm-queue
## 0.1.0.0 -- 2020-09-19
Created a basic Okasaki-style real-time queue
basic-deps:
stm: '>=2.1 && <3'
base: '>=4.12 && <4.16'
all-versions:
- 0.1.0.0
- 0.1.1.0
+ - 0.1.2.0
author: Samuel Schlesinger
- latest: 0.1.1.0
? ^
+ latest: 0.1.2.0
? ^
description-type: haddock
description: An implementation of a real-time concurrent queue.
license-name: MIT | 8 | 0.285714 | 6 | 2 |
0217899345d169d5d0f0e9d92e52f4b6e9d96c02 | sbt-dotty/sbt-test/source-dependencies/binary/project/P.scala | sbt-dotty/sbt-test/source-dependencies/binary/project/P.scala | import sbt._
import Keys._
object B extends Build
{
lazy val dep = Project("dep", file("dep"))
lazy val use = Project("use", file("use")) settings(
unmanagedJars in Compile <+= packageBin in (dep, Compile) map Attributed.blank,
// Disable classpath caching since it does not invalidate modified jars
// (https://github.com/scala/bug/issues/10295)
scalacOptions += "-YdisableFlatCpCaching"
)
}
| import sbt._
import Keys._
object B extends Build
{
lazy val dep = Project("dep", file("dep"))
lazy val use = Project("use", file("use")) settings(
unmanagedJars in Compile <+= packageBin in (dep, Compile) map Attributed.blank
)
}
| Enable classpath caching in test case | Enable classpath caching in test case
| Scala | apache-2.0 | sjrd/dotty,dotty-staging/dotty,som-snytt/dotty,lampepfl/dotty,lampepfl/dotty,sjrd/dotty,lampepfl/dotty,lampepfl/dotty,dotty-staging/dotty,som-snytt/dotty,sjrd/dotty,som-snytt/dotty,dotty-staging/dotty,sjrd/dotty,som-snytt/dotty,som-snytt/dotty,dotty-staging/dotty,lampepfl/dotty,dotty-staging/dotty,sjrd/dotty | scala | ## Code Before:
import sbt._
import Keys._
object B extends Build
{
lazy val dep = Project("dep", file("dep"))
lazy val use = Project("use", file("use")) settings(
unmanagedJars in Compile <+= packageBin in (dep, Compile) map Attributed.blank,
// Disable classpath caching since it does not invalidate modified jars
// (https://github.com/scala/bug/issues/10295)
scalacOptions += "-YdisableFlatCpCaching"
)
}
## Instruction:
Enable classpath caching in test case
## Code After:
import sbt._
import Keys._
object B extends Build
{
lazy val dep = Project("dep", file("dep"))
lazy val use = Project("use", file("use")) settings(
unmanagedJars in Compile <+= packageBin in (dep, Compile) map Attributed.blank
)
}
| import sbt._
import Keys._
object B extends Build
{
lazy val dep = Project("dep", file("dep"))
lazy val use = Project("use", file("use")) settings(
- unmanagedJars in Compile <+= packageBin in (dep, Compile) map Attributed.blank,
? -
+ unmanagedJars in Compile <+= packageBin in (dep, Compile) map Attributed.blank
-
- // Disable classpath caching since it does not invalidate modified jars
- // (https://github.com/scala/bug/issues/10295)
- scalacOptions += "-YdisableFlatCpCaching"
)
} | 6 | 0.428571 | 1 | 5 |
a2a63106447d781af5c49fdcf9203542e297043e | pom.xml | pom.xml | <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>ROOT</artifactId>
<packaging>jar</packaging>
<name>convert</name>
<description>Java data types conversion.</description>
<inceptionYear>2014</inceptionYear>
<groupId>com.kashukov</groupId>
<version>1</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project> | <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>convert</artifactId>
<packaging>jar</packaging>
<groupId>com.kashukov</groupId>
<version>1.0-SNAPSHOT</version>
<name>convert</name>
<description>Java data types conversion.</description>
<inceptionYear>2014</inceptionYear>
<build>
<defaultGoal>install</defaultGoal>
<directory>${basedir}/target</directory>
<finalName>${artifactId}-${version}</finalName>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</project> | Build directory changed, version added. | Build directory changed, version added.
| XML | apache-2.0 | kashukov/convert | xml | ## Code Before:
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>ROOT</artifactId>
<packaging>jar</packaging>
<name>convert</name>
<description>Java data types conversion.</description>
<inceptionYear>2014</inceptionYear>
<groupId>com.kashukov</groupId>
<version>1</version>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
## Instruction:
Build directory changed, version added.
## Code After:
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>convert</artifactId>
<packaging>jar</packaging>
<groupId>com.kashukov</groupId>
<version>1.0-SNAPSHOT</version>
<name>convert</name>
<description>Java data types conversion.</description>
<inceptionYear>2014</inceptionYear>
<build>
<defaultGoal>install</defaultGoal>
<directory>${basedir}/target</directory>
<finalName>${artifactId}-${version}</finalName>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
</project> | <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
+
- <artifactId>ROOT</artifactId>
? ^^^^
+ <artifactId>convert</artifactId>
? ^^^^^^^
<packaging>jar</packaging>
+ <groupId>com.kashukov</groupId>
+ <version>1.0-SNAPSHOT</version>
<name>convert</name>
<description>Java data types conversion.</description>
-
<inceptionYear>2014</inceptionYear>
- <groupId>com.kashukov</groupId>
- <version>1</version>
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <directory>${basedir}/target</directory>
+ <finalName>${artifactId}-${version}</finalName>
+ </build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.0</version>
- <configuration>
- <source>1.7</source>
- <target>1.7</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project> | 26 | 0.722222 | 9 | 17 |
50798d49f318e5decb84e0d75d620662c0da13c4 | docs/trodriguez.md | docs/trodriguez.md |
- **Name:** Tom Rodriguez
- **Occupation:** Software Developer
- **Location:** San Diego
|
- **Name:** Tom Rodriguez
- **Occupation:** Software Developer
- **Location:** San Diego
- **Fovorite Vacation Spot:** Barcelona, Spain, Earth
| Add a favorite vacation spot for tomrodriguez | Add a favorite vacation spot for tomrodriguez
| Markdown | mit | githubteacher/developers-12-16-2015 | markdown | ## Code Before:
- **Name:** Tom Rodriguez
- **Occupation:** Software Developer
- **Location:** San Diego
## Instruction:
Add a favorite vacation spot for tomrodriguez
## Code After:
- **Name:** Tom Rodriguez
- **Occupation:** Software Developer
- **Location:** San Diego
- **Fovorite Vacation Spot:** Barcelona, Spain, Earth
|
- **Name:** Tom Rodriguez
- **Occupation:** Software Developer
- **Location:** San Diego
+ - **Fovorite Vacation Spot:** Barcelona, Spain, Earth | 1 | 0.25 | 1 | 0 |
e7998648c42d5bcccec7239d13521a5b77a738af | src/utils/indices.py | src/utils/indices.py | import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
def exists():
return Index(APIDoc.Index.name).exists()
def setup():
"""
Setup Elasticsearch Index.
Primary index with dynamic template.
Secondary index with static mappings.
"""
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
mapping = json.load(file)
if not exists():
APIDoc.init()
elastic = Elasticsearch()
elastic.indices.put_mapping(
index=APIDoc.Index.name,
body=mapping
)
def delete():
Index(APIDoc.Index.name).delete()
def reset():
if exists():
delete()
setup()
def refresh():
index = Index(APIDoc.Index.name)
index.refresh()
| import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
def exists():
return Index(APIDoc.Index.name).exists()
def setup():
"""
Setup Elasticsearch Index with dynamic template.
Run it on an open index to update dynamic mapping.
"""
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
mapping = json.load(file)
if not exists():
APIDoc.init()
elastic = Elasticsearch()
elastic.indices.put_mapping(
index=APIDoc.Index.name,
body=mapping
)
def delete():
Index(APIDoc.Index.name).delete()
def reset():
if exists():
delete()
setup()
def refresh():
index = Index(APIDoc.Index.name)
index.refresh()
| Allow setup function to update dynamic mapping | Allow setup function to update dynamic mapping
| Python | mit | Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI | python | ## Code Before:
import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
def exists():
return Index(APIDoc.Index.name).exists()
def setup():
"""
Setup Elasticsearch Index.
Primary index with dynamic template.
Secondary index with static mappings.
"""
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
mapping = json.load(file)
if not exists():
APIDoc.init()
elastic = Elasticsearch()
elastic.indices.put_mapping(
index=APIDoc.Index.name,
body=mapping
)
def delete():
Index(APIDoc.Index.name).delete()
def reset():
if exists():
delete()
setup()
def refresh():
index = Index(APIDoc.Index.name)
index.refresh()
## Instruction:
Allow setup function to update dynamic mapping
## Code After:
import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
def exists():
return Index(APIDoc.Index.name).exists()
def setup():
"""
Setup Elasticsearch Index with dynamic template.
Run it on an open index to update dynamic mapping.
"""
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
mapping = json.load(file)
if not exists():
APIDoc.init()
elastic = Elasticsearch()
elastic.indices.put_mapping(
index=APIDoc.Index.name,
body=mapping
)
def delete():
Index(APIDoc.Index.name).delete()
def reset():
if exists():
delete()
setup()
def refresh():
index = Index(APIDoc.Index.name)
index.refresh()
| import json
import os
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Index
from model import APIDoc
def exists():
return Index(APIDoc.Index.name).exists()
def setup():
"""
- Setup Elasticsearch Index.
- Primary index with dynamic template.
? ^^ ^ ^ ^
+ Setup Elasticsearch Index with dynamic template.
? ^^^^^^^^^^^ ^^^ ^^ ^
- Secondary index with static mappings.
+ Run it on an open index to update dynamic mapping.
"""
_dirname = os.path.dirname(__file__)
with open(os.path.join(_dirname, 'mapping.json'), 'r') as file:
mapping = json.load(file)
if not exists():
APIDoc.init()
+
- elastic = Elasticsearch()
? ----
+ elastic = Elasticsearch()
- elastic.indices.put_mapping(
? ----
+ elastic.indices.put_mapping(
- index=APIDoc.Index.name,
? ----
+ index=APIDoc.Index.name,
- body=mapping
? ----
+ body=mapping
- )
+ )
def delete():
Index(APIDoc.Index.name).delete()
def reset():
if exists():
delete()
setup()
def refresh():
index = Index(APIDoc.Index.name)
index.refresh() | 16 | 0.340426 | 8 | 8 |
4d4cc35164059f621f99e02891b015981ff15456 | lib/routes/index.js | lib/routes/index.js | "use strict";
var mongoose = require('mongoose');
var User = mongoose.model('User');
module.exports.get = function(req, res) {
User.find({}).populate('universities').exec(function(err, users) {
res.render('index', {users: users});
});
};
| "use strict";
var mongoose = require('mongoose');
var User = mongoose.model('User');
module.exports.get = function(req, res) {
User
.find({})
.sort('login')
.populate('universities')
.exec(function(err, users) {
res.render('index', {users: users});
});
};
| Sort by login by default | Sort by login by default
| JavaScript | mit | saveman71/epitech-international,saveman71/epitech-international | javascript | ## Code Before:
"use strict";
var mongoose = require('mongoose');
var User = mongoose.model('User');
module.exports.get = function(req, res) {
User.find({}).populate('universities').exec(function(err, users) {
res.render('index', {users: users});
});
};
## Instruction:
Sort by login by default
## Code After:
"use strict";
var mongoose = require('mongoose');
var User = mongoose.model('User');
module.exports.get = function(req, res) {
User
.find({})
.sort('login')
.populate('universities')
.exec(function(err, users) {
res.render('index', {users: users});
});
};
| "use strict";
var mongoose = require('mongoose');
var User = mongoose.model('User');
module.exports.get = function(req, res) {
- User.find({}).populate('universities').exec(function(err, users) {
+ User
+ .find({})
+ .sort('login')
+ .populate('universities')
+ .exec(function(err, users) {
res.render('index', {users: users});
});
}; | 6 | 0.545455 | 5 | 1 |
00f3867cc706c8f6dc26f5a7c36e29e2eed2e803 | src/obb_rules/game_mode.clj | src/obb_rules/game_mode.clj | (ns obb-rules.game-mode
(:require [obb-rules.board :as board]
[obb-rules.game :as game]))
(defn final?
"Checks if the game is finished"
[game]
(or
(board/empty-board? game :p1)
(board/empty-board? game :p2)))
(defn winner
"Gets the winner of the given game"
[game]
(cond
(board/empty-board? game :p1) :p2
(board/empty-board? game :p2) :p1
:else :none))
(defn- finalize
"Marks a game as final"
[game]
(game/state game :final))
(defn process
"Checks if a given game is finished and updates it's state.
Returns the given game if not finished"
[game]
(if (final? game)
(finalize game)
game))
| (ns obb-rules.game-mode
(:require [obb-rules.board :as board]
[obb-rules.game :as game]))
(defn final?
"Checks if the game is finished"
[game]
(and
(not (= game/state :deploy))
(or
(board/empty-board? game :p1)
(board/empty-board? game :p2))))
(defn winner
"Gets the winner of the given game"
[game]
(cond
(board/empty-board? game :p1) :p2
(board/empty-board? game :p2) :p1
:else :none))
(defn- finalize
"Marks a game as final"
[game]
(game/state game :final))
(defn process
"Checks if a given game is finished and updates it's state.
Returns the given game if not finished"
[game]
(if (final? game)
(finalize game)
game))
| Make final if not in deploy state | Make final if not in deploy state
| Clojure | epl-1.0 | orionsbelt-battlegrounds/obb-rules,orionsbelt-battlegrounds/obb-rules,orionsbelt-battlegrounds/obb-rules | clojure | ## Code Before:
(ns obb-rules.game-mode
(:require [obb-rules.board :as board]
[obb-rules.game :as game]))
(defn final?
"Checks if the game is finished"
[game]
(or
(board/empty-board? game :p1)
(board/empty-board? game :p2)))
(defn winner
"Gets the winner of the given game"
[game]
(cond
(board/empty-board? game :p1) :p2
(board/empty-board? game :p2) :p1
:else :none))
(defn- finalize
"Marks a game as final"
[game]
(game/state game :final))
(defn process
"Checks if a given game is finished and updates it's state.
Returns the given game if not finished"
[game]
(if (final? game)
(finalize game)
game))
## Instruction:
Make final if not in deploy state
## Code After:
(ns obb-rules.game-mode
(:require [obb-rules.board :as board]
[obb-rules.game :as game]))
(defn final?
"Checks if the game is finished"
[game]
(and
(not (= game/state :deploy))
(or
(board/empty-board? game :p1)
(board/empty-board? game :p2))))
(defn winner
"Gets the winner of the given game"
[game]
(cond
(board/empty-board? game :p1) :p2
(board/empty-board? game :p2) :p1
:else :none))
(defn- finalize
"Marks a game as final"
[game]
(game/state game :final))
(defn process
"Checks if a given game is finished and updates it's state.
Returns the given game if not finished"
[game]
(if (final? game)
(finalize game)
game))
| (ns obb-rules.game-mode
(:require [obb-rules.board :as board]
[obb-rules.game :as game]))
(defn final?
"Checks if the game is finished"
[game]
+ (and
+ (not (= game/state :deploy))
- (or
+ (or
? ++
- (board/empty-board? game :p1)
+ (board/empty-board? game :p1)
? ++
- (board/empty-board? game :p2)))
+ (board/empty-board? game :p2))))
? ++ +
(defn winner
"Gets the winner of the given game"
[game]
(cond
(board/empty-board? game :p1) :p2
(board/empty-board? game :p2) :p1
:else :none))
(defn- finalize
"Marks a game as final"
[game]
(game/state game :final))
(defn process
"Checks if a given game is finished and updates it's state.
Returns the given game if not finished"
[game]
(if (final? game)
(finalize game)
game)) | 8 | 0.258065 | 5 | 3 |
1c62efe0cf72f72e000bcda04e6ffaa21d858350 | scripts/admin/meteor-release-official.json | scripts/admin/meteor-release-official.json | {
"track": "METEOR",
"version": "1.0.4.2",
"patchFrom": ["1.0.4", "1.0.4.1"],
"recommended": false,
"official": true,
"description": "The Official Meteor Distribution"
}
| {
"track": "METEOR",
"version": "1.0.5",
"recommended": false,
"official": true,
"description": "The Official Meteor Distribution"
}
| Update release number for 1.0.5 | Update release number for 1.0.5
| JSON | mit | iman-mafi/meteor,Jonekee/meteor,lieuwex/meteor,Urigo/meteor,Theviajerock/meteor,kidaa/meteor,JesseQin/meteor,shadedprofit/meteor,shadedprofit/meteor,stevenliuit/meteor,chiefninew/meteor,DCKT/meteor,nuvipannu/meteor,shadedprofit/meteor,kengchau/meteor,judsonbsilva/meteor,IveWong/meteor,shadedprofit/meteor,lassombra/meteor,jenalgit/meteor,luohuazju/meteor,daltonrenaldo/meteor,newswim/meteor,alphanso/meteor,nuvipannu/meteor,colinligertwood/meteor,vacjaliu/meteor,jeblister/meteor,planet-training/meteor,jrudio/meteor,ljack/meteor,sunny-g/meteor,papimomi/meteor,colinligertwood/meteor,deanius/meteor,chmac/meteor,chiefninew/meteor,williambr/meteor,alexbeletsky/meteor,dboyliao/meteor,Paulyoufu/meteor-1,yyx990803/meteor,jeblister/meteor,modulexcite/meteor,kidaa/meteor,planet-training/meteor,dev-bobsong/meteor,aldeed/meteor,yonglehou/meteor,modulexcite/meteor,guazipi/meteor,fashionsun/meteor,eluck/meteor,juansgaitan/meteor,4commerce-technologies-AG/meteor,joannekoong/meteor,mauricionr/meteor,deanius/meteor,dandv/meteor,neotim/meteor,karlito40/meteor,cherbst/meteor,pjump/meteor,dboyliao/meteor,chengxiaole/meteor,4commerce-technologies-AG/meteor,benstoltz/meteor,jenalgit/meteor,yinhe007/meteor,LWHTarena/meteor,mirstan/meteor,rozzzly/meteor,udhayam/meteor,sitexa/meteor,framewr/meteor,yalexx/meteor,allanalexandre/meteor,msavin/meteor,lassombra/meteor,jirengu/meteor,papimomi/meteor,akintoey/meteor,alexbeletsky/meteor,yiliaofan/meteor,queso/meteor,meteor-velocity/meteor,codingang/meteor,steedos/meteor,justintung/meteor,baysao/meteor,arunoda/meteor,aramk/meteor,yiliaofan/meteor,jrudio/meteor,williambr/meteor,eluck/meteor,bhargav175/meteor,brdtrpp/meteor,hristaki/meteor,AnjirHossain/meteor,modulexcite/meteor,zdd910/meteor,paul-barry-kenzan/meteor,TribeMedia/meteor,Urigo/meteor,Profab/meteor,emmerge/meteor,Paulyoufu/meteor-1,PatrickMcGuinness/meteor,msavin/meteor,DAB0mB/meteor,deanius/meteor,Paulyoufu/meteor-1,namho102/meteor,Profab/meteor,meteor-velocity/meteor,devgrok/meteor,ericterpstra/meteor,sitexa/meteor,yanisIk/meteor,pjump/meteor,yiliaofan/meteor,Profab/meteor,Theviajerock/meteor,l0rd0fwar/meteor,SeanOceanHu/meteor,yonas/meteor-freebsd,ndarilek/meteor,mauricionr/meteor,saisai/meteor,Quicksteve/meteor,deanius/meteor,colinligertwood/meteor,namho102/meteor,mauricionr/meteor,aldeed/meteor,fashionsun/meteor,henrypan/meteor,brettle/meteor,Prithvi-A/meteor,pjump/meteor,nuvipannu/meteor,rozzzly/meteor,fashionsun/meteor,youprofit/meteor,lpinto93/meteor,tdamsma/meteor,youprofit/meteor,kengchau/meteor,oceanzou123/meteor,mauricionr/meteor,newswim/meteor,planet-training/meteor,DAB0mB/meteor,msavin/meteor,alexbeletsky/meteor,kengchau/meteor,h200863057/meteor,jeblister/meteor,dev-bobsong/meteor,LWHTarena/meteor,D1no/meteor,cog-64/meteor,akintoey/meteor,yinhe007/meteor,baiyunping333/meteor,joannekoong/meteor,yonas/meteor-freebsd,sitexa/meteor,sitexa/meteor,jg3526/meteor,evilemon/meteor,Jeremy017/meteor,sdeveloper/meteor,saisai/meteor,michielvanoeffelen/meteor,evilemon/meteor,johnthepink/meteor,meonkeys/meteor,allanalexandre/meteor,chasertech/meteor,steedos/meteor,guazipi/meteor,qscripter/meteor,Hansoft/meteor,codedogfish/meteor,4commerce-technologies-AG/meteor,Profab/meteor,zdd910/meteor,queso/meteor,IveWong/meteor,Hansoft/meteor,somallg/meteor,rabbyalone/meteor,newswim/meteor,dfischer/meteor,esteedqueen/meteor,lorensr/meteor,dev-bobsong/meteor,colinligertwood/meteor,cherbst/meteor,lieuwex/meteor,shrop/meteor,hristaki/meteor,steedos/meteor,justintung/meteor,kengchau/meteor,paul-barry-kenzan/meteor,jagi/meteor,paul-barry-kenzan/meteor,Jeremy017/meteor,lpinto93/meteor,yonas/meteor-freebsd,D1no/meteor,servel333/meteor,Urigo/meteor,cog-64/meteor,Eynaliyev/meteor,Puena/meteor,emmerge/meteor,dev-bobsong/meteor,framewr/meteor,henrypan/meteor,pandeysoni/meteor,stevenliuit/meteor,msavin/meteor,akintoey/meteor,udhayam/meteor,zdd910/meteor,dandv/meteor,codingang/meteor,ashwathgovind/meteor,cog-64/meteor,SeanOceanHu/meteor,youprofit/meteor,sclausen/meteor,kidaa/meteor,cbonami/meteor,imanmafi/meteor,yonglehou/meteor,aleclarson/meteor,Jonekee/meteor,nuvipannu/meteor,DCKT/meteor,steedos/meteor,chiefninew/meteor,juansgaitan/meteor,luohuazju/meteor,whip112/meteor,framewr/meteor,ashwathgovind/meteor,DAB0mB/meteor,rabbyalone/meteor,TribeMedia/meteor,kidaa/meteor,h200863057/meteor,paul-barry-kenzan/meteor,chengxiaole/meteor,chinasb/meteor,lorensr/meteor,cbonami/meteor,zdd910/meteor,GrimDerp/meteor,TechplexEngineer/meteor,vacjaliu/meteor,yinhe007/meteor,aramk/meteor,whip112/meteor,eluck/meteor,mirstan/meteor,williambr/meteor,steedos/meteor,Quicksteve/meteor,calvintychan/meteor,4commerce-technologies-AG/meteor,neotim/meteor,qscripter/meteor,aldeed/meteor,l0rd0fwar/meteor,4commerce-technologies-AG/meteor,shrop/meteor,skarekrow/meteor,chmac/meteor,brettle/meteor,akintoey/meteor,Ken-Liu/meteor,chinasb/meteor,neotim/meteor,hristaki/meteor,planet-training/meteor,chengxiaole/meteor,iman-mafi/meteor,yonas/meteor-freebsd,Jonekee/meteor,neotim/meteor,Jonekee/meteor,yanisIk/meteor,daslicht/meteor,meonkeys/meteor,newswim/meteor,dboyliao/meteor,jagi/meteor,somallg/meteor,somallg/meteor,Paulyoufu/meteor-1,cbonami/meteor,juansgaitan/meteor,yonas/meteor-freebsd,brdtrpp/meteor,judsonbsilva/meteor,alexbeletsky/meteor,EduShareOntario/meteor,jrudio/meteor,sdeveloper/meteor,servel333/meteor,Quicksteve/meteor,cog-64/meteor,yanisIk/meteor,l0rd0fwar/meteor,Prithvi-A/meteor,Quicksteve/meteor,yalexx/meteor,meonkeys/meteor,queso/meteor,pjump/meteor,benstoltz/meteor,chasertech/meteor,pandeysoni/meteor,SeanOceanHu/meteor,sitexa/meteor,sunny-g/meteor,codedogfish/meteor,Puena/meteor,calvintychan/meteor,joannekoong/meteor,sclausen/meteor,chengxiaole/meteor,namho102/meteor,emmerge/meteor,lawrenceAIO/meteor,EduShareOntario/meteor,guazipi/meteor,bhargav175/meteor,lpinto93/meteor,whip112/meteor,ljack/meteor,Jeremy017/meteor,somallg/meteor,rabbyalone/meteor,yonas/meteor-freebsd,Quicksteve/meteor,yanisIk/meteor,nuvipannu/meteor,saisai/meteor,yyx990803/meteor,ljack/meteor,iman-mafi/meteor,jg3526/meteor,lpinto93/meteor,shmiko/meteor,williambr/meteor,yanisIk/meteor,johnthepink/meteor,AnthonyAstige/meteor,jg3526/meteor,mirstan/meteor,emmerge/meteor,l0rd0fwar/meteor,karlito40/meteor,cbonami/meteor,Paulyoufu/meteor-1,jdivy/meteor,AnjirHossain/meteor,IveWong/meteor,planet-training/meteor,chmac/meteor,h200863057/meteor,wmkcc/meteor,allanalexandre/meteor,Hansoft/meteor,modulexcite/meteor,DCKT/meteor,pandeysoni/meteor,saisai/meteor,PatrickMcGuinness/meteor,benstoltz/meteor,baiyunping333/meteor,baiyunping333/meteor,judsonbsilva/meteor,chengxiaole/meteor,dandv/meteor,jagi/meteor,bhargav175/meteor,jagi/meteor,baiyunping333/meteor,jeblister/meteor,brdtrpp/meteor,jdivy/meteor,meonkeys/meteor,joannekoong/meteor,TribeMedia/meteor,Eynaliyev/meteor,imanmafi/meteor,luohuazju/meteor,joannekoong/meteor,dboyliao/meteor,pandeysoni/meteor,judsonbsilva/meteor,framewr/meteor,qscripter/meteor,iman-mafi/meteor,dfischer/meteor,justintung/meteor,lieuwex/meteor,mubassirhayat/meteor,joannekoong/meteor,GrimDerp/meteor,Prithvi-A/meteor,devgrok/meteor,tdamsma/meteor,kengchau/meteor,udhayam/meteor,dboyliao/meteor,yalexx/meteor,baysao/meteor,imanmafi/meteor,mubassirhayat/meteor,williambr/meteor,rozzzly/meteor,colinligertwood/meteor,servel333/meteor,whip112/meteor,TribeMedia/meteor,mjmasn/meteor,cbonami/meteor,saisai/meteor,queso/meteor,brettle/meteor,emmerge/meteor,shmiko/meteor,lassombra/meteor,GrimDerp/meteor,michielvanoeffelen/meteor,dboyliao/meteor,calvintychan/meteor,AnjirHossain/meteor,yalexx/meteor,chmac/meteor,allanalexandre/meteor,brdtrpp/meteor,aldeed/meteor,bhargav175/meteor,devgrok/meteor,shadedprofit/meteor,sitexa/meteor,wmkcc/meteor,lawrenceAIO/meteor,jirengu/meteor,wmkcc/meteor,benstoltz/meteor,udhayam/meteor,Profab/meteor,Hansoft/meteor,codingang/meteor,udhayam/meteor,servel333/meteor,neotim/meteor,chiefninew/meteor,Eynaliyev/meteor,henrypan/meteor,hristaki/meteor,meonkeys/meteor,AnthonyAstige/meteor,planet-training/meteor,DCKT/meteor,Prithvi-A/meteor,Jonekee/meteor,codedogfish/meteor,brettle/meteor,GrimDerp/meteor,iman-mafi/meteor,rozzzly/meteor,msavin/meteor,aramk/meteor,jdivy/meteor,stevenliuit/meteor,ashwathgovind/meteor,shrop/meteor,skarekrow/meteor,fashionsun/meteor,karlito40/meteor,guazipi/meteor,esteedqueen/meteor,elkingtonmcb/meteor,eluck/meteor,oceanzou123/meteor,Ken-Liu/meteor,jeblister/meteor,jdivy/meteor,deanius/meteor,D1no/meteor,katopz/meteor,GrimDerp/meteor,PatrickMcGuinness/meteor,AnthonyAstige/meteor,deanius/meteor,yonglehou/meteor,mauricionr/meteor,PatrickMcGuinness/meteor,vjau/meteor,codingang/meteor,Hansoft/meteor,TribeMedia/meteor,alphanso/meteor,h200863057/meteor,dev-bobsong/meteor,cherbst/meteor,newswim/meteor,DCKT/meteor,zdd910/meteor,pjump/meteor,ndarilek/meteor,EduShareOntario/meteor,alphanso/meteor,iman-mafi/meteor,JesseQin/meteor,daltonrenaldo/meteor,emmerge/meteor,HugoRLopes/meteor,chinasb/meteor,tdamsma/meteor,codedogfish/meteor,tdamsma/meteor,ericterpstra/meteor,newswim/meteor,mjmasn/meteor,qscripter/meteor,PatrickMcGuinness/meteor,mjmasn/meteor,chinasb/meteor,chiefninew/meteor,arunoda/meteor,meteor-velocity/meteor,luohuazju/meteor,Ken-Liu/meteor,calvintychan/meteor,dboyliao/meteor,saisai/meteor,Puena/meteor,wmkcc/meteor,sunny-g/meteor,yiliaofan/meteor,johnthepink/meteor,dfischer/meteor,sdeveloper/meteor,Urigo/meteor,daltonrenaldo/meteor,queso/meteor,yalexx/meteor,lassombra/meteor,AlexR1712/meteor,baiyunping333/meteor,lorensr/meteor,johnthepink/meteor,chasertech/meteor,lorensr/meteor,namho102/meteor,h200863057/meteor,oceanzou123/meteor,chasertech/meteor,chiefninew/meteor,ndarilek/meteor,lawrenceAIO/meteor,esteedqueen/meteor,cherbst/meteor,calvintychan/meteor,lawrenceAIO/meteor,somallg/meteor,evilemon/meteor,yonas/meteor-freebsd,vjau/meteor,hristaki/meteor,PatrickMcGuinness/meteor,namho102/meteor,yyx990803/meteor,baiyunping333/meteor,aldeed/meteor,katopz/meteor,qscripter/meteor,Paulyoufu/meteor-1,codingang/meteor,pjump/meteor,Puena/meteor,yonglehou/meteor,shadedprofit/meteor,jeblister/meteor,tdamsma/meteor,rozzzly/meteor,emmerge/meteor,mubassirhayat/meteor,jenalgit/meteor,yiliaofan/meteor,shrop/meteor,shadedprofit/meteor,vacjaliu/meteor,lieuwex/meteor,arunoda/meteor,DAB0mB/meteor,papimomi/meteor,ndarilek/meteor,kidaa/meteor,cbonami/meteor,justintung/meteor,oceanzou123/meteor,HugoRLopes/meteor,jenalgit/meteor,HugoRLopes/meteor,evilemon/meteor,vjau/meteor,HugoRLopes/meteor,Hansoft/meteor,ericterpstra/meteor,yyx990803/meteor,karlito40/meteor,servel333/meteor,Urigo/meteor,evilemon/meteor,TechplexEngineer/meteor,papimomi/meteor,sdeveloper/meteor,AnjirHossain/meteor,arunoda/meteor,lawrenceAIO/meteor,IveWong/meteor,cog-64/meteor,cherbst/meteor,AlexR1712/meteor,somallg/meteor,codedogfish/meteor,shmiko/meteor,baiyunping333/meteor,daltonrenaldo/meteor,AnthonyAstige/meteor,TechplexEngineer/meteor,guazipi/meteor,wmkcc/meteor,dfischer/meteor,skarekrow/meteor,AlexR1712/meteor,Puena/meteor,esteedqueen/meteor,planet-training/meteor,zdd910/meteor,HugoRLopes/meteor,codingang/meteor,AnjirHossain/meteor,henrypan/meteor,skarekrow/meteor,mjmasn/meteor,jenalgit/meteor,Theviajerock/meteor,lassombra/meteor,williambr/meteor,whip112/meteor,elkingtonmcb/meteor,johnthepink/meteor,daslicht/meteor,chinasb/meteor,fashionsun/meteor,jg3526/meteor,LWHTarena/meteor,chmac/meteor,sclausen/meteor,elkingtonmcb/meteor,Puena/meteor,luohuazju/meteor,esteedqueen/meteor,kencheung/meteor,brdtrpp/meteor,eluck/meteor,yalexx/meteor,sunny-g/meteor,jirengu/meteor,shmiko/meteor,yanisIk/meteor,HugoRLopes/meteor,l0rd0fwar/meteor,daslicht/meteor,AlexR1712/meteor,rabbyalone/meteor,devgrok/meteor,luohuazju/meteor,cherbst/meteor,JesseQin/meteor,katopz/meteor,ericterpstra/meteor,D1no/meteor,Theviajerock/meteor,benstoltz/meteor,aramk/meteor,fashionsun/meteor,johnthepink/meteor,jirengu/meteor,lieuwex/meteor,Ken-Liu/meteor,sclausen/meteor,yinhe007/meteor,kengchau/meteor,akintoey/meteor,chasertech/meteor,alphanso/meteor,h200863057/meteor,PatrickMcGuinness/meteor,AnthonyAstige/meteor,Theviajerock/meteor,elkingtonmcb/meteor,jeblister/meteor,yalexx/meteor,vjau/meteor,imanmafi/meteor,LWHTarena/meteor,mirstan/meteor,servel333/meteor,aldeed/meteor,ashwathgovind/meteor,brettle/meteor,bhargav175/meteor,meteor-velocity/meteor,mubassirhayat/meteor,mubassirhayat/meteor,servel333/meteor,karlito40/meteor,planet-training/meteor,daltonrenaldo/meteor,judsonbsilva/meteor,imanmafi/meteor,dandv/meteor,iman-mafi/meteor,AlexR1712/meteor,henrypan/meteor,yyx990803/meteor,Jonekee/meteor,LWHTarena/meteor,rabbyalone/meteor,michielvanoeffelen/meteor,bhargav175/meteor,jagi/meteor,rozzzly/meteor,GrimDerp/meteor,devgrok/meteor,msavin/meteor,katopz/meteor,papimomi/meteor,SeanOceanHu/meteor,DAB0mB/meteor,LWHTarena/meteor,imanmafi/meteor,jagi/meteor,Ken-Liu/meteor,stevenliuit/meteor,brdtrpp/meteor,ericterpstra/meteor,ndarilek/meteor,rabbyalone/meteor,D1no/meteor,esteedqueen/meteor,baysao/meteor,justintung/meteor,ericterpstra/meteor,chasertech/meteor,servel333/meteor,chengxiaole/meteor,calvintychan/meteor,tdamsma/meteor,Theviajerock/meteor,eluck/meteor,yinhe007/meteor,chiefninew/meteor,youprofit/meteor,oceanzou123/meteor,vjau/meteor,Hansoft/meteor,whip112/meteor,lawrenceAIO/meteor,yiliaofan/meteor,daltonrenaldo/meteor,chinasb/meteor,jdivy/meteor,HugoRLopes/meteor,kencheung/meteor,youprofit/meteor,yiliaofan/meteor,paul-barry-kenzan/meteor,papimomi/meteor,msavin/meteor,jenalgit/meteor,brettle/meteor,kengchau/meteor,saisai/meteor,justintung/meteor,codedogfish/meteor,lorensr/meteor,jirengu/meteor,steedos/meteor,Eynaliyev/meteor,daltonrenaldo/meteor,juansgaitan/meteor,elkingtonmcb/meteor,GrimDerp/meteor,framewr/meteor,allanalexandre/meteor,mubassirhayat/meteor,sitexa/meteor,lawrenceAIO/meteor,aramk/meteor,yanisIk/meteor,guazipi/meteor,chasertech/meteor,ljack/meteor,elkingtonmcb/meteor,ljack/meteor,EduShareOntario/meteor,DAB0mB/meteor,kencheung/meteor,shrop/meteor,sdeveloper/meteor,TechplexEngineer/meteor,dfischer/meteor,daslicht/meteor,katopz/meteor,papimomi/meteor,sclausen/meteor,daslicht/meteor,Ken-Liu/meteor,AlexR1712/meteor,kidaa/meteor,lassombra/meteor,alexbeletsky/meteor,AnjirHossain/meteor,mjmasn/meteor,pjump/meteor,modulexcite/meteor,dandv/meteor,allanalexandre/meteor,AnthonyAstige/meteor,meonkeys/meteor,TechplexEngineer/meteor,framewr/meteor,colinligertwood/meteor,jrudio/meteor,michielvanoeffelen/meteor,imanmafi/meteor,sunny-g/meteor,dboyliao/meteor,l0rd0fwar/meteor,chiefninew/meteor,mauricionr/meteor,judsonbsilva/meteor,dandv/meteor,cbonami/meteor,jrudio/meteor,AnjirHossain/meteor,cog-64/meteor,chmac/meteor,yonglehou/meteor,judsonbsilva/meteor,TechplexEngineer/meteor,jdivy/meteor,Jeremy017/meteor,paul-barry-kenzan/meteor,EduShareOntario/meteor,whip112/meteor,yonglehou/meteor,mubassirhayat/meteor,daslicht/meteor,ljack/meteor,skarekrow/meteor,hristaki/meteor,kencheung/meteor,elkingtonmcb/meteor,AlexR1712/meteor,dev-bobsong/meteor,sdeveloper/meteor,newswim/meteor,baysao/meteor,TribeMedia/meteor,Ken-Liu/meteor,tdamsma/meteor,DAB0mB/meteor,juansgaitan/meteor,aramk/meteor,sunny-g/meteor,meteor-velocity/meteor,aldeed/meteor,kencheung/meteor,juansgaitan/meteor,Jonekee/meteor,Urigo/meteor,luohuazju/meteor,alexbeletsky/meteor,youprofit/meteor,namho102/meteor,Quicksteve/meteor,lorensr/meteor,meonkeys/meteor,ljack/meteor,qscripter/meteor,sclausen/meteor,juansgaitan/meteor,nuvipannu/meteor,sclausen/meteor,oceanzou123/meteor,D1no/meteor,yonglehou/meteor,SeanOceanHu/meteor,modulexcite/meteor,meteor-velocity/meteor,jdivy/meteor,Jeremy017/meteor,stevenliuit/meteor,TribeMedia/meteor,paul-barry-kenzan/meteor,vacjaliu/meteor,neotim/meteor,pandeysoni/meteor,DCKT/meteor,lpinto93/meteor,guazipi/meteor,shrop/meteor,deanius/meteor,Eynaliyev/meteor,ljack/meteor,shmiko/meteor,devgrok/meteor,queso/meteor,lpinto93/meteor,JesseQin/meteor,baysao/meteor,neotim/meteor,EduShareOntario/meteor,AnthonyAstige/meteor,Quicksteve/meteor,skarekrow/meteor,lorensr/meteor,chengxiaole/meteor,mauricionr/meteor,shmiko/meteor,jirengu/meteor,bhargav175/meteor,jg3526/meteor,yinhe007/meteor,dev-bobsong/meteor,kencheung/meteor,JesseQin/meteor,cherbst/meteor,jagi/meteor,sunny-g/meteor,vjau/meteor,lassombra/meteor,vacjaliu/meteor,calvintychan/meteor,vacjaliu/meteor,henrypan/meteor,ashwathgovind/meteor,aleclarson/meteor,h200863057/meteor,chinasb/meteor,alphanso/meteor,4commerce-technologies-AG/meteor,ashwathgovind/meteor,mirstan/meteor,daslicht/meteor,pandeysoni/meteor,ndarilek/meteor,Puena/meteor,vjau/meteor,esteedqueen/meteor,HugoRLopes/meteor,Profab/meteor,daltonrenaldo/meteor,stevenliuit/meteor,aramk/meteor,Prithvi-A/meteor,Jeremy017/meteor,Profab/meteor,colinligertwood/meteor,karlito40/meteor,brdtrpp/meteor,williambr/meteor,michielvanoeffelen/meteor,udhayam/meteor,stevenliuit/meteor,vacjaliu/meteor,shmiko/meteor,yanisIk/meteor,l0rd0fwar/meteor,meteor-velocity/meteor,akintoey/meteor,TechplexEngineer/meteor,dfischer/meteor,sunny-g/meteor,alphanso/meteor,Paulyoufu/meteor-1,baysao/meteor,Prithvi-A/meteor,rozzzly/meteor,ndarilek/meteor,kencheung/meteor,namho102/meteor,michielvanoeffelen/meteor,Urigo/meteor,mirstan/meteor,arunoda/meteor,benstoltz/meteor,michielvanoeffelen/meteor,katopz/meteor,jg3526/meteor,rabbyalone/meteor,Jeremy017/meteor,evilemon/meteor,wmkcc/meteor,hristaki/meteor,kidaa/meteor,henrypan/meteor,shrop/meteor,dfischer/meteor,arunoda/meteor,karlito40/meteor,yyx990803/meteor,JesseQin/meteor,Eynaliyev/meteor,somallg/meteor,ndarilek/meteor,cog-64/meteor,mirstan/meteor,lpinto93/meteor,nuvipannu/meteor,oceanzou123/meteor,brdtrpp/meteor,fashionsun/meteor,dandv/meteor,JesseQin/meteor,LWHTarena/meteor,Eynaliyev/meteor,jrudio/meteor,SeanOceanHu/meteor,D1no/meteor,benstoltz/meteor,johnthepink/meteor,ashwathgovind/meteor,eluck/meteor,baysao/meteor,queso/meteor,AnthonyAstige/meteor,udhayam/meteor,alexbeletsky/meteor,codingang/meteor,modulexcite/meteor,mjmasn/meteor,4commerce-technologies-AG/meteor,karlito40/meteor,skarekrow/meteor,ericterpstra/meteor,youprofit/meteor,SeanOceanHu/meteor,joannekoong/meteor,katopz/meteor,Theviajerock/meteor,jirengu/meteor,allanalexandre/meteor,somallg/meteor,SeanOceanHu/meteor,chmac/meteor,IveWong/meteor,yinhe007/meteor,tdamsma/meteor,pandeysoni/meteor,Eynaliyev/meteor,alphanso/meteor,zdd910/meteor,lieuwex/meteor,IveWong/meteor,mjmasn/meteor,qscripter/meteor,alexbeletsky/meteor,DCKT/meteor,jenalgit/meteor,mubassirhayat/meteor,D1no/meteor,jg3526/meteor,justintung/meteor,wmkcc/meteor,codedogfish/meteor,aleclarson/meteor,steedos/meteor,allanalexandre/meteor,EduShareOntario/meteor,lieuwex/meteor,framewr/meteor,Prithvi-A/meteor,sdeveloper/meteor,evilemon/meteor,arunoda/meteor,IveWong/meteor,devgrok/meteor,akintoey/meteor,brettle/meteor,eluck/meteor,yyx990803/meteor | json | ## Code Before:
{
"track": "METEOR",
"version": "1.0.4.2",
"patchFrom": ["1.0.4", "1.0.4.1"],
"recommended": false,
"official": true,
"description": "The Official Meteor Distribution"
}
## Instruction:
Update release number for 1.0.5
## Code After:
{
"track": "METEOR",
"version": "1.0.5",
"recommended": false,
"official": true,
"description": "The Official Meteor Distribution"
}
| {
"track": "METEOR",
- "version": "1.0.4.2",
? ^^^
+ "version": "1.0.5",
? ^
- "patchFrom": ["1.0.4", "1.0.4.1"],
"recommended": false,
"official": true,
"description": "The Official Meteor Distribution"
} | 3 | 0.375 | 1 | 2 |
4c18aec23d6467d448d01c0ee31c961404d9f035 | ionic/components/search-bar/test/floating/main.html | ionic/components/search-bar/test/floating/main.html | <!-- <ion-toolbar>
<form [ng-form-model]="toolbarForm">
<ion-search-bar ng-control="toolbarSearchQuery"></ion-search-bar>
</form>
</ion-toolbar> -->
<ion-content>
<form [ng-form-model]="form">
<label> Search - Default </label>
<ion-search-bar ng-control="searchQuery" class="e2eFloatingSearchBar"></ion-search-bar>
<label> Search - Custom Placeholder </label>
<ion-search-bar ng-control="searchQuery" placeholder="Filter"></ion-search-bar>
<label> Search - Cancel Button </label>
<ion-search-bar ng-control="searchQuery" show-cancel="true"></ion-search-bar>
<label> Search - Custom Cancel Button </label>
<ion-search-bar ng-control="searchQuery" show-cancel="true" cancel-text="Done"></ion-search-bar>
</form>
</ion-content>
| <!-- <ion-toolbar>
<form [ng-form-model]="toolbarForm">
<ion-search-bar ng-control="toolbarSearchQuery"></ion-search-bar>
</form>
</ion-toolbar> -->
<ion-content>
<form [ng-form-model]="form">
<label> Search - Default </label>
<ion-search-bar ng-control="searchQuery" class="e2eFloatingSearchBar"></ion-search-bar>
<label> Search - Custom Placeholder </label>
<ion-search-bar ng-control="searchQuery" placeholder="Filter"></ion-search-bar>
<label> Search - Cancel Button </label>
<ion-search-bar ng-control="searchQuery" show-cancel="true"></ion-search-bar>
<label> Search - Custom Cancel Button </label>
<ion-search-bar ng-control="searchQuery" show-cancel="true" cancel-text="Done"></ion-search-bar>
<label> Search - Custom Cancel Action</label>
<ion-search-bar ng-control="searchQuery" show-cancel="true" cancel-text="Done" [cancel-action]="myCancelAction"></ion-search-bar>
</form>
</ion-content>
| Update search bar floating demo for custom cancel action | Fix(demo): Update search bar floating demo for custom cancel action
| HTML | mit | dennybiasiolli/ionic,janglednerves/ionic,manucorporat/ionic,driftyco/ionic,driftyco/ionic,alan-agius4/ionic,alan-agius4/ionic,cambronjay/ionic,TillaTheHun0/ionic,jarrodkoch/ionic,manucorporat/ionic,jhlee8804/ionic,cambronjay/ionic,jarrodkoch/ionic,driftyco/ionic,janglednerves/ionic,TillaTheHun0/ionic,janglednerves/ionic,jhlee8804/ionic,alan-agius4/ionic,janglednerves/ionic,AbraaoAlves/ionic,cambronjay/ionic,joshesp/ionic,cambronjay/ionic,joshesp/ionic,TillaTheHun0/ionic,jarrodkoch/ionic,jhlee8804/ionic,AbraaoAlves/ionic,dennybiasiolli/ionic,cambronjay/ionic,alan-agius4/ionic,joshesp/ionic,manucorporat/ionic,AbraaoAlves/ionic,jhlee8804/ionic,alan-agius4/ionic,janglednerves/ionic,AbraaoAlves/ionic,dennybiasiolli/ionic,TillaTheHun0/ionic,jarrodkoch/ionic,driftyco/ionic,driftyco/ionic,jarrodkoch/ionic,jhlee8804/ionic,alan-agius4/ionic,manucorporat/ionic,joshesp/ionic,dennybiasiolli/ionic,manucorporat/ionic,dennybiasiolli/ionic,AbraaoAlves/ionic,brianespinosa/ionic2-sass | html | ## Code Before:
<!-- <ion-toolbar>
<form [ng-form-model]="toolbarForm">
<ion-search-bar ng-control="toolbarSearchQuery"></ion-search-bar>
</form>
</ion-toolbar> -->
<ion-content>
<form [ng-form-model]="form">
<label> Search - Default </label>
<ion-search-bar ng-control="searchQuery" class="e2eFloatingSearchBar"></ion-search-bar>
<label> Search - Custom Placeholder </label>
<ion-search-bar ng-control="searchQuery" placeholder="Filter"></ion-search-bar>
<label> Search - Cancel Button </label>
<ion-search-bar ng-control="searchQuery" show-cancel="true"></ion-search-bar>
<label> Search - Custom Cancel Button </label>
<ion-search-bar ng-control="searchQuery" show-cancel="true" cancel-text="Done"></ion-search-bar>
</form>
</ion-content>
## Instruction:
Fix(demo): Update search bar floating demo for custom cancel action
## Code After:
<!-- <ion-toolbar>
<form [ng-form-model]="toolbarForm">
<ion-search-bar ng-control="toolbarSearchQuery"></ion-search-bar>
</form>
</ion-toolbar> -->
<ion-content>
<form [ng-form-model]="form">
<label> Search - Default </label>
<ion-search-bar ng-control="searchQuery" class="e2eFloatingSearchBar"></ion-search-bar>
<label> Search - Custom Placeholder </label>
<ion-search-bar ng-control="searchQuery" placeholder="Filter"></ion-search-bar>
<label> Search - Cancel Button </label>
<ion-search-bar ng-control="searchQuery" show-cancel="true"></ion-search-bar>
<label> Search - Custom Cancel Button </label>
<ion-search-bar ng-control="searchQuery" show-cancel="true" cancel-text="Done"></ion-search-bar>
<label> Search - Custom Cancel Action</label>
<ion-search-bar ng-control="searchQuery" show-cancel="true" cancel-text="Done" [cancel-action]="myCancelAction"></ion-search-bar>
</form>
</ion-content>
| <!-- <ion-toolbar>
<form [ng-form-model]="toolbarForm">
<ion-search-bar ng-control="toolbarSearchQuery"></ion-search-bar>
</form>
</ion-toolbar> -->
<ion-content>
<form [ng-form-model]="form">
<label> Search - Default </label>
<ion-search-bar ng-control="searchQuery" class="e2eFloatingSearchBar"></ion-search-bar>
<label> Search - Custom Placeholder </label>
<ion-search-bar ng-control="searchQuery" placeholder="Filter"></ion-search-bar>
<label> Search - Cancel Button </label>
<ion-search-bar ng-control="searchQuery" show-cancel="true"></ion-search-bar>
<label> Search - Custom Cancel Button </label>
<ion-search-bar ng-control="searchQuery" show-cancel="true" cancel-text="Done"></ion-search-bar>
+ <label> Search - Custom Cancel Action</label>
+ <ion-search-bar ng-control="searchQuery" show-cancel="true" cancel-text="Done" [cancel-action]="myCancelAction"></ion-search-bar>
</form>
</ion-content> | 2 | 0.117647 | 2 | 0 |
0b4be7f32e2e51737da172b76baf7976f7d3e920 | .travis.yml | .travis.yml | language: d
os:
- linux
- osx
env:
- secure: "NV1Ow4YXogPx/kevm0kGesSoblvgv+9z3uhzrWhDDSfTlib845b+dLJyjLY/SRfUaJ0Mew6kOnqLoyISmpe0E3KkbMDh/t+jU1ueqR/FWLsdBRcUMfkC3amJ8GS0zRnbREaAG37p6YShScCjazrf0w9opM0hzHqkXLj2kev68lk="
install:
- echo $TRAVIS_OS_NAME $TRAVIS_JOB_ID
- bash .travis/setup_linux.sh
- bash .travis/setup_osx.sh
- sudo dub fetch x11
- sudo dub fetch doveralls
# Install new dub
- git clone https://github.com/ColdenCullen/dub
- cd dub && dub build
- cd ..
script: sudo ./dub/bin/dub test-cov
after_success: sudo dub run doveralls -- -p `pwd` -t $COVERALLS_TOKEN
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/89d5205a2483bcd72a32
on_success: change
on_failure: always
on_start: never
| language: d
os:
- linux
- osx
env:
- secure: "NV1Ow4YXogPx/kevm0kGesSoblvgv+9z3uhzrWhDDSfTlib845b+dLJyjLY/SRfUaJ0Mew6kOnqLoyISmpe0E3KkbMDh/t+jU1ueqR/FWLsdBRcUMfkC3amJ8GS0zRnbREaAG37p6YShScCjazrf0w9opM0hzHqkXLj2kev68lk="
install:
- echo $TRAVIS_OS_NAME $TRAVIS_JOB_ID
- bash .travis/setup_linux.sh
- bash .travis/setup_osx.sh
- sudo dub fetch x11
- sudo dub fetch doveralls
# Install new dub
- git clone https://github.com/ColdenCullen/dub
- cd dub && dub build
- cd ..
script: sudo ./dub/bin/dub test-cov
after_success: sudo dub run doveralls -- -p `pwd` -j $TRAVIS_JOB_ID
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/89d5205a2483bcd72a32
on_success: change
on_failure: always
on_start: never
| Use the damn token already | Use the damn token already
| YAML | mit | ColdenCullen/quack | yaml | ## Code Before:
language: d
os:
- linux
- osx
env:
- secure: "NV1Ow4YXogPx/kevm0kGesSoblvgv+9z3uhzrWhDDSfTlib845b+dLJyjLY/SRfUaJ0Mew6kOnqLoyISmpe0E3KkbMDh/t+jU1ueqR/FWLsdBRcUMfkC3amJ8GS0zRnbREaAG37p6YShScCjazrf0w9opM0hzHqkXLj2kev68lk="
install:
- echo $TRAVIS_OS_NAME $TRAVIS_JOB_ID
- bash .travis/setup_linux.sh
- bash .travis/setup_osx.sh
- sudo dub fetch x11
- sudo dub fetch doveralls
# Install new dub
- git clone https://github.com/ColdenCullen/dub
- cd dub && dub build
- cd ..
script: sudo ./dub/bin/dub test-cov
after_success: sudo dub run doveralls -- -p `pwd` -t $COVERALLS_TOKEN
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/89d5205a2483bcd72a32
on_success: change
on_failure: always
on_start: never
## Instruction:
Use the damn token already
## Code After:
language: d
os:
- linux
- osx
env:
- secure: "NV1Ow4YXogPx/kevm0kGesSoblvgv+9z3uhzrWhDDSfTlib845b+dLJyjLY/SRfUaJ0Mew6kOnqLoyISmpe0E3KkbMDh/t+jU1ueqR/FWLsdBRcUMfkC3amJ8GS0zRnbREaAG37p6YShScCjazrf0w9opM0hzHqkXLj2kev68lk="
install:
- echo $TRAVIS_OS_NAME $TRAVIS_JOB_ID
- bash .travis/setup_linux.sh
- bash .travis/setup_osx.sh
- sudo dub fetch x11
- sudo dub fetch doveralls
# Install new dub
- git clone https://github.com/ColdenCullen/dub
- cd dub && dub build
- cd ..
script: sudo ./dub/bin/dub test-cov
after_success: sudo dub run doveralls -- -p `pwd` -j $TRAVIS_JOB_ID
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/89d5205a2483bcd72a32
on_success: change
on_failure: always
on_start: never
| language: d
os:
- linux
- osx
env:
- secure: "NV1Ow4YXogPx/kevm0kGesSoblvgv+9z3uhzrWhDDSfTlib845b+dLJyjLY/SRfUaJ0Mew6kOnqLoyISmpe0E3KkbMDh/t+jU1ueqR/FWLsdBRcUMfkC3amJ8GS0zRnbREaAG37p6YShScCjazrf0w9opM0hzHqkXLj2kev68lk="
install:
- echo $TRAVIS_OS_NAME $TRAVIS_JOB_ID
- bash .travis/setup_linux.sh
- bash .travis/setup_osx.sh
- sudo dub fetch x11
- sudo dub fetch doveralls
# Install new dub
- git clone https://github.com/ColdenCullen/dub
- cd dub && dub build
- cd ..
script: sudo ./dub/bin/dub test-cov
- after_success: sudo dub run doveralls -- -p `pwd` -t $COVERALLS_TOKEN
? ^ ^^^^ ^^ ^ ^^^
+ after_success: sudo dub run doveralls -- -p `pwd` -j $TRAVIS_JOB_ID
? ^ ^ ^^ ^ ^^^^
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/89d5205a2483bcd72a32
on_success: change
on_failure: always
on_start: never | 2 | 0.08 | 1 | 1 |
5e7407d44f48c1e5c4b1011675da6920db40fa4a | .rubocop.yml | .rubocop.yml | inherit_from: .thoughtbot_rubocop.yml
Metrics/LineLength:
Max: 120
Documentation:
Enabled: false
Style/StringLiterals:
Description: Checks if uses of quotes match the configured preference.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
Enabled: true
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes
Metrics/BlockLength:
Exclude:
- 'spec/**/*' | inherit_from: .thoughtbot_rubocop.yml
AllCops:
Exclude:
- 'vendor/**/*'
Metrics/LineLength:
Max: 120
Documentation:
Enabled: false
Style/StringLiterals:
Description: Checks if uses of quotes match the configured preference.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
Enabled: true
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes
Metrics/BlockLength:
Exclude:
- 'spec/**/*' | Add back in vendor ignore | Add back in vendor ignore
| YAML | mit | coreyja/hash_attribute_assignment | yaml | ## Code Before:
inherit_from: .thoughtbot_rubocop.yml
Metrics/LineLength:
Max: 120
Documentation:
Enabled: false
Style/StringLiterals:
Description: Checks if uses of quotes match the configured preference.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
Enabled: true
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes
Metrics/BlockLength:
Exclude:
- 'spec/**/*'
## Instruction:
Add back in vendor ignore
## Code After:
inherit_from: .thoughtbot_rubocop.yml
AllCops:
Exclude:
- 'vendor/**/*'
Metrics/LineLength:
Max: 120
Documentation:
Enabled: false
Style/StringLiterals:
Description: Checks if uses of quotes match the configured preference.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
Enabled: true
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes
Metrics/BlockLength:
Exclude:
- 'spec/**/*' | inherit_from: .thoughtbot_rubocop.yml
+
+ AllCops:
+ Exclude:
+ - 'vendor/**/*'
Metrics/LineLength:
Max: 120
Documentation:
Enabled: false
Style/StringLiterals:
Description: Checks if uses of quotes match the configured preference.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-string-literals
Enabled: true
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes
Metrics/BlockLength:
Exclude:
- 'spec/**/*' | 4 | 0.2 | 4 | 0 |
14e9742d241339e568c9bf2ff27a6c2c5d176109 | android/src/xyz/igorgee/imagecreator3d/Model.java | android/src/xyz/igorgee/imagecreator3d/Model.java | package xyz.igorgee.imagecreator3d;
import java.io.File;
public class Model {
String name;
File location;
String modelID;
public Model(String name, File location) {
this.name = name;
this.location = location;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public File getLocation() {
return location;
}
public void setLocation(File location) {
this.location = location;
}
public String getModelID() {
return modelID;
}
public void setModelID(String modelID) {
this.modelID = modelID;
}
}
| package xyz.igorgee.imagecreator3d;
import java.io.File;
public class Model {
String name;
File location;
Integer modelID;
public Model(String name, File location) {
this.name = name;
this.location = location;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public File getLocation() {
return location;
}
public void setLocation(File location) {
this.location = location;
}
public Integer getModelID() {
return modelID;
}
public void setModelID(Integer modelID) {
this.modelID = modelID;
}
}
| Change modelId to type Integer | Change modelId to type Integer
| Java | mit | IgorGee/Carbonizr,IgorGee/3D-Image-Creator,IgorGee/PendantCreator3D | java | ## Code Before:
package xyz.igorgee.imagecreator3d;
import java.io.File;
public class Model {
String name;
File location;
String modelID;
public Model(String name, File location) {
this.name = name;
this.location = location;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public File getLocation() {
return location;
}
public void setLocation(File location) {
this.location = location;
}
public String getModelID() {
return modelID;
}
public void setModelID(String modelID) {
this.modelID = modelID;
}
}
## Instruction:
Change modelId to type Integer
## Code After:
package xyz.igorgee.imagecreator3d;
import java.io.File;
public class Model {
String name;
File location;
Integer modelID;
public Model(String name, File location) {
this.name = name;
this.location = location;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public File getLocation() {
return location;
}
public void setLocation(File location) {
this.location = location;
}
public Integer getModelID() {
return modelID;
}
public void setModelID(Integer modelID) {
this.modelID = modelID;
}
}
| package xyz.igorgee.imagecreator3d;
import java.io.File;
public class Model {
String name;
File location;
- String modelID;
? ^ ---
+ Integer modelID;
? ^^ +++
public Model(String name, File location) {
this.name = name;
this.location = location;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public File getLocation() {
return location;
}
public void setLocation(File location) {
this.location = location;
}
- public String getModelID() {
? ^ ---
+ public Integer getModelID() {
? ^^ +++
return modelID;
}
- public void setModelID(String modelID) {
? ^ ---
+ public void setModelID(Integer modelID) {
? ^^ +++
this.modelID = modelID;
}
} | 6 | 0.157895 | 3 | 3 |
b1a83c8d567bfa465f0fc2d505a9a253b2abee25 | lib/cucumber/broadcaster.rb | lib/cucumber/broadcaster.rb | class Broadcaster
def initialize(receivers = [])
@receivers = receivers
end
def register(receiver)
@receivers << receiver
end
def method_missing(method_name, *args)
@receivers.each do |receiver|
receiver.__send__(method_name, *args) if receiver.respond_to?(method_name)
end
end
end | module Cucumber
class Broadcaster
def initialize(receivers = [])
@receivers = receivers
end
def register(receiver)
@receivers << receiver
end
def method_missing(method_name, *args)
@receivers.each do |receiver|
receiver.__send__(method_name, *args) if receiver.respond_to?(method_name)
end
end
end
end
| Make Broadcaster live in Cucumber module | Make Broadcaster live in Cucumber module
| Ruby | mit | enkessler/cucumber-ruby,tom025/cucumber,shadow000902/cucumber-ruby,phoebeclarke/cucumber-ruby,jarib/cucumber,danascheider/cucumber-ruby,dg-ratiodata/cucumber-ruby,jarib/cucumber,sideci-sample/sideci-sample-cucumber,cucumber/cucumber-ruby,CW5000/CWFDerpy,sideci-sample/sideci-sample-cucumber,brasmusson/cucumber,shivashankar2020/mands,nfredrik/cucumber-ruby,cucumber/cucumber-ruby,dchelimsky/cucumber,jasonkarns/cucumber-ruby,brasmusson/cucumber,dg-ratiodata/cucumber-ruby,jarib/cucumber,tom025/cucumber,jasonkarns/cucumber-ruby,richarda/cucumber,nfredrik/cucumber-ruby,martinma4/cucumber-ruby,shivashankar2020/mands,martinma4/cucumber-ruby,tom025/cucumber,dg-ratiodata/cucumber-ruby,cucumber/cucumber-ruby,CW5000/CWFDerpy,enkessler/cucumber-ruby,shivashankar2020/mands,marxarelli/cucumber,shadow000902/cucumber-ruby,richarda/cucumber,enkessler/cucumber-ruby,twalpole/cucumber,twalpole/cucumber,jasonkarns/cucumber-ruby,phoebeclarke/cucumber-ruby,danascheider/cucumber-ruby,marxarelli/cucumber,dchelimsky/cucumber | ruby | ## Code Before:
class Broadcaster
def initialize(receivers = [])
@receivers = receivers
end
def register(receiver)
@receivers << receiver
end
def method_missing(method_name, *args)
@receivers.each do |receiver|
receiver.__send__(method_name, *args) if receiver.respond_to?(method_name)
end
end
end
## Instruction:
Make Broadcaster live in Cucumber module
## Code After:
module Cucumber
class Broadcaster
def initialize(receivers = [])
@receivers = receivers
end
def register(receiver)
@receivers << receiver
end
def method_missing(method_name, *args)
@receivers.each do |receiver|
receiver.__send__(method_name, *args) if receiver.respond_to?(method_name)
end
end
end
end
| + module Cucumber
- class Broadcaster
+ class Broadcaster
? ++
- def initialize(receivers = [])
+ def initialize(receivers = [])
? ++
- @receivers = receivers
+ @receivers = receivers
? ++
+ end
+
+ def register(receiver)
+ @receivers << receiver
+ end
+
+ def method_missing(method_name, *args)
+ @receivers.each do |receiver|
+ receiver.__send__(method_name, *args) if receiver.respond_to?(method_name)
+ end
+ end
+
end
-
- def register(receiver)
- @receivers << receiver
- end
-
- def method_missing(method_name, *args)
- @receivers.each do |receiver|
- receiver.__send__(method_name, *args) if receiver.respond_to?(method_name)
- end
- end
-
end | 30 | 1.764706 | 16 | 14 |
431b3cfc5e24604233287df2c4522c920026c7b1 | process.yml | process.yml | apps:
- script : ./index.js
name : 'frontend'
watch : true
ignore_watch:
- node_modules
watch_options:
usePolling: true
env_production:
NODE_ENV: development
| apps:
- script : ./index.js
name : 'frontend'
watch : true
ignore_watch:
- node_modules
- .fusebox
watch_options:
usePolling: true
env_production:
NODE_ENV: development
| Add ignore folder in pm2 config | Add ignore folder in pm2 config
| YAML | mit | Todolab/frontend,Todolab/frontend | yaml | ## Code Before:
apps:
- script : ./index.js
name : 'frontend'
watch : true
ignore_watch:
- node_modules
watch_options:
usePolling: true
env_production:
NODE_ENV: development
## Instruction:
Add ignore folder in pm2 config
## Code After:
apps:
- script : ./index.js
name : 'frontend'
watch : true
ignore_watch:
- node_modules
- .fusebox
watch_options:
usePolling: true
env_production:
NODE_ENV: development
| apps:
- script : ./index.js
name : 'frontend'
watch : true
ignore_watch:
- node_modules
+ - .fusebox
watch_options:
usePolling: true
env_production:
NODE_ENV: development | 1 | 0.1 | 1 | 0 |
ff172bf63ea0f292c0da7fc4c0597370862faabf | static/archive.css | static/archive.css | * {
font-family:sans-serif;
}
body {
text-align:center;
padding:1em;
}
.messages {
width:100%;
max-width:700px;
text-align:left;
display:inline-block;
}
.messages img {
background-color:rgb(248,244,240);
width:36px;
height:36px;
border-radius:0.2em;
display:inline-block;
vertical-align:top;
margin-right:0.65em;
}
.messages .time {
display:inline-block;
color:rgb(200,200,200);
margin-left:0.5em;
}
.messages .username {
display:inline-block;
font-weight:600;
line-height:1;
}
.messages .message {
display:inline-block;
vertical-align:top;
line-height:1;
width:calc(100% - 3em);
}
.messages .message .msg {
line-height:1.5;
}
| * {
font-family: sans-serif;
}
body {
text-align: center;
padding: 1em;
}
.messages {
width: 100%;
max-width: 700px;
text-align: left;
display: inline-block;
}
.messages img {
background-color: rgb(248, 244, 240);
width: 36px;
height: 36px;
border-radius: 0.2em;
display: inline-block;
vertical-align: top;
margin-right: 0.65em;
float: left;
}
.messages .time {
display: inline-block;
color: rgb(200, 200, 200);
margin-left: 0.5em;
}
.messages .username {
display: inline-block;
font-weight: 600;
line-height: 1;
}
.messages .message {
display: inline-block;
vertical-align: top;
line-height: 1;
width: calc(100% - 3em);
}
.messages .message .msg {
line-height: 1.5;
}
| Add float:left on img; reformat CSS | Add float:left on img; reformat CSS
| CSS | mit | hfaran/slack-export-viewer,hfaran/slack-export-viewer | css | ## Code Before:
* {
font-family:sans-serif;
}
body {
text-align:center;
padding:1em;
}
.messages {
width:100%;
max-width:700px;
text-align:left;
display:inline-block;
}
.messages img {
background-color:rgb(248,244,240);
width:36px;
height:36px;
border-radius:0.2em;
display:inline-block;
vertical-align:top;
margin-right:0.65em;
}
.messages .time {
display:inline-block;
color:rgb(200,200,200);
margin-left:0.5em;
}
.messages .username {
display:inline-block;
font-weight:600;
line-height:1;
}
.messages .message {
display:inline-block;
vertical-align:top;
line-height:1;
width:calc(100% - 3em);
}
.messages .message .msg {
line-height:1.5;
}
## Instruction:
Add float:left on img; reformat CSS
## Code After:
* {
font-family: sans-serif;
}
body {
text-align: center;
padding: 1em;
}
.messages {
width: 100%;
max-width: 700px;
text-align: left;
display: inline-block;
}
.messages img {
background-color: rgb(248, 244, 240);
width: 36px;
height: 36px;
border-radius: 0.2em;
display: inline-block;
vertical-align: top;
margin-right: 0.65em;
float: left;
}
.messages .time {
display: inline-block;
color: rgb(200, 200, 200);
margin-left: 0.5em;
}
.messages .username {
display: inline-block;
font-weight: 600;
line-height: 1;
}
.messages .message {
display: inline-block;
vertical-align: top;
line-height: 1;
width: calc(100% - 3em);
}
.messages .message .msg {
line-height: 1.5;
}
| * {
- font-family:sans-serif;
+ font-family: sans-serif;
? +
}
+
body {
- text-align:center;
+ text-align: center;
? +
- padding:1em;
+ padding: 1em;
? +
}
+
.messages {
- width:100%;
+ width: 100%;
? +
- max-width:700px;
+ max-width: 700px;
? +
- text-align:left;
+ text-align: left;
? +
- display:inline-block;
+ display: inline-block;
? +
}
+
.messages img {
- background-color:rgb(248,244,240);
+ background-color: rgb(248, 244, 240);
? + + +
- width:36px;
+ width: 36px;
? +
- height:36px;
+ height: 36px;
? +
- border-radius:0.2em;
+ border-radius: 0.2em;
? +
- display:inline-block;
+ display: inline-block;
? +
- vertical-align:top;
+ vertical-align: top;
? +
- margin-right:0.65em;
+ margin-right: 0.65em;
? +
+ float: left;
}
+
.messages .time {
- display:inline-block;
+ display: inline-block;
? +
- color:rgb(200,200,200);
+ color: rgb(200, 200, 200);
? + + +
- margin-left:0.5em;
+ margin-left: 0.5em;
? +
}
+
.messages .username {
- display:inline-block;
+ display: inline-block;
? +
- font-weight:600;
+ font-weight: 600;
? +
- line-height:1;
+ line-height: 1;
? +
}
+
.messages .message {
- display:inline-block;
+ display: inline-block;
? +
- vertical-align:top;
+ vertical-align: top;
? +
- line-height:1;
+ line-height: 1;
? +
- width:calc(100% - 3em);
+ width: calc(100% - 3em);
? +
}
+
.messages .message .msg {
- line-height:1.5;
+ line-height: 1.5;
? +
} | 58 | 1.414634 | 33 | 25 |
d92cef8c3292c59e6ff8640bf70328e55720b8fc | packages/tr/tree-sitter-ql.yaml | packages/tr/tree-sitter-ql.yaml | homepage: https://github.com/tree-sitter/haskell-tree-sitter/tree/master/tree-sitter-ql
changelog-type: markdown
hash: f04f1b0dd281071651f7ff443881ea71e34da384f0ed82b851707c7b7ad5f37d
test-bench-deps: {}
maintainer: rewinfrey@github.com
synopsis: Tree-sitter grammar/parser for QL
changelog: |
# v0.1.0.0
* add tree-sitter-ql parser
basic-deps:
base: ! '>=4.12 && <4.14'
tree-sitter: ^>=0.9.0.0
all-versions:
- 0.1.0.0
author: Max Brunsfeld, Tim Clem, Rob Rix, Josh Vera, Rick Winfrey, Ayman Nadeem, Patrick
Thomson
latest: 0.1.0.0
description-type: haddock
description: This package provides a parser for QL suitable for use with the tree-sitter
package.
license-name: BSD-3-Clause
| homepage: https://github.com/tree-sitter/haskell-tree-sitter/tree/master/tree-sitter-ql
changelog-type: markdown
hash: 3f02c7f87c192218498509b3360d60691e4ebf73d757746d2c8a0c379ad4e9d9
test-bench-deps: {}
maintainer: rewinfrey@github.com
synopsis: Tree-sitter grammar/parser for QL
changelog: |
# v0.1.0.1
* Bump tree-sitter-ql parser to use consistent test structure (test/corpus/*.txt)
# v0.1.0.0
* add tree-sitter-ql parser
basic-deps:
base: ! '>=4.12 && <4.14'
tree-sitter: ^>=0.9.0.0
all-versions:
- 0.1.0.0
- 0.1.0.1
author: Max Brunsfeld, Tim Clem, Rob Rix, Josh Vera, Rick Winfrey, Ayman Nadeem, Patrick
Thomson
latest: 0.1.0.1
description-type: haddock
description: This package provides a parser for QL suitable for use with the tree-sitter
package.
license-name: BSD-3-Clause
| Update from Hackage at 2020-03-05T01:46:28Z | Update from Hackage at 2020-03-05T01:46:28Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/tree-sitter/haskell-tree-sitter/tree/master/tree-sitter-ql
changelog-type: markdown
hash: f04f1b0dd281071651f7ff443881ea71e34da384f0ed82b851707c7b7ad5f37d
test-bench-deps: {}
maintainer: rewinfrey@github.com
synopsis: Tree-sitter grammar/parser for QL
changelog: |
# v0.1.0.0
* add tree-sitter-ql parser
basic-deps:
base: ! '>=4.12 && <4.14'
tree-sitter: ^>=0.9.0.0
all-versions:
- 0.1.0.0
author: Max Brunsfeld, Tim Clem, Rob Rix, Josh Vera, Rick Winfrey, Ayman Nadeem, Patrick
Thomson
latest: 0.1.0.0
description-type: haddock
description: This package provides a parser for QL suitable for use with the tree-sitter
package.
license-name: BSD-3-Clause
## Instruction:
Update from Hackage at 2020-03-05T01:46:28Z
## Code After:
homepage: https://github.com/tree-sitter/haskell-tree-sitter/tree/master/tree-sitter-ql
changelog-type: markdown
hash: 3f02c7f87c192218498509b3360d60691e4ebf73d757746d2c8a0c379ad4e9d9
test-bench-deps: {}
maintainer: rewinfrey@github.com
synopsis: Tree-sitter grammar/parser for QL
changelog: |
# v0.1.0.1
* Bump tree-sitter-ql parser to use consistent test structure (test/corpus/*.txt)
# v0.1.0.0
* add tree-sitter-ql parser
basic-deps:
base: ! '>=4.12 && <4.14'
tree-sitter: ^>=0.9.0.0
all-versions:
- 0.1.0.0
- 0.1.0.1
author: Max Brunsfeld, Tim Clem, Rob Rix, Josh Vera, Rick Winfrey, Ayman Nadeem, Patrick
Thomson
latest: 0.1.0.1
description-type: haddock
description: This package provides a parser for QL suitable for use with the tree-sitter
package.
license-name: BSD-3-Clause
| homepage: https://github.com/tree-sitter/haskell-tree-sitter/tree/master/tree-sitter-ql
changelog-type: markdown
- hash: f04f1b0dd281071651f7ff443881ea71e34da384f0ed82b851707c7b7ad5f37d
+ hash: 3f02c7f87c192218498509b3360d60691e4ebf73d757746d2c8a0c379ad4e9d9
test-bench-deps: {}
maintainer: rewinfrey@github.com
synopsis: Tree-sitter grammar/parser for QL
changelog: |
+ # v0.1.0.1
+
+ * Bump tree-sitter-ql parser to use consistent test structure (test/corpus/*.txt)
+
# v0.1.0.0
* add tree-sitter-ql parser
basic-deps:
base: ! '>=4.12 && <4.14'
tree-sitter: ^>=0.9.0.0
all-versions:
- 0.1.0.0
+ - 0.1.0.1
author: Max Brunsfeld, Tim Clem, Rob Rix, Josh Vera, Rick Winfrey, Ayman Nadeem, Patrick
Thomson
- latest: 0.1.0.0
? ^
+ latest: 0.1.0.1
? ^
description-type: haddock
description: This package provides a parser for QL suitable for use with the tree-sitter
package.
license-name: BSD-3-Clause | 9 | 0.409091 | 7 | 2 |
d9b2155a9cad33d744413c209a786c486422109a | src/components/speechBubble/Readme.md | src/components/speechBubble/Readme.md | In this example the _Planet_ has the mood <b>happy</b>. You can see the code and play with it. Try to change the mood to any other.
```
<SpeechBubble size={220} mood="happy" color="#83D1FB" />
```
| In this example the _SpeechBubble_ has the mood <b>happy</b>. You can see the code and play with it. Try to change the mood to any other.
```
<SpeechBubble size={220} mood="happy" color="#83D1FB" />
```
| Use the proper name of the documented component | Use the proper name of the documented component | Markdown | mit | miukimiu/react-kawaii | markdown | ## Code Before:
In this example the _Planet_ has the mood <b>happy</b>. You can see the code and play with it. Try to change the mood to any other.
```
<SpeechBubble size={220} mood="happy" color="#83D1FB" />
```
## Instruction:
Use the proper name of the documented component
## Code After:
In this example the _SpeechBubble_ has the mood <b>happy</b>. You can see the code and play with it. Try to change the mood to any other.
```
<SpeechBubble size={220} mood="happy" color="#83D1FB" />
```
| - In this example the _Planet_ has the mood <b>happy</b>. You can see the code and play with it. Try to change the mood to any other.
? ^ -- -
+ In this example the _SpeechBubble_ has the mood <b>happy</b>. You can see the code and play with it. Try to change the mood to any other.
? ^^^^^^^^^^
```
<SpeechBubble size={220} mood="happy" color="#83D1FB" />
``` | 2 | 0.4 | 1 | 1 |
ea3e149baf87380e295c2310043395705122e41c | Kwc/Basic/LinkTag/Intern/Component.js | Kwc/Basic/LinkTag/Intern/Component.js | Kwf.onContentReady(function linkTagIntern(el){
var links = $(el).find('a');
if(links && links.length) {
$.each(links, function(i, link){
if($(link).data('checkIntern')) return;
$(link).data('checkIntern', true);
var pos = $(link).attr('href') ? $(link).attr('href').indexOf('#') : null;
if (pos > 0 && $(link).attr('href').substr(0, 1) == '/') {
var target = $($(link).attr('href').substr(pos));
if (target && target.length) {
$(link).click(function(e){
e.preventDefault();
$('html, body').stop().animate({scrollTop: target.offset().top}, 500, function() {
window.location.hash = $(link).attr('href').substr(pos);
});
});
}
}
});
}
}, { defer: true });
| Kwf.onJElementReady('a', function anchorLinks(el) {
var pos = $(el).attr('href') ? $(el).attr('href').indexOf('#') : null;
if (pos > 0 && $(el).attr('href').substr(0, 1) == '/') {
var target = $($(el).attr('href').substr(pos));
if (target && target.length) {
$(el).click(function(e){
e.preventDefault();
$('html, body').stop().animate({scrollTop: target.offset().top}, 500, function() {
window.location.hash = $(el).attr('href').substr(pos);
});
});
}
}
}, {defer: true}); | Change anchorLink (smooth-scroll) function to onJElementReady - use the anchor tag directly | Change anchorLink (smooth-scroll) function to onJElementReady
- use the anchor tag directly
| JavaScript | bsd-2-clause | kaufmo/koala-framework,Ben-Ho/koala-framework,yacon/koala-framework,Sogl/koala-framework,koala-framework/koala-framework,Ben-Ho/koala-framework,nsams/koala-framework,Sogl/koala-framework,nsams/koala-framework,yacon/koala-framework,kaufmo/koala-framework,nsams/koala-framework,koala-framework/koala-framework,kaufmo/koala-framework,yacon/koala-framework | javascript | ## Code Before:
Kwf.onContentReady(function linkTagIntern(el){
var links = $(el).find('a');
if(links && links.length) {
$.each(links, function(i, link){
if($(link).data('checkIntern')) return;
$(link).data('checkIntern', true);
var pos = $(link).attr('href') ? $(link).attr('href').indexOf('#') : null;
if (pos > 0 && $(link).attr('href').substr(0, 1) == '/') {
var target = $($(link).attr('href').substr(pos));
if (target && target.length) {
$(link).click(function(e){
e.preventDefault();
$('html, body').stop().animate({scrollTop: target.offset().top}, 500, function() {
window.location.hash = $(link).attr('href').substr(pos);
});
});
}
}
});
}
}, { defer: true });
## Instruction:
Change anchorLink (smooth-scroll) function to onJElementReady
- use the anchor tag directly
## Code After:
Kwf.onJElementReady('a', function anchorLinks(el) {
var pos = $(el).attr('href') ? $(el).attr('href').indexOf('#') : null;
if (pos > 0 && $(el).attr('href').substr(0, 1) == '/') {
var target = $($(el).attr('href').substr(pos));
if (target && target.length) {
$(el).click(function(e){
e.preventDefault();
$('html, body').stop().animate({scrollTop: target.offset().top}, 500, function() {
window.location.hash = $(el).attr('href').substr(pos);
});
});
}
}
}, {defer: true}); | + Kwf.onJElementReady('a', function anchorLinks(el) {
- Kwf.onContentReady(function linkTagIntern(el){
- var links = $(el).find('a');
-
- if(links && links.length) {
- $.each(links, function(i, link){
- if($(link).data('checkIntern')) return;
- $(link).data('checkIntern', true);
- var pos = $(link).attr('href') ? $(link).attr('href').indexOf('#') : null;
? -------- --- ---
+ var pos = $(el).attr('href') ? $(el).attr('href').indexOf('#') : null;
? + +
- if (pos > 0 && $(link).attr('href').substr(0, 1) == '/') {
? -------- ---
+ if (pos > 0 && $(el).attr('href').substr(0, 1) == '/') {
? +
- var target = $($(link).attr('href').substr(pos));
? -------- ---
+ var target = $($(el).attr('href').substr(pos));
? +
- if (target && target.length) {
? --------
+ if (target && target.length) {
- $(link).click(function(e){
? -------- ---
+ $(el).click(function(e){
? +
- e.preventDefault();
? --------
+ e.preventDefault();
- $('html, body').stop().animate({scrollTop: target.offset().top}, 500, function() {
? --------
+ $('html, body').stop().animate({scrollTop: target.offset().top}, 500, function() {
- window.location.hash = $(link).attr('href').substr(pos);
? -------- ---
+ window.location.hash = $(el).attr('href').substr(pos);
? +
- });
- });
- }
+ });
? ++
- }
+ });
? ++
- });
? --
+ }
}
- }, { defer: true });
? - -
+ }, {defer: true}); | 34 | 1.545455 | 13 | 21 |
8da468fe19f966f2b7661d1729d39e617773b0b9 | Modules/Remote/SCIFIO.remote.cmake | Modules/Remote/SCIFIO.remote.cmake | itk_fetch_module(SCIFIO
"SCIFIO (Bioformats) ImageIO plugin for ITK"
GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
GIT_TAG 789c08071bbcd4341eba76fda10582a8d5fb7626
)
| itk_fetch_module(SCIFIO
"SCIFIO (Bioformats) ImageIO plugin for ITK"
GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
GIT_TAG 9346dbbf30b64645ebd9546fbf82f5438dc88a48
)
| Update SCIFIO for KWStyke failures | STYLE: Update SCIFIO for KWStyke failures
Change-Id: I59746f951013cd19fdff9b5aea6900d67f050253
| CMake | apache-2.0 | stnava/ITK,vfonov/ITK,vfonov/ITK,BlueBrain/ITK,jcfr/ITK,spinicist/ITK,jmerkow/ITK,spinicist/ITK,jmerkow/ITK,hjmjohnson/ITK,zachary-williamson/ITK,LucasGandel/ITK,biotrump/ITK,LucHermitte/ITK,PlutoniumHeart/ITK,BRAINSia/ITK,Kitware/ITK,spinicist/ITK,ajjl/ITK,InsightSoftwareConsortium/ITK,stnava/ITK,biotrump/ITK,Kitware/ITK,fbudin69500/ITK,vfonov/ITK,BRAINSia/ITK,ajjl/ITK,thewtex/ITK,BlueBrain/ITK,fbudin69500/ITK,atsnyder/ITK,spinicist/ITK,spinicist/ITK,InsightSoftwareConsortium/ITK,zachary-williamson/ITK,jmerkow/ITK,hjmjohnson/ITK,LucasGandel/ITK,blowekamp/ITK,fbudin69500/ITK,biotrump/ITK,spinicist/ITK,PlutoniumHeart/ITK,ajjl/ITK,stnava/ITK,fedral/ITK,msmolens/ITK,stnava/ITK,zachary-williamson/ITK,ajjl/ITK,jmerkow/ITK,vfonov/ITK,ajjl/ITK,richardbeare/ITK,fedral/ITK,stnava/ITK,thewtex/ITK,ajjl/ITK,BlueBrain/ITK,InsightSoftwareConsortium/ITK,fedral/ITK,malaterre/ITK,LucasGandel/ITK,thewtex/ITK,LucasGandel/ITK,fedral/ITK,InsightSoftwareConsortium/ITK,malaterre/ITK,jcfr/ITK,malaterre/ITK,hjmjohnson/ITK,zachary-williamson/ITK,spinicist/ITK,atsnyder/ITK,BlueBrain/ITK,atsnyder/ITK,blowekamp/ITK,jmerkow/ITK,atsnyder/ITK,fedral/ITK,BlueBrain/ITK,PlutoniumHeart/ITK,ajjl/ITK,thewtex/ITK,fbudin69500/ITK,jmerkow/ITK,PlutoniumHeart/ITK,InsightSoftwareConsortium/ITK,hjmjohnson/ITK,LucasGandel/ITK,richardbeare/ITK,LucasGandel/ITK,msmolens/ITK,blowekamp/ITK,richardbeare/ITK,malaterre/ITK,atsnyder/ITK,BlueBrain/ITK,vfonov/ITK,richardbeare/ITK,LucasGandel/ITK,jcfr/ITK,biotrump/ITK,jmerkow/ITK,PlutoniumHeart/ITK,fbudin69500/ITK,spinicist/ITK,LucHermitte/ITK,fedral/ITK,BRAINSia/ITK,hjmjohnson/ITK,BRAINSia/ITK,malaterre/ITK,richardbeare/ITK,blowekamp/ITK,Kitware/ITK,LucHermitte/ITK,stnava/ITK,zachary-williamson/ITK,Kitware/ITK,vfonov/ITK,biotrump/ITK,LucHermitte/ITK,jcfr/ITK,InsightSoftwareConsortium/ITK,fbudin69500/ITK,blowekamp/ITK,PlutoniumHeart/ITK,PlutoniumHeart/ITK,Kitware/ITK,msmolens/ITK,blowekamp/ITK,msmolens/ITK,Kitware/ITK,BRAINSia/ITK,LucHermitte/ITK,BlueBrain/ITK,PlutoniumHeart/ITK,LucasGandel/ITK,stnava/ITK,msmolens/ITK,thewtex/ITK,BRAINSia/ITK,biotrump/ITK,LucHermitte/ITK,spinicist/ITK,fbudin69500/ITK,fbudin69500/ITK,msmolens/ITK,vfonov/ITK,biotrump/ITK,vfonov/ITK,thewtex/ITK,InsightSoftwareConsortium/ITK,blowekamp/ITK,atsnyder/ITK,fedral/ITK,fedral/ITK,atsnyder/ITK,malaterre/ITK,biotrump/ITK,msmolens/ITK,BlueBrain/ITK,LucHermitte/ITK,zachary-williamson/ITK,jcfr/ITK,atsnyder/ITK,jcfr/ITK,zachary-williamson/ITK,richardbeare/ITK,malaterre/ITK,stnava/ITK,BRAINSia/ITK,msmolens/ITK,thewtex/ITK,jcfr/ITK,ajjl/ITK,malaterre/ITK,LucHermitte/ITK,hjmjohnson/ITK,zachary-williamson/ITK,richardbeare/ITK,Kitware/ITK,hjmjohnson/ITK,blowekamp/ITK,malaterre/ITK,jmerkow/ITK,atsnyder/ITK,zachary-williamson/ITK,jcfr/ITK,stnava/ITK,vfonov/ITK | cmake | ## Code Before:
itk_fetch_module(SCIFIO
"SCIFIO (Bioformats) ImageIO plugin for ITK"
GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
GIT_TAG 789c08071bbcd4341eba76fda10582a8d5fb7626
)
## Instruction:
STYLE: Update SCIFIO for KWStyke failures
Change-Id: I59746f951013cd19fdff9b5aea6900d67f050253
## Code After:
itk_fetch_module(SCIFIO
"SCIFIO (Bioformats) ImageIO plugin for ITK"
GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
GIT_TAG 9346dbbf30b64645ebd9546fbf82f5438dc88a48
)
| itk_fetch_module(SCIFIO
"SCIFIO (Bioformats) ImageIO plugin for ITK"
GIT_REPOSITORY https://github.com/scifio/scifio-imageio.git
- GIT_TAG 789c08071bbcd4341eba76fda10582a8d5fb7626
+ GIT_TAG 9346dbbf30b64645ebd9546fbf82f5438dc88a48
) | 2 | 0.4 | 1 | 1 |
a6045de7379bc7b393d3b4dfe766ea873a90e417 | app/assets/javascripts/marine.js | app/assets/javascripts/marine.js | //= require vue
//= require d3
//= require scrollmagic
//= require vue/charts/HorizontalBarChart
//= require vue/charts/interactive_multiline/TabTitle
//= require vue/charts/interactive_multiline/InteractiveMultiline
//= require vue/charts/Sunburst
//= require vue/charts/Treemap
//= require vue/components/Counter
//= require vue/components/horizontal_bars/HorizontalBar
//= require vue/components/horizontal_bars/HorizontalBars
//= require vue/components/InteractiveTreemap
//= require vue/components/rectangles/Rectangle
//= require vue/components/rectangles/Rectangles
//= require vue/components/StickyNav
//= require 'require'
//= require jquery
//= require 'map'
//= require modules/marine/base
//= require modules/maps/base | //= require vue
//= require d3
//= require scrollmagic
//= require vue/charts/HorizontalBarChart
//= require vue/charts/interactive_multiline/TabTitle
//= require vue/charts/interactive_multiline/InteractiveMultiline
//= require vue/charts/Sunburst
//= require vue/charts/Treemap
//= require vue/components/Counter
//= require vue/components/horizontal_bars/HorizontalBar
//= require vue/components/horizontal_bars/HorizontalBars
//= require vue/components/InteractiveTreemap
//= require vue/components/rectangles/Rectangle
//= require vue/components/rectangles/Rectangles
//= require vue/components/StickyNav
//= require 'require'
//= require jquery
//= require 'map'
//= require modules/marine/base
//= require modules/maps/base
//= require 'jquery.tablesorter.min'
//= require 'async-img.min'
//= require 'modules/ui_state'
//= require 'modules/search/autocompletion'
//= require 'modules/search/query_control'
//= require 'modules/dropdown'
//= require 'modules/navbar'
//= require 'modules/modal'
//= require 'modules/modals/download_generation_modal'
//= require 'modules/downloads/base'
//= require 'modules/protected_areas/factsheet_handler'
//= require 'modules/expandable_section'
//= require 'modules/dismissable'
//= require 'modules/resizable'
//= require_tree './modules/downloads/'
//= require common | Add back in js files that are required in the base.js file so that the main navigation works again | Add back in js files that are required in the base.js file so that the main navigation works again
| JavaScript | bsd-3-clause | unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet,unepwcmc/ProtectedPlanet | javascript | ## Code Before:
//= require vue
//= require d3
//= require scrollmagic
//= require vue/charts/HorizontalBarChart
//= require vue/charts/interactive_multiline/TabTitle
//= require vue/charts/interactive_multiline/InteractiveMultiline
//= require vue/charts/Sunburst
//= require vue/charts/Treemap
//= require vue/components/Counter
//= require vue/components/horizontal_bars/HorizontalBar
//= require vue/components/horizontal_bars/HorizontalBars
//= require vue/components/InteractiveTreemap
//= require vue/components/rectangles/Rectangle
//= require vue/components/rectangles/Rectangles
//= require vue/components/StickyNav
//= require 'require'
//= require jquery
//= require 'map'
//= require modules/marine/base
//= require modules/maps/base
## Instruction:
Add back in js files that are required in the base.js file so that the main navigation works again
## Code After:
//= require vue
//= require d3
//= require scrollmagic
//= require vue/charts/HorizontalBarChart
//= require vue/charts/interactive_multiline/TabTitle
//= require vue/charts/interactive_multiline/InteractiveMultiline
//= require vue/charts/Sunburst
//= require vue/charts/Treemap
//= require vue/components/Counter
//= require vue/components/horizontal_bars/HorizontalBar
//= require vue/components/horizontal_bars/HorizontalBars
//= require vue/components/InteractiveTreemap
//= require vue/components/rectangles/Rectangle
//= require vue/components/rectangles/Rectangles
//= require vue/components/StickyNav
//= require 'require'
//= require jquery
//= require 'map'
//= require modules/marine/base
//= require modules/maps/base
//= require 'jquery.tablesorter.min'
//= require 'async-img.min'
//= require 'modules/ui_state'
//= require 'modules/search/autocompletion'
//= require 'modules/search/query_control'
//= require 'modules/dropdown'
//= require 'modules/navbar'
//= require 'modules/modal'
//= require 'modules/modals/download_generation_modal'
//= require 'modules/downloads/base'
//= require 'modules/protected_areas/factsheet_handler'
//= require 'modules/expandable_section'
//= require 'modules/dismissable'
//= require 'modules/resizable'
//= require_tree './modules/downloads/'
//= require common | //= require vue
//= require d3
//= require scrollmagic
//= require vue/charts/HorizontalBarChart
//= require vue/charts/interactive_multiline/TabTitle
//= require vue/charts/interactive_multiline/InteractiveMultiline
//= require vue/charts/Sunburst
//= require vue/charts/Treemap
//= require vue/components/Counter
//= require vue/components/horizontal_bars/HorizontalBar
//= require vue/components/horizontal_bars/HorizontalBars
//= require vue/components/InteractiveTreemap
//= require vue/components/rectangles/Rectangle
//= require vue/components/rectangles/Rectangles
//= require vue/components/StickyNav
//= require 'require'
//= require jquery
//= require 'map'
//= require modules/marine/base
//= require modules/maps/base
+
+ //= require 'jquery.tablesorter.min'
+ //= require 'async-img.min'
+ //= require 'modules/ui_state'
+ //= require 'modules/search/autocompletion'
+ //= require 'modules/search/query_control'
+ //= require 'modules/dropdown'
+ //= require 'modules/navbar'
+ //= require 'modules/modal'
+ //= require 'modules/modals/download_generation_modal'
+ //= require 'modules/downloads/base'
+ //= require 'modules/protected_areas/factsheet_handler'
+ //= require 'modules/expandable_section'
+ //= require 'modules/dismissable'
+ //= require 'modules/resizable'
+ //= require_tree './modules/downloads/'
+ //= require common | 17 | 0.85 | 17 | 0 |
3fba9c9137c276e96cd1747e56d10a836c97f8bc | package.json | package.json | {
"name": "yafa",
"version": "1.0.0",
"description": "Library that allows creation of simple wrappers for fetch.",
"main": "index.js",
"scripts": {
"build": "babel src --presets babel-preset-es2015 --out-dir lib",
"test": "mocha \"src/**/*.spec.js\" --compilers js:babel-core/register",
"cover": "istanbul cover _mocha \"src/**/*.spec.js\" -- --require babel-register",
"coveralls": "cat ./coverage/lcov.info | coveralls"
},
"keywords": [
"fetch",
"wrapper",
"ajax"
],
"author": "benjamin cavy",
"license": "MIT",
"devDependencies": {
"babel-cli": "6.18.0",
"babel-core": "6.21.0",
"babel-preset-es2015": "6.18.0",
"chai": "3.5.0",
"coveralls": "2.11.15",
"eslint": "3.13.1",
"eslint-config-airbnb": "14.0.0",
"eslint-plugin-import": "2.2.0",
"istanbul": "1.1.0-alpha.1",
"mocha": "3.2.0",
"sinon": "1.17.7",
"sinon-chai": "2.8.0"
},
"dependencies": {}
}
| {
"name": "yafa",
"version": "1.0.0",
"description": "Library that allows creation of simple wrappers for fetch.",
"main": "index.js",
"scripts": {
"build": "babel src --presets babel-preset-es2015 --out-dir lib",
"test": "mocha \"src/**/*.spec.js\" --compilers js:babel-core/register",
"cover": "istanbul cover -x \"src/**/*.spec.js\" _mocha \"src/**/*.spec.js\" -- --require babel-register",
"coveralls": "cat ./coverage/lcov.info | coveralls"
},
"keywords": [
"fetch",
"wrapper",
"ajax"
],
"author": "benjamin cavy",
"license": "MIT",
"devDependencies": {
"babel-cli": "6.18.0",
"babel-core": "6.21.0",
"babel-preset-es2015": "6.18.0",
"chai": "3.5.0",
"coveralls": "2.11.15",
"eslint": "3.13.1",
"eslint-config-airbnb": "14.0.0",
"eslint-plugin-import": "2.2.0",
"istanbul": "1.1.0-alpha.1",
"mocha": "3.2.0",
"sinon": "1.17.7",
"sinon-chai": "2.8.0"
},
"dependencies": {}
}
| Exclude test file from coverage | Exclude test file from coverage
| JSON | mit | ptitFicus/YAFA | json | ## Code Before:
{
"name": "yafa",
"version": "1.0.0",
"description": "Library that allows creation of simple wrappers for fetch.",
"main": "index.js",
"scripts": {
"build": "babel src --presets babel-preset-es2015 --out-dir lib",
"test": "mocha \"src/**/*.spec.js\" --compilers js:babel-core/register",
"cover": "istanbul cover _mocha \"src/**/*.spec.js\" -- --require babel-register",
"coveralls": "cat ./coverage/lcov.info | coveralls"
},
"keywords": [
"fetch",
"wrapper",
"ajax"
],
"author": "benjamin cavy",
"license": "MIT",
"devDependencies": {
"babel-cli": "6.18.0",
"babel-core": "6.21.0",
"babel-preset-es2015": "6.18.0",
"chai": "3.5.0",
"coveralls": "2.11.15",
"eslint": "3.13.1",
"eslint-config-airbnb": "14.0.0",
"eslint-plugin-import": "2.2.0",
"istanbul": "1.1.0-alpha.1",
"mocha": "3.2.0",
"sinon": "1.17.7",
"sinon-chai": "2.8.0"
},
"dependencies": {}
}
## Instruction:
Exclude test file from coverage
## Code After:
{
"name": "yafa",
"version": "1.0.0",
"description": "Library that allows creation of simple wrappers for fetch.",
"main": "index.js",
"scripts": {
"build": "babel src --presets babel-preset-es2015 --out-dir lib",
"test": "mocha \"src/**/*.spec.js\" --compilers js:babel-core/register",
"cover": "istanbul cover -x \"src/**/*.spec.js\" _mocha \"src/**/*.spec.js\" -- --require babel-register",
"coveralls": "cat ./coverage/lcov.info | coveralls"
},
"keywords": [
"fetch",
"wrapper",
"ajax"
],
"author": "benjamin cavy",
"license": "MIT",
"devDependencies": {
"babel-cli": "6.18.0",
"babel-core": "6.21.0",
"babel-preset-es2015": "6.18.0",
"chai": "3.5.0",
"coveralls": "2.11.15",
"eslint": "3.13.1",
"eslint-config-airbnb": "14.0.0",
"eslint-plugin-import": "2.2.0",
"istanbul": "1.1.0-alpha.1",
"mocha": "3.2.0",
"sinon": "1.17.7",
"sinon-chai": "2.8.0"
},
"dependencies": {}
}
| {
"name": "yafa",
"version": "1.0.0",
"description": "Library that allows creation of simple wrappers for fetch.",
"main": "index.js",
"scripts": {
"build": "babel src --presets babel-preset-es2015 --out-dir lib",
"test": "mocha \"src/**/*.spec.js\" --compilers js:babel-core/register",
- "cover": "istanbul cover _mocha \"src/**/*.spec.js\" -- --require babel-register",
+ "cover": "istanbul cover -x \"src/**/*.spec.js\" _mocha \"src/**/*.spec.js\" -- --require babel-register",
? +++++++++++++++++++++++++
"coveralls": "cat ./coverage/lcov.info | coveralls"
},
"keywords": [
"fetch",
"wrapper",
"ajax"
],
"author": "benjamin cavy",
"license": "MIT",
"devDependencies": {
"babel-cli": "6.18.0",
"babel-core": "6.21.0",
"babel-preset-es2015": "6.18.0",
"chai": "3.5.0",
"coveralls": "2.11.15",
"eslint": "3.13.1",
"eslint-config-airbnb": "14.0.0",
"eslint-plugin-import": "2.2.0",
"istanbul": "1.1.0-alpha.1",
"mocha": "3.2.0",
"sinon": "1.17.7",
"sinon-chai": "2.8.0"
},
"dependencies": {}
} | 2 | 0.058824 | 1 | 1 |
30153a60470cc4095a63ba3036cf7b3bd4071615 | app/services/user/signup_service.rb | app/services/user/signup_service.rb | class User::SignupService
def initialize(resource, mailer = Mailers::WelcomeMessage)
@user = resource
@mailer = mailer
end
def create_account
account = @user.accounts.create()
@user.update(main_account: account.id)
send_welcome_email
account
end
private
def send_welcome_email
@mailer.perform @user
end
end
| class User::SignupService
def initialize(resource, mailer = Mailers::WelcomeMessage)
@user = resource
@mailer = mailer
end
def create_account
account_name = "Conta Privada - #{@user.name}"
account = @user.accounts.create(name: account_name, owner: @user.id)
@user.update(main_account: account.id)
send_welcome_email
account
end
private
def send_welcome_email
@mailer.perform @user
end
end
| Update service to add name and owner to new account | Update service to add name and owner to new account
| Ruby | mit | samuelreichert/projII,samuelreichert/projII,samuelreichert/projII | ruby | ## Code Before:
class User::SignupService
def initialize(resource, mailer = Mailers::WelcomeMessage)
@user = resource
@mailer = mailer
end
def create_account
account = @user.accounts.create()
@user.update(main_account: account.id)
send_welcome_email
account
end
private
def send_welcome_email
@mailer.perform @user
end
end
## Instruction:
Update service to add name and owner to new account
## Code After:
class User::SignupService
def initialize(resource, mailer = Mailers::WelcomeMessage)
@user = resource
@mailer = mailer
end
def create_account
account_name = "Conta Privada - #{@user.name}"
account = @user.accounts.create(name: account_name, owner: @user.id)
@user.update(main_account: account.id)
send_welcome_email
account
end
private
def send_welcome_email
@mailer.perform @user
end
end
| class User::SignupService
def initialize(resource, mailer = Mailers::WelcomeMessage)
@user = resource
@mailer = mailer
end
def create_account
- account = @user.accounts.create()
+ account_name = "Conta Privada - #{@user.name}"
+ account = @user.accounts.create(name: account_name, owner: @user.id)
@user.update(main_account: account.id)
send_welcome_email
account
end
private
def send_welcome_email
@mailer.perform @user
end
end | 3 | 0.15 | 2 | 1 |
3e8bf47a561d69b6f3319f4651db2edec8c68ba6 | _posts/2018-08-02-JS-Type-Var_Let_Const.md | _posts/2018-08-02-JS-Type-Var_Let_Const.md | ---
layout: post
title: " JavaScript :: 'var' vs 'let' vs 'const' "
categories: JavaScript
tags: JavaScript
author: goodGid
---
* content
{:toc}
date: 2018-08-02
excerpt: " 'var' vs 'let' vs 'const' "
cate : "post"
tag:
- JavaScript
---
{% capture images %}
/assets/img/posts/js_type_1.png
/assets/img/posts/js_type_2.png
/assets/img/posts/js_type_3.png
{% endcapture %}
{% include gallery images=images caption="Screenshots of Problem Explain" cols=3 %} | ---
layout: post
title: " 'var' vs 'let' vs 'const' "
categories: JavaScript
tags: JavaScript
author: goodGid
---
* content
{:toc}
# ToDo
* JS에 타입을 선언하는데 사용되는 **var**, **let**, **const** 의 차이를 알아보자.
---
# let과 var의 재선언
* let은 **재선언시** 에러가 발생한다.
* 하지만 var는 **재선언**을 하여도 에러가 발생하지 않는다.

---
# let의 선언과 할당
* let은 const와 다르게 선언과 할당이 **독립적**으로 이루어져도 된다.
* 또한 초기에 Number 타입을 할당 후 String 타입을 **재할당**하여도 할당이 된다.

---
# const의 선언과 할당
* const는 선언과 동시에 값 할당이 이루어져야한다.
* 또한 let과는 다르게 Number 타입 할당 후 String 타입을 재 할당을 하려고 할 때 에러가 발생한다.

| Update JS Post ' JS Type ' | Update JS Post ' JS Type '
| Markdown | mit | goodGid/goodGid.github.io,goodGid/goodGid.github.io,goodGid/goodGid.github.io | markdown | ## Code Before:
---
layout: post
title: " JavaScript :: 'var' vs 'let' vs 'const' "
categories: JavaScript
tags: JavaScript
author: goodGid
---
* content
{:toc}
date: 2018-08-02
excerpt: " 'var' vs 'let' vs 'const' "
cate : "post"
tag:
- JavaScript
---
{% capture images %}
/assets/img/posts/js_type_1.png
/assets/img/posts/js_type_2.png
/assets/img/posts/js_type_3.png
{% endcapture %}
{% include gallery images=images caption="Screenshots of Problem Explain" cols=3 %}
## Instruction:
Update JS Post ' JS Type '
## Code After:
---
layout: post
title: " 'var' vs 'let' vs 'const' "
categories: JavaScript
tags: JavaScript
author: goodGid
---
* content
{:toc}
# ToDo
* JS에 타입을 선언하는데 사용되는 **var**, **let**, **const** 의 차이를 알아보자.
---
# let과 var의 재선언
* let은 **재선언시** 에러가 발생한다.
* 하지만 var는 **재선언**을 하여도 에러가 발생하지 않는다.

---
# let의 선언과 할당
* let은 const와 다르게 선언과 할당이 **독립적**으로 이루어져도 된다.
* 또한 초기에 Number 타입을 할당 후 String 타입을 **재할당**하여도 할당이 된다.

---
# const의 선언과 할당
* const는 선언과 동시에 값 할당이 이루어져야한다.
* 또한 let과는 다르게 Number 타입 할당 후 String 타입을 재 할당을 하려고 할 때 에러가 발생한다.

| ---
layout: post
- title: " JavaScript :: 'var' vs 'let' vs 'const' "
? --------------
+ title: " 'var' vs 'let' vs 'const' "
categories: JavaScript
tags: JavaScript
author: goodGid
---
* content
{:toc}
- date: 2018-08-02
- excerpt: " 'var' vs 'let' vs 'const' "
- cate : "post"
- tag:
- - JavaScript
+ # ToDo
+
+ * JS에 타입을 선언하는데 사용되는 **var**, **let**, **const** 의 차이를 알아보자.
+
+
+
+
+
+
+
+
+
---
- {% capture images %}
- /assets/img/posts/js_type_1.png
- /assets/img/posts/js_type_2.png
- /assets/img/posts/js_type_3.png
- {% endcapture %}
- {% include gallery images=images caption="Screenshots of Problem Explain" cols=3 %}
+ # let과 var의 재선언
+
+ * let은 **재선언시** 에러가 발생한다.
+
+ * 하지만 var는 **재선언**을 하여도 에러가 발생하지 않는다.
+
+ 
+
+
+ ---
+
+ # let의 선언과 할당
+ * let은 const와 다르게 선언과 할당이 **독립적**으로 이루어져도 된다.
+
+ * 또한 초기에 Number 타입을 할당 후 String 타입을 **재할당**하여도 할당이 된다.
+
+ 
+
+
+
+ ---
+
+ # const의 선언과 할당
+
+ * const는 선언과 동시에 값 할당이 이루어져야한다.
+
+ * 또한 let과는 다르게 Number 타입 할당 후 String 타입을 재 할당을 하려고 할 때 에러가 발생한다.
+
+ 
+ | 55 | 2.291667 | 43 | 12 |
7b3f5debf66fdd4067f48fc1411264ad817bbe4f | app/stores/SignupStore.js | app/stores/SignupStore.js | import alt from '../alt';
import SignupActions from '../actions/SignupActions';
class SignupStore {
constructor() {
this.bindActions(SignupActions);
this.username = '';
this.password = '';
this.signupValidationState = '';
}
onSignupSuccess(successMessage) {
this.signupValidationState = 'has-success';
}
onAddLabelFail(errorMessage) {
this.signupValidationState = 'has-error';
}
onUpdateName(event) {
this.name = event.target.value;
this.signupValidationState = '';
}
onUpdateEmail(event) {
this.email = event.target.value;
this.signupValidationState = '';
}
onUpdateUsername(event) {
this.username = event.target.value;
this.signupValidationState = '';
}
onUpdatePassword(event) {
this.password = event.target.value;
this.signupValidationState = '';
}
onInvalidLabel() {
this.signupValidationState = 'has-error';
}
}
export default alt.createStore(SignupStore); | import alt from '../alt';
import SignupActions from '../actions/SignupActions';
class SignupStore {
constructor() {
this.bindActions(SignupActions);
this.username = '';
this.password = '';
this.signupValidationState = '';
}
onSignupSuccess(successMessage) {
this.signupValidationState = 'has-success';
}
onAddLabelFail(errorMessage) {
this.signupValidationState = 'has-error';
}
onUpdateUsername(event) {
this.username = event.target.value;
this.signupValidationState = '';
}
onUpdatePassword(event) {
this.password = event.target.value;
this.signupValidationState = '';
}
onInvalidLabel() {
this.signupValidationState = 'has-error';
}
}
export default alt.createStore(SignupStore); | Delete unused var and func | Delete unused var and func
| JavaScript | bsd-3-clause | ikafire/OpenObjectMarker,ikafire/OpenObjectMarker | javascript | ## Code Before:
import alt from '../alt';
import SignupActions from '../actions/SignupActions';
class SignupStore {
constructor() {
this.bindActions(SignupActions);
this.username = '';
this.password = '';
this.signupValidationState = '';
}
onSignupSuccess(successMessage) {
this.signupValidationState = 'has-success';
}
onAddLabelFail(errorMessage) {
this.signupValidationState = 'has-error';
}
onUpdateName(event) {
this.name = event.target.value;
this.signupValidationState = '';
}
onUpdateEmail(event) {
this.email = event.target.value;
this.signupValidationState = '';
}
onUpdateUsername(event) {
this.username = event.target.value;
this.signupValidationState = '';
}
onUpdatePassword(event) {
this.password = event.target.value;
this.signupValidationState = '';
}
onInvalidLabel() {
this.signupValidationState = 'has-error';
}
}
export default alt.createStore(SignupStore);
## Instruction:
Delete unused var and func
## Code After:
import alt from '../alt';
import SignupActions from '../actions/SignupActions';
class SignupStore {
constructor() {
this.bindActions(SignupActions);
this.username = '';
this.password = '';
this.signupValidationState = '';
}
onSignupSuccess(successMessage) {
this.signupValidationState = 'has-success';
}
onAddLabelFail(errorMessage) {
this.signupValidationState = 'has-error';
}
onUpdateUsername(event) {
this.username = event.target.value;
this.signupValidationState = '';
}
onUpdatePassword(event) {
this.password = event.target.value;
this.signupValidationState = '';
}
onInvalidLabel() {
this.signupValidationState = 'has-error';
}
}
export default alt.createStore(SignupStore); | import alt from '../alt';
import SignupActions from '../actions/SignupActions';
class SignupStore {
constructor() {
this.bindActions(SignupActions);
this.username = '';
this.password = '';
this.signupValidationState = '';
}
onSignupSuccess(successMessage) {
this.signupValidationState = 'has-success';
}
onAddLabelFail(errorMessage) {
this.signupValidationState = 'has-error';
}
-
- onUpdateName(event) {
- this.name = event.target.value;
- this.signupValidationState = '';
- }
-
- onUpdateEmail(event) {
- this.email = event.target.value;
- this.signupValidationState = '';
- }
onUpdateUsername(event) {
this.username = event.target.value;
this.signupValidationState = '';
}
onUpdatePassword(event) {
this.password = event.target.value;
this.signupValidationState = '';
}
onInvalidLabel() {
this.signupValidationState = 'has-error';
}
}
export default alt.createStore(SignupStore); | 10 | 0.222222 | 0 | 10 |
d6268f24a170cde40fdc8e1a1d537de54275e63c | scripts/dpkg.Dockerfile | scripts/dpkg.Dockerfile | ARG distro
ARG distrover
FROM $distro:$distrover
ARG distro
ARG distrover
RUN apt-get update
RUN apt-get install -y build-essential fakeroot debhelper git
RUN apt-get install -y python3-all python3-pip
RUN apt-get install -y ruby ruby-dev
RUN apt-get install -y python-all python-pip
RUN gem install fpm
RUN pip2 install virtualenv-tools
RUN pip3 install virtualenv
RUN virtualenv -p python3 /vdirsyncer/env/
COPY . /vdirsyncer/vdirsyncer/
WORKDIR /vdirsyncer/vdirsyncer/
RUN mkdir /vdirsyncer/pkgs/
RUN basename *.tar.gz .tar.gz | cut -d'-' -f2 | sed -e 's/\.dev/~/g' | tee version
RUN . /vdirsyncer/env/bin/activate; fpm -s virtualenv -t deb \
-n "vdirsyncer-latest" \
-v "$(cat version)" \
--prefix /opt/venvs/vdirsyncer-latest \
*.tar.gz
RUN mv /vdirsyncer/vdirsyncer/*.deb /vdirsyncer/pkgs/
WORKDIR /vdirsyncer/pkgs/
RUN dpkg -i *.deb
RUN LC_ALL=C.UTF-8 LANG=C.UTF-8 /opt/venvs/vdirsyncer-latest/bin/vdirsyncer --version
| ARG distro
ARG distrover
FROM $distro:$distrover
ARG distro
ARG distrover
RUN apt-get update
RUN apt-get install -y build-essential fakeroot debhelper git
RUN apt-get install -y python3-all python3-pip
RUN apt-get install -y ruby ruby-dev
RUN apt-get install -y python-all python-pip
RUN gem install fpm
RUN pip2 install virtualenv-tools
RUN pip3 install virtualenv
RUN virtualenv -p python3 /vdirsyncer/env/
COPY . /vdirsyncer/vdirsyncer/
WORKDIR /vdirsyncer/vdirsyncer/
RUN mkdir /vdirsyncer/pkgs/
RUN basename *.tar.gz .tar.gz | cut -d'-' -f2 | sed -e 's/\.dev/~/g' | tee version
RUN (echo -n *.tar.gz; echo '[google]') | tee requirements.txt
RUN . /vdirsyncer/env/bin/activate; fpm -s virtualenv -t deb \
-n "vdirsyncer-latest" \
-v "$(cat version)" \
--prefix /opt/venvs/vdirsyncer-latest \
requirements.txt
RUN mv /vdirsyncer/vdirsyncer/*.deb /vdirsyncer/pkgs/
WORKDIR /vdirsyncer/pkgs/
RUN dpkg -i *.deb
RUN LC_ALL=C.UTF-8 LANG=C.UTF-8 /opt/venvs/vdirsyncer-latest/bin/vdirsyncer --version
| Install google dependencies in debian pkgs | Install google dependencies in debian pkgs
| unknown | mit | untitaker/vdirsyncer,untitaker/vdirsyncer,untitaker/vdirsyncer | unknown | ## Code Before:
ARG distro
ARG distrover
FROM $distro:$distrover
ARG distro
ARG distrover
RUN apt-get update
RUN apt-get install -y build-essential fakeroot debhelper git
RUN apt-get install -y python3-all python3-pip
RUN apt-get install -y ruby ruby-dev
RUN apt-get install -y python-all python-pip
RUN gem install fpm
RUN pip2 install virtualenv-tools
RUN pip3 install virtualenv
RUN virtualenv -p python3 /vdirsyncer/env/
COPY . /vdirsyncer/vdirsyncer/
WORKDIR /vdirsyncer/vdirsyncer/
RUN mkdir /vdirsyncer/pkgs/
RUN basename *.tar.gz .tar.gz | cut -d'-' -f2 | sed -e 's/\.dev/~/g' | tee version
RUN . /vdirsyncer/env/bin/activate; fpm -s virtualenv -t deb \
-n "vdirsyncer-latest" \
-v "$(cat version)" \
--prefix /opt/venvs/vdirsyncer-latest \
*.tar.gz
RUN mv /vdirsyncer/vdirsyncer/*.deb /vdirsyncer/pkgs/
WORKDIR /vdirsyncer/pkgs/
RUN dpkg -i *.deb
RUN LC_ALL=C.UTF-8 LANG=C.UTF-8 /opt/venvs/vdirsyncer-latest/bin/vdirsyncer --version
## Instruction:
Install google dependencies in debian pkgs
## Code After:
ARG distro
ARG distrover
FROM $distro:$distrover
ARG distro
ARG distrover
RUN apt-get update
RUN apt-get install -y build-essential fakeroot debhelper git
RUN apt-get install -y python3-all python3-pip
RUN apt-get install -y ruby ruby-dev
RUN apt-get install -y python-all python-pip
RUN gem install fpm
RUN pip2 install virtualenv-tools
RUN pip3 install virtualenv
RUN virtualenv -p python3 /vdirsyncer/env/
COPY . /vdirsyncer/vdirsyncer/
WORKDIR /vdirsyncer/vdirsyncer/
RUN mkdir /vdirsyncer/pkgs/
RUN basename *.tar.gz .tar.gz | cut -d'-' -f2 | sed -e 's/\.dev/~/g' | tee version
RUN (echo -n *.tar.gz; echo '[google]') | tee requirements.txt
RUN . /vdirsyncer/env/bin/activate; fpm -s virtualenv -t deb \
-n "vdirsyncer-latest" \
-v "$(cat version)" \
--prefix /opt/venvs/vdirsyncer-latest \
requirements.txt
RUN mv /vdirsyncer/vdirsyncer/*.deb /vdirsyncer/pkgs/
WORKDIR /vdirsyncer/pkgs/
RUN dpkg -i *.deb
RUN LC_ALL=C.UTF-8 LANG=C.UTF-8 /opt/venvs/vdirsyncer-latest/bin/vdirsyncer --version
| ARG distro
ARG distrover
FROM $distro:$distrover
ARG distro
ARG distrover
RUN apt-get update
RUN apt-get install -y build-essential fakeroot debhelper git
RUN apt-get install -y python3-all python3-pip
RUN apt-get install -y ruby ruby-dev
RUN apt-get install -y python-all python-pip
RUN gem install fpm
RUN pip2 install virtualenv-tools
RUN pip3 install virtualenv
RUN virtualenv -p python3 /vdirsyncer/env/
COPY . /vdirsyncer/vdirsyncer/
WORKDIR /vdirsyncer/vdirsyncer/
RUN mkdir /vdirsyncer/pkgs/
RUN basename *.tar.gz .tar.gz | cut -d'-' -f2 | sed -e 's/\.dev/~/g' | tee version
+ RUN (echo -n *.tar.gz; echo '[google]') | tee requirements.txt
RUN . /vdirsyncer/env/bin/activate; fpm -s virtualenv -t deb \
-n "vdirsyncer-latest" \
-v "$(cat version)" \
--prefix /opt/venvs/vdirsyncer-latest \
- *.tar.gz
+ requirements.txt
RUN mv /vdirsyncer/vdirsyncer/*.deb /vdirsyncer/pkgs/
WORKDIR /vdirsyncer/pkgs/
RUN dpkg -i *.deb
RUN LC_ALL=C.UTF-8 LANG=C.UTF-8 /opt/venvs/vdirsyncer-latest/bin/vdirsyncer --version | 3 | 0.083333 | 2 | 1 |
42c8578b6ef34e64de920eb0f949f67bd25154e5 | cookbooks/nelhage/recipes/money.rb | cookbooks/nelhage/recipes/money.rb | package "nodejs" do
action [ :install, :upgrade ]
end
package "nodejs-legacy" do
action [ :install, :upgrade ]
end
daemontools_service "money-srv" do
directory "/etc/sv/money-srv"
template 'money-srv'
action [ :enable, :start ]
log true
end
| include_recipe "nodejs"
daemontools_service "money-srv" do
directory "/etc/sv/money-srv"
template 'money-srv'
action [ :enable, :start ]
log true
end
| Install node using the nodejs cookbook. | Install node using the nodejs cookbook.
| Ruby | apache-2.0 | nelhage/chef-config-nelhage,nelhage/chef-config-nelhage,nelhage/chef-config-nelhage,nelhage/chef-config-nelhage | ruby | ## Code Before:
package "nodejs" do
action [ :install, :upgrade ]
end
package "nodejs-legacy" do
action [ :install, :upgrade ]
end
daemontools_service "money-srv" do
directory "/etc/sv/money-srv"
template 'money-srv'
action [ :enable, :start ]
log true
end
## Instruction:
Install node using the nodejs cookbook.
## Code After:
include_recipe "nodejs"
daemontools_service "money-srv" do
directory "/etc/sv/money-srv"
template 'money-srv'
action [ :enable, :start ]
log true
end
| + include_recipe "nodejs"
- package "nodejs" do
- action [ :install, :upgrade ]
- end
-
- package "nodejs-legacy" do
- action [ :install, :upgrade ]
- end
daemontools_service "money-srv" do
directory "/etc/sv/money-srv"
template 'money-srv'
action [ :enable, :start ]
log true
end | 8 | 0.571429 | 1 | 7 |
f88b61159d72e79baff2c0b559a2af2bef1ddb0f | .travis.yml | .travis.yml | language: perl
perl:
- "5.14"
before_install:
- sudo apt-get update
- sudo apt-get install build-essential libpng-dev zlib1g-dev libgd2-xpm-dev
- sudo apt-get install libdb-dev
- cpanm --self-contained -l extlib/ PerlIO::gzip
- cpanm --self-contained -l extlib/ GD::Image
- cpanm --self-contained -l extlib/ DBI DB_File Data::Stag
- cpanm --self-contained -l extlib/ URI::Escape
- ./setup.sh
- ls -l /home/travis/build/cmdcolin/jbrowse/extlib/lib/perl5
script:
- prove -I src/perl5 -r tests/perl_tests
after_failure: cat /home/travis/.cpanm/work/*/build.log
| language: perl
perl:
- "5.14"
before_install:
- sudo apt-get update
- sudo apt-get install build-essential libpng-dev zlib1g-dev libgd2-xpm-dev
- sudo apt-get install libdb-dev
- wget https://github.com/bioperl/bioperl-live/archive/release-1-6-922.zip
- unzip bioperl-live-release-1-6-922.zip -d bioperl
- cd bioperl
- perl Build.PL
- ./Build
- sudo ./Build install
- cpanm --self-contained -l extlib/ PerlIO::gzip
- cpanm --self-contained -l extlib/ GD::Image
- cpanm --self-contained -l extlib/ DBI DB_File Data::Stag
- cpanm --self-contained -l extlib/ URI::Escape
- ./setup.sh
- ls -l /home/travis/build/cmdcolin/jbrowse/extlib/lib/perl5
script:
- prove -I src/perl5 -r tests/perl_tests
after_failure: cat /home/travis/.cpanm/work/*/build.log
| Add bioperl old version for test validation | Add bioperl old version for test validation
| YAML | lgpl-2.1 | limeng12/jbrowse,erasche/jbrowse,limeng12/jbrowse,nathandunn/jbrowse,GMOD/jbrowse,GMOD/jbrowse,erasche/jbrowse,nathandunn/jbrowse,nathandunn/jbrowse,limeng12/jbrowse,erasche/jbrowse,erasche/jbrowse,limeng12/jbrowse,Arabidopsis-Information-Portal/jbrowse,GMOD/jbrowse,erasche/jbrowse,Arabidopsis-Information-Portal/jbrowse,Arabidopsis-Information-Portal/jbrowse,nathandunn/jbrowse,erasche/jbrowse,Arabidopsis-Information-Portal/jbrowse,limeng12/jbrowse,erasche/jbrowse,Arabidopsis-Information-Portal/jbrowse,nathandunn/jbrowse,Arabidopsis-Information-Portal/jbrowse,erasche/jbrowse,Arabidopsis-Information-Portal/jbrowse,GMOD/jbrowse,limeng12/jbrowse,limeng12/jbrowse,GMOD/jbrowse,limeng12/jbrowse | yaml | ## Code Before:
language: perl
perl:
- "5.14"
before_install:
- sudo apt-get update
- sudo apt-get install build-essential libpng-dev zlib1g-dev libgd2-xpm-dev
- sudo apt-get install libdb-dev
- cpanm --self-contained -l extlib/ PerlIO::gzip
- cpanm --self-contained -l extlib/ GD::Image
- cpanm --self-contained -l extlib/ DBI DB_File Data::Stag
- cpanm --self-contained -l extlib/ URI::Escape
- ./setup.sh
- ls -l /home/travis/build/cmdcolin/jbrowse/extlib/lib/perl5
script:
- prove -I src/perl5 -r tests/perl_tests
after_failure: cat /home/travis/.cpanm/work/*/build.log
## Instruction:
Add bioperl old version for test validation
## Code After:
language: perl
perl:
- "5.14"
before_install:
- sudo apt-get update
- sudo apt-get install build-essential libpng-dev zlib1g-dev libgd2-xpm-dev
- sudo apt-get install libdb-dev
- wget https://github.com/bioperl/bioperl-live/archive/release-1-6-922.zip
- unzip bioperl-live-release-1-6-922.zip -d bioperl
- cd bioperl
- perl Build.PL
- ./Build
- sudo ./Build install
- cpanm --self-contained -l extlib/ PerlIO::gzip
- cpanm --self-contained -l extlib/ GD::Image
- cpanm --self-contained -l extlib/ DBI DB_File Data::Stag
- cpanm --self-contained -l extlib/ URI::Escape
- ./setup.sh
- ls -l /home/travis/build/cmdcolin/jbrowse/extlib/lib/perl5
script:
- prove -I src/perl5 -r tests/perl_tests
after_failure: cat /home/travis/.cpanm/work/*/build.log
| language: perl
perl:
- "5.14"
before_install:
- sudo apt-get update
- sudo apt-get install build-essential libpng-dev zlib1g-dev libgd2-xpm-dev
- sudo apt-get install libdb-dev
+ - wget https://github.com/bioperl/bioperl-live/archive/release-1-6-922.zip
+ - unzip bioperl-live-release-1-6-922.zip -d bioperl
+ - cd bioperl
+ - perl Build.PL
+ - ./Build
+ - sudo ./Build install
- cpanm --self-contained -l extlib/ PerlIO::gzip
- cpanm --self-contained -l extlib/ GD::Image
- cpanm --self-contained -l extlib/ DBI DB_File Data::Stag
- cpanm --self-contained -l extlib/ URI::Escape
- ./setup.sh
- ls -l /home/travis/build/cmdcolin/jbrowse/extlib/lib/perl5
script:
- prove -I src/perl5 -r tests/perl_tests
after_failure: cat /home/travis/.cpanm/work/*/build.log | 6 | 0.315789 | 6 | 0 |
94030652aa8efe2f13cf6f9be8ece34778f2a6cc | scss/core/_code.scss | scss/core/_code.scss | // Inline and block code styles
code,
kbd,
pre,
samp {
font-family: $font-family-monospace;
}
// Inline code
code {
padding: $code-padding-y $code-padding-x;
font-size: $code-font-size;
color: $code-color;
background-color: $code-bg;
@include border-radius($border-radius);
}
// User input typically entered via keyboard
kbd {
padding: $code-padding-y $code-padding-x;
font-size: $code-font-size;
color: $kbd-color;
background-color: $kbd-bg;
@include border-radius($kbd-border-radius);
@include box-shadow($kbd-box-shadow);
kbd {
padding: 0;
font-size: 100%;
font-weight: $kbd-nested-font-weight;
@include box-shadow(none);
}
}
// Blocks of code
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
font-size: $code-font-size;
color: $pre-color;
// Account for some code outputs that place code tags in pre tags
code {
padding: 0;
font-size: inherit;
color: inherit;
background-color: transparent;
border-radius: 0;
}
}
| // Inline and block code styles
code,
kbd,
pre,
samp {
font-family: $font-family-monospace;
}
// Inline code
code {
padding: $code-padding-y $code-padding-x;
font-size: $code-font-size;
color: $code-color;
background-color: $code-bg;
@include border-radius($border-radius);
}
// User input typically entered via keyboard
kbd {
padding: $code-padding-y $code-padding-x;
font-size: $code-font-size;
color: $kbd-color;
background-color: $kbd-bg;
@include border-radius($kbd-border-radius);
@include box-shadow($kbd-box-shadow);
kbd {
padding: 0;
font-size: 100%;
font-weight: $kbd-nested-font-weight;
@include box-shadow(none);
}
}
// Blocks of code
pre {
display: block;
font-size: $code-font-size;
color: $pre-color;
// Account for some code outputs that place code tags in pre tags
code {
padding: 0;
font-size: inherit;
color: inherit;
background-color: transparent;
border-radius: 0;
}
}
| Remove duplicated margin rues from pre since it's already set in reboot | Remove duplicated margin rues from pre since it's already set in reboot
| SCSS | mit | cast-org/figuration,cast-org/figuration | scss | ## Code Before:
// Inline and block code styles
code,
kbd,
pre,
samp {
font-family: $font-family-monospace;
}
// Inline code
code {
padding: $code-padding-y $code-padding-x;
font-size: $code-font-size;
color: $code-color;
background-color: $code-bg;
@include border-radius($border-radius);
}
// User input typically entered via keyboard
kbd {
padding: $code-padding-y $code-padding-x;
font-size: $code-font-size;
color: $kbd-color;
background-color: $kbd-bg;
@include border-radius($kbd-border-radius);
@include box-shadow($kbd-box-shadow);
kbd {
padding: 0;
font-size: 100%;
font-weight: $kbd-nested-font-weight;
@include box-shadow(none);
}
}
// Blocks of code
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
font-size: $code-font-size;
color: $pre-color;
// Account for some code outputs that place code tags in pre tags
code {
padding: 0;
font-size: inherit;
color: inherit;
background-color: transparent;
border-radius: 0;
}
}
## Instruction:
Remove duplicated margin rues from pre since it's already set in reboot
## Code After:
// Inline and block code styles
code,
kbd,
pre,
samp {
font-family: $font-family-monospace;
}
// Inline code
code {
padding: $code-padding-y $code-padding-x;
font-size: $code-font-size;
color: $code-color;
background-color: $code-bg;
@include border-radius($border-radius);
}
// User input typically entered via keyboard
kbd {
padding: $code-padding-y $code-padding-x;
font-size: $code-font-size;
color: $kbd-color;
background-color: $kbd-bg;
@include border-radius($kbd-border-radius);
@include box-shadow($kbd-box-shadow);
kbd {
padding: 0;
font-size: 100%;
font-weight: $kbd-nested-font-weight;
@include box-shadow(none);
}
}
// Blocks of code
pre {
display: block;
font-size: $code-font-size;
color: $pre-color;
// Account for some code outputs that place code tags in pre tags
code {
padding: 0;
font-size: inherit;
color: inherit;
background-color: transparent;
border-radius: 0;
}
}
| // Inline and block code styles
code,
kbd,
pre,
samp {
font-family: $font-family-monospace;
}
// Inline code
code {
padding: $code-padding-y $code-padding-x;
font-size: $code-font-size;
color: $code-color;
background-color: $code-bg;
@include border-radius($border-radius);
}
// User input typically entered via keyboard
kbd {
padding: $code-padding-y $code-padding-x;
font-size: $code-font-size;
color: $kbd-color;
background-color: $kbd-bg;
@include border-radius($kbd-border-radius);
@include box-shadow($kbd-box-shadow);
kbd {
padding: 0;
font-size: 100%;
font-weight: $kbd-nested-font-weight;
@include box-shadow(none);
}
}
// Blocks of code
pre {
display: block;
- margin-top: 0;
- margin-bottom: 1rem;
font-size: $code-font-size;
color: $pre-color;
// Account for some code outputs that place code tags in pre tags
code {
padding: 0;
font-size: inherit;
color: inherit;
background-color: transparent;
border-radius: 0;
}
} | 2 | 0.039216 | 0 | 2 |
f0d77dc0494b834ded9fc73439ef9b6c957e2f41 | app/views/layouts/_header.html.erb | app/views/layouts/_header.html.erb | <nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1><%= link_to "Can I Afford This?", root_path %></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section">
<ul class="right">
<% if logged_in? %>
<li class="active"><%= link_to "My Profile", profile_path(session[:user_id]) %></li>
<li><%= link_to "Planned Purchases", userpurchases_path(session[:user_id]) %></li>
<li><%= link_to "Comparison", expensesheet_path(current_user) %></li>
<li><%= link_to "Logout", logout_path, method: :delete %></li>
<% else %>
<li><%= link_to "Login", '/login', "data-reveal-id" => "firstModal" %></li>
<li><%= link_to "Sign up", new_user_path, "data-reveal-id" => "secondModal" %></li>
<% end %>
</ul>
</section>
</nav>
<%= render "layouts/modal" %> | <nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1><%= link_to "Can I Afford This?", root_path %></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section">
<ul class="right">
<% if logged_in? %>
<li class="active"><%= link_to "My Profile", profile_path(session[:user_id]) %></li>
<li><%= link_to "Planned Purchases", userpurchases_path(session[:user_id]) %></li>
<li><%= link_to "Comparison", expensesheet_path(session[:user_id]) %></li>
<li><%= link_to "Logout", logout_path, method: :delete %></li>
<% else %>
<li><%= link_to "Login", '/login', "data-reveal-id" => "firstModal" %></li>
<li><%= link_to "Sign up", new_user_path, "data-reveal-id" => "secondModal" %></li>
<% end %>
</ul>
</section>
</nav>
<%= render "layouts/modal" %> | Change id call for route | Change id call for route
| HTML+ERB | mit | nyc-cicadas-2015/Can-I-Afford-This,nyc-cicadas-2015/Can-I-Afford-This,nyc-cicadas-2015/Can-I-Afford-This | html+erb | ## Code Before:
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1><%= link_to "Can I Afford This?", root_path %></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section">
<ul class="right">
<% if logged_in? %>
<li class="active"><%= link_to "My Profile", profile_path(session[:user_id]) %></li>
<li><%= link_to "Planned Purchases", userpurchases_path(session[:user_id]) %></li>
<li><%= link_to "Comparison", expensesheet_path(current_user) %></li>
<li><%= link_to "Logout", logout_path, method: :delete %></li>
<% else %>
<li><%= link_to "Login", '/login', "data-reveal-id" => "firstModal" %></li>
<li><%= link_to "Sign up", new_user_path, "data-reveal-id" => "secondModal" %></li>
<% end %>
</ul>
</section>
</nav>
<%= render "layouts/modal" %>
## Instruction:
Change id call for route
## Code After:
<nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1><%= link_to "Can I Afford This?", root_path %></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section">
<ul class="right">
<% if logged_in? %>
<li class="active"><%= link_to "My Profile", profile_path(session[:user_id]) %></li>
<li><%= link_to "Planned Purchases", userpurchases_path(session[:user_id]) %></li>
<li><%= link_to "Comparison", expensesheet_path(session[:user_id]) %></li>
<li><%= link_to "Logout", logout_path, method: :delete %></li>
<% else %>
<li><%= link_to "Login", '/login', "data-reveal-id" => "firstModal" %></li>
<li><%= link_to "Sign up", new_user_path, "data-reveal-id" => "secondModal" %></li>
<% end %>
</ul>
</section>
</nav>
<%= render "layouts/modal" %> | <nav class="top-bar" data-topbar role="navigation">
<ul class="title-area">
<li class="name">
<h1><%= link_to "Can I Afford This?", root_path %></h1>
</li>
<li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
</ul>
<section class="top-bar-section">
<ul class="right">
<% if logged_in? %>
<li class="active"><%= link_to "My Profile", profile_path(session[:user_id]) %></li>
<li><%= link_to "Planned Purchases", userpurchases_path(session[:user_id]) %></li>
- <li><%= link_to "Comparison", expensesheet_path(current_user) %></li>
? ^^^^ ^^
+ <li><%= link_to "Comparison", expensesheet_path(session[:user_id]) %></li>
? ^ ++++ ^^ ++++
<li><%= link_to "Logout", logout_path, method: :delete %></li>
<% else %>
<li><%= link_to "Login", '/login', "data-reveal-id" => "firstModal" %></li>
<li><%= link_to "Sign up", new_user_path, "data-reveal-id" => "secondModal" %></li>
<% end %>
</ul>
</section>
</nav>
<%= render "layouts/modal" %> | 2 | 0.083333 | 1 | 1 |
0612b1029ddbbcf60a426a48501b6ab7d9c08ce6 | app/src/main/java/ca/antonious/habittracker/EditTextFragment.java | app/src/main/java/ca/antonious/habittracker/EditTextFragment.java | package ca.antonious.habittracker;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.widget.EditText;
/**
* Created by George on 2016-09-03.
*/
public class EditTextFragment extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
super.onCreateDialog(savedInstanceState);
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());
alertDialogBuilder.setTitle("Name");
alertDialogBuilder.setView(new EditText(getActivity()));
alertDialogBuilder.setPositiveButton("ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
return alertDialogBuilder.show();
}
}
| package ca.antonious.habittracker;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.widget.EditText;
/**
* Created by George on 2016-09-03.
*/
public class EditTextFragment extends DialogFragment {
private EditText editText;
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
super.onCreateDialog(savedInstanceState);
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());
alertDialogBuilder.setTitle("Name")
.setView(new EditText(getActivity()))
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
})
.setPositiveButton("Set", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
return alertDialogBuilder.show();
}
private EditText ensureEditText() {
if (editText == null) {
editText = new EditText(getActivity());
}
return editText;
}
}
| Change alert dialog import so it uses theme | Change alert dialog import so it uses theme
| Java | mit | gantonious/as1 | java | ## Code Before:
package ca.antonious.habittracker;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.widget.EditText;
/**
* Created by George on 2016-09-03.
*/
public class EditTextFragment extends DialogFragment {
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
super.onCreateDialog(savedInstanceState);
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());
alertDialogBuilder.setTitle("Name");
alertDialogBuilder.setView(new EditText(getActivity()));
alertDialogBuilder.setPositiveButton("ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
return alertDialogBuilder.show();
}
}
## Instruction:
Change alert dialog import so it uses theme
## Code After:
package ca.antonious.habittracker;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
import android.widget.EditText;
/**
* Created by George on 2016-09-03.
*/
public class EditTextFragment extends DialogFragment {
private EditText editText;
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
super.onCreateDialog(savedInstanceState);
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());
alertDialogBuilder.setTitle("Name")
.setView(new EditText(getActivity()))
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
})
.setPositiveButton("Set", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
return alertDialogBuilder.show();
}
private EditText ensureEditText() {
if (editText == null) {
editText = new EditText(getActivity());
}
return editText;
}
}
| package ca.antonious.habittracker;
+ import android.app.AlertDialog;
import android.app.Dialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.v4.app.DialogFragment;
- import android.support.v7.app.AlertDialog;
import android.widget.EditText;
/**
* Created by George on 2016-09-03.
*/
public class EditTextFragment extends DialogFragment {
+ private EditText editText;
+
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
super.onCreateDialog(savedInstanceState);
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getActivity());
- alertDialogBuilder.setTitle("Name");
- alertDialogBuilder.setView(new EditText(getActivity()));
- alertDialogBuilder.setPositiveButton("ok", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface dialog, int which) {
- }
- });
+ alertDialogBuilder.setTitle("Name")
+ .setView(new EditText(getActivity()))
+ .setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+
+ }
+ })
+ .setPositiveButton("Set", new DialogInterface.OnClickListener() {
+ @Override
+ public void onClick(DialogInterface dialog, int which) {
+
+ }
+ });
return alertDialogBuilder.show();
}
+ private EditText ensureEditText() {
+ if (editText == null) {
+ editText = new EditText(getActivity());
+ }
+ return editText;
+ }
+
} | 32 | 1 | 24 | 8 |
32dc5cc38938c783d2619619fb01b95885b64be9 | roles/contiv/tasks/pkgMgrInstallers/centos-install.yml | roles/contiv/tasks/pkgMgrInstallers/centos-install.yml | ---
- name: PkgMgr RHEL/CentOS | Install net-tools pkg for route
yum:
pkg=net-tools
state=latest
- name: PkgMgr RHEL/CentOS | Get openstack ocata rpm
get_url:
url: https://repos.fedorapeople.org/repos/openstack/openstack-ocata/rdo-release-ocata-2.noarch.rpm
dest: /tmp/rdo-release-ocata-2.noarch.rpm
validate_certs: False
environment:
http_proxy: "{{ http_proxy|default('') }}"
https_proxy: "{{ https_proxy|default('') }}"
no_proxy: "{{ no_proxy|default('') }}"
tags:
- ovs_install
- name: PkgMgr RHEL/CentOS | Install openstack ocata rpm
yum: name=/tmp/rdo-release-ocata-2.noarch.rpm state=present
tags:
- ovs_install
- name: PkgMgr RHEL/CentOS | Install ovs
yum:
pkg=openvswitch-2.5.0-2.el7.x86_64
state=present
environment:
http_proxy: "{{ http_proxy|default('') }}"
https_proxy: "{{ https_proxy|default('') }}"
no_proxy: "{{ no_proxy|default('') }}"
tags:
- ovs_install
| ---
- name: PkgMgr RHEL/CentOS | Install net-tools pkg for route
yum:
pkg=net-tools
state=latest
- name: PkgMgr RHEL/CentOS | Get openstack ocata rpm
get_url:
url: https://repos.fedorapeople.org/repos/openstack/openstack-ocata/rdo-release-ocata-2.noarch.rpm
dest: /tmp/rdo-release-ocata-2.noarch.rpm
validate_certs: False
environment:
http_proxy: "{{ http_proxy|default('') }}"
https_proxy: "{{ https_proxy|default('') }}"
no_proxy: "{{ no_proxy|default('') }}"
tags:
- ovs_install
- name: PkgMgr RHEL/CentOS | Install openstack ocata rpm
yum: name=/tmp/rdo-release-ocata-2.noarch.rpm state=present
tags:
- ovs_install
- name: PkgMgr RHEL/CentOS | Install ovs
yum:
pkg=openvswitch
state=present
environment:
http_proxy: "{{ http_proxy|default('') }}"
https_proxy: "{{ https_proxy|default('') }}"
no_proxy: "{{ no_proxy|default('') }}"
tags:
- ovs_install
| Remove version requirement from openvswitch package, since listed version got removed from repo | Remove version requirement from openvswitch package, since listed version got removed from repo
| YAML | apache-2.0 | ewolinetz/openshift-ansible,rjhowe/openshift-ansible,sdodson/openshift-ansible,maxamillion/openshift-ansible,miminar/openshift-ansible,markllama/openshift-ansible,abutcher/openshift-ansible,miminar/openshift-ansible,akubicharm/openshift-ansible,akubicharm/openshift-ansible,rjhowe/openshift-ansible,sdodson/openshift-ansible,tagliateller/openshift-ansible,abutcher/openshift-ansible,sosiouxme/openshift-ansible,liggitt/openshift-ansible,gburges/openshift-ansible,jwhonce/openshift-ansible,gburges/openshift-ansible,zhiwliu/openshift-ansible,rhdedgar/openshift-ansible,sosiouxme/openshift-ansible,liggitt/openshift-ansible,miminar/openshift-ansible,tagliateller/openshift-ansible,maxamillion/openshift-ansible,markllama/openshift-ansible,zhiwliu/openshift-ansible,markllama/openshift-ansible,maxamillion/openshift-ansible,twiest/openshift-ansible,wbrefvem/openshift-ansible,wbrefvem/openshift-ansible,ewolinetz/openshift-ansible,anpingli/openshift-ansible,ewolinetz/openshift-ansible,bparees/openshift-ansible,akram/openshift-ansible,ewolinetz/openshift-ansible,anpingli/openshift-ansible,wbrefvem/openshift-ansible,sosiouxme/openshift-ansible,miminar/openshift-ansible,mwoodson/openshift-ansible,liggitt/openshift-ansible,tagliateller/openshift-ansible,twiest/openshift-ansible,zhiwliu/openshift-ansible,mwoodson/openshift-ansible,akubicharm/openshift-ansible,zhiwliu/openshift-ansible,rhdedgar/openshift-ansible,bparees/openshift-ansible,jwhonce/openshift-ansible,openshift/openshift-ansible,jwhonce/openshift-ansible,akram/openshift-ansible,aveshagarwal/openshift-ansible,akubicharm/openshift-ansible,nak3/openshift-ansible,ewolinetz/openshift-ansible,akubicharm/openshift-ansible,rjhowe/openshift-ansible,twiest/openshift-ansible,twiest/openshift-ansible,jwhonce/openshift-ansible,nak3/openshift-ansible,abutcher/openshift-ansible,sdodson/openshift-ansible,markllama/openshift-ansible,tagliateller/openshift-ansible,aveshagarwal/openshift-ansible,maxamillion/openshift-ansible,liggitt/openshift-ansible,sdodson/openshift-ansible,kwoodson/openshift-ansible,aveshagarwal/openshift-ansible,twiest/openshift-ansible,rjhowe/openshift-ansible,kwoodson/openshift-ansible,wbrefvem/openshift-ansible,maxamillion/openshift-ansible,rjhowe/openshift-ansible,abutcher/openshift-ansible,jwhonce/openshift-ansible,markllama/openshift-ansible,sosiouxme/openshift-ansible,zhiwliu/openshift-ansible,tagliateller/openshift-ansible,wbrefvem/openshift-ansible,openshift/openshift-ansible,miminar/openshift-ansible,liggitt/openshift-ansible,aveshagarwal/openshift-ansible,aveshagarwal/openshift-ansible,abutcher/openshift-ansible,sdodson/openshift-ansible,sosiouxme/openshift-ansible | yaml | ## Code Before:
---
- name: PkgMgr RHEL/CentOS | Install net-tools pkg for route
yum:
pkg=net-tools
state=latest
- name: PkgMgr RHEL/CentOS | Get openstack ocata rpm
get_url:
url: https://repos.fedorapeople.org/repos/openstack/openstack-ocata/rdo-release-ocata-2.noarch.rpm
dest: /tmp/rdo-release-ocata-2.noarch.rpm
validate_certs: False
environment:
http_proxy: "{{ http_proxy|default('') }}"
https_proxy: "{{ https_proxy|default('') }}"
no_proxy: "{{ no_proxy|default('') }}"
tags:
- ovs_install
- name: PkgMgr RHEL/CentOS | Install openstack ocata rpm
yum: name=/tmp/rdo-release-ocata-2.noarch.rpm state=present
tags:
- ovs_install
- name: PkgMgr RHEL/CentOS | Install ovs
yum:
pkg=openvswitch-2.5.0-2.el7.x86_64
state=present
environment:
http_proxy: "{{ http_proxy|default('') }}"
https_proxy: "{{ https_proxy|default('') }}"
no_proxy: "{{ no_proxy|default('') }}"
tags:
- ovs_install
## Instruction:
Remove version requirement from openvswitch package, since listed version got removed from repo
## Code After:
---
- name: PkgMgr RHEL/CentOS | Install net-tools pkg for route
yum:
pkg=net-tools
state=latest
- name: PkgMgr RHEL/CentOS | Get openstack ocata rpm
get_url:
url: https://repos.fedorapeople.org/repos/openstack/openstack-ocata/rdo-release-ocata-2.noarch.rpm
dest: /tmp/rdo-release-ocata-2.noarch.rpm
validate_certs: False
environment:
http_proxy: "{{ http_proxy|default('') }}"
https_proxy: "{{ https_proxy|default('') }}"
no_proxy: "{{ no_proxy|default('') }}"
tags:
- ovs_install
- name: PkgMgr RHEL/CentOS | Install openstack ocata rpm
yum: name=/tmp/rdo-release-ocata-2.noarch.rpm state=present
tags:
- ovs_install
- name: PkgMgr RHEL/CentOS | Install ovs
yum:
pkg=openvswitch
state=present
environment:
http_proxy: "{{ http_proxy|default('') }}"
https_proxy: "{{ https_proxy|default('') }}"
no_proxy: "{{ no_proxy|default('') }}"
tags:
- ovs_install
| ---
- name: PkgMgr RHEL/CentOS | Install net-tools pkg for route
yum:
pkg=net-tools
state=latest
- name: PkgMgr RHEL/CentOS | Get openstack ocata rpm
get_url:
url: https://repos.fedorapeople.org/repos/openstack/openstack-ocata/rdo-release-ocata-2.noarch.rpm
dest: /tmp/rdo-release-ocata-2.noarch.rpm
validate_certs: False
environment:
http_proxy: "{{ http_proxy|default('') }}"
https_proxy: "{{ https_proxy|default('') }}"
no_proxy: "{{ no_proxy|default('') }}"
tags:
- ovs_install
- name: PkgMgr RHEL/CentOS | Install openstack ocata rpm
yum: name=/tmp/rdo-release-ocata-2.noarch.rpm state=present
tags:
- ovs_install
- name: PkgMgr RHEL/CentOS | Install ovs
yum:
- pkg=openvswitch-2.5.0-2.el7.x86_64
+ pkg=openvswitch
state=present
environment:
http_proxy: "{{ http_proxy|default('') }}"
https_proxy: "{{ https_proxy|default('') }}"
no_proxy: "{{ no_proxy|default('') }}"
tags:
- ovs_install | 2 | 0.060606 | 1 | 1 |
fcf0ca08f2d4a8ba222ce7a72dac50cb14738b17 | README.md | README.md | MPipe is a multiprocess pipeline software framework in Python.
It's a tiny module, written purely in Python, that lets you
easily write multi-stage, multiprocess pipeline algorithms.
For the full description, including user guide and examples,
visit the documentation page:
http://vmlaker.github.io/mpipe
| 
MPipe is a multiprocess pipeline software framework in Python.
It's a tiny module, written purely in Python, that lets you
easily write multi-stage, multiprocess pipeline algorithms.
For the full description, including user guide and examples,
visit the documentation page:
http://vmlaker.github.io/mpipe
| Add build result to top markdown. | Add build result to top markdown.
| Markdown | mit | vmlaker/mpipe | markdown | ## Code Before:
MPipe is a multiprocess pipeline software framework in Python.
It's a tiny module, written purely in Python, that lets you
easily write multi-stage, multiprocess pipeline algorithms.
For the full description, including user guide and examples,
visit the documentation page:
http://vmlaker.github.io/mpipe
## Instruction:
Add build result to top markdown.
## Code After:

MPipe is a multiprocess pipeline software framework in Python.
It's a tiny module, written purely in Python, that lets you
easily write multi-stage, multiprocess pipeline algorithms.
For the full description, including user guide and examples,
visit the documentation page:
http://vmlaker.github.io/mpipe
| + 
+
MPipe is a multiprocess pipeline software framework in Python.
It's a tiny module, written purely in Python, that lets you
easily write multi-stage, multiprocess pipeline algorithms.
For the full description, including user guide and examples,
visit the documentation page:
http://vmlaker.github.io/mpipe | 2 | 0.285714 | 2 | 0 |
17c48f733744dab520f209500747d712f6b73742 | test/Assembler/2002-05-02-ParseError.ll | test/Assembler/2002-05-02-ParseError.ll | ; This should parse correctly without an 'implementation', but there seems to
; be a problem...
%List = type { int, %List* }
%List* "test"()
begin
ret %List* null
end
| ; This should parse correctly without an 'implementation', but there seems to
; be a problem...
%T = type int *
%T "test"()
begin
ret %T null
end
| Simplify the testcase a bit | Simplify the testcase a bit
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@2439 91177308-0d34-0410-b5e6-96231b3b80d8
| LLVM | bsd-2-clause | dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap | llvm | ## Code Before:
; This should parse correctly without an 'implementation', but there seems to
; be a problem...
%List = type { int, %List* }
%List* "test"()
begin
ret %List* null
end
## Instruction:
Simplify the testcase a bit
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@2439 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
; This should parse correctly without an 'implementation', but there seems to
; be a problem...
%T = type int *
%T "test"()
begin
ret %T null
end
| ; This should parse correctly without an 'implementation', but there seems to
; be a problem...
- %List = type { int, %List* }
+ %T = type int *
- %List* "test"()
? ^^^^^
+ %T "test"()
? ^
begin
- ret %List* null
? ^^^^^
+ ret %T null
? ^
end
| 6 | 0.6 | 3 | 3 |
6c7a82a68addc5be2d4291a4bc98046a647b6235 | README.md | README.md | 98imgtools
==========
Simple scripts for reading/writing PC-9801 emulator image headers.
There's an additional `pbr_dump` script which can be used to dump FAT
partition boot sectors, if needed.
Example usage
-------------
Mount a HDI image:
mount -ooffset=$(./pbr_dump.py image.hdi | awk '$1=="offset:"{print $2}') image.hdi /mount/point
Supported formats
-----------------
* HDD (Virtual98)
* HDI (Anex86)
* NHD (T98-Next)
* SLH (SL9821)
See [`formats`](formats/) for the various format structures.
Tools
-----
### `hdddump.py`
Display header information from an HDD hard drive image file.
### `hddgen.py`
Creates a new HDD image header to the user's specifications.
### `hdidump.py`
Display header information from an HDI hard drive image file.
### `nhddump.py`
Display header information from an NHD hard drive image file.
### `nhdgen.py`
Creates a new NHD image header to the user's specifications.
### `pbr_dump.py`
Dumps the boot sector of the first FAT partition found in the provided disk image.
### `slhdump.py`
Display header information from an SLH hard drive image file.
### `slhgen.py`
Creates a new SLH image header to the user's specifications.
| 98imgtools
==========
Simple scripts for reading/writing PC-9801 emulator image headers.
There's an additional `pbr_dump` script which can be used to dump FAT
partition boot sectors, if needed.
Example usage
-------------
Mount a HDI image:
mount -ooffset=$(./pbr_dump.py image.hdi | awk '$1=="offset:"{print $2}') image.hdi /mount/point
Supported formats
-----------------
* HDD (Virtual98)
* HDI (Anex86)
* NHD (T98-Next)
* SLH (SL9821)
See [`formats`](formats/) for the various format structures.
Tools
-----
### `pbr_dump.py`
Displays boot sector information of the first FAT partition found in the provided disk image.
### `hdddump.py`
Displays header information from an HDD hard drive image file.
### `hddgen.py`
Creates a new HDD image header to the user's specifications.
### `hdidump.py`
Displays header information from an HDI hard drive image file.
### `nhddump.py`
Displays header information from an NHD hard drive image file.
### `nhdgen.py`
Creates a new NHD image header to the user's specifications.
### `slhdump.py`
Displays header information from an SLH hard drive image file.
### `slhgen.py`
Creates a new SLH image header to the user's specifications.
| Make style more uniform, move pbr_dump description up | Make style more uniform, move pbr_dump description up
| Markdown | unlicense | tsudoko/98imgtools | markdown | ## Code Before:
98imgtools
==========
Simple scripts for reading/writing PC-9801 emulator image headers.
There's an additional `pbr_dump` script which can be used to dump FAT
partition boot sectors, if needed.
Example usage
-------------
Mount a HDI image:
mount -ooffset=$(./pbr_dump.py image.hdi | awk '$1=="offset:"{print $2}') image.hdi /mount/point
Supported formats
-----------------
* HDD (Virtual98)
* HDI (Anex86)
* NHD (T98-Next)
* SLH (SL9821)
See [`formats`](formats/) for the various format structures.
Tools
-----
### `hdddump.py`
Display header information from an HDD hard drive image file.
### `hddgen.py`
Creates a new HDD image header to the user's specifications.
### `hdidump.py`
Display header information from an HDI hard drive image file.
### `nhddump.py`
Display header information from an NHD hard drive image file.
### `nhdgen.py`
Creates a new NHD image header to the user's specifications.
### `pbr_dump.py`
Dumps the boot sector of the first FAT partition found in the provided disk image.
### `slhdump.py`
Display header information from an SLH hard drive image file.
### `slhgen.py`
Creates a new SLH image header to the user's specifications.
## Instruction:
Make style more uniform, move pbr_dump description up
## Code After:
98imgtools
==========
Simple scripts for reading/writing PC-9801 emulator image headers.
There's an additional `pbr_dump` script which can be used to dump FAT
partition boot sectors, if needed.
Example usage
-------------
Mount a HDI image:
mount -ooffset=$(./pbr_dump.py image.hdi | awk '$1=="offset:"{print $2}') image.hdi /mount/point
Supported formats
-----------------
* HDD (Virtual98)
* HDI (Anex86)
* NHD (T98-Next)
* SLH (SL9821)
See [`formats`](formats/) for the various format structures.
Tools
-----
### `pbr_dump.py`
Displays boot sector information of the first FAT partition found in the provided disk image.
### `hdddump.py`
Displays header information from an HDD hard drive image file.
### `hddgen.py`
Creates a new HDD image header to the user's specifications.
### `hdidump.py`
Displays header information from an HDI hard drive image file.
### `nhddump.py`
Displays header information from an NHD hard drive image file.
### `nhdgen.py`
Creates a new NHD image header to the user's specifications.
### `slhdump.py`
Displays header information from an SLH hard drive image file.
### `slhgen.py`
Creates a new SLH image header to the user's specifications.
| 98imgtools
==========
Simple scripts for reading/writing PC-9801 emulator image headers.
There's an additional `pbr_dump` script which can be used to dump FAT
partition boot sectors, if needed.
Example usage
-------------
Mount a HDI image:
mount -ooffset=$(./pbr_dump.py image.hdi | awk '$1=="offset:"{print $2}') image.hdi /mount/point
Supported formats
-----------------
* HDD (Virtual98)
* HDI (Anex86)
* NHD (T98-Next)
* SLH (SL9821)
See [`formats`](formats/) for the various format structures.
Tools
-----
+ ### `pbr_dump.py`
+ Displays boot sector information of the first FAT partition found in the provided disk image.
+
### `hdddump.py`
- Display header information from an HDD hard drive image file.
+ Displays header information from an HDD hard drive image file.
? +
### `hddgen.py`
Creates a new HDD image header to the user's specifications.
### `hdidump.py`
- Display header information from an HDI hard drive image file.
+ Displays header information from an HDI hard drive image file.
? +
### `nhddump.py`
- Display header information from an NHD hard drive image file.
+ Displays header information from an NHD hard drive image file.
? +
### `nhdgen.py`
Creates a new NHD image header to the user's specifications.
- ### `pbr_dump.py`
- Dumps the boot sector of the first FAT partition found in the provided disk image.
-
### `slhdump.py`
- Display header information from an SLH hard drive image file.
+ Displays header information from an SLH hard drive image file.
? +
### `slhgen.py`
Creates a new SLH image header to the user's specifications. | 14 | 0.28 | 7 | 7 |
6c1eab13ca2edbff2cbf84f60e2215c796d85d84 | source/popup/components/SearchResults.js | source/popup/components/SearchResults.js | import React, { Component } from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
import SearchResult from "../containers/SearchResult.js";
const Container = styled.div`
width: 100%;
height: 300px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
overflow-x: hidden;
overflow-y: scroll;
`;
const EntryShape = PropTypes.shape({
id: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
url: PropTypes.string
});
class SearchResults extends Component {
static propTypes = {
entries: PropTypes.arrayOf(EntryShape),
sourcesUnlocked: PropTypes.number.isRequired
};
render() {
return (
<Container>
<For each="entry" of={this.props.entries}>
<SearchResult key={entry.id} sourceID={entry.sourceID} entryID={entry.id} />
</For>
</Container>
);
}
}
export default SearchResults;
| import React, { Component } from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
import { NonIdealState } from "@blueprintjs/core";
import SearchResult from "../containers/SearchResult.js";
const Container = styled.div`
width: 100%;
height: 300px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
overflow-x: hidden;
overflow-y: scroll;
`;
const EntryShape = PropTypes.shape({
id: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
url: PropTypes.string
});
class SearchResults extends Component {
static propTypes = {
entries: PropTypes.arrayOf(EntryShape),
sourcesUnlocked: PropTypes.number.isRequired
};
render() {
return (
<Container>
<Choose>
<When condition={this.props.entries.length > 0}>
<For each="entry" of={this.props.entries}>
<SearchResult key={entry.id} sourceID={entry.sourceID} entryID={entry.id} />
</For>
</When>
<Otherwise>
<NonIdealState
title="Nothing to see"
description="There are no entries available"
icon="satellite"
/>
</Otherwise>
</Choose>
</Container>
);
}
}
export default SearchResults;
| Add empty state to search results | Add empty state to search results
| JavaScript | mit | perry-mitchell/buttercup-chrome,buttercup-pw/buttercup-browser-extension,perry-mitchell/buttercup-chrome,buttercup-pw/buttercup-browser-extension | javascript | ## Code Before:
import React, { Component } from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
import SearchResult from "../containers/SearchResult.js";
const Container = styled.div`
width: 100%;
height: 300px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
overflow-x: hidden;
overflow-y: scroll;
`;
const EntryShape = PropTypes.shape({
id: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
url: PropTypes.string
});
class SearchResults extends Component {
static propTypes = {
entries: PropTypes.arrayOf(EntryShape),
sourcesUnlocked: PropTypes.number.isRequired
};
render() {
return (
<Container>
<For each="entry" of={this.props.entries}>
<SearchResult key={entry.id} sourceID={entry.sourceID} entryID={entry.id} />
</For>
</Container>
);
}
}
export default SearchResults;
## Instruction:
Add empty state to search results
## Code After:
import React, { Component } from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
import { NonIdealState } from "@blueprintjs/core";
import SearchResult from "../containers/SearchResult.js";
const Container = styled.div`
width: 100%;
height: 300px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
overflow-x: hidden;
overflow-y: scroll;
`;
const EntryShape = PropTypes.shape({
id: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
url: PropTypes.string
});
class SearchResults extends Component {
static propTypes = {
entries: PropTypes.arrayOf(EntryShape),
sourcesUnlocked: PropTypes.number.isRequired
};
render() {
return (
<Container>
<Choose>
<When condition={this.props.entries.length > 0}>
<For each="entry" of={this.props.entries}>
<SearchResult key={entry.id} sourceID={entry.sourceID} entryID={entry.id} />
</For>
</When>
<Otherwise>
<NonIdealState
title="Nothing to see"
description="There are no entries available"
icon="satellite"
/>
</Otherwise>
</Choose>
</Container>
);
}
}
export default SearchResults;
| import React, { Component } from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
+ import { NonIdealState } from "@blueprintjs/core";
import SearchResult from "../containers/SearchResult.js";
const Container = styled.div`
width: 100%;
height: 300px;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
overflow-x: hidden;
overflow-y: scroll;
`;
const EntryShape = PropTypes.shape({
id: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
url: PropTypes.string
});
class SearchResults extends Component {
static propTypes = {
entries: PropTypes.arrayOf(EntryShape),
sourcesUnlocked: PropTypes.number.isRequired
};
render() {
return (
<Container>
+ <Choose>
+ <When condition={this.props.entries.length > 0}>
- <For each="entry" of={this.props.entries}>
+ <For each="entry" of={this.props.entries}>
? ++++++++
- <SearchResult key={entry.id} sourceID={entry.sourceID} entryID={entry.id} />
+ <SearchResult key={entry.id} sourceID={entry.sourceID} entryID={entry.id} />
? ++++++++
+ </For>
+ </When>
+ <Otherwise>
+ <NonIdealState
+ title="Nothing to see"
+ description="There are no entries available"
+ icon="satellite"
+ />
+ </Otherwise>
- </For>
? ^ ^
+ </Choose>
? ^^ ^^^
</Container>
);
}
}
export default SearchResults; | 18 | 0.45 | 15 | 3 |
c2eeb0a7d8d3a2692537f2004052b9fad9b1527a | tests/test_utils.py | tests/test_utils.py | import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
self.addTypeEqualityFunc(type, utils.check_connection(test_request))
def test_autostart(self):
utils.autostart('add')
self.assertTrue(os.path.islink(os.path.expanduser('~/.config/autostart/furikura.desktop')))
utils.autostart('remove')
self.assertFalse(os.path.islink(os.path.expanduser('~/.config/autostart/furikura.desktop')))
| import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
self.addTypeEqualityFunc(type, utils.check_connection(test_request))
def test_autostart(self):
os.makedirs(os.path.expanduser('~/.config/autostart/'), exist_ok=True)
utils.autostart('add')
self.assertTrue(os.path.islink(os.path.expanduser('~/.config/autostart/furikura.desktop')))
utils.autostart('remove')
self.assertFalse(os.path.islink(os.path.expanduser('~/.config/autostart/furikura.desktop')))
| Create autostart folder for tests | Create autostart folder for tests
| Python | mit | benjamindean/furi-kura,benjamindean/furi-kura | python | ## Code Before:
import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
self.addTypeEqualityFunc(type, utils.check_connection(test_request))
def test_autostart(self):
utils.autostart('add')
self.assertTrue(os.path.islink(os.path.expanduser('~/.config/autostart/furikura.desktop')))
utils.autostart('remove')
self.assertFalse(os.path.islink(os.path.expanduser('~/.config/autostart/furikura.desktop')))
## Instruction:
Create autostart folder for tests
## Code After:
import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
self.addTypeEqualityFunc(type, utils.check_connection(test_request))
def test_autostart(self):
os.makedirs(os.path.expanduser('~/.config/autostart/'), exist_ok=True)
utils.autostart('add')
self.assertTrue(os.path.islink(os.path.expanduser('~/.config/autostart/furikura.desktop')))
utils.autostart('remove')
self.assertFalse(os.path.islink(os.path.expanduser('~/.config/autostart/furikura.desktop')))
| import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
self.addTypeEqualityFunc(type, utils.check_connection(test_request))
def test_autostart(self):
+ os.makedirs(os.path.expanduser('~/.config/autostart/'), exist_ok=True)
+
utils.autostart('add')
self.assertTrue(os.path.islink(os.path.expanduser('~/.config/autostart/furikura.desktop')))
utils.autostart('remove')
self.assertFalse(os.path.islink(os.path.expanduser('~/.config/autostart/furikura.desktop')))
| 2 | 0.08 | 2 | 0 |
3dd36b1b87c84cad69fc5bb4cd756cbf07f803e6 | README.md | README.md | RaspberryPi_lcdfbcp
===================
direct video buffer copy to LCD directly connected with.
Author : Yasuhiro ISHII ishii.yasuhiro@gmail.com
How to install
===
1) setup Raspbian to make SPI enable
please refer to the instructions of this site below(in Japanese)
http://mknod.jp/?cat=2
2) $ cd lcdfbcp
3) $ make
4) $ sudo make install
Then,the main process lcdfbcp will be installed at /usr/bin
If you want to launch this program at booting the system automatically,
please add /etc/inittab to below: (recommended to add it at the beginning
of this file)
lf::respawn:/usr/bin/lcdfbcp
For RaspberryPi Type B(Rev.1.0) users:
===
RaspberryPi Type B(Rev.1.0) is not officially supported with this program,but
if you want to use this with it,please modify defgpio.h as described below:
before) #define GPIO_LCD_RESET (27)
after ) #define GPIO_LCD_RESET (21)
Thanks
| RaspberryPi_lcdfbcp
===================
direct video buffer copy to LCD directly connected with.
Author : Yasuhiro ISHII ishii.yasuhiro@gmail.com
How to install
===
1) setup Raspbian to make SPI enable
please refer to the instructions of this site below(in Japanese)
http://mknod.jp/?cat=2
2) $ cd lcdfbcp
3) $ make
4) $ sudo make install
Then,the main process lcdfbcp will be installed at /usr/bin
If you want to launch this program at booting the system automatically,
please add /etc/inittab to below: (recommended to add it at the beginning
of this file)
lf::respawn:/usr/bin/lcdfbcp
For RaspberryPi Type B(Rev.1.0) users:
===
RaspberryPi Type B(Rev.1.0) is still not officially supported with this program,but
if you want to use this with it,please modify defgpio.h as described below:
before) #define GPIO_LCD_RESET (27)
after ) #define GPIO_LCD_RESET (21)
This program will support Type B 1.0 in later release,sorry for inconvenience.
Thanks
| Update to support RasPi B 1.0 | Update to support RasPi B 1.0
| Markdown | apache-2.0 | yishii/RaspberryPi_lcdfbcp,yishii/RaspberryPi_lcdfbcp | markdown | ## Code Before:
RaspberryPi_lcdfbcp
===================
direct video buffer copy to LCD directly connected with.
Author : Yasuhiro ISHII ishii.yasuhiro@gmail.com
How to install
===
1) setup Raspbian to make SPI enable
please refer to the instructions of this site below(in Japanese)
http://mknod.jp/?cat=2
2) $ cd lcdfbcp
3) $ make
4) $ sudo make install
Then,the main process lcdfbcp will be installed at /usr/bin
If you want to launch this program at booting the system automatically,
please add /etc/inittab to below: (recommended to add it at the beginning
of this file)
lf::respawn:/usr/bin/lcdfbcp
For RaspberryPi Type B(Rev.1.0) users:
===
RaspberryPi Type B(Rev.1.0) is not officially supported with this program,but
if you want to use this with it,please modify defgpio.h as described below:
before) #define GPIO_LCD_RESET (27)
after ) #define GPIO_LCD_RESET (21)
Thanks
## Instruction:
Update to support RasPi B 1.0
## Code After:
RaspberryPi_lcdfbcp
===================
direct video buffer copy to LCD directly connected with.
Author : Yasuhiro ISHII ishii.yasuhiro@gmail.com
How to install
===
1) setup Raspbian to make SPI enable
please refer to the instructions of this site below(in Japanese)
http://mknod.jp/?cat=2
2) $ cd lcdfbcp
3) $ make
4) $ sudo make install
Then,the main process lcdfbcp will be installed at /usr/bin
If you want to launch this program at booting the system automatically,
please add /etc/inittab to below: (recommended to add it at the beginning
of this file)
lf::respawn:/usr/bin/lcdfbcp
For RaspberryPi Type B(Rev.1.0) users:
===
RaspberryPi Type B(Rev.1.0) is still not officially supported with this program,but
if you want to use this with it,please modify defgpio.h as described below:
before) #define GPIO_LCD_RESET (27)
after ) #define GPIO_LCD_RESET (21)
This program will support Type B 1.0 in later release,sorry for inconvenience.
Thanks
| RaspberryPi_lcdfbcp
===================
direct video buffer copy to LCD directly connected with.
Author : Yasuhiro ISHII ishii.yasuhiro@gmail.com
How to install
===
1) setup Raspbian to make SPI enable
please refer to the instructions of this site below(in Japanese)
http://mknod.jp/?cat=2
2) $ cd lcdfbcp
3) $ make
4) $ sudo make install
Then,the main process lcdfbcp will be installed at /usr/bin
If you want to launch this program at booting the system automatically,
please add /etc/inittab to below: (recommended to add it at the beginning
of this file)
lf::respawn:/usr/bin/lcdfbcp
For RaspberryPi Type B(Rev.1.0) users:
===
- RaspberryPi Type B(Rev.1.0) is not officially supported with this program,but
+ RaspberryPi Type B(Rev.1.0) is still not officially supported with this program,but
? ++++++
if you want to use this with it,please modify defgpio.h as described below:
+
before) #define GPIO_LCD_RESET (27)
+
after ) #define GPIO_LCD_RESET (21)
+ This program will support Type B 1.0 in later release,sorry for inconvenience.
+
Thanks | 6 | 0.157895 | 5 | 1 |
3c0030734d41f59a51408040b77c571076af557e | app/controllers/sessions_controller.rb | app/controllers/sessions_controller.rb | class SessionsController < Devise::SessionsController
def destroy
#current_user.authentications.where(provider: 'canvas').destroy_all
super
end
end | class SessionsController < Devise::SessionsController
# Require our abstraction for encoding/deconding JWT.
require 'auth_token'
respond_to :json
def create
# This is the default behavior from devise - view the sessions controller source:
# https://github.com/plataformatec/devise/blob/master/app/controllers/devise/sessions_controller.rb
self.resource = warden.authenticate!(auth_options)
set_flash_message(:notice, :signed_in) if is_flashing_format?
sign_in(resource_name, resource)
yield resource if block_given?
# Here we're deviating from the standard behavior by issuing our JWT
# to any JS based client.
token = AuthToken.issue_token({ user_id: resource.id })
respond_with resource, location: after_sign_in_path_for(resource) do |format|
format.json { render json: {email: resource.email, displayName: resource.name, jwt_token: token} }
end
end
def destroy
#current_user.authentications.where(provider: 'canvas').destroy_all
super
end
end
| Update session controller to return jwt token upon login | Update session controller to return jwt token upon login
| Ruby | mit | lumenlearning/OpenAssessments,atomicjolt/OpenAssessments,BYU-Open-Analytics/BYUOpenAssessments,BYU-Open-Analytics/BYUOpenAssessments,atomicjolt/OpenAssessments,atomicjolt/OpenAssessments,lumenlearning/OpenAssessments,BYU-Open-Analytics/BYUOpenAssessments,lumenlearning/OpenAssessments,lumenlearning/OpenAssessments,BYU-Open-Analytics/BYUOpenAssessments,atomicjolt/OpenAssessments | ruby | ## Code Before:
class SessionsController < Devise::SessionsController
def destroy
#current_user.authentications.where(provider: 'canvas').destroy_all
super
end
end
## Instruction:
Update session controller to return jwt token upon login
## Code After:
class SessionsController < Devise::SessionsController
# Require our abstraction for encoding/deconding JWT.
require 'auth_token'
respond_to :json
def create
# This is the default behavior from devise - view the sessions controller source:
# https://github.com/plataformatec/devise/blob/master/app/controllers/devise/sessions_controller.rb
self.resource = warden.authenticate!(auth_options)
set_flash_message(:notice, :signed_in) if is_flashing_format?
sign_in(resource_name, resource)
yield resource if block_given?
# Here we're deviating from the standard behavior by issuing our JWT
# to any JS based client.
token = AuthToken.issue_token({ user_id: resource.id })
respond_with resource, location: after_sign_in_path_for(resource) do |format|
format.json { render json: {email: resource.email, displayName: resource.name, jwt_token: token} }
end
end
def destroy
#current_user.authentications.where(provider: 'canvas').destroy_all
super
end
end
| class SessionsController < Devise::SessionsController
-
+ # Require our abstraction for encoding/deconding JWT.
+ require 'auth_token'
+
+ respond_to :json
+
+ def create
+
+ # This is the default behavior from devise - view the sessions controller source:
+ # https://github.com/plataformatec/devise/blob/master/app/controllers/devise/sessions_controller.rb
+ self.resource = warden.authenticate!(auth_options)
+ set_flash_message(:notice, :signed_in) if is_flashing_format?
+ sign_in(resource_name, resource)
+ yield resource if block_given?
+
+ # Here we're deviating from the standard behavior by issuing our JWT
+ # to any JS based client.
+ token = AuthToken.issue_token({ user_id: resource.id })
+ respond_with resource, location: after_sign_in_path_for(resource) do |format|
+ format.json { render json: {email: resource.email, displayName: resource.name, jwt_token: token} }
+ end
+ end
+
def destroy
#current_user.authentications.where(provider: 'canvas').destroy_all
super
end
-
end | 24 | 3 | 22 | 2 |
80b6f5939af3e4c46b2179f56c122a3e4d63c8ba | app/components/session-contests.js | app/components/session-contests.js | import { inject as service } from '@ember/service';
import { not, sort, filterBy } from '@ember/object/computed';
import { task } from 'ember-concurrency';
import Component from '@ember/component';
export default Component.extend({
store: service(),
flashMessages: service(),
isDisabled: not(
'model.permissions.write',
),
sortedContestsProperties: [
'isPrimary:desc',
'groupKindSort',
'awardQualifier',
'awardAgeSort',
'awardName',
],
sortedContests: sort(
'model.contests',
'sortedContestsProperties'
),
filteredContests: filterBy(
'model.contests',
'isIncluded',
),
includedContests: sort(
'filteredContests',
'sortedContestsProperties'
),
toggleContest: task(function *(property, value) {
if (value) {
try {
let contest = yield property.include({
'by': this.get('currentUser.user.id'),
});
this.store.pushPayload('contest', contest);
this.flashMessages.success("Included!");
} catch(e) {
this.flashMessages.danger("Problem!");
}
} else {
try {
let contest = yield property.exclude({
'by': this.get('currentUser.user.id'),
});
this.store.pushPayload('contest', contest);
this.flashMessages.success("Excluded!");
} catch(e) {
this.flashMessages.danger("Problem!");
}
}
}).drop(),
});
| import { inject as service } from '@ember/service';
import { not, sort, filterBy } from '@ember/object/computed';
import { task } from 'ember-concurrency';
import Component from '@ember/component';
export default Component.extend({
store: service(),
flashMessages: service(),
isDisabled: not(
'model.permissions.write',
),
sortedContestsProperties: [
'awardTreeSort',
],
sortedContests: sort(
'model.contests',
'sortedContestsProperties'
),
filteredContests: filterBy(
'model.contests',
'isIncluded',
),
includedContests: sort(
'filteredContests',
'sortedContestsProperties'
),
toggleContest: task(function *(property, value) {
if (value) {
try {
let contest = yield property.include({
'by': this.get('currentUser.user.id'),
});
this.store.pushPayload('contest', contest);
this.flashMessages.success("Included!");
} catch(e) {
this.flashMessages.danger("Problem!");
}
} else {
try {
let contest = yield property.exclude({
'by': this.get('currentUser.user.id'),
});
this.store.pushPayload('contest', contest);
this.flashMessages.success("Excluded!");
} catch(e) {
this.flashMessages.danger("Problem!");
}
}
}).drop(),
});
| Align award to tree sort | Align award to tree sort
| JavaScript | bsd-2-clause | barberscore/barberscore-web,barberscore/barberscore-web,barberscore/barberscore-web | javascript | ## Code Before:
import { inject as service } from '@ember/service';
import { not, sort, filterBy } from '@ember/object/computed';
import { task } from 'ember-concurrency';
import Component from '@ember/component';
export default Component.extend({
store: service(),
flashMessages: service(),
isDisabled: not(
'model.permissions.write',
),
sortedContestsProperties: [
'isPrimary:desc',
'groupKindSort',
'awardQualifier',
'awardAgeSort',
'awardName',
],
sortedContests: sort(
'model.contests',
'sortedContestsProperties'
),
filteredContests: filterBy(
'model.contests',
'isIncluded',
),
includedContests: sort(
'filteredContests',
'sortedContestsProperties'
),
toggleContest: task(function *(property, value) {
if (value) {
try {
let contest = yield property.include({
'by': this.get('currentUser.user.id'),
});
this.store.pushPayload('contest', contest);
this.flashMessages.success("Included!");
} catch(e) {
this.flashMessages.danger("Problem!");
}
} else {
try {
let contest = yield property.exclude({
'by': this.get('currentUser.user.id'),
});
this.store.pushPayload('contest', contest);
this.flashMessages.success("Excluded!");
} catch(e) {
this.flashMessages.danger("Problem!");
}
}
}).drop(),
});
## Instruction:
Align award to tree sort
## Code After:
import { inject as service } from '@ember/service';
import { not, sort, filterBy } from '@ember/object/computed';
import { task } from 'ember-concurrency';
import Component from '@ember/component';
export default Component.extend({
store: service(),
flashMessages: service(),
isDisabled: not(
'model.permissions.write',
),
sortedContestsProperties: [
'awardTreeSort',
],
sortedContests: sort(
'model.contests',
'sortedContestsProperties'
),
filteredContests: filterBy(
'model.contests',
'isIncluded',
),
includedContests: sort(
'filteredContests',
'sortedContestsProperties'
),
toggleContest: task(function *(property, value) {
if (value) {
try {
let contest = yield property.include({
'by': this.get('currentUser.user.id'),
});
this.store.pushPayload('contest', contest);
this.flashMessages.success("Included!");
} catch(e) {
this.flashMessages.danger("Problem!");
}
} else {
try {
let contest = yield property.exclude({
'by': this.get('currentUser.user.id'),
});
this.store.pushPayload('contest', contest);
this.flashMessages.success("Excluded!");
} catch(e) {
this.flashMessages.danger("Problem!");
}
}
}).drop(),
});
| import { inject as service } from '@ember/service';
import { not, sort, filterBy } from '@ember/object/computed';
import { task } from 'ember-concurrency';
import Component from '@ember/component';
export default Component.extend({
store: service(),
flashMessages: service(),
isDisabled: not(
'model.permissions.write',
),
sortedContestsProperties: [
- 'isPrimary:desc',
- 'groupKindSort',
- 'awardQualifier',
- 'awardAgeSort',
? ^^
+ 'awardTreeSort',
? ^^^
- 'awardName',
],
sortedContests: sort(
'model.contests',
'sortedContestsProperties'
),
filteredContests: filterBy(
'model.contests',
'isIncluded',
),
includedContests: sort(
'filteredContests',
'sortedContestsProperties'
),
toggleContest: task(function *(property, value) {
if (value) {
try {
let contest = yield property.include({
'by': this.get('currentUser.user.id'),
});
this.store.pushPayload('contest', contest);
this.flashMessages.success("Included!");
} catch(e) {
this.flashMessages.danger("Problem!");
}
} else {
try {
let contest = yield property.exclude({
'by': this.get('currentUser.user.id'),
});
this.store.pushPayload('contest', contest);
this.flashMessages.success("Excluded!");
} catch(e) {
this.flashMessages.danger("Problem!");
}
}
}).drop(),
}); | 6 | 0.111111 | 1 | 5 |
6ef12bad0fe0acc0f0caebc1dfa644bf36c9f399 | app/controllers/places_controller.rb | app/controllers/places_controller.rb | class PlacesController < ApplicationController
def index
if params[:type].nil?
places = Place.all
else
type_id = Type.find_by(name: params[:type])
place_ids = PlacesType.where(type_id: type_id).pluck(:place_id)
places = Place.find(place_ids)
end
result = places.map do |place|
{
name: place.name,
description: place.description,
photos: place.photos.map {|photo| photo.image_url},
rating: place.rating,
duration: place.duration,
price: place.price,
longitude: place.longitude,
latitude: place.latitude,
types: place.types.map {|type| type.name}
}
end
render json: result.to_json
end
def show
place = Place.find(params[:id])
render json: place.to_json
end
def new
@types = Type.all
render 'new.html.haml'
end
def create
info = {
name: params[:name],
description: params[:description],
rating: params[:rating],
duration: params[:duration],
price: params[:price],
longitude: params[:longitude],
latitude: params[:latitude],
}
new_place = Place.new(info)
if new_place.save
# add type
# add photos
end
end
end
| class PlacesController < ApplicationController
def index
if params[:type].nil?
places = Place.within(20, :origin => [params[:latitude],params[:longitude]]).limit(20)
else
type_id = Type.find_by(name: params[:type]).id
# place_ids = PlacesType.where(type_id: type_id).pluck(:place_id)
places = Place.within(20, :origin => [params[:latitude],params[:longitude]]).joins(:places_types).where("places_types.type_id = #{type_id}").limit(5)
end
result = places.map do |place|
{
name: place.name,
description: place.description,
photos: place.photos.map {|photo| photo.image_url},
rating: place.rating,
duration: place.duration,
price: place.price,
longitude: place.lng,
latitude: place.lat,
types: place.types.map {|type| type.name}
}
end
render json: result.to_json
end
def show
place = Place.find(params[:id])
render json: place.to_json
end
def new
@types = Type.all
render 'new.html.haml'
end
def create
info = {
name: params[:name],
description: params[:description],
rating: params[:rating],
duration: params[:duration],
price: params[:price],
lng: params[:longitude],
lat: params[:latitude],
}
new_place = Place.new(info)
if new_place.save
# add type
# add photos
end
end
end
| Update controller with search based on lat-lng | Update controller with search based on lat-lng
| Ruby | mit | Hank860502/Pioneer-Backend,Hank860502/Pioneer-Backend | ruby | ## Code Before:
class PlacesController < ApplicationController
def index
if params[:type].nil?
places = Place.all
else
type_id = Type.find_by(name: params[:type])
place_ids = PlacesType.where(type_id: type_id).pluck(:place_id)
places = Place.find(place_ids)
end
result = places.map do |place|
{
name: place.name,
description: place.description,
photos: place.photos.map {|photo| photo.image_url},
rating: place.rating,
duration: place.duration,
price: place.price,
longitude: place.longitude,
latitude: place.latitude,
types: place.types.map {|type| type.name}
}
end
render json: result.to_json
end
def show
place = Place.find(params[:id])
render json: place.to_json
end
def new
@types = Type.all
render 'new.html.haml'
end
def create
info = {
name: params[:name],
description: params[:description],
rating: params[:rating],
duration: params[:duration],
price: params[:price],
longitude: params[:longitude],
latitude: params[:latitude],
}
new_place = Place.new(info)
if new_place.save
# add type
# add photos
end
end
end
## Instruction:
Update controller with search based on lat-lng
## Code After:
class PlacesController < ApplicationController
def index
if params[:type].nil?
places = Place.within(20, :origin => [params[:latitude],params[:longitude]]).limit(20)
else
type_id = Type.find_by(name: params[:type]).id
# place_ids = PlacesType.where(type_id: type_id).pluck(:place_id)
places = Place.within(20, :origin => [params[:latitude],params[:longitude]]).joins(:places_types).where("places_types.type_id = #{type_id}").limit(5)
end
result = places.map do |place|
{
name: place.name,
description: place.description,
photos: place.photos.map {|photo| photo.image_url},
rating: place.rating,
duration: place.duration,
price: place.price,
longitude: place.lng,
latitude: place.lat,
types: place.types.map {|type| type.name}
}
end
render json: result.to_json
end
def show
place = Place.find(params[:id])
render json: place.to_json
end
def new
@types = Type.all
render 'new.html.haml'
end
def create
info = {
name: params[:name],
description: params[:description],
rating: params[:rating],
duration: params[:duration],
price: params[:price],
lng: params[:longitude],
lat: params[:latitude],
}
new_place = Place.new(info)
if new_place.save
# add type
# add photos
end
end
end
| class PlacesController < ApplicationController
def index
if params[:type].nil?
- places = Place.all
+ places = Place.within(20, :origin => [params[:latitude],params[:longitude]]).limit(20)
else
- type_id = Type.find_by(name: params[:type])
+ type_id = Type.find_by(name: params[:type]).id
? +++
- place_ids = PlacesType.where(type_id: type_id).pluck(:place_id)
+ # place_ids = PlacesType.where(type_id: type_id).pluck(:place_id)
? ++
- places = Place.find(place_ids)
+ places = Place.within(20, :origin => [params[:latitude],params[:longitude]]).joins(:places_types).where("places_types.type_id = #{type_id}").limit(5)
end
result = places.map do |place|
{
name: place.name,
description: place.description,
photos: place.photos.map {|photo| photo.image_url},
rating: place.rating,
duration: place.duration,
price: place.price,
- longitude: place.longitude,
? - -----
+ longitude: place.lng,
- latitude: place.latitude,
? -----
+ latitude: place.lat,
types: place.types.map {|type| type.name}
}
end
render json: result.to_json
end
def show
place = Place.find(params[:id])
render json: place.to_json
end
def new
@types = Type.all
render 'new.html.haml'
end
def create
info = {
name: params[:name],
description: params[:description],
rating: params[:rating],
duration: params[:duration],
price: params[:price],
- longitude: params[:longitude],
? - -----
+ lng: params[:longitude],
- latitude: params[:latitude],
? -----
+ lat: params[:latitude],
}
new_place = Place.new(info)
if new_place.save
# add type
# add photos
end
end
end | 16 | 0.296296 | 8 | 8 |
eae375a8dbffa7deda9ba8bc7e3876305dc224f0 | src/test/groovy/uk/co/silentsoftware/core/colourstrategy/ColourChoiceStrategyTest.groovy | src/test/groovy/uk/co/silentsoftware/core/colourstrategy/ColourChoiceStrategyTest.groovy | package uk.co.silentsoftware.core.colourstrategy
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import uk.co.silentsoftware.config.OptionsObject
class ColourChoiceStrategyTest {
@Before
void setUp() {
OptionsObject.getInstance().setPreferDetail(false)
}
static int[] createPopularColours() {
[0xFFFF0000,0xFF0000FF] as int[] // red and blue
}
@Test
void testFullPaletteStrategyColour() {
ColourChoiceStrategy strategy = new FullPaletteStrategy()
int result = strategy.getClosestColour(0xFFBBCCDDi, createPopularColours()) // blue hue getClosestColour
Assert.assertEquals(0xFF0000FFi, result)
}
@Test
void testMonochromePaletteStrategyColour() {
ColourChoiceStrategy strategy = new MonochromePaletteStrategy()
int result = strategy.getClosestColour(0xFFBBCCDDi, createPopularColours())
// Just passes back the same value
Assert.assertEquals(0xFFBBCCDDi, result)
}
@Test(expected=UnsupportedOperationException.class)
void testGigascreenPaletteStrategyColour() {
ColourChoiceStrategy strategy = new GigaScreenPaletteStrategy()
strategy.getClosestColour(0xFFBBCCDDi, createPopularColours())
}
}
| package uk.co.silentsoftware.core.colourstrategy
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import uk.co.silentsoftware.config.OptionsObject
class ColourChoiceStrategyTest {
@Before
void setUp() {
OptionsObject.getInstance().setPreferDetail(false)
}
static int[] createPopularColours() {
[0xFFFF0000,0xFF0000FF] as int[] // red and blue
}
@Test
void testFullPaletteStrategyColour() {
ColourChoiceStrategy strategy = new FullPaletteStrategy()
int result = strategy.chooseBestPaletteMatch(0xFFBBCCDDi, createPopularColours()) // blue hue getClosestColour
Assert.assertEquals(0xFF0000FFi, result)
}
@Test
void testMonochromePaletteStrategyColour() {
ColourChoiceStrategy strategy = new MonochromePaletteStrategy()
int result = strategy.chooseBestPaletteMatch(0xFFBBCCDDi, createPopularColours())
// Just passes back the same value
Assert.assertEquals(0xFFBBCCDDi, result)
}
@Test(expected=UnsupportedOperationException.class)
void testGigascreenPaletteStrategyColour() {
ColourChoiceStrategy strategy = new GigaScreenPaletteStrategy()
strategy.chooseBestPaletteMatch(0xFFBBCCDDi, createPopularColours())
}
}
| Test fixes for method rename | Test fixes for method rename
| Groovy | agpl-3.0 | KodeMunkie/imagetozxspec | groovy | ## Code Before:
package uk.co.silentsoftware.core.colourstrategy
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import uk.co.silentsoftware.config.OptionsObject
class ColourChoiceStrategyTest {
@Before
void setUp() {
OptionsObject.getInstance().setPreferDetail(false)
}
static int[] createPopularColours() {
[0xFFFF0000,0xFF0000FF] as int[] // red and blue
}
@Test
void testFullPaletteStrategyColour() {
ColourChoiceStrategy strategy = new FullPaletteStrategy()
int result = strategy.getClosestColour(0xFFBBCCDDi, createPopularColours()) // blue hue getClosestColour
Assert.assertEquals(0xFF0000FFi, result)
}
@Test
void testMonochromePaletteStrategyColour() {
ColourChoiceStrategy strategy = new MonochromePaletteStrategy()
int result = strategy.getClosestColour(0xFFBBCCDDi, createPopularColours())
// Just passes back the same value
Assert.assertEquals(0xFFBBCCDDi, result)
}
@Test(expected=UnsupportedOperationException.class)
void testGigascreenPaletteStrategyColour() {
ColourChoiceStrategy strategy = new GigaScreenPaletteStrategy()
strategy.getClosestColour(0xFFBBCCDDi, createPopularColours())
}
}
## Instruction:
Test fixes for method rename
## Code After:
package uk.co.silentsoftware.core.colourstrategy
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import uk.co.silentsoftware.config.OptionsObject
class ColourChoiceStrategyTest {
@Before
void setUp() {
OptionsObject.getInstance().setPreferDetail(false)
}
static int[] createPopularColours() {
[0xFFFF0000,0xFF0000FF] as int[] // red and blue
}
@Test
void testFullPaletteStrategyColour() {
ColourChoiceStrategy strategy = new FullPaletteStrategy()
int result = strategy.chooseBestPaletteMatch(0xFFBBCCDDi, createPopularColours()) // blue hue getClosestColour
Assert.assertEquals(0xFF0000FFi, result)
}
@Test
void testMonochromePaletteStrategyColour() {
ColourChoiceStrategy strategy = new MonochromePaletteStrategy()
int result = strategy.chooseBestPaletteMatch(0xFFBBCCDDi, createPopularColours())
// Just passes back the same value
Assert.assertEquals(0xFFBBCCDDi, result)
}
@Test(expected=UnsupportedOperationException.class)
void testGigascreenPaletteStrategyColour() {
ColourChoiceStrategy strategy = new GigaScreenPaletteStrategy()
strategy.chooseBestPaletteMatch(0xFFBBCCDDi, createPopularColours())
}
}
| package uk.co.silentsoftware.core.colourstrategy
import org.junit.Assert
import org.junit.Before
import org.junit.Test
import uk.co.silentsoftware.config.OptionsObject
class ColourChoiceStrategyTest {
@Before
void setUp() {
OptionsObject.getInstance().setPreferDetail(false)
}
static int[] createPopularColours() {
[0xFFFF0000,0xFF0000FF] as int[] // red and blue
}
@Test
void testFullPaletteStrategyColour() {
ColourChoiceStrategy strategy = new FullPaletteStrategy()
- int result = strategy.getClosestColour(0xFFBBCCDDi, createPopularColours()) // blue hue getClosestColour
? ^^^^^ ^^ ^^^
+ int result = strategy.chooseBestPaletteMatch(0xFFBBCCDDi, createPopularColours()) // blue hue getClosestColour
? ^^^ ++ ^^ ^^^^^^^^^
Assert.assertEquals(0xFF0000FFi, result)
}
@Test
void testMonochromePaletteStrategyColour() {
ColourChoiceStrategy strategy = new MonochromePaletteStrategy()
- int result = strategy.getClosestColour(0xFFBBCCDDi, createPopularColours())
? ^^^^^ ^^ ^^^
+ int result = strategy.chooseBestPaletteMatch(0xFFBBCCDDi, createPopularColours())
? ^^^ ++ ^^ ^^^^^^^^^
// Just passes back the same value
Assert.assertEquals(0xFFBBCCDDi, result)
}
@Test(expected=UnsupportedOperationException.class)
void testGigascreenPaletteStrategyColour() {
ColourChoiceStrategy strategy = new GigaScreenPaletteStrategy()
- strategy.getClosestColour(0xFFBBCCDDi, createPopularColours())
? ^^^^^ ^^ ^^^
+ strategy.chooseBestPaletteMatch(0xFFBBCCDDi, createPopularColours())
? ^^^ ++ ^^ ^^^^^^^^^
}
} | 6 | 0.15 | 3 | 3 |
764258718d976aa826e16fd470954f18f8eabf65 | packages/core/src/Rules/CopyTargetsToRoot.js | packages/core/src/Rules/CopyTargetsToRoot.js | /* @flow */
import path from 'path'
import State from '../State'
import File from '../File'
import Rule from '../Rule'
import type { Command, OptionsInterface, Phase } from '../types'
export default class CopyTargetsToRoot extends Rule {
static parameterTypes: Array<Set<string>> = [new Set(['*'])]
static description: string = 'Copy targets to root directory.'
static alwaysEvaluate: boolean = true
static async appliesToParameters (state: State, command: Command, phase: Phase, options: OptionsInterface, ...parameters: Array<File>): Promise<boolean> {
return !!options.copyTargetsToRoot &&
parameters.every(file => state.targets.has(file.filePath) && path.dirname(file.filePath) !== '.')
}
async initialize () {
this.removeTarget(this.firstParameter.filePath)
await this.addResolvedTarget('$BASE_0')
}
async run () {
const filePath = this.resolvePath('$ROOTDIR/$BASE_0')
await this.firstParameter.copy(filePath)
await this.getOutput(filePath)
return true
}
}
| /* @flow */
import path from 'path'
import State from '../State'
import File from '../File'
import Rule from '../Rule'
import type { Command, OptionsInterface, Phase } from '../types'
export default class CopyTargetsToRoot extends Rule {
static parameterTypes: Array<Set<string>> = [new Set(['*'])]
static description: string = 'Copy targets to root directory.'
static alwaysEvaluate: boolean = true
static async appliesToParameters (state: State, command: Command, phase: Phase, options: OptionsInterface, ...parameters: Array<File>): Promise<boolean> {
return !!options.copyTargetsToRoot &&
parameters.every(file => !file.virtual && state.targets.has(file.filePath) && path.dirname(file.filePath) !== '.')
}
async initialize () {
// Remove the old target and replace with the new one.
this.removeTarget(this.firstParameter.filePath)
await this.addResolvedTarget('$BASE_0')
}
async run () {
// Copy the target to it's new location and add the result as an output.
const filePath = this.resolvePath('$ROOTDIR/$BASE_0')
await this.firstParameter.copy(filePath)
await this.getOutput(filePath)
return true
}
}
| Add comments and check for virtual files | Add comments and check for virtual files
| JavaScript | mit | yitzchak/ouroboros,yitzchak/ouroboros,yitzchak/dicy,yitzchak/dicy,yitzchak/dicy | javascript | ## Code Before:
/* @flow */
import path from 'path'
import State from '../State'
import File from '../File'
import Rule from '../Rule'
import type { Command, OptionsInterface, Phase } from '../types'
export default class CopyTargetsToRoot extends Rule {
static parameterTypes: Array<Set<string>> = [new Set(['*'])]
static description: string = 'Copy targets to root directory.'
static alwaysEvaluate: boolean = true
static async appliesToParameters (state: State, command: Command, phase: Phase, options: OptionsInterface, ...parameters: Array<File>): Promise<boolean> {
return !!options.copyTargetsToRoot &&
parameters.every(file => state.targets.has(file.filePath) && path.dirname(file.filePath) !== '.')
}
async initialize () {
this.removeTarget(this.firstParameter.filePath)
await this.addResolvedTarget('$BASE_0')
}
async run () {
const filePath = this.resolvePath('$ROOTDIR/$BASE_0')
await this.firstParameter.copy(filePath)
await this.getOutput(filePath)
return true
}
}
## Instruction:
Add comments and check for virtual files
## Code After:
/* @flow */
import path from 'path'
import State from '../State'
import File from '../File'
import Rule from '../Rule'
import type { Command, OptionsInterface, Phase } from '../types'
export default class CopyTargetsToRoot extends Rule {
static parameterTypes: Array<Set<string>> = [new Set(['*'])]
static description: string = 'Copy targets to root directory.'
static alwaysEvaluate: boolean = true
static async appliesToParameters (state: State, command: Command, phase: Phase, options: OptionsInterface, ...parameters: Array<File>): Promise<boolean> {
return !!options.copyTargetsToRoot &&
parameters.every(file => !file.virtual && state.targets.has(file.filePath) && path.dirname(file.filePath) !== '.')
}
async initialize () {
// Remove the old target and replace with the new one.
this.removeTarget(this.firstParameter.filePath)
await this.addResolvedTarget('$BASE_0')
}
async run () {
// Copy the target to it's new location and add the result as an output.
const filePath = this.resolvePath('$ROOTDIR/$BASE_0')
await this.firstParameter.copy(filePath)
await this.getOutput(filePath)
return true
}
}
| /* @flow */
import path from 'path'
import State from '../State'
import File from '../File'
import Rule from '../Rule'
import type { Command, OptionsInterface, Phase } from '../types'
export default class CopyTargetsToRoot extends Rule {
static parameterTypes: Array<Set<string>> = [new Set(['*'])]
static description: string = 'Copy targets to root directory.'
static alwaysEvaluate: boolean = true
static async appliesToParameters (state: State, command: Command, phase: Phase, options: OptionsInterface, ...parameters: Array<File>): Promise<boolean> {
return !!options.copyTargetsToRoot &&
- parameters.every(file => state.targets.has(file.filePath) && path.dirname(file.filePath) !== '.')
+ parameters.every(file => !file.virtual && state.targets.has(file.filePath) && path.dirname(file.filePath) !== '.')
? +++++++++++++++++
}
async initialize () {
+ // Remove the old target and replace with the new one.
this.removeTarget(this.firstParameter.filePath)
await this.addResolvedTarget('$BASE_0')
}
async run () {
+ // Copy the target to it's new location and add the result as an output.
const filePath = this.resolvePath('$ROOTDIR/$BASE_0')
await this.firstParameter.copy(filePath)
await this.getOutput(filePath)
return true
}
} | 4 | 0.125 | 3 | 1 |
f407750a59537f1944ab61d5a3ef5d10ea928948 | README.md | README.md |
OSCAR consists of the following parts:
* [API](api)
|
OSCAR consists of the following parts:
* [API](api)
* [client UI](client)
| Add link to client project. | Add link to client project.
| Markdown | apache-2.0 | eheikes/oscar,eheikes/oscar,eheikes/oscar,eheikes/oscar | markdown | ## Code Before:
OSCAR consists of the following parts:
* [API](api)
## Instruction:
Add link to client project.
## Code After:
OSCAR consists of the following parts:
* [API](api)
* [client UI](client)
|
OSCAR consists of the following parts:
* [API](api)
+ * [client UI](client) | 1 | 0.25 | 1 | 0 |
475c7f8cf19f1d18366d70a9bf12b1006526875c | spec/support/randomness.rb | spec/support/randomness.rb | module Randomness
def rand_one(a)
a[rand(a.length)]
end
def rand_times(i = 10)
(1 + rand(i)).times
end
def rand_partition(a, n)
i = rand(a.length / 3) + 1
n == 1 ? [a] : [a.take(i).map(&:dup)] + rand_partition(a.drop(i), n - 1)
end
def rand_array(n = 10)
rand_times(n).map { yield }
end
def rand_array_of_words(n = 10)
rand_array(n) { Faker::Hipster.word }
end
def rand_array_of_uuids(n = 10)
rand_array(n) { UUID.generate }
end
def rand_array_of_hexes(n = 10)
rand_array(n) { Faker::Number.hexadecimal(6) }
end
def rand_array_of_urls(n = 10)
rand_array(n) { Faker::Internet.url }
end
def randomly_happen
yield if rand(2) > 0
end
end
| module Randomness
DEFAULT_COUNT = 10
def rand_one(a)
a[rand(a.length)]
end
def rand_times(i = DEFAULT_COUNT)
(1 + rand(i)).times
end
def rand_partition(a, n)
i = rand(a.length / 3) + 1
n == 1 ? [a] : [a.take(i).map(&:dup)] + rand_partition(a.drop(i), n - 1)
end
def rand_array(n = DEFAULT_COUNT)
rand_times(n).map { yield }
end
def rand_array_of_words(n = DEFAULT_COUNT)
rand_array(n) { Faker::Hipster.word }
end
def rand_array_of_uuids(n = DEFAULT_COUNT)
rand_array(n) { UUID.generate }
end
def rand_array_of_hexes(n = DEFAULT_COUNT)
rand_array(n) { Faker::Number.hexadecimal(6) }
end
def rand_array_of_urls(n = DEFAULT_COUNT)
rand_array(n) { Faker::Internet.url }
end
def randomly_happen
yield if rand(2) > 0
end
def rand_table
ks = rand_array_of_words
rand_array do
ks.inject({}) do |o, k|
o.merge(k => Faker::Number.hexadecimal(6))
end
end
end
def rand_array_of_tables(n=DEFAULT_COUNT)
rand_array(n) { rand_table }
end
def rand_hash_of_tables(n=DEFAULT_COUNT)
rand_array_of_words.inject({}) do |o, k|
o.merge(Faker::Lorem.word => rand_table)
end
end
def rand_some(a)
a.take(rand(a.length)).map(&:dup)
end
end
| Make the default arg a constant | Make the default arg a constant
| Ruby | agpl-3.0 | Xalgorithms/xa-rules | ruby | ## Code Before:
module Randomness
def rand_one(a)
a[rand(a.length)]
end
def rand_times(i = 10)
(1 + rand(i)).times
end
def rand_partition(a, n)
i = rand(a.length / 3) + 1
n == 1 ? [a] : [a.take(i).map(&:dup)] + rand_partition(a.drop(i), n - 1)
end
def rand_array(n = 10)
rand_times(n).map { yield }
end
def rand_array_of_words(n = 10)
rand_array(n) { Faker::Hipster.word }
end
def rand_array_of_uuids(n = 10)
rand_array(n) { UUID.generate }
end
def rand_array_of_hexes(n = 10)
rand_array(n) { Faker::Number.hexadecimal(6) }
end
def rand_array_of_urls(n = 10)
rand_array(n) { Faker::Internet.url }
end
def randomly_happen
yield if rand(2) > 0
end
end
## Instruction:
Make the default arg a constant
## Code After:
module Randomness
DEFAULT_COUNT = 10
def rand_one(a)
a[rand(a.length)]
end
def rand_times(i = DEFAULT_COUNT)
(1 + rand(i)).times
end
def rand_partition(a, n)
i = rand(a.length / 3) + 1
n == 1 ? [a] : [a.take(i).map(&:dup)] + rand_partition(a.drop(i), n - 1)
end
def rand_array(n = DEFAULT_COUNT)
rand_times(n).map { yield }
end
def rand_array_of_words(n = DEFAULT_COUNT)
rand_array(n) { Faker::Hipster.word }
end
def rand_array_of_uuids(n = DEFAULT_COUNT)
rand_array(n) { UUID.generate }
end
def rand_array_of_hexes(n = DEFAULT_COUNT)
rand_array(n) { Faker::Number.hexadecimal(6) }
end
def rand_array_of_urls(n = DEFAULT_COUNT)
rand_array(n) { Faker::Internet.url }
end
def randomly_happen
yield if rand(2) > 0
end
def rand_table
ks = rand_array_of_words
rand_array do
ks.inject({}) do |o, k|
o.merge(k => Faker::Number.hexadecimal(6))
end
end
end
def rand_array_of_tables(n=DEFAULT_COUNT)
rand_array(n) { rand_table }
end
def rand_hash_of_tables(n=DEFAULT_COUNT)
rand_array_of_words.inject({}) do |o, k|
o.merge(Faker::Lorem.word => rand_table)
end
end
def rand_some(a)
a.take(rand(a.length)).map(&:dup)
end
end
| module Randomness
+ DEFAULT_COUNT = 10
+
def rand_one(a)
a[rand(a.length)]
end
- def rand_times(i = 10)
+ def rand_times(i = DEFAULT_COUNT)
(1 + rand(i)).times
end
def rand_partition(a, n)
i = rand(a.length / 3) + 1
n == 1 ? [a] : [a.take(i).map(&:dup)] + rand_partition(a.drop(i), n - 1)
end
- def rand_array(n = 10)
+ def rand_array(n = DEFAULT_COUNT)
rand_times(n).map { yield }
end
- def rand_array_of_words(n = 10)
? ^^
+ def rand_array_of_words(n = DEFAULT_COUNT)
? ^^^^^^^^^^^^^
rand_array(n) { Faker::Hipster.word }
end
- def rand_array_of_uuids(n = 10)
? ^^
+ def rand_array_of_uuids(n = DEFAULT_COUNT)
? ^^^^^^^^^^^^^
rand_array(n) { UUID.generate }
end
- def rand_array_of_hexes(n = 10)
? ^^
+ def rand_array_of_hexes(n = DEFAULT_COUNT)
? ^^^^^^^^^^^^^
rand_array(n) { Faker::Number.hexadecimal(6) }
end
- def rand_array_of_urls(n = 10)
? ^^
+ def rand_array_of_urls(n = DEFAULT_COUNT)
? ^^^^^^^^^^^^^
rand_array(n) { Faker::Internet.url }
end
def randomly_happen
yield if rand(2) > 0
end
+
+ def rand_table
+ ks = rand_array_of_words
+ rand_array do
+ ks.inject({}) do |o, k|
+ o.merge(k => Faker::Number.hexadecimal(6))
+ end
+ end
+ end
+
+ def rand_array_of_tables(n=DEFAULT_COUNT)
+ rand_array(n) { rand_table }
+ end
+
+ def rand_hash_of_tables(n=DEFAULT_COUNT)
+ rand_array_of_words.inject({}) do |o, k|
+ o.merge(Faker::Lorem.word => rand_table)
+ end
+ end
+
+ def rand_some(a)
+ a.take(rand(a.length)).map(&:dup)
+ end
end | 37 | 0.973684 | 31 | 6 |
3bc52f0b539f4415553c359bda062ebf24e6bad3 | .travis.yml | .travis.yml |
language: node_js
sudo: false
# Node.js versions
node_js:
- 4
- 5
- 6
# Install dependencies
before_script:
- pip install --user -r requirements.txt
# Perform build and tests
script: npm run build
|
language: node_js
sudo: false
# Node.js versions
node_js:
- 4
- 5
- 6
# Cache dependencie
cache:
pip: true
directories:
- node_modules
# Install dependencies
before_script:
- pip install --user -r requirements.txt
# Perform build and tests
script: npm run build
| Test caching of dependencies on Travis | Test caching of dependencies on Travis
| YAML | mit | dockerin/mkdocs-material,mjames-upc/mkdocs-unidata,mjames-upc/mkdocs-unidata,squidfunk/mkdocs-material,squidfunk/mkdocs-material,DatanestIO/mkdocs-material,dockerin/mkdocs-material,mjames-upc/mkdocs-unidata,DatanestIO/mkdocs-material,dockerin/mkdocs-material,DatanestIO/mkdocs-material,dockerin/mkdocs-material,mjames-upc/mkdocs-unidata,supremainc/sfmdev,supremainc/sfmdev,squidfunk/mkdocs-material,supremainc/sfmdev,DatanestIO/mkdocs-material,squidfunk/mkdocs-material,supremainc/sfmdev | yaml | ## Code Before:
language: node_js
sudo: false
# Node.js versions
node_js:
- 4
- 5
- 6
# Install dependencies
before_script:
- pip install --user -r requirements.txt
# Perform build and tests
script: npm run build
## Instruction:
Test caching of dependencies on Travis
## Code After:
language: node_js
sudo: false
# Node.js versions
node_js:
- 4
- 5
- 6
# Cache dependencie
cache:
pip: true
directories:
- node_modules
# Install dependencies
before_script:
- pip install --user -r requirements.txt
# Perform build and tests
script: npm run build
|
language: node_js
sudo: false
# Node.js versions
node_js:
- 4
- 5
- 6
+ # Cache dependencie
+ cache:
+ pip: true
+ directories:
+ - node_modules
+
# Install dependencies
before_script:
- pip install --user -r requirements.txt
# Perform build and tests
script: npm run build | 6 | 0.375 | 6 | 0 |
f9c6533d5fea4d9b44c6fe12ac8ce895d45ef2b7 | bin/sign.php | bin/sign.php | <?php
// args: phar path, privkey, privkey password
$pkeyid = openssl_pkey_get_private("file://".realpath($_SERVER['argv'][2]), $_SERVER['argv'][3]);
if (!openssl_sign(file_get_contents($_SERVER['argv'][1]), $sha384sig, $pkeyid, OPENSSL_ALGO_SHA384)) {
echo 'Failed to sign';
exit(1);
}
openssl_free_key($pkeyid);
$sha384sig = trim(base64_encode($sha384sig), '=');
file_put_contents($_SERVER['argv'][1].'.sig', json_encode(['sha384' => $sha384sig], JSON_UNESCAPED_SLASHES));
| <?php
// args: phar path, privkey, privkey password
$pkeyid = openssl_pkey_get_private("file://".realpath($_SERVER['argv'][2]), $_SERVER['argv'][3]);
if (!openssl_sign(file_get_contents($_SERVER['argv'][1]), $sha384sig, $pkeyid, OPENSSL_ALGO_SHA384)) {
echo 'Failed to sign';
exit(1);
}
openssl_free_key($pkeyid);
$sha384sig = base64_encode($sha384sig);
file_put_contents($_SERVER['argv'][1].'.sig', json_encode(['sha384' => $sha384sig], JSON_UNESCAPED_SLASHES));
| Remove trimming to avoid warnings in some base64 implementations | Remove trimming to avoid warnings in some base64 implementations
| PHP | mit | composer/getcomposer.org,johnstevenson/getcomposer.org,composer/getcomposer.org,johnstevenson/getcomposer.org,composer/getcomposer.org,johnstevenson/getcomposer.org | php | ## Code Before:
<?php
// args: phar path, privkey, privkey password
$pkeyid = openssl_pkey_get_private("file://".realpath($_SERVER['argv'][2]), $_SERVER['argv'][3]);
if (!openssl_sign(file_get_contents($_SERVER['argv'][1]), $sha384sig, $pkeyid, OPENSSL_ALGO_SHA384)) {
echo 'Failed to sign';
exit(1);
}
openssl_free_key($pkeyid);
$sha384sig = trim(base64_encode($sha384sig), '=');
file_put_contents($_SERVER['argv'][1].'.sig', json_encode(['sha384' => $sha384sig], JSON_UNESCAPED_SLASHES));
## Instruction:
Remove trimming to avoid warnings in some base64 implementations
## Code After:
<?php
// args: phar path, privkey, privkey password
$pkeyid = openssl_pkey_get_private("file://".realpath($_SERVER['argv'][2]), $_SERVER['argv'][3]);
if (!openssl_sign(file_get_contents($_SERVER['argv'][1]), $sha384sig, $pkeyid, OPENSSL_ALGO_SHA384)) {
echo 'Failed to sign';
exit(1);
}
openssl_free_key($pkeyid);
$sha384sig = base64_encode($sha384sig);
file_put_contents($_SERVER['argv'][1].'.sig', json_encode(['sha384' => $sha384sig], JSON_UNESCAPED_SLASHES));
| <?php
// args: phar path, privkey, privkey password
$pkeyid = openssl_pkey_get_private("file://".realpath($_SERVER['argv'][2]), $_SERVER['argv'][3]);
if (!openssl_sign(file_get_contents($_SERVER['argv'][1]), $sha384sig, $pkeyid, OPENSSL_ALGO_SHA384)) {
echo 'Failed to sign';
exit(1);
}
openssl_free_key($pkeyid);
- $sha384sig = trim(base64_encode($sha384sig), '=');
? ----- ------
+ $sha384sig = base64_encode($sha384sig);
file_put_contents($_SERVER['argv'][1].'.sig', json_encode(['sha384' => $sha384sig], JSON_UNESCAPED_SLASHES)); | 2 | 0.166667 | 1 | 1 |
af4036a675f664632dd88e6602ffd39e4350ef82 | doc/v2/howto/index_cn.rst | doc/v2/howto/index_cn.rst | 进阶使用
========
.. toctree::
:maxdepth: 1
cmd_parameter/index_cn.rst
cluster/index_cn.rst
capi/index_cn.rst
rnn/index_cn.rst
optimization/gpu_profiling_cn.rst
| 进阶使用
========
PaddlePaddle支持用户灵活地设置各种命令行参数,以实现对模型训练或预测流程的控制。使用方式请参考:
.. toctree::
:maxdepth: 1
cmd_parameter/index_cn.rst
PaddlePaddle支持在fabric集群、MPI集群、kubernetes集群上分布式训练任务,具体环境配置和使用说明请参考:
.. toctree::
:maxdepth: 1
cluster/index_cn.rst
PaddlePaddle提供了用于预测的C-API,关于C-API的使用,我们提供了如下指南:
.. toctree::
:maxdepth: 1
capi/index_cn.rst
PaddlePaddle支持多种灵活和高效的循环神经网络,具体配置使用方式请参考:
.. toctree::
:maxdepth: 1
rnn/index_cn.rst
关于如何使用内置的定时工具、nvprof 或 nvvp 来运行性能分析和调优,请参考:
.. toctree::
:maxdepth: 1
optimization/gpu_profiling_cn.rst
| Add guide for howto documentation | Add guide for howto documentation
| reStructuredText | apache-2.0 | pkuyym/Paddle,lcy-seso/Paddle,pkuyym/Paddle,chengduoZH/Paddle,luotao1/Paddle,lcy-seso/Paddle,baidu/Paddle,pkuyym/Paddle,jacquesqiao/Paddle,luotao1/Paddle,pkuyym/Paddle,lcy-seso/Paddle,luotao1/Paddle,Canpio/Paddle,reyoung/Paddle,jacquesqiao/Paddle,putcn/Paddle,PaddlePaddle/Paddle,chengduoZH/Paddle,tensor-tang/Paddle,QiJune/Paddle,baidu/Paddle,putcn/Paddle,jacquesqiao/Paddle,QiJune/Paddle,pkuyym/Paddle,pkuyym/Paddle,jacquesqiao/Paddle,reyoung/Paddle,jacquesqiao/Paddle,Canpio/Paddle,Canpio/Paddle,reyoung/Paddle,reyoung/Paddle,baidu/Paddle,tensor-tang/Paddle,luotao1/Paddle,reyoung/Paddle,lcy-seso/Paddle,QiJune/Paddle,chengduoZH/Paddle,baidu/Paddle,reyoung/Paddle,QiJune/Paddle,Canpio/Paddle,PaddlePaddle/Paddle,Canpio/Paddle,putcn/Paddle,PaddlePaddle/Paddle,PaddlePaddle/Paddle,Canpio/Paddle,putcn/Paddle,lcy-seso/Paddle,QiJune/Paddle,chengduoZH/Paddle,lcy-seso/Paddle,luotao1/Paddle,putcn/Paddle,tensor-tang/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,baidu/Paddle,jacquesqiao/Paddle,PaddlePaddle/Paddle,Canpio/Paddle,chengduoZH/Paddle,tensor-tang/Paddle,tensor-tang/Paddle,PaddlePaddle/Paddle,QiJune/Paddle,putcn/Paddle,luotao1/Paddle,Canpio/Paddle | restructuredtext | ## Code Before:
进阶使用
========
.. toctree::
:maxdepth: 1
cmd_parameter/index_cn.rst
cluster/index_cn.rst
capi/index_cn.rst
rnn/index_cn.rst
optimization/gpu_profiling_cn.rst
## Instruction:
Add guide for howto documentation
## Code After:
进阶使用
========
PaddlePaddle支持用户灵活地设置各种命令行参数,以实现对模型训练或预测流程的控制。使用方式请参考:
.. toctree::
:maxdepth: 1
cmd_parameter/index_cn.rst
PaddlePaddle支持在fabric集群、MPI集群、kubernetes集群上分布式训练任务,具体环境配置和使用说明请参考:
.. toctree::
:maxdepth: 1
cluster/index_cn.rst
PaddlePaddle提供了用于预测的C-API,关于C-API的使用,我们提供了如下指南:
.. toctree::
:maxdepth: 1
capi/index_cn.rst
PaddlePaddle支持多种灵活和高效的循环神经网络,具体配置使用方式请参考:
.. toctree::
:maxdepth: 1
rnn/index_cn.rst
关于如何使用内置的定时工具、nvprof 或 nvvp 来运行性能分析和调优,请参考:
.. toctree::
:maxdepth: 1
optimization/gpu_profiling_cn.rst
| 进阶使用
========
+
+ PaddlePaddle支持用户灵活地设置各种命令行参数,以实现对模型训练或预测流程的控制。使用方式请参考:
.. toctree::
:maxdepth: 1
cmd_parameter/index_cn.rst
+
+ PaddlePaddle支持在fabric集群、MPI集群、kubernetes集群上分布式训练任务,具体环境配置和使用说明请参考:
+
+ .. toctree::
+ :maxdepth: 1
+
cluster/index_cn.rst
+
+ PaddlePaddle提供了用于预测的C-API,关于C-API的使用,我们提供了如下指南:
+
+ .. toctree::
+ :maxdepth: 1
+
capi/index_cn.rst
+
+ PaddlePaddle支持多种灵活和高效的循环神经网络,具体配置使用方式请参考:
+
+ .. toctree::
+ :maxdepth: 1
+
rnn/index_cn.rst
+
+ 关于如何使用内置的定时工具、nvprof 或 nvvp 来运行性能分析和调优,请参考:
+
+ .. toctree::
+ :maxdepth: 1
+
optimization/gpu_profiling_cn.rst | 26 | 2.363636 | 26 | 0 |
a8a94d63d606fb6e2f4c0d24952971e3f4e13435 | message-broker/src/broker2broker.cpp | message-broker/src/broker2broker.cpp |
/**
* @brief Initialize an outgoing message of SNDMSG type.
*/
MessageForB2B::MessageForB2B(const chattp::ChattpMessage& mesg, const string& channel_id)
{
message_buffer.set_sequence_number(b2b_counter.get());
*(message_buffer.mutable_mesg()) = mesg;
message_buffer.set_channel_id(channel_id);
message_buffer.set_type(B2BMessage::SENDMESSAGE);
}
/**
* @brief Initialize an outgoing message of MSGSNT type.
*/
MessageForB2B::MessageForB2B(sequence_t seq_num, bool status)
{
message_buffer.set_type(B2BMessage::MESSAGESENT);
message_buffer.set_status(status);
}
B2BIncoming::B2BIncoming(const char* buffer, size_t length, const string& origin_b)
: origin_broker(origin_b)
{
message_buffer.ParseFromArray(buffer,length);
}
|
/**
* @brief Initialize an outgoing message of SNDMSG type.
*/
MessageForB2B::MessageForB2B(const chattp::ChattpMessage& mesg, const string& channel_id)
{
message_buffer.set_sequence_number(b2b_counter.get());
*(message_buffer.mutable_mesg()) = mesg;
message_buffer.set_channel_id(channel_id);
message_buffer.set_type(B2BMessage::SENDMESSAGE);
}
/**
* @brief Initialize an outgoing message of MSGSNT type.
*/
MessageForB2B::MessageForB2B(sequence_t seq_num, bool status)
{
message_buffer.set_sequence_number(seq_num);
message_buffer.set_type(B2BMessage::MESSAGESENT);
message_buffer.set_status(status);
}
B2BIncoming::B2BIncoming(const char* buffer, size_t length, const string& origin_b)
: origin_broker(origin_b)
{
message_buffer.ParseFromArray(buffer,length);
}
| Initialize sequence_number field for MESSAGESENT messages! | Initialize sequence_number field for MESSAGESENT messages!
| C++ | mit | Spheniscida/cHaTTP,Spheniscida/cHaTTP | c++ | ## Code Before:
/**
* @brief Initialize an outgoing message of SNDMSG type.
*/
MessageForB2B::MessageForB2B(const chattp::ChattpMessage& mesg, const string& channel_id)
{
message_buffer.set_sequence_number(b2b_counter.get());
*(message_buffer.mutable_mesg()) = mesg;
message_buffer.set_channel_id(channel_id);
message_buffer.set_type(B2BMessage::SENDMESSAGE);
}
/**
* @brief Initialize an outgoing message of MSGSNT type.
*/
MessageForB2B::MessageForB2B(sequence_t seq_num, bool status)
{
message_buffer.set_type(B2BMessage::MESSAGESENT);
message_buffer.set_status(status);
}
B2BIncoming::B2BIncoming(const char* buffer, size_t length, const string& origin_b)
: origin_broker(origin_b)
{
message_buffer.ParseFromArray(buffer,length);
}
## Instruction:
Initialize sequence_number field for MESSAGESENT messages!
## Code After:
/**
* @brief Initialize an outgoing message of SNDMSG type.
*/
MessageForB2B::MessageForB2B(const chattp::ChattpMessage& mesg, const string& channel_id)
{
message_buffer.set_sequence_number(b2b_counter.get());
*(message_buffer.mutable_mesg()) = mesg;
message_buffer.set_channel_id(channel_id);
message_buffer.set_type(B2BMessage::SENDMESSAGE);
}
/**
* @brief Initialize an outgoing message of MSGSNT type.
*/
MessageForB2B::MessageForB2B(sequence_t seq_num, bool status)
{
message_buffer.set_sequence_number(seq_num);
message_buffer.set_type(B2BMessage::MESSAGESENT);
message_buffer.set_status(status);
}
B2BIncoming::B2BIncoming(const char* buffer, size_t length, const string& origin_b)
: origin_broker(origin_b)
{
message_buffer.ParseFromArray(buffer,length);
}
|
/**
* @brief Initialize an outgoing message of SNDMSG type.
*/
MessageForB2B::MessageForB2B(const chattp::ChattpMessage& mesg, const string& channel_id)
{
message_buffer.set_sequence_number(b2b_counter.get());
*(message_buffer.mutable_mesg()) = mesg;
message_buffer.set_channel_id(channel_id);
message_buffer.set_type(B2BMessage::SENDMESSAGE);
}
/**
* @brief Initialize an outgoing message of MSGSNT type.
*/
MessageForB2B::MessageForB2B(sequence_t seq_num, bool status)
{
+ message_buffer.set_sequence_number(seq_num);
message_buffer.set_type(B2BMessage::MESSAGESENT);
message_buffer.set_status(status);
}
B2BIncoming::B2BIncoming(const char* buffer, size_t length, const string& origin_b)
: origin_broker(origin_b)
{
message_buffer.ParseFromArray(buffer,length);
} | 1 | 0.038462 | 1 | 0 |
7e2028b625e69a6eebb60480be8ae1d165dbb894 | vars/Archlinux.yml | vars/Archlinux.yml | ---
i3_packages_default:
- i3
- scrot
- pulseaudio
- xorg-server
- dmenu
| ---
i3_packages_default:
- i3-gaps
- i3-wm
- i3lock
- i3status
- scrot
- pulseaudio
- xorg-server
- dmenu
| Fix Arch default package list | Fix Arch default package list
| YAML | mit | nephelaiio/ansible-role-i3,nephelaiio/ansible-role-i3 | yaml | ## Code Before:
---
i3_packages_default:
- i3
- scrot
- pulseaudio
- xorg-server
- dmenu
## Instruction:
Fix Arch default package list
## Code After:
---
i3_packages_default:
- i3-gaps
- i3-wm
- i3lock
- i3status
- scrot
- pulseaudio
- xorg-server
- dmenu
| ---
i3_packages_default:
+ - i3-gaps
- - i3
+ - i3-wm
? +++
+ - i3lock
+ - i3status
- scrot
- pulseaudio
- xorg-server
- dmenu | 5 | 0.714286 | 4 | 1 |
7b53a108c343903602ef5bcfd10b8af266947369 | common/app/components/Nav/links.json | common/app/components/Nav/links.json | [{
"content": "Map",
"link": "/map"
}, {
"content": "Chat",
"link": "//gitter.im/FreeCodeCamp/FreeCodeCamp",
"target": "_blank"
},{
"content": "News",
"link": "/news",
"target": "_blank"
},{
"content": "Wiki",
"link": "https://github.com/freecodecamp/freecodecamp/wiki/",
"target": "_blank"
},{
"content": "Jobs",
"link": "/jobs",
"react": true
},{
"content": "Links",
"link": "/links"
}]
| [{
"content": "Map",
"link": "/map"
}, {
"content": "Chat",
"link": "//gitter.im/FreeCodeCamp/FreeCodeCamp",
"target": "_blank"
},{
"content": "News",
"link": "/news",
"target": "_blank"
},{
"content": "Wiki",
"link": "https://github.com/freecodecamp/freecodecamp/wiki/",
"target": "_blank"
},{
"content": "Jobs",
"link": "/jobs",
"react": true
},{
"content": "About",
"link": "/about"
}]
| Fix navbar link to about page | Fix navbar link to about page
| JSON | bsd-3-clause | HKuz/FreeCodeCamp,no-stack-dub-sack/freeCodeCamp,DusanSacha/FreeCodeCamp,raisedadead/FreeCodeCamp,raisedadead/FreeCodeCamp,tmashuang/FreeCodeCamp,FreeCodeCampQuito/FreeCodeCamp,otavioarc/freeCodeCamp,HKuz/FreeCodeCamp,matthew-t-smith/freeCodeCamp,codeman869/FreeCodeCamp,matthew-t-smith/freeCodeCamp,BrendanSweeny/FreeCodeCamp,FreeCodeCamp/FreeCodeCamp,systimotic/FreeCodeCamp,FreeCodeCampQuito/FreeCodeCamp,BerkeleyTrue/FreeCodeCamp,no-stack-dub-sack/freeCodeCamp,jonathanihm/freeCodeCamp,BhaveshSGupta/FreeCodeCamp,MiloATH/FreeCodeCamp,pahosler/freecodecamp,MiloATH/FreeCodeCamp,techstonia/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,otavioarc/freeCodeCamp,sakthik26/FreeCodeCamp,FreeCodeCamp/FreeCodeCamp,tmashuang/FreeCodeCamp,systimotic/FreeCodeCamp,DusanSacha/FreeCodeCamp,Munsterberg/freecodecamp,TheeMattOliver/FreeCodeCamp,techstonia/FreeCodeCamp,1111113j8Pussy420/https-github.com-raisedadead-freeCodeCamp,codeman869/FreeCodeCamp,BrendanSweeny/FreeCodeCamp,BhaveshSGupta/FreeCodeCamp,TheeMattOliver/FreeCodeCamp,jonathanihm/freeCodeCamp,BerkeleyTrue/FreeCodeCamp,sakthik26/FreeCodeCamp,pahosler/freecodecamp,Munsterberg/freecodecamp,1111113j8Pussy420/https-github.com-raisedadead-freeCodeCamp | json | ## Code Before:
[{
"content": "Map",
"link": "/map"
}, {
"content": "Chat",
"link": "//gitter.im/FreeCodeCamp/FreeCodeCamp",
"target": "_blank"
},{
"content": "News",
"link": "/news",
"target": "_blank"
},{
"content": "Wiki",
"link": "https://github.com/freecodecamp/freecodecamp/wiki/",
"target": "_blank"
},{
"content": "Jobs",
"link": "/jobs",
"react": true
},{
"content": "Links",
"link": "/links"
}]
## Instruction:
Fix navbar link to about page
## Code After:
[{
"content": "Map",
"link": "/map"
}, {
"content": "Chat",
"link": "//gitter.im/FreeCodeCamp/FreeCodeCamp",
"target": "_blank"
},{
"content": "News",
"link": "/news",
"target": "_blank"
},{
"content": "Wiki",
"link": "https://github.com/freecodecamp/freecodecamp/wiki/",
"target": "_blank"
},{
"content": "Jobs",
"link": "/jobs",
"react": true
},{
"content": "About",
"link": "/about"
}]
| [{
"content": "Map",
"link": "/map"
}, {
"content": "Chat",
"link": "//gitter.im/FreeCodeCamp/FreeCodeCamp",
"target": "_blank"
},{
"content": "News",
"link": "/news",
"target": "_blank"
},{
"content": "Wiki",
"link": "https://github.com/freecodecamp/freecodecamp/wiki/",
"target": "_blank"
},{
"content": "Jobs",
"link": "/jobs",
"react": true
},{
- "content": "Links",
? ^^^^^
+ "content": "About",
? ^^^^^
- "link": "/links"
+ "link": "/about"
}] | 4 | 0.173913 | 2 | 2 |
4a2176177ed90779bc11a1dbf26334cc50cc70b9 | Casks/logdna-cli.rb | Casks/logdna-cli.rb | cask 'logdna-cli' do
version '1.0.9'
sha256 '76531e0538c9c8945ade50fc5707e1d34945b364a6475f38af6ccd499aad2aaa'
url "https://github.com/logdna/logdna-cli/releases/download/#{version}/logdna-mac-cli.pkg"
appcast 'https://github.com/logdna/logdna-cli/releases.atom',
checkpoint: '9c67fddd3ec1be4675c32dc6078380d100a379a5bd6de9f34bcf4d4052e66301'
name 'LogDNA CLI'
homepage 'https://www.logdna.com/'
license :mit
pkg 'logdna-mac-cli.pkg'
uninstall pkgutil: 'com.logdna.logdna-cli'
end
| cask 'logdna-cli' do
version '1.0.9'
sha256 '76531e0538c9c8945ade50fc5707e1d34945b364a6475f38af6ccd499aad2aaa'
# github.com/logdna/logdna-cli was verified as official when first introduced to the cask
url "https://github.com/logdna/logdna-cli/releases/download/#{version}/logdna-mac-cli.pkg"
appcast 'https://github.com/logdna/logdna-cli/releases.atom',
checkpoint: '9c67fddd3ec1be4675c32dc6078380d100a379a5bd6de9f34bcf4d4052e66301'
name 'LogDNA CLI'
homepage 'https://www.logdna.com/'
license :mit
pkg 'logdna-mac-cli.pkg'
uninstall pkgutil: 'com.logdna.logdna-cli'
end
| Fix `url` stanza comment for LogDNA CLI. | Fix `url` stanza comment for LogDNA CLI.
| Ruby | bsd-2-clause | claui/homebrew-cask,cblecker/homebrew-cask,mauricerkelly/homebrew-cask,thehunmonkgroup/homebrew-cask,ptb/homebrew-cask,mjgardner/homebrew-cask,daften/homebrew-cask,robertgzr/homebrew-cask,maxnordlund/homebrew-cask,jellyfishcoder/homebrew-cask,lifepillar/homebrew-cask,onlynone/homebrew-cask,shoichiaizawa/homebrew-cask,xyb/homebrew-cask,lucasmezencio/homebrew-cask,uetchy/homebrew-cask,xtian/homebrew-cask,chrisfinazzo/homebrew-cask,jaredsampson/homebrew-cask,tjnycum/homebrew-cask,rajiv/homebrew-cask,yurikoles/homebrew-cask,thii/homebrew-cask,syscrusher/homebrew-cask,mathbunnyru/homebrew-cask,lumaxis/homebrew-cask,troyxmccall/homebrew-cask,KosherBacon/homebrew-cask,kassi/homebrew-cask,kongslund/homebrew-cask,Keloran/homebrew-cask,renaudguerin/homebrew-cask,yutarody/homebrew-cask,malob/homebrew-cask,aguynamedryan/homebrew-cask,stonehippo/homebrew-cask,athrunsun/homebrew-cask,dictcp/homebrew-cask,diogodamiani/homebrew-cask,tyage/homebrew-cask,klane/homebrew-cask,neverfox/homebrew-cask,MircoT/homebrew-cask,optikfluffel/homebrew-cask,My2ndAngelic/homebrew-cask,nathancahill/homebrew-cask,chrisfinazzo/homebrew-cask,robertgzr/homebrew-cask,esebastian/homebrew-cask,danielbayley/homebrew-cask,optikfluffel/homebrew-cask,shonjir/homebrew-cask,singingwolfboy/homebrew-cask,xcezx/homebrew-cask,patresi/homebrew-cask,johndbritton/homebrew-cask,yutarody/homebrew-cask,winkelsdorf/homebrew-cask,caskroom/homebrew-cask,ericbn/homebrew-cask,ksylvan/homebrew-cask,jbeagley52/homebrew-cask,MoOx/homebrew-cask,lucasmezencio/homebrew-cask,toonetown/homebrew-cask,wKovacs64/homebrew-cask,aguynamedryan/homebrew-cask,tangestani/homebrew-cask,malob/homebrew-cask,imgarylai/homebrew-cask,joshka/homebrew-cask,forevergenin/homebrew-cask,michelegera/homebrew-cask,ianyh/homebrew-cask,usami-k/homebrew-cask,jacobbednarz/homebrew-cask,timsutton/homebrew-cask,larseggert/homebrew-cask,mathbunnyru/homebrew-cask,slack4u/homebrew-cask,rogeriopradoj/homebrew-cask,sebcode/homebrew-cask,jedahan/homebrew-cask,danielbayley/homebrew-cask,neverfox/homebrew-cask,jalaziz/homebrew-cask,timsutton/homebrew-cask,andyli/homebrew-cask,imgarylai/homebrew-cask,kpearson/homebrew-cask,squid314/homebrew-cask,tyage/homebrew-cask,pkq/homebrew-cask,winkelsdorf/homebrew-cask,malford/homebrew-cask,xyb/homebrew-cask,jeroenj/homebrew-cask,gabrielizaias/homebrew-cask,antogg/homebrew-cask,decrement/homebrew-cask,JikkuJose/homebrew-cask,mazehall/homebrew-cask,reitermarkus/homebrew-cask,jpmat296/homebrew-cask,Saklad5/homebrew-cask,nathanielvarona/homebrew-cask,victorpopkov/homebrew-cask,stephenwade/homebrew-cask,jmeridth/homebrew-cask,deanmorin/homebrew-cask,kpearson/homebrew-cask,bosr/homebrew-cask,wickedsp1d3r/homebrew-cask,claui/homebrew-cask,flaviocamilo/homebrew-cask,mrmachine/homebrew-cask,gyndav/homebrew-cask,Labutin/homebrew-cask,sjackman/homebrew-cask,FredLackeyOfficial/homebrew-cask,cobyism/homebrew-cask,tjnycum/homebrew-cask,exherb/homebrew-cask,sjackman/homebrew-cask,scottsuch/homebrew-cask,vitorgalvao/homebrew-cask,JikkuJose/homebrew-cask,uetchy/homebrew-cask,janlugt/homebrew-cask,andrewdisley/homebrew-cask,scottsuch/homebrew-cask,artdevjs/homebrew-cask,cprecioso/homebrew-cask,kesara/homebrew-cask,klane/homebrew-cask,stonehippo/homebrew-cask,arronmabrey/homebrew-cask,dvdoliveira/homebrew-cask,0xadada/homebrew-cask,bdhess/homebrew-cask,cblecker/homebrew-cask,a1russell/homebrew-cask,JosephViolago/homebrew-cask,moimikey/homebrew-cask,stonehippo/homebrew-cask,markthetech/homebrew-cask,JacopKane/homebrew-cask,hovancik/homebrew-cask,shonjir/homebrew-cask,hanxue/caskroom,wickles/homebrew-cask,sgnh/homebrew-cask,scottsuch/homebrew-cask,mjgardner/homebrew-cask,JosephViolago/homebrew-cask,andyli/homebrew-cask,michelegera/homebrew-cask,lantrix/homebrew-cask,guerrero/homebrew-cask,jaredsampson/homebrew-cask,yuhki50/homebrew-cask,onlynone/homebrew-cask,maxnordlund/homebrew-cask,colindean/homebrew-cask,giannitm/homebrew-cask,johnjelinek/homebrew-cask,xight/homebrew-cask,hakamadare/homebrew-cask,alexg0/homebrew-cask,cfillion/homebrew-cask,ericbn/homebrew-cask,deiga/homebrew-cask,deiga/homebrew-cask,shorshe/homebrew-cask,samnung/homebrew-cask,Keloran/homebrew-cask,MoOx/homebrew-cask,hellosky806/homebrew-cask,mishari/homebrew-cask,moimikey/homebrew-cask,jangalinski/homebrew-cask,reitermarkus/homebrew-cask,My2ndAngelic/homebrew-cask,y00rb/homebrew-cask,stephenwade/homebrew-cask,mchlrmrz/homebrew-cask,nathanielvarona/homebrew-cask,mwean/homebrew-cask,ninjahoahong/homebrew-cask,goxberry/homebrew-cask,ianyh/homebrew-cask,psibre/homebrew-cask,blainesch/homebrew-cask,rogeriopradoj/homebrew-cask,colindunn/homebrew-cask,puffdad/homebrew-cask,flaviocamilo/homebrew-cask,yumitsu/homebrew-cask,elyscape/homebrew-cask,miccal/homebrew-cask,victorpopkov/homebrew-cask,neverfox/homebrew-cask,jpmat296/homebrew-cask,yurikoles/homebrew-cask,SentinelWarren/homebrew-cask,johndbritton/homebrew-cask,ninjahoahong/homebrew-cask,jawshooah/homebrew-cask,diogodamiani/homebrew-cask,wKovacs64/homebrew-cask,mattrobenolt/homebrew-cask,winkelsdorf/homebrew-cask,samdoran/homebrew-cask,timsutton/homebrew-cask,mattrobenolt/homebrew-cask,BenjaminHCCarr/homebrew-cask,inta/homebrew-cask,cblecker/homebrew-cask,Ketouem/homebrew-cask,RJHsiao/homebrew-cask,mahori/homebrew-cask,kkdd/homebrew-cask,Ngrd/homebrew-cask,colindean/homebrew-cask,diguage/homebrew-cask,13k/homebrew-cask,uetchy/homebrew-cask,Cottser/homebrew-cask,coeligena/homebrew-customized,puffdad/homebrew-cask,scribblemaniac/homebrew-cask,shoichiaizawa/homebrew-cask,andrewdisley/homebrew-cask,mikem/homebrew-cask,mathbunnyru/homebrew-cask,wmorin/homebrew-cask,tedski/homebrew-cask,jawshooah/homebrew-cask,tedski/homebrew-cask,lukasbestle/homebrew-cask,esebastian/homebrew-cask,skatsuta/homebrew-cask,hristozov/homebrew-cask,yumitsu/homebrew-cask,dvdoliveira/homebrew-cask,blainesch/homebrew-cask,nrlquaker/homebrew-cask,wmorin/homebrew-cask,mauricerkelly/homebrew-cask,seanzxx/homebrew-cask,mwean/homebrew-cask,boecko/homebrew-cask,forevergenin/homebrew-cask,dcondrey/homebrew-cask,mlocher/homebrew-cask,nathanielvarona/homebrew-cask,sanyer/homebrew-cask,nrlquaker/homebrew-cask,janlugt/homebrew-cask,13k/homebrew-cask,Amorymeltzer/homebrew-cask,josa42/homebrew-cask,phpwutz/homebrew-cask,nrlquaker/homebrew-cask,kesara/homebrew-cask,jellyfishcoder/homebrew-cask,doits/homebrew-cask,MichaelPei/homebrew-cask,Labutin/homebrew-cask,Amorymeltzer/homebrew-cask,devmynd/homebrew-cask,tangestani/homebrew-cask,blogabe/homebrew-cask,hristozov/homebrew-cask,sgnh/homebrew-cask,pkq/homebrew-cask,a1russell/homebrew-cask,deiga/homebrew-cask,caskroom/homebrew-cask,kronicd/homebrew-cask,m3nu/homebrew-cask,mlocher/homebrew-cask,haha1903/homebrew-cask,paour/homebrew-cask,hakamadare/homebrew-cask,alebcay/homebrew-cask,leipert/homebrew-cask,malford/homebrew-cask,kassi/homebrew-cask,adrianchia/homebrew-cask,xcezx/homebrew-cask,jalaziz/homebrew-cask,skatsuta/homebrew-cask,n0ts/homebrew-cask,muan/homebrew-cask,mchlrmrz/homebrew-cask,tjt263/homebrew-cask,hyuna917/homebrew-cask,stephenwade/homebrew-cask,ebraminio/homebrew-cask,bric3/homebrew-cask,rogeriopradoj/homebrew-cask,sanyer/homebrew-cask,Cottser/homebrew-cask,asins/homebrew-cask,yuhki50/homebrew-cask,reelsense/homebrew-cask,imgarylai/homebrew-cask,mikem/homebrew-cask,tjt263/homebrew-cask,wastrachan/homebrew-cask,kronicd/homebrew-cask,jiashuw/homebrew-cask,alebcay/homebrew-cask,bric3/homebrew-cask,doits/homebrew-cask,morganestes/homebrew-cask,athrunsun/homebrew-cask,hovancik/homebrew-cask,gerrypower/homebrew-cask,julionc/homebrew-cask,jedahan/homebrew-cask,arronmabrey/homebrew-cask,sscotth/homebrew-cask,joschi/homebrew-cask,renaudguerin/homebrew-cask,thii/homebrew-cask,bosr/homebrew-cask,kongslund/homebrew-cask,pkq/homebrew-cask,amatos/homebrew-cask,hanxue/caskroom,alexg0/homebrew-cask,shorshe/homebrew-cask,yutarody/homebrew-cask,reitermarkus/homebrew-cask,tjnycum/homebrew-cask,rajiv/homebrew-cask,squid314/homebrew-cask,lantrix/homebrew-cask,vitorgalvao/homebrew-cask,0rax/homebrew-cask,colindunn/homebrew-cask,adrianchia/homebrew-cask,RJHsiao/homebrew-cask,mjgardner/homebrew-cask,okket/homebrew-cask,jacobbednarz/homebrew-cask,franklouwers/homebrew-cask,singingwolfboy/homebrew-cask,mhubig/homebrew-cask,moimikey/homebrew-cask,KosherBacon/homebrew-cask,joshka/homebrew-cask,kingthorin/homebrew-cask,jangalinski/homebrew-cask,kingthorin/homebrew-cask,m3nu/homebrew-cask,BenjaminHCCarr/homebrew-cask,kingthorin/homebrew-cask,patresi/homebrew-cask,SentinelWarren/homebrew-cask,kTitan/homebrew-cask,jasmas/homebrew-cask,a1russell/homebrew-cask,dictcp/homebrew-cask,xight/homebrew-cask,boecko/homebrew-cask,miccal/homebrew-cask,syscrusher/homebrew-cask,johnjelinek/homebrew-cask,cliffcotino/homebrew-cask,kesara/homebrew-cask,lumaxis/homebrew-cask,usami-k/homebrew-cask,samdoran/homebrew-cask,malob/homebrew-cask,cliffcotino/homebrew-cask,guerrero/homebrew-cask,asins/homebrew-cask,gmkey/homebrew-cask,ksylvan/homebrew-cask,Amorymeltzer/homebrew-cask,antogg/homebrew-cask,chrisfinazzo/homebrew-cask,jeroenj/homebrew-cask,markthetech/homebrew-cask,FredLackeyOfficial/homebrew-cask,coeligena/homebrew-customized,0xadada/homebrew-cask,jbeagley52/homebrew-cask,scribblemaniac/homebrew-cask,xtian/homebrew-cask,chadcatlett/caskroom-homebrew-cask,wickedsp1d3r/homebrew-cask,hanxue/caskroom,yurikoles/homebrew-cask,danielbayley/homebrew-cask,leipert/homebrew-cask,muan/homebrew-cask,thehunmonkgroup/homebrew-cask,alebcay/homebrew-cask,gilesdring/homebrew-cask,riyad/homebrew-cask,sebcode/homebrew-cask,0rax/homebrew-cask,devmynd/homebrew-cask,bric3/homebrew-cask,mahori/homebrew-cask,AnastasiaSulyagina/homebrew-cask,nshemonsky/homebrew-cask,chadcatlett/caskroom-homebrew-cask,andrewdisley/homebrew-cask,seanzxx/homebrew-cask,kkdd/homebrew-cask,joshka/homebrew-cask,perfide/homebrew-cask,inz/homebrew-cask,gabrielizaias/homebrew-cask,phpwutz/homebrew-cask,vin047/homebrew-cask,lifepillar/homebrew-cask,ericbn/homebrew-cask,Ephemera/homebrew-cask,joschi/homebrew-cask,sanchezm/homebrew-cask,JosephViolago/homebrew-cask,sosedoff/homebrew-cask,vin047/homebrew-cask,inta/homebrew-cask,coeligena/homebrew-customized,diguage/homebrew-cask,larseggert/homebrew-cask,wastrachan/homebrew-cask,singingwolfboy/homebrew-cask,elyscape/homebrew-cask,jgarber623/homebrew-cask,opsdev-ws/homebrew-cask,franklouwers/homebrew-cask,gerrypower/homebrew-cask,inz/homebrew-cask,BenjaminHCCarr/homebrew-cask,kamilboratynski/homebrew-cask,sscotth/homebrew-cask,cobyism/homebrew-cask,kTitan/homebrew-cask,schneidmaster/homebrew-cask,Ketouem/homebrew-cask,esebastian/homebrew-cask,morganestes/homebrew-cask,paour/homebrew-cask,jalaziz/homebrew-cask,m3nu/homebrew-cask,alexg0/homebrew-cask,mrmachine/homebrew-cask,jgarber623/homebrew-cask,jiashuw/homebrew-cask,chuanxd/homebrew-cask,miccal/homebrew-cask,okket/homebrew-cask,mazehall/homebrew-cask,kamilboratynski/homebrew-cask,adrianchia/homebrew-cask,blogabe/homebrew-cask,antogg/homebrew-cask,shoichiaizawa/homebrew-cask,perfide/homebrew-cask,sanchezm/homebrew-cask,koenrh/homebrew-cask,exherb/homebrew-cask,julionc/homebrew-cask,Ephemera/homebrew-cask,gyndav/homebrew-cask,y00rb/homebrew-cask,paour/homebrew-cask,toonetown/homebrew-cask,goxberry/homebrew-cask,mishari/homebrew-cask,deanmorin/homebrew-cask,jgarber623/homebrew-cask,MircoT/homebrew-cask,vigosan/homebrew-cask,rajiv/homebrew-cask,ebraminio/homebrew-cask,scribblemaniac/homebrew-cask,daften/homebrew-cask,AnastasiaSulyagina/homebrew-cask,blogabe/homebrew-cask,cfillion/homebrew-cask,FinalDes/homebrew-cask,Ephemera/homebrew-cask,optikfluffel/homebrew-cask,ptb/homebrew-cask,decrement/homebrew-cask,mattrobenolt/homebrew-cask,vigosan/homebrew-cask,julionc/homebrew-cask,opsdev-ws/homebrew-cask,koenrh/homebrew-cask,moogar0880/homebrew-cask,pacav69/homebrew-cask,jconley/homebrew-cask,troyxmccall/homebrew-cask,haha1903/homebrew-cask,gmkey/homebrew-cask,sscotth/homebrew-cask,FinalDes/homebrew-cask,jconley/homebrew-cask,joschi/homebrew-cask,pacav69/homebrew-cask,mahori/homebrew-cask,jasmas/homebrew-cask,hyuna917/homebrew-cask,hellosky806/homebrew-cask,lukasbestle/homebrew-cask,dictcp/homebrew-cask,n0ts/homebrew-cask,wickles/homebrew-cask,mhubig/homebrew-cask,MichaelPei/homebrew-cask,tangestani/homebrew-cask,dcondrey/homebrew-cask,claui/homebrew-cask,josa42/homebrew-cask,JacopKane/homebrew-cask,nathancahill/homebrew-cask,nshemonsky/homebrew-cask,sanyer/homebrew-cask,cprecioso/homebrew-cask,JacopKane/homebrew-cask,samnung/homebrew-cask,reelsense/homebrew-cask,sohtsuka/homebrew-cask,wmorin/homebrew-cask,bdhess/homebrew-cask,chuanxd/homebrew-cask,artdevjs/homebrew-cask,mchlrmrz/homebrew-cask,gilesdring/homebrew-cask,xight/homebrew-cask,Saklad5/homebrew-cask,jmeridth/homebrew-cask,riyad/homebrew-cask,sosedoff/homebrew-cask,giannitm/homebrew-cask,amatos/homebrew-cask,slack4u/homebrew-cask,Ngrd/homebrew-cask,xyb/homebrew-cask,moogar0880/homebrew-cask,psibre/homebrew-cask,sohtsuka/homebrew-cask,cobyism/homebrew-cask,gyndav/homebrew-cask,shonjir/homebrew-cask,josa42/homebrew-cask,schneidmaster/homebrew-cask | ruby | ## Code Before:
cask 'logdna-cli' do
version '1.0.9'
sha256 '76531e0538c9c8945ade50fc5707e1d34945b364a6475f38af6ccd499aad2aaa'
url "https://github.com/logdna/logdna-cli/releases/download/#{version}/logdna-mac-cli.pkg"
appcast 'https://github.com/logdna/logdna-cli/releases.atom',
checkpoint: '9c67fddd3ec1be4675c32dc6078380d100a379a5bd6de9f34bcf4d4052e66301'
name 'LogDNA CLI'
homepage 'https://www.logdna.com/'
license :mit
pkg 'logdna-mac-cli.pkg'
uninstall pkgutil: 'com.logdna.logdna-cli'
end
## Instruction:
Fix `url` stanza comment for LogDNA CLI.
## Code After:
cask 'logdna-cli' do
version '1.0.9'
sha256 '76531e0538c9c8945ade50fc5707e1d34945b364a6475f38af6ccd499aad2aaa'
# github.com/logdna/logdna-cli was verified as official when first introduced to the cask
url "https://github.com/logdna/logdna-cli/releases/download/#{version}/logdna-mac-cli.pkg"
appcast 'https://github.com/logdna/logdna-cli/releases.atom',
checkpoint: '9c67fddd3ec1be4675c32dc6078380d100a379a5bd6de9f34bcf4d4052e66301'
name 'LogDNA CLI'
homepage 'https://www.logdna.com/'
license :mit
pkg 'logdna-mac-cli.pkg'
uninstall pkgutil: 'com.logdna.logdna-cli'
end
| cask 'logdna-cli' do
version '1.0.9'
sha256 '76531e0538c9c8945ade50fc5707e1d34945b364a6475f38af6ccd499aad2aaa'
+ # github.com/logdna/logdna-cli was verified as official when first introduced to the cask
url "https://github.com/logdna/logdna-cli/releases/download/#{version}/logdna-mac-cli.pkg"
appcast 'https://github.com/logdna/logdna-cli/releases.atom',
checkpoint: '9c67fddd3ec1be4675c32dc6078380d100a379a5bd6de9f34bcf4d4052e66301'
name 'LogDNA CLI'
homepage 'https://www.logdna.com/'
license :mit
pkg 'logdna-mac-cli.pkg'
uninstall pkgutil: 'com.logdna.logdna-cli'
end | 1 | 0.066667 | 1 | 0 |
68823230b7cc2bdc3ed3acd0c4729ba23e7bc985 | .travis.yml | .travis.yml | before_script:
- "sh -e /etc/init.d/xvfb start"
script: "DISPLAY=:99.0 bundle exec rake"
rvm:
- "1.8.7"
- "1.9.2"
- "1.9.3"
- "ree"
- "jruby"
- "rbx"
env:
- "RAILS_VERSION=rails2"
- "RAILS_VERSION=rails2_3_5"
- "RAILS_VERSION=rails3"
- "RAILS_VERSION=pojs-rspec1"
- "RAILS_VERSION=pojs-rspec2"
| before_script:
- "sh -e /etc/init.d/xvfb start"
script: "DISPLAY=:99.0 bundle exec rake"
rvm:
- "1.8.7"
- "1.9.2"
- "1.9.3"
- "ree"
- "jruby"
- "rbx"
env:
- "RAILS_VERSION=rails2"
- "RAILS_VERSION=rails2_3_5"
- "RAILS_VERSION=rails3"
- "RAILS_VERSION=pojs-rspec1"
- "RAILS_VERSION=pojs-rspec2"
matrix:
exclude:
- rvm: rbx
env: RAILS_VERSION=rails2
- rvm: rbx
env: RAILS_VERSION=rails2_3_5
- rvm: rbx
env: RAILS_VERSION=pojs-rspec1
- rvm: rbx
env: RAILS_VERSION=pojs-rspec2
- rvm: jruby
env: RAILS_VERSION=rails2
- rvm: jruby
env: RAILS_VERSION=rails2_3_5
- rvm: jruby
env: RAILS_VERSION=pojs-rspec1
- rvm: jruby
env: RAILS_VERSION=pojs-rspec2
- rvm: 1.9.2
env: RAILS_VERSION=rails2
- rvm: 1.9.2
env: RAILS_VERSION=rails2_3_5
- rvm: 1.9.2
env: RAILS_VERSION=pojs-rspec1
- rvm: 1.9.2
env: RAILS_VERSION=pojs-rspec2
- rvm: ree
env: RAILS_VERSION=pojs-rspec2
- rvm: 1.8.7
env: RAILS_VERSION=rails2
- rvm: 1.8.7
env: RAILS_VERSION=rails2_3_5
- rvm: 1.8.7
env: RAILS_VERSION=pojs-rspec1
- rvm: 1.8.7
env: RAILS_VERSION=pojs-rspec2
| Exclude legacy/regression builds on exotic rvms. | Exclude legacy/regression builds on exotic rvms.
- All builds will run on 1.9.3, most builds on ree.
Otherwise just run the rails3 build. Cross-ruby
failure tends to be gem related; the rails3 builds
should be enough to trigger that problem.
| YAML | mit | tjgrathwell/jasmine-gem,irfanah/jasmine-gem,mavenlink/jasmine-gem,brigade/jasmine-gem,tgaff/jasmine-gem,kapost/jasmine-gem,irfanah/jasmine-gem,mavenlink/jasmine-gem,mavenlink/jasmine-gem,irfanah/jasmine-gem,brigade/jasmine-gem,amandamholl/jasmine-gem,amandamholl/jasmine-gem,tgaff/jasmine-gem,kapost/jasmine-gem,tjgrathwell/jasmine-gem,brigade/jasmine-gem,amandamholl/jasmine-gem | yaml | ## Code Before:
before_script:
- "sh -e /etc/init.d/xvfb start"
script: "DISPLAY=:99.0 bundle exec rake"
rvm:
- "1.8.7"
- "1.9.2"
- "1.9.3"
- "ree"
- "jruby"
- "rbx"
env:
- "RAILS_VERSION=rails2"
- "RAILS_VERSION=rails2_3_5"
- "RAILS_VERSION=rails3"
- "RAILS_VERSION=pojs-rspec1"
- "RAILS_VERSION=pojs-rspec2"
## Instruction:
Exclude legacy/regression builds on exotic rvms.
- All builds will run on 1.9.3, most builds on ree.
Otherwise just run the rails3 build. Cross-ruby
failure tends to be gem related; the rails3 builds
should be enough to trigger that problem.
## Code After:
before_script:
- "sh -e /etc/init.d/xvfb start"
script: "DISPLAY=:99.0 bundle exec rake"
rvm:
- "1.8.7"
- "1.9.2"
- "1.9.3"
- "ree"
- "jruby"
- "rbx"
env:
- "RAILS_VERSION=rails2"
- "RAILS_VERSION=rails2_3_5"
- "RAILS_VERSION=rails3"
- "RAILS_VERSION=pojs-rspec1"
- "RAILS_VERSION=pojs-rspec2"
matrix:
exclude:
- rvm: rbx
env: RAILS_VERSION=rails2
- rvm: rbx
env: RAILS_VERSION=rails2_3_5
- rvm: rbx
env: RAILS_VERSION=pojs-rspec1
- rvm: rbx
env: RAILS_VERSION=pojs-rspec2
- rvm: jruby
env: RAILS_VERSION=rails2
- rvm: jruby
env: RAILS_VERSION=rails2_3_5
- rvm: jruby
env: RAILS_VERSION=pojs-rspec1
- rvm: jruby
env: RAILS_VERSION=pojs-rspec2
- rvm: 1.9.2
env: RAILS_VERSION=rails2
- rvm: 1.9.2
env: RAILS_VERSION=rails2_3_5
- rvm: 1.9.2
env: RAILS_VERSION=pojs-rspec1
- rvm: 1.9.2
env: RAILS_VERSION=pojs-rspec2
- rvm: ree
env: RAILS_VERSION=pojs-rspec2
- rvm: 1.8.7
env: RAILS_VERSION=rails2
- rvm: 1.8.7
env: RAILS_VERSION=rails2_3_5
- rvm: 1.8.7
env: RAILS_VERSION=pojs-rspec1
- rvm: 1.8.7
env: RAILS_VERSION=pojs-rspec2
| before_script:
- "sh -e /etc/init.d/xvfb start"
script: "DISPLAY=:99.0 bundle exec rake"
rvm:
- "1.8.7"
- "1.9.2"
- "1.9.3"
- "ree"
- "jruby"
- "rbx"
env:
- "RAILS_VERSION=rails2"
- "RAILS_VERSION=rails2_3_5"
- "RAILS_VERSION=rails3"
- "RAILS_VERSION=pojs-rspec1"
- "RAILS_VERSION=pojs-rspec2"
+
+ matrix:
+ exclude:
+ - rvm: rbx
+ env: RAILS_VERSION=rails2
+ - rvm: rbx
+ env: RAILS_VERSION=rails2_3_5
+ - rvm: rbx
+ env: RAILS_VERSION=pojs-rspec1
+ - rvm: rbx
+ env: RAILS_VERSION=pojs-rspec2
+ - rvm: jruby
+ env: RAILS_VERSION=rails2
+ - rvm: jruby
+ env: RAILS_VERSION=rails2_3_5
+ - rvm: jruby
+ env: RAILS_VERSION=pojs-rspec1
+ - rvm: jruby
+ env: RAILS_VERSION=pojs-rspec2
+ - rvm: 1.9.2
+ env: RAILS_VERSION=rails2
+ - rvm: 1.9.2
+ env: RAILS_VERSION=rails2_3_5
+ - rvm: 1.9.2
+ env: RAILS_VERSION=pojs-rspec1
+ - rvm: 1.9.2
+ env: RAILS_VERSION=pojs-rspec2
+ - rvm: ree
+ env: RAILS_VERSION=pojs-rspec2
+ - rvm: 1.8.7
+ env: RAILS_VERSION=rails2
+ - rvm: 1.8.7
+ env: RAILS_VERSION=rails2_3_5
+ - rvm: 1.8.7
+ env: RAILS_VERSION=pojs-rspec1
+ - rvm: 1.8.7
+ env: RAILS_VERSION=pojs-rspec2 | 37 | 2.055556 | 37 | 0 |
6905fe6866ea1a591a43fe49ad7a1861ae4bc177 | css/styles.sass | css/styles.sass | ---
---
@import "../_sass/reset"
@import "../_sass/skin"
@import "../_sass/code-styles"
// media queries
@import "../_sass/base"
@import "../_sass/tablet"
@import "../_sass/desktop"
| ---
---
@import "../_sass/reset"
@import "../_sass/skin"
@import "../_sass/code-styles"
// media queries
@import "../_sass/base"
@import "../_sass/tablet"
@import "../_sass/desktop"
blockquote
background: #f9f9f9
border-left: 10px solid #ccc
margin: 1.5em 10px
padding: 0.5em 10px
quotes: none
blockquote p
display: inline
| Add css styling for quotes. | Add css styling for quotes.
| Sass | apache-2.0 | tomdee/calico,bcreane/calico,fasaxc/calico,bcreane/calico,tomdee/calico,bcreane/calico,caseydavenport/calico,heschlie/calico,caseydavenport/calico,gunjan5/calico,heschlie/calico,bcreane/calico,heschlie/calico,fasaxc/calico,heschlie/calico,bcreane/calico,tomdee/calico,gunjan5/calico,fasaxc/calico,caseydavenport/calico,gunjan5/calico,gunjan5/calico,heschlie/calico,heschlie/calico,caseydavenport/calico,gunjan5/calico,caseydavenport/calico,gunjan5/calico,caseydavenport/calico,fasaxc/calico,tomdee/calico,tomdee/calico,bcreane/calico | sass | ## Code Before:
---
---
@import "../_sass/reset"
@import "../_sass/skin"
@import "../_sass/code-styles"
// media queries
@import "../_sass/base"
@import "../_sass/tablet"
@import "../_sass/desktop"
## Instruction:
Add css styling for quotes.
## Code After:
---
---
@import "../_sass/reset"
@import "../_sass/skin"
@import "../_sass/code-styles"
// media queries
@import "../_sass/base"
@import "../_sass/tablet"
@import "../_sass/desktop"
blockquote
background: #f9f9f9
border-left: 10px solid #ccc
margin: 1.5em 10px
padding: 0.5em 10px
quotes: none
blockquote p
display: inline
| ---
---
@import "../_sass/reset"
@import "../_sass/skin"
@import "../_sass/code-styles"
// media queries
@import "../_sass/base"
@import "../_sass/tablet"
@import "../_sass/desktop"
+ blockquote
+ background: #f9f9f9
+ border-left: 10px solid #ccc
+ margin: 1.5em 10px
+ padding: 0.5em 10px
+ quotes: none
+
+ blockquote p
+ display: inline | 9 | 0.692308 | 9 | 0 |
9da3f2a835fa2aaba5d91ffe31b3fcaf8d83a4c9 | snake/main.py | snake/main.py | import os
import sys
from snake.core import Snake
SNAKEFILE_LOADED = False
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def load_snakefile(path, fail_silently=False):
global SNAKEFILE_LOADED
if not SNAKEFILE_LOADED:
sys.path.insert(0, path)
try:
return __import__('snakefile')
except ImportError:
if not fail_silently:
abort("couldn't find any snakefile.")
else:
SNAKEFILE_LOADED = True
del sys.path[0]
def find_snakefile():
global SNAKEFILE_LOADED
path = os.getcwd()
while True:
filepath = os.path.join(path, 'snakefile.py')
if os.path.isfile(filepath):
return load_snakefile(path), filepath
if not os.path.split(path)[1]:
break
path = os.path.split(path)[0]
if not SNAKEFILE_LOADED:
abort("couldn't find any snakefile.")
def main():
snakefile, snakefilepath = find_snakefile()
for name in dir(snakefile):
attr = getattr(snakefile, name)
if isinstance(attr, Snake):
attr.run(snakefilepath)
break
else:
abort("couldn't find any Snake instance in snakefile.")
| import imp
import os
import sys
from snake.core import Snake
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def get_ascending_paths(path):
paths = []
while True:
paths.append(path)
path, tail = os.path.split(path)
if not tail:
break
return paths
def find_snakefile():
paths = get_ascending_paths(os.getcwd())
try:
return imp.find_module('snakefile', paths)
except:
abort("couldn't find any snakefile.")
def get_snakefile():
return imp.load_module('snakefile', *find_snakefile())
def main():
snakefile = get_snakefile()
for name in dir(snakefile):
attr = getattr(snakefile, name)
if isinstance(attr, Snake):
attr.run(snakefile.__file__)
break
else:
abort("couldn't find any Snake instance in snakefile.")
| Improve the way snakefile loading works | Improve the way snakefile loading works
| Python | bsd-2-clause | yumike/snake | python | ## Code Before:
import os
import sys
from snake.core import Snake
SNAKEFILE_LOADED = False
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def load_snakefile(path, fail_silently=False):
global SNAKEFILE_LOADED
if not SNAKEFILE_LOADED:
sys.path.insert(0, path)
try:
return __import__('snakefile')
except ImportError:
if not fail_silently:
abort("couldn't find any snakefile.")
else:
SNAKEFILE_LOADED = True
del sys.path[0]
def find_snakefile():
global SNAKEFILE_LOADED
path = os.getcwd()
while True:
filepath = os.path.join(path, 'snakefile.py')
if os.path.isfile(filepath):
return load_snakefile(path), filepath
if not os.path.split(path)[1]:
break
path = os.path.split(path)[0]
if not SNAKEFILE_LOADED:
abort("couldn't find any snakefile.")
def main():
snakefile, snakefilepath = find_snakefile()
for name in dir(snakefile):
attr = getattr(snakefile, name)
if isinstance(attr, Snake):
attr.run(snakefilepath)
break
else:
abort("couldn't find any Snake instance in snakefile.")
## Instruction:
Improve the way snakefile loading works
## Code After:
import imp
import os
import sys
from snake.core import Snake
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
def get_ascending_paths(path):
paths = []
while True:
paths.append(path)
path, tail = os.path.split(path)
if not tail:
break
return paths
def find_snakefile():
paths = get_ascending_paths(os.getcwd())
try:
return imp.find_module('snakefile', paths)
except:
abort("couldn't find any snakefile.")
def get_snakefile():
return imp.load_module('snakefile', *find_snakefile())
def main():
snakefile = get_snakefile()
for name in dir(snakefile):
attr = getattr(snakefile, name)
if isinstance(attr, Snake):
attr.run(snakefile.__file__)
break
else:
abort("couldn't find any Snake instance in snakefile.")
| + import imp
import os
import sys
-
from snake.core import Snake
-
-
- SNAKEFILE_LOADED = False
def abort(msg):
print >> sys.stderr, "Error: %s" % msg
sys.exit(1)
+ def get_ascending_paths(path):
+ paths = []
+ while True:
+ paths.append(path)
+ path, tail = os.path.split(path)
+ if not tail:
+ break
+ return paths
- def load_snakefile(path, fail_silently=False):
- global SNAKEFILE_LOADED
- if not SNAKEFILE_LOADED:
- sys.path.insert(0, path)
- try:
- return __import__('snakefile')
- except ImportError:
- if not fail_silently:
- abort("couldn't find any snakefile.")
- else:
- SNAKEFILE_LOADED = True
- del sys.path[0]
def find_snakefile():
+ paths = get_ascending_paths(os.getcwd())
+ try:
+ return imp.find_module('snakefile', paths)
+ except:
- global SNAKEFILE_LOADED
- path = os.getcwd()
- while True:
- filepath = os.path.join(path, 'snakefile.py')
- if os.path.isfile(filepath):
- return load_snakefile(path), filepath
- if not os.path.split(path)[1]:
- break
- path = os.path.split(path)[0]
- if not SNAKEFILE_LOADED:
abort("couldn't find any snakefile.")
+ def get_snakefile():
+ return imp.load_module('snakefile', *find_snakefile())
+
+
def main():
- snakefile, snakefilepath = find_snakefile()
+ snakefile = get_snakefile()
for name in dir(snakefile):
attr = getattr(snakefile, name)
if isinstance(attr, Snake):
- attr.run(snakefilepath)
? ^^^^
+ attr.run(snakefile.__file__)
? ^^^^^^^^^
break
else:
abort("couldn't find any Snake instance in snakefile.") | 47 | 0.921569 | 19 | 28 |
f1a5e2f7930d3504ccea7b22adfd517bc82251c9 | .travis.yml | .travis.yml | language: python
python:
- "3.7-dev"
cache: pip
install:
- pip install -r requirements.txt
script:
- pylint tracki
- flake8
- mypy tracki
- pytest
| language: python
python:
- "3.7"
dist: xenial
cache: pip
install:
- pip install -r requirements.txt
script:
- pylint tracki
- flake8
- mypy tracki
- pytest
| Use xenial and Python 3.7 on Travis | Use xenial and Python 3.7 on Travis
| YAML | mit | rok-povsic/Tracki | yaml | ## Code Before:
language: python
python:
- "3.7-dev"
cache: pip
install:
- pip install -r requirements.txt
script:
- pylint tracki
- flake8
- mypy tracki
- pytest
## Instruction:
Use xenial and Python 3.7 on Travis
## Code After:
language: python
python:
- "3.7"
dist: xenial
cache: pip
install:
- pip install -r requirements.txt
script:
- pylint tracki
- flake8
- mypy tracki
- pytest
| language: python
python:
- - "3.7-dev"
? ----
+ - "3.7"
+
+ dist: xenial
cache: pip
install:
- pip install -r requirements.txt
script:
- pylint tracki
- flake8
- mypy tracki
- pytest | 4 | 0.266667 | 3 | 1 |
b145b03b2569f4a82adefe57e843ef91384c47a4 | panoptes/state_machine/states/core.py | panoptes/state_machine/states/core.py | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)
super().__init__(name=name, on_enter=['execute'])
self._sleep_delay = 3 # seconds
def main(self, event_data):
assert self.panoptes is not None
msg = "Must implement `main` method inside class {}. Exiting".format(self.name)
self.panoptes.logger.warning(msg) | import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)
super().__init__(name=name, on_enter=['execute'])
self._sleep_delay = 3 # seconds
def main(self, event_data):
msg = "Must implement `main` method inside class {}. Exiting".format(self.name)
raise NotImplementedError(msg)
| Raise exception for state not overriding main | Raise exception for state not overriding main
| Python | mit | joshwalawender/POCS,panoptes/POCS,panoptes/POCS,joshwalawender/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,AstroHuntsman/POCS,joshwalawender/POCS,AstroHuntsman/POCS,panoptes/POCS,panoptes/POCS | python | ## Code Before:
import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)
super().__init__(name=name, on_enter=['execute'])
self._sleep_delay = 3 # seconds
def main(self, event_data):
assert self.panoptes is not None
msg = "Must implement `main` method inside class {}. Exiting".format(self.name)
self.panoptes.logger.warning(msg)
## Instruction:
Raise exception for state not overriding main
## Code After:
import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)
super().__init__(name=name, on_enter=['execute'])
self._sleep_delay = 3 # seconds
def main(self, event_data):
msg = "Must implement `main` method inside class {}. Exiting".format(self.name)
raise NotImplementedError(msg)
| import time
import transitions
from panoptes.utils.logger import has_logger
@has_logger
class PanState(transitions.State):
""" Base class for PANOPTES transitions """
def __init__(self, *args, **kwargs):
name = kwargs.get('name', self.__class__)
self.panoptes = kwargs.get('panoptes', None)
super().__init__(name=name, on_enter=['execute'])
self._sleep_delay = 3 # seconds
def main(self, event_data):
- assert self.panoptes is not None
msg = "Must implement `main` method inside class {}. Exiting".format(self.name)
- self.panoptes.logger.warning(msg)
+ raise NotImplementedError(msg) | 3 | 0.125 | 1 | 2 |
b662250670d69e6b1a45aae8de67f6eb48d37b61 | src/worker/windows/subscription.h | src/worker/windows/subscription.h |
class WindowsWorkerPlatform;
class Subscription
{
public:
Subscription(ChannelID channel,
HANDLE root,
const std::wstring &path,
bool recursive,
WindowsWorkerPlatform *platform);
~Subscription();
Result<bool> schedule(LPOVERLAPPED_COMPLETION_ROUTINE fn);
Result<> use_network_size();
BYTE *get_written(DWORD written_size);
Result<std::string> get_root_path();
std::wstring make_absolute(const std::wstring &sub_path);
Result<> stop(const CommandID command);
CommandID get_command_id() const { return command; }
ChannelID get_channel() const { return channel; }
WindowsWorkerPlatform *get_platform() const { return platform; }
bool is_terminating() const { return terminating; }
private:
CommandID command;
ChannelID channel;
WindowsWorkerPlatform *platform;
std::wstring path;
HANDLE root;
OVERLAPPED overlapped;
bool recursive;
bool terminating;
DWORD buffer_size;
std::unique_ptr<BYTE[]> buffer;
std::unique_ptr<BYTE[]> written;
};
#endif
|
class WindowsWorkerPlatform;
class Subscription
{
public:
Subscription(ChannelID channel,
HANDLE root,
const std::wstring &path,
bool recursive,
WindowsWorkerPlatform *platform);
~Subscription();
Result<bool> schedule(LPOVERLAPPED_COMPLETION_ROUTINE fn);
Result<> use_network_size();
BYTE *get_written(DWORD written_size);
Result<std::string> get_root_path();
std::wstring make_absolute(const std::wstring &sub_path);
Result<> stop(const CommandID command);
const CommandID &get_command_id() const { return command; }
const ChannelID &get_channel() const { return channel; }
WindowsWorkerPlatform *get_platform() const { return platform; }
const bool &is_recursive() const { return recursive; }
const bool &is_terminating() const { return terminating; }
private:
CommandID command;
ChannelID channel;
WindowsWorkerPlatform *platform;
std::wstring path;
HANDLE root;
OVERLAPPED overlapped;
bool recursive;
bool terminating;
DWORD buffer_size;
std::unique_ptr<BYTE[]> buffer;
std::unique_ptr<BYTE[]> written;
};
#endif
| Return const & from getters | Return const & from getters
| C | mit | atom/watcher,atom/watcher,atom/watcher,atom/watcher,atom/watcher | c | ## Code Before:
class WindowsWorkerPlatform;
class Subscription
{
public:
Subscription(ChannelID channel,
HANDLE root,
const std::wstring &path,
bool recursive,
WindowsWorkerPlatform *platform);
~Subscription();
Result<bool> schedule(LPOVERLAPPED_COMPLETION_ROUTINE fn);
Result<> use_network_size();
BYTE *get_written(DWORD written_size);
Result<std::string> get_root_path();
std::wstring make_absolute(const std::wstring &sub_path);
Result<> stop(const CommandID command);
CommandID get_command_id() const { return command; }
ChannelID get_channel() const { return channel; }
WindowsWorkerPlatform *get_platform() const { return platform; }
bool is_terminating() const { return terminating; }
private:
CommandID command;
ChannelID channel;
WindowsWorkerPlatform *platform;
std::wstring path;
HANDLE root;
OVERLAPPED overlapped;
bool recursive;
bool terminating;
DWORD buffer_size;
std::unique_ptr<BYTE[]> buffer;
std::unique_ptr<BYTE[]> written;
};
#endif
## Instruction:
Return const & from getters
## Code After:
class WindowsWorkerPlatform;
class Subscription
{
public:
Subscription(ChannelID channel,
HANDLE root,
const std::wstring &path,
bool recursive,
WindowsWorkerPlatform *platform);
~Subscription();
Result<bool> schedule(LPOVERLAPPED_COMPLETION_ROUTINE fn);
Result<> use_network_size();
BYTE *get_written(DWORD written_size);
Result<std::string> get_root_path();
std::wstring make_absolute(const std::wstring &sub_path);
Result<> stop(const CommandID command);
const CommandID &get_command_id() const { return command; }
const ChannelID &get_channel() const { return channel; }
WindowsWorkerPlatform *get_platform() const { return platform; }
const bool &is_recursive() const { return recursive; }
const bool &is_terminating() const { return terminating; }
private:
CommandID command;
ChannelID channel;
WindowsWorkerPlatform *platform;
std::wstring path;
HANDLE root;
OVERLAPPED overlapped;
bool recursive;
bool terminating;
DWORD buffer_size;
std::unique_ptr<BYTE[]> buffer;
std::unique_ptr<BYTE[]> written;
};
#endif
|
class WindowsWorkerPlatform;
class Subscription
{
public:
Subscription(ChannelID channel,
HANDLE root,
const std::wstring &path,
bool recursive,
WindowsWorkerPlatform *platform);
~Subscription();
Result<bool> schedule(LPOVERLAPPED_COMPLETION_ROUTINE fn);
Result<> use_network_size();
BYTE *get_written(DWORD written_size);
Result<std::string> get_root_path();
std::wstring make_absolute(const std::wstring &sub_path);
Result<> stop(const CommandID command);
- CommandID get_command_id() const { return command; }
+ const CommandID &get_command_id() const { return command; }
? ++++++ +
- ChannelID get_channel() const { return channel; }
+ const ChannelID &get_channel() const { return channel; }
? ++++++ +
WindowsWorkerPlatform *get_platform() const { return platform; }
+ const bool &is_recursive() const { return recursive; }
+
- bool is_terminating() const { return terminating; }
+ const bool &is_terminating() const { return terminating; }
? ++++++ +
private:
CommandID command;
ChannelID channel;
WindowsWorkerPlatform *platform;
std::wstring path;
HANDLE root;
OVERLAPPED overlapped;
bool recursive;
bool terminating;
DWORD buffer_size;
std::unique_ptr<BYTE[]> buffer;
std::unique_ptr<BYTE[]> written;
};
#endif | 8 | 0.156863 | 5 | 3 |
f1f6bd4f4777ae39ba67aa5a7ec3adb8e3a8e58f | public/humans.txt | public/humans.txt |
Copyright 2013-2016
--------------
Daniel Paulino Alves (danpaulalves at gmail.com)
Diego de Araújo Martinez Camarinha (diegoamc90 at gmail.com)
Heitor Reis Ribeiro (marcheing at gmail.com)
Paulo Meirelles (paulo at softwarelivre.org)
Rafael Reggiani Manzo (rr.manzo at gmail.com)
# THANKSs
Former team members
---------------------------------------------------------
Fellipe Souto Sampaio (fllsouto at gmail.com)
Alessandro Palmeira (alessandro.palmeira at gmail.com)
Renan Fichberg (rfichberg at gmail.com)
# TECHNOLOGY COLOPHON
Ruby On Rails 4
RSpec
FactoryGirl
Capybara
Cucumber
ShouldaMatchers
Simplecov
|
Copyright 2013-2016
--------------
Daniel Paulino Alves (danpaulalves at gmail.com)
Diego de Araújo Martinez Camarinha (diegoamc90 at gmail.com)
Eduardo Silva Araújo (duduktamg at hotmail.com>)
Heitor Reis Ribeiro (marcheing at gmail.com)
Paulo Meirelles (paulo at softwarelivre.org)
Rafael Reggiani Manzo (rr.manzo at gmail.com)
# THANKSs
Former team members
---------------------------------------------------------
Fellipe Souto Sampaio (fllsouto at gmail.com)
Alessandro Palmeira (alessandro.palmeira at gmail.com)
Renan Fichberg (rfichberg at gmail.com)
# TECHNOLOGY COLOPHON
Ruby On Rails 4
RSpec
FactoryGirl
Capybara
Cucumber
ShouldaMatchers
Simplecov
| Add Eduardo to authors file | Add Eduardo to authors file
| Text | agpl-3.0 | mezuro/kalibro_processor,mezuro/kalibro_processor | text | ## Code Before:
Copyright 2013-2016
--------------
Daniel Paulino Alves (danpaulalves at gmail.com)
Diego de Araújo Martinez Camarinha (diegoamc90 at gmail.com)
Heitor Reis Ribeiro (marcheing at gmail.com)
Paulo Meirelles (paulo at softwarelivre.org)
Rafael Reggiani Manzo (rr.manzo at gmail.com)
# THANKSs
Former team members
---------------------------------------------------------
Fellipe Souto Sampaio (fllsouto at gmail.com)
Alessandro Palmeira (alessandro.palmeira at gmail.com)
Renan Fichberg (rfichberg at gmail.com)
# TECHNOLOGY COLOPHON
Ruby On Rails 4
RSpec
FactoryGirl
Capybara
Cucumber
ShouldaMatchers
Simplecov
## Instruction:
Add Eduardo to authors file
## Code After:
Copyright 2013-2016
--------------
Daniel Paulino Alves (danpaulalves at gmail.com)
Diego de Araújo Martinez Camarinha (diegoamc90 at gmail.com)
Eduardo Silva Araújo (duduktamg at hotmail.com>)
Heitor Reis Ribeiro (marcheing at gmail.com)
Paulo Meirelles (paulo at softwarelivre.org)
Rafael Reggiani Manzo (rr.manzo at gmail.com)
# THANKSs
Former team members
---------------------------------------------------------
Fellipe Souto Sampaio (fllsouto at gmail.com)
Alessandro Palmeira (alessandro.palmeira at gmail.com)
Renan Fichberg (rfichberg at gmail.com)
# TECHNOLOGY COLOPHON
Ruby On Rails 4
RSpec
FactoryGirl
Capybara
Cucumber
ShouldaMatchers
Simplecov
|
Copyright 2013-2016
--------------
Daniel Paulino Alves (danpaulalves at gmail.com)
Diego de Araújo Martinez Camarinha (diegoamc90 at gmail.com)
+ Eduardo Silva Araújo (duduktamg at hotmail.com>)
Heitor Reis Ribeiro (marcheing at gmail.com)
Paulo Meirelles (paulo at softwarelivre.org)
Rafael Reggiani Manzo (rr.manzo at gmail.com)
# THANKSs
Former team members
---------------------------------------------------------
Fellipe Souto Sampaio (fllsouto at gmail.com)
Alessandro Palmeira (alessandro.palmeira at gmail.com)
Renan Fichberg (rfichberg at gmail.com)
# TECHNOLOGY COLOPHON
Ruby On Rails 4
RSpec
FactoryGirl
Capybara
Cucumber
ShouldaMatchers
Simplecov | 1 | 0.035714 | 1 | 0 |
120bc60adf1a318d19d8f70967274bc2d87dbf6f | res/layout/item_viperddc.xml | res/layout/item_viperddc.xml | <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="48dp"
android:foreground="?selectableItemBackground"
android:overScrollMode="never">
<ImageView
android:id="@id/v4a_item_ddc_select"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
android:src="@mipmap/radio_noselect" />
<TextView
android:id="@id/v4a_item_ddc_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="72dp"
android:fadingEdge="horizontal" />
</RelativeLayout>
| <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="48dp"
android:foreground="?selectableItemBackground">
<ImageView
android:id="@id/v4a_item_ddc_select"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
android:src="@mipmap/radio_noselect" />
<TextView
android:id="@id/v4a_item_ddc_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="72dp"
android:fadingEdge="horizontal" />
</RelativeLayout>
| Revert "Do not overscroll in ddc" | Revert "Do not overscroll in ddc"
This reverts commit 7b9a53f185f796050d03546779df32dc2da60b61.
| XML | apache-2.0 | Pittvandewitt/v4a_material_reformatted_src | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="48dp"
android:foreground="?selectableItemBackground"
android:overScrollMode="never">
<ImageView
android:id="@id/v4a_item_ddc_select"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
android:src="@mipmap/radio_noselect" />
<TextView
android:id="@id/v4a_item_ddc_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="72dp"
android:fadingEdge="horizontal" />
</RelativeLayout>
## Instruction:
Revert "Do not overscroll in ddc"
This reverts commit 7b9a53f185f796050d03546779df32dc2da60b61.
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="48dp"
android:foreground="?selectableItemBackground">
<ImageView
android:id="@id/v4a_item_ddc_select"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
android:src="@mipmap/radio_noselect" />
<TextView
android:id="@id/v4a_item_ddc_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="72dp"
android:fadingEdge="horizontal" />
</RelativeLayout>
| <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="48dp"
- android:foreground="?selectableItemBackground"
+ android:foreground="?selectableItemBackground">
? +
- android:overScrollMode="never">
<ImageView
android:id="@id/v4a_item_ddc_select"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_marginLeft="16dp"
android:src="@mipmap/radio_noselect" />
<TextView
android:id="@id/v4a_item_ddc_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_marginLeft="72dp"
android:fadingEdge="horizontal" />
</RelativeLayout> | 3 | 0.130435 | 1 | 2 |
ea97de765470bd77fefd22ac0716b964632cdea2 | pubspec.yaml | pubspec.yaml | name: postgresql
version: 0.2.0
author: Greg Lowe <greg@vis.net.nz>
description: Postgresql database driver.
homepage: https://github.com/xxgreg/postgresql
dependencies:
unittest: any
dev_dependencies:
yaml: any | name: postgresql
version: 0.2.0
author: Greg Lowe <greg@vis.net.nz>
description: Postgresql database driver.
homepage: https://github.com/xxgreg/postgresql
dev_dependencies:
yaml: any
unittest: any | Make unittest a dev dependency | Make unittest a dev dependency
| YAML | bsd-2-clause | tomyeh/postgresql,xxgreg/dart_postgresql,tomyeh/postgresql,xxgreg/dart_postgresql | yaml | ## Code Before:
name: postgresql
version: 0.2.0
author: Greg Lowe <greg@vis.net.nz>
description: Postgresql database driver.
homepage: https://github.com/xxgreg/postgresql
dependencies:
unittest: any
dev_dependencies:
yaml: any
## Instruction:
Make unittest a dev dependency
## Code After:
name: postgresql
version: 0.2.0
author: Greg Lowe <greg@vis.net.nz>
description: Postgresql database driver.
homepage: https://github.com/xxgreg/postgresql
dev_dependencies:
yaml: any
unittest: any | name: postgresql
version: 0.2.0
author: Greg Lowe <greg@vis.net.nz>
description: Postgresql database driver.
homepage: https://github.com/xxgreg/postgresql
- dependencies:
- unittest: any
dev_dependencies:
yaml: any
+ unittest: any | 3 | 0.333333 | 1 | 2 |
1ed8856f1a4861213c73b857582a18e6c836a7ef | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
jsdoc = require('gulp-jsdoc'),
docsSrcDir = './assets/js/**/*.js',
docsDestDir = './docs/js',
jsDocTask;
jsDocTask = function() {
return gulp.src(docsSrcDir)
.pipe(
jsdoc(docsDestDir,
{
path: './node_modules/jaguarjs-jsdoc',
applicationName: 'Dough JavaScript',
cleverLinks: true,
copyright: 'Copyright Money Advice Service ©',
linenums: true,
collapseSymbols: false
},
{
plugins: ['plugins/markdown'],
}
)
);
};
gulp.task('default', ['jsdoc']);
gulp.task('jsdoc', jsDocTask);
gulp.task('watch', function() {
jsDocTask();
gulp.watch(docsSrcDir, ['jsdoc']);
});
| var gulp = require('gulp'),
jsdoc = require('gulp-jsdoc'),
ghPages = require('gulp-gh-pages'),
docsSrcDir = './assets/js/**/*.js',
docsDestDir = './docs/js',
jsDocTask;
jsDocTask = function() {
return gulp.src(docsSrcDir)
.pipe(
jsdoc(docsDestDir,
{
path: './node_modules/jaguarjs-jsdoc',
applicationName: 'Dough JavaScript',
cleverLinks: true,
copyright: 'Copyright Money Advice Service ©',
linenums: true,
collapseSymbols: false
},
{
plugins: ['plugins/markdown'],
}
)
);
};
gulp.task('deploy', function() {
return gulp.src(docsDestDir + '/**/*')
.pipe(ghPages());
});
gulp.task('default', ['jsdoc']);
gulp.task('build', ['jsdoc', 'deploy']);
gulp.task('jsdoc', jsDocTask);
gulp.task('watch', function() {
jsDocTask();
gulp.watch(docsSrcDir, ['jsdoc']);
});
| Add gulp task to deploy jsDocs | Add gulp task to deploy jsDocs
| JavaScript | mit | moneyadviceservice/dough,moneyadviceservice/dough,moneyadviceservice/dough,moneyadviceservice/dough | javascript | ## Code Before:
var gulp = require('gulp'),
jsdoc = require('gulp-jsdoc'),
docsSrcDir = './assets/js/**/*.js',
docsDestDir = './docs/js',
jsDocTask;
jsDocTask = function() {
return gulp.src(docsSrcDir)
.pipe(
jsdoc(docsDestDir,
{
path: './node_modules/jaguarjs-jsdoc',
applicationName: 'Dough JavaScript',
cleverLinks: true,
copyright: 'Copyright Money Advice Service ©',
linenums: true,
collapseSymbols: false
},
{
plugins: ['plugins/markdown'],
}
)
);
};
gulp.task('default', ['jsdoc']);
gulp.task('jsdoc', jsDocTask);
gulp.task('watch', function() {
jsDocTask();
gulp.watch(docsSrcDir, ['jsdoc']);
});
## Instruction:
Add gulp task to deploy jsDocs
## Code After:
var gulp = require('gulp'),
jsdoc = require('gulp-jsdoc'),
ghPages = require('gulp-gh-pages'),
docsSrcDir = './assets/js/**/*.js',
docsDestDir = './docs/js',
jsDocTask;
jsDocTask = function() {
return gulp.src(docsSrcDir)
.pipe(
jsdoc(docsDestDir,
{
path: './node_modules/jaguarjs-jsdoc',
applicationName: 'Dough JavaScript',
cleverLinks: true,
copyright: 'Copyright Money Advice Service ©',
linenums: true,
collapseSymbols: false
},
{
plugins: ['plugins/markdown'],
}
)
);
};
gulp.task('deploy', function() {
return gulp.src(docsDestDir + '/**/*')
.pipe(ghPages());
});
gulp.task('default', ['jsdoc']);
gulp.task('build', ['jsdoc', 'deploy']);
gulp.task('jsdoc', jsDocTask);
gulp.task('watch', function() {
jsDocTask();
gulp.watch(docsSrcDir, ['jsdoc']);
});
| var gulp = require('gulp'),
jsdoc = require('gulp-jsdoc'),
+ ghPages = require('gulp-gh-pages'),
docsSrcDir = './assets/js/**/*.js',
docsDestDir = './docs/js',
jsDocTask;
jsDocTask = function() {
return gulp.src(docsSrcDir)
.pipe(
jsdoc(docsDestDir,
{
path: './node_modules/jaguarjs-jsdoc',
applicationName: 'Dough JavaScript',
cleverLinks: true,
copyright: 'Copyright Money Advice Service ©',
linenums: true,
collapseSymbols: false
},
{
plugins: ['plugins/markdown'],
}
)
);
};
+ gulp.task('deploy', function() {
+ return gulp.src(docsDestDir + '/**/*')
+ .pipe(ghPages());
+ });
+
gulp.task('default', ['jsdoc']);
+
+ gulp.task('build', ['jsdoc', 'deploy']);
+
gulp.task('jsdoc', jsDocTask);
+
gulp.task('watch', function() {
jsDocTask();
gulp.watch(docsSrcDir, ['jsdoc']);
}); | 10 | 0.322581 | 10 | 0 |
f7443077399ae76499cb339afcbef5db45c5ace8 | app/components/shared/Panel/intro-with-button.js | app/components/shared/Panel/intro-with-button.js | import React from "react";
class IntroWithButton extends React.Component {
static displayName = "Panel.IntroWithButton";
static propTypes = {
children: React.PropTypes.node.isRequired
};
render() {
return (
<div className="py3 px3 flex">
{this.props.children[0]}
<div className="ml3">
{this.props.children[1]}
</div>
</div>
);
}
}
export default IntroWithButton;
| import React from "react";
class IntroWithButton extends React.Component {
static displayName = "Panel.IntroWithButton";
static propTypes = {
children: React.PropTypes.node.isRequired
};
render() {
let children = React.Children.toArray(this.props.children);
let intro;
let button;
if(children.length == 1) {
intro = children;
} else {
button = children.pop();
intro = children;
}
if(button) {
button = (
<div className="ml3">
{button}
</div>
);
}
return (
<div className="py3 px3 flex">
{intro}
{button}
</div>
);
}
}
export default IntroWithButton;
| Handle case where IntroWithButton has no button | Handle case where IntroWithButton has no button
| JavaScript | mit | buildkite/frontend,fotinakis/buildkite-frontend,buildkite/frontend,fotinakis/buildkite-frontend | javascript | ## Code Before:
import React from "react";
class IntroWithButton extends React.Component {
static displayName = "Panel.IntroWithButton";
static propTypes = {
children: React.PropTypes.node.isRequired
};
render() {
return (
<div className="py3 px3 flex">
{this.props.children[0]}
<div className="ml3">
{this.props.children[1]}
</div>
</div>
);
}
}
export default IntroWithButton;
## Instruction:
Handle case where IntroWithButton has no button
## Code After:
import React from "react";
class IntroWithButton extends React.Component {
static displayName = "Panel.IntroWithButton";
static propTypes = {
children: React.PropTypes.node.isRequired
};
render() {
let children = React.Children.toArray(this.props.children);
let intro;
let button;
if(children.length == 1) {
intro = children;
} else {
button = children.pop();
intro = children;
}
if(button) {
button = (
<div className="ml3">
{button}
</div>
);
}
return (
<div className="py3 px3 flex">
{intro}
{button}
</div>
);
}
}
export default IntroWithButton;
| import React from "react";
class IntroWithButton extends React.Component {
static displayName = "Panel.IntroWithButton";
static propTypes = {
children: React.PropTypes.node.isRequired
};
render() {
+ let children = React.Children.toArray(this.props.children);
+
+ let intro;
+ let button;
+ if(children.length == 1) {
+ intro = children;
+ } else {
+ button = children.pop();
+ intro = children;
+ }
+
+ if(button) {
+ button = (
+ <div className="ml3">
+ {button}
+ </div>
+ );
+ }
+
return (
<div className="py3 px3 flex">
+ {intro}
+ {button}
- {this.props.children[0]}
- <div className="ml3">
- {this.props.children[1]}
- </div>
</div>
);
}
}
export default IntroWithButton; | 25 | 1.136364 | 21 | 4 |
5c29cdce314d85f1f2af5ddbfcdb0deb76a2759e | .travis.yml | .travis.yml | ---
before_install:
- gem update --system
- gem --version
language: ruby
notifications:
email:
- mike@blowmage.com
rvm:
- 2.1.1
- 2.1.0
- 2.0.0
- 1.9.3
- 1.8.7
env:
- "RAILS_VERSION=4.0"
- "RAILS_VERSION=3.2"
- "RAILS_VERSION=3.1"
- "RAILS_VERSION=3.0"
| ---
before_install:
- gem update --system
- gem --version
language: ruby
notifications:
email:
- mike@blowmage.com
rvm:
- 2.1.1
- 2.1.0
- 2.0.0
- 1.9.3
- 1.8.7
env:
- "RAILS_VERSION=4.0"
- "RAILS_VERSION=3.2"
- "RAILS_VERSION=3.1"
- "RAILS_VERSION=3.0"
matrix:
exclude:
- rvm: 1.8.7
env: "RAILS_VERSION=4.0" | Exclude rails 4 from running on ruby 1.8 | Exclude rails 4 from running on ruby 1.8
| YAML | mit | blowmage/minitest-rails-capybara | yaml | ## Code Before:
---
before_install:
- gem update --system
- gem --version
language: ruby
notifications:
email:
- mike@blowmage.com
rvm:
- 2.1.1
- 2.1.0
- 2.0.0
- 1.9.3
- 1.8.7
env:
- "RAILS_VERSION=4.0"
- "RAILS_VERSION=3.2"
- "RAILS_VERSION=3.1"
- "RAILS_VERSION=3.0"
## Instruction:
Exclude rails 4 from running on ruby 1.8
## Code After:
---
before_install:
- gem update --system
- gem --version
language: ruby
notifications:
email:
- mike@blowmage.com
rvm:
- 2.1.1
- 2.1.0
- 2.0.0
- 1.9.3
- 1.8.7
env:
- "RAILS_VERSION=4.0"
- "RAILS_VERSION=3.2"
- "RAILS_VERSION=3.1"
- "RAILS_VERSION=3.0"
matrix:
exclude:
- rvm: 1.8.7
env: "RAILS_VERSION=4.0" | ---
before_install:
- gem update --system
- gem --version
language: ruby
notifications:
email:
- mike@blowmage.com
rvm:
- 2.1.1
- 2.1.0
- 2.0.0
- 1.9.3
- 1.8.7
env:
- "RAILS_VERSION=4.0"
- "RAILS_VERSION=3.2"
- "RAILS_VERSION=3.1"
- "RAILS_VERSION=3.0"
+ matrix:
+ exclude:
+ - rvm: 1.8.7
+ env: "RAILS_VERSION=4.0" | 4 | 0.210526 | 4 | 0 |
f3e13264e3d5d70680e4c134ce0cd057be9827e3 | README.md | README.md |
Provides the ability to use [JavaCC](http://javacc.java.net/) via [Gradle](http://www.gradle.org/). If the 'java' plugin is also applied, JavaCompile tasks will depend upon the compileJavacc task.
## Installation
For now, you must build the plugin yourself and install it to your local maven repo. To build, simply run the following command in the directory where you checked out the plugin source:
`gradle clean build install`
Then, add the following lines to your `build.gradle` script:
```groovy
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath group: 'ca.coglinc', name: 'javaccPlugin', version: '1.0.0'
}
}
apply plugin: 'javacc'
```
## Usage
Place your JavaCC code into `src/main/javacc`.
The generated Java code will be put under `./build/generated/javacc` and will be compiled as part of the Java compile.
## Changelog
### 1.0.0
Initial version with limited features. Simply generates JavaCC files to Java from a non-configurable location into a non-configurable location.
|
Provides the ability to use [JavaCC](http://javacc.java.net/) via [Gradle](http://www.gradle.org/). If the 'java' plugin is also applied, JavaCompile tasks will depend upon the compileJavacc task.
## Installation
For now, you must build the plugin yourself and install it to your local maven repo. To build, simply run the following command in the directory where you checked out the plugin source:
`gradle clean build install`
Then, add the following lines to your `build.gradle` script:
```groovy
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath group: 'ca.coglinc', name: 'javaccPlugin', version: '1.0.0'
}
}
apply plugin: 'javacc'
```
## Usage
Place your JavaCC code into `src/main/javacc`.
The generated Java code will be put under `./build/generated/javacc` and will be compiled as part of the Java compile.
## Compatibility
This plugin requires Java 5+.
It has been tested with Gradle 1.11. Please let us know if you have had success with other versions of Gradle.
## Changelog
### 1.0.0
Initial version with limited features. Simply generates JavaCC files to Java from a non-configurable location into a non-configurable location.
| Add note about plugin compatibility | Add note about plugin compatibility
| Markdown | mit | johnmartel/javaccPlugin | markdown | ## Code Before:
Provides the ability to use [JavaCC](http://javacc.java.net/) via [Gradle](http://www.gradle.org/). If the 'java' plugin is also applied, JavaCompile tasks will depend upon the compileJavacc task.
## Installation
For now, you must build the plugin yourself and install it to your local maven repo. To build, simply run the following command in the directory where you checked out the plugin source:
`gradle clean build install`
Then, add the following lines to your `build.gradle` script:
```groovy
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath group: 'ca.coglinc', name: 'javaccPlugin', version: '1.0.0'
}
}
apply plugin: 'javacc'
```
## Usage
Place your JavaCC code into `src/main/javacc`.
The generated Java code will be put under `./build/generated/javacc` and will be compiled as part of the Java compile.
## Changelog
### 1.0.0
Initial version with limited features. Simply generates JavaCC files to Java from a non-configurable location into a non-configurable location.
## Instruction:
Add note about plugin compatibility
## Code After:
Provides the ability to use [JavaCC](http://javacc.java.net/) via [Gradle](http://www.gradle.org/). If the 'java' plugin is also applied, JavaCompile tasks will depend upon the compileJavacc task.
## Installation
For now, you must build the plugin yourself and install it to your local maven repo. To build, simply run the following command in the directory where you checked out the plugin source:
`gradle clean build install`
Then, add the following lines to your `build.gradle` script:
```groovy
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath group: 'ca.coglinc', name: 'javaccPlugin', version: '1.0.0'
}
}
apply plugin: 'javacc'
```
## Usage
Place your JavaCC code into `src/main/javacc`.
The generated Java code will be put under `./build/generated/javacc` and will be compiled as part of the Java compile.
## Compatibility
This plugin requires Java 5+.
It has been tested with Gradle 1.11. Please let us know if you have had success with other versions of Gradle.
## Changelog
### 1.0.0
Initial version with limited features. Simply generates JavaCC files to Java from a non-configurable location into a non-configurable location.
|
Provides the ability to use [JavaCC](http://javacc.java.net/) via [Gradle](http://www.gradle.org/). If the 'java' plugin is also applied, JavaCompile tasks will depend upon the compileJavacc task.
## Installation
For now, you must build the plugin yourself and install it to your local maven repo. To build, simply run the following command in the directory where you checked out the plugin source:
`gradle clean build install`
Then, add the following lines to your `build.gradle` script:
```groovy
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath group: 'ca.coglinc', name: 'javaccPlugin', version: '1.0.0'
}
}
apply plugin: 'javacc'
```
## Usage
Place your JavaCC code into `src/main/javacc`.
The generated Java code will be put under `./build/generated/javacc` and will be compiled as part of the Java compile.
+ ## Compatibility
+
+ This plugin requires Java 5+.
+
+ It has been tested with Gradle 1.11. Please let us know if you have had success with other versions of Gradle.
+
## Changelog
### 1.0.0
Initial version with limited features. Simply generates JavaCC files to Java from a non-configurable location into a non-configurable location. | 6 | 0.181818 | 6 | 0 |
0b2a4b73ed51c47934e51cb759fcbd7ef0b2da01 | start.js | start.js | var fs = require('fs'),
pidFile = __dirname + '/.start.pid',
fileOptions = { encoding : 'utf-8' };
// start grunt
require(__dirname + '/node_modules/grunt/lib/grunt.js').cli();
fs.writeFileSync(pidFile, process.pid, fileOptions);
process.on('SIGINT', function() {
var pid = fs.readFileSync(pidFile, fileOptions);
fs.unlink(pidFile);
process.kill(pid, 'SIGTERM');
process.exit();
})
| var fs = require('fs'),
argv = require('minimist')(process.argv.slice(2)),
pidFile = __dirname + '/.start.pid',
fileOptions = { encoding : 'utf-8' },
gruntfile;
// start grunt
gruntfile = (argv.ruby) ? __dirname + '/Gruntfile_ruby_sass.js' : __dirname + '/Gruntfile.js';
require(__dirname + '/node_modules/grunt/lib/grunt.js').cli({
'gruntfile' : gruntfile
});
fs.writeFileSync(pidFile, process.pid, fileOptions);
process.on('SIGINT', function() {
var pid = fs.readFileSync(pidFile, fileOptions);
fs.unlink(pidFile);
process.kill(pid, 'SIGTERM');
process.exit();
})
| Add support for ruby sass | Add support for ruby sass
Should have been added in this commit but wasn't:
https://github.com/tombye/express_prototype/commit/f6f2338bda9ff55c6ca4e9b19edeb1af5d54899f
| JavaScript | mit | danblundell/verify-local-patterns,nhsalpha/nhs_prototype_kit,davedark/proto-timeline,st3v3nhunt/prototype-ers,DilwoarH/GDS-Prototype-DM-SavedSearch,karlparton/my-govuk,nhsalpha/nhs_prototype_kit,gup-dwp/pip-prototype-v2,dwp-rti-prototype/rti-ux-new-prototype,rivalee/local-gov-links,OrcaTom/dwp_contentpatterns,mharrington/nhs_prototype_kit,jamesarice/DPSS,jeremygillies-ea/data_returns_prototype,joelanman/govuk_transaction_prototype_kit,kenmaddison-scc/verify-local-patterns,davedark/proto-timeline,arminio/govuk_prototype_kit,paulpod/invgov,timpaul/nhs_prototype_kit,nhsalpha/nhs_prototype_kit,paulpod/invgov,quis/notify-public-research-prototype,DilwoarH/GDS-Prototype-DM-SavedSearch,timpaul/ur_panel_prototype,hannalaakso/accessible-timeout-warning,Demwunz/esif-prototype,UKHomeOffice/ReportTerroristMaterialPrototype,bencullimore/nhsers,chrishanes/pvb_prisoner_proto,rivalee/local-gov-links,PurpleBooth/govuk_prototype_kit,bencullimore/nhsers,timpaul/govuk_transaction_prototype_kit,chrishanes/pvb_prisoner_proto,davedark/proto-timeline,antimega/cites-prototype,dwpdigitaltech/digital-debt,gavinwye/govuk_prototype_kit,timpaul/nh_prototype_kit,companieshouse/ch-accounts-prototype,gup-dwp/pip-prototype-v2,karlparton/my-govuk,tsmorgan/jsa-complaints,danblundell/verify-local-patterns,mikieet/sm-3,timpaul/nh_prototype_kit,tsmorgan/marx,st3v3nhunt/prototype-ers,abbott567/govuk_prototype_kit,dwpdigitaltech/hrt-prototype,arminio/govuk_prototype_kit,joelanman/govuk_transaction_prototype_kit,BucksCountyCouncil/verify-local-patterns,abbott567/govuk_prototype_kit,Demwunz/esif-prototype,bencullimore/nhsers,hannalaakso/accessible-timeout-warning,companieshouse/ch-accounts-prototype,dwpdigitaltech/hrt-prototype,dwpdigitaltech/hrt-prototype,samwake/hoddat-cofc-caseworking,abbott567/govuk_prototype_kit,dwpdigitaltech/ejs-prototype,Demwunz/esif-prototype,mharrington/nhs_prototype_kit,tsmorgan/jsa-complaints,tsmorgan/marx,antimega/performance-self-serve-prototype,dwp-rti-prototype/rti-ux-new-prototype,gup-dwp/pip-prototype-v2,UKHomeOffice/ReportTerroristMaterialPrototype,gavinwye/govuk_prototype_kit,antimega/cites-prototype,BucksCountyCouncil/verify-local-patterns,dwpdigitaltech/ejs-prototype,PurpleBooth/govuk_prototype_kit,DilwoarH/GDS-Prototype-DM-SavedSearch,mikieet/sm-prototype,timpaul/govuk_transaction_prototype_kit,quis/notify-public-research-prototype,paulpod/invgov,benjeffreys/hmcts-idam-proto,timpaul/ur_panel_prototype,hannalaakso/accessible-timeout-warning,st3v3nhunt/prototype-ers,dwpdigitaltech/ejs-prototype,mharrington/nhs_prototype_kit,rivalee/licensing-prototype,OrcaTom/dwp_contentpatterns,benjeffreys/hmcts-idam-proto,jeremygillies-ea/data_returns_prototype,glancyea/tagtest,samwake/hoddat-cofc-caseworking,tsmorgan/marx,antimega/performance-self-serve-prototype,timpaul/GOVUKCountrySelector,dwpdigitaltech/digital-debt,nhsbsa/ppc-prototype,LandRegistry/dmp-prototype,timpaul/registers-hackday,BucksCountyCouncil/verify-local-patterns,benjeffreys/hmcts-idam-proto,quis/notify-public-research-prototype,kenmaddison-scc/verify-local-patterns,alphagov/govuk_prototype_kit,joelanman/govuk_prototype_kit,OrcaTom/dwp_contentpatterns,karlparton/my-govuk,nhsalpha/nhs_prototype_kit,kenmaddison-scc/verify-local-patterns,danblundell/verify-local-patterns,timpaul/nhs_prototype_kit,nhsbsa/ppc-prototype,joelanman/govuk_prototype_kit,dwpdigitaltech/digital-debt,timpaul/GOVUKCountrySelector,mikieet/sm-3,timpaul/registers-hackday,nhsbsa/ppc-prototype,alphagov/govuk_prototype_kit,alphagov/govuk_prototype_kit,jeremygillies-ea/data_returns_prototype,jamesarice/DPSS,samwake/hoddat-cofc-caseworking,rivalee/licensing-prototype,glancyea/tagtest,LandRegistry/dmp-prototype,dwp-rti-prototype/rti-ux-new-prototype,mikieet/sm-prototype,arminio/govuk_prototype_kit,LandRegistry/dmp-prototype,bencullimore/nhsers,chrishanes/pvb_prisoner_proto,glancyea/tagtest,st3v3nhunt/prototype-ers,joelanman/govuk_prototype_kit | javascript | ## Code Before:
var fs = require('fs'),
pidFile = __dirname + '/.start.pid',
fileOptions = { encoding : 'utf-8' };
// start grunt
require(__dirname + '/node_modules/grunt/lib/grunt.js').cli();
fs.writeFileSync(pidFile, process.pid, fileOptions);
process.on('SIGINT', function() {
var pid = fs.readFileSync(pidFile, fileOptions);
fs.unlink(pidFile);
process.kill(pid, 'SIGTERM');
process.exit();
})
## Instruction:
Add support for ruby sass
Should have been added in this commit but wasn't:
https://github.com/tombye/express_prototype/commit/f6f2338bda9ff55c6ca4e9b19edeb1af5d54899f
## Code After:
var fs = require('fs'),
argv = require('minimist')(process.argv.slice(2)),
pidFile = __dirname + '/.start.pid',
fileOptions = { encoding : 'utf-8' },
gruntfile;
// start grunt
gruntfile = (argv.ruby) ? __dirname + '/Gruntfile_ruby_sass.js' : __dirname + '/Gruntfile.js';
require(__dirname + '/node_modules/grunt/lib/grunt.js').cli({
'gruntfile' : gruntfile
});
fs.writeFileSync(pidFile, process.pid, fileOptions);
process.on('SIGINT', function() {
var pid = fs.readFileSync(pidFile, fileOptions);
fs.unlink(pidFile);
process.kill(pid, 'SIGTERM');
process.exit();
})
| var fs = require('fs'),
+ argv = require('minimist')(process.argv.slice(2)),
pidFile = __dirname + '/.start.pid',
- fileOptions = { encoding : 'utf-8' };
? ^
+ fileOptions = { encoding : 'utf-8' },
? ^
+ gruntfile;
// start grunt
-
+ gruntfile = (argv.ruby) ? __dirname + '/Gruntfile_ruby_sass.js' : __dirname + '/Gruntfile.js';
- require(__dirname + '/node_modules/grunt/lib/grunt.js').cli();
? ^^
+ require(__dirname + '/node_modules/grunt/lib/grunt.js').cli({
? ^
+ 'gruntfile' : gruntfile
+ });
fs.writeFileSync(pidFile, process.pid, fileOptions);
process.on('SIGINT', function() {
var pid = fs.readFileSync(pidFile, fileOptions);
fs.unlink(pidFile);
process.kill(pid, 'SIGTERM');
process.exit();
}) | 10 | 0.666667 | 7 | 3 |
5fb41d2bf4a6fc99cf92db015c5cf81c5af76cd4 | lib/my_mongoid/document.rb | lib/my_mongoid/document.rb | require "my_mongoid/document/class_methods"
require "my_mongoid/attributes"
require "my_mongoid/field"
require "my_mongoid/duplicate_field_error"
module MyMongoid
module Document
include ClassMethods
include Attributes
def self.included(base)
MyMongoid.register_model(base)
base.extend(ClassMethods)
end
# Check if it is a MyMongoid model
def is_mongoid_model?
self.class.is_mongoid_model?
end
# Check if it is a newly initialized record
def new_record?
@new_record
end
# Instantiate a new Document
#
# @example Create a new document.
# Person.new(:title => "Sir")
#
# @param [ Hash ] attrs The attributes to set up the document with.
#
# @return [ Document ] A new document.
def initialize(attrs = nil)
attrs ||= {}
unless attrs.is_a?(Hash)
raise ArgumentError, "Hash object argument is expected for #new"
end
@new_record = true
@attributes = attrs
set_attributes(attrs)
end
end
end
| require "my_mongoid/document/class_methods"
require "my_mongoid/attributes"
require "my_mongoid/field"
require "my_mongoid/duplicate_field_error"
module MyMongoid
module Document
include ClassMethods
include Attributes
def self.included(base)
MyMongoid.register_model(base)
base.extend(ClassMethods)
base.class_eval do
field :_id
end
end
# Check if it is a MyMongoid model
def is_mongoid_model?
self.class.is_mongoid_model?
end
# Check if it is a newly initialized record
def new_record?
@new_record
end
# Instantiate a new Document
#
# @example Create a new document.
# Person.new(:title => "Sir")
#
# @param [ Hash ] attrs The attributes to set up the document with.
#
# @return [ Document ] A new document.
def initialize(attrs = nil)
attrs ||= {}
unless attrs.is_a?(Hash)
raise ArgumentError, "Hash object argument is expected for #new"
end
@new_record = true
@attributes = attrs
set_attributes(attrs)
end
end
end
| Declare fields with automatically declares the '_id' field | Declare fields with automatically declares the '_id' field
| Ruby | mit | puiesabu/my_mongoid | ruby | ## Code Before:
require "my_mongoid/document/class_methods"
require "my_mongoid/attributes"
require "my_mongoid/field"
require "my_mongoid/duplicate_field_error"
module MyMongoid
module Document
include ClassMethods
include Attributes
def self.included(base)
MyMongoid.register_model(base)
base.extend(ClassMethods)
end
# Check if it is a MyMongoid model
def is_mongoid_model?
self.class.is_mongoid_model?
end
# Check if it is a newly initialized record
def new_record?
@new_record
end
# Instantiate a new Document
#
# @example Create a new document.
# Person.new(:title => "Sir")
#
# @param [ Hash ] attrs The attributes to set up the document with.
#
# @return [ Document ] A new document.
def initialize(attrs = nil)
attrs ||= {}
unless attrs.is_a?(Hash)
raise ArgumentError, "Hash object argument is expected for #new"
end
@new_record = true
@attributes = attrs
set_attributes(attrs)
end
end
end
## Instruction:
Declare fields with automatically declares the '_id' field
## Code After:
require "my_mongoid/document/class_methods"
require "my_mongoid/attributes"
require "my_mongoid/field"
require "my_mongoid/duplicate_field_error"
module MyMongoid
module Document
include ClassMethods
include Attributes
def self.included(base)
MyMongoid.register_model(base)
base.extend(ClassMethods)
base.class_eval do
field :_id
end
end
# Check if it is a MyMongoid model
def is_mongoid_model?
self.class.is_mongoid_model?
end
# Check if it is a newly initialized record
def new_record?
@new_record
end
# Instantiate a new Document
#
# @example Create a new document.
# Person.new(:title => "Sir")
#
# @param [ Hash ] attrs The attributes to set up the document with.
#
# @return [ Document ] A new document.
def initialize(attrs = nil)
attrs ||= {}
unless attrs.is_a?(Hash)
raise ArgumentError, "Hash object argument is expected for #new"
end
@new_record = true
@attributes = attrs
set_attributes(attrs)
end
end
end
| require "my_mongoid/document/class_methods"
require "my_mongoid/attributes"
require "my_mongoid/field"
require "my_mongoid/duplicate_field_error"
module MyMongoid
module Document
include ClassMethods
include Attributes
def self.included(base)
MyMongoid.register_model(base)
base.extend(ClassMethods)
+ base.class_eval do
+ field :_id
+ end
end
# Check if it is a MyMongoid model
def is_mongoid_model?
self.class.is_mongoid_model?
end
# Check if it is a newly initialized record
def new_record?
@new_record
end
# Instantiate a new Document
#
# @example Create a new document.
# Person.new(:title => "Sir")
#
# @param [ Hash ] attrs The attributes to set up the document with.
#
# @return [ Document ] A new document.
def initialize(attrs = nil)
attrs ||= {}
unless attrs.is_a?(Hash)
raise ArgumentError, "Hash object argument is expected for #new"
end
@new_record = true
@attributes = attrs
set_attributes(attrs)
end
end
end | 3 | 0.065217 | 3 | 0 |
0c785547446166d051e9d0b6e02a253d10f294e2 | source/static/styles/core/typography/headings.styl | source/static/styles/core/typography/headings.styl | h1
h2
h3
h4
h5
h6
font-family $heading-font-family
font-weight $heading-font-weight
margin $base-line-height 0 0.5em
line-height normal
a
&
&:visited
color inherit
h1
font-size 2.25em
h2
font-size 2em
h3
font-size 1.75em
h4
font-size 1.5em
h5
font-size 1.25em
h6
font-size 1em
| h1
h2
h3
h4
h5
h6
font-family $heading-font-family
font-weight $heading-font-weight
margin $base-line-height 0 0.5em
line-height normal
a
&
&:visited
color inherit
&:first-child
margin-top 0
&:last-child
margin-bottom 0
h1
font-size 2.25em
h2
font-size 2em
h3
font-size 1.75em
h4
font-size 1.5em
h5
font-size 1.25em
h6
font-size 1em
| Remove spaces for first and last heading | Remove spaces for first and last heading
| Stylus | mit | bkzhn/gulp-front,Zoxon/gulp-front,bkzhn/gulp-front,Zoxon/gulp-front | stylus | ## Code Before:
h1
h2
h3
h4
h5
h6
font-family $heading-font-family
font-weight $heading-font-weight
margin $base-line-height 0 0.5em
line-height normal
a
&
&:visited
color inherit
h1
font-size 2.25em
h2
font-size 2em
h3
font-size 1.75em
h4
font-size 1.5em
h5
font-size 1.25em
h6
font-size 1em
## Instruction:
Remove spaces for first and last heading
## Code After:
h1
h2
h3
h4
h5
h6
font-family $heading-font-family
font-weight $heading-font-weight
margin $base-line-height 0 0.5em
line-height normal
a
&
&:visited
color inherit
&:first-child
margin-top 0
&:last-child
margin-bottom 0
h1
font-size 2.25em
h2
font-size 2em
h3
font-size 1.75em
h4
font-size 1.5em
h5
font-size 1.25em
h6
font-size 1em
| h1
h2
h3
h4
h5
h6
font-family $heading-font-family
font-weight $heading-font-weight
margin $base-line-height 0 0.5em
line-height normal
a
&
&:visited
color inherit
+
+ &:first-child
+ margin-top 0
+
+ &:last-child
+ margin-bottom 0
h1
font-size 2.25em
h2
font-size 2em
h3
font-size 1.75em
h4
font-size 1.5em
h5
font-size 1.25em
h6
font-size 1em | 6 | 0.1875 | 6 | 0 |
30b4af44b186544321663f3028115df6dcf5c705 | sailr-api/app/models/Item.php | sailr-api/app/models/Item.php | <?php
class Item extends Eloquent
{
protected $hidden = array('updated_at', 'deleted_at', 'user_id');
protected $fillable = ['user_id', 'price', 'currency', 'initial_units', 'description', 'title'];
protected $softDelete = true;
public function user()
{
return $this->belongsTo('User');
}
public function photos()
{
return $this->hasMany('Photo');
}
public function comment() {
return $this->hasMany('Comment');
}
public static $rules = array(
'title' => 'required|max:40',
'description' => 'required|max:240',
'price' => 'required|numeric|min:0.00|max:999999999',
'currency' => 'required|alpha|min:3|max:3|in:AUD,CAD,EUR,GBP,JPY,USD,NZD,CHF,HKD,SGD,SEK,DKK,PLN,NOK,HUF,CZK,ILS,MXN,PHP,TWD,THB,RUB',
'initial_units' => 'required|min:1|max:9999999',
);
}
| <?php
class Item extends Eloquent
{
protected $hidden = array('updated_at', 'deleted_at', 'user_id');
protected $fillable = ['user_id', 'price', 'currency', 'initial_units', 'description', 'title'];
protected $softDelete = true;
//protected $appends = ['comments'];
public function user()
{
return $this->belongsTo('User');
}
public function photos()
{
return $this->hasMany('Photo');
}
public function comment() {
return $this->hasMany('Comment');
}
public static $rules = array(
'title' => 'required|max:40',
'description' => 'required|max:240',
'price' => 'required|numeric|min:0.00|max:999999999',
'currency' => 'required|alpha|min:3|max:3|in:AUD,CAD,EUR,GBP,JPY,USD,NZD,CHF,HKD,SGD,SEK,DKK,PLN,NOK,HUF,CZK,ILS,MXN,PHP,TWD,THB,RUB',
'initial_units' => 'required|min:1|max:9999999',
);
public function getCommentsAttribute() {
$comments = Comment::where('item_id', '=', $this->id);
return $this->attributes['comments'] = $comments;
}
}
| Add comment attribute (default off) | Add comment attribute (default off)
| PHP | apache-2.0 | nfeiglin/sailr-api | php | ## Code Before:
<?php
class Item extends Eloquent
{
protected $hidden = array('updated_at', 'deleted_at', 'user_id');
protected $fillable = ['user_id', 'price', 'currency', 'initial_units', 'description', 'title'];
protected $softDelete = true;
public function user()
{
return $this->belongsTo('User');
}
public function photos()
{
return $this->hasMany('Photo');
}
public function comment() {
return $this->hasMany('Comment');
}
public static $rules = array(
'title' => 'required|max:40',
'description' => 'required|max:240',
'price' => 'required|numeric|min:0.00|max:999999999',
'currency' => 'required|alpha|min:3|max:3|in:AUD,CAD,EUR,GBP,JPY,USD,NZD,CHF,HKD,SGD,SEK,DKK,PLN,NOK,HUF,CZK,ILS,MXN,PHP,TWD,THB,RUB',
'initial_units' => 'required|min:1|max:9999999',
);
}
## Instruction:
Add comment attribute (default off)
## Code After:
<?php
class Item extends Eloquent
{
protected $hidden = array('updated_at', 'deleted_at', 'user_id');
protected $fillable = ['user_id', 'price', 'currency', 'initial_units', 'description', 'title'];
protected $softDelete = true;
//protected $appends = ['comments'];
public function user()
{
return $this->belongsTo('User');
}
public function photos()
{
return $this->hasMany('Photo');
}
public function comment() {
return $this->hasMany('Comment');
}
public static $rules = array(
'title' => 'required|max:40',
'description' => 'required|max:240',
'price' => 'required|numeric|min:0.00|max:999999999',
'currency' => 'required|alpha|min:3|max:3|in:AUD,CAD,EUR,GBP,JPY,USD,NZD,CHF,HKD,SGD,SEK,DKK,PLN,NOK,HUF,CZK,ILS,MXN,PHP,TWD,THB,RUB',
'initial_units' => 'required|min:1|max:9999999',
);
public function getCommentsAttribute() {
$comments = Comment::where('item_id', '=', $this->id);
return $this->attributes['comments'] = $comments;
}
}
| <?php
class Item extends Eloquent
{
protected $hidden = array('updated_at', 'deleted_at', 'user_id');
protected $fillable = ['user_id', 'price', 'currency', 'initial_units', 'description', 'title'];
protected $softDelete = true;
+ //protected $appends = ['comments'];
public function user()
{
return $this->belongsTo('User');
}
public function photos()
{
return $this->hasMany('Photo');
}
public function comment() {
return $this->hasMany('Comment');
}
public static $rules = array(
'title' => 'required|max:40',
'description' => 'required|max:240',
'price' => 'required|numeric|min:0.00|max:999999999',
'currency' => 'required|alpha|min:3|max:3|in:AUD,CAD,EUR,GBP,JPY,USD,NZD,CHF,HKD,SGD,SEK,DKK,PLN,NOK,HUF,CZK,ILS,MXN,PHP,TWD,THB,RUB',
'initial_units' => 'required|min:1|max:9999999',
);
+
+ public function getCommentsAttribute() {
+ $comments = Comment::where('item_id', '=', $this->id);
+
+ return $this->attributes['comments'] = $comments;
+ }
} | 7 | 0.233333 | 7 | 0 |
b87831b76ce24d4f98459c1ff974c5880d915895 | README.md | README.md |
Generate a list of the top trending value stocks on the market.
The script pulls data from various sources, ranks the stocks on various figures and calculations
before spitting out a csv of the stocks.
## How to run
Install the required gems.
`ruby trending-value-stocks.rb`
### Credits
I'm [@zoltarSpeaks](http://twitter.com/zoltarspeaks) on Twitter.
This script is based on the [Python script](https://github.com/fuligginoso/trending-value) by [@fuligginoso](http://blog.nmr.io/).
Inspiration taken from this post on Reddit: ["How do you select stocks" (cont'd) - Trending Value, see how your stocks are rated](http://www.reddit.com/r/investing/comments/1eyx3r/how_do_you_select_stocks_contd_trending_value_see/).
### Contributions
If you'd like to contribute to this script, please feel free to submit a Pull Request and i'll attend to it asap. |
Generate a list of the top trending value stocks on the market.
The script pulls data from various sources, ranks the stocks on various figures and calculations
before spitting out a csv of the stocks.
## How to run
Install the required gems.
`ruby trending-value-stocks.rb`
### Credits
I'm [@zoltarSpeaks](http://twitter.com/zoltarspeaks) on Twitter.
There is [a more detailed post about this script](http://www.peteroome.com/2014/05/11/valuator-a-ruby-script-to-help-pick-trending-value-stocks.html) on my blog.
This script is based on the [Python script](https://github.com/fuligginoso/trending-value) by [@fuligginoso](http://blog.nmr.io/).
Inspiration taken from this post on Reddit: ["How do you select stocks" (cont'd) - Trending Value, see how your stocks are rated](http://www.reddit.com/r/investing/comments/1eyx3r/how_do_you_select_stocks_contd_trending_value_see/).
### Contributions
If you'd like to contribute to this script, please feel free to submit a Pull Request and i'll attend to it asap. | Update to the readme, to link to my blog post | Update to the readme, to link to my blog post
| Markdown | apache-2.0 | coolbox/valuator | markdown | ## Code Before:
Generate a list of the top trending value stocks on the market.
The script pulls data from various sources, ranks the stocks on various figures and calculations
before spitting out a csv of the stocks.
## How to run
Install the required gems.
`ruby trending-value-stocks.rb`
### Credits
I'm [@zoltarSpeaks](http://twitter.com/zoltarspeaks) on Twitter.
This script is based on the [Python script](https://github.com/fuligginoso/trending-value) by [@fuligginoso](http://blog.nmr.io/).
Inspiration taken from this post on Reddit: ["How do you select stocks" (cont'd) - Trending Value, see how your stocks are rated](http://www.reddit.com/r/investing/comments/1eyx3r/how_do_you_select_stocks_contd_trending_value_see/).
### Contributions
If you'd like to contribute to this script, please feel free to submit a Pull Request and i'll attend to it asap.
## Instruction:
Update to the readme, to link to my blog post
## Code After:
Generate a list of the top trending value stocks on the market.
The script pulls data from various sources, ranks the stocks on various figures and calculations
before spitting out a csv of the stocks.
## How to run
Install the required gems.
`ruby trending-value-stocks.rb`
### Credits
I'm [@zoltarSpeaks](http://twitter.com/zoltarspeaks) on Twitter.
There is [a more detailed post about this script](http://www.peteroome.com/2014/05/11/valuator-a-ruby-script-to-help-pick-trending-value-stocks.html) on my blog.
This script is based on the [Python script](https://github.com/fuligginoso/trending-value) by [@fuligginoso](http://blog.nmr.io/).
Inspiration taken from this post on Reddit: ["How do you select stocks" (cont'd) - Trending Value, see how your stocks are rated](http://www.reddit.com/r/investing/comments/1eyx3r/how_do_you_select_stocks_contd_trending_value_see/).
### Contributions
If you'd like to contribute to this script, please feel free to submit a Pull Request and i'll attend to it asap. |
Generate a list of the top trending value stocks on the market.
The script pulls data from various sources, ranks the stocks on various figures and calculations
before spitting out a csv of the stocks.
## How to run
Install the required gems.
`ruby trending-value-stocks.rb`
### Credits
I'm [@zoltarSpeaks](http://twitter.com/zoltarspeaks) on Twitter.
+ There is [a more detailed post about this script](http://www.peteroome.com/2014/05/11/valuator-a-ruby-script-to-help-pick-trending-value-stocks.html) on my blog.
+
This script is based on the [Python script](https://github.com/fuligginoso/trending-value) by [@fuligginoso](http://blog.nmr.io/).
Inspiration taken from this post on Reddit: ["How do you select stocks" (cont'd) - Trending Value, see how your stocks are rated](http://www.reddit.com/r/investing/comments/1eyx3r/how_do_you_select_stocks_contd_trending_value_see/).
### Contributions
If you'd like to contribute to this script, please feel free to submit a Pull Request and i'll attend to it asap. | 2 | 0.1 | 2 | 0 |
aa2e84828ddc5b9676c1df3e96669e0d892e164f | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name = "Greengraph",
version = "0.1",
packages = find_packages(exclude=["*test"]),
scripts = ["scripts/greengraph"],
install_requires = ["argparse","matplotlib"]
)
| from setuptools import setup, find_packages
setup(
name = "Greengraph",
version = "0.1",
packages = find_packages(exclude=["*test"]),
scripts = ["scripts/greengraph"],
install_requires = ["argparse","matplotlib","numpy","requests","geopy"]
)
| Add missing packages to install_requires | Add missing packages to install_requires
| Python | mit | MikeVasmer/GreenGraphCoursework | python | ## Code Before:
from setuptools import setup, find_packages
setup(
name = "Greengraph",
version = "0.1",
packages = find_packages(exclude=["*test"]),
scripts = ["scripts/greengraph"],
install_requires = ["argparse","matplotlib"]
)
## Instruction:
Add missing packages to install_requires
## Code After:
from setuptools import setup, find_packages
setup(
name = "Greengraph",
version = "0.1",
packages = find_packages(exclude=["*test"]),
scripts = ["scripts/greengraph"],
install_requires = ["argparse","matplotlib","numpy","requests","geopy"]
)
| from setuptools import setup, find_packages
setup(
name = "Greengraph",
version = "0.1",
packages = find_packages(exclude=["*test"]),
scripts = ["scripts/greengraph"],
- install_requires = ["argparse","matplotlib"]
+ install_requires = ["argparse","matplotlib","numpy","requests","geopy"]
? +++++++++++++++++++++++++++
) | 2 | 0.222222 | 1 | 1 |
313225405a7ab309b7177cda87688ab300f63886 | package.js | package.js | Package.describe({
summary: 'Meteor package to wrap TopoJSON: An extension to GeoJSON that encodes topology'
});
Package.on_use(function(api, where) {
if (api.export) {
api.export('topojson');
}
api.add_files('meteor-topojson.js', 'server');
api.add_files('topojson.js', 'client');
});
Npm.depends({
topojson: '1.4.6'
});
| Package.describe({
summary: 'Meteor package to wrap TopoJSON: An extension to GeoJSON that encodes topology'
});
Package.on_use(function(api) {
api.export('topojson');
api.add_files('meteor-topojson.js', 'server');
api.add_files('topojson.js', 'client');
});
Npm.depends({
topojson: '1.4.6'
});
| Remove unneeded parm and test | Remove unneeded parm and test
| JavaScript | mit | vsivsi/meteor-topojson | javascript | ## Code Before:
Package.describe({
summary: 'Meteor package to wrap TopoJSON: An extension to GeoJSON that encodes topology'
});
Package.on_use(function(api, where) {
if (api.export) {
api.export('topojson');
}
api.add_files('meteor-topojson.js', 'server');
api.add_files('topojson.js', 'client');
});
Npm.depends({
topojson: '1.4.6'
});
## Instruction:
Remove unneeded parm and test
## Code After:
Package.describe({
summary: 'Meteor package to wrap TopoJSON: An extension to GeoJSON that encodes topology'
});
Package.on_use(function(api) {
api.export('topojson');
api.add_files('meteor-topojson.js', 'server');
api.add_files('topojson.js', 'client');
});
Npm.depends({
topojson: '1.4.6'
});
| Package.describe({
summary: 'Meteor package to wrap TopoJSON: An extension to GeoJSON that encodes topology'
});
- Package.on_use(function(api, where) {
? -------
+ Package.on_use(function(api) {
- if (api.export) {
- api.export('topojson');
? --
+ api.export('topojson');
- }
api.add_files('meteor-topojson.js', 'server');
api.add_files('topojson.js', 'client');
});
Npm.depends({
topojson: '1.4.6'
}); | 6 | 0.4 | 2 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.