commit
stringlengths 40
40
| old_file
stringlengths 4
237
| new_file
stringlengths 4
237
| old_contents
stringlengths 1
4.24k
| new_contents
stringlengths 5
4.84k
| subject
stringlengths 15
778
| message
stringlengths 16
6.86k
| lang
stringlengths 1
30
| license
stringclasses 13
values | repos
stringlengths 5
116k
| config
stringlengths 1
30
| content
stringlengths 105
8.72k
|
---|---|---|---|---|---|---|---|---|---|---|---|
d5cb2a3f9ba2e647224c7c17e9125ef344028a4a | package.json | package.json | {
"name": "beer-tab",
"version": "0.0.1",
"description": "beer as social currency",
"main": "server.js",
"repository": {
"type": "git",
"url": "git://github.com/ViridescentGrizzly/beer-tab.git"
},
"license": "MIT",
"author": "Viridescent Grizzly",
"contributors": [
{
"name": "Michael Kurrels",
"email": "mjkurrels@gmail.com"
},
{
"name": "Nate Meier",
"email": "iemanatemire@gmail.com"
},
{
"name": "Andrés Viesca",
"email": "viestat@icloud.com"
},
{
"name": "Steven Wu",
"email": "wucommasteven@gmail.com"
}],
}
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/ViridescentGrizzly/beer-tab.git"
},
"devDependencies": {},
"dependencies": {
"express": "^4.13.3",
"mongoose": "^4.1.1",
"morgan": "^1.6.1"
}
}
| {
"name": "beer-tab",
"version": "0.0.1",
"description": "beer as social currency",
"main": "server.js",
"repository": {
"type": "git",
"url": "git://github.com/ViridescentGrizzly/beer-tab.git"
},
"license": "MIT",
"author": "Viridescent Grizzly",
"contributors": [{
"name": "Michael Kurrels",
"email": "mjkurrels@gmail.com"
},{
"name": "Nate Meier",
"email": "iemanatemire@gmail.com"
},{
"name": "Andrés Viesca",
"email": "viestat@icloud.com"
},{
"name": "Steven Wu",
"email": "wucommasteven@gmail.com"
}
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/ViridescentGrizzly/beer-tab.git"
},
"devDependencies": {},
"dependencies": {
"express": "^4.13.3",
"mongoose": "^4.1.1",
"morgan": "^1.6.1"
}
}
| Add config file for mongoose setup | Add config file for mongoose setup
| JSON | mit | mKurrels/beer-tab,viestat/beer-tab,RHays91/beer-tab,jimtom2713/beer-tab,ViridescentGrizzly/beer-tab,csaden/beer-tab,RHays91/beer-tab,stvnwu/beer-tab,macklevine/beer-tab,jimtom2713/beer-tab,mKurrels/beer-tab,csaden/beer-tab,ViridescentGrizzly/beer-tab,metallic-gazelle/beer-tab,viestat/beer-tab,MaxBreakfast/beer-tab,stvnwu/beer-tab,MaxBreakfast/beer-tab,metallic-gazelle/beer-tab,kylebasu/beer-tab,trevorhanus/beer-tab,macklevine/beer-tab,kylebasu/beer-tab,trevorhanus/beer-tab,stvnwu/beer-tab | json | ## Code Before:
{
"name": "beer-tab",
"version": "0.0.1",
"description": "beer as social currency",
"main": "server.js",
"repository": {
"type": "git",
"url": "git://github.com/ViridescentGrizzly/beer-tab.git"
},
"license": "MIT",
"author": "Viridescent Grizzly",
"contributors": [
{
"name": "Michael Kurrels",
"email": "mjkurrels@gmail.com"
},
{
"name": "Nate Meier",
"email": "iemanatemire@gmail.com"
},
{
"name": "Andrés Viesca",
"email": "viestat@icloud.com"
},
{
"name": "Steven Wu",
"email": "wucommasteven@gmail.com"
}],
}
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/ViridescentGrizzly/beer-tab.git"
},
"devDependencies": {},
"dependencies": {
"express": "^4.13.3",
"mongoose": "^4.1.1",
"morgan": "^1.6.1"
}
}
## Instruction:
Add config file for mongoose setup
## Code After:
{
"name": "beer-tab",
"version": "0.0.1",
"description": "beer as social currency",
"main": "server.js",
"repository": {
"type": "git",
"url": "git://github.com/ViridescentGrizzly/beer-tab.git"
},
"license": "MIT",
"author": "Viridescent Grizzly",
"contributors": [{
"name": "Michael Kurrels",
"email": "mjkurrels@gmail.com"
},{
"name": "Nate Meier",
"email": "iemanatemire@gmail.com"
},{
"name": "Andrés Viesca",
"email": "viestat@icloud.com"
},{
"name": "Steven Wu",
"email": "wucommasteven@gmail.com"
}
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git://github.com/ViridescentGrizzly/beer-tab.git"
},
"devDependencies": {},
"dependencies": {
"express": "^4.13.3",
"mongoose": "^4.1.1",
"morgan": "^1.6.1"
}
}
|
e30668139c173653ff962d393311f36cb64ab08f | test/components/Post.spec.js | test/components/Post.spec.js | import { expect } from 'chai';
import { mount } from 'enzyme';
import React from 'react';
import Post from '../../src/js/components/Post';
describe('<Post/>', () => {
const post = {
id: 0,
title: 'Test Post',
content: 'empty',
description: 'empty',
author: 'bot',
slug: 'test-post',
tags: ['test', 'react'],
};
it('renders post title', () => {
const result = mount(<Post post={post} />);
expect(result.find('.post__title').text()).to.eq('Test Post');
});
it('renders post metadata', () => {
const result = mount(<Post post={post} />);
expect(result.find('.post__meta').text()).to.eq(' a few seconds ago');
});
it('renders post image', () => {
const postWithImage = { ...post, img: 'image.png' };
const result = mount(<Post post={postWithImage} />);
expect(result.find('.post__image').length).to.eq(1);
});
it('renders no image if missing', () => {
const result = mount(<Post post={post} />);
expect(result.find('.post__image').length).to.eq(0);
});
});
| import { expect } from 'chai';
import { mount, shallow } from 'enzyme';
import React from 'react';
import Post from '../../src/js/components/Post';
describe('<Post/>', () => {
const post = {
id: 0,
title: 'Test Post',
content: 'empty',
description: 'empty',
author: 'bot',
slug: 'test-post',
tags: ['test', 'react'],
};
it('renders post title', () => {
const result = shallow(<Post post={post} />);
expect(result.find('.post__title').text()).to.eq('Test Post');
});
it('renders post metadata', () => {
const result = mount(<Post post={post} />);
expect(result.find('.post__meta').text()).to.eq(' a few seconds ago');
});
it('renders post image', () => {
const postWithImage = { ...post, img: 'image.png' };
const result = shallow(<Post post={postWithImage} />);
expect(result.find('.post__image').length).to.eq(1);
});
it('renders no image if missing', () => {
const result = mount(<Post post={post} />);
expect(result.find('.post__image').length).to.eq(0);
});
});
| Replace `mount` calls with `shallow` in <Post> tests | Replace `mount` calls with `shallow` in <Post> tests
| JavaScript | mit | slavapavlutin/pavlutin-node,slavapavlutin/pavlutin-node | javascript | ## Code Before:
import { expect } from 'chai';
import { mount } from 'enzyme';
import React from 'react';
import Post from '../../src/js/components/Post';
describe('<Post/>', () => {
const post = {
id: 0,
title: 'Test Post',
content: 'empty',
description: 'empty',
author: 'bot',
slug: 'test-post',
tags: ['test', 'react'],
};
it('renders post title', () => {
const result = mount(<Post post={post} />);
expect(result.find('.post__title').text()).to.eq('Test Post');
});
it('renders post metadata', () => {
const result = mount(<Post post={post} />);
expect(result.find('.post__meta').text()).to.eq(' a few seconds ago');
});
it('renders post image', () => {
const postWithImage = { ...post, img: 'image.png' };
const result = mount(<Post post={postWithImage} />);
expect(result.find('.post__image').length).to.eq(1);
});
it('renders no image if missing', () => {
const result = mount(<Post post={post} />);
expect(result.find('.post__image').length).to.eq(0);
});
});
## Instruction:
Replace `mount` calls with `shallow` in <Post> tests
## Code After:
import { expect } from 'chai';
import { mount, shallow } from 'enzyme';
import React from 'react';
import Post from '../../src/js/components/Post';
describe('<Post/>', () => {
const post = {
id: 0,
title: 'Test Post',
content: 'empty',
description: 'empty',
author: 'bot',
slug: 'test-post',
tags: ['test', 'react'],
};
it('renders post title', () => {
const result = shallow(<Post post={post} />);
expect(result.find('.post__title').text()).to.eq('Test Post');
});
it('renders post metadata', () => {
const result = mount(<Post post={post} />);
expect(result.find('.post__meta').text()).to.eq(' a few seconds ago');
});
it('renders post image', () => {
const postWithImage = { ...post, img: 'image.png' };
const result = shallow(<Post post={postWithImage} />);
expect(result.find('.post__image').length).to.eq(1);
});
it('renders no image if missing', () => {
const result = mount(<Post post={post} />);
expect(result.find('.post__image').length).to.eq(0);
});
});
|
2c36f2ef7ca925b97659324ace77b40541fb7553 | .nodeset.yml | .nodeset.yml | default_set: 'centos-64-x64'
sets:
'centos-64-x64':
nodes:
"main.foo.vm":
prefab: 'centos-64-x64'
| default_set: 'centos-64-x64'
sets:
'centos-64-x64':
nodes:
"main.foo.vm":
prefab: 'centos-64-x64'
'debian-70rc1-x64':
nodes:
"main":
prefab: 'debian-70rc1-x64'
| Add debian wheezy node for rspec-system | Add debian wheezy node for rspec-system
| YAML | apache-2.0 | MelanieGault/puppet-wget,blackcobra1973/puppet-wget,maestrodev/puppet-wget,azcender/puppet-wget,DSI-Ville-Noumea/puppet-wget,seanscottking/puppet-wget,PierrickI3/puppet-wget | yaml | ## Code Before:
default_set: 'centos-64-x64'
sets:
'centos-64-x64':
nodes:
"main.foo.vm":
prefab: 'centos-64-x64'
## Instruction:
Add debian wheezy node for rspec-system
## Code After:
default_set: 'centos-64-x64'
sets:
'centos-64-x64':
nodes:
"main.foo.vm":
prefab: 'centos-64-x64'
'debian-70rc1-x64':
nodes:
"main":
prefab: 'debian-70rc1-x64'
|
335f27bbe7bedf695d90ab00309ee13af39d8945 | .travis.yml | .travis.yml | language: node_js
node_js:
- "8"
install: npm install
before_install:
- npm i -g npm@6.1.0
- npm i -g greenkeeper-lockfile@1
script: npm run ci
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
| language: node_js
node_js:
- 10
install: npm install
before_install:
- npm i -g greenkeeper-lockfile@1
script: npm run ci
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
| Update TravisCI to use Node 10 | Update TravisCI to use Node 10
| YAML | mit | lentz/buddyduel,lentz/buddyduel,lentz/buddyduel | yaml | ## Code Before:
language: node_js
node_js:
- "8"
install: npm install
before_install:
- npm i -g npm@6.1.0
- npm i -g greenkeeper-lockfile@1
script: npm run ci
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
## Instruction:
Update TravisCI to use Node 10
## Code After:
language: node_js
node_js:
- 10
install: npm install
before_install:
- npm i -g greenkeeper-lockfile@1
script: npm run ci
before_script: greenkeeper-lockfile-update
after_script: greenkeeper-lockfile-upload
|
0f88be49d34ed3c6d965e78571c772b414f3d2ef | site/content/story/it-began-in-thailand.md | site/content/story/it-began-in-thailand.md | +++
title = "It began in Thailand"
weight = 1000
images = [
"mindfulness-project-mudpit.jpg",
"mindfulness-house-porch.png",
"karma-yoga-board.png",
"mindfulness-project-house.jpg",
"mindfulness-project-mosaic.jpg",
"christian-carow-mindfulness-project.jpg",
"mindfulness-project-goodbye-circle.jpg",
"mindfulness-project-group.jpg",
]
+++
**Josh**: Estelle and I met in Thailand in the summer of 2015 while volunteering in Thailand at a place called the Mindfulness Project. People from all over the world come to the project to learn about yoga, meditation, Buddhism and permaculture.
One of our first encounters found us creating mud bricks together. Long stretches of manual labor, called *karma yoga*, gave volunteers the opportunity to talk to each other for hours at a time. It was through these conversations that Estelle and I first got to know each other. We also joined each other for iced coffee breaks in the nearby village.
We'll forever be grateful to the Mindfulness Project and its wonderful creator Christian, without whom we would never have met.
<span class="tip">
**Tip**: Swipe or click the heart arrows to see more photos, then click **'next » ...'** below to continue.
</span>
| +++
title = "It began in Thailand"
weight = 1000
images = [
"mindfulness-project-mudpit.jpg",
"mindfulness-house-porch.png",
"karma-yoga-board.png",
"mindfulness-project-house.jpg",
"mindfulness-project-mosaic.jpg",
"christian-carow-mindfulness-project.jpg",
"mindfulness-project-goodbye-circle.jpg",
"mindfulness-project-group.jpg",
]
+++
**Josh**: Estelle and I met in the summer of 2015 while volunteering in Thailand at the [Mindfulness Project](http://www.mindfulness-project.org/). People from all over the world come to the project to learn about yoga, meditation, Buddhism and permaculture.
One of our first encounters found us creating mud bricks together. Long stretches of manual labor, called *karma yoga*, gave volunteers the opportunity to talk to each other for hours at a time. It was through these conversations that Estelle and I first got to know each other. We also joined each other for iced coffee breaks in the nearby village.
We'll forever be grateful to the Mindfulness Project and its wonderful creator Christian, without whom we would never have met.
<span class="tip">
**Tip**: Swipe or click the heart arrows to see more photos, then click **'next » ...'** below to continue.
</span>
| Fix duplicate content and link to MP | Fix duplicate content and link to MP
| Markdown | mit | dzello/estelle-and-josh,dzello/estelle-and-josh,dzello/estelle-and-josh | markdown | ## Code Before:
+++
title = "It began in Thailand"
weight = 1000
images = [
"mindfulness-project-mudpit.jpg",
"mindfulness-house-porch.png",
"karma-yoga-board.png",
"mindfulness-project-house.jpg",
"mindfulness-project-mosaic.jpg",
"christian-carow-mindfulness-project.jpg",
"mindfulness-project-goodbye-circle.jpg",
"mindfulness-project-group.jpg",
]
+++
**Josh**: Estelle and I met in Thailand in the summer of 2015 while volunteering in Thailand at a place called the Mindfulness Project. People from all over the world come to the project to learn about yoga, meditation, Buddhism and permaculture.
One of our first encounters found us creating mud bricks together. Long stretches of manual labor, called *karma yoga*, gave volunteers the opportunity to talk to each other for hours at a time. It was through these conversations that Estelle and I first got to know each other. We also joined each other for iced coffee breaks in the nearby village.
We'll forever be grateful to the Mindfulness Project and its wonderful creator Christian, without whom we would never have met.
<span class="tip">
**Tip**: Swipe or click the heart arrows to see more photos, then click **'next » ...'** below to continue.
</span>
## Instruction:
Fix duplicate content and link to MP
## Code After:
+++
title = "It began in Thailand"
weight = 1000
images = [
"mindfulness-project-mudpit.jpg",
"mindfulness-house-porch.png",
"karma-yoga-board.png",
"mindfulness-project-house.jpg",
"mindfulness-project-mosaic.jpg",
"christian-carow-mindfulness-project.jpg",
"mindfulness-project-goodbye-circle.jpg",
"mindfulness-project-group.jpg",
]
+++
**Josh**: Estelle and I met in the summer of 2015 while volunteering in Thailand at the [Mindfulness Project](http://www.mindfulness-project.org/). People from all over the world come to the project to learn about yoga, meditation, Buddhism and permaculture.
One of our first encounters found us creating mud bricks together. Long stretches of manual labor, called *karma yoga*, gave volunteers the opportunity to talk to each other for hours at a time. It was through these conversations that Estelle and I first got to know each other. We also joined each other for iced coffee breaks in the nearby village.
We'll forever be grateful to the Mindfulness Project and its wonderful creator Christian, without whom we would never have met.
<span class="tip">
**Tip**: Swipe or click the heart arrows to see more photos, then click **'next » ...'** below to continue.
</span>
|
354512b5f7f019f2c17c4590f48ff135895d4d33 | app/helpers/assets_helper.rb | app/helpers/assets_helper.rb | module AssetsHelper
def render_asset(asset,custom_class)
case(asset.mime.split('/').first)
when 'image'
content_tag(:img, nil, src: asset.url, alt: asset.alt, title: asset.title, class: 'media-object '+custom_class)
else
link_to asset.url, asset.url
end
end
end
| module AssetsHelper
def render_asset(asset, custom_class=nil)
case(asset.mime.split('/').first)
when 'image'
content_tag(:img, nil, src: asset.url, alt: asset.alt, title: asset.title, class: ['media-object', custom_class].join(' '))
else
link_to asset.url, asset.url
end
end
end
| Make custom_class optional in render_asset helper | Make custom_class optional in render_asset helper
| Ruby | agpl-3.0 | osucomm/mediamagnet,osucomm/mediamagnet | ruby | ## Code Before:
module AssetsHelper
def render_asset(asset,custom_class)
case(asset.mime.split('/').first)
when 'image'
content_tag(:img, nil, src: asset.url, alt: asset.alt, title: asset.title, class: 'media-object '+custom_class)
else
link_to asset.url, asset.url
end
end
end
## Instruction:
Make custom_class optional in render_asset helper
## Code After:
module AssetsHelper
def render_asset(asset, custom_class=nil)
case(asset.mime.split('/').first)
when 'image'
content_tag(:img, nil, src: asset.url, alt: asset.alt, title: asset.title, class: ['media-object', custom_class].join(' '))
else
link_to asset.url, asset.url
end
end
end
|
101d5e8af93e5800917c7335d552ee9356b13b67 | sample/spec/spec_helper.rb | sample/spec/spec_helper.rb | ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../dummy/config/environment", __FILE__)
require 'rspec/rails'
require 'ffaker'
RSpec.configure do |config|
config.color = true
config.mock_with :rspec
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, comment the following line or assign false
# instead of true.
config.use_transactional_fixtures = true
config.include FactoryGirl::Syntax::Methods
config.fail_fast = ENV['FAIL_FAST'] || false
end
| ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../dummy/config/environment", __FILE__)
require 'rspec/rails'
require 'ffaker'
require 'spree_sample'
RSpec.configure do |config|
config.color = true
config.mock_with :rspec
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, comment the following line or assign false
# instead of true.
config.use_transactional_fixtures = true
config.include FactoryGirl::Syntax::Methods
config.fail_fast = ENV['FAIL_FAST'] || false
end
| Add require spree_sample to spec helper to prevent failure when running build.sh. | Add require spree_sample to spec helper to prevent failure when running build.sh.
| Ruby | bsd-3-clause | cutefrank/spree,caiqinghua/spree,firman/spree,useiichi/spree,Migweld/spree,mindvolt/spree,groundctrl/spree,NerdsvilleCEO/spree,ramkumar-kr/spree,degica/spree,yiqing95/spree,rakibulislam/spree,net2b/spree,urimikhli/spree,nooysters/spree,piousbox/spree,rajeevriitm/spree,ujai/spree,shioyama/spree,radarseesradar/spree,azranel/spree,Arpsara/solidus,dotandbo/spree,ahmetabdi/spree,yushine/spree,scottcrawford03/solidus,njerrywerry/spree,bjornlinder/Spree,patdec/spree,alvinjean/spree,LBRapid/spree,carlesjove/spree,reidblomquist/spree,athal7/solidus,siddharth28/spree,agient/agientstorefront,locomotivapro/spree,Engeltj/spree,jordan-brough/spree,locomotivapro/spree,robodisco/spree,beni55/spree,sunny2601/spree,sunny2601/spree,devilcoders/solidus,edgward/spree,Migweld/spree,Nevensoft/spree,yushine/spree,archSeer/spree,abhishekjain16/spree,lsirivong/spree,bonobos/solidus,welitonfreitas/spree,jaspreet21anand/spree,raow/spree,vmatekole/spree,azclick/spree,KMikhaylovCTG/spree,tesserakt/clean_spree,SadTreeFriends/spree,shaywood2/spree,imella/spree,DarkoP/spree,freerunningtech/spree,jeffboulet/spree,forkata/solidus,adaddeo/spree,radarseesradar/spree,Migweld/spree,Senjai/solidus,lyzxsc/spree,madetech/spree,trigrass2/spree,shekibobo/spree,wolfieorama/spree,progsri/spree,berkes/spree,Mayvenn/spree,vmatekole/spree,jparr/spree,jordan-brough/solidus,yiqing95/spree,project-eutopia/spree,CJMrozek/spree,Lostmyname/spree,KMikhaylovCTG/spree,TrialGuides/spree,edgward/spree,Boomkat/spree,kewaunited/spree,project-eutopia/spree,wolfieorama/spree,keatonrow/spree,sideci-sample/sideci-sample-spree,reinaris/spree,builtbybuffalo/spree,cutefrank/spree,lsirivong/spree,lyzxsc/spree,keatonrow/spree,delphsoft/spree-store-ballchair,welitonfreitas/spree,fahidnasir/spree,grzlus/spree,quentinuys/spree,maybii/spree,jasonfb/spree,ahmetabdi/spree,jasonfb/spree,softr8/spree,net2b/spree,moneyspyder/spree,jspizziri/spree,wolfieorama/spree,miyazawatomoka/spree,robodisco/spree,vmatekole/spree,TimurTarasenko/spree,madetech/spree,yomishra/pce,vinsol/spree,calvinl/spree,jsurdilla/solidus,locomotivapro/spree,Arpsara/solidus,Machpowersystems/spree_mach,Engeltj/spree,orenf/spree,priyank-gupta/spree,nooysters/spree,CJMrozek/spree,Mayvenn/spree,camelmasa/spree,DynamoMTL/spree,dafontaine/spree,assembledbrands/spree,reinaris/spree,urimikhli/spree,dandanwei/spree,moneyspyder/spree,rbngzlv/spree,vinayvinsol/spree,vinsol/spree,joanblake/spree,pulkit21/spree,njerrywerry/spree,radarseesradar/spree,karlitxo/spree,sfcgeorge/spree,grzlus/spree,jordan-brough/solidus,rbngzlv/spree,richardnuno/solidus,CiscoCloud/spree,JDutil/spree,hoanghiep90/spree,CiscoCloud/spree,ckk-scratch/solidus,joanblake/spree,freerunningtech/spree,reidblomquist/spree,lsirivong/solidus,omarsar/spree,surfdome/spree,devilcoders/solidus,tancnle/spree,PhoenixTeam/spree_phoenix,derekluo/spree,priyank-gupta/spree,vulk/spree,mleglise/spree,rajeevriitm/spree,FadliKun/spree,DarkoP/spree,sunny2601/spree,tesserakt/clean_spree,calvinl/spree,kewaunited/spree,JDutil/spree,Senjai/solidus,volpejoaquin/spree,ahmetabdi/spree,derekluo/spree,dandanwei/spree,vinsol/spree,volpejoaquin/spree,brchristian/spree,SadTreeFriends/spree,progsri/spree,reidblomquist/spree,karlitxo/spree,pervino/spree,dotandbo/spree,thogg4/spree,azranel/spree,brchristian/spree,tailic/spree,AgilTec/spree,locomotivapro/spree,jspizziri/spree,dandanwei/spree,kewaunited/spree,degica/spree,shaywood2/spree,orenf/spree,berkes/spree,firman/spree,agient/agientstorefront,piousbox/spree,beni55/spree,omarsar/spree,gautamsawhney/spree,thogg4/spree,tailic/spree,vinayvinsol/spree,APohio/spree,patdec/spree,alejandromangione/spree,builtbybuffalo/spree,sliaquat/spree,bonobos/solidus,ramkumar-kr/spree,alejandromangione/spree,tomash/spree,zaeznet/spree,cutefrank/spree,net2b/spree,Hates/spree,yiqing95/spree,delphsoft/spree-store-ballchair,maybii/spree,tesserakt/clean_spree,useiichi/spree,Hawaiideveloper/shoppingcart,jimblesm/spree,adaddeo/spree,watg/spree,gregoryrikson/spree-sample,tailic/spree,bricesanchez/spree,keatonrow/spree,woboinc/spree,agient/agientstorefront,Kagetsuki/spree,grzlus/solidus,ramkumar-kr/spree,odk211/spree,pervino/spree,NerdsvilleCEO/spree,zaeznet/spree,DynamoMTL/spree,volpejoaquin/spree,ujai/spree,athal7/solidus,odk211/spree,knuepwebdev/FloatTubeRodHolders,patdec/spree,ckk-scratch/solidus,jhawthorn/spree,Ropeney/spree,pervino/spree,tesserakt/clean_spree,TimurTarasenko/spree,biagidp/spree,adaddeo/spree,softr8/spree,edgward/spree,CiscoCloud/spree,FadliKun/spree,watg/spree,pervino/spree,Boomkat/spree,miyazawatomoka/spree,xuewenfei/solidus,Boomkat/spree,lsirivong/solidus,berkes/spree,jsurdilla/solidus,ckk-scratch/solidus,beni55/spree,rakibulislam/spree,yiqing95/spree,richardnuno/solidus,athal7/solidus,jaspreet21anand/spree,bricesanchez/spree,sfcgeorge/spree,jordan-brough/spree,grzlus/solidus,archSeer/spree,reidblomquist/spree,useiichi/spree,Senjai/solidus,grzlus/spree,Hates/spree,azclick/spree,njerrywerry/spree,wolfieorama/spree,beni55/spree,progsri/spree,net2b/spree,JDutil/spree,moneyspyder/spree,azclick/spree,piousbox/spree,jspizziri/spree,TrialGuides/spree,sideci-sample/sideci-sample-spree,dotandbo/spree,dotandbo/spree,dafontaine/spree,siddharth28/spree,forkata/solidus,lsirivong/solidus,Senjai/spree,camelmasa/spree,imella/spree,bonobos/solidus,Migweld/spree,vulk/spree,RatioClothing/spree,cutefrank/spree,freerunningtech/spree,carlesjove/spree,volpejoaquin/spree,gautamsawhney/spree,alepore/spree,ayb/spree,jimblesm/spree,xuewenfei/solidus,radarseesradar/spree,KMikhaylovCTG/spree,ujai/spree,vcavallo/spree,Nevensoft/spree,shekibobo/spree,hifly/spree,welitonfreitas/spree,softr8/spree,azranel/spree,tomash/spree,JuandGirald/spree,devilcoders/solidus,KMikhaylovCTG/spree,nooysters/spree,madetech/spree,jspizziri/spree,softr8/spree,jordan-brough/solidus,mindvolt/spree,scottcrawford03/solidus,Ropeney/spree,urimikhli/spree,vulk/spree,Machpowersystems/spree_mach,imella/spree,xuewenfei/solidus,groundctrl/spree,fahidnasir/spree,jparr/spree,Hawaiideveloper/shoppingcart,maybii/spree,siddharth28/spree,alvinjean/spree,FadliKun/spree,assembledbrands/spree,edgward/spree,piousbox/spree,miyazawatomoka/spree,DarkoP/spree,welitonfreitas/spree,trigrass2/spree,Senjai/spree,bjornlinder/Spree,JuandGirald/spree,rajeevriitm/spree,scottcrawford03/solidus,TrialGuides/spree,brchristian/spree,alvinjean/spree,zamiang/spree,dafontaine/spree,odk211/spree,joanblake/spree,sideci-sample/sideci-sample-spree,caiqinghua/spree,Hates/spree,LBRapid/spree,bjornlinder/Spree,RatioClothing/spree,DarkoP/spree,Lostmyname/spree,yomishra/pce,grzlus/solidus,yushine/spree,SadTreeFriends/spree,kitwalker12/spree,sfcgeorge/spree,CJMrozek/spree,quentinuys/spree,Arpsara/solidus,abhishekjain16/spree,builtbybuffalo/spree,vinayvinsol/spree,LBRapid/spree,forkata/solidus,Kagetsuki/spree,hoanghiep90/spree,gregoryrikson/spree-sample,fahidnasir/spree,Ropeney/spree,Boomkat/spree,njerrywerry/spree,watg/spree,richardnuno/solidus,jsurdilla/solidus,alvinjean/spree,rajeevriitm/spree,woboinc/spree,hoanghiep90/spree,Lostmyname/spree,carlesjove/spree,Kagetsuki/spree,jhawthorn/spree,dafontaine/spree,jaspreet21anand/spree,Hawaiideveloper/shoppingcart,Nevensoft/spree,moneyspyder/spree,brchristian/spree,TimurTarasenko/spree,quentinuys/spree,adaddeo/spree,vcavallo/spree,tancnle/spree,fahidnasir/spree,Hates/spree,FadliKun/spree,Ropeney/spree,rbngzlv/spree,camelmasa/spree,jhawthorn/spree,sfcgeorge/spree,alejandromangione/spree,lyzxsc/spree,shioyama/spree,gregoryrikson/spree-sample,maybii/spree,yomishra/pce,hoanghiep90/spree,useiichi/spree,keatonrow/spree,lsirivong/spree,APohio/spree,Kagetsuki/spree,jimblesm/spree,mleglise/spree,NerdsvilleCEO/spree,pervino/solidus,jaspreet21anand/spree,vinsol/spree,Senjai/solidus,xuewenfei/solidus,Engeltj/spree,grzlus/solidus,alejandromangione/spree,ahmetabdi/spree,Hawaiideveloper/shoppingcart,surfdome/spree,madetech/spree,surfdome/spree,project-eutopia/spree,PhoenixTeam/spree_phoenix,hifly/spree,ayb/spree,archSeer/spree,berkes/spree,Mayvenn/spree,groundctrl/spree,mindvolt/spree,devilcoders/solidus,vcavallo/spree,DynamoMTL/spree,JDutil/spree,ayb/spree,sliaquat/spree,shioyama/spree,bricesanchez/spree,jeffboulet/spree,sunny2601/spree,shekibobo/spree,builtbybuffalo/spree,zamiang/spree,JuandGirald/spree,Machpowersystems/spree_mach,ckk-scratch/solidus,scottcrawford03/solidus,groundctrl/spree,pulkit21/spree,tancnle/spree,Nevensoft/spree,mleglise/spree,thogg4/spree,forkata/solidus,Arpsara/solidus,jasonfb/spree,azclick/spree,knuepwebdev/FloatTubeRodHolders,jordan-brough/solidus,pulkit21/spree,PhoenixTeam/spree_phoenix,shaywood2/spree,sliaquat/spree,woboinc/spree,thogg4/spree,zaeznet/spree,AgilTec/spree,delphsoft/spree-store-ballchair,richardnuno/solidus,patdec/spree,rakibulislam/spree,odk211/spree,tomash/spree,kitwalker12/spree,pjmj777/spree,robodisco/spree,abhishekjain16/spree,miyazawatomoka/spree,vcavallo/spree,CiscoCloud/spree,Engeltj/spree,priyank-gupta/spree,yushine/spree,progsri/spree,zaeznet/spree,pervino/solidus,JuandGirald/spree,orenf/spree,StemboltHQ/spree,vmatekole/spree,jeffboulet/spree,jparr/spree,firman/spree,pulkit21/spree,zamiang/spree,jasonfb/spree,athal7/solidus,Mayvenn/spree,alepore/spree,calvinl/spree,alepore/spree,lsirivong/solidus,Lostmyname/spree,siddharth28/spree,DynamoMTL/spree,archSeer/spree,zamiang/spree,TimurTarasenko/spree,rbngzlv/spree,hifly/spree,pjmj777/spree,trigrass2/spree,vinayvinsol/spree,azranel/spree,raow/spree,TrialGuides/spree,ayb/spree,agient/agientstorefront,orenf/spree,gregoryrikson/spree-sample,surfdome/spree,assembledbrands/spree,camelmasa/spree,nooysters/spree,biagidp/spree,StemboltHQ/spree,StemboltHQ/spree,abhishekjain16/spree,jimblesm/spree,sliaquat/spree,reinaris/spree,reinaris/spree,NerdsvilleCEO/spree,raow/spree,AgilTec/spree,rakibulislam/spree,omarsar/spree,PhoenixTeam/spree_phoenix,robodisco/spree,hifly/spree,dandanwei/spree,caiqinghua/spree,jeffboulet/spree,degica/spree,pjmj777/spree,shekibobo/spree,joanblake/spree,quentinuys/spree,carlesjove/spree,pervino/solidus,ramkumar-kr/spree,RatioClothing/spree,kewaunited/spree,derekluo/spree,project-eutopia/spree,derekluo/spree,gautamsawhney/spree,jordan-brough/spree,tomash/spree,priyank-gupta/spree,bonobos/solidus,tancnle/spree,pervino/solidus,SadTreeFriends/spree,APohio/spree,APohio/spree,lsirivong/spree,delphsoft/spree-store-ballchair,mindvolt/spree,caiqinghua/spree,knuepwebdev/FloatTubeRodHolders,karlitxo/spree,trigrass2/spree,firman/spree,raow/spree,gautamsawhney/spree,grzlus/spree,mleglise/spree,lyzxsc/spree,Senjai/spree,AgilTec/spree,kitwalker12/spree,karlitxo/spree,omarsar/spree,jparr/spree,calvinl/spree,CJMrozek/spree,jsurdilla/solidus,biagidp/spree,vulk/spree,shaywood2/spree | ruby | ## Code Before:
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../dummy/config/environment", __FILE__)
require 'rspec/rails'
require 'ffaker'
RSpec.configure do |config|
config.color = true
config.mock_with :rspec
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, comment the following line or assign false
# instead of true.
config.use_transactional_fixtures = true
config.include FactoryGirl::Syntax::Methods
config.fail_fast = ENV['FAIL_FAST'] || false
end
## Instruction:
Add require spree_sample to spec helper to prevent failure when running build.sh.
## Code After:
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../dummy/config/environment", __FILE__)
require 'rspec/rails'
require 'ffaker'
require 'spree_sample'
RSpec.configure do |config|
config.color = true
config.mock_with :rspec
# If you're not using ActiveRecord, or you'd prefer not to run each of your
# examples within a transaction, comment the following line or assign false
# instead of true.
config.use_transactional_fixtures = true
config.include FactoryGirl::Syntax::Methods
config.fail_fast = ENV['FAIL_FAST'] || false
end
|
f599b44a70fc7431fb60b5bc86b2e866faa61350 | lib/accounting/bank.rb | lib/accounting/bank.rb | module Accounting
class Bank < ActiveRecord::Base
has_many :accounts
belongs_to :vcard, :class_name => 'Vcards::Vcard'
end
end
| module Accounting
class Bank < ActiveRecord::Base
has_many :accounts
has_vcards
end
end
| Use has_vcards from vcards plugin. | Use has_vcards from vcards plugin.
| Ruby | mit | huerlisi/has_accounts,hauledev/has_account_engine,hauledev/has_account,hauledev/has_account,huerlisi/has_accounts_engine,hauledev/has_account_engine,huerlisi/has_accounts_engine,huerlisi/has_accounts,hauledev/has_account_engine,hauledev/has_account,huerlisi/has_accounts_engine,huerlisi/has_accounts | ruby | ## Code Before:
module Accounting
class Bank < ActiveRecord::Base
has_many :accounts
belongs_to :vcard, :class_name => 'Vcards::Vcard'
end
end
## Instruction:
Use has_vcards from vcards plugin.
## Code After:
module Accounting
class Bank < ActiveRecord::Base
has_many :accounts
has_vcards
end
end
|
6f63713f2812138cf42fcef7c938b8f89bb396d5 | config/blazer.sample.yml | config/blazer.sample.yml |
data_sources:
main:
url: mysql2://metasmoke_blazer:zFpc8tw7CdAuXizX@localhost:3306/metasmoke_dev
timeout: 10
cache:
mode: slow
expires_in: 60
slow_threshold: 5
smart_variables:
reason_id: "SELECT id, reason_name FROM p_reasons ORDER BY id ASC"
user_id: "SELECT id, username FROM p_users ORDER BY id ASC"
api_key_id: "SELECT id, app_name FROM p_api_keys ORDER BY id ASC"
site_id: "SELECT id, site_name FROM p_sites ORDER BY id ASC"
domain_tag_id: "SELECT id, name FROM p_domain_tags ORDER BY id ASC"
linked_columns:
# user_id: "/admin/users/{value}"
smart_columns:
reason_id: "SELECT id, reason_name FROM p_reasons WHERE id IN {value}"
user_id: "SELECT id, username FROM p_users WHERE id IN {value}"
api_key_id: "SELECT id, app_name FROM p_api_keys WHERE id IN {value}"
site_id: "SELECT id, site_name FROM p_sites WHERE id IN {value}"
domain_tag_id: "SELECT id, name FROM p_domain_tags WHERE id IN {value}"
audit: true
|
data_sources:
main:
url: mysql2://metasmoke_blazer:zFpc8tw7CdAuXizX@localhost:3306/metasmoke_dev
timeout: 10
cache:
mode: slow
expires_in: 60
slow_threshold: 5
smart_variables:
reason_id: "SELECT id, reason_name FROM p_reasons ORDER BY id ASC"
user_id: "SELECT id, username FROM p_users ORDER BY id ASC"
api_key_id: "SELECT id, app_name FROM p_api_keys ORDER BY id ASC"
site_id: "SELECT id, site_name FROM p_sites ORDER BY id ASC"
domain_tag_id: "SELECT id, name FROM p_domain_tags ORDER BY id ASC"
linked_columns:
# user_id: "/admin/users/{value}"
smart_columns:
reason_id: "SELECT id, reason_name FROM p_reasons WHERE id IN {value}"
user_id: "SELECT id, username FROM p_users WHERE id IN {value}"
api_key_id: "SELECT id, app_name FROM p_api_keys WHERE id IN {value}"
site_id: "SELECT id, site_name FROM p_sites WHERE id IN {value}"
domain_tag_id: "SELECT id, name FROM p_domain_tags WHERE id IN {value}"
audit: true
user_class: User
user_method: current_user
user_name: username
| Add user config to Blazer | Add user config to Blazer | YAML | cc0-1.0 | Charcoal-SE/metasmoke,Charcoal-SE/metasmoke,Charcoal-SE/metasmoke,Charcoal-SE/metasmoke | yaml | ## Code Before:
data_sources:
main:
url: mysql2://metasmoke_blazer:zFpc8tw7CdAuXizX@localhost:3306/metasmoke_dev
timeout: 10
cache:
mode: slow
expires_in: 60
slow_threshold: 5
smart_variables:
reason_id: "SELECT id, reason_name FROM p_reasons ORDER BY id ASC"
user_id: "SELECT id, username FROM p_users ORDER BY id ASC"
api_key_id: "SELECT id, app_name FROM p_api_keys ORDER BY id ASC"
site_id: "SELECT id, site_name FROM p_sites ORDER BY id ASC"
domain_tag_id: "SELECT id, name FROM p_domain_tags ORDER BY id ASC"
linked_columns:
# user_id: "/admin/users/{value}"
smart_columns:
reason_id: "SELECT id, reason_name FROM p_reasons WHERE id IN {value}"
user_id: "SELECT id, username FROM p_users WHERE id IN {value}"
api_key_id: "SELECT id, app_name FROM p_api_keys WHERE id IN {value}"
site_id: "SELECT id, site_name FROM p_sites WHERE id IN {value}"
domain_tag_id: "SELECT id, name FROM p_domain_tags WHERE id IN {value}"
audit: true
## Instruction:
Add user config to Blazer
## Code After:
data_sources:
main:
url: mysql2://metasmoke_blazer:zFpc8tw7CdAuXizX@localhost:3306/metasmoke_dev
timeout: 10
cache:
mode: slow
expires_in: 60
slow_threshold: 5
smart_variables:
reason_id: "SELECT id, reason_name FROM p_reasons ORDER BY id ASC"
user_id: "SELECT id, username FROM p_users ORDER BY id ASC"
api_key_id: "SELECT id, app_name FROM p_api_keys ORDER BY id ASC"
site_id: "SELECT id, site_name FROM p_sites ORDER BY id ASC"
domain_tag_id: "SELECT id, name FROM p_domain_tags ORDER BY id ASC"
linked_columns:
# user_id: "/admin/users/{value}"
smart_columns:
reason_id: "SELECT id, reason_name FROM p_reasons WHERE id IN {value}"
user_id: "SELECT id, username FROM p_users WHERE id IN {value}"
api_key_id: "SELECT id, app_name FROM p_api_keys WHERE id IN {value}"
site_id: "SELECT id, site_name FROM p_sites WHERE id IN {value}"
domain_tag_id: "SELECT id, name FROM p_domain_tags WHERE id IN {value}"
audit: true
user_class: User
user_method: current_user
user_name: username
|
de5ac658826133680848c2280d2f6f39e324b63f | bucket/msys2.json | bucket/msys2.json | {
"homepage": "http://msys2.github.io",
"##":"64-bit version (able to build both 32-bit and 64-bit packages)",
"version": "2016.10.25",
"url": "https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20161025.tar.xz",
"extract_dir": "msys64",
"bin": [["msys2_shell.cmd", "msys2"]]
} | {
"homepage": "http://msys2.github.io",
"##": "64-bit version (able to build both 32-bit and 64-bit packages)",
"version": "20161025",
"architecture": {
"64bit": {
"url": "https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20161025.tar.xz",
"extract_dir": "msys64",
"hash": "bb1f1a0b35b3d96bf9c15092da8ce969a84a134f7b08811292fbc9d84d48c65d"
},
"32bit": {
"url": "https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-20161025.tar.xz",
"extract_dir": "msys32",
"hash": "8bafd3d52f5a51528a8671c1cae5591b36086d6ea5b1e76e17e390965cf6768f"
}
},
"bin": [["msys2_shell.cmd", "msys2"]],
"checkver": {
"re": "http://repo.msys2.org/distrib/x86_64/msys2-x86_64-(\\d+).exe",
"architecture": {
"64bit": {
"url": "https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-$version.tar.xz"
},
"32bit": {
"url": "https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-$version.tar.xz"
}
}
}
}
| Fix tests. Add 32-bit and autoupdate. | Fix tests. Add 32-bit and autoupdate.
| JSON | unlicense | Cyianor/scoop,vidarkongsli/scoop,yunspace/scoop,Congee/scoop,berwyn/scoop,rasa/scoop,kodybrown/scoop,toxeus/scoop,lukesampson/scoop,coonce/scoop,reelsense/scoop,nikolasd/scoop | json | ## Code Before:
{
"homepage": "http://msys2.github.io",
"##":"64-bit version (able to build both 32-bit and 64-bit packages)",
"version": "2016.10.25",
"url": "https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20161025.tar.xz",
"extract_dir": "msys64",
"bin": [["msys2_shell.cmd", "msys2"]]
}
## Instruction:
Fix tests. Add 32-bit and autoupdate.
## Code After:
{
"homepage": "http://msys2.github.io",
"##": "64-bit version (able to build both 32-bit and 64-bit packages)",
"version": "20161025",
"architecture": {
"64bit": {
"url": "https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-20161025.tar.xz",
"extract_dir": "msys64",
"hash": "bb1f1a0b35b3d96bf9c15092da8ce969a84a134f7b08811292fbc9d84d48c65d"
},
"32bit": {
"url": "https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-20161025.tar.xz",
"extract_dir": "msys32",
"hash": "8bafd3d52f5a51528a8671c1cae5591b36086d6ea5b1e76e17e390965cf6768f"
}
},
"bin": [["msys2_shell.cmd", "msys2"]],
"checkver": {
"re": "http://repo.msys2.org/distrib/x86_64/msys2-x86_64-(\\d+).exe",
"architecture": {
"64bit": {
"url": "https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-base-x86_64-$version.tar.xz"
},
"32bit": {
"url": "https://sourceforge.net/projects/msys2/files/Base/i686/msys2-base-i686-$version.tar.xz"
}
}
}
}
|
651f9f5c6bf8b78593901fad263d2672185d7c83 | README.md | README.md | [](https://discord.gg/yyDWNBr)
[](https://david-dm.org/DrSmugleaf/Banter-Bot)
[](https://travis-ci.org/DrSmugleaf/Banter-Bot)
[Invite the bot to your server](https://discordapp.com/oauth2/authorize?client_id=219542626637053952&scope=bot&permissions=271805456)
## About
Banter Bot is a Discord bot written in Node.js.
## Commands
Use !help in your server after adding the bot to it to see the commands you can use.
Use !server-language language to set your server's global language for the bot to respond with.
| [](https://discord.gg/yyDWNBr)
[](https://david-dm.org/DrSmugleaf/Banter-Bot)
[](https://travis-ci.org/DrSmugleaf/Banter-Bot)
[Invite the bot to your server](https://discordapp.com/oauth2/authorize?client_id=219542626637053952&scope=bot&permissions=271805456)
## About
Banter Bot is a Discord bot written in Node.js.
## Commands
Use !help in your server after adding the bot to it to see the commands you can use.
Use !server-language language to set your server's global language for the bot to respond with.
| Change travis icon branch to master | Change travis icon branch to master | Markdown | apache-2.0 | DrSmugleaf/Banter-Bot,DrSmugleaf/Banter-Bot | markdown | ## Code Before:
[](https://discord.gg/yyDWNBr)
[](https://david-dm.org/DrSmugleaf/Banter-Bot)
[](https://travis-ci.org/DrSmugleaf/Banter-Bot)
[Invite the bot to your server](https://discordapp.com/oauth2/authorize?client_id=219542626637053952&scope=bot&permissions=271805456)
## About
Banter Bot is a Discord bot written in Node.js.
## Commands
Use !help in your server after adding the bot to it to see the commands you can use.
Use !server-language language to set your server's global language for the bot to respond with.
## Instruction:
Change travis icon branch to master
## Code After:
[](https://discord.gg/yyDWNBr)
[](https://david-dm.org/DrSmugleaf/Banter-Bot)
[](https://travis-ci.org/DrSmugleaf/Banter-Bot)
[Invite the bot to your server](https://discordapp.com/oauth2/authorize?client_id=219542626637053952&scope=bot&permissions=271805456)
## About
Banter Bot is a Discord bot written in Node.js.
## Commands
Use !help in your server after adding the bot to it to see the commands you can use.
Use !server-language language to set your server's global language for the bot to respond with.
|
e7d40d10b93a219d878c8dcd14c7b434c0454b36 | sbin/rocotorun.rb | sbin/rocotorun.rb | if File.symlink?(__FILE__)
__WFMDIR__=File.dirname(File.dirname(File.expand_path(File.readlink(__FILE__),File.dirname(__FILE__))))
else
__WFMDIR__=File.dirname(File.expand_path(File.dirname(__FILE__)))
end
# Add include paths for WFM and libxml-ruby libraries
$:.unshift("#{__WFMDIR__}/lib")
$:.unshift("#{__WFMDIR__}/lib/libxml-ruby")
$:.unshift("#{__WFMDIR__}/lib/sqlite3-ruby")
$:.unshift("#{__WFMDIR__}/lib/SystemTimer")
# Load workflow engine library
require 'workflowmgr/workflowengine'
require 'workflowmgr/workflowoption'
WorkflowMgr::VERSION=IO.readlines("#{__WFMDIR__}/VERSION",nil)[0]
# Create workflow engine and run it
workflowmgrOptions=WorkflowMgr::WorkflowOption.new(ARGV)
workflowengine=WorkflowMgr::WorkflowEngine.new(workflowmgrOptions)
workflowengine.run
| if File.symlink?(__FILE__)
__WFMDIR__=File.dirname(File.dirname(File.expand_path(File.readlink(__FILE__),File.dirname(__FILE__))))
else
__WFMDIR__=File.dirname(File.expand_path(File.dirname(__FILE__)))
end
# Add include paths for WFM and libxml-ruby libraries
$:.unshift("#{__WFMDIR__}/lib")
$:.unshift("#{__WFMDIR__}/lib/libxml-ruby")
$:.unshift("#{__WFMDIR__}/lib/sqlite3-ruby")
$:.unshift("#{__WFMDIR__}/lib/SystemTimer")
# Load workflow engine library
require 'workflowmgr/workflowengine'
require 'workflowmgr/workflowoption'
WorkflowMgr::VERSION=IO.readlines("#{__WFMDIR__}/VERSION",nil)[0]
# Create workflow engine and run it
workflowmgrOptions=WorkflowMgr::WorkflowOption.new(ARGV)
if workflowmgrOptions.verbose > 999
set_trace_func proc { |event,file,line,id,binding,classname| printf "%10s %s:%-2d %10s %8s\n",event,file,line,id,classname }
end
workflowengine=WorkflowMgr::WorkflowEngine.new(workflowmgrOptions)
workflowengine.run
| Add program tracing at verbosity level 1000 | Add program tracing at verbosity level 1000
| Ruby | apache-2.0 | christopherwharrop/rocoto,christopherwharrop/rocoto | ruby | ## Code Before:
if File.symlink?(__FILE__)
__WFMDIR__=File.dirname(File.dirname(File.expand_path(File.readlink(__FILE__),File.dirname(__FILE__))))
else
__WFMDIR__=File.dirname(File.expand_path(File.dirname(__FILE__)))
end
# Add include paths for WFM and libxml-ruby libraries
$:.unshift("#{__WFMDIR__}/lib")
$:.unshift("#{__WFMDIR__}/lib/libxml-ruby")
$:.unshift("#{__WFMDIR__}/lib/sqlite3-ruby")
$:.unshift("#{__WFMDIR__}/lib/SystemTimer")
# Load workflow engine library
require 'workflowmgr/workflowengine'
require 'workflowmgr/workflowoption'
WorkflowMgr::VERSION=IO.readlines("#{__WFMDIR__}/VERSION",nil)[0]
# Create workflow engine and run it
workflowmgrOptions=WorkflowMgr::WorkflowOption.new(ARGV)
workflowengine=WorkflowMgr::WorkflowEngine.new(workflowmgrOptions)
workflowengine.run
## Instruction:
Add program tracing at verbosity level 1000
## Code After:
if File.symlink?(__FILE__)
__WFMDIR__=File.dirname(File.dirname(File.expand_path(File.readlink(__FILE__),File.dirname(__FILE__))))
else
__WFMDIR__=File.dirname(File.expand_path(File.dirname(__FILE__)))
end
# Add include paths for WFM and libxml-ruby libraries
$:.unshift("#{__WFMDIR__}/lib")
$:.unshift("#{__WFMDIR__}/lib/libxml-ruby")
$:.unshift("#{__WFMDIR__}/lib/sqlite3-ruby")
$:.unshift("#{__WFMDIR__}/lib/SystemTimer")
# Load workflow engine library
require 'workflowmgr/workflowengine'
require 'workflowmgr/workflowoption'
WorkflowMgr::VERSION=IO.readlines("#{__WFMDIR__}/VERSION",nil)[0]
# Create workflow engine and run it
workflowmgrOptions=WorkflowMgr::WorkflowOption.new(ARGV)
if workflowmgrOptions.verbose > 999
set_trace_func proc { |event,file,line,id,binding,classname| printf "%10s %s:%-2d %10s %8s\n",event,file,line,id,classname }
end
workflowengine=WorkflowMgr::WorkflowEngine.new(workflowmgrOptions)
workflowengine.run
|
12b921a6bb858f858261121b3f215b798e423554 | autoroll/config/pdfium-chromium.json | autoroll/config/pdfium-chromium.json | // See https://skia.googlesource.com/buildbot.git/+/master/autoroll/go/roller/config.go#130
// for documentation of the autoroller config.
{
"childName": "PDFium",
"contacts": [
"thestig@chromium.org"
],
"gerrit": {
"url": "https://chromium-review.googlesource.com",
"project": "chromium/src",
"config": "chromium"
},
"isInternal": false,
"parentName": "Chromium",
"parentWaterfall": "https://build.chromium.org",
"rollerName": "pdfium-autoroll",
"serviceAccount": "chromium-autoroll@skia-public.iam.gserviceaccount.com",
"sheriff": [
"thestig@chromium.org"
],
"noCheckoutDEPSRepoManager": {
"childBranch": "master",
"childPath": "src/third_party/pdfium",
"childRepo": "https://pdfium.googlesource.com/pdfium.git",
"includeBugs": true,
"includeLog": true,
"parentBranch": "master",
"parentRepo": "https://chromium.googlesource.com/chromium/src.git"
},
"kubernetes": {
"cpu": "1",
"memory": "2Gi",
"disk": "2Gi",
"readinessInitialDelaySeconds": "30",
"readinessPeriodSeconds": "30",
"readinessFailureThreshold": "10"
},
"maxRollFrequency": "0m"
}
| // See https://skia.googlesource.com/buildbot.git/+/master/autoroll/go/roller/config.go#130
// for documentation of the autoroller config.
{
"childName": "PDFium",
"contacts": [
"thestig@chromium.org"
],
"gerrit": {
"url": "https://chromium-review.googlesource.com",
"project": "chromium/src",
"config": "chromium"
},
"isInternal": false,
"parentName": "Chromium",
"parentWaterfall": "https://build.chromium.org",
"rollerName": "pdfium-autoroll",
"serviceAccount": "chromium-autoroll@skia-public.iam.gserviceaccount.com",
"sheriff": [
"pdfium-deps-rolls@chromium.org"
],
"noCheckoutDEPSRepoManager": {
"childBranch": "master",
"childPath": "src/third_party/pdfium",
"childRepo": "https://pdfium.googlesource.com/pdfium.git",
"includeBugs": true,
"includeLog": true,
"parentBranch": "master",
"parentRepo": "https://chromium.googlesource.com/chromium/src.git"
},
"kubernetes": {
"cpu": "1",
"memory": "2Gi",
"disk": "2Gi",
"readinessInitialDelaySeconds": "30",
"readinessPeriodSeconds": "30",
"readinessFailureThreshold": "10"
},
"maxRollFrequency": "0m"
}
| Update PDFium roller's sheriff email. | Update PDFium roller's sheriff email.
There now exists a pdfium-deps-rolls group for this purpose.
BUG=chromium:901054
Change-Id: Iaf3962c7c36b56c302f39b14225c7a9f59a3782c
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/213000
Reviewed-by: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
Commit-Queue: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
| JSON | bsd-3-clause | google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot | json | ## Code Before:
// See https://skia.googlesource.com/buildbot.git/+/master/autoroll/go/roller/config.go#130
// for documentation of the autoroller config.
{
"childName": "PDFium",
"contacts": [
"thestig@chromium.org"
],
"gerrit": {
"url": "https://chromium-review.googlesource.com",
"project": "chromium/src",
"config": "chromium"
},
"isInternal": false,
"parentName": "Chromium",
"parentWaterfall": "https://build.chromium.org",
"rollerName": "pdfium-autoroll",
"serviceAccount": "chromium-autoroll@skia-public.iam.gserviceaccount.com",
"sheriff": [
"thestig@chromium.org"
],
"noCheckoutDEPSRepoManager": {
"childBranch": "master",
"childPath": "src/third_party/pdfium",
"childRepo": "https://pdfium.googlesource.com/pdfium.git",
"includeBugs": true,
"includeLog": true,
"parentBranch": "master",
"parentRepo": "https://chromium.googlesource.com/chromium/src.git"
},
"kubernetes": {
"cpu": "1",
"memory": "2Gi",
"disk": "2Gi",
"readinessInitialDelaySeconds": "30",
"readinessPeriodSeconds": "30",
"readinessFailureThreshold": "10"
},
"maxRollFrequency": "0m"
}
## Instruction:
Update PDFium roller's sheriff email.
There now exists a pdfium-deps-rolls group for this purpose.
BUG=chromium:901054
Change-Id: Iaf3962c7c36b56c302f39b14225c7a9f59a3782c
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/213000
Reviewed-by: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
Commit-Queue: Eric Boren <0e499112533c8544f0505ea0d08394fb5ad7d8fa@google.com>
## Code After:
// See https://skia.googlesource.com/buildbot.git/+/master/autoroll/go/roller/config.go#130
// for documentation of the autoroller config.
{
"childName": "PDFium",
"contacts": [
"thestig@chromium.org"
],
"gerrit": {
"url": "https://chromium-review.googlesource.com",
"project": "chromium/src",
"config": "chromium"
},
"isInternal": false,
"parentName": "Chromium",
"parentWaterfall": "https://build.chromium.org",
"rollerName": "pdfium-autoroll",
"serviceAccount": "chromium-autoroll@skia-public.iam.gserviceaccount.com",
"sheriff": [
"pdfium-deps-rolls@chromium.org"
],
"noCheckoutDEPSRepoManager": {
"childBranch": "master",
"childPath": "src/third_party/pdfium",
"childRepo": "https://pdfium.googlesource.com/pdfium.git",
"includeBugs": true,
"includeLog": true,
"parentBranch": "master",
"parentRepo": "https://chromium.googlesource.com/chromium/src.git"
},
"kubernetes": {
"cpu": "1",
"memory": "2Gi",
"disk": "2Gi",
"readinessInitialDelaySeconds": "30",
"readinessPeriodSeconds": "30",
"readinessFailureThreshold": "10"
},
"maxRollFrequency": "0m"
}
|
4cc7b77b84cb82c707eb7fae80e05b96a976187d | test/make-valid-publication.js | test/make-valid-publication.js | var FormData = require('form-data')
module.exports = function (title) {
var form = new FormData()
form.append('name', 'Kyle E. Mitchell')
form.append('affiliation', 'BioBricks Foundation')
form.append('title', title || 'Made-Up Discovery')
form.append('description', 'Pat head. Rub stomach. Eureka!')
form.append('safety', 'Watch your elbows.')
form.append('commitment', '0.0.0')
form.append('license', '0.0.0')
return form
}
| var FormData = require('form-data')
module.exports = function (title) {
var form = new FormData()
form.append('name', 'Kyle E. Mitchell')
form.append('affiliation', 'BioBricks Foundation')
form.append('title', title || 'Made-Up Discovery')
form.append('description', 'Pat head. Rub stomach. Eureka!')
form.append('journals[]', 'Nature')
form.append('safety', 'Watch your elbows.')
form.append('commitment', '0.0.0')
form.append('license', '0.0.0')
return form
}
| Test publication with journals list | Test publication with journals list
| JavaScript | apache-2.0 | biobricks/dbos,publicdomainchronicle/public-domain-chronicle,biobricks/dbos | javascript | ## Code Before:
var FormData = require('form-data')
module.exports = function (title) {
var form = new FormData()
form.append('name', 'Kyle E. Mitchell')
form.append('affiliation', 'BioBricks Foundation')
form.append('title', title || 'Made-Up Discovery')
form.append('description', 'Pat head. Rub stomach. Eureka!')
form.append('safety', 'Watch your elbows.')
form.append('commitment', '0.0.0')
form.append('license', '0.0.0')
return form
}
## Instruction:
Test publication with journals list
## Code After:
var FormData = require('form-data')
module.exports = function (title) {
var form = new FormData()
form.append('name', 'Kyle E. Mitchell')
form.append('affiliation', 'BioBricks Foundation')
form.append('title', title || 'Made-Up Discovery')
form.append('description', 'Pat head. Rub stomach. Eureka!')
form.append('journals[]', 'Nature')
form.append('safety', 'Watch your elbows.')
form.append('commitment', '0.0.0')
form.append('license', '0.0.0')
return form
}
|
21398f4b5afec6bafa633315cbd17fbcfb35e683 | {{cookiecutter.role_project_name}}/tasks/main.yml | {{cookiecutter.role_project_name}}/tasks/main.yml | ---
# tasks file for {{ cookiecutter.role_name }}
- name: Run tasks on current environment
include: "{{ '{{' }} ansible_os_family {{ '}}' }}.yml"
| ---
# tasks file for {{ cookiecutter.role_name }}
- name: Run specified tasks on current platform
include: "{{ '{{' }} ansible_os_family {{ '}}' }}.yml"
| Fix name of include task a bit to understand it easily. | Fix name of include task a bit to understand it easily.
| YAML | mit | FGtatsuro/cookiecutter-ansible-role,FGtatsuro/cookiecutter-ansible-role | yaml | ## Code Before:
---
# tasks file for {{ cookiecutter.role_name }}
- name: Run tasks on current environment
include: "{{ '{{' }} ansible_os_family {{ '}}' }}.yml"
## Instruction:
Fix name of include task a bit to understand it easily.
## Code After:
---
# tasks file for {{ cookiecutter.role_name }}
- name: Run specified tasks on current platform
include: "{{ '{{' }} ansible_os_family {{ '}}' }}.yml"
|
334e73cf57439ed2a2e390beb37836e061a73261 | bin/web-service.bat | bin/web-service.bat | @echo off
setlocal
set WEB_PROCESS_TITLE=Skywalking-Web
set WEB_BASE_PATH=%~dp0%..
set WEB_RUNTIME_OPTIONS="-Xms256M -Xmx512M"
set CLASSPATH=%WEB_BASE_PATH%\config;
SET CLASSPATH=%WEB_BASE_PATH%\libs\*;%CLASSPATH%
if ""%JAVA_HOME%"" == """" (
set _EXECJAVA=java
) else (
set _EXECJAVA="%JAVA_HOME%"/bin/java
)
start /MIN "%WEB_PROCESS_TITLE%" %_EXECJAVA% "%WEB_RUNTIME_OPTIONS%" -cp "%CLASSPATH%" org.skywalking.apm.ui.ApplicationStartUp &
echo Skywalking Web started successfully!
endlocal
| @echo off
setlocal
set WEB_PROCESS_TITLE=Skywalking-Web
set WEB_BASE_PATH=%~dp0%..
set WEB_RUNTIME_OPTIONS="-Xms256M -Xmx512M"
set CLASSPATH=%WEB_BASE_PATH%\config;
SET CLASSPATH=%WEB_BASE_PATH%\libs\*;%CLASSPATH%
if defined JAVA_HOME (
set _EXECJAVA="%JAVA_HOME:"=%"\bin\java
)
if not defined JAVA_HOME (
echo "JAVA_HOME not set."
set _EXECJAVA=java
)
start /MIN "%WEB_PROCESS_TITLE%" %_EXECJAVA% "%WEB_RUNTIME_OPTIONS%" -cp "%CLASSPATH%" org.skywalking.apm.ui.ApplicationStartUp &
echo Skywalking Web started successfully!
endlocal
| Fix windows script start failure | Fix windows script start failure
| Batchfile | apache-2.0 | ascrutae/sky-walking-ui,ascrutae/sky-walking-ui | batchfile | ## Code Before:
@echo off
setlocal
set WEB_PROCESS_TITLE=Skywalking-Web
set WEB_BASE_PATH=%~dp0%..
set WEB_RUNTIME_OPTIONS="-Xms256M -Xmx512M"
set CLASSPATH=%WEB_BASE_PATH%\config;
SET CLASSPATH=%WEB_BASE_PATH%\libs\*;%CLASSPATH%
if ""%JAVA_HOME%"" == """" (
set _EXECJAVA=java
) else (
set _EXECJAVA="%JAVA_HOME%"/bin/java
)
start /MIN "%WEB_PROCESS_TITLE%" %_EXECJAVA% "%WEB_RUNTIME_OPTIONS%" -cp "%CLASSPATH%" org.skywalking.apm.ui.ApplicationStartUp &
echo Skywalking Web started successfully!
endlocal
## Instruction:
Fix windows script start failure
## Code After:
@echo off
setlocal
set WEB_PROCESS_TITLE=Skywalking-Web
set WEB_BASE_PATH=%~dp0%..
set WEB_RUNTIME_OPTIONS="-Xms256M -Xmx512M"
set CLASSPATH=%WEB_BASE_PATH%\config;
SET CLASSPATH=%WEB_BASE_PATH%\libs\*;%CLASSPATH%
if defined JAVA_HOME (
set _EXECJAVA="%JAVA_HOME:"=%"\bin\java
)
if not defined JAVA_HOME (
echo "JAVA_HOME not set."
set _EXECJAVA=java
)
start /MIN "%WEB_PROCESS_TITLE%" %_EXECJAVA% "%WEB_RUNTIME_OPTIONS%" -cp "%CLASSPATH%" org.skywalking.apm.ui.ApplicationStartUp &
echo Skywalking Web started successfully!
endlocal
|
cad522fc32c98b99e6ca51e8306afd85e735fe88 | metadata/io.github.otobikb.inputmethod.latin.yml | metadata/io.github.otobikb.inputmethod.latin.yml | Categories:
- System
License: GPL-3.0-only
AuthorName: Otobi Keyboard
AuthorEmail: otobi.kb@gmail.com
AuthorWebSite: https://rhjihan.github.io/
WebSite: https://otobikb.github.io/android/
SourceCode: https://github.com/OtobiKB/OtobiKeyboard
IssueTracker: https://github.com/OtobiKB/OtobiKeyboard/issues
RepoType: git
Repo: https://github.com/OtobiKB/OtobiKeyboard.git
Builds:
- versionName: '1.0'
versionCode: 1
commit: v1.0
subdir: app
gradle:
- yes
ndk: r21d
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.0'
CurrentVersionCode: 1
| Categories:
- System
License: GPL-3.0-only
AuthorName: Otobi Keyboard
AuthorEmail: otobi.kb@gmail.com
AuthorWebSite: https://rhjihan.github.io/
WebSite: https://otobikb.github.io/android/
SourceCode: https://github.com/OtobiKB/OtobiKeyboard
IssueTracker: https://github.com/OtobiKB/OtobiKeyboard/issues
AutoName: Otobi Keyboard
RepoType: git
Repo: https://github.com/OtobiKB/OtobiKeyboard.git
Builds:
- versionName: '1.0'
versionCode: 1
commit: v1.0
subdir: app
gradle:
- yes
ndk: r21d
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.0'
CurrentVersionCode: 1
| Set autoname of Otobi Keyboard | Set autoname of Otobi Keyboard
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- System
License: GPL-3.0-only
AuthorName: Otobi Keyboard
AuthorEmail: otobi.kb@gmail.com
AuthorWebSite: https://rhjihan.github.io/
WebSite: https://otobikb.github.io/android/
SourceCode: https://github.com/OtobiKB/OtobiKeyboard
IssueTracker: https://github.com/OtobiKB/OtobiKeyboard/issues
RepoType: git
Repo: https://github.com/OtobiKB/OtobiKeyboard.git
Builds:
- versionName: '1.0'
versionCode: 1
commit: v1.0
subdir: app
gradle:
- yes
ndk: r21d
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.0'
CurrentVersionCode: 1
## Instruction:
Set autoname of Otobi Keyboard
## Code After:
Categories:
- System
License: GPL-3.0-only
AuthorName: Otobi Keyboard
AuthorEmail: otobi.kb@gmail.com
AuthorWebSite: https://rhjihan.github.io/
WebSite: https://otobikb.github.io/android/
SourceCode: https://github.com/OtobiKB/OtobiKeyboard
IssueTracker: https://github.com/OtobiKB/OtobiKeyboard/issues
AutoName: Otobi Keyboard
RepoType: git
Repo: https://github.com/OtobiKB/OtobiKeyboard.git
Builds:
- versionName: '1.0'
versionCode: 1
commit: v1.0
subdir: app
gradle:
- yes
ndk: r21d
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.0'
CurrentVersionCode: 1
|
55a225d3e6226b3128bd2f35bd593d12d7056a65 | src/store.js | src/store.js | import { createStore, applyMiddleware } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from './reducers'
// create the saga middleware
export const sagaMiddleware = createSagaMiddleware()
// mount it on the Store
const store = createStore(
reducer,
applyMiddleware(sagaMiddleware)
)
export default store
| import { createStore, applyMiddleware, compose } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from './reducers'
// create the saga middleware
export const sagaMiddleware = createSagaMiddleware()
const composeEnhancers =
process.env.NODE_ENV !== 'production' &&
typeof window === 'object' &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__()
: compose
// mount it on the Store
const store = createStore(
reducer,
composeEnhancers(
applyMiddleware(sagaMiddleware)
)
)
export default store
| Add support for Redux Dev Tools | Add support for Redux Dev Tools
| JavaScript | apache-2.0 | matobet/userportal,oVirt/ovirt-web-ui,mareklibra/userportal,mareklibra/userportal,mareklibra/userportal,matobet/userportal,matobet/userportal,mareklibra/userportal,oVirt/ovirt-web-ui,mkrajnak/ovirt-web-ui,oVirt/ovirt-web-ui,matobet/userportal,mkrajnak/ovirt-web-ui,mkrajnak/ovirt-web-ui,mkrajnak/ovirt-web-ui | javascript | ## Code Before:
import { createStore, applyMiddleware } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from './reducers'
// create the saga middleware
export const sagaMiddleware = createSagaMiddleware()
// mount it on the Store
const store = createStore(
reducer,
applyMiddleware(sagaMiddleware)
)
export default store
## Instruction:
Add support for Redux Dev Tools
## Code After:
import { createStore, applyMiddleware, compose } from 'redux'
import createSagaMiddleware from 'redux-saga'
import reducer from './reducers'
// create the saga middleware
export const sagaMiddleware = createSagaMiddleware()
const composeEnhancers =
process.env.NODE_ENV !== 'production' &&
typeof window === 'object' &&
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__()
: compose
// mount it on the Store
const store = createStore(
reducer,
composeEnhancers(
applyMiddleware(sagaMiddleware)
)
)
export default store
|
86eba17b5100db9f731d89855561a1c4611964de | .travis.yml | .travis.yml | language: c
install: pip install paver
script: paver test_libc
addons:
apt:
packages:
- python
- python3
- python-pip
| language: python
install: pip install paver
script: paver test_libc
| Switch to Python container from C container | Switch to Python container from C container
| YAML | mit | simon-andrews/norby,simon-andrews/norby,simon-andrews/norby | yaml | ## Code Before:
language: c
install: pip install paver
script: paver test_libc
addons:
apt:
packages:
- python
- python3
- python-pip
## Instruction:
Switch to Python container from C container
## Code After:
language: python
install: pip install paver
script: paver test_libc
|
b6075360deb86d444c0df453389414eaee39f9fe | coding/coding_tests/mem_file_writer_test.cpp | coding/coding_tests/mem_file_writer_test.cpp |
UNIT_TEST(MemWriterEmpty)
{
vector<char> data;
{
MemWriter< vector<char> > writer(data);
}
TEST(data.empty(), (data));
}
UNIT_TEST(MemWriterSimple)
{
vector<char> data;
MemWriter< vector<char> > writer(data);
writer.Write("Hello", 5);
writer.Write(",", 1);
writer.Write("world!", 6);
char const expected_string[] = "Hello,world!";
vector<char> expected_data(&expected_string[0], &expected_string[ARRAY_SIZE(expected_string)-1]);
TEST_EQUAL(data, expected_data, ());
}
|
UNIT_TEST(MemWriterEmpty)
{
vector<char> data;
{
MemWriter< vector<char> > writer(data);
}
TEST(data.empty(), (data));
}
UNIT_TEST(MemWriterSimple)
{
vector<char> data;
MemWriter< vector<char> > writer(data);
writer.Write("Hello", 5);
writer.Write(",", 1);
writer.Write("world!", 6);
char const expected[] = "Hello,world!";
TEST_EQUAL(data.size(), ARRAY_SIZE(expected)-1, ());
TEST(equal(data.begin(), data.end(), &expected[0]), (data));
}
/*
UNIT_TEST(FileWriter_NoDiskSpace)
{
FileWriter w("/Volumes/Untitled/file.bin");
vector<uint8_t> bytes(100000000);
for (size_t i = 0; i < 10; ++i)
w.Write(&bytes[0], bytes.size());
}
*/
| Test for FileWriter (not enough disk space). | Test for FileWriter (not enough disk space).
| C++ | apache-2.0 | andrewshadura/omim,augmify/omim,felipebetancur/omim,AlexanderMatveenko/omim,andrewshadura/omim,AlexanderMatveenko/omim,yunikkk/omim,mgsergio/omim,goblinr/omim,programming086/omim,Zverik/omim,therearesomewhocallmetim/omim,Komzpa/omim,sidorov-panda/omim,guard163/omim,mpimenov/omim,felipebetancur/omim,Transtech/omim,UdjinM6/omim,Zverik/omim,krasin/omim,UdjinM6/omim,Transtech/omim,VladiMihaylenko/omim,rokuz/omim,AlexanderMatveenko/omim,AlexanderMatveenko/omim,guard163/omim,trashkalmar/omim,vng/omim,alexzatsepin/omim,alexzatsepin/omim,simon247/omim,rokuz/omim,yunikkk/omim,edl00k/omim,programming086/omim,programming086/omim,syershov/omim,Zverik/omim,Komzpa/omim,milchakov/omim,Zverik/omim,AlexanderMatveenko/omim,matsprea/omim,guard163/omim,syershov/omim,darina/omim,rokuz/omim,edl00k/omim,mapsme/omim,dobriy-eeh/omim,milchakov/omim,rokuz/omim,mapsme/omim,darina/omim,trashkalmar/omim,Endika/omim,Saicheg/omim,krasin/omim,vladon/omim,lydonchandra/omim,matsprea/omim,goblinr/omim,darina/omim,matsprea/omim,UdjinM6/omim,Komzpa/omim,dkorolev/omim,andrewshadura/omim,victorbriz/omim,Transtech/omim,stangls/omim,darina/omim,programming086/omim,sidorov-panda/omim,lydonchandra/omim,Volcanoscar/omim,syershov/omim,trashkalmar/omim,bykoianko/omim,kw217/omim,programming086/omim,TimurTarasenko/omim,goblinr/omim,jam891/omim,albertshift/omim,mpimenov/omim,dkorolev/omim,65apps/omim,simon247/omim,andrewshadura/omim,edl00k/omim,igrechuhin/omim,albertshift/omim,augmify/omim,vasilenkomike/omim,edl00k/omim,dobriy-eeh/omim,mpimenov/omim,Endika/omim,krasin/omim,victorbriz/omim,wersoo/omim,VladiMihaylenko/omim,vladon/omim,syershov/omim,Komzpa/omim,TimurTarasenko/omim,TimurTarasenko/omim,Zverik/omim,victorbriz/omim,jam891/omim,Volcanoscar/omim,andrewshadura/omim,victorbriz/omim,VladiMihaylenko/omim,65apps/omim,Transtech/omim,therearesomewhocallmetim/omim,milchakov/omim,dobriy-eeh/omim,albertshift/omim,mpimenov/omim,felipebetancur/omim,dkorolev/omim,Saicheg/omim,dobriy-eeh/omim,therearesomewhocallmetim/omim,krasin/omim,jam891/omim,Endika/omim,syershov/omim,stangls/omim,mpimenov/omim,sidorov-panda/omim,Zverik/omim,mpimenov/omim,therearesomewhocallmetim/omim,yunikkk/omim,albertshift/omim,AlexanderMatveenko/omim,gardster/omim,vng/omim,milchakov/omim,alexzatsepin/omim,mgsergio/omim,AlexanderMatveenko/omim,jam891/omim,dkorolev/omim,vasilenkomike/omim,bykoianko/omim,krasin/omim,jam891/omim,Endika/omim,bykoianko/omim,victorbriz/omim,guard163/omim,vladon/omim,sidorov-panda/omim,Volcanoscar/omim,victorbriz/omim,augmify/omim,simon247/omim,milchakov/omim,vng/omim,ygorshenin/omim,mapsme/omim,VladiMihaylenko/omim,albertshift/omim,VladiMihaylenko/omim,wersoo/omim,sidorov-panda/omim,ygorshenin/omim,albertshift/omim,igrechuhin/omim,albertshift/omim,igrechuhin/omim,milchakov/omim,Transtech/omim,trashkalmar/omim,simon247/omim,alexzatsepin/omim,Volcanoscar/omim,mgsergio/omim,milchakov/omim,matsprea/omim,65apps/omim,edl00k/omim,VladiMihaylenko/omim,ygorshenin/omim,darina/omim,vng/omim,dobriy-eeh/omim,alexzatsepin/omim,65apps/omim,vng/omim,simon247/omim,igrechuhin/omim,UdjinM6/omim,stangls/omim,guard163/omim,jam891/omim,goblinr/omim,vng/omim,edl00k/omim,lydonchandra/omim,vladon/omim,TimurTarasenko/omim,rokuz/omim,goblinr/omim,milchakov/omim,guard163/omim,lydonchandra/omim,sidorov-panda/omim,vladon/omim,goblinr/omim,goblinr/omim,bykoianko/omim,bykoianko/omim,andrewshadura/omim,TimurTarasenko/omim,bykoianko/omim,Transtech/omim,65apps/omim,kw217/omim,UdjinM6/omim,mpimenov/omim,kw217/omim,stangls/omim,dkorolev/omim,gardster/omim,Saicheg/omim,vladon/omim,therearesomewhocallmetim/omim,yunikkk/omim,bykoianko/omim,stangls/omim,kw217/omim,lydonchandra/omim,yunikkk/omim,mapsme/omim,jam891/omim,stangls/omim,simon247/omim,rokuz/omim,65apps/omim,Volcanoscar/omim,jam891/omim,jam891/omim,sidorov-panda/omim,krasin/omim,felipebetancur/omim,bykoianko/omim,TimurTarasenko/omim,Zverik/omim,matsprea/omim,matsprea/omim,stangls/omim,Volcanoscar/omim,guard163/omim,syershov/omim,felipebetancur/omim,trashkalmar/omim,dobriy-eeh/omim,vng/omim,guard163/omim,syershov/omim,mgsergio/omim,andrewshadura/omim,mpimenov/omim,alexzatsepin/omim,igrechuhin/omim,trashkalmar/omim,VladiMihaylenko/omim,andrewshadura/omim,alexzatsepin/omim,vladon/omim,UdjinM6/omim,ygorshenin/omim,dkorolev/omim,igrechuhin/omim,wersoo/omim,andrewshadura/omim,lydonchandra/omim,dobriy-eeh/omim,mapsme/omim,edl00k/omim,augmify/omim,lydonchandra/omim,ygorshenin/omim,therearesomewhocallmetim/omim,VladiMihaylenko/omim,simon247/omim,syershov/omim,stangls/omim,wersoo/omim,milchakov/omim,darina/omim,AlexanderMatveenko/omim,kw217/omim,therearesomewhocallmetim/omim,bykoianko/omim,felipebetancur/omim,ygorshenin/omim,mapsme/omim,vladon/omim,milchakov/omim,therearesomewhocallmetim/omim,Endika/omim,igrechuhin/omim,Transtech/omim,mpimenov/omim,TimurTarasenko/omim,felipebetancur/omim,Transtech/omim,Zverik/omim,sidorov-panda/omim,programming086/omim,dobriy-eeh/omim,dobriy-eeh/omim,rokuz/omim,milchakov/omim,alexzatsepin/omim,65apps/omim,igrechuhin/omim,Saicheg/omim,albertshift/omim,lydonchandra/omim,Endika/omim,Endika/omim,rokuz/omim,Komzpa/omim,alexzatsepin/omim,rokuz/omim,andrewshadura/omim,igrechuhin/omim,yunikkk/omim,vasilenkomike/omim,Zverik/omim,mapsme/omim,UdjinM6/omim,bykoianko/omim,kw217/omim,darina/omim,UdjinM6/omim,gardster/omim,UdjinM6/omim,mgsergio/omim,TimurTarasenko/omim,darina/omim,vasilenkomike/omim,augmify/omim,ygorshenin/omim,mapsme/omim,dobriy-eeh/omim,simon247/omim,mgsergio/omim,trashkalmar/omim,simon247/omim,Zverik/omim,vasilenkomike/omim,kw217/omim,dkorolev/omim,vasilenkomike/omim,victorbriz/omim,milchakov/omim,vladon/omim,ygorshenin/omim,syershov/omim,wersoo/omim,mapsme/omim,vasilenkomike/omim,mapsme/omim,programming086/omim,mgsergio/omim,wersoo/omim,Saicheg/omim,matsprea/omim,rokuz/omim,simon247/omim,syershov/omim,goblinr/omim,Saicheg/omim,jam891/omim,Komzpa/omim,dobriy-eeh/omim,Transtech/omim,bykoianko/omim,gardster/omim,Zverik/omim,syershov/omim,matsprea/omim,guard163/omim,Endika/omim,bykoianko/omim,VladiMihaylenko/omim,sidorov-panda/omim,lydonchandra/omim,65apps/omim,edl00k/omim,Saicheg/omim,programming086/omim,sidorov-panda/omim,victorbriz/omim,Transtech/omim,edl00k/omim,mgsergio/omim,victorbriz/omim,alexzatsepin/omim,Komzpa/omim,mgsergio/omim,mapsme/omim,wersoo/omim,therearesomewhocallmetim/omim,Komzpa/omim,goblinr/omim,wersoo/omim,dobriy-eeh/omim,rokuz/omim,milchakov/omim,programming086/omim,alexzatsepin/omim,augmify/omim,augmify/omim,AlexanderMatveenko/omim,augmify/omim,Volcanoscar/omim,VladiMihaylenko/omim,Saicheg/omim,UdjinM6/omim,wersoo/omim,victorbriz/omim,Saicheg/omim,goblinr/omim,gardster/omim,gardster/omim,vng/omim,mpimenov/omim,vladon/omim,Komzpa/omim,kw217/omim,TimurTarasenko/omim,vasilenkomike/omim,programming086/omim,gardster/omim,darina/omim,igrechuhin/omim,rokuz/omim,stangls/omim,yunikkk/omim,AlexanderMatveenko/omim,yunikkk/omim,Volcanoscar/omim,felipebetancur/omim,ygorshenin/omim,albertshift/omim,matsprea/omim,trashkalmar/omim,krasin/omim,krasin/omim,goblinr/omim,albertshift/omim,goblinr/omim,darina/omim,vng/omim,ygorshenin/omim,Komzpa/omim,65apps/omim,vng/omim,goblinr/omim,ygorshenin/omim,VladiMihaylenko/omim,VladiMihaylenko/omim,krasin/omim,dkorolev/omim,mapsme/omim,vasilenkomike/omim,mgsergio/omim,darina/omim,Zverik/omim,Transtech/omim,stangls/omim,mgsergio/omim,krasin/omim,kw217/omim,ygorshenin/omim,trashkalmar/omim,syershov/omim,darina/omim,wersoo/omim,dobriy-eeh/omim,trashkalmar/omim,Saicheg/omim,Transtech/omim,trashkalmar/omim,alexzatsepin/omim,augmify/omim,vasilenkomike/omim,darina/omim,mpimenov/omim,rokuz/omim,mpimenov/omim,syershov/omim,stangls/omim,yunikkk/omim,VladiMihaylenko/omim,TimurTarasenko/omim,lydonchandra/omim,augmify/omim,bykoianko/omim,kw217/omim,felipebetancur/omim,gardster/omim,yunikkk/omim,trashkalmar/omim,guard163/omim,65apps/omim,felipebetancur/omim,Volcanoscar/omim,matsprea/omim,therearesomewhocallmetim/omim,yunikkk/omim,gardster/omim,dkorolev/omim,65apps/omim,Endika/omim,dkorolev/omim,Zverik/omim,Volcanoscar/omim,alexzatsepin/omim,gardster/omim,mpimenov/omim,edl00k/omim,mgsergio/omim,Endika/omim,mapsme/omim | c++ | ## Code Before:
UNIT_TEST(MemWriterEmpty)
{
vector<char> data;
{
MemWriter< vector<char> > writer(data);
}
TEST(data.empty(), (data));
}
UNIT_TEST(MemWriterSimple)
{
vector<char> data;
MemWriter< vector<char> > writer(data);
writer.Write("Hello", 5);
writer.Write(",", 1);
writer.Write("world!", 6);
char const expected_string[] = "Hello,world!";
vector<char> expected_data(&expected_string[0], &expected_string[ARRAY_SIZE(expected_string)-1]);
TEST_EQUAL(data, expected_data, ());
}
## Instruction:
Test for FileWriter (not enough disk space).
## Code After:
UNIT_TEST(MemWriterEmpty)
{
vector<char> data;
{
MemWriter< vector<char> > writer(data);
}
TEST(data.empty(), (data));
}
UNIT_TEST(MemWriterSimple)
{
vector<char> data;
MemWriter< vector<char> > writer(data);
writer.Write("Hello", 5);
writer.Write(",", 1);
writer.Write("world!", 6);
char const expected[] = "Hello,world!";
TEST_EQUAL(data.size(), ARRAY_SIZE(expected)-1, ());
TEST(equal(data.begin(), data.end(), &expected[0]), (data));
}
/*
UNIT_TEST(FileWriter_NoDiskSpace)
{
FileWriter w("/Volumes/Untitled/file.bin");
vector<uint8_t> bytes(100000000);
for (size_t i = 0; i < 10; ++i)
w.Write(&bytes[0], bytes.size());
}
*/
|
f8c0c5014e96fbeb001cb9d3e00e4f695ca9a456 | ibv_message_passing_ada_project/source/coverage_for_ada_task/coverage_for_ada_task.adb | ibv_message_passing_ada_project/source/coverage_for_ada_task/coverage_for_ada_task.adb | -- @file coverage_for_ada_task.adb
-- @date 28 May 2022
-- @author Chester Gillon
-- @brief Example program to test getting coverage for an Ada task
with Ada.Text_IO;
procedure Coverage_For_Ada_Task is
task Print_Task is
entry Print;
end Print_Task;
task body Print_Task is
begin
loop
select
accept Print do
Ada.Text_IO.Put_Line ("In task Print_Task");
end Print;
or
terminate;
end select;
end loop;
end Print_Task;
begin
for index in 1..3
loop
Print_Task.Print;
end loop;
Ada.Text_IO.Put_Line ("In main");
end Coverage_For_Ada_Task;
| -- @file coverage_for_ada_task.adb
-- @date 28 May 2022
-- @author Chester Gillon
-- @brief Example program to test getting coverage for an Ada task
with Ada.Text_IO;
procedure Coverage_For_Ada_Task is
generic
Name : String;
package Generic_Name is
procedure Display_Name;
end Generic_Name;
package body Generic_Name is
procedure Display_Name is
begin
Ada.Text_IO.Put_Line ("My name is " & Name);
end Display_Name;
end Generic_Name;
task Print_Task is
entry Print;
end Print_Task;
task body Print_Task is
begin
loop
select
accept Print do
Ada.Text_IO.Put_Line ("In task Print_Task");
end Print;
or
terminate;
end select;
end loop;
end Print_Task;
package Package_A is new Generic_Name ("A");
package Package_B is new Generic_Name ("B");
begin
Package_A.Display_Name;
for index in 1..3
loop
Print_Task.Print;
end loop;
Package_B.Display_Name;
Ada.Text_IO.Put_Line ("In main");
end Coverage_For_Ada_Task;
| Add coverage test for simple generic package | Add coverage test for simple generic package
| Ada | mit | Chester-Gillon/ibv_message_passing,Chester-Gillon/ibv_message_passing,Chester-Gillon/ibv_message_passing | ada | ## Code Before:
-- @file coverage_for_ada_task.adb
-- @date 28 May 2022
-- @author Chester Gillon
-- @brief Example program to test getting coverage for an Ada task
with Ada.Text_IO;
procedure Coverage_For_Ada_Task is
task Print_Task is
entry Print;
end Print_Task;
task body Print_Task is
begin
loop
select
accept Print do
Ada.Text_IO.Put_Line ("In task Print_Task");
end Print;
or
terminate;
end select;
end loop;
end Print_Task;
begin
for index in 1..3
loop
Print_Task.Print;
end loop;
Ada.Text_IO.Put_Line ("In main");
end Coverage_For_Ada_Task;
## Instruction:
Add coverage test for simple generic package
## Code After:
-- @file coverage_for_ada_task.adb
-- @date 28 May 2022
-- @author Chester Gillon
-- @brief Example program to test getting coverage for an Ada task
with Ada.Text_IO;
procedure Coverage_For_Ada_Task is
generic
Name : String;
package Generic_Name is
procedure Display_Name;
end Generic_Name;
package body Generic_Name is
procedure Display_Name is
begin
Ada.Text_IO.Put_Line ("My name is " & Name);
end Display_Name;
end Generic_Name;
task Print_Task is
entry Print;
end Print_Task;
task body Print_Task is
begin
loop
select
accept Print do
Ada.Text_IO.Put_Line ("In task Print_Task");
end Print;
or
terminate;
end select;
end loop;
end Print_Task;
package Package_A is new Generic_Name ("A");
package Package_B is new Generic_Name ("B");
begin
Package_A.Display_Name;
for index in 1..3
loop
Print_Task.Print;
end loop;
Package_B.Display_Name;
Ada.Text_IO.Put_Line ("In main");
end Coverage_For_Ada_Task;
|
e094a50a8c7c5d1fced8f27f8b5bf59ad8d8a958 | 2014/10-october/content/4-headlinesjs.md | 2014/10-october/content/4-headlinesjs.md |
--
### Good To Know
- [Node Awesome](https://github.com/sindresorhus/awesome-nodejs) - a curated collection of great modules for Node.JS
- []()
- []()
--
### Releases
- []()
- []()
- []()
--
### Videos to Watch
--
#### Video 1
<br />
<iframe width="560" height="315" src="//www.youtube.com/embed/FyrP0S9rUPg" frameborder="0" allowfullscreen></iframe>
--
#### Video 2
<br />
<iframe width="560" height="315" src="//www.youtube.com/embed/FyrP0S9rUPg" frameborder="0" allowfullscreen></iframe>
|
--
### Good To Know
- [Node Awesome](https://github.com/sindresorhus/awesome-nodejs) - a curated collection of great modules for Node.JS
- [ECMAScript 6 modules: the final syntax](http://www.2ality.com/2014/09/es6-modules-final.html?)
- [polyfill.io - Polyfills as a service](http://labs.ft.com/2014/09/polyfills-as-a-service/)
- []()
--
### Releases
- [Angular-Data](http://angular-data.pseudobry.com/?) - model layer inspired by Ember-Data
- []()
- []()
--
### Videos to Watch
--
#### EmberFest 2014
<br />
- [EmberFest 2014 Youtube Playlist](https://www.youtube.com/playlist?list=PLN4SpDLOSVkSbGTLohVaYGDB8hxWxGPBA)
<br />
<iframe width="560" height="315" src="//www.youtube.com/embed/z4oxa-UR7oA?list=PLN4SpDLOSVkSbGTLohVaYGDB8hxWxGPBA" frameborder="0" allowfullscreen></iframe>
--
#### Video 2
<br />
<iframe width="560" height="315" src="//www.youtube.com/embed/FyrP0S9rUPg" frameborder="0" allowfullscreen></iframe>
| Add some interesting links to headlines.js | Add some interesting links to headlines.js
| Markdown | mit | ottawajs/meetups,ottawajs/meetups | markdown | ## Code Before:
--
### Good To Know
- [Node Awesome](https://github.com/sindresorhus/awesome-nodejs) - a curated collection of great modules for Node.JS
- []()
- []()
--
### Releases
- []()
- []()
- []()
--
### Videos to Watch
--
#### Video 1
<br />
<iframe width="560" height="315" src="//www.youtube.com/embed/FyrP0S9rUPg" frameborder="0" allowfullscreen></iframe>
--
#### Video 2
<br />
<iframe width="560" height="315" src="//www.youtube.com/embed/FyrP0S9rUPg" frameborder="0" allowfullscreen></iframe>
## Instruction:
Add some interesting links to headlines.js
## Code After:
--
### Good To Know
- [Node Awesome](https://github.com/sindresorhus/awesome-nodejs) - a curated collection of great modules for Node.JS
- [ECMAScript 6 modules: the final syntax](http://www.2ality.com/2014/09/es6-modules-final.html?)
- [polyfill.io - Polyfills as a service](http://labs.ft.com/2014/09/polyfills-as-a-service/)
- []()
--
### Releases
- [Angular-Data](http://angular-data.pseudobry.com/?) - model layer inspired by Ember-Data
- []()
- []()
--
### Videos to Watch
--
#### EmberFest 2014
<br />
- [EmberFest 2014 Youtube Playlist](https://www.youtube.com/playlist?list=PLN4SpDLOSVkSbGTLohVaYGDB8hxWxGPBA)
<br />
<iframe width="560" height="315" src="//www.youtube.com/embed/z4oxa-UR7oA?list=PLN4SpDLOSVkSbGTLohVaYGDB8hxWxGPBA" frameborder="0" allowfullscreen></iframe>
--
#### Video 2
<br />
<iframe width="560" height="315" src="//www.youtube.com/embed/FyrP0S9rUPg" frameborder="0" allowfullscreen></iframe>
|
76bdf040cccb1820c0e1527ab43560e9c97cd66b | openstack_dashboard/dashboards/project/security_groups/templates/security_groups/detail.html | openstack_dashboard/dashboards/project/security_groups/templates/security_groups/detail.html | {% extends 'base.html' %}
{% block page_header %}
{% include "horizon/common/_detail_header.html" %}
{% endblock %}
{% block main %}
<div class="row">
<div class="col-sm-12">
{{ table.render }}
</div>
</div>
{% endblock %}
| {% extends 'base.html' %}
{% block title %}{{ page_title }}{% endblock %}
{% block page_header %}
{% include "horizon/common/_detail_header.html" %}
{% endblock %}
{% block main %}
<div class="row">
<div class="col-sm-12">
{{ table.render }}
</div>
</div>
{% endblock %}
| Fix incorrect window title in Manage security group rule | Fix incorrect window title in Manage security group rule
As far as I see, here is only the place missing the
correct title before "- OpenStack Dashboard"
Change-Id: I209a2b829ff4b66557a63f3659859a7b281ad629
Closes-Bug: #1677973
| HTML | apache-2.0 | NeCTAR-RC/horizon,BiznetGIO/horizon,openstack/horizon,ChameleonCloud/horizon,ChameleonCloud/horizon,openstack/horizon,ChameleonCloud/horizon,ChameleonCloud/horizon,noironetworks/horizon,noironetworks/horizon,yeming233/horizon,NeCTAR-RC/horizon,BiznetGIO/horizon,yeming233/horizon,NeCTAR-RC/horizon,noironetworks/horizon,BiznetGIO/horizon,noironetworks/horizon,NeCTAR-RC/horizon,BiznetGIO/horizon,openstack/horizon,openstack/horizon,yeming233/horizon,yeming233/horizon | html | ## Code Before:
{% extends 'base.html' %}
{% block page_header %}
{% include "horizon/common/_detail_header.html" %}
{% endblock %}
{% block main %}
<div class="row">
<div class="col-sm-12">
{{ table.render }}
</div>
</div>
{% endblock %}
## Instruction:
Fix incorrect window title in Manage security group rule
As far as I see, here is only the place missing the
correct title before "- OpenStack Dashboard"
Change-Id: I209a2b829ff4b66557a63f3659859a7b281ad629
Closes-Bug: #1677973
## Code After:
{% extends 'base.html' %}
{% block title %}{{ page_title }}{% endblock %}
{% block page_header %}
{% include "horizon/common/_detail_header.html" %}
{% endblock %}
{% block main %}
<div class="row">
<div class="col-sm-12">
{{ table.render }}
</div>
</div>
{% endblock %}
|
6ca1aaf1b5f0279151db7c5442b9d18ff86b83ad | .github/workflows/ci.yml | .github/workflows/ci.yml | name: CI
on: [push]
jobs:
cancel_previous_run:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Build and test module
uses: savonet/build-and-test-ocaml-module@main
| name: CI
on: [push]
jobs:
cancel_previous_run:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- name: Build and test module
uses: savonet/build-and-test-ocaml-module@main
| Disable on mac for now. | Disable on mac for now.
| YAML | lgpl-2.1 | savonet/ocaml-ffmpeg | yaml | ## Code Before:
name: CI
on: [push]
jobs:
cancel_previous_run:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Build and test module
uses: savonet/build-and-test-ocaml-module@main
## Instruction:
Disable on mac for now.
## Code After:
name: CI
on: [push]
jobs:
cancel_previous_run:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- name: Build and test module
uses: savonet/build-and-test-ocaml-module@main
|
4d7c668c6c1b35b636cd80164040ee0f042f616a | examples/messaging.cpp | examples/messaging.cpp |
int main() {
bulk::spawn(bulk::available_processors(), [](int s, int p) {
for (int t = 0; t < p; ++t) {
bulk::send<int, int>(t, s, s);
}
bulk::sync();
if (s == 0) {
for (auto message : bulk::messages<int, int>()) {
std::cout << message.tag << ", " << message.content << std::endl;
}
}
});
return 0;
}
|
int main() {
auto center = bulk::center();
center.spawn(center.available_processors(), [¢er](int s, int p) {
for (int t = 0; t < p; ++t) {
center.send<int, int>(t, s, s);
}
center.sync();
if (s == 0) {
for (auto message : center.messages<int, int>()) {
std::cout << message.tag << ", " << message.content << std::endl;
}
}
});
return 0;
}
| Update syntax for message passing example | Update syntax for message passing example
| C++ | mit | jwbuurlage/Bulk | c++ | ## Code Before:
int main() {
bulk::spawn(bulk::available_processors(), [](int s, int p) {
for (int t = 0; t < p; ++t) {
bulk::send<int, int>(t, s, s);
}
bulk::sync();
if (s == 0) {
for (auto message : bulk::messages<int, int>()) {
std::cout << message.tag << ", " << message.content << std::endl;
}
}
});
return 0;
}
## Instruction:
Update syntax for message passing example
## Code After:
int main() {
auto center = bulk::center();
center.spawn(center.available_processors(), [¢er](int s, int p) {
for (int t = 0; t < p; ++t) {
center.send<int, int>(t, s, s);
}
center.sync();
if (s == 0) {
for (auto message : center.messages<int, int>()) {
std::cout << message.tag << ", " << message.content << std::endl;
}
}
});
return 0;
}
|
5abd3929bcc5bd7624ecf37632ecf27c3f62cbf2 | templates/fs.html | templates/fs.html | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>File System</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
</head>
<body>
<div class="container">
<h1>File System</h1>
<table class="table">
<tbody>
{{range .}}
<tr>
<td>
<a href="/?path={{.FullName}}">
{{if .IsParent}}
<span class="glyphicon glyphicon-level-up"></span>
{{else}}
{{if .IsDir}}
<span class="glyphicon glyphicon-folder-close"></span>
{{else}}
<span class="glyphicon glyphicon-file"></span>
{{end}}
{{end}}
{{.Name}}
</a>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</body>
</html>
| <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>File System</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
</head>
<body>
<div class="container">
<h1>File System</h1>
<div class="checkbox">
<label>
<input type="checkbox" id="showHiddenFlag"/> Show hidden files
</label>
</div>
<table class="table">
<tbody>
{{range .}}
<tr>
<td>
<a href="/?path={{.FullName}}">
{{if .IsParent}}
<span class="glyphicon glyphicon-level-up"></span>
{{else}}
{{if .IsDir}}
<span class="glyphicon glyphicon-folder-close"></span>
{{else}}
<span class="glyphicon glyphicon-file"></span>
{{end}}
{{end}}
{{.Name}}
</a>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
$(function () {
var showHiddenFlag = $('#showHiddenFlag');
showHiddenFlag.change(function () {
console.log(showHiddenFlag.is(':checked'));
});
});
</script>
</body>
</html>
| Add jquery and checkbox for hidden files | Add jquery and checkbox for hidden files
| HTML | mit | ekaragodin/go100days,ekaragodin/go100days | html | ## Code Before:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>File System</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
</head>
<body>
<div class="container">
<h1>File System</h1>
<table class="table">
<tbody>
{{range .}}
<tr>
<td>
<a href="/?path={{.FullName}}">
{{if .IsParent}}
<span class="glyphicon glyphicon-level-up"></span>
{{else}}
{{if .IsDir}}
<span class="glyphicon glyphicon-folder-close"></span>
{{else}}
<span class="glyphicon glyphicon-file"></span>
{{end}}
{{end}}
{{.Name}}
</a>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</body>
</html>
## Instruction:
Add jquery and checkbox for hidden files
## Code After:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>File System</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
</head>
<body>
<div class="container">
<h1>File System</h1>
<div class="checkbox">
<label>
<input type="checkbox" id="showHiddenFlag"/> Show hidden files
</label>
</div>
<table class="table">
<tbody>
{{range .}}
<tr>
<td>
<a href="/?path={{.FullName}}">
{{if .IsParent}}
<span class="glyphicon glyphicon-level-up"></span>
{{else}}
{{if .IsDir}}
<span class="glyphicon glyphicon-folder-close"></span>
{{else}}
<span class="glyphicon glyphicon-file"></span>
{{end}}
{{end}}
{{.Name}}
</a>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script>
$(function () {
var showHiddenFlag = $('#showHiddenFlag');
showHiddenFlag.change(function () {
console.log(showHiddenFlag.is(':checked'));
});
});
</script>
</body>
</html>
|
091809d0cdfd5c9d8fc3c508cabc10f8a520d8b3 | jenkins.properties | jenkins.properties | app: pz-gateway
packaging: jar
gitUrl: https://github.com/venicegeo/pz-gateway
mavenProject: piazza
mavenRepo: Piazza
cfApi=https://api.devops.geointservices.io
cfDomain=int.geointservices.io
cfOrg=piazza
cfSpace=int
postmanFileKey=579f8660-01e6-4feb-8764-ec132432ebb1
threadfixId=10
| app: pz-gateway
packaging: jar
gitUrl: https://github.com/venicegeo/pz-gateway
mavenProject: piazza
mavenRepo: Piazza
cfApi=https://api.devops.geointservices.io
cfDomain=int.geointservices.io
cfOrg=piazza
cfSpace=int
postmanFileKey=579f8660-01e6-4feb-8764-ec132432ebb1
threadfixId=10
threadfixCredentialId=978C467A-2B26-47AE-AD2F-4AFD5A4AF695
| Use different threadfix credential id | Use different threadfix credential id
| INI | apache-2.0 | venicegeo/pz-gateway,venicegeo/pz-gateway,venicegeo/pz-gateway | ini | ## Code Before:
app: pz-gateway
packaging: jar
gitUrl: https://github.com/venicegeo/pz-gateway
mavenProject: piazza
mavenRepo: Piazza
cfApi=https://api.devops.geointservices.io
cfDomain=int.geointservices.io
cfOrg=piazza
cfSpace=int
postmanFileKey=579f8660-01e6-4feb-8764-ec132432ebb1
threadfixId=10
## Instruction:
Use different threadfix credential id
## Code After:
app: pz-gateway
packaging: jar
gitUrl: https://github.com/venicegeo/pz-gateway
mavenProject: piazza
mavenRepo: Piazza
cfApi=https://api.devops.geointservices.io
cfDomain=int.geointservices.io
cfOrg=piazza
cfSpace=int
postmanFileKey=579f8660-01e6-4feb-8764-ec132432ebb1
threadfixId=10
threadfixCredentialId=978C467A-2B26-47AE-AD2F-4AFD5A4AF695
|
3e444e23c6130d778de514d1fb40f6d8416115e1 | env/main.sh | env/main.sh |
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
alias ls='ls -G'
export EDITOR='nano -w'
|
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
alias ls='ls -G'
export EDITOR='nano -w'
export PATH="/usr/local/sbin:$PATH" | Fix /usr/local/sbin not being in path | Fix /usr/local/sbin not being in path
| Shell | mit | jponge/dotfiles,jponge/dotfiles | shell | ## Code Before:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
alias ls='ls -G'
export EDITOR='nano -w'
## Instruction:
Fix /usr/local/sbin not being in path
## Code After:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
alias ls='ls -G'
export EDITOR='nano -w'
export PATH="/usr/local/sbin:$PATH" |
55af2016102ec16a4ec3878f45306e3ac4d520e6 | qingcloud/cli/iaas_client/actions/instance/reset_instances.py | qingcloud/cli/iaas_client/actions/instance/reset_instances.py |
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file>]'
@classmethod
def add_ext_arguments(cls, parser):
parser.add_argument('-i', '--instances', dest='instances',
action='store', type=str, default='',
help='the comma separated IDs of instances you want to reset.')
return parser
@classmethod
def build_directive(cls, options):
instances = explode_array(options.instances)
if len(instances) == 0:
print 'error: [instances] should be specified'
return None
return {'instances': instances}
|
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file> -m <login_mode> -p <login_passwd> -k <login_keypair>]'
@classmethod
def add_ext_arguments(cls, parser):
parser.add_argument('-i', '--instances', dest='instances',
action='store', type=str, default='',
help='the comma separated IDs of instances you want to reset.')
parser.add_argument('-l', '--login_mode', dest='login_mode',
action='store', type=str, default=None,
help='SSH login mode: keypair or passwd')
parser.add_argument('-p', '--login_passwd', dest='login_passwd',
action='store', type=str, default=None,
help='login_passwd, should specified when SSH login mode is "passwd".')
parser.add_argument('-k', '--login_keypair', dest='login_keypair',
action='store', type=str, default=None,
help='login_keypair, should specified when SSH login mode is "keypair".')
return parser
@classmethod
def build_directive(cls, options):
instances = explode_array(options.instances)
if len(instances) == 0:
print 'error: [instances] should be specified'
return None
return {
'instances': instances,
'login_mode': options.login_mode,
'login_passwd': options.login_passwd,
'login_keypair': options.login_keypair,
}
| Add login mode to reset-instances | Add login mode to reset-instances
| Python | apache-2.0 | yunify/qingcloud-cli | python | ## Code Before:
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file>]'
@classmethod
def add_ext_arguments(cls, parser):
parser.add_argument('-i', '--instances', dest='instances',
action='store', type=str, default='',
help='the comma separated IDs of instances you want to reset.')
return parser
@classmethod
def build_directive(cls, options):
instances = explode_array(options.instances)
if len(instances) == 0:
print 'error: [instances] should be specified'
return None
return {'instances': instances}
## Instruction:
Add login mode to reset-instances
## Code After:
from qingcloud.cli.misc.utils import explode_array
from qingcloud.cli.iaas_client.actions.base import BaseAction
class ResetInstancesAction(BaseAction):
action = 'ResetInstances'
command = 'reset-instances'
usage = '%(prog)s -i "instance_id, ..." [-f <conf_file> -m <login_mode> -p <login_passwd> -k <login_keypair>]'
@classmethod
def add_ext_arguments(cls, parser):
parser.add_argument('-i', '--instances', dest='instances',
action='store', type=str, default='',
help='the comma separated IDs of instances you want to reset.')
parser.add_argument('-l', '--login_mode', dest='login_mode',
action='store', type=str, default=None,
help='SSH login mode: keypair or passwd')
parser.add_argument('-p', '--login_passwd', dest='login_passwd',
action='store', type=str, default=None,
help='login_passwd, should specified when SSH login mode is "passwd".')
parser.add_argument('-k', '--login_keypair', dest='login_keypair',
action='store', type=str, default=None,
help='login_keypair, should specified when SSH login mode is "keypair".')
return parser
@classmethod
def build_directive(cls, options):
instances = explode_array(options.instances)
if len(instances) == 0:
print 'error: [instances] should be specified'
return None
return {
'instances': instances,
'login_mode': options.login_mode,
'login_passwd': options.login_passwd,
'login_keypair': options.login_keypair,
}
|
e5990b725c3d0232a52ee13d3f52b2332edfe95d | README.md | README.md | Pimotion
========
Pimotion is a motion detector application that runs on the Raspberry PI. It captures snapshots of movement and uploads the montage image to an [M2X](https://m2x.att.com) feed.
### Package Dependencies
```
numpy==1.6.2
PIL==1.1.7
requests==2.4.3
picamera==1.8
m2x==0.3
```
### Installation
Installation can be done through cloning the repo onto your Raspberry PI:
$ git clone https://github.com/citrusbyte/pimotion.git
$ cd pimotion
$ pip install -r requirements.txt
### Configuration
Copy the `settings.cfg.example` file to `settings.cfg` and modify it with your CloudAPP username and password.
### Running
The application can be started by running:
$ python pimotion/main.py
### License
This project is delivered under the MIT license. See [LICENSE](LICENSE) for the terms.
### Attributions
Written by [Jelle Hekins](https://github.com/jellehenkens), sponsored by [Citrusbyte](https://citrusbyte.com/)
| Pimotion
========
Pimotion is a motion detector application that runs on the Raspberry PI. It captures snapshots of movement and uploads the montage image to an [M2X](https://m2x.att.com) feed.
### Package Dependencies
```
numpy==1.6.2
PIL==1.1.7
requests==2.4.3
picamera==1.8
m2x==0.3
```
### Installation
Installation can be done through cloning the repo onto your Raspberry PI:
$ git clone https://github.com/citrusbyte/pimotion.git
$ cd pimotion
$ pip install -r requirements.txt
### Configuration
Copy the `settings.cfg.example` file to `settings.cfg` and modify it with your CloudAPP username and password.
### Running
The application can be started by running:
$ python pimotion/main.py
### Example Capture

### License
This project is delivered under the MIT license. See [LICENSE](LICENSE) for the terms.
### Attributions
Written by [Jelle Hekins](https://github.com/jellehenkens), sponsored by [Citrusbyte](https://citrusbyte.com/)
| Update Readme to include image | Update Readme to include image
| Markdown | mit | adaofeliz/pimotion,citrusbyte/pimotion | markdown | ## Code Before:
Pimotion
========
Pimotion is a motion detector application that runs on the Raspberry PI. It captures snapshots of movement and uploads the montage image to an [M2X](https://m2x.att.com) feed.
### Package Dependencies
```
numpy==1.6.2
PIL==1.1.7
requests==2.4.3
picamera==1.8
m2x==0.3
```
### Installation
Installation can be done through cloning the repo onto your Raspberry PI:
$ git clone https://github.com/citrusbyte/pimotion.git
$ cd pimotion
$ pip install -r requirements.txt
### Configuration
Copy the `settings.cfg.example` file to `settings.cfg` and modify it with your CloudAPP username and password.
### Running
The application can be started by running:
$ python pimotion/main.py
### License
This project is delivered under the MIT license. See [LICENSE](LICENSE) for the terms.
### Attributions
Written by [Jelle Hekins](https://github.com/jellehenkens), sponsored by [Citrusbyte](https://citrusbyte.com/)
## Instruction:
Update Readme to include image
## Code After:
Pimotion
========
Pimotion is a motion detector application that runs on the Raspberry PI. It captures snapshots of movement and uploads the montage image to an [M2X](https://m2x.att.com) feed.
### Package Dependencies
```
numpy==1.6.2
PIL==1.1.7
requests==2.4.3
picamera==1.8
m2x==0.3
```
### Installation
Installation can be done through cloning the repo onto your Raspberry PI:
$ git clone https://github.com/citrusbyte/pimotion.git
$ cd pimotion
$ pip install -r requirements.txt
### Configuration
Copy the `settings.cfg.example` file to `settings.cfg` and modify it with your CloudAPP username and password.
### Running
The application can be started by running:
$ python pimotion/main.py
### Example Capture

### License
This project is delivered under the MIT license. See [LICENSE](LICENSE) for the terms.
### Attributions
Written by [Jelle Hekins](https://github.com/jellehenkens), sponsored by [Citrusbyte](https://citrusbyte.com/)
|
36f5cdc6ebbcd5d82bdc6a94931cc6900a58440d | .travis.yml | .travis.yml | language: android
jdk: oraclejdk8
sudo: false
os:
- linux
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.gradle/caches/3.1
- $HOME/.gradle/daemon
- $HOME/.gradle/native
- $HOME/.gradle/wrapper
- $HOME/.m2
android:
components:
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-25.0.2
# The SDK version used to compile your project
- android-25
# Additional components
- extra-google-m2repository
- extra-android-m2repository
notifications:
email: false
before_script:
- ./team-props/scripts/ci-mock-google-services-setup.sh
script:
- ./gradlew clean check -PdisablePreDex --continue --stacktrace
| language: android
jdk: oraclejdk8
sudo: false
os:
- linux
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.gradle/caches/3.1
- $HOME/.gradle/daemon
- $HOME/.gradle/native
- $HOME/.gradle/wrapper
- $HOME/.m2
android:
components:
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-25.0.2
# The SDK version used to compile your project
- android-25
# Additional components
- extra-google-m2repository
- extra-android-m2repository
notifications:
email: false
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
before_script:
- ./team-props/scripts/ci-mock-google-services-setup.sh
script:
- ./gradlew clean check -PdisablePreDex --continue --stacktrace
| Add Travis CI bot for Telegram for notifications | Add Travis CI bot for Telegram for notifications
| YAML | apache-2.0 | squanchy-dev/squanchy-android,squanchy-dev/squanchy-android,squanchy-dev/squanchy-android | yaml | ## Code Before:
language: android
jdk: oraclejdk8
sudo: false
os:
- linux
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.gradle/caches/3.1
- $HOME/.gradle/daemon
- $HOME/.gradle/native
- $HOME/.gradle/wrapper
- $HOME/.m2
android:
components:
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-25.0.2
# The SDK version used to compile your project
- android-25
# Additional components
- extra-google-m2repository
- extra-android-m2repository
notifications:
email: false
before_script:
- ./team-props/scripts/ci-mock-google-services-setup.sh
script:
- ./gradlew clean check -PdisablePreDex --continue --stacktrace
## Instruction:
Add Travis CI bot for Telegram for notifications
## Code After:
language: android
jdk: oraclejdk8
sudo: false
os:
- linux
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.gradle/caches/3.1
- $HOME/.gradle/daemon
- $HOME/.gradle/native
- $HOME/.gradle/wrapper
- $HOME/.m2
android:
components:
- platform-tools
- tools
# The BuildTools version used by your project
- build-tools-25.0.2
# The SDK version used to compile your project
- android-25
# Additional components
- extra-google-m2repository
- extra-android-m2repository
notifications:
email: false
webhooks: https://fathomless-fjord-24024.herokuapp.com/notify
before_script:
- ./team-props/scripts/ci-mock-google-services-setup.sh
script:
- ./gradlew clean check -PdisablePreDex --continue --stacktrace
|
165672fa0d648d5ac7bbf9f3123b51c5616ab03b | index.html | index.html | <!DOCTYPE html>
<html>
<head>
<title>Liverpool FC</title>
</head>
<body>
<header>
<nav>
<a href="index.html">Home</a> <a href="anfield.html">Anfield</a> <a href="players.html">Legendary Players</a> <a href="manager.html">Current Manager</a>
</nav>
</header>
<h1>This is a website with a little information on my favorite soccer team, Liverpool FC!</h1>
<figure>
<img src="images/crest.jpg" alt="Liverpool FC Crest" style="width: 255.5px;height:334.5px">
<figcaption>Liverpool FC Crest</figcaption>
</figure>
<br>
<br>
<h3>On the other pages you'll read about the stadium, legendary players, and the current manager</h3>
<div>
<p>I hope you enjoy reading, and please let me know if you have any feedback!</p>
</div>
</body>
</html> | <!DOCTYPE html>
<html>
<head>
<title>Liverpool FC</title>
</head>
<body>
<header>
<nav>
<a href="index.html">Home</a> <a href="anfield.html">Anfield</a> <a href="players.html">Legendary Players</a> <a href="manager.html">Current Manager</a>
</nav>
</header>
<section>
<h1>This is a website with a little information on my favorite soccer team, Liverpool FC!</h1>
<figure>
<img src="images/crest.jpg" alt="Liverpool FC Crest" style="width: 255.5px;height:334.5px">
<figcaption>Liverpool FC Crest</figcaption>
</figure>
<p><strong>Here are some facts about Liverpool FC:</strong></p>
<ul>
<li>Liverpool FC play in Liverpool, England, the same city the Beatles started in!</li>
<li>The club was founded in 1982</li>
<li>Liverpool have 2 huge rivals: Everton FC, who play less than 1 mile away from Liverpool, and Manchester United, who are the second most successful club in England</li>
<li>Liverpool are the most successful team in England with 18 league titles, 7 FA cups, 8 league cups, and 5 Champion's Leagues</li>
<li>The fan base is widely considered to be the most passionate in England, with each home game creating an electric atmosphere</li>
</ul>
<br>
</section>
<div>
<p>On the other pages you'll read about the stadium, legendary players, and the current manager. I hope you enjoy reading, and please let me know if you have any feedback!</p>
</div>
</body>
</html> | Add facts in unordered list about LFC | Add facts in unordered list about LFC
| HTML | mit | blakeynwa/blakeynwa.github.io | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<title>Liverpool FC</title>
</head>
<body>
<header>
<nav>
<a href="index.html">Home</a> <a href="anfield.html">Anfield</a> <a href="players.html">Legendary Players</a> <a href="manager.html">Current Manager</a>
</nav>
</header>
<h1>This is a website with a little information on my favorite soccer team, Liverpool FC!</h1>
<figure>
<img src="images/crest.jpg" alt="Liverpool FC Crest" style="width: 255.5px;height:334.5px">
<figcaption>Liverpool FC Crest</figcaption>
</figure>
<br>
<br>
<h3>On the other pages you'll read about the stadium, legendary players, and the current manager</h3>
<div>
<p>I hope you enjoy reading, and please let me know if you have any feedback!</p>
</div>
</body>
</html>
## Instruction:
Add facts in unordered list about LFC
## Code After:
<!DOCTYPE html>
<html>
<head>
<title>Liverpool FC</title>
</head>
<body>
<header>
<nav>
<a href="index.html">Home</a> <a href="anfield.html">Anfield</a> <a href="players.html">Legendary Players</a> <a href="manager.html">Current Manager</a>
</nav>
</header>
<section>
<h1>This is a website with a little information on my favorite soccer team, Liverpool FC!</h1>
<figure>
<img src="images/crest.jpg" alt="Liverpool FC Crest" style="width: 255.5px;height:334.5px">
<figcaption>Liverpool FC Crest</figcaption>
</figure>
<p><strong>Here are some facts about Liverpool FC:</strong></p>
<ul>
<li>Liverpool FC play in Liverpool, England, the same city the Beatles started in!</li>
<li>The club was founded in 1982</li>
<li>Liverpool have 2 huge rivals: Everton FC, who play less than 1 mile away from Liverpool, and Manchester United, who are the second most successful club in England</li>
<li>Liverpool are the most successful team in England with 18 league titles, 7 FA cups, 8 league cups, and 5 Champion's Leagues</li>
<li>The fan base is widely considered to be the most passionate in England, with each home game creating an electric atmosphere</li>
</ul>
<br>
</section>
<div>
<p>On the other pages you'll read about the stadium, legendary players, and the current manager. I hope you enjoy reading, and please let me know if you have any feedback!</p>
</div>
</body>
</html> |
b01940ff00cb9eec5e5e7da9caecba8940b851ec | frontend/modules/faq/js/faq.js | frontend/modules/faq/js/faq.js | /**
* Interaction for the faq module
*
* @author Annelies Van Extergem <annelies@netlash.com>
* @author Jelmer Snoeck <jelmer.snoeck@netlash.com>
* @author Thomas Deceuninck <thomas@fronto.be>
*/
jsFrontend.faq =
{
// init, something like a constructor
init: function()
{
if($('#faqFeedbackForm').length > 0) jsFrontend.faq.feedback.init();
}
}
// feedback form
jsFrontend.faq.feedback =
{
init: function()
{
// useful status has been changed
$('#usefulY, #usefulN').on('click', function()
{
// get useful status
var useful = ($('#usefulY').attr('checked') ? true : false);
// show or hide the form
if(useful) { $('form#feedback').submit(); }
else { $('#feedbackNoInfo').show(); }
});
}
}
$(jsFrontend.faq.init); | /**
* Interaction for the faq module
*
* @author Annelies Van Extergem <annelies@netlash.com>
* @author Jelmer Snoeck <jelmer.snoeck@netlash.com>
* @author Thomas Deceuninck <thomas@fronto.be>
*/
jsFrontend.faq =
{
// init, something like a constructor
init: function()
{
if($('#faqFeedbackForm').length > 0) jsFrontend.faq.feedback.init();
}
}
// feedback form
jsFrontend.faq.feedback =
{
init: function()
{
// useful status has been changed
$('#usefulY, #usefulN').on('click', function()
{
// get useful status
var useful = ($('#usefulY').attr('checked') ? true : false);
// show or hide the form
if(useful)
{
$('#message').prop('required', false);
$('form#feedback').submit();
}
else
{
$('#feedbackNoInfo').show();
$('#message').prop('required', true);
}
});
}
}
$(jsFrontend.faq.init); | Add the required-attribute when no is selected. | FAQ: Add the required-attribute when no is selected.
| JavaScript | mit | bartdc/forkcms,jacob-v-dam/forkcms,matthiasmullie/forkcms,sumocoders/forkcms,vytenizs/forkcms,jessedobbelaere/forkcms,ocpyosep78/forkcms,jonasdekeukelaere/forkcms,jeroendesloovere/forkcms,sumocoders/forkcms,Thijzer/forkcms,vytsci/forkcms,ikoene/forkcms,Katrienvh/forkcms,WouterSioen/forkcms,jonasgoderis/jonaz,jeroendesloovere/forkcms,riadvice/forkcms,DegradationOfMankind/forkcms,gertjanmeire/davy_portfolio,wengyulin/forkcms,matthiasmullie/forkcms,jessedobbelaere/forkcms,forkcms/forkcms,jacob-v-dam/forkcms,gertjanmeire/davy_portfolio,lowiebenoot/forkcms,jacob-v-dam/forkcms,riadvice/forkcms,mathiashelin/forkcms,dmoerman/forkcms,carakas/forkcms,carakas/forkcms,wengyulin/forkcms,carakas/forkcms,mathiashelin/forkcms,jonasdekeukelaere/forkcms,carakas/forkcms,jacob-v-dam/forkcms,jeroendesloovere/forkcms,tommyvdv/forkcms,wengyulin/forkcms,nosnickid/forkcms,Saxithon/gh-pages,tommyvdv/forkcms,DegradationOfMankind/forkcms,Katrienvh/forkcms,mathiashelin/forkcms,justcarakas/forkcms,jonasdekeukelaere/forkcms,jonasgoderis/jonaz,carakas/forkcms,mathiashelin/forkcms,lowiebenoot/forkcms,Katrienvh/forkcms,sumocoders/forkcms,riadvice/forkcms,ocpyosep78/forkcms,dmoerman/forkcms,nosnickid/forkcms,Katrienvh/forkcms,jonasgoderis/jonaz,ikoene/forkcms,Saxithon/gh-pages,sumocoders/forkcms,forkcms/forkcms,forkcms/forkcms,jonasgoderis/jonaz,Thijzer/forkcms,sumocoders/forkcms,vytenizs/forkcms,ikoene/forkcms,jessedobbelaere/forkcms,vytsci/forkcms,jessedobbelaere/forkcms,vytenizs/forkcms,riadvice/forkcms,dmoerman/forkcms,jonasgoderis/jonaz,Thijzer/forkcms,justcarakas/forkcms,matthiasmullie/forkcms,tommyvdv/forkcms,tommyvdv/forkcms,WouterSioen/forkcms,nosnickid/forkcms,bartdc/forkcms,jeroendesloovere/forkcms,jonasdekeukelaere/forkcms,bartdc/forkcms,vytsci/forkcms,forkcms/forkcms,justcarakas/forkcms,DegradationOfMankind/forkcms,jonasdekeukelaere/forkcms,DegradationOfMankind/forkcms | javascript | ## Code Before:
/**
* Interaction for the faq module
*
* @author Annelies Van Extergem <annelies@netlash.com>
* @author Jelmer Snoeck <jelmer.snoeck@netlash.com>
* @author Thomas Deceuninck <thomas@fronto.be>
*/
jsFrontend.faq =
{
// init, something like a constructor
init: function()
{
if($('#faqFeedbackForm').length > 0) jsFrontend.faq.feedback.init();
}
}
// feedback form
jsFrontend.faq.feedback =
{
init: function()
{
// useful status has been changed
$('#usefulY, #usefulN').on('click', function()
{
// get useful status
var useful = ($('#usefulY').attr('checked') ? true : false);
// show or hide the form
if(useful) { $('form#feedback').submit(); }
else { $('#feedbackNoInfo').show(); }
});
}
}
$(jsFrontend.faq.init);
## Instruction:
FAQ: Add the required-attribute when no is selected.
## Code After:
/**
* Interaction for the faq module
*
* @author Annelies Van Extergem <annelies@netlash.com>
* @author Jelmer Snoeck <jelmer.snoeck@netlash.com>
* @author Thomas Deceuninck <thomas@fronto.be>
*/
jsFrontend.faq =
{
// init, something like a constructor
init: function()
{
if($('#faqFeedbackForm').length > 0) jsFrontend.faq.feedback.init();
}
}
// feedback form
jsFrontend.faq.feedback =
{
init: function()
{
// useful status has been changed
$('#usefulY, #usefulN').on('click', function()
{
// get useful status
var useful = ($('#usefulY').attr('checked') ? true : false);
// show or hide the form
if(useful)
{
$('#message').prop('required', false);
$('form#feedback').submit();
}
else
{
$('#feedbackNoInfo').show();
$('#message').prop('required', true);
}
});
}
}
$(jsFrontend.faq.init); |
edac8b14beddb97d9897b3078b27abb7a7edd458 | lib/toy_robot_simulator/robot.rb | lib/toy_robot_simulator/robot.rb | require 'forwardable'
class Robot
extend Forwardable
def_delegator :placement, :update!, :place
def_delegator :placement, :report
def initialize(args)
@placement = args[:placement]
end
def move
self.placement = placement.adjacent
end
def right
self.placement = placement.rotate!(90)
end
def left
self.placement = placement.rotate!(-90)
end
private
attr_accessor :placement
end
| require 'forwardable'
class Robot
extend Forwardable
def_delegator :placement, :report
def_delegator :placement, :update, :place
def_delegator :placement, :advance, :move
def initialize(args)
@placement = args[:placement]
end
def right
placement.rotate(90)
end
def left
placement.rotate(-90)
end
private
attr_accessor :placement
end
| Rewrite Robot to pass RobotTest | Rewrite Robot to pass RobotTest
| Ruby | unlicense | matiasanaya/toy-robot-simulator | ruby | ## Code Before:
require 'forwardable'
class Robot
extend Forwardable
def_delegator :placement, :update!, :place
def_delegator :placement, :report
def initialize(args)
@placement = args[:placement]
end
def move
self.placement = placement.adjacent
end
def right
self.placement = placement.rotate!(90)
end
def left
self.placement = placement.rotate!(-90)
end
private
attr_accessor :placement
end
## Instruction:
Rewrite Robot to pass RobotTest
## Code After:
require 'forwardable'
class Robot
extend Forwardable
def_delegator :placement, :report
def_delegator :placement, :update, :place
def_delegator :placement, :advance, :move
def initialize(args)
@placement = args[:placement]
end
def right
placement.rotate(90)
end
def left
placement.rotate(-90)
end
private
attr_accessor :placement
end
|
be139785ee1b3d8fe4ca35f8f019acb350301213 | src/startup/test/startup-spec.js | src/startup/test/startup-spec.js | global.navigator = {platform: 'Mac'};
global.window = {
location: {hash: ''}
};
global.localStorage = {
getItem: function() {}
};
import assert from '../../_test-helper/assert';
import {startUp} from '../startup';
const noop = function() {};
describe('start up', () => {
it('remove kata from the hash', () => {
global.window.location.hash = '#?kata=somekata';
startUp(noop, (_, _1, onSuccess) => onSuccess(''));
assert.equal(global.window.location.hash, '#?');
});
});
| global.navigator = {platform: 'Mac'};
global.window = {
location: {hash: ''}
};
global.localStorage = {
getItem: function() {}
};
import assert from '../../_test-helper/assert';
import {startUp} from '../startup';
const noop = function() {};
describe('start up', function() {
it('remove kata from the hash', () => {
global.window.location.hash = '#?kata=somekata';
startUp(noop, (_, _1, onSuccess) => onSuccess(''));
assert.equal(global.window.location.hash, '#?');
});
it('if there is no kata in the URL get it from localStorage', function() {
global.window.location.hash = '#?';
global.localStorage = {
getItem: () => 'kata code'
};
const withSourceCode = this.sinon.spy();
startUp(withSourceCode, noop);
assert.calledWith(withSourceCode, 'kata code');
});
});
| Test getting the code from localstorage. | Test getting the code from localstorage.
| JavaScript | mit | tddbin/tddbin-frontend,tddbin/tddbin-frontend,tddbin/tddbin-frontend | javascript | ## Code Before:
global.navigator = {platform: 'Mac'};
global.window = {
location: {hash: ''}
};
global.localStorage = {
getItem: function() {}
};
import assert from '../../_test-helper/assert';
import {startUp} from '../startup';
const noop = function() {};
describe('start up', () => {
it('remove kata from the hash', () => {
global.window.location.hash = '#?kata=somekata';
startUp(noop, (_, _1, onSuccess) => onSuccess(''));
assert.equal(global.window.location.hash, '#?');
});
});
## Instruction:
Test getting the code from localstorage.
## Code After:
global.navigator = {platform: 'Mac'};
global.window = {
location: {hash: ''}
};
global.localStorage = {
getItem: function() {}
};
import assert from '../../_test-helper/assert';
import {startUp} from '../startup';
const noop = function() {};
describe('start up', function() {
it('remove kata from the hash', () => {
global.window.location.hash = '#?kata=somekata';
startUp(noop, (_, _1, onSuccess) => onSuccess(''));
assert.equal(global.window.location.hash, '#?');
});
it('if there is no kata in the URL get it from localStorage', function() {
global.window.location.hash = '#?';
global.localStorage = {
getItem: () => 'kata code'
};
const withSourceCode = this.sinon.spy();
startUp(withSourceCode, noop);
assert.calledWith(withSourceCode, 'kata code');
});
});
|
0eecdc0441b69f25cceaa06c870d357123a8d503 | README.md | README.md |
A .Net web service to add a comment to a Trello card when committing from Git.
http://www.nuget.org/packages/TrelloNet/
https://github.com/dillenmeister/Trello.NET/wiki/Examples
|
A .Net web service to add a comment to a Trello card when committing from Git.
http://www.nuget.org/packages/TrelloNet/
https://github.com/dillenmeister/Trello.NET/wiki/Examples
http://trelloworld.azurewebsites.net/
| Add the url for the current deployment location | Add the url for the current deployment location | Markdown | mit | jquintus/TrelloWorld,jquintus/TrelloWorld | markdown | ## Code Before:
A .Net web service to add a comment to a Trello card when committing from Git.
http://www.nuget.org/packages/TrelloNet/
https://github.com/dillenmeister/Trello.NET/wiki/Examples
## Instruction:
Add the url for the current deployment location
## Code After:
A .Net web service to add a comment to a Trello card when committing from Git.
http://www.nuget.org/packages/TrelloNet/
https://github.com/dillenmeister/Trello.NET/wiki/Examples
http://trelloworld.azurewebsites.net/
|
224773dfaf6fb2facfa7ed7e5473e0361d936187 | app/android/Sensorama/app/src/main/java/com/barvoy/sensorama/SRAPIPerms.java | app/android/Sensorama/app/src/main/java/com/barvoy/sensorama/SRAPIPerms.java | // Copyright (c) 2015, Wojciech Adam Koszek <wojciech@koszek.com>
// All rights reserved.
package com.barvoy.sensorama;
public class SRAPIPerms {
public static final String parseAPIID = "PARSE_API_ID";
public static final String parseCLIID = "PARSE_CLIENT_ID";
}
| // Copyright (c) 2015, Wojciech Adam Koszek <wojciech@koszek.com>
// All rights reserved.
package com.barvoy.sensorama;
public class SRAPIPerms {
public static final String parseAPIID = "UNUSED_PARSE_API_ID";
public static final String parseCLIID = "UNUSED_PARSE_CLIENT_ID";
}
| Mark this file as unused for now. | Mark this file as unused for now.
| Java | bsd-2-clause | wkoszek/sensorama,wkoszek/sensorama | java | ## Code Before:
// Copyright (c) 2015, Wojciech Adam Koszek <wojciech@koszek.com>
// All rights reserved.
package com.barvoy.sensorama;
public class SRAPIPerms {
public static final String parseAPIID = "PARSE_API_ID";
public static final String parseCLIID = "PARSE_CLIENT_ID";
}
## Instruction:
Mark this file as unused for now.
## Code After:
// Copyright (c) 2015, Wojciech Adam Koszek <wojciech@koszek.com>
// All rights reserved.
package com.barvoy.sensorama;
public class SRAPIPerms {
public static final String parseAPIID = "UNUSED_PARSE_API_ID";
public static final String parseCLIID = "UNUSED_PARSE_CLIENT_ID";
}
|
3c88bb4174f193e1788525f52ad915710c305280 | core/templates/index.html | core/templates/index.html | {% extends 'base.html' %}
{% block content %}
<h1> Welcome! </h1>
<a href="/admin">Admin page</a>
<a href="{% url 'core:logout' %}">logout</a>
{% endblock %}
| {% extends 'base.html' %}
{% block content %}
<h1> Welcome! </h1>
<a href="{% url 'admin:index' %}">Admin page</a>
<a href="{% url 'core:logout' %}">logout</a>
{% endblock %}
| Fix static admin site href | Fix static admin site href
| HTML | mit | joshsamara/game-website,joshsamara/game-website,joshsamara/game-website | html | ## Code Before:
{% extends 'base.html' %}
{% block content %}
<h1> Welcome! </h1>
<a href="/admin">Admin page</a>
<a href="{% url 'core:logout' %}">logout</a>
{% endblock %}
## Instruction:
Fix static admin site href
## Code After:
{% extends 'base.html' %}
{% block content %}
<h1> Welcome! </h1>
<a href="{% url 'admin:index' %}">Admin page</a>
<a href="{% url 'core:logout' %}">logout</a>
{% endblock %}
|
b763da63755a8fbdc8647069d1bda97e557d0184 | src/variantmap.cpp | src/variantmap.cpp |
namespace MolCore {
// === VariantMap ========================================================== //
/// \class VariantMap
/// \brief The VariantMap class provides a map between string keys
/// and variant values.
// --- Construction and Destruction ---------------------------------------- //
/// Creates a new variant map object.
VariantMap::VariantMap()
{
}
/// Destroys the variant map.
VariantMap::~VariantMap()
{
}
// --- Properties ---------------------------------------------------------- //
/// Returns the size of the variant map.
size_t VariantMap::size() const
{
return m_map.size();
}
/// Returns \c true if the variant map is empty (i.e. size() ==
/// \c 0).
bool VariantMap::isEmpty() const
{
return m_map.empty();
}
// --- Values -------------------------------------------------------------- //
/// Sets the value of \p name to \p value.
void VariantMap::setValue(const std::string &name, const Variant &value)
{
m_map[name] = value;
}
/// Returns the value for \p name.
Variant VariantMap::value(const std::string &name) const
{
return m_map.at(name);
}
} // end MolCore namespace
|
namespace MolCore {
// === VariantMap ========================================================== //
/// \class VariantMap
/// \brief The VariantMap class provides a map between string keys
/// and variant values.
// --- Construction and Destruction ---------------------------------------- //
/// Creates a new variant map object.
VariantMap::VariantMap()
{
}
/// Destroys the variant map.
VariantMap::~VariantMap()
{
}
// --- Properties ---------------------------------------------------------- //
/// Returns the size of the variant map.
size_t VariantMap::size() const
{
return m_map.size();
}
/// Returns \c true if the variant map is empty (i.e. size() ==
/// \c 0).
bool VariantMap::isEmpty() const
{
return m_map.empty();
}
// --- Values -------------------------------------------------------------- //
/// Sets the value of \p name to \p value.
void VariantMap::setValue(const std::string &name, const Variant &value)
{
m_map[name] = value;
}
/// Returns the value for \p name. If \p name is not found a null
/// variant is returned.
Variant VariantMap::value(const std::string &name) const
{
std::map<std::string, Variant>::const_iterator iter = m_map.find(name);
if(iter == m_map.end())
return Variant();
return iter->second;
}
} // end MolCore namespace
| Remove the usage of non-portable std::map::at() from VariantMap | Remove the usage of non-portable std::map::at() from VariantMap
This removes the usage of the non-portable std::map::at() method
in the VariantMap::value() method. This fixes a compilation error
on windows.
Change-Id: Ifb5947af016f4f4e773a9a9721b979bea247b6bb
| C++ | bsd-3-clause | cjh1/mongochemweb-avogadrolibs,cjh1/mongochemweb-avogadrolibs,ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,ghutchis/avogadrolibs,wadejong/avogadrolibs,qust113/molcore,OpenChemistry/avogadrolibs,wadejong/avogadrolibs,OpenChemistry/avogadrolibs,cjh1/mongochemweb-avogadrolibs,wadejong/avogadrolibs,qust113/molcore,ghutchis/avogadrolibs,ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,cjh1/mongochemweb-avogadrolibs,ghutchis/avogadrolibs,OpenChemistry/avogadrolibs,wadejong/avogadrolibs | c++ | ## Code Before:
namespace MolCore {
// === VariantMap ========================================================== //
/// \class VariantMap
/// \brief The VariantMap class provides a map between string keys
/// and variant values.
// --- Construction and Destruction ---------------------------------------- //
/// Creates a new variant map object.
VariantMap::VariantMap()
{
}
/// Destroys the variant map.
VariantMap::~VariantMap()
{
}
// --- Properties ---------------------------------------------------------- //
/// Returns the size of the variant map.
size_t VariantMap::size() const
{
return m_map.size();
}
/// Returns \c true if the variant map is empty (i.e. size() ==
/// \c 0).
bool VariantMap::isEmpty() const
{
return m_map.empty();
}
// --- Values -------------------------------------------------------------- //
/// Sets the value of \p name to \p value.
void VariantMap::setValue(const std::string &name, const Variant &value)
{
m_map[name] = value;
}
/// Returns the value for \p name.
Variant VariantMap::value(const std::string &name) const
{
return m_map.at(name);
}
} // end MolCore namespace
## Instruction:
Remove the usage of non-portable std::map::at() from VariantMap
This removes the usage of the non-portable std::map::at() method
in the VariantMap::value() method. This fixes a compilation error
on windows.
Change-Id: Ifb5947af016f4f4e773a9a9721b979bea247b6bb
## Code After:
namespace MolCore {
// === VariantMap ========================================================== //
/// \class VariantMap
/// \brief The VariantMap class provides a map between string keys
/// and variant values.
// --- Construction and Destruction ---------------------------------------- //
/// Creates a new variant map object.
VariantMap::VariantMap()
{
}
/// Destroys the variant map.
VariantMap::~VariantMap()
{
}
// --- Properties ---------------------------------------------------------- //
/// Returns the size of the variant map.
size_t VariantMap::size() const
{
return m_map.size();
}
/// Returns \c true if the variant map is empty (i.e. size() ==
/// \c 0).
bool VariantMap::isEmpty() const
{
return m_map.empty();
}
// --- Values -------------------------------------------------------------- //
/// Sets the value of \p name to \p value.
void VariantMap::setValue(const std::string &name, const Variant &value)
{
m_map[name] = value;
}
/// Returns the value for \p name. If \p name is not found a null
/// variant is returned.
Variant VariantMap::value(const std::string &name) const
{
std::map<std::string, Variant>::const_iterator iter = m_map.find(name);
if(iter == m_map.end())
return Variant();
return iter->second;
}
} // end MolCore namespace
|
0474387bbe5e081df95fe6a5bb53b5c7b42ad501 | images/bazel/variants.yaml | images/bazel/variants.yaml | variants:
2.2.0-from-0.25.2:
NEW_VERSION: 2.2.0
OLD_VERSION: 0.25.2
2.2.0-from-0.23.2:
NEW_VERSION: 2.2.0
OLD_VERSION: 0.23.2
| variants:
2.2.0-from-0.25.2:
NEW_VERSION: 2.2.0
OLD_VERSION: 0.25.2
2.2.0-from-0.23.2:
NEW_VERSION: 2.2.0
OLD_VERSION: 0.23.2
test-infra:
NEW_VERSION: 2.2.0
OLD_VERSION: 2.0.0
| Create a test-infra variant of bazel. | Create a test-infra variant of bazel.
This image will install the current and next version of bazel we plan to use in test-infra.
By putting both these versions in the same image, we can configure jobs to use .bazelversion
and safely upgrade from one version to the next via a PR.
| YAML | apache-2.0 | BenTheElder/test-infra,cjwagner/test-infra,michelle192837/test-infra,jessfraz/test-infra,kubernetes/test-infra,brahmaroutu/test-infra,monopole/test-infra,ixdy/kubernetes-test-infra,fejta/test-infra,cblecker/test-infra,cblecker/test-infra,cjwagner/test-infra,pwittrock/test-infra,monopole/test-infra,dims/test-infra,jessfraz/test-infra,brahmaroutu/test-infra,kubernetes/test-infra,BenTheElder/test-infra,cblecker/test-infra,BenTheElder/test-infra,fejta/test-infra,fejta/test-infra,kubernetes/test-infra,cjwagner/test-infra,fejta/test-infra,monopole/test-infra,michelle192837/test-infra,jessfraz/test-infra,ixdy/kubernetes-test-infra,dims/test-infra,cblecker/test-infra,pwittrock/test-infra,michelle192837/test-infra,michelle192837/test-infra,fejta/test-infra,cblecker/test-infra,BenTheElder/test-infra,jessfraz/test-infra,dims/test-infra,jessfraz/test-infra,BenTheElder/test-infra,kubernetes/test-infra,ixdy/kubernetes-test-infra,dims/test-infra,fejta/test-infra,cblecker/test-infra,michelle192837/test-infra,monopole/test-infra,brahmaroutu/test-infra,pwittrock/test-infra,pwittrock/test-infra,cjwagner/test-infra,brahmaroutu/test-infra,dims/test-infra,kubernetes/test-infra,pwittrock/test-infra,kubernetes/test-infra,michelle192837/test-infra,BenTheElder/test-infra,monopole/test-infra,cjwagner/test-infra,dims/test-infra,ixdy/kubernetes-test-infra,jessfraz/test-infra,ixdy/kubernetes-test-infra,monopole/test-infra,brahmaroutu/test-infra,brahmaroutu/test-infra,cjwagner/test-infra | yaml | ## Code Before:
variants:
2.2.0-from-0.25.2:
NEW_VERSION: 2.2.0
OLD_VERSION: 0.25.2
2.2.0-from-0.23.2:
NEW_VERSION: 2.2.0
OLD_VERSION: 0.23.2
## Instruction:
Create a test-infra variant of bazel.
This image will install the current and next version of bazel we plan to use in test-infra.
By putting both these versions in the same image, we can configure jobs to use .bazelversion
and safely upgrade from one version to the next via a PR.
## Code After:
variants:
2.2.0-from-0.25.2:
NEW_VERSION: 2.2.0
OLD_VERSION: 0.25.2
2.2.0-from-0.23.2:
NEW_VERSION: 2.2.0
OLD_VERSION: 0.23.2
test-infra:
NEW_VERSION: 2.2.0
OLD_VERSION: 2.0.0
|
3a52cea2a43fd9b21c093e77f1458c89cc3bb639 | AUTHORS.rst | AUTHORS.rst | - Carl Meyer <carl@dirtcircle.com>
- Chris Beaven <smileychris@gmail.com>
- Markus Kaiserswerth <github@sensun.org>
- Daniel Roschka <danielroschka@phoenitydawn.de>
- Jan Van Bruggen <jancvanbruggen@gmail.com>
- Adam Taylor <ataylor32@gmail.com>
| - Carl Meyer <carl@dirtcircle.com>
- Chris Beaven <smileychris@gmail.com>
- Markus Kaiserswerth <github@sensun.org>
- Daniel Roschka <danielroschka@phoenitydawn.de>
- Jan Van Bruggen <jancvanbruggen@gmail.com>
- Adam Taylor <ataylor32@gmail.com>
- Piotr Frankowski
| Add Piotr Frankowski to the authors | Add Piotr Frankowski to the authors
| reStructuredText | bsd-3-clause | Dunedan/django-lockdown,Dunedan/django-lockdown | restructuredtext | ## Code Before:
- Carl Meyer <carl@dirtcircle.com>
- Chris Beaven <smileychris@gmail.com>
- Markus Kaiserswerth <github@sensun.org>
- Daniel Roschka <danielroschka@phoenitydawn.de>
- Jan Van Bruggen <jancvanbruggen@gmail.com>
- Adam Taylor <ataylor32@gmail.com>
## Instruction:
Add Piotr Frankowski to the authors
## Code After:
- Carl Meyer <carl@dirtcircle.com>
- Chris Beaven <smileychris@gmail.com>
- Markus Kaiserswerth <github@sensun.org>
- Daniel Roschka <danielroschka@phoenitydawn.de>
- Jan Van Bruggen <jancvanbruggen@gmail.com>
- Adam Taylor <ataylor32@gmail.com>
- Piotr Frankowski
|
b65acbc2676e1d60b37ad6233733ee3a3d4c0aed | bower.json | bower.json | {
"name": "hull-js",
"version": "develop",
"main": "./lib/hull.js",
"dependencies": {
"jquery": "1.9.1",
"aura": "git://github.com/hull/aura.git#73b4458216588f0b5a48b7b6eb6b2a9d8ec66415",
"backbone": "0.9.9",
"easyXDM": "2.4.17",
"require-handlebars-plugin": "0.4.0",
"analytics": "hull/analytics#0.8.3",
"base64": "0.1.1",
"jquery-file-upload": "7.2.1",
"moment": "1.7.2",
"underscore.string": "2.3.1",
"jquery.cookie": "latest"
},
"devDependencies": {
"JSCovReporter": "git://github.com/TwoApart/JSCovReporter.git"
}
}
| {
"name": "hull-js",
"version": "develop",
"main": "./lib/hull.js",
"dependencies": {
"jquery": "1.9.1",
"aura": "git://github.com/hull/aura.git#0.9.0-pre.1",
"backbone": "0.9.9",
"easyXDM": "2.4.17",
"require-handlebars-plugin": "0.4.0",
"analytics": "hull/analytics#0.8.3",
"base64": "0.1.1",
"jquery-file-upload": "7.2.1",
"moment": "1.7.2",
"underscore.string": "2.3.1",
"jquery.cookie": "latest"
},
"devDependencies": {
"JSCovReporter": "git://github.com/TwoApart/JSCovReporter.git"
}
}
| Fix semver validation of aura tag | Fix semver validation of aura tag
| JSON | mit | hull/hull-js,hull/hull-js,hull/hull-js | json | ## Code Before:
{
"name": "hull-js",
"version": "develop",
"main": "./lib/hull.js",
"dependencies": {
"jquery": "1.9.1",
"aura": "git://github.com/hull/aura.git#73b4458216588f0b5a48b7b6eb6b2a9d8ec66415",
"backbone": "0.9.9",
"easyXDM": "2.4.17",
"require-handlebars-plugin": "0.4.0",
"analytics": "hull/analytics#0.8.3",
"base64": "0.1.1",
"jquery-file-upload": "7.2.1",
"moment": "1.7.2",
"underscore.string": "2.3.1",
"jquery.cookie": "latest"
},
"devDependencies": {
"JSCovReporter": "git://github.com/TwoApart/JSCovReporter.git"
}
}
## Instruction:
Fix semver validation of aura tag
## Code After:
{
"name": "hull-js",
"version": "develop",
"main": "./lib/hull.js",
"dependencies": {
"jquery": "1.9.1",
"aura": "git://github.com/hull/aura.git#0.9.0-pre.1",
"backbone": "0.9.9",
"easyXDM": "2.4.17",
"require-handlebars-plugin": "0.4.0",
"analytics": "hull/analytics#0.8.3",
"base64": "0.1.1",
"jquery-file-upload": "7.2.1",
"moment": "1.7.2",
"underscore.string": "2.3.1",
"jquery.cookie": "latest"
},
"devDependencies": {
"JSCovReporter": "git://github.com/TwoApart/JSCovReporter.git"
}
}
|
1e3a9b2452f0c878bff1591cb1149e65da306d38 | README.rst | README.rst | aiodcard
==============
Dcard crawler using asyncio(coroutine)
Feature
-------
| Get article list and content using coroutine
Dependencies
------------
* Python 3.3 and :mod:`asyncio` or Python 3.4+
* aiohttp
Installation
------------
::
python setup.py install
or
::
pip install aiodcard
Example
-------
::
import asyncio
import aiohttp
import aiodcard
@asyncio.coroutine
def get_funny_articles():
session = aiohttp.ClientSession()
forum_name = 'funny'
page_index = 1
result = yield from aiodcard.get_articles_of_page(session, forum_name, page_index)
print(result)
def main():
loop = asyncio.get_event_loop()
loop.run_until_complete(get_funny_articles())
if __name__ == '__main__':
main()
Todo
----
* test all functions
Authors and License
-------------------
The ``aiodcard`` package is written by Chien-Wei Huang. It’s MIT licensed and freely available.
Feel free to improve this package and send a pull request to GitHub.
| aiodcard
==============
[](https://travis-ci.org/carlcarl/aiodcard)
[](https://coveralls.io/github/carlcarl/aiodcard?branch=master)
Dcard crawler using asyncio(coroutine)
Feature
-------
| Get article list and content using coroutine
Dependencies
------------
* Python 3.3 and :mod:`asyncio` or Python 3.4+
* aiohttp
Installation
------------
::
python setup.py install
or
::
pip install aiodcard
Example
-------
::
import asyncio
import aiohttp
import aiodcard
@asyncio.coroutine
def get_funny_articles():
session = aiohttp.ClientSession()
forum_name = 'funny'
page_index = 1
result = yield from aiodcard.get_articles_of_page(session, forum_name, page_index)
print(result)
def main():
loop = asyncio.get_event_loop()
loop.run_until_complete(get_funny_articles())
if __name__ == '__main__':
main()
Todo
----
* test all functions
Authors and License
-------------------
The ``aiodcard`` package is written by Chien-Wei Huang. It’s MIT licensed and freely available.
Feel free to improve this package and send a pull request to GitHub.
| Add travis and coveralls badge | Add travis and coveralls badge
| reStructuredText | mit | carlcarl/aiodcard | restructuredtext | ## Code Before:
aiodcard
==============
Dcard crawler using asyncio(coroutine)
Feature
-------
| Get article list and content using coroutine
Dependencies
------------
* Python 3.3 and :mod:`asyncio` or Python 3.4+
* aiohttp
Installation
------------
::
python setup.py install
or
::
pip install aiodcard
Example
-------
::
import asyncio
import aiohttp
import aiodcard
@asyncio.coroutine
def get_funny_articles():
session = aiohttp.ClientSession()
forum_name = 'funny'
page_index = 1
result = yield from aiodcard.get_articles_of_page(session, forum_name, page_index)
print(result)
def main():
loop = asyncio.get_event_loop()
loop.run_until_complete(get_funny_articles())
if __name__ == '__main__':
main()
Todo
----
* test all functions
Authors and License
-------------------
The ``aiodcard`` package is written by Chien-Wei Huang. It’s MIT licensed and freely available.
Feel free to improve this package and send a pull request to GitHub.
## Instruction:
Add travis and coveralls badge
## Code After:
aiodcard
==============
[](https://travis-ci.org/carlcarl/aiodcard)
[](https://coveralls.io/github/carlcarl/aiodcard?branch=master)
Dcard crawler using asyncio(coroutine)
Feature
-------
| Get article list and content using coroutine
Dependencies
------------
* Python 3.3 and :mod:`asyncio` or Python 3.4+
* aiohttp
Installation
------------
::
python setup.py install
or
::
pip install aiodcard
Example
-------
::
import asyncio
import aiohttp
import aiodcard
@asyncio.coroutine
def get_funny_articles():
session = aiohttp.ClientSession()
forum_name = 'funny'
page_index = 1
result = yield from aiodcard.get_articles_of_page(session, forum_name, page_index)
print(result)
def main():
loop = asyncio.get_event_loop()
loop.run_until_complete(get_funny_articles())
if __name__ == '__main__':
main()
Todo
----
* test all functions
Authors and License
-------------------
The ``aiodcard`` package is written by Chien-Wei Huang. It’s MIT licensed and freely available.
Feel free to improve this package and send a pull request to GitHub.
|
c0092683844d04e9f4ca9ebe73037f1209bd5231 | install/install_functions.php | install/install_functions.php | <?php
if(!defined('IN_INSTALL'))
{
die();
}
function generateRandomHash($Length)
{
$Signs = '0123456789abcdefghijklmnoprstuwxyzABCDEFGHIJKLMNOPRSTUWXYZ_';
$SignsLength = strlen($Signs) - 1;
$Return = '';
for($i = 0; $i < $Length; ++$i)
{
$Return .= $Signs[mt_rand(0, $SignsLength)];
}
return $Return;
}
function parseFile($filepath, $parseArray)
{
return preg_replace_callback(
'#\{([a-z0-9\-_]*?)\}#Ssi',
function ($matches) use ($parseArray) {
return (
isset($parseArray[$matches[1]]) ?
$parseArray[$matches[1]] :
""
);
},
file_get_contents($filepath)
);
}
function display()
{
global $_Lang;
echo parseFile('install_body.tpl', $_Lang);
}
function includeLang()
{
global $_Lang, $_UseLang;
include("install_lang_".$_UseLang.".lang");
}
?>
| <?php
if(!defined('IN_INSTALL'))
{
die();
}
require_once('../utils/migrator/autoload.php');
function generateRandomHash($Length)
{
$Signs = '0123456789abcdefghijklmnoprstuwxyzABCDEFGHIJKLMNOPRSTUWXYZ_';
$SignsLength = strlen($Signs) - 1;
$Return = '';
for($i = 0; $i < $Length; ++$i)
{
$Return .= $Signs[mt_rand(0, $SignsLength)];
}
return $Return;
}
function parseFile($filepath, $parseArray)
{
return preg_replace_callback(
'#\{([a-z0-9\-_]*?)\}#Ssi',
function ($matches) use ($parseArray) {
return (
isset($parseArray[$matches[1]]) ?
$parseArray[$matches[1]] :
""
);
},
file_get_contents($filepath)
);
}
function display()
{
global $_Lang;
echo parseFile('install_body.tpl', $_Lang);
}
function includeLang()
{
global $_Lang, $_UseLang;
include("install_lang_".$_UseLang.".lang");
}
function generateMigrationEntryFile()
{
$migrator = new UniEngine\Utils\Migrations\Migrator([
"rootPath" => "../"
]);
$migrator->saveLastAppliedMigrationID(
$migrator->getMostRecentMigrationID()
);
}
?>
| Create a helper function which saves the most recent migration ID as the latest applied one | Create a helper function which saves the most recent migration ID as the latest applied one
| PHP | agpl-3.0 | mdziekon/UniEngine,mdziekon/UniEngine,mdziekon/UniEngine | php | ## Code Before:
<?php
if(!defined('IN_INSTALL'))
{
die();
}
function generateRandomHash($Length)
{
$Signs = '0123456789abcdefghijklmnoprstuwxyzABCDEFGHIJKLMNOPRSTUWXYZ_';
$SignsLength = strlen($Signs) - 1;
$Return = '';
for($i = 0; $i < $Length; ++$i)
{
$Return .= $Signs[mt_rand(0, $SignsLength)];
}
return $Return;
}
function parseFile($filepath, $parseArray)
{
return preg_replace_callback(
'#\{([a-z0-9\-_]*?)\}#Ssi',
function ($matches) use ($parseArray) {
return (
isset($parseArray[$matches[1]]) ?
$parseArray[$matches[1]] :
""
);
},
file_get_contents($filepath)
);
}
function display()
{
global $_Lang;
echo parseFile('install_body.tpl', $_Lang);
}
function includeLang()
{
global $_Lang, $_UseLang;
include("install_lang_".$_UseLang.".lang");
}
?>
## Instruction:
Create a helper function which saves the most recent migration ID as the latest applied one
## Code After:
<?php
if(!defined('IN_INSTALL'))
{
die();
}
require_once('../utils/migrator/autoload.php');
function generateRandomHash($Length)
{
$Signs = '0123456789abcdefghijklmnoprstuwxyzABCDEFGHIJKLMNOPRSTUWXYZ_';
$SignsLength = strlen($Signs) - 1;
$Return = '';
for($i = 0; $i < $Length; ++$i)
{
$Return .= $Signs[mt_rand(0, $SignsLength)];
}
return $Return;
}
function parseFile($filepath, $parseArray)
{
return preg_replace_callback(
'#\{([a-z0-9\-_]*?)\}#Ssi',
function ($matches) use ($parseArray) {
return (
isset($parseArray[$matches[1]]) ?
$parseArray[$matches[1]] :
""
);
},
file_get_contents($filepath)
);
}
function display()
{
global $_Lang;
echo parseFile('install_body.tpl', $_Lang);
}
function includeLang()
{
global $_Lang, $_UseLang;
include("install_lang_".$_UseLang.".lang");
}
function generateMigrationEntryFile()
{
$migrator = new UniEngine\Utils\Migrations\Migrator([
"rootPath" => "../"
]);
$migrator->saveLastAppliedMigrationID(
$migrator->getMostRecentMigrationID()
);
}
?>
|
c432bf5d71772c22a7e170bff49a67b63a266175 | README.md | README.md |
Empty
|
This site is built using [middleman](https://middlemanapp.com/)
Running the server
```
bundle exec middleman
```
Deploy to Github Pages
```
middleman deploy
```
| Add basic middleman instructions to readme.md | Add basic middleman instructions to readme.md
| Markdown | mit | sgrif/diesel.rs-website,sgrif/diesel.rs-website,sgrif/diesel.rs-website | markdown | ## Code Before:
Empty
## Instruction:
Add basic middleman instructions to readme.md
## Code After:
This site is built using [middleman](https://middlemanapp.com/)
Running the server
```
bundle exec middleman
```
Deploy to Github Pages
```
middleman deploy
```
|
b1b9965dccbef3d00c1a7ece2a53b0a84dbd83b6 | README.md | README.md | Description
===========
This cookbook primary purpose is to create a switch overlay on a vanilla Debian
to ease Chef cookbook development.
Requirements
============
Debian Wheezy
Attributes
==========
Usage
=====
include_recipe "cumulus-linux::overlay"
| Description
===========
This cookbook primary purpose is to create a switch overlay on a vanilla Debian and if deployed on the production switch build the correct Port configurations needed for Cumulus.
Requirements
============
## Testing
Acess to Debian Wheezy box
## Production
Access to Cumulus HCL switches (Accton AS6701_32X which is what this cookbook was originally written for)
Attributes
==========
Usage
=====
include_recipe "cumulus-linux"
# seting up the hardware ports and layout
::Chef::Recipe.send(:include, Cumulus)
case node.cumulus.model
when "AS6701_32X"
conf = Cumulus::SwitchConfig.new(Accton::AS6701_32X::X_pipeline,Accton::AS6701_32X::Y_pipeline)
(21..24).each do |i|
conf.front_panel_port(i).set4x10g
end
# ruby symbols do not have "-" in them so it get convert into "_"
# use "cumulus_linux_overlay" instead of "cumulus-linux-overlay"
cumulus_linux_overlay "AS6701_32X" do
hardware conf
end
end | Include examples and update requirements | Include examples and update requirements
| Markdown | apache-2.0 | ooyala/cumulus-linux-cookbook,ooyala/cumulus-linux-cookbook,ooyala/cumulus-linux-cookbook | markdown | ## Code Before:
Description
===========
This cookbook primary purpose is to create a switch overlay on a vanilla Debian
to ease Chef cookbook development.
Requirements
============
Debian Wheezy
Attributes
==========
Usage
=====
include_recipe "cumulus-linux::overlay"
## Instruction:
Include examples and update requirements
## Code After:
Description
===========
This cookbook primary purpose is to create a switch overlay on a vanilla Debian and if deployed on the production switch build the correct Port configurations needed for Cumulus.
Requirements
============
## Testing
Acess to Debian Wheezy box
## Production
Access to Cumulus HCL switches (Accton AS6701_32X which is what this cookbook was originally written for)
Attributes
==========
Usage
=====
include_recipe "cumulus-linux"
# seting up the hardware ports and layout
::Chef::Recipe.send(:include, Cumulus)
case node.cumulus.model
when "AS6701_32X"
conf = Cumulus::SwitchConfig.new(Accton::AS6701_32X::X_pipeline,Accton::AS6701_32X::Y_pipeline)
(21..24).each do |i|
conf.front_panel_port(i).set4x10g
end
# ruby symbols do not have "-" in them so it get convert into "_"
# use "cumulus_linux_overlay" instead of "cumulus-linux-overlay"
cumulus_linux_overlay "AS6701_32X" do
hardware conf
end
end |
724625365cdc62348fc747e6112d4e27177e0493 | lib/domgen.rb | lib/domgen.rb | require 'erb'
require 'fileutils'
require 'logger'
require 'domgen/orderedhash'
# Core components
require 'domgen/model'
require 'domgen/template'
require 'domgen/render_context'
require 'domgen/generator'
require 'domgen/helper'
# Java
require 'domgen/java/model'
# Ruby
require 'domgen/ruby/model'
# SQL
require 'domgen/sql/model'
require 'domgen/sql/helper'
require 'domgen/sql/generator'
# JPA
require 'domgen/jpa/model'
require 'domgen/jpa/helper'
require 'domgen/jpa/generator'
# ActiveRecord
require 'domgen/active_record/generator'
require 'domgen/rake_tasks'
| require 'erb'
require 'fileutils'
require 'logger'
require 'domgen/orderedhash'
# Core components
require 'domgen/model'
require 'domgen/template'
require 'domgen/render_context'
require 'domgen/generator'
require 'domgen/helper'
# Java
require 'domgen/java/model'
# Ruby
require 'domgen/ruby/model'
require 'domgen/ruby/helper'
# SQL
require 'domgen/sql/model'
require 'domgen/sql/helper'
require 'domgen/sql/generator'
# JPA
require 'domgen/jpa/model'
require 'domgen/jpa/helper'
require 'domgen/jpa/generator'
# ActiveRecord
require 'domgen/active_record/generator'
require 'domgen/rake_tasks'
| Make sure the ruby helper is required | Make sure the ruby helper is required
| Ruby | apache-2.0 | william-ml-leslie/domgen,icaughley/domgen,icaughley/domgen,realityforge/domgen,realityforge/domgen | ruby | ## Code Before:
require 'erb'
require 'fileutils'
require 'logger'
require 'domgen/orderedhash'
# Core components
require 'domgen/model'
require 'domgen/template'
require 'domgen/render_context'
require 'domgen/generator'
require 'domgen/helper'
# Java
require 'domgen/java/model'
# Ruby
require 'domgen/ruby/model'
# SQL
require 'domgen/sql/model'
require 'domgen/sql/helper'
require 'domgen/sql/generator'
# JPA
require 'domgen/jpa/model'
require 'domgen/jpa/helper'
require 'domgen/jpa/generator'
# ActiveRecord
require 'domgen/active_record/generator'
require 'domgen/rake_tasks'
## Instruction:
Make sure the ruby helper is required
## Code After:
require 'erb'
require 'fileutils'
require 'logger'
require 'domgen/orderedhash'
# Core components
require 'domgen/model'
require 'domgen/template'
require 'domgen/render_context'
require 'domgen/generator'
require 'domgen/helper'
# Java
require 'domgen/java/model'
# Ruby
require 'domgen/ruby/model'
require 'domgen/ruby/helper'
# SQL
require 'domgen/sql/model'
require 'domgen/sql/helper'
require 'domgen/sql/generator'
# JPA
require 'domgen/jpa/model'
require 'domgen/jpa/helper'
require 'domgen/jpa/generator'
# ActiveRecord
require 'domgen/active_record/generator'
require 'domgen/rake_tasks'
|
63caa3b06772244ca925c0f1c172bd7e9332617b | packages/la/lazy-hash.yaml | packages/la/lazy-hash.yaml | homepage: ''
changelog-type: ''
hash: a362397e6b2094047e696bb63a2f5160f5d5233bda7ac620233ed1d6165d8648
test-bench-deps: {}
maintainer: (@) jsag $ hvl.no
synopsis: Identifiers for not-yet-computed values
changelog: ''
basic-deps:
base: ! '>=4.8 && <4.11'
vector-space: ! '>=0.9 && <0.18'
tagged: -any
hashable: ! '>=1.0 && <1.3'
haskell-src-meta: ! '>=0.6 && <0.9'
constrained-categories: ! '>=0.3 && <0.4'
template-haskell: -any
all-versions:
- 0.1.0.0
author: Justus Sagemüller
latest: 0.1.0.0
description-type: haddock
description: |-
This package gives a way to assign values with largely
unique keys, without ever actually spending the time needed to
compute the value. The basic idea is to hash the source code of some
expression (in other words, its unnormalised AST), rather than
the value (its normal form).
license-name: GPL-3.0-only
| homepage: ''
changelog-type: ''
hash: 1c937c16018eaf3d215a560ab744f2c1055e065cfa61058f684cb0a8a1426450
test-bench-deps: {}
maintainer: (@) jsag $ hvl.no
synopsis: Identifiers for not-yet-computed values
changelog: ''
basic-deps:
base: ! '>=4.8 && <4.13'
vector-space: ! '>=0.9 && <0.18'
tagged: -any
hashable: ! '>=1.0 && <1.3'
haskell-src-meta: ! '>=0.6 && <0.9'
constrained-categories: ! '>=0.3 && <0.4'
template-haskell: -any
all-versions:
- 0.1.0.0
author: Justus Sagemüller
latest: 0.1.0.0
description-type: haddock
description: |-
This package gives a way to assign values with largely
unique keys, without ever actually spending the time needed to
compute the value. The basic idea is to hash the source code of some
expression (in other words, its unnormalised AST), rather than
the value (its normal form).
license-name: GPL-3.0-only
| Update from Hackage at 2019-09-18T13:26:53Z | Update from Hackage at 2019-09-18T13:26:53Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: ''
hash: a362397e6b2094047e696bb63a2f5160f5d5233bda7ac620233ed1d6165d8648
test-bench-deps: {}
maintainer: (@) jsag $ hvl.no
synopsis: Identifiers for not-yet-computed values
changelog: ''
basic-deps:
base: ! '>=4.8 && <4.11'
vector-space: ! '>=0.9 && <0.18'
tagged: -any
hashable: ! '>=1.0 && <1.3'
haskell-src-meta: ! '>=0.6 && <0.9'
constrained-categories: ! '>=0.3 && <0.4'
template-haskell: -any
all-versions:
- 0.1.0.0
author: Justus Sagemüller
latest: 0.1.0.0
description-type: haddock
description: |-
This package gives a way to assign values with largely
unique keys, without ever actually spending the time needed to
compute the value. The basic idea is to hash the source code of some
expression (in other words, its unnormalised AST), rather than
the value (its normal form).
license-name: GPL-3.0-only
## Instruction:
Update from Hackage at 2019-09-18T13:26:53Z
## Code After:
homepage: ''
changelog-type: ''
hash: 1c937c16018eaf3d215a560ab744f2c1055e065cfa61058f684cb0a8a1426450
test-bench-deps: {}
maintainer: (@) jsag $ hvl.no
synopsis: Identifiers for not-yet-computed values
changelog: ''
basic-deps:
base: ! '>=4.8 && <4.13'
vector-space: ! '>=0.9 && <0.18'
tagged: -any
hashable: ! '>=1.0 && <1.3'
haskell-src-meta: ! '>=0.6 && <0.9'
constrained-categories: ! '>=0.3 && <0.4'
template-haskell: -any
all-versions:
- 0.1.0.0
author: Justus Sagemüller
latest: 0.1.0.0
description-type: haddock
description: |-
This package gives a way to assign values with largely
unique keys, without ever actually spending the time needed to
compute the value. The basic idea is to hash the source code of some
expression (in other words, its unnormalised AST), rather than
the value (its normal form).
license-name: GPL-3.0-only
|
02512a8810ee807d47cd8bfe1e151c859ea56252 | CMakeLists.txt | CMakeLists.txt | cmake_minimum_required (VERSION 2.6)
project (assimp2xml3d)
set(ASSIMP2XML3D_VERSION_MAJOR, 0)
set(ASSIMP2XML3D_VERSION_MINOR, 1)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
set ( ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL
"Disable building the Assimp toolkit (eg. Assimp model viewer)"
)
add_subdirectory (assimp)
include_directories("assimp/include")
set (ASSIMP_LIBS ${ASSIMP_LIBS} assimp)
add_executable(assimp2xml3d src/main.cpp)
target_link_libraries (assimp2xml3d ${ASSIMP_LIBS})
INSTALL( TARGETS assimp2xml3d
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR})
| cmake_minimum_required (VERSION 2.6)
project (assimp2xml3d)
########## Version number
set(ASSIMP2XML3D_VERSION_MAJOR, 0)
set(ASSIMP2XML3D_VERSION_MINOR, 1)
########## Set cmake variables
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
set(CMAKE_INSTALL_BINDIR "${CMAKE_CURRENT_SOURCE_DIR}/bin")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
########## Set Assimp variables
set ( ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL
"Disable building the Assimp toolkit (eg. Assimp model viewer)"
)
########## Include Assimp
add_subdirectory (assimp)
include_directories("assimp/include")
set (ASSIMP_LIBS ${ASSIMP_LIBS} assimp)
########## Include TinyXML-2
add_subdirectory (tinyxml2)
include_directories("tinyxml2/")
set (TINYXML_LIBS ${TINYXML_LIBS} tinyxml2)
########## Link executable
add_executable(assimp2xml3d src/main.cpp src/xml3d_exporter.cpp src/xml3d_exporter.h)
target_link_libraries (assimp2xml3d ${ASSIMP_LIBS} ${TINYXML_LIBS})
########## Install executable to bin dir
INSTALL( TARGETS assimp2xml3d
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR})
| Add TinyXML-2 to cmake script | Add TinyXML-2 to cmake script
| Text | bsd-3-clause | csvurt/assimp2xml3d | text | ## Code Before:
cmake_minimum_required (VERSION 2.6)
project (assimp2xml3d)
set(ASSIMP2XML3D_VERSION_MAJOR, 0)
set(ASSIMP2XML3D_VERSION_MINOR, 1)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/bin)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
set ( ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL
"Disable building the Assimp toolkit (eg. Assimp model viewer)"
)
add_subdirectory (assimp)
include_directories("assimp/include")
set (ASSIMP_LIBS ${ASSIMP_LIBS} assimp)
add_executable(assimp2xml3d src/main.cpp)
target_link_libraries (assimp2xml3d ${ASSIMP_LIBS})
INSTALL( TARGETS assimp2xml3d
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR})
## Instruction:
Add TinyXML-2 to cmake script
## Code After:
cmake_minimum_required (VERSION 2.6)
project (assimp2xml3d)
########## Version number
set(ASSIMP2XML3D_VERSION_MAJOR, 0)
set(ASSIMP2XML3D_VERSION_MINOR, 1)
########## Set cmake variables
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
set(CMAKE_INSTALL_BINDIR "${CMAKE_CURRENT_SOURCE_DIR}/bin")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules")
########## Set Assimp variables
set ( ASSIMP_BUILD_ASSIMP_TOOLS OFF CACHE BOOL
"Disable building the Assimp toolkit (eg. Assimp model viewer)"
)
########## Include Assimp
add_subdirectory (assimp)
include_directories("assimp/include")
set (ASSIMP_LIBS ${ASSIMP_LIBS} assimp)
########## Include TinyXML-2
add_subdirectory (tinyxml2)
include_directories("tinyxml2/")
set (TINYXML_LIBS ${TINYXML_LIBS} tinyxml2)
########## Link executable
add_executable(assimp2xml3d src/main.cpp src/xml3d_exporter.cpp src/xml3d_exporter.h)
target_link_libraries (assimp2xml3d ${ASSIMP_LIBS} ${TINYXML_LIBS})
########## Install executable to bin dir
INSTALL( TARGETS assimp2xml3d
LIBRARY DESTINATION ${ASSIMP_LIB_INSTALL_DIR}
RUNTIME DESTINATION ${ASSIMP_BIN_INSTALL_DIR})
|
637b33f04f7b6570d07971b9fc7ac18abe4a3c46 | CHANGELOG.md | CHANGELOG.md |
The very first version actually used in production.
|
This release aims to make getting started with Kafka-Pixy easier.
* [#39](https://github.com/mailgun/kafka-pixy/issues/39) First time consume
from a group may skip messages.
* [#40](https://github.com/mailgun/kafka-pixy/issues/40) Make output of
`GET /topics/<>/consumers` easier to read.
* By default services listens on 19092 port for incoming API requests and a
unix domain socket is activated only if the `--unixAddr` command line
parameter is specified.
* By default a pid file is not created anymore. You need to explicitly specify
`--pidFile` command line argument to get it created.
* The source code was refactored into packages to make it easier to understand
internal dependencies.
#### Version 0.8.1 (2015-10-24)
The very first version actually used in production.
| Update the change log for v0.9.0 | Update the change log for v0.9.0
| Markdown | apache-2.0 | mailgun/kafka-pixy,mailgun/kafka-pixy,mailgun/kafka-pixy | markdown | ## Code Before:
The very first version actually used in production.
## Instruction:
Update the change log for v0.9.0
## Code After:
This release aims to make getting started with Kafka-Pixy easier.
* [#39](https://github.com/mailgun/kafka-pixy/issues/39) First time consume
from a group may skip messages.
* [#40](https://github.com/mailgun/kafka-pixy/issues/40) Make output of
`GET /topics/<>/consumers` easier to read.
* By default services listens on 19092 port for incoming API requests and a
unix domain socket is activated only if the `--unixAddr` command line
parameter is specified.
* By default a pid file is not created anymore. You need to explicitly specify
`--pidFile` command line argument to get it created.
* The source code was refactored into packages to make it easier to understand
internal dependencies.
#### Version 0.8.1 (2015-10-24)
The very first version actually used in production.
|
5fb08b0ba198f3709a3543549223093826f64e93 | src/server/activitypub/publickey.ts | src/server/activitypub/publickey.ts | import * as express from 'express';
import context from '../../remote/activitypub/renderer/context';
import render from '../../remote/activitypub/renderer/key';
import User from '../../models/user';
const app = express.Router();
app.get('/users/:user/publickey', async (req, res) => {
const userId = req.params.user;
const user = await User.findOne({ _id: userId });
const rendered = render(user);
rendered['@context'] = context;
res.json(rendered);
});
export default app;
| import * as express from 'express';
import context from '../../remote/activitypub/renderer/context';
import render from '../../remote/activitypub/renderer/key';
import User, { isLocalUser } from '../../models/user';
const app = express.Router();
app.get('/users/:user/publickey', async (req, res) => {
const userId = req.params.user;
const user = await User.findOne({ _id: userId });
if (isLocalUser(user)) {
const rendered = render(user);
rendered['@context'] = context;
res.json(rendered);
} else {
res.sendStatus(400);
}
});
export default app;
| Check whether is local user | Check whether is local user
| TypeScript | mit | Tosuke/misskey,syuilo/Misskey,syuilo/Misskey,ha-dai/Misskey,Tosuke/misskey,Tosuke/misskey,Tosuke/misskey,Tosuke/misskey,ha-dai/Misskey | typescript | ## Code Before:
import * as express from 'express';
import context from '../../remote/activitypub/renderer/context';
import render from '../../remote/activitypub/renderer/key';
import User from '../../models/user';
const app = express.Router();
app.get('/users/:user/publickey', async (req, res) => {
const userId = req.params.user;
const user = await User.findOne({ _id: userId });
const rendered = render(user);
rendered['@context'] = context;
res.json(rendered);
});
export default app;
## Instruction:
Check whether is local user
## Code After:
import * as express from 'express';
import context from '../../remote/activitypub/renderer/context';
import render from '../../remote/activitypub/renderer/key';
import User, { isLocalUser } from '../../models/user';
const app = express.Router();
app.get('/users/:user/publickey', async (req, res) => {
const userId = req.params.user;
const user = await User.findOne({ _id: userId });
if (isLocalUser(user)) {
const rendered = render(user);
rendered['@context'] = context;
res.json(rendered);
} else {
res.sendStatus(400);
}
});
export default app;
|
3642fdd03b8eebfdb99aed50e56c5b9026e7429f | config/routes.rb | config/routes.rb | Rails.application.routes.draw do
require 'sidekiq/web'
devise_for :users
namespace :api do
namespace :v1 do
mount_devise_token_auth_for 'User', at: 'users', skip: [:omniauth_callbacks]
resources :users, only: [:show]
end
end
# map views
get 'maps/fires' => 'maps#fires'
get 'maps/windy' => 'maps#windy'
get 'maps/forests' => 'maps#forests'
get 'maps/protected_areas' => 'maps#protected_areas'
get 'maps/weather_perspective' => 'maps#weather_perspective'
# modis data
#get 'modis_data/fires' => 'modis_data#fires'
post 'modis_data/fires' => 'modis_data#fires'
resources :reports
require 'sidekiq/web'
require 'sidekiq/cron/web'
mount Sidekiq::Web => '/sidekiq'
end
| Rails.application.routes.draw do
require 'sidekiq/web'
devise_for :users
namespace :api do
namespace :v1 do
mount_devise_token_auth_for 'User', at: 'users', skip: [:omniauth_callbacks]
end
end
resources :users, only: [:show]
# map views
get 'maps/fires' => 'maps#fires'
get 'maps/windy' => 'maps#windy'
get 'maps/forests' => 'maps#forests'
get 'maps/protected_areas' => 'maps#protected_areas'
get 'maps/weather_perspective' => 'maps#weather_perspective'
# modis data
#get 'modis_data/fires' => 'modis_data#fires'
post 'modis_data/fires' => 'modis_data#fires'
resources :reports
require 'sidekiq/web'
require 'sidekiq/cron/web'
mount Sidekiq::Web => '/sidekiq'
end
| Remove api namespace from user resources path. | Remove api namespace from user resources path.
| Ruby | mit | ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend,ForestGuardian/ForestGuardianBackend | ruby | ## Code Before:
Rails.application.routes.draw do
require 'sidekiq/web'
devise_for :users
namespace :api do
namespace :v1 do
mount_devise_token_auth_for 'User', at: 'users', skip: [:omniauth_callbacks]
resources :users, only: [:show]
end
end
# map views
get 'maps/fires' => 'maps#fires'
get 'maps/windy' => 'maps#windy'
get 'maps/forests' => 'maps#forests'
get 'maps/protected_areas' => 'maps#protected_areas'
get 'maps/weather_perspective' => 'maps#weather_perspective'
# modis data
#get 'modis_data/fires' => 'modis_data#fires'
post 'modis_data/fires' => 'modis_data#fires'
resources :reports
require 'sidekiq/web'
require 'sidekiq/cron/web'
mount Sidekiq::Web => '/sidekiq'
end
## Instruction:
Remove api namespace from user resources path.
## Code After:
Rails.application.routes.draw do
require 'sidekiq/web'
devise_for :users
namespace :api do
namespace :v1 do
mount_devise_token_auth_for 'User', at: 'users', skip: [:omniauth_callbacks]
end
end
resources :users, only: [:show]
# map views
get 'maps/fires' => 'maps#fires'
get 'maps/windy' => 'maps#windy'
get 'maps/forests' => 'maps#forests'
get 'maps/protected_areas' => 'maps#protected_areas'
get 'maps/weather_perspective' => 'maps#weather_perspective'
# modis data
#get 'modis_data/fires' => 'modis_data#fires'
post 'modis_data/fires' => 'modis_data#fires'
resources :reports
require 'sidekiq/web'
require 'sidekiq/cron/web'
mount Sidekiq::Web => '/sidekiq'
end
|
985598bbaf9e35f33d3178eb240c60b4115250aa | README.md | README.md | cd /opt <br />
wget https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/debian8setup.sh <br />
chmod +x /opt/debian8setup.sh <br />
./debian8setup.sh
#Debian 8 setup:
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/debian8setup.sh <br /> <br />
Botnet iplist: <br />
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/ipset-blacklist.txt <br />
Iptable rules: <br />
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/iptables.up.rules <br />
| cd /opt <br />
wget https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/debian8setup.sh <br />
chmod +x /opt/debian8setup.sh <br />
./debian8setup.sh
#Debian 8 setup:
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/debian8setup.sh <br /> <br />
Botnet iplist: <br />
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/ipset-blacklist.txt <br />
Iptable rules: <br />
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/iptables.up.rules <br />
#Jenkins setup:
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/jenkins.sh <br />
| Add url to jenkins setup script | Add url to jenkins setup script | Markdown | mit | antonchernik/lnmp-debian | markdown | ## Code Before:
cd /opt <br />
wget https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/debian8setup.sh <br />
chmod +x /opt/debian8setup.sh <br />
./debian8setup.sh
#Debian 8 setup:
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/debian8setup.sh <br /> <br />
Botnet iplist: <br />
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/ipset-blacklist.txt <br />
Iptable rules: <br />
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/iptables.up.rules <br />
## Instruction:
Add url to jenkins setup script
## Code After:
cd /opt <br />
wget https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/debian8setup.sh <br />
chmod +x /opt/debian8setup.sh <br />
./debian8setup.sh
#Debian 8 setup:
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/debian8setup.sh <br /> <br />
Botnet iplist: <br />
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/ipset-blacklist.txt <br />
Iptable rules: <br />
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/iptables.up.rules <br />
#Jenkins setup:
https://raw.githubusercontent.com/antonchernik/lnmp-debian/master/jenkins.sh <br />
|
8233abab6084db39df064b87d256fd0caffecb89 | simpy/test/test_simulation.py | simpy/test/test_simulation.py | from simpy import Simulation, InterruptedException
def test_simple_process():
def pem(ctx, result):
while True:
result.append(ctx.now)
yield ctx.wait(1)
result = []
Simulation(pem, result).simulate(until=4)
assert result == [0, 1, 2, 3]
def test_interrupt():
def pem(ctx):
try:
yield ctx.wait(10)
raise RuntimeError('Expected an interrupt')
except InterruptedException:
pass
def root(ctx):
process = ctx.fork(pem)
yield ctx.wait(5)
process.interrupt()
Simulation(root).simulate(until=20)
def test_wait_for_process():
def pem(ctx):
yield ctx.wait(10)
def root(ctx):
yield ctx.wait(ctx.fork(pem))
assert ctx.now == 10
Simulation(root).simulate(until=20)
def test_process_result():
def pem(ctx):
yield ctx.wait(10)
ctx.exit('oh noes, i am dead x_x')
def root(ctx):
result = yield ctx.wait(ctx.fork(pem))
assert result == 'oh noes, i am dead x_x'
Simulation(root).simulate(until=20)
| from simpy import Simulation, InterruptedException
def test_simple_process():
def pem(ctx, result):
while True:
result.append(ctx.now)
yield ctx.wait(1)
result = []
Simulation(pem, result).simulate(until=4)
assert result == [0, 1, 2, 3]
def test_interrupt():
def root(ctx):
def pem(ctx):
try:
yield ctx.wait(10)
raise RuntimeError('Expected an interrupt')
except InterruptedException:
pass
process = ctx.fork(pem)
yield ctx.wait(5)
process.interrupt()
Simulation(root).simulate(until=20)
def test_wait_for_process():
def root(ctx):
def pem(ctx):
yield ctx.wait(10)
yield ctx.wait(ctx.fork(pem))
assert ctx.now == 10
Simulation(root).simulate(until=20)
def test_process_result():
def root(ctx):
def pem(ctx):
yield ctx.wait(10)
ctx.exit('oh noes, i am dead x_x')
result = yield ctx.wait(ctx.fork(pem))
assert result == 'oh noes, i am dead x_x'
Simulation(root).simulate(until=20)
| Define subprocesses in the context of the root process. Maybe this is more readable? | Define subprocesses in the context of the root process. Maybe this is more readable?
| Python | mit | Uzere/uSim | python | ## Code Before:
from simpy import Simulation, InterruptedException
def test_simple_process():
def pem(ctx, result):
while True:
result.append(ctx.now)
yield ctx.wait(1)
result = []
Simulation(pem, result).simulate(until=4)
assert result == [0, 1, 2, 3]
def test_interrupt():
def pem(ctx):
try:
yield ctx.wait(10)
raise RuntimeError('Expected an interrupt')
except InterruptedException:
pass
def root(ctx):
process = ctx.fork(pem)
yield ctx.wait(5)
process.interrupt()
Simulation(root).simulate(until=20)
def test_wait_for_process():
def pem(ctx):
yield ctx.wait(10)
def root(ctx):
yield ctx.wait(ctx.fork(pem))
assert ctx.now == 10
Simulation(root).simulate(until=20)
def test_process_result():
def pem(ctx):
yield ctx.wait(10)
ctx.exit('oh noes, i am dead x_x')
def root(ctx):
result = yield ctx.wait(ctx.fork(pem))
assert result == 'oh noes, i am dead x_x'
Simulation(root).simulate(until=20)
## Instruction:
Define subprocesses in the context of the root process. Maybe this is more readable?
## Code After:
from simpy import Simulation, InterruptedException
def test_simple_process():
def pem(ctx, result):
while True:
result.append(ctx.now)
yield ctx.wait(1)
result = []
Simulation(pem, result).simulate(until=4)
assert result == [0, 1, 2, 3]
def test_interrupt():
def root(ctx):
def pem(ctx):
try:
yield ctx.wait(10)
raise RuntimeError('Expected an interrupt')
except InterruptedException:
pass
process = ctx.fork(pem)
yield ctx.wait(5)
process.interrupt()
Simulation(root).simulate(until=20)
def test_wait_for_process():
def root(ctx):
def pem(ctx):
yield ctx.wait(10)
yield ctx.wait(ctx.fork(pem))
assert ctx.now == 10
Simulation(root).simulate(until=20)
def test_process_result():
def root(ctx):
def pem(ctx):
yield ctx.wait(10)
ctx.exit('oh noes, i am dead x_x')
result = yield ctx.wait(ctx.fork(pem))
assert result == 'oh noes, i am dead x_x'
Simulation(root).simulate(until=20)
|
df264c490f8600c5047db328c9388c1d07d4cbd5 | setup.py | setup.py | import distutils.core
# Uploading to PyPI
# =================
# $ python setup.py register -r pypi
# $ python setup.py sdist upload -r pypi
version = '0.0'
distutils.core.setup(
name='vecrec',
version=version,
author='Kale Kundert and Alex Mitchell',
packages=['vecrec'],
url='https://github.com/kxgames/vecrec',
download_url='https://github.com/kxgames/vecrec/tarball/'+version,
license='LICENSE.txt',
description="A 2D vector and rectangle library.",
long_description=open('README.rst').read(),
keywords=['2D', 'vector', 'rectangle', 'library'])
| import distutils.core
# Uploading to PyPI
# =================
# $ python setup.py register -r pypi
# $ python setup.py sdist upload -r pypi
version = '0.0'
distutils.core.setup(
name='vecrec',
version=version,
author='Kale Kundert and Alex Mitchell',
url='https://github.com/kxgames/vecrec',
download_url='https://github.com/kxgames/vecrec/tarball/'+version,
license='LICENSE.txt',
description="A 2D vector and rectangle library.",
long_description=open('README.rst').read(),
keywords=['2D', 'vector', 'rectangle', 'library'],
packages=['vecrec'],
requires=['finalexam', 'coverage'],
)
| Add finalexam and coverage as dependencies. | Add finalexam and coverage as dependencies.
| Python | mit | kxgames/vecrec,kxgames/vecrec | python | ## Code Before:
import distutils.core
# Uploading to PyPI
# =================
# $ python setup.py register -r pypi
# $ python setup.py sdist upload -r pypi
version = '0.0'
distutils.core.setup(
name='vecrec',
version=version,
author='Kale Kundert and Alex Mitchell',
packages=['vecrec'],
url='https://github.com/kxgames/vecrec',
download_url='https://github.com/kxgames/vecrec/tarball/'+version,
license='LICENSE.txt',
description="A 2D vector and rectangle library.",
long_description=open('README.rst').read(),
keywords=['2D', 'vector', 'rectangle', 'library'])
## Instruction:
Add finalexam and coverage as dependencies.
## Code After:
import distutils.core
# Uploading to PyPI
# =================
# $ python setup.py register -r pypi
# $ python setup.py sdist upload -r pypi
version = '0.0'
distutils.core.setup(
name='vecrec',
version=version,
author='Kale Kundert and Alex Mitchell',
url='https://github.com/kxgames/vecrec',
download_url='https://github.com/kxgames/vecrec/tarball/'+version,
license='LICENSE.txt',
description="A 2D vector and rectangle library.",
long_description=open('README.rst').read(),
keywords=['2D', 'vector', 'rectangle', 'library'],
packages=['vecrec'],
requires=['finalexam', 'coverage'],
)
|
1c8f4060c48c394c16fd4a54128ec18549a125f3 | binary-string.js | binary-string.js | // Returns binary string of given decimal number
function decimalToBinary(num) {
if (num >= 1) {
if (num % 2) { // if decimal number is not divisible by 2, then recursively return proceeding binary of the digit minus 1, and then add 1 for the leftover 1 digit
return decimalToBinary((num - 1)/2) + 1;
}
}
}
| // Returns binary string of given decimal number
function decimalToBinary(num) {
if (num >= 1) {
if (num % 2) { // if decimal number is not divisible by 2, then recursively return proceeding binary of the digit minus 1, and then add 1 for the leftover 1 digit
return decimalToBinary((num - 1)/2) + 1;
} else {
return decimalToBinary(num/2) + 0; // recursively return proceeding binary digits
}
}
}
| Write what to do if the decimal number we want to return the binary string of is greater than or equal to 1 | Write what to do if the decimal number we want to return the binary string of is greater than or equal to 1
| JavaScript | mit | derekmpham/interview-prep,derekmpham/interview-prep | javascript | ## Code Before:
// Returns binary string of given decimal number
function decimalToBinary(num) {
if (num >= 1) {
if (num % 2) { // if decimal number is not divisible by 2, then recursively return proceeding binary of the digit minus 1, and then add 1 for the leftover 1 digit
return decimalToBinary((num - 1)/2) + 1;
}
}
}
## Instruction:
Write what to do if the decimal number we want to return the binary string of is greater than or equal to 1
## Code After:
// Returns binary string of given decimal number
function decimalToBinary(num) {
if (num >= 1) {
if (num % 2) { // if decimal number is not divisible by 2, then recursively return proceeding binary of the digit minus 1, and then add 1 for the leftover 1 digit
return decimalToBinary((num - 1)/2) + 1;
} else {
return decimalToBinary(num/2) + 0; // recursively return proceeding binary digits
}
}
}
|
c83dbde61b7803933aa819e10068717738c96e2d | lib/dry/transaction/step.rb | lib/dry/transaction/step.rb | require "wisper"
require "dry/transaction/step_failure"
module Dry
module Transaction
# @api private
class Step
include Wisper::Publisher
include Dry::Monads::Either::Mixin
attr_reader :step_adapter
attr_reader :step_name
attr_reader :operation_name
attr_reader :operation
attr_reader :options
attr_reader :call_args
def initialize(step_adapter, step_name, operation_name, operation, options, call_args = [])
@step_adapter = step_adapter
@step_name = step_name
@operation_name = operation_name
@operation = operation
@options = options
@call_args = call_args
end
def with_call_args(*call_args)
self.class.new(step_adapter, step_name, operation_name, operation, options, call_args)
end
def call(input)
args = call_args + [input]
result = step_adapter.call(self, *args)
result.fmap { |value|
broadcast :"#{step_name}_success", value
value
}.or { |value|
broadcast :"#{step_name}_failure", *args, value
Left(StepFailure.new(step_name, value))
}
end
def arity
operation.is_a?(Proc) ? operation.arity : operation.method(:call).arity
end
end
end
end
| require "dry/monads/either"
require "wisper"
require "dry/transaction/step_failure"
module Dry
module Transaction
# @api private
class Step
include Wisper::Publisher
include Dry::Monads::Either::Mixin
attr_reader :step_adapter
attr_reader :step_name
attr_reader :operation_name
attr_reader :operation
attr_reader :options
attr_reader :call_args
def initialize(step_adapter, step_name, operation_name, operation, options, call_args = [])
@step_adapter = step_adapter
@step_name = step_name
@operation_name = operation_name
@operation = operation
@options = options
@call_args = call_args
end
def with_call_args(*call_args)
self.class.new(step_adapter, step_name, operation_name, operation, options, call_args)
end
def call(input)
args = call_args + [input]
result = step_adapter.call(self, *args)
result.fmap { |value|
broadcast :"#{step_name}_success", value
value
}.or { |value|
broadcast :"#{step_name}_failure", *args, value
Left(StepFailure.new(step_name, value))
}
end
def arity
operation.is_a?(Proc) ? operation.arity : operation.method(:call).arity
end
end
end
end
| Add missing require for dry-monads either | Add missing require for dry-monads either
| Ruby | mit | icelab/call_sheet | ruby | ## Code Before:
require "wisper"
require "dry/transaction/step_failure"
module Dry
module Transaction
# @api private
class Step
include Wisper::Publisher
include Dry::Monads::Either::Mixin
attr_reader :step_adapter
attr_reader :step_name
attr_reader :operation_name
attr_reader :operation
attr_reader :options
attr_reader :call_args
def initialize(step_adapter, step_name, operation_name, operation, options, call_args = [])
@step_adapter = step_adapter
@step_name = step_name
@operation_name = operation_name
@operation = operation
@options = options
@call_args = call_args
end
def with_call_args(*call_args)
self.class.new(step_adapter, step_name, operation_name, operation, options, call_args)
end
def call(input)
args = call_args + [input]
result = step_adapter.call(self, *args)
result.fmap { |value|
broadcast :"#{step_name}_success", value
value
}.or { |value|
broadcast :"#{step_name}_failure", *args, value
Left(StepFailure.new(step_name, value))
}
end
def arity
operation.is_a?(Proc) ? operation.arity : operation.method(:call).arity
end
end
end
end
## Instruction:
Add missing require for dry-monads either
## Code After:
require "dry/monads/either"
require "wisper"
require "dry/transaction/step_failure"
module Dry
module Transaction
# @api private
class Step
include Wisper::Publisher
include Dry::Monads::Either::Mixin
attr_reader :step_adapter
attr_reader :step_name
attr_reader :operation_name
attr_reader :operation
attr_reader :options
attr_reader :call_args
def initialize(step_adapter, step_name, operation_name, operation, options, call_args = [])
@step_adapter = step_adapter
@step_name = step_name
@operation_name = operation_name
@operation = operation
@options = options
@call_args = call_args
end
def with_call_args(*call_args)
self.class.new(step_adapter, step_name, operation_name, operation, options, call_args)
end
def call(input)
args = call_args + [input]
result = step_adapter.call(self, *args)
result.fmap { |value|
broadcast :"#{step_name}_success", value
value
}.or { |value|
broadcast :"#{step_name}_failure", *args, value
Left(StepFailure.new(step_name, value))
}
end
def arity
operation.is_a?(Proc) ? operation.arity : operation.method(:call).arity
end
end
end
end
|
bf7da73bfd6f44c93a4f25b8b818c57b7b05396a | recipes/modutils/modutils-cross_2.4.27.bb | recipes/modutils/modutils-cross_2.4.27.bb | SECTION = "base"
require modutils_${PV}.bb
PR = "r9"
inherit cross
S = "${WORKDIR}/modutils-${PV}"
DEPENDS = ""
PACKAGES = ""
PROVIDES += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}depmod-2.4"
DEFAULT_PREFERENCE = "1"
SRC_URI += "file://modutils-cross/module.h.diff"
sbindir = "${prefix}/bin"
EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"
CFLAGS_prepend_mipsel = "-D__MIPSEL__"
CFLAGS_prepend_mipseb = "-D__MIPSEB__"
do_stage () {
oe_runmake install
mv ${bindir}/${TARGET_PREFIX}depmod ${bindir}/${TARGET_PREFIX}depmod-2.4
}
do_install () {
:
}
SRC_URI[md5sum] = "bac989c74ed10f3bf86177fc5b4b89b6"
SRC_URI[sha256sum] = "ab4c9191645f9ffb455ae7c014d8c45339c13a1d0f6914817cfbf30a0bc56bf0"
| SECTION = "base"
require modutils_${PV}.bb
PR = "r9"
inherit cross
S = "${WORKDIR}/modutils-${PV}"
DEPENDS = ""
PACKAGES = ""
PROVIDES += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}depmod-2.4"
DEFAULT_PREFERENCE = "1"
SRC_URI += "file://modutils-cross/module.h.diff"
sbindir = "${prefix}/bin"
EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"
CFLAGS_prepend_mipsel = "-D__MIPSEL__"
CFLAGS_prepend_mipseb = "-D__MIPSEB__"
do_install_append () {
mv ${D}${bindir}/${TARGET_PREFIX}depmod ${D}${bindir}/${TARGET_PREFIX}depmod-2.4
}
SRC_URI[md5sum] = "bac989c74ed10f3bf86177fc5b4b89b6"
SRC_URI[sha256sum] = "ab4c9191645f9ffb455ae7c014d8c45339c13a1d0f6914817cfbf30a0bc56bf0"
| Convert do_stage to do_install (from Poky) | modutils-cross: Convert do_stage to do_install (from Poky)
Signed-off-by: Richard Purdie <a03894c799ea916bd571ce8f12ed88f6fb3400f7@linux.intel.com>
Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>
| BitBake | mit | sampov2/audio-openembedded,sledz/oe,sledz/oe,JamesAng/goe,yyli/overo-oe,buglabs/oe-buglabs,sutajiokousagi/openembedded,JamesAng/oe,openembedded/openembedded,scottellis/overo-oe,sledz/oe,xifengchuo/openembedded,anguslees/openembedded-android,nx111/openembeded_openpli2.1_nx111,openembedded/openembedded,libo/openembedded,sentient-energy/emsw-oe-mirror,John-NY/overo-oe,giobauermeister/openembedded,sutajiokousagi/openembedded,buglabs/oe-buglabs,trini/openembedded,dave-billin/overo-ui-moos-auv,sledz/oe,openpli-arm/openembedded,anguslees/openembedded-android,John-NY/overo-oe,xifengchuo/openembedded,BlackPole/bp-openembedded,trini/openembedded,sutajiokousagi/openembedded,JamesAng/goe,thebohemian/openembedded,JamesAng/oe,Martix/Eonos,giobauermeister/openembedded,sutajiokousagi/openembedded,xifengchuo/openembedded,dave-billin/overo-ui-moos-auv,thebohemian/openembedded,yyli/overo-oe,sledz/oe,giobauermeister/openembedded,trini/openembedded,sutajiokousagi/openembedded,sentient-energy/emsw-oe-mirror,openpli-arm/openembedded,trini/openembedded,JamesAng/oe,SIFTeam/openembedded,anguslees/openembedded-android,dave-billin/overo-ui-moos-auv,mrchapp/arago-oe-dev,libo/openembedded,nx111/openembeded_openpli2.1_nx111,hulifox008/openembedded,thebohemian/openembedded,Martix/Eonos,openembedded/openembedded,SIFTeam/openembedded,John-NY/overo-oe,BlackPole/bp-openembedded,dellysunnymtech/sakoman-oe,yyli/overo-oe,mrchapp/arago-oe-dev,openpli-arm/openembedded,SIFTeam/openembedded,libo/openembedded,dave-billin/overo-ui-moos-auv,BlackPole/bp-openembedded,SIFTeam/openembedded,nx111/openembeded_openpli2.1_nx111,nx111/openembeded_openpli2.1_nx111,SIFTeam/openembedded,giobauermeister/openembedded,dave-billin/overo-ui-moos-auv,rascalmicro/openembedded-rascal,buglabs/oe-buglabs,hulifox008/openembedded,openembedded/openembedded,JamesAng/goe,dave-billin/overo-ui-moos-auv,rascalmicro/openembedded-rascal,buglabs/oe-buglabs,openembedded/openembedded,rascalmicro/openembedded-rascal,Martix/Eonos,sentient-energy/emsw-oe-mirror,scottellis/overo-oe,thebohemian/openembedded,thebohemian/openembedded,openembedded/openembedded,yyli/overo-oe,dellysunnymtech/sakoman-oe,nx111/openembeded_openpli2.1_nx111,John-NY/overo-oe,thebohemian/openembedded,openembedded/openembedded,hulifox008/openembedded,John-NY/overo-oe,nx111/openembeded_openpli2.1_nx111,sentient-energy/emsw-oe-mirror,openpli-arm/openembedded,John-NY/overo-oe,yyli/overo-oe,yyli/overo-oe,mrchapp/arago-oe-dev,anguslees/openembedded-android,buglabs/oe-buglabs,rascalmicro/openembedded-rascal,JamesAng/oe,libo/openembedded,rascalmicro/openembedded-rascal,xifengchuo/openembedded,sampov2/audio-openembedded,nx111/openembeded_openpli2.1_nx111,Martix/Eonos,mrchapp/arago-oe-dev,anguslees/openembedded-android,sledz/oe,mrchapp/arago-oe-dev,scottellis/overo-oe,openpli-arm/openembedded,libo/openembedded,BlackPole/bp-openembedded,yyli/overo-oe,hulifox008/openembedded,scottellis/overo-oe,openpli-arm/openembedded,scottellis/overo-oe,giobauermeister/openembedded,sampov2/audio-openembedded,dave-billin/overo-ui-moos-auv,anguslees/openembedded-android,SIFTeam/openembedded,rascalmicro/openembedded-rascal,BlackPole/bp-openembedded,Martix/Eonos,giobauermeister/openembedded,sentient-energy/emsw-oe-mirror,Martix/Eonos,dellysunnymtech/sakoman-oe,giobauermeister/openembedded,sledz/oe,nx111/openembeded_openpli2.1_nx111,JamesAng/oe,xifengchuo/openembedded,dellysunnymtech/sakoman-oe,JamesAng/goe,trini/openembedded,JamesAng/goe,anguslees/openembedded-android,libo/openembedded,sentient-energy/emsw-oe-mirror,buglabs/oe-buglabs,sutajiokousagi/openembedded,dellysunnymtech/sakoman-oe,libo/openembedded,dellysunnymtech/sakoman-oe,dellysunnymtech/sakoman-oe,openembedded/openembedded,JamesAng/goe,trini/openembedded,openpli-arm/openembedded,rascalmicro/openembedded-rascal,xifengchuo/openembedded,openembedded/openembedded,buglabs/oe-buglabs,scottellis/overo-oe,hulifox008/openembedded,openembedded/openembedded,xifengchuo/openembedded,sampov2/audio-openembedded,hulifox008/openembedded,xifengchuo/openembedded,yyli/overo-oe,xifengchuo/openembedded,hulifox008/openembedded,mrchapp/arago-oe-dev,rascalmicro/openembedded-rascal,giobauermeister/openembedded,trini/openembedded,dellysunnymtech/sakoman-oe,sampov2/audio-openembedded,sampov2/audio-openembedded,mrchapp/arago-oe-dev,thebohemian/openembedded,openembedded/openembedded,BlackPole/bp-openembedded,sutajiokousagi/openembedded,JamesAng/oe,Martix/Eonos,giobauermeister/openembedded,JamesAng/oe,SIFTeam/openembedded,scottellis/overo-oe,sentient-energy/emsw-oe-mirror,JamesAng/goe,BlackPole/bp-openembedded,sampov2/audio-openembedded,dellysunnymtech/sakoman-oe,John-NY/overo-oe,buglabs/oe-buglabs | bitbake | ## Code Before:
SECTION = "base"
require modutils_${PV}.bb
PR = "r9"
inherit cross
S = "${WORKDIR}/modutils-${PV}"
DEPENDS = ""
PACKAGES = ""
PROVIDES += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}depmod-2.4"
DEFAULT_PREFERENCE = "1"
SRC_URI += "file://modutils-cross/module.h.diff"
sbindir = "${prefix}/bin"
EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"
CFLAGS_prepend_mipsel = "-D__MIPSEL__"
CFLAGS_prepend_mipseb = "-D__MIPSEB__"
do_stage () {
oe_runmake install
mv ${bindir}/${TARGET_PREFIX}depmod ${bindir}/${TARGET_PREFIX}depmod-2.4
}
do_install () {
:
}
SRC_URI[md5sum] = "bac989c74ed10f3bf86177fc5b4b89b6"
SRC_URI[sha256sum] = "ab4c9191645f9ffb455ae7c014d8c45339c13a1d0f6914817cfbf30a0bc56bf0"
## Instruction:
modutils-cross: Convert do_stage to do_install (from Poky)
Signed-off-by: Richard Purdie <a03894c799ea916bd571ce8f12ed88f6fb3400f7@linux.intel.com>
Signed-off-by: Khem Raj <729d64b6f67515e258459a5f6d20ec88b2caf8df@gmail.com>
## Code After:
SECTION = "base"
require modutils_${PV}.bb
PR = "r9"
inherit cross
S = "${WORKDIR}/modutils-${PV}"
DEPENDS = ""
PACKAGES = ""
PROVIDES += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}depmod-2.4"
DEFAULT_PREFERENCE = "1"
SRC_URI += "file://modutils-cross/module.h.diff"
sbindir = "${prefix}/bin"
EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"
CFLAGS_prepend_mipsel = "-D__MIPSEL__"
CFLAGS_prepend_mipseb = "-D__MIPSEB__"
do_install_append () {
mv ${D}${bindir}/${TARGET_PREFIX}depmod ${D}${bindir}/${TARGET_PREFIX}depmod-2.4
}
SRC_URI[md5sum] = "bac989c74ed10f3bf86177fc5b4b89b6"
SRC_URI[sha256sum] = "ab4c9191645f9ffb455ae7c014d8c45339c13a1d0f6914817cfbf30a0bc56bf0"
|
b4cacf5ed3e4bd98a693cddb2ba48674add19cb6 | website/static/website/js/app.js | website/static/website/js/app.js | import React from "react";
import { Chance }from "chance";
import WriteMessage from "./components/WriteMessage";
import Messages from "./components/Messages";
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = { user: chance.name(), messages: [] }
}
componentDidMount() {
var ws_scheme = window.location.protocol == "https:" ? "wss" : "ws";
this.chatsock = new ReconnectingWebSocket(ws_scheme + '://' + window.location.host + "/chat" + window.location.pathname);
this.chatsock.onmessage = (message) => {
console.log(message);
let messages = this.state.messages.slice();
messages.push(JSON.parse(message.data));
this.setState({messages: messages})
};
}
sendMessage(msg) {
const payload = {
handle: this.state.user,
message: msg
};
this.chatsock.send(JSON.stringify(payload));
}
render() {
return (
<div>
<h1>M O O N Y</h1>
<Messages
messages={this.state.messages}
/>
<WriteMessage
sendMessage={this.sendMessage.bind(this)}
/>
</div>
)
}
} | import React from "react";
import { Chance }from "chance";
import WriteMessage from "./components/WriteMessage";
import Messages from "./components/Messages";
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = { user: chance.name(), messages: [], connected: false }
}
componentDidMount() {
var ws_scheme = window.location.protocol == "https:" ? "wss" : "ws";
this.chatsock = new ReconnectingWebSocket(ws_scheme + '://' + window.location.host + "/chat" + window.location.pathname);
this.chatsock.onopen = event => {
this.setState({
connected: true
})
console.log(this.chatsock);
};
this.chatsock.onclose = event => {
this.setState({
connected: false
})
};
this.chatsock.onmessage = (message) => {
console.log(message);
let messages = this.state.messages.slice();
messages.push(JSON.parse(message.data));
this.setState({messages: messages})
};
}
sendMessage(msg) {
const payload = {
handle: this.state.user,
message: msg
};
this.chatsock.send(JSON.stringify(payload));
}
render() {
return (
<div>
<h1>M O O N Y (<span>{this.state.connected ? 'connected' : 'disconnected'}</span>)</h1>
<Messages
messages={this.state.messages}
/>
<WriteMessage
sendMessage={this.sendMessage.bind(this)}
/>
</div>
)
}
} | Put a connected visual help | Put a connected visual help
| JavaScript | mit | Frky/moon,Frky/moon,Frky/moon,Frky/moon,Frky/moon | javascript | ## Code Before:
import React from "react";
import { Chance }from "chance";
import WriteMessage from "./components/WriteMessage";
import Messages from "./components/Messages";
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = { user: chance.name(), messages: [] }
}
componentDidMount() {
var ws_scheme = window.location.protocol == "https:" ? "wss" : "ws";
this.chatsock = new ReconnectingWebSocket(ws_scheme + '://' + window.location.host + "/chat" + window.location.pathname);
this.chatsock.onmessage = (message) => {
console.log(message);
let messages = this.state.messages.slice();
messages.push(JSON.parse(message.data));
this.setState({messages: messages})
};
}
sendMessage(msg) {
const payload = {
handle: this.state.user,
message: msg
};
this.chatsock.send(JSON.stringify(payload));
}
render() {
return (
<div>
<h1>M O O N Y</h1>
<Messages
messages={this.state.messages}
/>
<WriteMessage
sendMessage={this.sendMessage.bind(this)}
/>
</div>
)
}
}
## Instruction:
Put a connected visual help
## Code After:
import React from "react";
import { Chance }from "chance";
import WriteMessage from "./components/WriteMessage";
import Messages from "./components/Messages";
export default class App extends React.Component {
constructor(props) {
super(props);
this.state = { user: chance.name(), messages: [], connected: false }
}
componentDidMount() {
var ws_scheme = window.location.protocol == "https:" ? "wss" : "ws";
this.chatsock = new ReconnectingWebSocket(ws_scheme + '://' + window.location.host + "/chat" + window.location.pathname);
this.chatsock.onopen = event => {
this.setState({
connected: true
})
console.log(this.chatsock);
};
this.chatsock.onclose = event => {
this.setState({
connected: false
})
};
this.chatsock.onmessage = (message) => {
console.log(message);
let messages = this.state.messages.slice();
messages.push(JSON.parse(message.data));
this.setState({messages: messages})
};
}
sendMessage(msg) {
const payload = {
handle: this.state.user,
message: msg
};
this.chatsock.send(JSON.stringify(payload));
}
render() {
return (
<div>
<h1>M O O N Y (<span>{this.state.connected ? 'connected' : 'disconnected'}</span>)</h1>
<Messages
messages={this.state.messages}
/>
<WriteMessage
sendMessage={this.sendMessage.bind(this)}
/>
</div>
)
}
} |
80ff95d64d4e26c1f22ac0c03f530ece96b753b0 | api/spec/support/controller_hacks.rb | api/spec/support/controller_hacks.rb | require 'active_support/all'
module ControllerHacks
def api_get(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "GET")
end
def api_post(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "POST")
end
def api_put(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "PUT")
end
def api_delete(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "DELETE")
end
def api_process(action, params={}, session=nil, flash=nil, method="get")
process(action, params.reverse_merge!(:use_route => :spree, :format => :json), session, { :foo => "bar" }, method)
end
end
RSpec.configure do |config|
config.include ControllerHacks, :type => :controller
end
| require 'active_support/all'
module ControllerHacks
def api_get(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "GET")
end
def api_post(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "POST")
end
def api_put(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "PUT")
end
def api_delete(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "DELETE")
end
def api_process(action, params={}, session=nil, flash=nil, method="get")
scoping = respond_to?(:resource_scoping) ? resource_scoping : {}
process(action, params.merge(scoping).reverse_merge!(:use_route => :spree, :format => :json), session, { :foo => "bar" }, method)
end
end
RSpec.configure do |config|
config.include ControllerHacks, :type => :controller
end
| Allow scoping of requests in tests by definition of a resource_scoping method (i.e. a let) in the API tests | Allow scoping of requests in tests by definition of a resource_scoping method (i.e. a let) in the API tests
| Ruby | bsd-3-clause | NerdsvilleCEO/spree,moneyspyder/spree,pervino/spree,caiqinghua/spree,wolfieorama/spree,rakibulislam/spree,fahidnasir/spree,Kagetsuki/spree,Hawaiideveloper/shoppingcart,surfdome/spree,sfcgeorge/spree,Ropeney/spree,sunny2601/spree,CiscoCloud/spree,useiichi/spree,mleglise/spree,lsirivong/solidus,forkata/solidus,DarkoP/spree,sliaquat/spree,Engeltj/spree,groundctrl/spree,grzlus/spree,degica/spree,calvinl/spree,zamiang/spree,sunny2601/spree,Arpsara/solidus,FadliKun/spree,sunny2601/spree,SadTreeFriends/spree,builtbybuffalo/spree,robodisco/spree,maybii/spree,LBRapid/spree,sfcgeorge/spree,jparr/spree,tesserakt/clean_spree,kitwalker12/spree,patdec/spree,omarsar/spree,vulk/spree,xuewenfei/solidus,lsirivong/solidus,berkes/spree,tomash/spree,grzlus/solidus,athal7/solidus,karlitxo/spree,yiqing95/spree,Senjai/solidus,quentinuys/spree,TimurTarasenko/spree,pjmj777/spree,scottcrawford03/solidus,Engeltj/spree,adaddeo/spree,agient/agientstorefront,Nevensoft/spree,Arpsara/solidus,freerunningtech/spree,Hawaiideveloper/shoppingcart,rbngzlv/spree,piousbox/spree,FadliKun/spree,alepore/spree,woboinc/spree,vulk/spree,vmatekole/spree,DarkoP/spree,cutefrank/spree,Senjai/spree,welitonfreitas/spree,shioyama/spree,vinsol/spree,jimblesm/spree,lzcabrera/spree-1-3-stable,locomotivapro/spree,brchristian/spree,caiqinghua/spree,bonobos/solidus,Arpsara/solidus,orenf/spree,DynamoMTL/spree,softr8/spree,assembledbrands/spree,ramkumar-kr/spree,devilcoders/solidus,adaddeo/spree,pervino/spree,gregoryrikson/spree-sample,ayb/spree,yiqing95/spree,tancnle/spree,kitwalker12/spree,DarkoP/spree,thogg4/spree,Senjai/solidus,watg/spree,zamiang/spree,jasonfb/spree,jsurdilla/solidus,alejandromangione/spree,Kagetsuki/spree,tesserakt/clean_spree,ramkumar-kr/spree,xuewenfei/solidus,zamiang/spree,lyzxsc/spree,welitonfreitas/spree,grzlus/spree,HealthWave/spree,shaywood2/spree,scottcrawford03/solidus,surfdome/spree,richardnuno/solidus,alvinjean/spree,gautamsawhney/spree,alepore/spree,tomash/spree,TimurTarasenko/spree,Antdesk/karpal-spree,degica/spree,pervino/solidus,alvinjean/spree,forkata/solidus,azclick/spree,hifly/spree,brchristian/spree,hoanghiep90/spree,lsirivong/spree,StemboltHQ/spree,njerrywerry/spree,richardnuno/solidus,progsri/spree,NerdsvilleCEO/spree,carlesjove/spree,biagidp/spree,kewaunited/spree,urimikhli/spree,caiqinghua/spree,Kagetsuki/spree,shekibobo/spree,CiscoCloud/spree,Mayvenn/spree,scottcrawford03/solidus,jhawthorn/spree,jparr/spree,gregoryrikson/spree-sample,jordan-brough/solidus,madetech/spree,jspizziri/spree,zaeznet/spree,JuandGirald/spree,keatonrow/spree,Arpsara/solidus,jhawthorn/spree,progsri/spree,robodisco/spree,Migweld/spree,softr8/spree,cutefrank/spree,yushine/spree,odk211/spree,lyzxsc/spree,SadTreeFriends/spree,tancnle/spree,volpejoaquin/spree,edgward/spree,groundctrl/spree,rbngzlv/spree,bonobos/solidus,pervino/solidus,piousbox/spree,ckk-scratch/solidus,forkata/solidus,CiscoCloud/spree,abhishekjain16/spree,Boomkat/spree,JDutil/spree,gautamsawhney/spree,ahmetabdi/spree,hoanghiep90/spree,quentinuys/spree,grzlus/spree,archSeer/spree,DynamoMTL/spree,Boomkat/spree,knuepwebdev/FloatTubeRodHolders,Senjai/solidus,judaro13/spree-fork,tailic/spree,derekluo/spree,KMikhaylovCTG/spree,Migweld/spree,beni55/spree,Hawaiideveloper/shoppingcart,rajeevriitm/spree,nooysters/spree,azranel/spree,siddharth28/spree,dafontaine/spree,joanblake/spree,codesavvy/sandbox,jimblesm/spree,hifly/spree,locomotivapro/spree,Hates/spree,assembledbrands/spree,robodisco/spree,edgward/spree,assembledbrands/spree,vinsol/spree,sideci-sample/sideci-sample-spree,Hawaiideveloper/shoppingcart,ckk-scratch/solidus,gregoryrikson/spree-sample,rbngzlv/spree,patdec/spree,derekluo/spree,devilcoders/solidus,athal7/solidus,delphsoft/spree-store-ballchair,mindvolt/spree,AgilTec/spree,lyzxsc/spree,Senjai/spree,orenf/spree,rakibulislam/spree,codesavvy/sandbox,zaeznet/spree,omarsar/spree,devilcoders/solidus,radarseesradar/spree,delphsoft/spree-store-ballchair,archSeer/spree,sfcgeorge/spree,net2b/spree,azclick/spree,bonobos/solidus,TrialGuides/spree,dandanwei/spree,berkes/spree,Ropeney/spree,AgilTec/spree,yiqing95/spree,agient/agientstorefront,sideci-sample/sideci-sample-spree,StemboltHQ/spree,richardnuno/solidus,devilcoders/solidus,jhawthorn/spree,KMikhaylovCTG/spree,Lostmyname/spree,lsirivong/spree,APohio/spree,nooysters/spree,ahmetabdi/spree,lsirivong/spree,caiqinghua/spree,azclick/spree,rajeevriitm/spree,vulk/spree,dafontaine/spree,jspizziri/spree,volpejoaquin/spree,woboinc/spree,vinayvinsol/spree,firman/spree,watg/spree,KMikhaylovCTG/spree,rbngzlv/spree,keatonrow/spree,quentinuys/spree,dafontaine/spree,judaro13/spree-fork,archSeer/spree,moneyspyder/spree,abhishekjain16/spree,jeffboulet/spree,tailic/spree,camelmasa/spree,volpejoaquin/spree,moneyspyder/spree,jordan-brough/spree,yushine/spree,sliaquat/spree,calvinl/spree,mindvolt/spree,raow/spree,bricesanchez/spree,priyank-gupta/spree,tesserakt/clean_spree,Antdesk/karpal-spree,wolfieorama/spree,xuewenfei/solidus,imella/spree,lsirivong/spree,priyank-gupta/spree,siddharth28/spree,jaspreet21anand/spree,omarsar/spree,madetech/spree,tomash/spree,ramkumar-kr/spree,jasonfb/spree,JDutil/spree,grzlus/solidus,tancnle/spree,NerdsvilleCEO/spree,joanblake/spree,delphsoft/spree-store-ballchair,berkes/spree,imella/spree,brchristian/spree,abhishekjain16/spree,ayb/spree,LBRapid/spree,patdec/spree,adaddeo/spree,RatioClothing/spree,bricesanchez/spree,nooysters/spree,yiqing95/spree,jeffboulet/spree,lzcabrera/spree-1-3-stable,bonobos/solidus,Senjai/spree,miyazawatomoka/spree,trigrass2/spree,Lostmyname/spree,LBRapid/spree,project-eutopia/spree,SadTreeFriends/spree,RatioClothing/spree,mleglise/spree,thogg4/spree,degica/spree,Mayvenn/spree,jparr/spree,vmatekole/spree,siddharth28/spree,APohio/spree,TrialGuides/spree,rajeevriitm/spree,builtbybuffalo/spree,gautamsawhney/spree,NerdsvilleCEO/spree,orenf/spree,maybii/spree,edgward/spree,beni55/spree,sfcgeorge/spree,athal7/solidus,bjornlinder/Spree,miyazawatomoka/spree,project-eutopia/spree,Machpowersystems/spree_mach,CJMrozek/spree,vinsol/spree,builtbybuffalo/spree,pervino/solidus,shaywood2/spree,sliaquat/spree,sideci-sample/sideci-sample-spree,ujai/spree,brchristian/spree,bjornlinder/Spree,rakibulislam/spree,ahmetabdi/spree,camelmasa/spree,jeffboulet/spree,RatioClothing/spree,alepore/spree,JuandGirald/spree,adaddeo/spree,yushine/spree,shaywood2/spree,madetech/spree,odk211/spree,useiichi/spree,Boomkat/spree,judaro13/spree-fork,firman/spree,mindvolt/spree,tailic/spree,maybii/spree,DynamoMTL/spree,gregoryrikson/spree-sample,moneyspyder/spree,Lostmyname/spree,HealthWave/spree,ujai/spree,njerrywerry/spree,ayb/spree,vcavallo/spree,Hates/spree,codesavvy/sandbox,carlesjove/spree,builtbybuffalo/spree,njerrywerry/spree,alejandromangione/spree,vcavallo/spree,jaspreet21anand/spree,Hates/spree,firman/spree,KMikhaylovCTG/spree,PhoenixTeam/spree_phoenix,zamiang/spree,dotandbo/spree,reinaris/spree,agient/agientstorefront,vcavallo/spree,lsirivong/solidus,ahmetabdi/spree,rakibulislam/spree,CiscoCloud/spree,urimikhli/spree,karlitxo/spree,thogg4/spree,vinsol/spree,FadliKun/spree,azranel/spree,useiichi/spree,Nevensoft/spree,shioyama/spree,pervino/solidus,siddharth28/spree,StemboltHQ/spree,priyank-gupta/spree,Kagetsuki/spree,vinayvinsol/spree,jsurdilla/solidus,sunny2601/spree,FadliKun/spree,pervino/spree,Migweld/spree,forkata/solidus,mleglise/spree,thogg4/spree,jaspreet21anand/spree,vcavallo/spree,PhoenixTeam/spree_phoenix,jparr/spree,reidblomquist/spree,Engeltj/spree,Migweld/spree,jordan-brough/solidus,hoanghiep90/spree,SadTreeFriends/spree,lyzxsc/spree,Ropeney/spree,knuepwebdev/FloatTubeRodHolders,shekibobo/spree,Ropeney/spree,locomotivapro/spree,progsri/spree,Mayvenn/spree,derekluo/spree,TrialGuides/spree,nooysters/spree,shioyama/spree,dandanwei/spree,archSeer/spree,wolfieorama/spree,welitonfreitas/spree,pjmj777/spree,Lostmyname/spree,jsurdilla/solidus,dafontaine/spree,camelmasa/spree,azranel/spree,zaeznet/spree,surfdome/spree,tesserakt/clean_spree,trigrass2/spree,fahidnasir/spree,bjornlinder/Spree,vmatekole/spree,PhoenixTeam/spree_phoenix,orenf/spree,reidblomquist/spree,CJMrozek/spree,edgward/spree,HealthWave/spree,AgilTec/spree,robodisco/spree,yomishra/pce,keatonrow/spree,jordan-brough/spree,jasonfb/spree,jimblesm/spree,piousbox/spree,alejandromangione/spree,radarseesradar/spree,pulkit21/spree,codesavvy/sandbox,JDutil/spree,surfdome/spree,raow/spree,radarseesradar/spree,hoanghiep90/spree,dandanwei/spree,pulkit21/spree,imella/spree,alvinjean/spree,net2b/spree,shekibobo/spree,patdec/spree,firman/spree,jspizziri/spree,groundctrl/spree,Hates/spree,grzlus/solidus,camelmasa/spree,ujai/spree,reinaris/spree,lsirivong/solidus,TrialGuides/spree,welitonfreitas/spree,mleglise/spree,reinaris/spree,alvinjean/spree,dotandbo/spree,derekluo/spree,shekibobo/spree,biagidp/spree,jsurdilla/solidus,delphsoft/spree-store-ballchair,DynamoMTL/spree,kewaunited/spree,shaywood2/spree,yomishra/pce,Engeltj/spree,Senjai/solidus,volpejoaquin/spree,alejandromangione/spree,cutefrank/spree,project-eutopia/spree,dotandbo/spree,vmatekole/spree,useiichi/spree,PhoenixTeam/spree_phoenix,trigrass2/spree,karlitxo/spree,softr8/spree,APohio/spree,sliaquat/spree,rajeevriitm/spree,grzlus/solidus,abhishekjain16/spree,Nevensoft/spree,reidblomquist/spree,jaspreet21anand/spree,vinayvinsol/spree,beni55/spree,jimblesm/spree,carlesjove/spree,piousbox/spree,softr8/spree,groundctrl/spree,ayb/spree,quentinuys/spree,Antdesk/karpal-spree,project-eutopia/spree,CJMrozek/spree,jspizziri/spree,scottcrawford03/solidus,priyank-gupta/spree,net2b/spree,njerrywerry/spree,mindvolt/spree,beni55/spree,jasonfb/spree,hifly/spree,reidblomquist/spree,wolfieorama/spree,locomotivapro/spree,xuewenfei/solidus,miyazawatomoka/spree,freerunningtech/spree,pulkit21/spree,JuandGirald/spree,JuandGirald/spree,knuepwebdev/FloatTubeRodHolders,karlitxo/spree,kitwalker12/spree,keatonrow/spree,vulk/spree,Machpowersystems/spree_mach,miyazawatomoka/spree,tomash/spree,odk211/spree,omarsar/spree,azclick/spree,ckk-scratch/solidus,radarseesradar/spree,CJMrozek/spree,dandanwei/spree,DarkoP/spree,vinayvinsol/spree,TimurTarasenko/spree,grzlus/spree,carlesjove/spree,agient/agientstorefront,pulkit21/spree,watg/spree,hifly/spree,joanblake/spree,berkes/spree,ckk-scratch/solidus,Nevensoft/spree,JDutil/spree,biagidp/spree,urimikhli/spree,Machpowersystems/spree_mach,raow/spree,woboinc/spree,jeffboulet/spree,lzcabrera/spree-1-3-stable,kewaunited/spree,calvinl/spree,madetech/spree,TimurTarasenko/spree,gautamsawhney/spree,ramkumar-kr/spree,zaeznet/spree,bricesanchez/spree,richardnuno/solidus,trigrass2/spree,maybii/spree,freerunningtech/spree,Boomkat/spree,net2b/spree,dotandbo/spree,AgilTec/spree,azranel/spree,pervino/spree,jordan-brough/solidus,calvinl/spree,pjmj777/spree,yomishra/pce,yushine/spree,Mayvenn/spree,kewaunited/spree,cutefrank/spree,raow/spree,fahidnasir/spree,jordan-brough/solidus,progsri/spree,tancnle/spree,reinaris/spree,jordan-brough/spree,APohio/spree,fahidnasir/spree,athal7/solidus,odk211/spree,joanblake/spree | ruby | ## Code Before:
require 'active_support/all'
module ControllerHacks
def api_get(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "GET")
end
def api_post(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "POST")
end
def api_put(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "PUT")
end
def api_delete(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "DELETE")
end
def api_process(action, params={}, session=nil, flash=nil, method="get")
process(action, params.reverse_merge!(:use_route => :spree, :format => :json), session, { :foo => "bar" }, method)
end
end
RSpec.configure do |config|
config.include ControllerHacks, :type => :controller
end
## Instruction:
Allow scoping of requests in tests by definition of a resource_scoping method (i.e. a let) in the API tests
## Code After:
require 'active_support/all'
module ControllerHacks
def api_get(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "GET")
end
def api_post(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "POST")
end
def api_put(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "PUT")
end
def api_delete(action, params={}, session=nil, flash=nil)
api_process(action, params, session, flash, "DELETE")
end
def api_process(action, params={}, session=nil, flash=nil, method="get")
scoping = respond_to?(:resource_scoping) ? resource_scoping : {}
process(action, params.merge(scoping).reverse_merge!(:use_route => :spree, :format => :json), session, { :foo => "bar" }, method)
end
end
RSpec.configure do |config|
config.include ControllerHacks, :type => :controller
end
|
722bd5f6636d448c7b95d636e99726a4c21d9c9f | src/components/datagrid.js | src/components/datagrid.js | var fs = require('fs');
module.exports = function (app) {
app.config([
'formioComponentsProvider',
function(formioComponentsProvider) {
formioComponentsProvider.register('datagrid', {
title: 'Data Grid',
template: 'formio/components/datagrid.html',
settings: {
input: true,
components: [],
tableView: true,
label: '',
key: 'datagrid',
protected: false,
persistent: true
}
});
}
]);
app.controller('formioDataGrid', [
'$scope',
function($scope) {
$scope.data[$scope.component.key] = $scope.data[$scope.component.key] || [{}];
$scope.addRow = function() {
$scope.data[$scope.component.key].push({});
};
$scope.removeRow = function(index) {
$scope.data[$scope.component.key].splice(index, 1);
};
}
]);
app.run([
'$templateCache',
'FormioUtils',
function($templateCache, FormioUtils) {
$templateCache.put('formio/components/datagrid.html', FormioUtils.fieldWrap(
fs.readFileSync(__dirname + '/../templates/components/datagrid.html', 'utf8')
));
}
]);
};
| var fs = require('fs');
module.exports = function (app) {
app.config([
'formioComponentsProvider',
function(formioComponentsProvider) {
formioComponentsProvider.register('datagrid', {
title: 'Data Grid',
template: 'formio/components/datagrid.html',
settings: {
input: true,
tree: true,
components: [],
tableView: true,
label: '',
key: 'datagrid',
protected: false,
persistent: true
}
});
}
]);
app.controller('formioDataGrid', [
'$scope',
function($scope) {
$scope.data[$scope.component.key] = $scope.data[$scope.component.key] || [{}];
$scope.addRow = function() {
$scope.data[$scope.component.key].push({});
};
$scope.removeRow = function(index) {
$scope.data[$scope.component.key].splice(index, 1);
};
}
]);
app.run([
'$templateCache',
'FormioUtils',
function($templateCache, FormioUtils) {
$templateCache.put('formio/components/datagrid.html', FormioUtils.fieldWrap(
fs.readFileSync(__dirname + '/../templates/components/datagrid.html', 'utf8')
));
}
]);
};
| Add tree to fix formio-util dependency. | Add tree to fix formio-util dependency.
| JavaScript | mit | formio/ngFormio,Kelsus/ngFormio,Kelsus/ngFormio | javascript | ## Code Before:
var fs = require('fs');
module.exports = function (app) {
app.config([
'formioComponentsProvider',
function(formioComponentsProvider) {
formioComponentsProvider.register('datagrid', {
title: 'Data Grid',
template: 'formio/components/datagrid.html',
settings: {
input: true,
components: [],
tableView: true,
label: '',
key: 'datagrid',
protected: false,
persistent: true
}
});
}
]);
app.controller('formioDataGrid', [
'$scope',
function($scope) {
$scope.data[$scope.component.key] = $scope.data[$scope.component.key] || [{}];
$scope.addRow = function() {
$scope.data[$scope.component.key].push({});
};
$scope.removeRow = function(index) {
$scope.data[$scope.component.key].splice(index, 1);
};
}
]);
app.run([
'$templateCache',
'FormioUtils',
function($templateCache, FormioUtils) {
$templateCache.put('formio/components/datagrid.html', FormioUtils.fieldWrap(
fs.readFileSync(__dirname + '/../templates/components/datagrid.html', 'utf8')
));
}
]);
};
## Instruction:
Add tree to fix formio-util dependency.
## Code After:
var fs = require('fs');
module.exports = function (app) {
app.config([
'formioComponentsProvider',
function(formioComponentsProvider) {
formioComponentsProvider.register('datagrid', {
title: 'Data Grid',
template: 'formio/components/datagrid.html',
settings: {
input: true,
tree: true,
components: [],
tableView: true,
label: '',
key: 'datagrid',
protected: false,
persistent: true
}
});
}
]);
app.controller('formioDataGrid', [
'$scope',
function($scope) {
$scope.data[$scope.component.key] = $scope.data[$scope.component.key] || [{}];
$scope.addRow = function() {
$scope.data[$scope.component.key].push({});
};
$scope.removeRow = function(index) {
$scope.data[$scope.component.key].splice(index, 1);
};
}
]);
app.run([
'$templateCache',
'FormioUtils',
function($templateCache, FormioUtils) {
$templateCache.put('formio/components/datagrid.html', FormioUtils.fieldWrap(
fs.readFileSync(__dirname + '/../templates/components/datagrid.html', 'utf8')
));
}
]);
};
|
9acb36d0a54a4c132ea69ce8a1057ead3580f23b | .travis.yml | .travis.yml | before_install: gem install bundler -v 1.12.5
cache: bundler
language: ruby
notifications:
email: false
rvm:
- 1.9.3
- 2.2.2
sudo: false
| before_install: gem install bundler -v 1.12.5
cache: bundler
gemfile:
- gemfiles/faraday_0.8.gemfile
- gemfiles/faraday_current.gemfile
language: ruby
notifications:
email: false
rvm:
- 1.9.3
- 2.3.1
sudo: false
| Use Ruby 2.3.1 and Appraisal gemfiles on Travis. | Use Ruby 2.3.1 and Appraisal gemfiles on Travis.
| YAML | mit | envylabs/faraday-detailed_logger,envylabs/faraday-detailed_logger | yaml | ## Code Before:
before_install: gem install bundler -v 1.12.5
cache: bundler
language: ruby
notifications:
email: false
rvm:
- 1.9.3
- 2.2.2
sudo: false
## Instruction:
Use Ruby 2.3.1 and Appraisal gemfiles on Travis.
## Code After:
before_install: gem install bundler -v 1.12.5
cache: bundler
gemfile:
- gemfiles/faraday_0.8.gemfile
- gemfiles/faraday_current.gemfile
language: ruby
notifications:
email: false
rvm:
- 1.9.3
- 2.3.1
sudo: false
|
08dea674f14363d01ef35b2a23f957e4e97164f6 | composer.json | composer.json | {
"name": "phparsenal/fastforward",
"description": "fast-forward lets you remember, find and open your most used commands and folders.",
"minimum-stability": "stable",
"license": "MIT",
"authors": [
{
"name": "Marcel Voigt",
"email": "mv@noch.so"
}
],
"autoload": {
"psr-4": {
"phparsenal\\fastforward\\": "src/"
}
},
"require": {
"nochso/orm": "~1.3",
"league/climate": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "4.7.*"
}
}
| {
"name": "phparsenal/fastforward",
"description": "fast-forward lets you remember, find and open your most used commands and folders.",
"minimum-stability": "stable",
"license": "MIT",
"authors": [
{
"name": "Marcel Voigt",
"email": "mv@noch.so"
}
],
"autoload": {
"psr-4": {
"phparsenal\\fastforward\\": "src/"
}
},
"require": {
"nochso/orm": "~1.3",
"league/climate": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "4.7.*",
"fabpot/php-cs-fixer": "^1.9"
}
}
| Add php-cs-fixer as dev requirement | Add php-cs-fixer as dev requirement
| JSON | mit | phparsenal/fast-forward,nochso/fast-forward,nochso/fast-forward,phparsenal/fast-forward,natedrake/fast-forward,natedrake/fast-forward | json | ## Code Before:
{
"name": "phparsenal/fastforward",
"description": "fast-forward lets you remember, find and open your most used commands and folders.",
"minimum-stability": "stable",
"license": "MIT",
"authors": [
{
"name": "Marcel Voigt",
"email": "mv@noch.so"
}
],
"autoload": {
"psr-4": {
"phparsenal\\fastforward\\": "src/"
}
},
"require": {
"nochso/orm": "~1.3",
"league/climate": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "4.7.*"
}
}
## Instruction:
Add php-cs-fixer as dev requirement
## Code After:
{
"name": "phparsenal/fastforward",
"description": "fast-forward lets you remember, find and open your most used commands and folders.",
"minimum-stability": "stable",
"license": "MIT",
"authors": [
{
"name": "Marcel Voigt",
"email": "mv@noch.so"
}
],
"autoload": {
"psr-4": {
"phparsenal\\fastforward\\": "src/"
}
},
"require": {
"nochso/orm": "~1.3",
"league/climate": "^3.1"
},
"require-dev": {
"phpunit/phpunit": "4.7.*",
"fabpot/php-cs-fixer": "^1.9"
}
}
|
222f2ee18c0255363ec01452fb9fd850c55d9b30 | app.js | app.js | const express = require('express');
const hbs = require('hbs');
// instantiate Express.js
const app = express();
// Tell Handlebars where to look for partials
hbs.registerPartials(__dirname + '/views/partials');
// Set Handlebars as default templating engine
app.set('view engine', 'hbs');
// app.use(express.static(__dirname + '/public'));
// root route
app.get('/', (req, res) => {
res.render('home.hbs', {
pageTitle: 'Home Page'
});
});
// Specify port and run local server
let port = 3000;
app.listen(port, () => {
console.log(`listening on ${port}`);
});
| const express = require('express');
const hbs = require('hbs');
// instantiate Express.js
const app = express();
// Tell Handlebars where to look for partials
hbs.registerPartials(__dirname + '/views/partials');
// Set Handlebars as default templating engine
app.set('view engine', 'hbs');
// app.use(express.static(__dirname + '/public'));
// root route
app.get('/', (req, res) => {
res.render('home.hbs', {
pageTitle: 'Home Page'
});
});
// route for e-commerce site
app.get('/', (req, res) => {
res.render('shop.hbs', {
pageTitle: 'E-Commerce Shop'
});
});
// Specify port and run local server
let port = 3000;
app.listen(port, () => {
console.log(`listening on ${port}`);
});
| Add route for e-commerce site | Add route for e-commerce site
| JavaScript | mit | dshaps10/full-stack-demo-site,dshaps10/full-stack-demo-site | javascript | ## Code Before:
const express = require('express');
const hbs = require('hbs');
// instantiate Express.js
const app = express();
// Tell Handlebars where to look for partials
hbs.registerPartials(__dirname + '/views/partials');
// Set Handlebars as default templating engine
app.set('view engine', 'hbs');
// app.use(express.static(__dirname + '/public'));
// root route
app.get('/', (req, res) => {
res.render('home.hbs', {
pageTitle: 'Home Page'
});
});
// Specify port and run local server
let port = 3000;
app.listen(port, () => {
console.log(`listening on ${port}`);
});
## Instruction:
Add route for e-commerce site
## Code After:
const express = require('express');
const hbs = require('hbs');
// instantiate Express.js
const app = express();
// Tell Handlebars where to look for partials
hbs.registerPartials(__dirname + '/views/partials');
// Set Handlebars as default templating engine
app.set('view engine', 'hbs');
// app.use(express.static(__dirname + '/public'));
// root route
app.get('/', (req, res) => {
res.render('home.hbs', {
pageTitle: 'Home Page'
});
});
// route for e-commerce site
app.get('/', (req, res) => {
res.render('shop.hbs', {
pageTitle: 'E-Commerce Shop'
});
});
// Specify port and run local server
let port = 3000;
app.listen(port, () => {
console.log(`listening on ${port}`);
});
|
7e00e65ad0e3d0d7692faba5084360f3599b148c | index.js | index.js | "use strong";
"use strict";
module.exports = function maybePromiseFactory(promiseConstructor) {
return function maybePromise(f, ...args) {
let result;
try {
result = f.apply(null, args);
} catch(e) {
return promiseConstructor.reject(e);
}
if(result instanceof promiseConstructor) {
return result;
} else if(result instanceof Error) {
return promiseConstructor.reject(result);
} else {
return promiseConstructor.resolve(result);
}
};
}
| "use strong";
"use strict";
/**
* Constructs a maybePromise function.
* @param {class} promiseConstructor A Promise implementation (e.g. `Bluebird` or `Promise`)
* @param {boolean} [useAnyThenable] If truthy, any Promise implementation is considered a promise; otherwise,
* only instances of the `promiseConstructor` are considered promises.
* @returns {Function} A function that takes a function and arguments. Invokes the function with arguments. If
* the result of the function is a promise, it is returned. Otherwise, the result is converted to a promise.
* If an error is thrown, a rejected promise is returned.
*/
module.exports = function maybePromiseFactory(promiseConstructor, useAnyThenable) {
return function maybePromise(f, ...args) {
let result;
try {
result = f.apply(null, args);
} catch(e) {
return promiseConstructor.reject(e);
}
if(result instanceof promiseConstructor || (useAnyThenable && result && typeof result.then === 'function')) {
return result;
} else {
return promiseConstructor.resolve(result);
}
};
}
| Add useAnyThenable option; don't reject if a synchronous function for returning an Error | Add useAnyThenable option; don't reject if a synchronous function for returning an Error
* The synchronous equivalent to rejecting a promise should really just be throwing an error. Returning an instanceof Error might not be a valid reason to reject a promise -- what if the method is `getValidationError`?
* If integrating with third-party modules that may use different Promise libraries, I added a second parameter `useAnyThenable`. If truthy, it considers any object with a `then` method to be a promise, which follows the spec for `Promise.resolve` in MDN for determining whether a given object is a Promise. This allows the developer to create a `maybePromiseFactory` with the built-in ES6 Promise and still accept Bluebird or other implementations of promises correctly. | JavaScript | isc | mmiller42/maybe-promise-factory,ludios/maybe-promise-factory | javascript | ## Code Before:
"use strong";
"use strict";
module.exports = function maybePromiseFactory(promiseConstructor) {
return function maybePromise(f, ...args) {
let result;
try {
result = f.apply(null, args);
} catch(e) {
return promiseConstructor.reject(e);
}
if(result instanceof promiseConstructor) {
return result;
} else if(result instanceof Error) {
return promiseConstructor.reject(result);
} else {
return promiseConstructor.resolve(result);
}
};
}
## Instruction:
Add useAnyThenable option; don't reject if a synchronous function for returning an Error
* The synchronous equivalent to rejecting a promise should really just be throwing an error. Returning an instanceof Error might not be a valid reason to reject a promise -- what if the method is `getValidationError`?
* If integrating with third-party modules that may use different Promise libraries, I added a second parameter `useAnyThenable`. If truthy, it considers any object with a `then` method to be a promise, which follows the spec for `Promise.resolve` in MDN for determining whether a given object is a Promise. This allows the developer to create a `maybePromiseFactory` with the built-in ES6 Promise and still accept Bluebird or other implementations of promises correctly.
## Code After:
"use strong";
"use strict";
/**
* Constructs a maybePromise function.
* @param {class} promiseConstructor A Promise implementation (e.g. `Bluebird` or `Promise`)
* @param {boolean} [useAnyThenable] If truthy, any Promise implementation is considered a promise; otherwise,
* only instances of the `promiseConstructor` are considered promises.
* @returns {Function} A function that takes a function and arguments. Invokes the function with arguments. If
* the result of the function is a promise, it is returned. Otherwise, the result is converted to a promise.
* If an error is thrown, a rejected promise is returned.
*/
module.exports = function maybePromiseFactory(promiseConstructor, useAnyThenable) {
return function maybePromise(f, ...args) {
let result;
try {
result = f.apply(null, args);
} catch(e) {
return promiseConstructor.reject(e);
}
if(result instanceof promiseConstructor || (useAnyThenable && result && typeof result.then === 'function')) {
return result;
} else {
return promiseConstructor.resolve(result);
}
};
}
|
6b0836ba4ab1138f52209675df193c923b592f72 | run-json-jobs.sh | run-json-jobs.sh | set -e
JSON_DIR=$1
CWL_PATH=`pwd`/cwl/bin # Must be absolute
for f in $JSON_DIR/*.json; do
PATH=$PATH:$CWL_PATH cwltool cwl/bigbed-workflow.cwl $f
exit
done
| set -e
JSON_DIR=$1
CWL_PATH=`pwd`/cwl/bin # Must be absolute
OUTDIR=$2
for f in $JSON_DIR/*.json; do
PATH=$PATH:$CWL_PATH cwltool --outdir $OUTDIR cwl/bigbed-workflow.cwl $f
done
| Add outdir to cwltool command, and remove exit after first job | Add outdir to cwltool command, and remove exit after first job
| Shell | mit | Duke-GCB/TrackHubGenerator,Duke-GCB/TrackHubGenerator | shell | ## Code Before:
set -e
JSON_DIR=$1
CWL_PATH=`pwd`/cwl/bin # Must be absolute
for f in $JSON_DIR/*.json; do
PATH=$PATH:$CWL_PATH cwltool cwl/bigbed-workflow.cwl $f
exit
done
## Instruction:
Add outdir to cwltool command, and remove exit after first job
## Code After:
set -e
JSON_DIR=$1
CWL_PATH=`pwd`/cwl/bin # Must be absolute
OUTDIR=$2
for f in $JSON_DIR/*.json; do
PATH=$PATH:$CWL_PATH cwltool --outdir $OUTDIR cwl/bigbed-workflow.cwl $f
done
|
24330a8929c793ed291cf05621c4c563f9bf15c2 | README.md | README.md | django-gcm
==========
[](https://travis-ci.org/bogdal/django-gcm)
Google Cloud Messaging Server in Django
Quickstart
-------
Install the package via ``pip``:
pip install django-gcm
Add <code>gcm</code> to <code>INSTALLED_APPS</code> in <code>settings.py</code>
Add <code>GCM_APIKEY</code> to <code>settings.py</code> file:
```python
GCM_APIKEY = "<api_key>"
```
Add <code>gcm urls</code> to <code>urls.py</code> file:
```python
urlpatterns = patterns('',
...
url(r'', include('gcm.urls')),
...
)
```
Client
------
Simple client application you can find <a href='https://github.com/bogdal/pager'>here</a>.
| django-gcm
==========
[](https://travis-ci.org/bogdal/django-gcm)
Google Cloud Messaging Server in Django
Quickstart
-------
Install the package via ``pip``:
pip install django-gcm
Add <code>gcm</code> to <code>INSTALLED_APPS</code> in <code>settings.py</code>
Add <code>GCM_APIKEY</code> to <code>settings.py</code> file:
```python
GCM_APIKEY = "<api_key>"
```
Add <code>gcm urls</code> to <code>urls.py</code> file:
```python
urlpatterns = patterns('',
...
url(r'', include('gcm.urls')),
...
)
```
Send messages
-----
You can simply use the console:
```
$ python manage.py gcm_messenger --devices
Devices list:
(#1) My phone
$ python manage.py gcm_messenger 1 'my test message'
[OK] device #1 (My phone): id=xxxxx
```
or use python for that:
```python
from gcm.models import Device
my_phone = Device.objects.get(name='My phone')
my_phone.send_message('my test message')
```
Client
------
Simple client application you can find <a href='https://github.com/bogdal/pager'>here</a>.
| Add info how to send messages | Add info how to send messages | Markdown | bsd-2-clause | bogdal/django-gcm,bogdal/django-gcm,johnofkorea/django-gcm,johnofkorea/django-gcm | markdown | ## Code Before:
django-gcm
==========
[](https://travis-ci.org/bogdal/django-gcm)
Google Cloud Messaging Server in Django
Quickstart
-------
Install the package via ``pip``:
pip install django-gcm
Add <code>gcm</code> to <code>INSTALLED_APPS</code> in <code>settings.py</code>
Add <code>GCM_APIKEY</code> to <code>settings.py</code> file:
```python
GCM_APIKEY = "<api_key>"
```
Add <code>gcm urls</code> to <code>urls.py</code> file:
```python
urlpatterns = patterns('',
...
url(r'', include('gcm.urls')),
...
)
```
Client
------
Simple client application you can find <a href='https://github.com/bogdal/pager'>here</a>.
## Instruction:
Add info how to send messages
## Code After:
django-gcm
==========
[](https://travis-ci.org/bogdal/django-gcm)
Google Cloud Messaging Server in Django
Quickstart
-------
Install the package via ``pip``:
pip install django-gcm
Add <code>gcm</code> to <code>INSTALLED_APPS</code> in <code>settings.py</code>
Add <code>GCM_APIKEY</code> to <code>settings.py</code> file:
```python
GCM_APIKEY = "<api_key>"
```
Add <code>gcm urls</code> to <code>urls.py</code> file:
```python
urlpatterns = patterns('',
...
url(r'', include('gcm.urls')),
...
)
```
Send messages
-----
You can simply use the console:
```
$ python manage.py gcm_messenger --devices
Devices list:
(#1) My phone
$ python manage.py gcm_messenger 1 'my test message'
[OK] device #1 (My phone): id=xxxxx
```
or use python for that:
```python
from gcm.models import Device
my_phone = Device.objects.get(name='My phone')
my_phone.send_message('my test message')
```
Client
------
Simple client application you can find <a href='https://github.com/bogdal/pager'>here</a>.
|
47a9fc6a34ebcb5744b80abdc600d54aa2a221ae | lib/headjs-rails/tag_helper.rb | lib/headjs-rails/tag_helper.rb | module Headjs
module TagHelper
def headjs_include_tag(*sources)
keys = []
content_tag :script, { :type => Mime::JS }, false do
"head.js( #{javascript_include_tag(*sources).scan(/src="([^"]+)"/).flatten.map { |src|
key = URI.parse(src).path[%r{[^/]+\z}].gsub(/\.js$/,'').gsub(/\.min$/,'')
while keys.include?(key) do
key += '_' + key
end
keys << key
"{ '#{key}': '#{src}' }"
}.join(', ')} );"
end
end
end
end
| module Headjs
module TagHelper
def headjs_include_tag(*sources)
content_tag :script, { :type => Mime::JS }, false do
headjs_include_js(*sources)
end
end
def headjs_include_js(*sources)
keys = []
"head.js( #{javascript_include_tag(*sources).scan(/src="([^"]+)"/).flatten.map { |src|
key = URI.parse(src).path[%r{[^/]+\z}].gsub(/\.js$/,'').gsub(/\.min$/,'')
while keys.include?(key) do
key += '_' + key
end
keys << key
"{ '#{key}': '#{src}' }"
}.join(', ')} );"
end
end
end
| Refactor the tag stuff slightly to allow more custom loading. | Refactor the tag stuff slightly to allow more custom loading.
| Ruby | mit | muitocomplicado/headjs-rails,muitocomplicado/headjs-rails | ruby | ## Code Before:
module Headjs
module TagHelper
def headjs_include_tag(*sources)
keys = []
content_tag :script, { :type => Mime::JS }, false do
"head.js( #{javascript_include_tag(*sources).scan(/src="([^"]+)"/).flatten.map { |src|
key = URI.parse(src).path[%r{[^/]+\z}].gsub(/\.js$/,'').gsub(/\.min$/,'')
while keys.include?(key) do
key += '_' + key
end
keys << key
"{ '#{key}': '#{src}' }"
}.join(', ')} );"
end
end
end
end
## Instruction:
Refactor the tag stuff slightly to allow more custom loading.
## Code After:
module Headjs
module TagHelper
def headjs_include_tag(*sources)
content_tag :script, { :type => Mime::JS }, false do
headjs_include_js(*sources)
end
end
def headjs_include_js(*sources)
keys = []
"head.js( #{javascript_include_tag(*sources).scan(/src="([^"]+)"/).flatten.map { |src|
key = URI.parse(src).path[%r{[^/]+\z}].gsub(/\.js$/,'').gsub(/\.min$/,'')
while keys.include?(key) do
key += '_' + key
end
keys << key
"{ '#{key}': '#{src}' }"
}.join(', ')} );"
end
end
end
|
d7d6819e728edff997c07c6191f882a61d30f219 | setup.py | setup.py |
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-to-use program to geo-tag your photos, using GPS tracks or manually from a map",
url="http://www.grendelman.net/wp/tag/taggert",
license="Apache License version 2.0",
# package_dir={'taggert': 'taggert'},
packages=['taggert'],
scripts=['taggert_run'],
package_data={'taggert': ['data/taggert.glade', 'data/taggert.svg']},
data_files=[
('glib-2.0/schemas', ['com.tinuzz.taggert.gschema.xml']),
('applications', ['taggert.desktop']),
('pixmaps', ['taggert/data/taggert.svg']),
],
)
|
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-to-use program to geo-tag your photos, using GPS tracks or manually from a map",
url="http://www.grendelman.net/wp/tag/taggert",
license="Apache License version 2.0",
# package_dir={'taggert': 'taggert'},
packages=['taggert'],
scripts=['taggert_run'],
package_data={'taggert': ['data/taggert.glade', 'data/taggert.svg', 'data/gpx.xsd']},
data_files=[
('glib-2.0/schemas', ['com.tinuzz.taggert.gschema.xml']),
('applications', ['taggert.desktop']),
('pixmaps', ['taggert/data/taggert.svg']),
],
)
| Make sure to install gpx.xsd in data directory | Make sure to install gpx.xsd in data directory
| Python | apache-2.0 | tinuzz/taggert | python | ## Code Before:
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-to-use program to geo-tag your photos, using GPS tracks or manually from a map",
url="http://www.grendelman.net/wp/tag/taggert",
license="Apache License version 2.0",
# package_dir={'taggert': 'taggert'},
packages=['taggert'],
scripts=['taggert_run'],
package_data={'taggert': ['data/taggert.glade', 'data/taggert.svg']},
data_files=[
('glib-2.0/schemas', ['com.tinuzz.taggert.gschema.xml']),
('applications', ['taggert.desktop']),
('pixmaps', ['taggert/data/taggert.svg']),
],
)
## Instruction:
Make sure to install gpx.xsd in data directory
## Code After:
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-to-use program to geo-tag your photos, using GPS tracks or manually from a map",
url="http://www.grendelman.net/wp/tag/taggert",
license="Apache License version 2.0",
# package_dir={'taggert': 'taggert'},
packages=['taggert'],
scripts=['taggert_run'],
package_data={'taggert': ['data/taggert.glade', 'data/taggert.svg', 'data/gpx.xsd']},
data_files=[
('glib-2.0/schemas', ['com.tinuzz.taggert.gschema.xml']),
('applications', ['taggert.desktop']),
('pixmaps', ['taggert/data/taggert.svg']),
],
)
|
6de49e658bb973edce30f9ba8111b30ff3ad4f28 | README.md | README.md | Mario the Devpi Plumber
=======================
Mario, the devpi-plumber, helps to automate and test large devpi installations. It offers a simple python commandline wrapper
around the devpi client binary and utilities for using devpi in a test harness.
Mario by Example:
-----------------
Save the princess...
License
-------
[New BSD](COPYING)
| Mario the Devpi Plumber
=======================
Mario, the devpi-plumber, helps to automate and test large devpi installations. It offers a simple python commandline wrapper
around the devpi client binary and utilities for using devpi in a test harness.
Mario by Example:
-----------------
Among others, it can be used to automate the upload of packages:
```python
with DevpiClient('http://devpi.company.com', 'user', 'password') as devpi:
devpi.use('user/test')
devpi.upload('path_to_package')
```
In order to simplify the testing of such plumbing scripts, it ships with a simple context manager for starting and stopping devpi servers in tests:
```python
users = {
'user': {'password': 'secret'}
}
indices = {
'user/prod': {},
'user/test': {bases:'user/prod'},
}
with TestServer(users, indices) as devpi:
devpi.use('user/test')
devpi.upload('path_to_package')
```
License
-------
[New BSD](COPYING)
| Add small example to readme.md | Add small example to readme.md | Markdown | bsd-3-clause | tylerdave/devpi-plumber | markdown | ## Code Before:
Mario the Devpi Plumber
=======================
Mario, the devpi-plumber, helps to automate and test large devpi installations. It offers a simple python commandline wrapper
around the devpi client binary and utilities for using devpi in a test harness.
Mario by Example:
-----------------
Save the princess...
License
-------
[New BSD](COPYING)
## Instruction:
Add small example to readme.md
## Code After:
Mario the Devpi Plumber
=======================
Mario, the devpi-plumber, helps to automate and test large devpi installations. It offers a simple python commandline wrapper
around the devpi client binary and utilities for using devpi in a test harness.
Mario by Example:
-----------------
Among others, it can be used to automate the upload of packages:
```python
with DevpiClient('http://devpi.company.com', 'user', 'password') as devpi:
devpi.use('user/test')
devpi.upload('path_to_package')
```
In order to simplify the testing of such plumbing scripts, it ships with a simple context manager for starting and stopping devpi servers in tests:
```python
users = {
'user': {'password': 'secret'}
}
indices = {
'user/prod': {},
'user/test': {bases:'user/prod'},
}
with TestServer(users, indices) as devpi:
devpi.use('user/test')
devpi.upload('path_to_package')
```
License
-------
[New BSD](COPYING)
|
29387276498dd86c9cbe998fa8fc92583d739bf9 | admin/views/Redirect/batch.php | admin/views/Redirect/batch.php | <?=form_open_multipart()?>
<p>
<strong>1. CSV File</strong>
</p>
<p>
This should be a *.csv file which contains 3 columns: old URL, new URL, type of redirect (301 or 302).
</p>
<p>
<input type="file" name="upload" style="border: 1px solid #CCC;padding: 1rem; width: 100%;margin-bottom: 1rem">
</p>
<p>
<strong>2. Action</strong>
</p>
<p>
Define how to process the redirects.
</p>
<p>
<select name="action" class="select2">
<option value="APPEND">Append - add new items in the CSV to the database</option>
<option value="REPLACE">Replace - replace the items in the database with those in the CSV</option>
<option value="REMOVE">Remove - remove items in the CSV from the database</option>
</select>
</p>
<hr>
<p>
<button type="submit" class="btn btn-primary">
Upload
</button>
</p>
<?=form_close()?>
| <?=form_open_multipart()?>
<p>
<strong>1. CSV File</strong>
</p>
<p>
This should be a *.csv file which contains 3 columns: old URL, new URL, type of redirect (301 or 302).
</p>
<p>
<input type="file" name="upload" style="border: 1px solid #CCC;padding: 1rem; width: 100%;margin-bottom: 1rem">
</p>
<p>
<strong>2. Action</strong>
</p>
<p>
Define how to process the redirects.
</p>
<p>
<select name="action" class="select2">
<option value="APPEND">Append - add new items in the CSV to the database</option>
<option value="REPLACE">Replace - replace the items in the database with those in the CSV</option>
<option value="REMOVE">Remove - remove items in the CSV from the database</option>
</select>
</p>
<hr>
<div class="admin-floating-controls">
<button type="submit" class="btn btn-primary">
Save Changes
</button>
</div>
<?=form_close()?>
| Support for floating admin controls | Support for floating admin controls
| PHP | mit | nailsapp/module-redirect | php | ## Code Before:
<?=form_open_multipart()?>
<p>
<strong>1. CSV File</strong>
</p>
<p>
This should be a *.csv file which contains 3 columns: old URL, new URL, type of redirect (301 or 302).
</p>
<p>
<input type="file" name="upload" style="border: 1px solid #CCC;padding: 1rem; width: 100%;margin-bottom: 1rem">
</p>
<p>
<strong>2. Action</strong>
</p>
<p>
Define how to process the redirects.
</p>
<p>
<select name="action" class="select2">
<option value="APPEND">Append - add new items in the CSV to the database</option>
<option value="REPLACE">Replace - replace the items in the database with those in the CSV</option>
<option value="REMOVE">Remove - remove items in the CSV from the database</option>
</select>
</p>
<hr>
<p>
<button type="submit" class="btn btn-primary">
Upload
</button>
</p>
<?=form_close()?>
## Instruction:
Support for floating admin controls
## Code After:
<?=form_open_multipart()?>
<p>
<strong>1. CSV File</strong>
</p>
<p>
This should be a *.csv file which contains 3 columns: old URL, new URL, type of redirect (301 or 302).
</p>
<p>
<input type="file" name="upload" style="border: 1px solid #CCC;padding: 1rem; width: 100%;margin-bottom: 1rem">
</p>
<p>
<strong>2. Action</strong>
</p>
<p>
Define how to process the redirects.
</p>
<p>
<select name="action" class="select2">
<option value="APPEND">Append - add new items in the CSV to the database</option>
<option value="REPLACE">Replace - replace the items in the database with those in the CSV</option>
<option value="REMOVE">Remove - remove items in the CSV from the database</option>
</select>
</p>
<hr>
<div class="admin-floating-controls">
<button type="submit" class="btn btn-primary">
Save Changes
</button>
</div>
<?=form_close()?>
|
06a94147d8432f0afa505e137918cc23f84eb676 | lib/input-files/app.js | lib/input-files/app.js | "use strict";
module.exports = {
"name" : prompt('name', name),
"version" : prompt('version', "0.0.0"),
"description" : prompt("description"),
"private" : true,
"main" : prompt("main", "app.js"),
"dependencies" : prompt("dependencies", "express: 3.0.x, jade: >0.0.1, mongoose: 3.4.x"),
"devDependencies" : prompt("devDependencies", "mocha: *"),
"scripts" : prompt("scripts/start", "nodemon app.js -wmodels -wconfig -wroutes"),
"repository" : prompt("repository", ""),
"keywords" : prompt("keywords", "express, jade"),
"author" : prompt("author", ""),
"license" : prompt('license', 'BSD')
};
| "use strict";
module.exports = {
"name" : prompt('name', name),
"version" : prompt('version', "0.0.0"),
"description" : prompt("description"),
"private" : true,
"main" : prompt("main", "app.js"),
"dependencies" : "express: 3.1.x, jade: >0.0.1, mongoose: 3.5.x",
"devDependencies" : "mocha: *",
"scripts" : prompt("scripts/start", "nodemon app.js -wmodels -wconfig -wroutes"),
"repository" : prompt("repository", ""),
"keywords" : prompt("keywords", "express, jade"),
"author" : prompt("author", ""),
"license" : prompt('license', 'BSD')
};
| Update express and mongoose and remove dependencies and devDependencies from prompt | Update express and mongoose and remove dependencies and devDependencies from prompt
| JavaScript | mit | the-diamond-dogs-group-oss/bumm,saintedlama/bumm,saintedlama/bumm | javascript | ## Code Before:
"use strict";
module.exports = {
"name" : prompt('name', name),
"version" : prompt('version', "0.0.0"),
"description" : prompt("description"),
"private" : true,
"main" : prompt("main", "app.js"),
"dependencies" : prompt("dependencies", "express: 3.0.x, jade: >0.0.1, mongoose: 3.4.x"),
"devDependencies" : prompt("devDependencies", "mocha: *"),
"scripts" : prompt("scripts/start", "nodemon app.js -wmodels -wconfig -wroutes"),
"repository" : prompt("repository", ""),
"keywords" : prompt("keywords", "express, jade"),
"author" : prompt("author", ""),
"license" : prompt('license', 'BSD')
};
## Instruction:
Update express and mongoose and remove dependencies and devDependencies from prompt
## Code After:
"use strict";
module.exports = {
"name" : prompt('name', name),
"version" : prompt('version', "0.0.0"),
"description" : prompt("description"),
"private" : true,
"main" : prompt("main", "app.js"),
"dependencies" : "express: 3.1.x, jade: >0.0.1, mongoose: 3.5.x",
"devDependencies" : "mocha: *",
"scripts" : prompt("scripts/start", "nodemon app.js -wmodels -wconfig -wroutes"),
"repository" : prompt("repository", ""),
"keywords" : prompt("keywords", "express, jade"),
"author" : prompt("author", ""),
"license" : prompt('license', 'BSD')
};
|
8b41f4b0e25ab6de8eed1988f47cf525c2f182fe | t/10-array-params.t | t/10-array-params.t | use v6;
use Test;
use App::Subcommander;
my $prev-arg;
my @prev-names;
sub reset {
$prev-arg = Str;
@prev-names = ();
}
my class App does App::Subcommander {
method listy(Str $arg, Str :@names) is subcommand {
$prev-arg = $arg;
@prev-names = @names;
}
}
plan 2;
App.new.run(['listy', 'test', '--names=Bob', '--names=Fred']);
is $prev-arg, 'test';
is_deeply @prev-names.item, ['Bob', 'Fred'];
| use v6;
use Test;
use App::Subcommander;
my $prev-arg;
my @prev-names;
sub reset {
$prev-arg = Str;
@prev-names = ();
}
my class App does App::Subcommander {
method listy(Str $arg, Str :@names) is subcommand {
$prev-arg = $arg;
@prev-names = @names;
}
method listy-with-alias(Str $arg, Str :pen-names(:@names)) is subcommand {
$prev-arg = $arg;
@prev-names = @names;
}
}
plan 4;
App.new.run(['listy', 'test', '--names=Bob', '--names=Fred']);
is $prev-arg, 'test';
is_deeply @prev-names.item, ['Bob', 'Fred'];
reset();
App.new.run(['listy-with-alias', 'test', '--names=Bob', '--pen-names=Fred']);
is $prev-arg, 'test';
is_deeply @prev-names.item, ['Bob', 'Fred'];
| Test aliases + originals + array parameters | Test aliases + originals + array parameters
| Perl | mit | hoelzro/Subcommander,hoelzro/Subcommander | perl | ## Code Before:
use v6;
use Test;
use App::Subcommander;
my $prev-arg;
my @prev-names;
sub reset {
$prev-arg = Str;
@prev-names = ();
}
my class App does App::Subcommander {
method listy(Str $arg, Str :@names) is subcommand {
$prev-arg = $arg;
@prev-names = @names;
}
}
plan 2;
App.new.run(['listy', 'test', '--names=Bob', '--names=Fred']);
is $prev-arg, 'test';
is_deeply @prev-names.item, ['Bob', 'Fred'];
## Instruction:
Test aliases + originals + array parameters
## Code After:
use v6;
use Test;
use App::Subcommander;
my $prev-arg;
my @prev-names;
sub reset {
$prev-arg = Str;
@prev-names = ();
}
my class App does App::Subcommander {
method listy(Str $arg, Str :@names) is subcommand {
$prev-arg = $arg;
@prev-names = @names;
}
method listy-with-alias(Str $arg, Str :pen-names(:@names)) is subcommand {
$prev-arg = $arg;
@prev-names = @names;
}
}
plan 4;
App.new.run(['listy', 'test', '--names=Bob', '--names=Fred']);
is $prev-arg, 'test';
is_deeply @prev-names.item, ['Bob', 'Fred'];
reset();
App.new.run(['listy-with-alias', 'test', '--names=Bob', '--pen-names=Fred']);
is $prev-arg, 'test';
is_deeply @prev-names.item, ['Bob', 'Fred'];
|
460ca0766af38a331c4a00de1d485dd169abda8f | lib/metasploit_data_models/active_record_models/session.rb | lib/metasploit_data_models/active_record_models/session.rb | module MetasploitDataModels::ActiveRecordModels::Session
def self.included(base)
base.class_eval {
belongs_to :host, :class_name => "Mdm::Host"
has_one :workspace, :through => :host, :class_name => "Mdm::Workspace"
has_many :events, :class_name => "Mdm::SessionEvent", :order => "created_at", :dependent => :delete_all
has_many :routes, :class_name => "Mdm::Route", :dependent => :delete_all
scope :alive, where("closed_at IS NULL")
scope :dead, where("closed_at IS NOT NULL")
scope :upgradeable, where("closed_at IS NULL AND stype = 'shell' and platform ILIKE '%win%'")
serialize :datastore, ::MetasploitDataModels::Base64Serializer.new
before_destroy :stop
def upgradeable?
return true if (self.stype == 'shell' and self.platform =~ /win/)
else return false
end
private
def stop
c = Pro::Client.get rescue nil
c.session_stop(self.local_id) rescue nil # ignore exceptions (XXX - ideally, stopped an already-stopped session wouldn't throw XMLRPCException)
end
}
end
end
| module MetasploitDataModels::ActiveRecordModels::Session
def self.included(base)
base.class_eval {
belongs_to :host, :class_name => "Mdm::Host"
has_one :workspace, :through => :host, :class_name => "Mdm::Workspace"
has_many :events, :class_name => "Mdm::SessionEvent", :order => "created_at", :dependent => :delete_all
has_many :routes, :class_name => "Mdm::Route", :dependent => :delete_all
scope :alive, where("closed_at IS NULL")
scope :dead, where("closed_at IS NOT NULL")
scope :upgradeable, where("closed_at IS NULL AND stype = 'shell' and platform ILIKE '%win%'")
serialize :datastore, ::MetasploitDataModels::Base64Serializer.new
before_destroy :stop
def upgradeable?
(self.platform =~ /win/ and self.stype == 'shell')
end
private
def stop
c = Pro::Client.get rescue nil
c.session_stop(self.local_id) rescue nil # ignore exceptions (XXX - ideally, stopped an already-stopped session wouldn't throw XMLRPCException)
end
}
end
end
| Fix to the upgradeable? method to be all around better | Fix to the upgradeable? method to be all around better
| Ruby | bsd-3-clause | rapid7/metasploit-cache,rapid7/metasploit_data_models,farias-r7/metasploit_data_models,rapid7/metasploit_data_models,bcook-r7/metasploit_data_models,rapid7/metasploit_data_models,bcook-r7/metasploit_data_models,rapid7/metasploit-cache,rapid7/metasploit-model,farias-r7/metasploit_data_models,rapid7/metasploit-cache,rapid7/metasploit-model,rapid7/metasploit-cache,rapid7/metasploit-model,farias-r7/metasploit_data_models,bcook-r7/metasploit_data_models | ruby | ## Code Before:
module MetasploitDataModels::ActiveRecordModels::Session
def self.included(base)
base.class_eval {
belongs_to :host, :class_name => "Mdm::Host"
has_one :workspace, :through => :host, :class_name => "Mdm::Workspace"
has_many :events, :class_name => "Mdm::SessionEvent", :order => "created_at", :dependent => :delete_all
has_many :routes, :class_name => "Mdm::Route", :dependent => :delete_all
scope :alive, where("closed_at IS NULL")
scope :dead, where("closed_at IS NOT NULL")
scope :upgradeable, where("closed_at IS NULL AND stype = 'shell' and platform ILIKE '%win%'")
serialize :datastore, ::MetasploitDataModels::Base64Serializer.new
before_destroy :stop
def upgradeable?
return true if (self.stype == 'shell' and self.platform =~ /win/)
else return false
end
private
def stop
c = Pro::Client.get rescue nil
c.session_stop(self.local_id) rescue nil # ignore exceptions (XXX - ideally, stopped an already-stopped session wouldn't throw XMLRPCException)
end
}
end
end
## Instruction:
Fix to the upgradeable? method to be all around better
## Code After:
module MetasploitDataModels::ActiveRecordModels::Session
def self.included(base)
base.class_eval {
belongs_to :host, :class_name => "Mdm::Host"
has_one :workspace, :through => :host, :class_name => "Mdm::Workspace"
has_many :events, :class_name => "Mdm::SessionEvent", :order => "created_at", :dependent => :delete_all
has_many :routes, :class_name => "Mdm::Route", :dependent => :delete_all
scope :alive, where("closed_at IS NULL")
scope :dead, where("closed_at IS NOT NULL")
scope :upgradeable, where("closed_at IS NULL AND stype = 'shell' and platform ILIKE '%win%'")
serialize :datastore, ::MetasploitDataModels::Base64Serializer.new
before_destroy :stop
def upgradeable?
(self.platform =~ /win/ and self.stype == 'shell')
end
private
def stop
c = Pro::Client.get rescue nil
c.session_stop(self.local_id) rescue nil # ignore exceptions (XXX - ideally, stopped an already-stopped session wouldn't throw XMLRPCException)
end
}
end
end
|
8b89f3539853f417bdd66591e8b17bd8f7688029 | doc/environment.yml | doc/environment.yml | name: pyrcel
dependencies:
- python=2.7
- assimulo
- pandas
- pyyaml
- scipy
- numba
- numpy
- xarray
- numpydoc
- ipython
- sphinx
- sphinx_rtd_theme | name: pyrcel
channels:
- conda-forge
dependencies:
- python=2.7
- assimulo
- pandas
- pyyaml
- scipy
- numba
- numpy
- xarray
- numpydoc
- ipython
- sphinx
- sphinx_rtd_theme | Add conda-forge channel to RTD build | Add conda-forge channel to RTD build
| YAML | bsd-3-clause | darothen/pyrcel,darothen/parcel_model | yaml | ## Code Before:
name: pyrcel
dependencies:
- python=2.7
- assimulo
- pandas
- pyyaml
- scipy
- numba
- numpy
- xarray
- numpydoc
- ipython
- sphinx
- sphinx_rtd_theme
## Instruction:
Add conda-forge channel to RTD build
## Code After:
name: pyrcel
channels:
- conda-forge
dependencies:
- python=2.7
- assimulo
- pandas
- pyyaml
- scipy
- numba
- numpy
- xarray
- numpydoc
- ipython
- sphinx
- sphinx_rtd_theme |
ad865980b8190201a8de3a9b1a4bee540bac78fb | src/OpenConext/EngineBlockBundle/Resources/config/routing/service_provider.yml | src/OpenConext/EngineBlockBundle/Resources/config/routing/service_provider.yml | authentication_sp_consume_assertion:
path: /authentication/sp/consume-assertion
methods: [GET,POST] # GET is allowed on purpose to present a meaningful error message.
defaults:
_controller: engineblock.controller.authentication.service_provider:consumeAssertionAction
authentication_sp_process_consent:
path: /authentication/sp/process-consent
methods: [GET,POST]
defaults:
_controller: engineblock.controller.authentication.service_provider:processConsentAction
| authentication_sp_consume_assertion:
path: /authentication/sp/consume-assertion
methods: [POST]
defaults:
_controller: engineblock.controller.authentication.service_provider:consumeAssertionAction
authentication_sp_process_consent:
path: /authentication/sp/process-consent
methods: [GET,POST]
defaults:
_controller: engineblock.controller.authentication.service_provider:processConsentAction
| Allow only POST requests on /sp/consume-assertion | Allow only POST requests on /sp/consume-assertion
We stated that GET was also allowed in order to render more user
friendly error reports. That was not at all the case. In a recent effort
error reporting regarding disallowed request methods was improved.
So we can now start enforcing POST requests on the ACS endpoint. Any
other request method will result in routing exception that in turn will
be handled by the improved error reporting.
Fixes task 2 of: https://www.pivotaltracker.com/story/show/164121663
Also see: #646
| YAML | apache-2.0 | thijskh/OpenConext-engineblock,thijskh/OpenConext-engineblock,thijskh/OpenConext-engineblock,thijskh/OpenConext-engineblock | yaml | ## Code Before:
authentication_sp_consume_assertion:
path: /authentication/sp/consume-assertion
methods: [GET,POST] # GET is allowed on purpose to present a meaningful error message.
defaults:
_controller: engineblock.controller.authentication.service_provider:consumeAssertionAction
authentication_sp_process_consent:
path: /authentication/sp/process-consent
methods: [GET,POST]
defaults:
_controller: engineblock.controller.authentication.service_provider:processConsentAction
## Instruction:
Allow only POST requests on /sp/consume-assertion
We stated that GET was also allowed in order to render more user
friendly error reports. That was not at all the case. In a recent effort
error reporting regarding disallowed request methods was improved.
So we can now start enforcing POST requests on the ACS endpoint. Any
other request method will result in routing exception that in turn will
be handled by the improved error reporting.
Fixes task 2 of: https://www.pivotaltracker.com/story/show/164121663
Also see: #646
## Code After:
authentication_sp_consume_assertion:
path: /authentication/sp/consume-assertion
methods: [POST]
defaults:
_controller: engineblock.controller.authentication.service_provider:consumeAssertionAction
authentication_sp_process_consent:
path: /authentication/sp/process-consent
methods: [GET,POST]
defaults:
_controller: engineblock.controller.authentication.service_provider:processConsentAction
|
5d2b041ad7bddb44cd9bd88fe52ee1a071113e81 | sandman2/templates/layout.html | sandman2/templates/layout.html | {% import 'admin/layout.html' as layout with context -%}
{% extends 'admin/base.html' %}
{% block head_tail %}
{{ super() }}
<link href="{{ url_for('static', filename='layout.css') }}" rel="stylesheet">
{% endblock %}
{% block page_body %}
<div class="container">
<div class="row">
<div class="span2">
<ul class="nav nav-pills nav-stacked">
{{ layout.menu() }}
{{ layout.menu_links() }}
</ul>
</div>
<div class="span10">
<div id="content">
{% block brand %}
<h2 id="brand">{{ admin_view.name|capitalize }}</h2>
<div class="clearfix"></div>
{% endblock %}
{{ layout.messages() }}
{% block body %}
{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}
| {% import 'admin/layout.html' as layout with context -%}
{% extends 'admin/base.html' %}
{% block page_body %}
<div class="container">
<div class="row">
<div class="span2">
<ul class="nav nav-pills nav-stacked">
{{ layout.menu() }}
{{ layout.menu_links() }}
</ul>
</div>
<div class="span10">
<div id="content">
{% block brand %}
<h2 id="brand">{{ admin_view.name|capitalize }}</h2>
<div class="clearfix"></div>
{% endblock %}
{{ layout.messages() }}
{% block body %}
{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}
| Remove reference to unnecessary/non-existant css file | Remove reference to unnecessary/non-existant css file
| HTML | apache-2.0 | jeffknupp/sandman2,jeffknupp/sandman2,jeffknupp/sandman2 | html | ## Code Before:
{% import 'admin/layout.html' as layout with context -%}
{% extends 'admin/base.html' %}
{% block head_tail %}
{{ super() }}
<link href="{{ url_for('static', filename='layout.css') }}" rel="stylesheet">
{% endblock %}
{% block page_body %}
<div class="container">
<div class="row">
<div class="span2">
<ul class="nav nav-pills nav-stacked">
{{ layout.menu() }}
{{ layout.menu_links() }}
</ul>
</div>
<div class="span10">
<div id="content">
{% block brand %}
<h2 id="brand">{{ admin_view.name|capitalize }}</h2>
<div class="clearfix"></div>
{% endblock %}
{{ layout.messages() }}
{% block body %}
{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}
## Instruction:
Remove reference to unnecessary/non-existant css file
## Code After:
{% import 'admin/layout.html' as layout with context -%}
{% extends 'admin/base.html' %}
{% block page_body %}
<div class="container">
<div class="row">
<div class="span2">
<ul class="nav nav-pills nav-stacked">
{{ layout.menu() }}
{{ layout.menu_links() }}
</ul>
</div>
<div class="span10">
<div id="content">
{% block brand %}
<h2 id="brand">{{ admin_view.name|capitalize }}</h2>
<div class="clearfix"></div>
{% endblock %}
{{ layout.messages() }}
{% block body %}
{% endblock %}
</div>
</div>
</div>
</div>
{% endblock %}
|
fbff89da6c7a666a35695c0b2b7a50fc4864dc0b | .travis.yml | .travis.yml | language: sh
env:
matrix:
- SHELL=bash
- SHELL=zsh
- SHELL=dash
- SHELL=ksh
install:
# install antigen
- curl -L git.io/antigen > ~/antigen.zsh
- echo "source ~/antigen.zsh; antigen bundle rylnd/shpec; antigen apply" > ~/.zshrc
- echo "setopt sh_word_split" > ~/.zshenv
- zsh ~/.zshrc
- sh -c "export BINDIR=$HOME ; `curl -L https://raw.github.com/rylnd/shpec/master/install.sh`"
- $HOME/.nvm/nvm.sh
- nvm install 6 && nvm use 6
- (cd test && npm install)
- lynx --version
script:
- (cd test && node server.js &)
- sleep 1
- |
echo $SHELL && $SHELL --version
if [ "$SHELL" = "zsh" ]; then
echo "Run Zsh test"
./.travis-test.zsh
else
echo "Run $SHELL test"
$HOME/shpec
fi
before_install:
- sudo apt-get install zsh lynx
cache: apt
notifications:
email: false
| language: sh
env:
matrix:
- SHELL=bash
- SHELL=zsh
install:
# install antigen
- curl -L git.io/antigen > ~/antigen.zsh
- echo "source ~/antigen.zsh; antigen bundle rylnd/shpec; antigen apply" > ~/.zshrc
- echo "setopt sh_word_split" > ~/.zshenv
- zsh ~/.zshrc
- sh -c "export BINDIR=$HOME ; `curl -L https://raw.github.com/rylnd/shpec/master/install.sh`"
- $HOME/.nvm/nvm.sh
- nvm install 6 && nvm use 6
- (cd test && npm install)
- lynx --version
script:
- (cd test && node server.js &)
- sleep 1
- |
echo $SHELL && $SHELL --version
if [ "$SHELL" = "zsh" ]; then
echo "Run Zsh test"
./.travis-test.zsh
elif [ "$SHELL" = "bash" ]; then
echo "Run Bash test"
$HOME/shpec
fi
before_install:
- sudo apt-get install zsh lynx
cache: apt
notifications:
email: false
| Revert "attempt to make test pass for ksh and dash" | Revert "attempt to make test pass for ksh and dash"
This reverts commit 86fe28cda3bab5779a71deabeb93c32db3b087e5.
expand_alias opt not foundand syntax error on resty function
array not suported by dash
| YAML | mit | AdrieanKhisbe/resty,micha/resty,micha/resty,micha/resty,micha/resty,AdrieanKhisbe/resty,micha/resty,AdrieanKhisbe/resty,AdrieanKhisbe/resty,AdrieanKhisbe/resty | yaml | ## Code Before:
language: sh
env:
matrix:
- SHELL=bash
- SHELL=zsh
- SHELL=dash
- SHELL=ksh
install:
# install antigen
- curl -L git.io/antigen > ~/antigen.zsh
- echo "source ~/antigen.zsh; antigen bundle rylnd/shpec; antigen apply" > ~/.zshrc
- echo "setopt sh_word_split" > ~/.zshenv
- zsh ~/.zshrc
- sh -c "export BINDIR=$HOME ; `curl -L https://raw.github.com/rylnd/shpec/master/install.sh`"
- $HOME/.nvm/nvm.sh
- nvm install 6 && nvm use 6
- (cd test && npm install)
- lynx --version
script:
- (cd test && node server.js &)
- sleep 1
- |
echo $SHELL && $SHELL --version
if [ "$SHELL" = "zsh" ]; then
echo "Run Zsh test"
./.travis-test.zsh
else
echo "Run $SHELL test"
$HOME/shpec
fi
before_install:
- sudo apt-get install zsh lynx
cache: apt
notifications:
email: false
## Instruction:
Revert "attempt to make test pass for ksh and dash"
This reverts commit 86fe28cda3bab5779a71deabeb93c32db3b087e5.
expand_alias opt not foundand syntax error on resty function
array not suported by dash
## Code After:
language: sh
env:
matrix:
- SHELL=bash
- SHELL=zsh
install:
# install antigen
- curl -L git.io/antigen > ~/antigen.zsh
- echo "source ~/antigen.zsh; antigen bundle rylnd/shpec; antigen apply" > ~/.zshrc
- echo "setopt sh_word_split" > ~/.zshenv
- zsh ~/.zshrc
- sh -c "export BINDIR=$HOME ; `curl -L https://raw.github.com/rylnd/shpec/master/install.sh`"
- $HOME/.nvm/nvm.sh
- nvm install 6 && nvm use 6
- (cd test && npm install)
- lynx --version
script:
- (cd test && node server.js &)
- sleep 1
- |
echo $SHELL && $SHELL --version
if [ "$SHELL" = "zsh" ]; then
echo "Run Zsh test"
./.travis-test.zsh
elif [ "$SHELL" = "bash" ]; then
echo "Run Bash test"
$HOME/shpec
fi
before_install:
- sudo apt-get install zsh lynx
cache: apt
notifications:
email: false
|
5da6eafbad9dbbfd1efb1964753545dfaf323377 | README.md | README.md | php-starter-template
====================
A php starter template.
Uses fitgrid: https://github.com/jayalai/fitgrd
Set .less files to compile to the css folder in your chosen compiler.
Set your local and remote urls in functions.php
Includes a rewrite rule in the .htaccess file that allows for clean urls.
| php-starter-template
====================
A php starter template.
Uses bootstrap for the grid: http://getbootstrap.com/
Set .less files to compile to the css folder in your chosen compiler.
Set your local and remote urls in functions.php
Includes a rewrite rule in the .htaccess file that allows for clean urls.
| Update readme for bootstrap switch. | Update readme for bootstrap switch.
| Markdown | mit | multiple-states/bread-butter,multiple-states/bread-butter,multiple-states/bread-butter | markdown | ## Code Before:
php-starter-template
====================
A php starter template.
Uses fitgrid: https://github.com/jayalai/fitgrd
Set .less files to compile to the css folder in your chosen compiler.
Set your local and remote urls in functions.php
Includes a rewrite rule in the .htaccess file that allows for clean urls.
## Instruction:
Update readme for bootstrap switch.
## Code After:
php-starter-template
====================
A php starter template.
Uses bootstrap for the grid: http://getbootstrap.com/
Set .less files to compile to the css folder in your chosen compiler.
Set your local and remote urls in functions.php
Includes a rewrite rule in the .htaccess file that allows for clean urls.
|
0357b2a276ae5bf988dd2e6cf89ee9cae2a14f57 | setup.py | setup.py | from setuptools import setup
setup(
name='plumbium',
version='0.0.5',
packages=['plumbium'],
zip_safe=True,
install_requires=[
'Click',
],
entry_points='''
[console_scripts]
plumbium=plumbium.cli:cli
''',
author='Jon Stutters',
author_email='j.stutters@ucl.ac.uk',
description='MRI image analysis tools',
url='https://github.com/jstutters/plumbium',
license='MIT',
classifiers=[
]
)
| from setuptools import setup
setup(
name='plumbium',
version='0.1.0',
packages=['plumbium'],
zip_safe=True,
author='Jon Stutters',
author_email='j.stutters@ucl.ac.uk',
description='Record the inputs and outputs of scripts',
url='https://github.com/jstutters/plumbium',
license='MIT',
classifiers=[
]
)
| Remove CLI stuff, bump version to 0.1.0 | Remove CLI stuff, bump version to 0.1.0
| Python | mit | jstutters/Plumbium | python | ## Code Before:
from setuptools import setup
setup(
name='plumbium',
version='0.0.5',
packages=['plumbium'],
zip_safe=True,
install_requires=[
'Click',
],
entry_points='''
[console_scripts]
plumbium=plumbium.cli:cli
''',
author='Jon Stutters',
author_email='j.stutters@ucl.ac.uk',
description='MRI image analysis tools',
url='https://github.com/jstutters/plumbium',
license='MIT',
classifiers=[
]
)
## Instruction:
Remove CLI stuff, bump version to 0.1.0
## Code After:
from setuptools import setup
setup(
name='plumbium',
version='0.1.0',
packages=['plumbium'],
zip_safe=True,
author='Jon Stutters',
author_email='j.stutters@ucl.ac.uk',
description='Record the inputs and outputs of scripts',
url='https://github.com/jstutters/plumbium',
license='MIT',
classifiers=[
]
)
|
8cc324673634837c579190078087a359d82a07f3 | assets/less/header.less | assets/less/header.less | .custom-logo {
max-height: @grid-gutter-width - 10;
width: auto;
max-width: 100%;
height: auto;
}
.page-header{
border-bottom: transparent;
margin-top: 0;
margin-bottom: @grid-gutter-width/4;
}
.archive{
.page-title{
font-size: @font-size-h2;
}
.entry-title{
font-size: @font-size-h3;
}
}
.page-title,
.entry-title{
margin-top: 0;
.text-uppercase;
letter-spacing: @letter-spacing-small;
} | .custom-logo {
max-height: @grid-gutter-width - 10;
width: auto;
max-width: 100%;
height: auto;
}
.page-header{
border-bottom: transparent;
margin-top: 0;
margin-bottom: @grid-gutter-width/4;
}
.archive{
.author-title,
.entry-title{
font-size: @font-size-h3;
}
}
.page-title,
.entry-title{
margin-top: 0;
.text-uppercase;
letter-spacing: @letter-spacing-small;
} | Update page title styling within .archive | Update page title styling within .archive
| Less | mit | keitaroinc/keitaro-theme,keitaroinc/keitaro-theme,keitaroinc/keitaro-theme | less | ## Code Before:
.custom-logo {
max-height: @grid-gutter-width - 10;
width: auto;
max-width: 100%;
height: auto;
}
.page-header{
border-bottom: transparent;
margin-top: 0;
margin-bottom: @grid-gutter-width/4;
}
.archive{
.page-title{
font-size: @font-size-h2;
}
.entry-title{
font-size: @font-size-h3;
}
}
.page-title,
.entry-title{
margin-top: 0;
.text-uppercase;
letter-spacing: @letter-spacing-small;
}
## Instruction:
Update page title styling within .archive
## Code After:
.custom-logo {
max-height: @grid-gutter-width - 10;
width: auto;
max-width: 100%;
height: auto;
}
.page-header{
border-bottom: transparent;
margin-top: 0;
margin-bottom: @grid-gutter-width/4;
}
.archive{
.author-title,
.entry-title{
font-size: @font-size-h3;
}
}
.page-title,
.entry-title{
margin-top: 0;
.text-uppercase;
letter-spacing: @letter-spacing-small;
} |
4ef9e8e2435516432a6b9ceedc62b50e3f6f2bff | app/models/metasploit/cache/license.rb | app/models/metasploit/cache/license.rb | class Metasploit::Cache::License < ActiveRecord::Base
extend ActiveSupport::Autoload
#
# Attributes
#
# @!attribute abbreviation
# Abbreviated license name
#
# @return [String]
# @!attribute summary
# Summary of the license text
#
# @return [String]
# @!attribute url
# URL of the full license text
#
# @return [String]
#
# Validations
#
validates :abbreviation,
uniqueness: true,
presence: true
validates :summary,
uniqueness: true,
presence: true
validates :url,
uniqueness: true,
presence: true
Metasploit::Concern.run(self)
end
| class Metasploit::Cache::License < ActiveRecord::Base
extend ActiveSupport::Autoload
#
# Attributes
#
# @!attribute abbreviation
# Short name of this license, e.g. "BSD-2"
#
# @return [String]
# @!attribute summary
# Summary of the license text
#
# @return [String]
# @!attribute url
# URL of the full license text
#
# @return [String]
#
# Validations
#
validates :abbreviation,
uniqueness: true,
presence: true
validates :summary,
uniqueness: true,
presence: true
validates :url,
uniqueness: true,
presence: true
# @!method abbreviation=(abbreviation)
# Sets {#abbreviation}.
#
# @param abbreviation [String] short name of this license, e.g. "BSD-2"
# @return [void]
# @!method summary=(summary)
# Sets {#summary}.
#
# @param summary [String] summary of the license text
# @return [void]
# @!method url=(url)
# Sets {#url}.
#
# @param url [String] URL to the location of the full license text
# @return [void]
Metasploit::Concern.run(self)
end
| Add some documentation to satisfy YARD plugin | Add some documentation to satisfy YARD plugin
MSP-12434
| Ruby | bsd-3-clause | rapid7/metasploit-cache,rapid7/metasploit-cache,rapid7/metasploit-cache,rapid7/metasploit-cache | ruby | ## Code Before:
class Metasploit::Cache::License < ActiveRecord::Base
extend ActiveSupport::Autoload
#
# Attributes
#
# @!attribute abbreviation
# Abbreviated license name
#
# @return [String]
# @!attribute summary
# Summary of the license text
#
# @return [String]
# @!attribute url
# URL of the full license text
#
# @return [String]
#
# Validations
#
validates :abbreviation,
uniqueness: true,
presence: true
validates :summary,
uniqueness: true,
presence: true
validates :url,
uniqueness: true,
presence: true
Metasploit::Concern.run(self)
end
## Instruction:
Add some documentation to satisfy YARD plugin
MSP-12434
## Code After:
class Metasploit::Cache::License < ActiveRecord::Base
extend ActiveSupport::Autoload
#
# Attributes
#
# @!attribute abbreviation
# Short name of this license, e.g. "BSD-2"
#
# @return [String]
# @!attribute summary
# Summary of the license text
#
# @return [String]
# @!attribute url
# URL of the full license text
#
# @return [String]
#
# Validations
#
validates :abbreviation,
uniqueness: true,
presence: true
validates :summary,
uniqueness: true,
presence: true
validates :url,
uniqueness: true,
presence: true
# @!method abbreviation=(abbreviation)
# Sets {#abbreviation}.
#
# @param abbreviation [String] short name of this license, e.g. "BSD-2"
# @return [void]
# @!method summary=(summary)
# Sets {#summary}.
#
# @param summary [String] summary of the license text
# @return [void]
# @!method url=(url)
# Sets {#url}.
#
# @param url [String] URL to the location of the full license text
# @return [void]
Metasploit::Concern.run(self)
end
|
5a0574ba1d9cba601600a34fd98a083bff55fab3 | roles/python/tasks/main.yml | roles/python/tasks/main.yml | ---
- hosts: all
become: yes
become_user: root
become_method: sudo
gather_facts: yes
tasks:
- name: Install python 2 and utils
apt:
package: [python, python-pip, ipython]
update_cache: yes
state: present
- name: Install python 3 and utils
apt:
package: [python3, python3-pip, ipython3]
update_cache: yes
state: present
| ---
- hosts: all
become: yes
become_user: root
become_method: sudo
gather_facts: yes
tasks:
- name: Install python 2 and utils
apt:
package: [python, python-pip, ipython]
update_cache: yes
state: present
- name: Install python 3 and utils
apt:
package: [python3, python3-pip, ipython3]
update_cache: yes
state: present
- name: Install pipenv
pip:
executable: pip3
name: pipenv
state: present | Add pipenv to python role | Add pipenv to python role
| YAML | unlicense | casept/ansible-playbooks,casept/ansible-playbooks,casept/ansible-playbooks | yaml | ## Code Before:
---
- hosts: all
become: yes
become_user: root
become_method: sudo
gather_facts: yes
tasks:
- name: Install python 2 and utils
apt:
package: [python, python-pip, ipython]
update_cache: yes
state: present
- name: Install python 3 and utils
apt:
package: [python3, python3-pip, ipython3]
update_cache: yes
state: present
## Instruction:
Add pipenv to python role
## Code After:
---
- hosts: all
become: yes
become_user: root
become_method: sudo
gather_facts: yes
tasks:
- name: Install python 2 and utils
apt:
package: [python, python-pip, ipython]
update_cache: yes
state: present
- name: Install python 3 and utils
apt:
package: [python3, python3-pip, ipython3]
update_cache: yes
state: present
- name: Install pipenv
pip:
executable: pip3
name: pipenv
state: present |
93fa5c92b483d23ffc661772788ad4191cecd515 | src/test/java/kamkor/covariance/CovariantArrayExample.java | src/test/java/kamkor/covariance/CovariantArrayExample.java | package kamkor.covariance;
import org.junit.Test;
public class CovariantArrayExample {
// Scala solves this by making its Arrays invariant (nonvariant)
@Test(expected = ArrayStoreException.class)
public void covariantArraysLeadToRuntimeExceptions() {
String[] c1 = { "abc" };
Object[] c2 = c1;
// OOPS! Line below throws a runtime exception: ArrayStoreException
// Reason is, that c2 is actually an instance of String array, and
// we try to update it with an Integer.
c2[0] = 1;
}
}
| package kamkor.covariance;
import org.junit.Test;
public class CovariantArrayExample {
// Scala solves this by making its Arrays invariant (nonvariant)
@Test(expected = ArrayStoreException.class)
public void covariantArraysLeadToRuntimeExceptions() {
String[] strings = { "abc" };
Object[] objects = strings;
// OOPS! Line below throws a runtime exception: ArrayStoreException
// Reason is, that objects is actually an instance of String array, and
// we try to update it with an Integer.
objects[0] = 1;
}
}
| Refactor Java covariant array example | Refactor Java covariant array example
| Java | mit | kamkor/covariance-and-contravariance-examples | java | ## Code Before:
package kamkor.covariance;
import org.junit.Test;
public class CovariantArrayExample {
// Scala solves this by making its Arrays invariant (nonvariant)
@Test(expected = ArrayStoreException.class)
public void covariantArraysLeadToRuntimeExceptions() {
String[] c1 = { "abc" };
Object[] c2 = c1;
// OOPS! Line below throws a runtime exception: ArrayStoreException
// Reason is, that c2 is actually an instance of String array, and
// we try to update it with an Integer.
c2[0] = 1;
}
}
## Instruction:
Refactor Java covariant array example
## Code After:
package kamkor.covariance;
import org.junit.Test;
public class CovariantArrayExample {
// Scala solves this by making its Arrays invariant (nonvariant)
@Test(expected = ArrayStoreException.class)
public void covariantArraysLeadToRuntimeExceptions() {
String[] strings = { "abc" };
Object[] objects = strings;
// OOPS! Line below throws a runtime exception: ArrayStoreException
// Reason is, that objects is actually an instance of String array, and
// we try to update it with an Integer.
objects[0] = 1;
}
}
|
0cd7953ebfbce3b11ec5c85f6e19b32d7f13c299 | features/supplier/supplier_applies_to_a_framework.feature | features/supplier/supplier_applies_to_a_framework.feature | @supplier-framework-application
Feature: Apply to an open framework
Background:
Given There is a framework that is open for applications
And I have a supplier user
And that supplier is logged in
Scenario: Supplier submits a framework declaration
Given I am on the /suppliers page
When I click 'Apply'
And I am on the 'Apply to framework' page for that framework application
When I click 'Make supplier declaration'
Then I am on the 'Make your supplier declaration' page
When I click 'Start your declaration'
Then I am on the 'Your declaration overview' page
When I answer all questions on that page
Then I click 'Make declaration' button
And I am on the 'Apply to framework' page for that framework application
And I see 'You’ve made the supplier declaration' text on the page
When I click 'Add, edit and complete services'
Then I am on the 'Your framework services' page for that framework application
Then I submit a service for each lot
| @supplier-framework-application
Feature: Apply to an open framework
Background:
Given There is a framework that is open for applications
And I have a supplier user
And that supplier is logged in
Scenario: Supplier submits a framework declaration
Given I am on the /suppliers page
When I click 'Apply'
And I am on the 'Apply to framework' page for that framework application
When I click 'Make supplier declaration'
Then I am on the 'Make your supplier declaration' page
When I click 'Start your declaration'
Then I am on the 'Your declaration overview' page
When I answer all questions on that page
Then I click 'Make declaration' button
And I am on the 'Apply to framework' page for that framework application
And I see 'You’ve made the supplier declaration' text on the page
When I click 'Add, edit and complete services'
Then I am on the 'Your framework services' page for that framework application
Then I submit a service for each lot
And I see '1 service will be submitted' text on the page
And I click 'Back to framework application' link for that framework application
And I see 'Your application will be submitted at' text on the page
| Check for finished application success message | Check for finished application success message
| Cucumber | mit | alphagov/digitalmarketplace-functional-tests,alphagov/digitalmarketplace-functional-tests,alphagov/digitalmarketplace-functional-tests | cucumber | ## Code Before:
@supplier-framework-application
Feature: Apply to an open framework
Background:
Given There is a framework that is open for applications
And I have a supplier user
And that supplier is logged in
Scenario: Supplier submits a framework declaration
Given I am on the /suppliers page
When I click 'Apply'
And I am on the 'Apply to framework' page for that framework application
When I click 'Make supplier declaration'
Then I am on the 'Make your supplier declaration' page
When I click 'Start your declaration'
Then I am on the 'Your declaration overview' page
When I answer all questions on that page
Then I click 'Make declaration' button
And I am on the 'Apply to framework' page for that framework application
And I see 'You’ve made the supplier declaration' text on the page
When I click 'Add, edit and complete services'
Then I am on the 'Your framework services' page for that framework application
Then I submit a service for each lot
## Instruction:
Check for finished application success message
## Code After:
@supplier-framework-application
Feature: Apply to an open framework
Background:
Given There is a framework that is open for applications
And I have a supplier user
And that supplier is logged in
Scenario: Supplier submits a framework declaration
Given I am on the /suppliers page
When I click 'Apply'
And I am on the 'Apply to framework' page for that framework application
When I click 'Make supplier declaration'
Then I am on the 'Make your supplier declaration' page
When I click 'Start your declaration'
Then I am on the 'Your declaration overview' page
When I answer all questions on that page
Then I click 'Make declaration' button
And I am on the 'Apply to framework' page for that framework application
And I see 'You’ve made the supplier declaration' text on the page
When I click 'Add, edit and complete services'
Then I am on the 'Your framework services' page for that framework application
Then I submit a service for each lot
And I see '1 service will be submitted' text on the page
And I click 'Back to framework application' link for that framework application
And I see 'Your application will be submitted at' text on the page
|
ba4e93af4c941633aba81a29b3002705f3e5982d | docker/init.sh | docker/init.sh | set -e
display_usage() {
echo "Seed dev database with data from a pg_dump file."
echo
echo "Usage:"
echo " bash docker/init.sh -f dump_file"
}
# Help
if [[ ( $1 == "--help") || ($1 == "-h")]]; then
display_usage
exit 0
fi
getopts ":f:" opt || true;
case $opt in
f)
if [ -f "$OPTARG" ]
then
FILE=$OPTARG
else
echo "Invalid path."
exit 1
fi
;;
\?)
# illegal option or argument
display_usage
exit 1
;;
:)
# -f present, but no path provided
echo "Please specify the path."
exit 1
;;
esac
if [[ $((OPTIND - $#)) -ne 1 ]]; then
# wrong number of args
display_usage
exit 1
fi
echo "Loading data from $FILE ..."
docker cp "$FILE" "$(docker-compose ps -q db)":/tmp/data.dump
docker-compose exec db bash -c "pg_restore -l /tmp/data.dump | grep -v schema_migrations | grep -v ar_internal_metadata > /tmp/restore.list"
docker-compose exec db pg_restore -L /tmp/restore.list --disable-triggers --username=postgres --verbose --no-owner -h localhost -d postgres /tmp/data.dump
docker-compose exec db rm -f /tmp/data.dump /tmp/restore.list
| set -e
display_usage() {
echo "Seed dev database with data from a pg_dump file."
echo
echo "Usage:"
echo " bash docker/init.sh -f dump_file"
}
# Help
if [[ ( $1 == "--help") || ($1 == "-h")]]; then
display_usage
exit 0
fi
getopts ":f:" opt || true;
case $opt in
f)
if [ -f "$OPTARG" ]
then
FILE=$OPTARG
else
echo "Invalid path."
exit 1
fi
;;
\?)
# illegal option or argument
display_usage
exit 1
;;
:)
# -f present, but no path provided
echo "Please specify the path."
exit 1
;;
esac
if [[ $((OPTIND - $#)) -ne 1 ]]; then
# wrong number of args
display_usage
exit 1
fi
echo "Loading data from $FILE ..."
docker cp "$FILE" "$(docker-compose ps -q db)":/tmp/data.dump
docker-compose exec db pg_restore --username=postgres --verbose --no-owner -h localhost -d postgres /tmp/data.dump
docker-compose exec db rm -f /tmp/data.dump
| Simplify data import, now that it's not being loaded into Rails-created and migrated DB. | Simplify data import, now that it's not being loaded into Rails-created and migrated DB.
| Shell | agpl-3.0 | harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o,harvard-lil/h2o | shell | ## Code Before:
set -e
display_usage() {
echo "Seed dev database with data from a pg_dump file."
echo
echo "Usage:"
echo " bash docker/init.sh -f dump_file"
}
# Help
if [[ ( $1 == "--help") || ($1 == "-h")]]; then
display_usage
exit 0
fi
getopts ":f:" opt || true;
case $opt in
f)
if [ -f "$OPTARG" ]
then
FILE=$OPTARG
else
echo "Invalid path."
exit 1
fi
;;
\?)
# illegal option or argument
display_usage
exit 1
;;
:)
# -f present, but no path provided
echo "Please specify the path."
exit 1
;;
esac
if [[ $((OPTIND - $#)) -ne 1 ]]; then
# wrong number of args
display_usage
exit 1
fi
echo "Loading data from $FILE ..."
docker cp "$FILE" "$(docker-compose ps -q db)":/tmp/data.dump
docker-compose exec db bash -c "pg_restore -l /tmp/data.dump | grep -v schema_migrations | grep -v ar_internal_metadata > /tmp/restore.list"
docker-compose exec db pg_restore -L /tmp/restore.list --disable-triggers --username=postgres --verbose --no-owner -h localhost -d postgres /tmp/data.dump
docker-compose exec db rm -f /tmp/data.dump /tmp/restore.list
## Instruction:
Simplify data import, now that it's not being loaded into Rails-created and migrated DB.
## Code After:
set -e
display_usage() {
echo "Seed dev database with data from a pg_dump file."
echo
echo "Usage:"
echo " bash docker/init.sh -f dump_file"
}
# Help
if [[ ( $1 == "--help") || ($1 == "-h")]]; then
display_usage
exit 0
fi
getopts ":f:" opt || true;
case $opt in
f)
if [ -f "$OPTARG" ]
then
FILE=$OPTARG
else
echo "Invalid path."
exit 1
fi
;;
\?)
# illegal option or argument
display_usage
exit 1
;;
:)
# -f present, but no path provided
echo "Please specify the path."
exit 1
;;
esac
if [[ $((OPTIND - $#)) -ne 1 ]]; then
# wrong number of args
display_usage
exit 1
fi
echo "Loading data from $FILE ..."
docker cp "$FILE" "$(docker-compose ps -q db)":/tmp/data.dump
docker-compose exec db pg_restore --username=postgres --verbose --no-owner -h localhost -d postgres /tmp/data.dump
docker-compose exec db rm -f /tmp/data.dump
|
0ebc30ef44b4f19f440f0939efeabf5a86d727b6 | template/scripts/prepare-build.sh | template/scripts/prepare-build.sh |
set -e
set -u
CURDIR=$(dirname "$0")
cd $CURDIR/..
rm -rf build
mkdir build
cd build
SYSNAME=$(uname -s)
if [[ "${SYSNAME:0:5}" == "MINGW" ]]; then
cmake -G "Visual Studio 12" ..
else
cmake -G "Unix Makefiles" ..
fi
|
set -e
set -u
CURDIR=$(dirname "$0")
cd $CURDIR/..
rm -rf build
mkdir build
cd build
SYSNAME=$(uname -s)
if [[ "${SYSNAME:0:5}" == "MINGW" ]]; then
# use "Visual Studio 9 2008" for VS 2008
cmake -G "Visual Studio 12" ..
else
cmake -G "Unix Makefiles" ..
fi
| Add info about VS 2008. | Add info about VS 2008.
| Shell | mit | mrts/snippets-cpp,mrts/snippets-cpp | shell | ## Code Before:
set -e
set -u
CURDIR=$(dirname "$0")
cd $CURDIR/..
rm -rf build
mkdir build
cd build
SYSNAME=$(uname -s)
if [[ "${SYSNAME:0:5}" == "MINGW" ]]; then
cmake -G "Visual Studio 12" ..
else
cmake -G "Unix Makefiles" ..
fi
## Instruction:
Add info about VS 2008.
## Code After:
set -e
set -u
CURDIR=$(dirname "$0")
cd $CURDIR/..
rm -rf build
mkdir build
cd build
SYSNAME=$(uname -s)
if [[ "${SYSNAME:0:5}" == "MINGW" ]]; then
# use "Visual Studio 9 2008" for VS 2008
cmake -G "Visual Studio 12" ..
else
cmake -G "Unix Makefiles" ..
fi
|
5951b7e3659680cdef8de79ce064f8f9165bc510 | .travis.yml | .travis.yml | language: csharp
mono: none
dotnet: 2.2
dist: xenial
before_install:
- chmod +x ./publish.sh
script:
- ./publish.sh | language: csharp
services: docker
script:
- docker build .
| Make attempt at making Travis CI use Docker | Make attempt at making Travis CI use Docker | YAML | mit | amoerie/teamcity-theatre,amoerie/teamcity-theatre,amoerie/teamcity-theatre,amoerie/teamcity-theatre,amoerie/teamcity-theatre | yaml | ## Code Before:
language: csharp
mono: none
dotnet: 2.2
dist: xenial
before_install:
- chmod +x ./publish.sh
script:
- ./publish.sh
## Instruction:
Make attempt at making Travis CI use Docker
## Code After:
language: csharp
services: docker
script:
- docker build .
|
5e182b8d9943f1b17008d69d4c7e865dc83641a7 | google/cloud/oslogin/v1/oslogin_v1.yaml | google/cloud/oslogin/v1/oslogin_v1.yaml | type: google.api.Service
config_version: 3
name: oslogin.googleapis.com
title: Cloud OS Login API
apis:
- name: google.cloud.oslogin.v1.OsLoginService
documentation:
summary: |-
You can use OS Login to manage access to your VM instances using IAM roles.
For more information, read [OS Login](/compute/docs/oslogin/).
backend:
rules:
- selector: 'google.cloud.oslogin.v1.OsLoginService.*'
deadline: 10.0
authentication:
rules:
- selector: 'google.cloud.oslogin.v1.OsLoginService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/compute
| type: google.api.Service
config_version: 3
name: oslogin.googleapis.com
title: Cloud OS Login API
apis:
- name: google.cloud.oslogin.v1.OsLoginService
documentation:
summary: You can use OS Login to manage access to your VM instances using IAM roles.
backend:
rules:
- selector: 'google.cloud.oslogin.v1.OsLoginService.*'
deadline: 10.0
authentication:
rules:
- selector: 'google.cloud.oslogin.v1.OsLoginService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/compute
| Update the OS Login API description to render better in the UI. | Update the OS Login API description to render better in the UI.
PiperOrigin-RevId: 288546443
| YAML | apache-2.0 | googleapis/googleapis,googleapis/googleapis | yaml | ## Code Before:
type: google.api.Service
config_version: 3
name: oslogin.googleapis.com
title: Cloud OS Login API
apis:
- name: google.cloud.oslogin.v1.OsLoginService
documentation:
summary: |-
You can use OS Login to manage access to your VM instances using IAM roles.
For more information, read [OS Login](/compute/docs/oslogin/).
backend:
rules:
- selector: 'google.cloud.oslogin.v1.OsLoginService.*'
deadline: 10.0
authentication:
rules:
- selector: 'google.cloud.oslogin.v1.OsLoginService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/compute
## Instruction:
Update the OS Login API description to render better in the UI.
PiperOrigin-RevId: 288546443
## Code After:
type: google.api.Service
config_version: 3
name: oslogin.googleapis.com
title: Cloud OS Login API
apis:
- name: google.cloud.oslogin.v1.OsLoginService
documentation:
summary: You can use OS Login to manage access to your VM instances using IAM roles.
backend:
rules:
- selector: 'google.cloud.oslogin.v1.OsLoginService.*'
deadline: 10.0
authentication:
rules:
- selector: 'google.cloud.oslogin.v1.OsLoginService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform,
https://www.googleapis.com/auth/compute
|
e1ef65347c008c6f58465e5c096d299a84069860 | .travis.yml | .travis.yml | language: node_js
node_js:
- "node"
cache:
directories:
- node_modules
notifications:
irc:
channels:
- "irc.freenode.net#powertip"
skip_join: true
| language: node_js
sudo: false
node_js:
- "node"
cache:
directories:
- node_modules
notifications:
irc:
channels:
- "irc.freenode.net#powertip"
skip_join: true
| Set sudo: false in Travis CI configuration file | Set sudo: false in Travis CI configuration file
This setting should tell travis that this project can be run in
their container based environment, which should be able to complete
the testing process faster than the sudo enabled environment.
| YAML | mit | stevenbenner/jquery-powertip,jasco/jquery-powertip,jasco/jquery-powertip,stevenbenner/jquery-powertip | yaml | ## Code Before:
language: node_js
node_js:
- "node"
cache:
directories:
- node_modules
notifications:
irc:
channels:
- "irc.freenode.net#powertip"
skip_join: true
## Instruction:
Set sudo: false in Travis CI configuration file
This setting should tell travis that this project can be run in
their container based environment, which should be able to complete
the testing process faster than the sudo enabled environment.
## Code After:
language: node_js
sudo: false
node_js:
- "node"
cache:
directories:
- node_modules
notifications:
irc:
channels:
- "irc.freenode.net#powertip"
skip_join: true
|
b90d27f71786b733bddc1422688d3e8ebd65c24c | samples/elb.rb | samples/elb.rb | $: << File.expand_path("../../lib", __FILE__)
require 'aws/elb'
##
# Expects your Amazon keys to be in the environment, something like
#
# export AWS_KEY="KEY"
# export AWS_SECRET="SECRET"
##
$elb = AWS::ELB.new ENV["AWS_KEY"], ENV["AWS_SECRET"]
puts "", "Your Load Balancers", ""
p $elb.describe_load_balancesr
| $: << File.expand_path("../../lib", __FILE__)
require 'aws/elb'
##
# Expects your Amazon keys to be in the environment, something like
#
# export AWS_KEY="KEY"
# export AWS_SECRET="SECRET"
##
$elb = AWS::ELB.new ENV["AWS_KEY"], ENV["AWS_SECRET"]
puts "", "Your Load Balancers", ""
$elb.describe_load_balancers.describe_load_balancers_result.load_balancer_descriptions.each do |elb|
puts "Name: #{elb.load_balancer_name}"
puts "HealthCheck: #{elb.health_check.inspect}"
elb.listener_descriptions.each do |desc|
l = desc.listener
puts "Listener: #{l.protocol}:#{l.load_balancer_port} => #{l.instance_protocol}:#{l.instance_port}"
end
puts ""
end
| Update ELB sample to show usage | Update ELB sample to show usage
| Ruby | mit | jasonroelofs/simple_aws | ruby | ## Code Before:
$: << File.expand_path("../../lib", __FILE__)
require 'aws/elb'
##
# Expects your Amazon keys to be in the environment, something like
#
# export AWS_KEY="KEY"
# export AWS_SECRET="SECRET"
##
$elb = AWS::ELB.new ENV["AWS_KEY"], ENV["AWS_SECRET"]
puts "", "Your Load Balancers", ""
p $elb.describe_load_balancesr
## Instruction:
Update ELB sample to show usage
## Code After:
$: << File.expand_path("../../lib", __FILE__)
require 'aws/elb'
##
# Expects your Amazon keys to be in the environment, something like
#
# export AWS_KEY="KEY"
# export AWS_SECRET="SECRET"
##
$elb = AWS::ELB.new ENV["AWS_KEY"], ENV["AWS_SECRET"]
puts "", "Your Load Balancers", ""
$elb.describe_load_balancers.describe_load_balancers_result.load_balancer_descriptions.each do |elb|
puts "Name: #{elb.load_balancer_name}"
puts "HealthCheck: #{elb.health_check.inspect}"
elb.listener_descriptions.each do |desc|
l = desc.listener
puts "Listener: #{l.protocol}:#{l.load_balancer_port} => #{l.instance_protocol}:#{l.instance_port}"
end
puts ""
end
|
710145ea0e86a59ba7911e29c6d83560b4750b16 | app/src/sass/liveeditor.scss | app/src/sass/liveeditor.scss | .bolt-editable {
outline: 2px #bef092 solid;
}
| .bolt-editable {
outline: 2px #bef092 solid;
min-height: 10px;
}
| Add min-height to editable content | Add min-height to editable content
| SCSS | mit | lenvanessen/bolt,Raistlfiren/bolt,nantunes/bolt,winiceo/bolt,richardhinkamp/bolt,CarsonF/bolt,hugin2005/bolt,marcin-piela/bolt,HonzaMikula/bolt,nantunes/bolt,bolt/bolt,joshuan/bolt,skript-cc/bolt,Eiskis/bolt-base,rossriley/bolt,Calinou/bolt,rarila/bolt,richardhinkamp/bolt,pygillier/bolt,hugin2005/bolt,GDmac/bolt,hannesl/bolt,electrolinux/bolt,cdowdy/bolt,one988/cm,bolt/bolt,CarsonF/bolt,skript-cc/bolt,Intendit/bolt,xeddmc/bolt,joshuan/bolt,nikgo/bolt,marcin-piela/bolt,lenvanessen/bolt,Intendit/bolt,bywatersolutions/reports-site,codesman/bolt,kendoctor/bolt,hugin2005/bolt,romulo1984/bolt,electrolinux/bolt,GDmac/bolt,Raistlfiren/bolt,CarsonF/bolt,rarila/bolt,bywatersolutions/reports-site,Intendit/bolt,marcin-piela/bolt,HonzaMikula/masivnipostele,rarila/bolt,CarsonF/bolt,tekjava/bolt,GawainLynch/bolt,codesman/bolt,codesman/bolt,nikgo/bolt,richardhinkamp/bolt,rossriley/bolt,HonzaMikula/masivnipostele,lenvanessen/bolt,Eiskis/bolt-base,xeddmc/bolt,nantunes/bolt,pygillier/bolt,bolt/bolt,richardhinkamp/bolt,HonzaMikula/bolt,hannesl/bolt,GawainLynch/bolt,romulo1984/bolt,bywatersolutions/reports-site,marcin-piela/bolt,pygillier/bolt,Raistlfiren/bolt,joshuan/bolt,tekjava/bolt,bywatersolutions/reports-site,nikgo/bolt,GDmac/bolt,winiceo/bolt,nikgo/bolt,rossriley/bolt,HonzaMikula/masivnipostele,xeddmc/bolt,skript-cc/bolt,HonzaMikula/masivnipostele,hugin2005/bolt,Eiskis/bolt-base,GawainLynch/bolt,tekjava/bolt,Calinou/bolt,winiceo/bolt,xeddmc/bolt,Eiskis/bolt-base,one988/cm,pygillier/bolt,one988/cm,Calinou/bolt,hannesl/bolt,electrolinux/bolt,joshuan/bolt,kendoctor/bolt,GDmac/bolt,lenvanessen/bolt,one988/cm,kendoctor/bolt,cdowdy/bolt,tekjava/bolt,cdowdy/bolt,bolt/bolt,hannesl/bolt,romulo1984/bolt,winiceo/bolt,electrolinux/bolt,codesman/bolt,rarila/bolt,kendoctor/bolt,romulo1984/bolt,HonzaMikula/bolt,HonzaMikula/bolt,nantunes/bolt,Intendit/bolt,Raistlfiren/bolt,skript-cc/bolt,GawainLynch/bolt,rossriley/bolt,cdowdy/bolt,Calinou/bolt | scss | ## Code Before:
.bolt-editable {
outline: 2px #bef092 solid;
}
## Instruction:
Add min-height to editable content
## Code After:
.bolt-editable {
outline: 2px #bef092 solid;
min-height: 10px;
}
|
1d97e2db0b74ce358fbf634e59193a288947d4c4 | features/user_sees_static_stuff.feature | features/user_sees_static_stuff.feature | Feature: User views static pages
In order to let users know about the site
I can navigate to how E-petitions works and help pages
Scenario: I navigate to the home page
When I go to the home page
Then I should see "Petition parliament" in the browser page title
And the markup should be valid
# css is not entirely valid but useful to run to see any real no-nos
# And the css files should be valid
Scenario: I navigate to How e-petitions works
When I go to the home page
And I follow "How e-petitions work" within "//*[@id='footer']"
Then I should be on the how e-Petitions works page
And I should see "How e-petitions works - e-petitions" in the browser page title
And the markup should be valid
Scenario: I navigate to Help
When I go to the home page
And I follow "Help"
Then I should be on the help page
And I should see "Help using the Petition Parliament service" in the browser page title
And the markup should be valid
| Feature: User views static pages
In order to let users know about the site
I can navigate to how E-petitions works and help pages
Scenario: I navigate to the home page
When I go to the home page
Then I should see "Petition parliament" in the browser page title
And the markup should be valid
# css is not entirely valid but useful to run to see any real no-nos
# And the css files should be valid
Scenario: I navigate to Help
When I go to the home page
And I follow "Help"
Then I should be on the help page
And I should see "Help" in the browser page title
And the markup should be valid
| Fix failing feature tests for Help page | Fix failing feature tests for Help page
| Cucumber | mit | StatesOfJersey/e-petitions,alphagov/e-petitions,telekomatrix/e-petitions,telekomatrix/e-petitions,StatesOfJersey/e-petitions,unboxed/e-petitions,unboxed/e-petitions,joelanman/e-petitions,unboxed/e-petitions,telekomatrix/e-petitions,StatesOfJersey/e-petitions,joelanman/e-petitions,alphagov/e-petitions,alphagov/e-petitions,ansonK/e-petitions,StatesOfJersey/e-petitions,alphagov/e-petitions,joelanman/e-petitions,oskarpearson/e-petitions,oskarpearson/e-petitions,unboxed/e-petitions,oskarpearson/e-petitions,ansonK/e-petitions,ansonK/e-petitions | cucumber | ## Code Before:
Feature: User views static pages
In order to let users know about the site
I can navigate to how E-petitions works and help pages
Scenario: I navigate to the home page
When I go to the home page
Then I should see "Petition parliament" in the browser page title
And the markup should be valid
# css is not entirely valid but useful to run to see any real no-nos
# And the css files should be valid
Scenario: I navigate to How e-petitions works
When I go to the home page
And I follow "How e-petitions work" within "//*[@id='footer']"
Then I should be on the how e-Petitions works page
And I should see "How e-petitions works - e-petitions" in the browser page title
And the markup should be valid
Scenario: I navigate to Help
When I go to the home page
And I follow "Help"
Then I should be on the help page
And I should see "Help using the Petition Parliament service" in the browser page title
And the markup should be valid
## Instruction:
Fix failing feature tests for Help page
## Code After:
Feature: User views static pages
In order to let users know about the site
I can navigate to how E-petitions works and help pages
Scenario: I navigate to the home page
When I go to the home page
Then I should see "Petition parliament" in the browser page title
And the markup should be valid
# css is not entirely valid but useful to run to see any real no-nos
# And the css files should be valid
Scenario: I navigate to Help
When I go to the home page
And I follow "Help"
Then I should be on the help page
And I should see "Help" in the browser page title
And the markup should be valid
|
d8c2a7d6e3d41f4a45ec1c7d6f212786c2ddad05 | LZW/test_fast_LZW.sh | LZW/test_fast_LZW.sh |
make > /dev/null
array=(../samples/*)
printf "%40s %10s %10s -> %10s\n" "file_name" "state" "test_size" "enc_size "
echo "----------------------------------------------------------------------------"
for i in "${array[@]}"
do
./LZW_fast_encoder $i > /dev/null
./LZW_fast_decoder LZW_encoded.fastlzw > /dev/null
DIFF=$(diff LZW_decoded.txt $i)
if [ -r LZW_decoded.txt ] && [ -r $i ] && [ "$DIFF" == "" ]
then
originalsize=$(wc -c < $i)
encodedsize=$(wc -c < "LZW_encoded.fastlzw")
printf "%40s %10s %10s -> %10s\n" $i "CORRECT" $originalsize $encodedsize
else
printf "%40s %10s %10s -> %10s\n" $i "FALSE" "N/A" "N/A"
fi
done
make clean > /dev/null |
make > /dev/null
array=(../samples/*)
printf "%40s %10s %10s -> %10s (%10s)\n" "file_name" "state" "orig_size" "enc_size" "diff_size"
echo "------------------------------------------------------------------------------------------"
for i in "${array[@]}"
do
./LZW_fast_encoder $i > /dev/null
./LZW_fast_decoder LZW_encoded.fastlzw > /dev/null
DIFF=$(diff LZW_decoded.txt $i)
if [ -r LZW_decoded.txt ] && [ -r $i ] && [ "$DIFF" == "" ]
then
originalsize=$(wc -c < $i)
encodedsize=$(wc -c < "LZW_encoded.fastlzw")
diffsize=`expr $originalsize - $encodedsize`
printf "%40s %10s %10s -> %10s (%10s)\n" $i "CORRECT" $originalsize $encodedsize $diffsize
else
printf "%40s %10s %10s -> %10s (%10s)\n" $i "FALSE" "N/A" "N/A" "N/A"
fi
done
make clean > /dev/null | Test script now prints how many bytes were saved. | LZW: Test script now prints how many bytes were saved.
| Shell | mit | ippeb/LosslessDataCompression,ippeb/LosslessDataCompression | shell | ## Code Before:
make > /dev/null
array=(../samples/*)
printf "%40s %10s %10s -> %10s\n" "file_name" "state" "test_size" "enc_size "
echo "----------------------------------------------------------------------------"
for i in "${array[@]}"
do
./LZW_fast_encoder $i > /dev/null
./LZW_fast_decoder LZW_encoded.fastlzw > /dev/null
DIFF=$(diff LZW_decoded.txt $i)
if [ -r LZW_decoded.txt ] && [ -r $i ] && [ "$DIFF" == "" ]
then
originalsize=$(wc -c < $i)
encodedsize=$(wc -c < "LZW_encoded.fastlzw")
printf "%40s %10s %10s -> %10s\n" $i "CORRECT" $originalsize $encodedsize
else
printf "%40s %10s %10s -> %10s\n" $i "FALSE" "N/A" "N/A"
fi
done
make clean > /dev/null
## Instruction:
LZW: Test script now prints how many bytes were saved.
## Code After:
make > /dev/null
array=(../samples/*)
printf "%40s %10s %10s -> %10s (%10s)\n" "file_name" "state" "orig_size" "enc_size" "diff_size"
echo "------------------------------------------------------------------------------------------"
for i in "${array[@]}"
do
./LZW_fast_encoder $i > /dev/null
./LZW_fast_decoder LZW_encoded.fastlzw > /dev/null
DIFF=$(diff LZW_decoded.txt $i)
if [ -r LZW_decoded.txt ] && [ -r $i ] && [ "$DIFF" == "" ]
then
originalsize=$(wc -c < $i)
encodedsize=$(wc -c < "LZW_encoded.fastlzw")
diffsize=`expr $originalsize - $encodedsize`
printf "%40s %10s %10s -> %10s (%10s)\n" $i "CORRECT" $originalsize $encodedsize $diffsize
else
printf "%40s %10s %10s -> %10s (%10s)\n" $i "FALSE" "N/A" "N/A" "N/A"
fi
done
make clean > /dev/null |
8ae6e6cbb912c12ab406755ad0b2735d382cf218 | .travis.yml | .travis.yml | ---
language: ruby
rvm: 2.0.0
before_install:
- gem install bundler --no-ri --no-rdoc
script: CODECLIMATE_REPO_TOKEN=x bundle && bundle exec rspec
addons:
code_climate:
repo_token: x
| ---
language: ruby
rvm: 2.0.0
before_install:
- gem install bundler --no-ri --no-rdoc
script: CODECLIMATE_REPO_TOKEN=2f6f03ad98447b63d5ad55055331c2fbd76526fbffdc5365d4a3b9e3d59dbc70 bundle && bundle exec rspec
addons:
code_climate:
repo_token: 2f6f03ad98447b63d5ad55055331c2fbd76526fbffdc5365d4a3b9e3d59dbc70
| Add codeclimate test coverage token | Add codeclimate test coverage token
| YAML | apache-2.0 | distribot/distribot-planner | yaml | ## Code Before:
---
language: ruby
rvm: 2.0.0
before_install:
- gem install bundler --no-ri --no-rdoc
script: CODECLIMATE_REPO_TOKEN=x bundle && bundle exec rspec
addons:
code_climate:
repo_token: x
## Instruction:
Add codeclimate test coverage token
## Code After:
---
language: ruby
rvm: 2.0.0
before_install:
- gem install bundler --no-ri --no-rdoc
script: CODECLIMATE_REPO_TOKEN=2f6f03ad98447b63d5ad55055331c2fbd76526fbffdc5365d4a3b9e3d59dbc70 bundle && bundle exec rspec
addons:
code_climate:
repo_token: 2f6f03ad98447b63d5ad55055331c2fbd76526fbffdc5365d4a3b9e3d59dbc70
|
da386846184565ea584d48fa099732b22cf06f1b | lib/cc/engine/analyzers/file_list.rb | lib/cc/engine/analyzers/file_list.rb | require "pathname"
module CC
module Engine
module Analyzers
class FileList
def initialize(engine_config:, patterns:)
@engine_config = engine_config
@patterns = patterns
end
def files
engine_config.include_paths.flat_map do |path|
if path.end_with?("/")
expand(path)
elsif matches?(path)
[path]
else
[]
end
end
end
private
attr_reader :engine_config, :patterns
def expand(path)
globs = patterns.map { |p| File.join(path, p) }
Dir.glob(globs)
end
def matches?(path)
patterns.any? do |p|
File.fnmatch?(File.join("./", p), path, File::FNM_PATHNAME)
end
end
end
end
end
end
| require "pathname"
module CC
module Engine
module Analyzers
class FileList
def initialize(engine_config:, patterns:)
@engine_config = engine_config
@patterns = patterns
end
def files
engine_config.include_paths.flat_map do |path|
if path.end_with?("/")
expand(path)
elsif matches?(path)
[path]
else
[]
end
end
end
private
attr_reader :engine_config, :patterns
def expand(path)
globs = patterns.map { |p| File.join(relativize(path), p) }
Dir.glob(globs)
end
def matches?(path)
patterns.any? do |p|
File.fnmatch?(
relativize(p),
relativize(path),
File::FNM_PATHNAME | File::FNM_EXTGLOB
)
end
end
# Ensure all paths (and patterns) are ./-prefixed
def relativize(path)
"./#{path.sub(%r{^\./}, "")}"
end
end
end
end
end
| Adjust file matching and expansion | Adjust file matching and expansion
The include_paths may or may not be ./-prefixed (they usually aren't,
but there's the notable case of ["./"]). Patterns are never ./-prefixed
(they can't be for the purposes of relative expansion). Given this
uncertainty, it's possible to drop files if you're not careful in how
you match or expand. In addition to this, fingerprints in the wild are
all computed with ./-prefixed paths. For all these reasons, we need to
normalize the prefixing of paths and patterns in FileList.
| Ruby | mit | codeclimate/codeclimate-duplication,codeclimate/codeclimate-duplication,codeclimate/codeclimate-duplication,codeclimate/codeclimate-duplication | ruby | ## Code Before:
require "pathname"
module CC
module Engine
module Analyzers
class FileList
def initialize(engine_config:, patterns:)
@engine_config = engine_config
@patterns = patterns
end
def files
engine_config.include_paths.flat_map do |path|
if path.end_with?("/")
expand(path)
elsif matches?(path)
[path]
else
[]
end
end
end
private
attr_reader :engine_config, :patterns
def expand(path)
globs = patterns.map { |p| File.join(path, p) }
Dir.glob(globs)
end
def matches?(path)
patterns.any? do |p|
File.fnmatch?(File.join("./", p), path, File::FNM_PATHNAME)
end
end
end
end
end
end
## Instruction:
Adjust file matching and expansion
The include_paths may or may not be ./-prefixed (they usually aren't,
but there's the notable case of ["./"]). Patterns are never ./-prefixed
(they can't be for the purposes of relative expansion). Given this
uncertainty, it's possible to drop files if you're not careful in how
you match or expand. In addition to this, fingerprints in the wild are
all computed with ./-prefixed paths. For all these reasons, we need to
normalize the prefixing of paths and patterns in FileList.
## Code After:
require "pathname"
module CC
module Engine
module Analyzers
class FileList
def initialize(engine_config:, patterns:)
@engine_config = engine_config
@patterns = patterns
end
def files
engine_config.include_paths.flat_map do |path|
if path.end_with?("/")
expand(path)
elsif matches?(path)
[path]
else
[]
end
end
end
private
attr_reader :engine_config, :patterns
def expand(path)
globs = patterns.map { |p| File.join(relativize(path), p) }
Dir.glob(globs)
end
def matches?(path)
patterns.any? do |p|
File.fnmatch?(
relativize(p),
relativize(path),
File::FNM_PATHNAME | File::FNM_EXTGLOB
)
end
end
# Ensure all paths (and patterns) are ./-prefixed
def relativize(path)
"./#{path.sub(%r{^\./}, "")}"
end
end
end
end
end
|
69ae80b20d5b20b83d00899c2d326a7319c7143e | .travis.yml | .travis.yml | language: java
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
env:
- DOCKER_COMPOSE_VERSION=1.24.0
install: mvn install -B
before_script:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose up -d
- sleep 200
script:
- cd int-tests
- mvn test -B
after_failure:
- docker-compose logs
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
docker push nels/trackfind:latest;
fi;
if [ -n "$TRAVIS_TAG" ]; then
docker tag nels/trackfind:latest nels/trackfind:$TRAVIS_TAG;
docker push nels/trackfind:$TRAVIS_TAG;
fi
| dist: trusty
language: java
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
env:
- DOCKER_COMPOSE_VERSION=1.24.0
install: mvn install -B
before_script:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose up -d
- sleep 200
script:
- cd int-tests
- mvn test -B
after_failure:
- docker-compose logs
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
docker push nels/trackfind:latest;
fi;
if [ -n "$TRAVIS_TAG" ]; then
docker tag nels/trackfind:latest nels/trackfind:$TRAVIS_TAG;
docker push nels/trackfind:$TRAVIS_TAG;
fi
| Add "dist: trusty" to fix Travis issues | Add "dist: trusty" to fix Travis issues
| YAML | mit | elixir-no-nels/trackfind,elixir-no-nels/trackfind,elixir-no-nels/trackfind | yaml | ## Code Before:
language: java
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
env:
- DOCKER_COMPOSE_VERSION=1.24.0
install: mvn install -B
before_script:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose up -d
- sleep 200
script:
- cd int-tests
- mvn test -B
after_failure:
- docker-compose logs
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
docker push nels/trackfind:latest;
fi;
if [ -n "$TRAVIS_TAG" ]; then
docker tag nels/trackfind:latest nels/trackfind:$TRAVIS_TAG;
docker push nels/trackfind:$TRAVIS_TAG;
fi
## Instruction:
Add "dist: trusty" to fix Travis issues
## Code After:
dist: trusty
language: java
jdk:
- oraclejdk8
cache:
directories:
- $HOME/.m2
env:
- DOCKER_COMPOSE_VERSION=1.24.0
install: mvn install -B
before_script:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose up -d
- sleep 200
script:
- cd int-tests
- mvn test -B
after_failure:
- docker-compose logs
after_success:
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
if [[ "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PULL_REQUEST" == "false" ]]; then
docker push nels/trackfind:latest;
fi;
if [ -n "$TRAVIS_TAG" ]; then
docker tag nels/trackfind:latest nels/trackfind:$TRAVIS_TAG;
docker push nels/trackfind:$TRAVIS_TAG;
fi
|
ad5fa17cc1f2287ca1dea2e3c03523a7f6e5a93e | src/core/permissionDirective.js | src/core/permissionDirective.js | (function () {
'use strict';
/**
* Show/hide elements based on provided permissions/roles
*
* @example
* <div permission only="'USER'"></div>
* <div permission only="['USER','ADMIN']" except="'MANAGER'"></div>
* <div permission except="'MANAGER'"></div>
*/
angular
.module('permission')
.directive('permission', function ($log, Authorization, PermissionMap) {
return {
restrict: 'A',
bindToController: {
only: '=',
except: '='
},
controllerAs: 'permission',
controller: function ($scope, $element) {
var permission = this;
$scope.$watchGroup(['permission.only', 'permission.except'],
function () {
try {
Authorization
.authorize(new PermissionMap({
only: permission.only,
except: permission.except
}), null)
.then(function () {
$element.removeClass('ng-hide');
})
.catch(function () {
$element.addClass('ng-hide');
});
} catch (e) {
$element.addClass('ng-hide');
$log.error(e.message);
}
});
}
};
});
}());
| (function () {
'use strict';
/**
* Show/hide elements based on provided permissions/roles
*
* @example
* <div permission only="'USER'"></div>
* <div permission only="['USER','ADMIN']" except="'MANAGER'"></div>
* <div permission except="'MANAGER'"></div>
*/
angular
.module('permission')
.directive('permission', function ($log, Authorization, PermissionMap) {
return {
restrict: 'A',
scope: true,
bindToController: {
only: '=',
except: '='
},
controllerAs: 'permission',
controller: function ($scope, $element) {
var permission = this;
$scope.$watchGroup(['permission.only', 'permission.except'],
function () {
try {
Authorization
.authorize(new PermissionMap({
only: permission.only,
except: permission.except
}), null)
.then(function () {
$element.removeClass('ng-hide');
})
.catch(function () {
$element.addClass('ng-hide');
});
} catch (e) {
$element.addClass('ng-hide');
$log.error(e.message);
}
});
}
};
});
}());
| Add isolate scope to permission directive. | Add isolate scope to permission directive.
| JavaScript | mit | Narzerus/angular-permission,Narzerus/angular-permission | javascript | ## Code Before:
(function () {
'use strict';
/**
* Show/hide elements based on provided permissions/roles
*
* @example
* <div permission only="'USER'"></div>
* <div permission only="['USER','ADMIN']" except="'MANAGER'"></div>
* <div permission except="'MANAGER'"></div>
*/
angular
.module('permission')
.directive('permission', function ($log, Authorization, PermissionMap) {
return {
restrict: 'A',
bindToController: {
only: '=',
except: '='
},
controllerAs: 'permission',
controller: function ($scope, $element) {
var permission = this;
$scope.$watchGroup(['permission.only', 'permission.except'],
function () {
try {
Authorization
.authorize(new PermissionMap({
only: permission.only,
except: permission.except
}), null)
.then(function () {
$element.removeClass('ng-hide');
})
.catch(function () {
$element.addClass('ng-hide');
});
} catch (e) {
$element.addClass('ng-hide');
$log.error(e.message);
}
});
}
};
});
}());
## Instruction:
Add isolate scope to permission directive.
## Code After:
(function () {
'use strict';
/**
* Show/hide elements based on provided permissions/roles
*
* @example
* <div permission only="'USER'"></div>
* <div permission only="['USER','ADMIN']" except="'MANAGER'"></div>
* <div permission except="'MANAGER'"></div>
*/
angular
.module('permission')
.directive('permission', function ($log, Authorization, PermissionMap) {
return {
restrict: 'A',
scope: true,
bindToController: {
only: '=',
except: '='
},
controllerAs: 'permission',
controller: function ($scope, $element) {
var permission = this;
$scope.$watchGroup(['permission.only', 'permission.except'],
function () {
try {
Authorization
.authorize(new PermissionMap({
only: permission.only,
except: permission.except
}), null)
.then(function () {
$element.removeClass('ng-hide');
})
.catch(function () {
$element.addClass('ng-hide');
});
} catch (e) {
$element.addClass('ng-hide');
$log.error(e.message);
}
});
}
};
});
}());
|
91c922ac32d68db8965f335f13882c51f73bb522 | public/robot-kata.js | public/robot-kata.js | console.log("Hello Robot Kata!");
var floorContext = document.getElementById('floor').getContext('2d');
var floorImage = new Image();
var floorOffset = $('#floor').offset();
floorImage.src = 'roomba-dock.png';
floorImage.onload = function () {
floorContext.drawImage(floorImage, 0, 0);
};
$('#floor').mousemove(function (e) {
var x = Math.floor(e.pageX - floorOffset.left);
var y = Math.floor(e.pageY - floorOffset.top);
console.log(floorContext.getImageData(x, y, 1, 1).data);
});
| loadFloorImage(function () {
console.log("Hello Robot Kata!");
});
var floor = {
context: $('#floor')[0].getContext('2d'),
offset: $('#floor').offset(),
getPosition: function (e) {
return {
x: Math.floor(e.pageX - this.offset.left),
y: Math.floor(e.pageY - this.offset.top)
}
}
}
function loadFloorImage(callback) {
var image = new Image();
image.src = 'roomba-dock.png';
image.onload = function () {
floor.context.drawImage(this, 0, 0);
callback();
}
}
function getColor(pos) {
var imageData = floor.context.getImageData(pos.x, pos.y, 1, 1).data;
var r = imageData[0];
var g = imageData[1];
var b = imageData[2];
var threshold = 192;
if (r > threshold && g > threshold && b > threshold) {
return 'white';
} else if (r > threshold && g > threshold) {
return 'yellow';
} else if (r > threshold) {
return 'red';
} else if (g > threshold) {
return 'green';
} else if (b > threshold) {
return 'blue';
} else {
return 'black';
}
}
$('#floor').mousemove(function (e) {
console.log(getColor(floor.getPosition(e)));
});
| Refactor and add function to determine color | Refactor and add function to determine color
| JavaScript | mit | ideal-knee/robot-kata-js,ideal-knee/robot-kata-js,ideal-knee/robot-kata-js | javascript | ## Code Before:
console.log("Hello Robot Kata!");
var floorContext = document.getElementById('floor').getContext('2d');
var floorImage = new Image();
var floorOffset = $('#floor').offset();
floorImage.src = 'roomba-dock.png';
floorImage.onload = function () {
floorContext.drawImage(floorImage, 0, 0);
};
$('#floor').mousemove(function (e) {
var x = Math.floor(e.pageX - floorOffset.left);
var y = Math.floor(e.pageY - floorOffset.top);
console.log(floorContext.getImageData(x, y, 1, 1).data);
});
## Instruction:
Refactor and add function to determine color
## Code After:
loadFloorImage(function () {
console.log("Hello Robot Kata!");
});
var floor = {
context: $('#floor')[0].getContext('2d'),
offset: $('#floor').offset(),
getPosition: function (e) {
return {
x: Math.floor(e.pageX - this.offset.left),
y: Math.floor(e.pageY - this.offset.top)
}
}
}
function loadFloorImage(callback) {
var image = new Image();
image.src = 'roomba-dock.png';
image.onload = function () {
floor.context.drawImage(this, 0, 0);
callback();
}
}
function getColor(pos) {
var imageData = floor.context.getImageData(pos.x, pos.y, 1, 1).data;
var r = imageData[0];
var g = imageData[1];
var b = imageData[2];
var threshold = 192;
if (r > threshold && g > threshold && b > threshold) {
return 'white';
} else if (r > threshold && g > threshold) {
return 'yellow';
} else if (r > threshold) {
return 'red';
} else if (g > threshold) {
return 'green';
} else if (b > threshold) {
return 'blue';
} else {
return 'black';
}
}
$('#floor').mousemove(function (e) {
console.log(getColor(floor.getPosition(e)));
});
|
a7ba6ece76e768e642a6ed264791e3987f7c7629 | apps/user_app/forms.py | apps/user_app/forms.py | from django import forms
from django.core import validators
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
class RegistrationForm(UserCreationForm):
username = forms.CharField(label='username',
max_length=30,
required=True,) #validators=[self.isValidUserName])
class Meta:
model = User
fields = ('username','first_name', 'last_name', 'email',)
# def isValidUserName(self, field_data, all_data):
# try:
# User.objects.get(username=field_data)
# except User.DoesNotExist:
# return
# raise validators.ValidationError('The username "%s" is already taken.' % field_data)
def save(self, commit=True):
new_user = super(RegistrationForm, self).save(commit=False)
new_user.is_active = False
if commit:
new_user.save()
return new_user
| from django import forms
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
def isValidUserName(username):
try:
User.objects.get(username=username)
except User.DoesNotExist:
return
raise ValidationError('The username "%s" is already taken.' % username)
class RegistrationForm(UserCreationForm):
username = forms.CharField(label='username',
max_length=30,
required=True, validators=[isValidUserName])
class Meta:
model = User
fields = ('username','first_name', 'last_name', 'email',)
def save(self, commit=True):
new_user = super(RegistrationForm, self).save(commit=False)
new_user.is_active = False
if commit:
new_user.save()
return new_user
| Implement validation to the username field. | Implement validation to the username field.
| Python | mit | pedrolinhares/po-po-modoro,pedrolinhares/po-po-modoro | python | ## Code Before:
from django import forms
from django.core import validators
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
class RegistrationForm(UserCreationForm):
username = forms.CharField(label='username',
max_length=30,
required=True,) #validators=[self.isValidUserName])
class Meta:
model = User
fields = ('username','first_name', 'last_name', 'email',)
# def isValidUserName(self, field_data, all_data):
# try:
# User.objects.get(username=field_data)
# except User.DoesNotExist:
# return
# raise validators.ValidationError('The username "%s" is already taken.' % field_data)
def save(self, commit=True):
new_user = super(RegistrationForm, self).save(commit=False)
new_user.is_active = False
if commit:
new_user.save()
return new_user
## Instruction:
Implement validation to the username field.
## Code After:
from django import forms
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
def isValidUserName(username):
try:
User.objects.get(username=username)
except User.DoesNotExist:
return
raise ValidationError('The username "%s" is already taken.' % username)
class RegistrationForm(UserCreationForm):
username = forms.CharField(label='username',
max_length=30,
required=True, validators=[isValidUserName])
class Meta:
model = User
fields = ('username','first_name', 'last_name', 'email',)
def save(self, commit=True):
new_user = super(RegistrationForm, self).save(commit=False)
new_user.is_active = False
if commit:
new_user.save()
return new_user
|
Subsets and Splits