commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201 values | license stringclasses 13 values | repos stringlengths 6 116k | config stringclasses 201 values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c6ab3193fbc2d9ac0df4b8764a7062eae22d7e53 | spec/src/main/java/edu/iastate/cs/design/spec/stackexchange/request/QuestionAnswersRequestData.java | spec/src/main/java/edu/iastate/cs/design/spec/stackexchange/request/QuestionAnswersRequestData.java | package edu.iastate.cs.design.spec.stackexchange.request;
public class QuestionAnswersRequestData implements IStackExchangeRequestData {
public final String ACTIVITY_SORT = "activity";
public final String CREATION_DATE_SORT = "creation";
public final String VOTES_SORT = "votes";
private String sort;
// The api actually accepts a list of ids, but we will just use one.
private int id;
public QuestionAnswersRequestData(String sort, int id) {
this.sort = sort;
this.id = id;
}
public String getSort() {
return sort;
}
public int getId() {
return id;
}
public String requestUrl() {
StringBuilder requestBuilder = new StringBuilder();
requestBuilder.append("https://api.stackexchange.com/2.2/questions/");
requestBuilder.append(id);
requestBuilder.append("/answers?order=desc&sort=");
requestBuilder.append(sort);
requestBuilder.append("&site=stackoverflow");
requestBuilder.append("&key=KW1Do4aYqEdlMNsHpPEHdg((");
return requestBuilder.toString();
}
}
| package edu.iastate.cs.design.spec.stackexchange.request;
public class QuestionAnswersRequestData implements IStackExchangeRequestData {
public static final String ACTIVITY_SORT = "activity";
public static final String CREATION_DATE_SORT = "creation";
public static final String VOTES_SORT = "votes";
private String sort;
// The api actually accepts a list of ids, but we will just use one.
private int id;
public QuestionAnswersRequestData(String sort, int id) {
this.sort = sort;
this.id = id;
}
public String getSort() {
return sort;
}
public int getId() {
return id;
}
public String requestUrl() {
StringBuilder requestBuilder = new StringBuilder();
requestBuilder.append("https://api.stackexchange.com/2.2/questions/");
requestBuilder.append(id);
requestBuilder.append("/answers?order=desc&sort=");
requestBuilder.append(sort);
requestBuilder.append("&site=stackoverflow");
requestBuilder.append("&key=KW1Do4aYqEdlMNsHpPEHdg((");
return requestBuilder.toString();
}
}
| Make sort option fields static | Make sort option fields static
| Java | apache-2.0 | may1620/spec | java | ## Code Before:
package edu.iastate.cs.design.spec.stackexchange.request;
public class QuestionAnswersRequestData implements IStackExchangeRequestData {
public final String ACTIVITY_SORT = "activity";
public final String CREATION_DATE_SORT = "creation";
public final String VOTES_SORT = "votes";
private String sort;
// The api actually accepts a list of ids, but we will just use one.
private int id;
public QuestionAnswersRequestData(String sort, int id) {
this.sort = sort;
this.id = id;
}
public String getSort() {
return sort;
}
public int getId() {
return id;
}
public String requestUrl() {
StringBuilder requestBuilder = new StringBuilder();
requestBuilder.append("https://api.stackexchange.com/2.2/questions/");
requestBuilder.append(id);
requestBuilder.append("/answers?order=desc&sort=");
requestBuilder.append(sort);
requestBuilder.append("&site=stackoverflow");
requestBuilder.append("&key=KW1Do4aYqEdlMNsHpPEHdg((");
return requestBuilder.toString();
}
}
## Instruction:
Make sort option fields static
## Code After:
package edu.iastate.cs.design.spec.stackexchange.request;
public class QuestionAnswersRequestData implements IStackExchangeRequestData {
public static final String ACTIVITY_SORT = "activity";
public static final String CREATION_DATE_SORT = "creation";
public static final String VOTES_SORT = "votes";
private String sort;
// The api actually accepts a list of ids, but we will just use one.
private int id;
public QuestionAnswersRequestData(String sort, int id) {
this.sort = sort;
this.id = id;
}
public String getSort() {
return sort;
}
public int getId() {
return id;
}
public String requestUrl() {
StringBuilder requestBuilder = new StringBuilder();
requestBuilder.append("https://api.stackexchange.com/2.2/questions/");
requestBuilder.append(id);
requestBuilder.append("/answers?order=desc&sort=");
requestBuilder.append(sort);
requestBuilder.append("&site=stackoverflow");
requestBuilder.append("&key=KW1Do4aYqEdlMNsHpPEHdg((");
return requestBuilder.toString();
}
}
| package edu.iastate.cs.design.spec.stackexchange.request;
public class QuestionAnswersRequestData implements IStackExchangeRequestData {
- public final String ACTIVITY_SORT = "activity";
+ public static final String ACTIVITY_SORT = "activity";
? +++++++
- public final String CREATION_DATE_SORT = "creation";
+ public static final String CREATION_DATE_SORT = "creation";
? +++++++
- public final String VOTES_SORT = "votes";
+ public static final String VOTES_SORT = "votes";
? +++++++
private String sort;
// The api actually accepts a list of ids, but we will just use one.
private int id;
public QuestionAnswersRequestData(String sort, int id) {
this.sort = sort;
this.id = id;
}
public String getSort() {
return sort;
}
public int getId() {
return id;
}
public String requestUrl() {
StringBuilder requestBuilder = new StringBuilder();
requestBuilder.append("https://api.stackexchange.com/2.2/questions/");
requestBuilder.append(id);
requestBuilder.append("/answers?order=desc&sort=");
requestBuilder.append(sort);
requestBuilder.append("&site=stackoverflow");
requestBuilder.append("&key=KW1Do4aYqEdlMNsHpPEHdg((");
return requestBuilder.toString();
}
} | 6 | 0.166667 | 3 | 3 |
108fda5a39c598d83d604d9498e890b7df6cb674 | test/test_helper.rb | test/test_helper.rb | require 'rubygems'
require 'active_support'
require 'active_support/test_case'
require 'rescue_each'
| require 'rubygems'
gem 'test-unit'
require 'test/unit'
require 'active_support'
require 'active_support/test_case'
require 'rescue_each'
| Load the test-unit gem so tests work outside of Rails. | Load the test-unit gem so tests work outside of Rails. | Ruby | mit | jasoncodes/rescue_each | ruby | ## Code Before:
require 'rubygems'
require 'active_support'
require 'active_support/test_case'
require 'rescue_each'
## Instruction:
Load the test-unit gem so tests work outside of Rails.
## Code After:
require 'rubygems'
gem 'test-unit'
require 'test/unit'
require 'active_support'
require 'active_support/test_case'
require 'rescue_each'
| require 'rubygems'
+ gem 'test-unit'
+ require 'test/unit'
require 'active_support'
require 'active_support/test_case'
require 'rescue_each' | 2 | 0.5 | 2 | 0 |
71c4a088698fe2205a1a8293f6da582f18ef7c7a | lib/System/CMakeLists.txt | lib/System/CMakeLists.txt | add_llvm_library(LLVMSystem
Alarm.cpp
Atomic.cpp
Disassembler.cpp
DynamicLibrary.cpp
Host.cpp
IncludeFile.cpp
Memory.cpp
Mutex.cpp
Path.cpp
Process.cpp
Program.cpp
Signals.cpp
TimeValue.cpp
)
if( BUILD_SHARED_LIBS AND NOT WIN32 )
target_link_libraries(LLVMSystem dl)
endif()
| add_llvm_library(LLVMSystem
Alarm.cpp
Atomic.cpp
Disassembler.cpp
DynamicLibrary.cpp
Host.cpp
IncludeFile.cpp
Memory.cpp
Mutex.cpp
Path.cpp
Process.cpp
Program.cpp
RWMutex.cpp
Signals.cpp
TimeValue.cpp
)
if( BUILD_SHARED_LIBS AND NOT WIN32 )
target_link_libraries(LLVMSystem dl)
endif()
| Add RWMutex.cpp to the CMake makefiles | Add RWMutex.cpp to the CMake makefiles
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@73615 91177308-0d34-0410-b5e6-96231b3b80d8
| Text | apache-2.0 | GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap | text | ## Code Before:
add_llvm_library(LLVMSystem
Alarm.cpp
Atomic.cpp
Disassembler.cpp
DynamicLibrary.cpp
Host.cpp
IncludeFile.cpp
Memory.cpp
Mutex.cpp
Path.cpp
Process.cpp
Program.cpp
Signals.cpp
TimeValue.cpp
)
if( BUILD_SHARED_LIBS AND NOT WIN32 )
target_link_libraries(LLVMSystem dl)
endif()
## Instruction:
Add RWMutex.cpp to the CMake makefiles
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@73615 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
add_llvm_library(LLVMSystem
Alarm.cpp
Atomic.cpp
Disassembler.cpp
DynamicLibrary.cpp
Host.cpp
IncludeFile.cpp
Memory.cpp
Mutex.cpp
Path.cpp
Process.cpp
Program.cpp
RWMutex.cpp
Signals.cpp
TimeValue.cpp
)
if( BUILD_SHARED_LIBS AND NOT WIN32 )
target_link_libraries(LLVMSystem dl)
endif()
| add_llvm_library(LLVMSystem
Alarm.cpp
Atomic.cpp
Disassembler.cpp
DynamicLibrary.cpp
Host.cpp
IncludeFile.cpp
Memory.cpp
Mutex.cpp
Path.cpp
Process.cpp
Program.cpp
+ RWMutex.cpp
Signals.cpp
TimeValue.cpp
)
if( BUILD_SHARED_LIBS AND NOT WIN32 )
target_link_libraries(LLVMSystem dl)
endif() | 1 | 0.052632 | 1 | 0 |
0b7dadd04911cd7d1b1066310b92b71d071adc11 | packages/de/dense-int-set.yaml | packages/de/dense-int-set.yaml | homepage: https://github.com/metrix-ai/dense-int-set
changelog-type: ''
hash: f9f1ceff0877a76fbd9c1eb1a6140b639ecf10dbc4ea6106d676260d483b3761
test-bench-deps: {}
maintainer: Metrix.AI Tech Team <tech@metrix.ai>
synopsis: Dense int-set
changelog: ''
basic-deps:
cereal: ! '>=0.5.5 && <0.6'
base: ! '>=4.11 && <5'
deferred-folds: ! '>=0.9.7 && <0.10'
hashable: ! '>=1 && <2'
vector-algorithms: ! '>=0.7.0.4 && <0.8'
cereal-vector: ! '>=0.2.0.1 && <0.3'
vector: ! '>=0.12 && <0.13'
all-versions:
- '0.1.5'
- '0.2'
author: Nikita Volkov <nikita.y.volkov@mail.ru>
latest: '0.2'
description-type: haddock
description: ''
license-name: MIT
| homepage: https://github.com/metrix-ai/dense-int-set
changelog-type: ''
hash: 4acc31c4bd546df63d39488c7f423d59f1338bf824d2408a5d22fa46d9a8e174
test-bench-deps:
rerebase: <2
dense-int-set: -any
quickcheck-instances: ! '>=0.3.11 && <0.4'
tasty-quickcheck: ! '>=0.9 && <0.11'
tasty-hunit: ! '>=0.9 && <0.11'
tasty: ! '>=0.12 && <2'
QuickCheck: ! '>=2.8.1 && <3'
maintainer: Metrix.AI Tech Team <tech@metrix.ai>
synopsis: Dense int-set
changelog: ''
basic-deps:
cereal: ! '>=0.5.5 && <0.6'
base: ! '>=4.11 && <5'
deferred-folds: ! '>=0.9.9 && <0.10'
hashable: ! '>=1 && <2'
vector-algorithms: ! '>=0.7.0.4 && <0.8'
cereal-vector: ! '>=0.2.0.1 && <0.3'
vector: ! '>=0.12 && <0.13'
all-versions:
- '0.1.5'
- '0.2'
- '0.3'
author: Nikita Volkov <nikita.y.volkov@mail.ru>
latest: '0.3'
description-type: haddock
description: ''
license-name: MIT
| Update from Hackage at 2018-10-08T09:07:42Z | Update from Hackage at 2018-10-08T09:07:42Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/metrix-ai/dense-int-set
changelog-type: ''
hash: f9f1ceff0877a76fbd9c1eb1a6140b639ecf10dbc4ea6106d676260d483b3761
test-bench-deps: {}
maintainer: Metrix.AI Tech Team <tech@metrix.ai>
synopsis: Dense int-set
changelog: ''
basic-deps:
cereal: ! '>=0.5.5 && <0.6'
base: ! '>=4.11 && <5'
deferred-folds: ! '>=0.9.7 && <0.10'
hashable: ! '>=1 && <2'
vector-algorithms: ! '>=0.7.0.4 && <0.8'
cereal-vector: ! '>=0.2.0.1 && <0.3'
vector: ! '>=0.12 && <0.13'
all-versions:
- '0.1.5'
- '0.2'
author: Nikita Volkov <nikita.y.volkov@mail.ru>
latest: '0.2'
description-type: haddock
description: ''
license-name: MIT
## Instruction:
Update from Hackage at 2018-10-08T09:07:42Z
## Code After:
homepage: https://github.com/metrix-ai/dense-int-set
changelog-type: ''
hash: 4acc31c4bd546df63d39488c7f423d59f1338bf824d2408a5d22fa46d9a8e174
test-bench-deps:
rerebase: <2
dense-int-set: -any
quickcheck-instances: ! '>=0.3.11 && <0.4'
tasty-quickcheck: ! '>=0.9 && <0.11'
tasty-hunit: ! '>=0.9 && <0.11'
tasty: ! '>=0.12 && <2'
QuickCheck: ! '>=2.8.1 && <3'
maintainer: Metrix.AI Tech Team <tech@metrix.ai>
synopsis: Dense int-set
changelog: ''
basic-deps:
cereal: ! '>=0.5.5 && <0.6'
base: ! '>=4.11 && <5'
deferred-folds: ! '>=0.9.9 && <0.10'
hashable: ! '>=1 && <2'
vector-algorithms: ! '>=0.7.0.4 && <0.8'
cereal-vector: ! '>=0.2.0.1 && <0.3'
vector: ! '>=0.12 && <0.13'
all-versions:
- '0.1.5'
- '0.2'
- '0.3'
author: Nikita Volkov <nikita.y.volkov@mail.ru>
latest: '0.3'
description-type: haddock
description: ''
license-name: MIT
| homepage: https://github.com/metrix-ai/dense-int-set
changelog-type: ''
- hash: f9f1ceff0877a76fbd9c1eb1a6140b639ecf10dbc4ea6106d676260d483b3761
+ hash: 4acc31c4bd546df63d39488c7f423d59f1338bf824d2408a5d22fa46d9a8e174
- test-bench-deps: {}
? ---
+ test-bench-deps:
+ rerebase: <2
+ dense-int-set: -any
+ quickcheck-instances: ! '>=0.3.11 && <0.4'
+ tasty-quickcheck: ! '>=0.9 && <0.11'
+ tasty-hunit: ! '>=0.9 && <0.11'
+ tasty: ! '>=0.12 && <2'
+ QuickCheck: ! '>=2.8.1 && <3'
maintainer: Metrix.AI Tech Team <tech@metrix.ai>
synopsis: Dense int-set
changelog: ''
basic-deps:
cereal: ! '>=0.5.5 && <0.6'
base: ! '>=4.11 && <5'
- deferred-folds: ! '>=0.9.7 && <0.10'
? ^
+ deferred-folds: ! '>=0.9.9 && <0.10'
? ^
hashable: ! '>=1 && <2'
vector-algorithms: ! '>=0.7.0.4 && <0.8'
cereal-vector: ! '>=0.2.0.1 && <0.3'
vector: ! '>=0.12 && <0.13'
all-versions:
- '0.1.5'
- '0.2'
+ - '0.3'
author: Nikita Volkov <nikita.y.volkov@mail.ru>
- latest: '0.2'
? ^
+ latest: '0.3'
? ^
description-type: haddock
description: ''
license-name: MIT | 16 | 0.695652 | 12 | 4 |
76f89177a8bb3fdeb1ecdfaa51c009b63c9683b0 | README.markdown | README.markdown | Machiavelli
=========
[](http://github.com/anchor/machiavelli/releases/latest)
[](https://travis-ci.org/anchor/machiavelli)
[](https://coveralls.io/r/anchor/machiavelli)
[](http://inch-ci.org/github/anchor/machiavelli)
* [Project Page](http://anchor.github.io/machiavelli/)
* [Documentation](http://github.com/anchor/machiavelli/wiki)
* [Latest Release](http://github.com/anchor/machiavelli/releases/latest)
[Demo](http://demo.machiavelli.anchor.net.au)
| Machiavelli
=========
[](http://github.com/anchor/machiavelli/releases/latest)
[](https://travis-ci.org/anchor/machiavelli)
[](https://coveralls.io/r/anchor/machiavelli)
[](http://inch-ci.org/github/anchor/machiavelli)
* [Project Page](http://anchor.github.io/machiavelli/)
* [Documentation](http://github.com/anchor/machiavelli/wiki)
* [Latest Release](http://github.com/anchor/machiavelli/releases/latest)
[Demo](http://demo.machiavelli.anchor.net.au)
| Update badges to use master | Update badges to use master
| Markdown | bsd-3-clause | machiavellian/machiavelli,glasnt/machiavelli,machiavellian/machiavelli,machiavellian/machiavelli,glasnt/machiavelli,glasnt/machiavelli,machiavellian/machiavelli,glasnt/machiavelli | markdown | ## Code Before:
Machiavelli
=========
[](http://github.com/anchor/machiavelli/releases/latest)
[](https://travis-ci.org/anchor/machiavelli)
[](https://coveralls.io/r/anchor/machiavelli)
[](http://inch-ci.org/github/anchor/machiavelli)
* [Project Page](http://anchor.github.io/machiavelli/)
* [Documentation](http://github.com/anchor/machiavelli/wiki)
* [Latest Release](http://github.com/anchor/machiavelli/releases/latest)
[Demo](http://demo.machiavelli.anchor.net.au)
## Instruction:
Update badges to use master
## Code After:
Machiavelli
=========
[](http://github.com/anchor/machiavelli/releases/latest)
[](https://travis-ci.org/anchor/machiavelli)
[](https://coveralls.io/r/anchor/machiavelli)
[](http://inch-ci.org/github/anchor/machiavelli)
* [Project Page](http://anchor.github.io/machiavelli/)
* [Documentation](http://github.com/anchor/machiavelli/wiki)
* [Latest Release](http://github.com/anchor/machiavelli/releases/latest)
[Demo](http://demo.machiavelli.anchor.net.au)
| Machiavelli
=========
- [](http://github.com/anchor/machiavelli/releases/latest)
+ [](http://github.com/anchor/machiavelli/releases/latest)
? +++++++
- [](https://travis-ci.org/anchor/machiavelli)
+ [](https://travis-ci.org/anchor/machiavelli)
? +++++++ +++++++
- [](https://coveralls.io/r/anchor/machiavelli)
+ [](https://coveralls.io/r/anchor/machiavelli)
? +++++++
[](http://inch-ci.org/github/anchor/machiavelli)
* [Project Page](http://anchor.github.io/machiavelli/)
* [Documentation](http://github.com/anchor/machiavelli/wiki)
* [Latest Release](http://github.com/anchor/machiavelli/releases/latest)
[Demo](http://demo.machiavelli.anchor.net.au) | 6 | 0.4 | 3 | 3 |
ed533a54fa5e0a040ca29e84cf46a858464e1260 | app/views/sections/_section.html.erb | app/views/sections/_section.html.erb | <li class="node node-depth-<%= section.depth %> section">
<span class="node-line section-line">
<span class="node-name section-name">
<%= section.name %>
<small>
Section
</small>
</span>
<span class="node-options section-options">
</span>
</span>
<% if section.children.present? %>
<ul>
<%= render section.children %>
</ul>
<% end %>
</li> | <li class="node node-depth-<%= section.depth %> section">
<span class="node-line section-line">
<span class="node-name section-name">
<%= section.name %>
<small>
Section
</small>
</span>
<span class="node-options section-options">
<%= link_to "+ Page", new_page_path(section_id: section.id) %>
</span>
</span>
<% if section.children.present? %>
<ul>
<%= render section.children %>
</ul>
<% end %>
</li> | Add button to create new pages | Add button to create new pages
| HTML+ERB | mit | Cosmo/grantox,Cosmo/grantox,Cosmo/grantox | html+erb | ## Code Before:
<li class="node node-depth-<%= section.depth %> section">
<span class="node-line section-line">
<span class="node-name section-name">
<%= section.name %>
<small>
Section
</small>
</span>
<span class="node-options section-options">
</span>
</span>
<% if section.children.present? %>
<ul>
<%= render section.children %>
</ul>
<% end %>
</li>
## Instruction:
Add button to create new pages
## Code After:
<li class="node node-depth-<%= section.depth %> section">
<span class="node-line section-line">
<span class="node-name section-name">
<%= section.name %>
<small>
Section
</small>
</span>
<span class="node-options section-options">
<%= link_to "+ Page", new_page_path(section_id: section.id) %>
</span>
</span>
<% if section.children.present? %>
<ul>
<%= render section.children %>
</ul>
<% end %>
</li> | <li class="node node-depth-<%= section.depth %> section">
<span class="node-line section-line">
<span class="node-name section-name">
<%= section.name %>
<small>
Section
</small>
</span>
<span class="node-options section-options">
+ <%= link_to "+ Page", new_page_path(section_id: section.id) %>
</span>
</span>
<% if section.children.present? %>
<ul>
<%= render section.children %>
</ul>
<% end %>
</li> | 1 | 0.058824 | 1 | 0 |
d24721fcd6a7cccc9c6098f256fb5fc9bbe11f56 | server/posts/publishPosts.js | server/posts/publishPosts.js | Meteor.publish('allPosts', function () {
"use strict";
var result = Posts.find({}, {
limit: 50,
fields: {
oldChildren: false
}
});
return result;
});
Meteor.publish('comments', function (id) {
"use strict";
return Posts.find({
_id: id
});
});
Meteor.publish('user', function (username) {
"use strict";
console.log(Posts.find().fetch())
return Posts.find({
author: username
},{
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('recentPosts', function () {
"use strict";
return Posts.find({}, {
sort: {
createdAt: -1
},
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('topPosts', function (start) {
"use strict";
return Posts.find({
oldPoints: {
$gt: 1
},
createdAt: {
$gte: start
}
}, {
sort: {
oldPoints: -1
},
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('hotPosts', function () {
"use strict";
return Posts.find({}, {
limit: 50,
sort: {
heat: -1
},
fields: {
oldChildren: false
}
});
});
| Meteor.publish('allPosts', function () {
"use strict";
var result = Posts.find({}, {
limit: 50,
fields: {
oldChildren: false
}
});
return result;
});
Meteor.publish('comments', function (id) {
"use strict";
return Posts.find({
_id: id
});
});
Meteor.publish('user', function (username) {
"use strict";
return Posts.find({
author: username
},{
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('recentPosts', function () {
"use strict";
return Posts.find({}, {
sort: {
createdAt: -1
},
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('topPosts', function (start) {
"use strict";
return Posts.find({
oldPoints: {
$gt: 1
},
createdAt: {
$gte: start
}
}, {
sort: {
oldPoints: -1
},
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('hotPosts', function () {
"use strict";
return Posts.find({}, {
limit: 50,
sort: {
heat: -1
},
fields: {
oldChildren: false
}
});
});
| Remove the console.log from the user pub | Remove the console.log from the user pub
| JavaScript | mit | rrevanth/news,rrevanth/news | javascript | ## Code Before:
Meteor.publish('allPosts', function () {
"use strict";
var result = Posts.find({}, {
limit: 50,
fields: {
oldChildren: false
}
});
return result;
});
Meteor.publish('comments', function (id) {
"use strict";
return Posts.find({
_id: id
});
});
Meteor.publish('user', function (username) {
"use strict";
console.log(Posts.find().fetch())
return Posts.find({
author: username
},{
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('recentPosts', function () {
"use strict";
return Posts.find({}, {
sort: {
createdAt: -1
},
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('topPosts', function (start) {
"use strict";
return Posts.find({
oldPoints: {
$gt: 1
},
createdAt: {
$gte: start
}
}, {
sort: {
oldPoints: -1
},
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('hotPosts', function () {
"use strict";
return Posts.find({}, {
limit: 50,
sort: {
heat: -1
},
fields: {
oldChildren: false
}
});
});
## Instruction:
Remove the console.log from the user pub
## Code After:
Meteor.publish('allPosts', function () {
"use strict";
var result = Posts.find({}, {
limit: 50,
fields: {
oldChildren: false
}
});
return result;
});
Meteor.publish('comments', function (id) {
"use strict";
return Posts.find({
_id: id
});
});
Meteor.publish('user', function (username) {
"use strict";
return Posts.find({
author: username
},{
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('recentPosts', function () {
"use strict";
return Posts.find({}, {
sort: {
createdAt: -1
},
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('topPosts', function (start) {
"use strict";
return Posts.find({
oldPoints: {
$gt: 1
},
createdAt: {
$gte: start
}
}, {
sort: {
oldPoints: -1
},
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('hotPosts', function () {
"use strict";
return Posts.find({}, {
limit: 50,
sort: {
heat: -1
},
fields: {
oldChildren: false
}
});
});
| Meteor.publish('allPosts', function () {
"use strict";
var result = Posts.find({}, {
limit: 50,
fields: {
oldChildren: false
}
});
return result;
});
Meteor.publish('comments', function (id) {
"use strict";
return Posts.find({
_id: id
});
});
Meteor.publish('user', function (username) {
"use strict";
- console.log(Posts.find().fetch())
return Posts.find({
author: username
},{
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('recentPosts', function () {
"use strict";
return Posts.find({}, {
sort: {
createdAt: -1
},
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('topPosts', function (start) {
"use strict";
return Posts.find({
oldPoints: {
$gt: 1
},
createdAt: {
$gte: start
}
}, {
sort: {
oldPoints: -1
},
limit: 50,
fields: {
oldChildren: false
}
});
});
Meteor.publish('hotPosts', function () {
"use strict";
return Posts.find({}, {
limit: 50,
sort: {
heat: -1
},
fields: {
oldChildren: false
}
});
}); | 1 | 0.012821 | 0 | 1 |
056176ca46545a6d25251225143ee0f69a75fded | frontend/bower.json | frontend/bower.json | {
"name": "frontend",
"dependencies": {
"ember": "1.13.13",
"ember-cli-shims": "0.0.6",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.8",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.7",
"ember-qunit": "0.4.10",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.21",
"jquery": "^1.11.3",
"loader.js": "ember-cli/loader.js#3.3.0",
"qunit": "~1.17.1",
"leaflet": "0.7.3",
"proj4": "2.3.3",
"proj4leaflet": "https://github.com/kartena/proj4leaflet.git#4e445dd765d4e5cfcb156e423c6a0b7b65adf535",
"leaflet.markercluster": "~0.4.0",
"datatables": "~1.10.8",
"momentjs": "~2.10.6",
"typeahead.js": "~0.11.1",
"polarmap": "~1.0.1"
},
"resolutions": {
"proj4": "2.3.3"
}
}
| {
"name": "frontend",
"dependencies": {
"ember": "1.13.13",
"ember-cli-shims": "0.0.6",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.8",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.7",
"ember-qunit": "0.4.10",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.21",
"jquery": "^1.11.3",
"loader.js": "ember-cli/loader.js#3.3.0",
"qunit": "~1.17.1",
"leaflet": "0.7.3",
"proj4": "2.3.3",
"proj4leaflet": "0.7.1",
"leaflet.markercluster": "~0.4.0",
"datatables": "~1.10.8",
"momentjs": "~2.10.6",
"typeahead.js": "~0.11.1",
"polarmap": "~1.2.0"
},
"resolutions": {
"proj4": "2.3.3"
}
}
| Upgrade to use PolarMap.js 1.2.0 | Upgrade to use PolarMap.js 1.2.0
Also use proj4leaflet 0.7.1 instead of direct commit; that was for
old PolarMap.js.
| JSON | mit | johan--/abm-portal,johan--/abm-portal,GeoSensorWebLab/abm-portal,johan--/abm-portal,GeoSensorWebLab/abm-portal,GeoSensorWebLab/abm-portal | json | ## Code Before:
{
"name": "frontend",
"dependencies": {
"ember": "1.13.13",
"ember-cli-shims": "0.0.6",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.8",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.7",
"ember-qunit": "0.4.10",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.21",
"jquery": "^1.11.3",
"loader.js": "ember-cli/loader.js#3.3.0",
"qunit": "~1.17.1",
"leaflet": "0.7.3",
"proj4": "2.3.3",
"proj4leaflet": "https://github.com/kartena/proj4leaflet.git#4e445dd765d4e5cfcb156e423c6a0b7b65adf535",
"leaflet.markercluster": "~0.4.0",
"datatables": "~1.10.8",
"momentjs": "~2.10.6",
"typeahead.js": "~0.11.1",
"polarmap": "~1.0.1"
},
"resolutions": {
"proj4": "2.3.3"
}
}
## Instruction:
Upgrade to use PolarMap.js 1.2.0
Also use proj4leaflet 0.7.1 instead of direct commit; that was for
old PolarMap.js.
## Code After:
{
"name": "frontend",
"dependencies": {
"ember": "1.13.13",
"ember-cli-shims": "0.0.6",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.8",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.7",
"ember-qunit": "0.4.10",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.21",
"jquery": "^1.11.3",
"loader.js": "ember-cli/loader.js#3.3.0",
"qunit": "~1.17.1",
"leaflet": "0.7.3",
"proj4": "2.3.3",
"proj4leaflet": "0.7.1",
"leaflet.markercluster": "~0.4.0",
"datatables": "~1.10.8",
"momentjs": "~2.10.6",
"typeahead.js": "~0.11.1",
"polarmap": "~1.2.0"
},
"resolutions": {
"proj4": "2.3.3"
}
}
| {
"name": "frontend",
"dependencies": {
"ember": "1.13.13",
"ember-cli-shims": "0.0.6",
"ember-cli-test-loader": "ember-cli-test-loader#0.1.3",
"ember-data": "1.13.8",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.1.7",
"ember-qunit": "0.4.10",
"ember-qunit-notifications": "0.0.7",
"ember-resolver": "~0.1.21",
"jquery": "^1.11.3",
"loader.js": "ember-cli/loader.js#3.3.0",
"qunit": "~1.17.1",
"leaflet": "0.7.3",
"proj4": "2.3.3",
- "proj4leaflet": "https://github.com/kartena/proj4leaflet.git#4e445dd765d4e5cfcb156e423c6a0b7b65adf535",
+ "proj4leaflet": "0.7.1",
"leaflet.markercluster": "~0.4.0",
"datatables": "~1.10.8",
"momentjs": "~2.10.6",
"typeahead.js": "~0.11.1",
- "polarmap": "~1.0.1"
? --
+ "polarmap": "~1.2.0"
? ++
},
"resolutions": {
"proj4": "2.3.3"
}
} | 4 | 0.148148 | 2 | 2 |
297660a27dc5b23beb0f616965c60389bce3c2d8 | h2o-py/tests/testdir_algos/rf/pyunit_bigcatRF.py | h2o-py/tests/testdir_algos/rf/pyunit_bigcatRF.py | import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
#Log.info("Importing bigcat_5000x2.csv data...\n")
bigcat = h2o.import_frame(path=h2o.locate("smalldata/gbm_test/bigcat_5000x2.csv"))
bigcat["y"] = bigcat["y"].asfactor()
#Log.info("Summary of bigcat_5000x2.csv from H2O:\n")
#bigcat.summary()
# Train H2O DRF Model:
#Log.info("H2O DRF (Naive Split) with parameters:\nclassification = TRUE, ntree = 1, depth = 1, nbins = 100\n")
model = h2o.random_forest(x=bigcat[["X"]], y=bigcat["y"], ntrees=1, max_depth=1, nbins=100)
model.show()
if __name__ == "__main__":
h2o.run_test(sys.argv, bigcatRF)
| import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
#Log.info("Importing bigcat_5000x2.csv data...\n")
bigcat = h2o.import_frame(path=h2o.locate("smalldata/gbm_test/bigcat_5000x2.csv"))
bigcat["y"] = bigcat["y"].asfactor()
#Log.info("Summary of bigcat_5000x2.csv from H2O:\n")
#bigcat.summary()
# Train H2O DRF Model:
#Log.info("H2O DRF (Naive Split) with parameters:\nclassification = TRUE, ntree = 1, depth = 1, nbins = 100, nbins_cats=10\n")
model = h2o.random_forest(x=bigcat[["X"]], y=bigcat["y"], ntrees=1, max_depth=1, nbins=100, nbins_cats=10)
model.show()
if __name__ == "__main__":
h2o.run_test(sys.argv, bigcatRF)
| Add usage of nbins_cats to RF pyunit. | Add usage of nbins_cats to RF pyunit.
| Python | apache-2.0 | nilbody/h2o-3,YzPaul3/h2o-3,datachand/h2o-3,michalkurka/h2o-3,brightchen/h2o-3,madmax983/h2o-3,weaver-viii/h2o-3,junwucs/h2o-3,michalkurka/h2o-3,tarasane/h2o-3,michalkurka/h2o-3,datachand/h2o-3,madmax983/h2o-3,spennihana/h2o-3,h2oai/h2o-3,junwucs/h2o-3,datachand/h2o-3,junwucs/h2o-3,YzPaul3/h2o-3,bospetersen/h2o-3,jangorecki/h2o-3,nilbody/h2o-3,printedheart/h2o-3,h2oai/h2o-dev,printedheart/h2o-3,bospetersen/h2o-3,datachand/h2o-3,tarasane/h2o-3,michalkurka/h2o-3,spennihana/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,weaver-viii/h2o-3,mrgloom/h2o-3,mrgloom/h2o-3,mrgloom/h2o-3,printedheart/h2o-3,h2oai/h2o-3,PawarPawan/h2o-v3,h2oai/h2o-dev,ChristosChristofidis/h2o-3,madmax983/h2o-3,jangorecki/h2o-3,weaver-viii/h2o-3,pchmieli/h2o-3,tarasane/h2o-3,pchmieli/h2o-3,datachand/h2o-3,mrgloom/h2o-3,madmax983/h2o-3,weaver-viii/h2o-3,mathemage/h2o-3,h2oai/h2o-dev,datachand/h2o-3,junwucs/h2o-3,mathemage/h2o-3,mrgloom/h2o-3,h2oai/h2o-3,PawarPawan/h2o-v3,spennihana/h2o-3,jangorecki/h2o-3,spennihana/h2o-3,PawarPawan/h2o-v3,h2oai/h2o-3,weaver-viii/h2o-3,pchmieli/h2o-3,junwucs/h2o-3,brightchen/h2o-3,junwucs/h2o-3,printedheart/h2o-3,printedheart/h2o-3,kyoren/https-github.com-h2oai-h2o-3,nilbody/h2o-3,PawarPawan/h2o-v3,spennihana/h2o-3,YzPaul3/h2o-3,brightchen/h2o-3,ChristosChristofidis/h2o-3,tarasane/h2o-3,ChristosChristofidis/h2o-3,mrgloom/h2o-3,tarasane/h2o-3,h2oai/h2o-3,PawarPawan/h2o-v3,kyoren/https-github.com-h2oai-h2o-3,YzPaul3/h2o-3,michalkurka/h2o-3,kyoren/https-github.com-h2oai-h2o-3,weaver-viii/h2o-3,nilbody/h2o-3,ChristosChristofidis/h2o-3,spennihana/h2o-3,PawarPawan/h2o-v3,nilbody/h2o-3,nilbody/h2o-3,pchmieli/h2o-3,ChristosChristofidis/h2o-3,kyoren/https-github.com-h2oai-h2o-3,nilbody/h2o-3,brightchen/h2o-3,bospetersen/h2o-3,YzPaul3/h2o-3,YzPaul3/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,madmax983/h2o-3,kyoren/https-github.com-h2oai-h2o-3,brightchen/h2o-3,YzPaul3/h2o-3,ChristosChristofidis/h2o-3,pchmieli/h2o-3,mathemage/h2o-3,bospetersen/h2o-3,brightchen/h2o-3,h2oai/h2o-3,weaver-viii/h2o-3,kyoren/https-github.com-h2oai-h2o-3,kyoren/https-github.com-h2oai-h2o-3,h2oai/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,pchmieli/h2o-3,tarasane/h2o-3,mathemage/h2o-3,mathemage/h2o-3,spennihana/h2o-3,brightchen/h2o-3,mathemage/h2o-3,mrgloom/h2o-3,datachand/h2o-3,jangorecki/h2o-3,tarasane/h2o-3,madmax983/h2o-3,pchmieli/h2o-3,bospetersen/h2o-3,printedheart/h2o-3,bospetersen/h2o-3,ChristosChristofidis/h2o-3,printedheart/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,PawarPawan/h2o-v3,h2oai/h2o-3,michalkurka/h2o-3,madmax983/h2o-3,bospetersen/h2o-3,junwucs/h2o-3,jangorecki/h2o-3 | python | ## Code Before:
import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
#Log.info("Importing bigcat_5000x2.csv data...\n")
bigcat = h2o.import_frame(path=h2o.locate("smalldata/gbm_test/bigcat_5000x2.csv"))
bigcat["y"] = bigcat["y"].asfactor()
#Log.info("Summary of bigcat_5000x2.csv from H2O:\n")
#bigcat.summary()
# Train H2O DRF Model:
#Log.info("H2O DRF (Naive Split) with parameters:\nclassification = TRUE, ntree = 1, depth = 1, nbins = 100\n")
model = h2o.random_forest(x=bigcat[["X"]], y=bigcat["y"], ntrees=1, max_depth=1, nbins=100)
model.show()
if __name__ == "__main__":
h2o.run_test(sys.argv, bigcatRF)
## Instruction:
Add usage of nbins_cats to RF pyunit.
## Code After:
import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
#Log.info("Importing bigcat_5000x2.csv data...\n")
bigcat = h2o.import_frame(path=h2o.locate("smalldata/gbm_test/bigcat_5000x2.csv"))
bigcat["y"] = bigcat["y"].asfactor()
#Log.info("Summary of bigcat_5000x2.csv from H2O:\n")
#bigcat.summary()
# Train H2O DRF Model:
#Log.info("H2O DRF (Naive Split) with parameters:\nclassification = TRUE, ntree = 1, depth = 1, nbins = 100, nbins_cats=10\n")
model = h2o.random_forest(x=bigcat[["X"]], y=bigcat["y"], ntrees=1, max_depth=1, nbins=100, nbins_cats=10)
model.show()
if __name__ == "__main__":
h2o.run_test(sys.argv, bigcatRF)
| import sys
sys.path.insert(1, "../../../")
import h2o
def bigcatRF(ip,port):
# Connect to h2o
h2o.init(ip,port)
# Training set has 100 categories from cat001 to cat100
# Categories cat001, cat003, ... are perfect predictors of y = 1
# Categories cat002, cat004, ... are perfect predictors of y = 0
#Log.info("Importing bigcat_5000x2.csv data...\n")
bigcat = h2o.import_frame(path=h2o.locate("smalldata/gbm_test/bigcat_5000x2.csv"))
bigcat["y"] = bigcat["y"].asfactor()
#Log.info("Summary of bigcat_5000x2.csv from H2O:\n")
#bigcat.summary()
# Train H2O DRF Model:
- #Log.info("H2O DRF (Naive Split) with parameters:\nclassification = TRUE, ntree = 1, depth = 1, nbins = 100\n")
+ #Log.info("H2O DRF (Naive Split) with parameters:\nclassification = TRUE, ntree = 1, depth = 1, nbins = 100, nbins_cats=10\n")
? +++++++++++++++
- model = h2o.random_forest(x=bigcat[["X"]], y=bigcat["y"], ntrees=1, max_depth=1, nbins=100)
+ model = h2o.random_forest(x=bigcat[["X"]], y=bigcat["y"], ntrees=1, max_depth=1, nbins=100, nbins_cats=10)
? +++++++++++++++
model.show()
if __name__ == "__main__":
h2o.run_test(sys.argv, bigcatRF) | 4 | 0.153846 | 2 | 2 |
6a5f9e135f88b662e4e01e8882f861448910ca90 | install/src/main/java/com/example/examplemod/ExampleMod.java | install/src/main/java/com/example/examplemod/ExampleMod.java | package com.example.examplemod;
import net.minecraft.block.Block;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
public class ExampleMod
{
public static final String MODID = "examplemod";
public static final String VERSION = "1.0";
@EventHandler
public void init(FMLInitializationEvent event)
{
// some example code
System.out.println("DIRT BLOCK >> "+Block.dirt.getUnlocalizedName());
}
}
| package com.example.examplemod;
import net.minecraft.init.Blocks;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
public class ExampleMod
{
public static final String MODID = "examplemod";
public static final String VERSION = "1.0";
@EventHandler
public void init(FMLInitializationEvent event)
{
// some example code
System.out.println("DIRT BLOCK >> "+Blocks.dirt.func_149739_a());
}
}
| Fix example mod code for 1.7 | Fix example mod code for 1.7
| Java | lgpl-2.1 | MinecraftForge/FML | java | ## Code Before:
package com.example.examplemod;
import net.minecraft.block.Block;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
public class ExampleMod
{
public static final String MODID = "examplemod";
public static final String VERSION = "1.0";
@EventHandler
public void init(FMLInitializationEvent event)
{
// some example code
System.out.println("DIRT BLOCK >> "+Block.dirt.getUnlocalizedName());
}
}
## Instruction:
Fix example mod code for 1.7
## Code After:
package com.example.examplemod;
import net.minecraft.init.Blocks;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
public class ExampleMod
{
public static final String MODID = "examplemod";
public static final String VERSION = "1.0";
@EventHandler
public void init(FMLInitializationEvent event)
{
// some example code
System.out.println("DIRT BLOCK >> "+Blocks.dirt.func_149739_a());
}
}
| package com.example.examplemod;
- import net.minecraft.block.Block;
? ^^^^^
+ import net.minecraft.init.Blocks;
? ^^^^ +
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
public class ExampleMod
{
public static final String MODID = "examplemod";
public static final String VERSION = "1.0";
@EventHandler
public void init(FMLInitializationEvent event)
{
// some example code
- System.out.println("DIRT BLOCK >> "+Block.dirt.getUnlocalizedName());
? ^^^^ -- ---------
+ System.out.println("DIRT BLOCK >> "+Blocks.dirt.func_149739_a());
? + ^^ ++++++++
}
} | 4 | 0.2 | 2 | 2 |
4e76d0e95005e51f9cba5070798cd2076445f74f | recipes/default.rb | recipes/default.rb | include_recipe "mono4::_#{node['platform_family']}"
if platform_family?('rhel', 'fedora')
include_recipe 'yum'
include_recipe 'yum-epel'
elsif platform_family?('debian')
include_recipe 'apt'
else
raise "Platform #{node['platform']} not supported"
end
if node['mono4']['install_method'] == 'source'
include_recipe 'mono4::_source'
elsif node['mono4']['install_method'] == 'package'
package "#{node['mono4']['package_name']}" do
version node['mono4']['package_version']
action :install
end
else
raise "Installation method #{node['mono4']['install_method']} not supported"
end
# know current versions: 3.2.8+dfsg-4ubuntu1.1, 4.0.1-0xamarin5
| include_recipe "mono4::_#{node['platform_family']}"
if platform_family?('rhel', 'fedora')
include_recipe 'yum'
include_recipe 'yum-epel'
elsif platform_family?('debian')
include_recipe 'apt'
else
raise "Platform #{node['platform']} not supported"
end
if node['mono4']['install_method'] == 'source'
include_recipe 'mono4::_source'
elsif node['mono4']['install_method'] == 'package'
package node['mono4']['package_name'] do
version node['mono4']['package_version']
action :install
end
else
raise "Installation method #{node['mono4']['install_method']} not supported"
end
| Remove not required string interpolation | Remove not required string interpolation
| Ruby | apache-2.0 | shirhatti/mono4-coobook,stonevil/mono4-coobook | ruby | ## Code Before:
include_recipe "mono4::_#{node['platform_family']}"
if platform_family?('rhel', 'fedora')
include_recipe 'yum'
include_recipe 'yum-epel'
elsif platform_family?('debian')
include_recipe 'apt'
else
raise "Platform #{node['platform']} not supported"
end
if node['mono4']['install_method'] == 'source'
include_recipe 'mono4::_source'
elsif node['mono4']['install_method'] == 'package'
package "#{node['mono4']['package_name']}" do
version node['mono4']['package_version']
action :install
end
else
raise "Installation method #{node['mono4']['install_method']} not supported"
end
# know current versions: 3.2.8+dfsg-4ubuntu1.1, 4.0.1-0xamarin5
## Instruction:
Remove not required string interpolation
## Code After:
include_recipe "mono4::_#{node['platform_family']}"
if platform_family?('rhel', 'fedora')
include_recipe 'yum'
include_recipe 'yum-epel'
elsif platform_family?('debian')
include_recipe 'apt'
else
raise "Platform #{node['platform']} not supported"
end
if node['mono4']['install_method'] == 'source'
include_recipe 'mono4::_source'
elsif node['mono4']['install_method'] == 'package'
package node['mono4']['package_name'] do
version node['mono4']['package_version']
action :install
end
else
raise "Installation method #{node['mono4']['install_method']} not supported"
end
| include_recipe "mono4::_#{node['platform_family']}"
if platform_family?('rhel', 'fedora')
include_recipe 'yum'
include_recipe 'yum-epel'
elsif platform_family?('debian')
include_recipe 'apt'
else
raise "Platform #{node['platform']} not supported"
end
if node['mono4']['install_method'] == 'source'
include_recipe 'mono4::_source'
elsif node['mono4']['install_method'] == 'package'
- package "#{node['mono4']['package_name']}" do
? --- --
+ package node['mono4']['package_name'] do
version node['mono4']['package_version']
action :install
end
else
raise "Installation method #{node['mono4']['install_method']} not supported"
end
-
- # know current versions: 3.2.8+dfsg-4ubuntu1.1, 4.0.1-0xamarin5 | 4 | 0.173913 | 1 | 3 |
2c8b126b36cb4c64708fd31bc47125c097b192ba | app/views/repositories/_form.html.haml | app/views/repositories/_form.html.haml | = simple_form_for resource, html: {class: 'form-horizontal', id: 'repository_form' } do |f|
= f.input :name, input_html: { class: 'input-xlarge' }, required: true, disabled: resource.persisted?, as: :string
= f.input :description, input_html: { rows: 8 }
= f.input :access, collection: resource.mirror? ? access_options_mirror : access_options, include_blank: false, hint: access_change_hint
.access-options.hide
= select_tag :access_options_non_mirror, options_for_select(access_options)
= select_tag :access_options_mirror, options_for_select(access_options_mirror)
- if resource.new_record?
= f.input :source_address, as: :url
#remote_type.form-group
= f.input :remote_type, collection: Repository::REMOTE_TYPES, as: :radio_buttons, hint: t('repository.remote_type.text')
- if !resource.new_record? && resource.mirror?
.form-group
= f.label t('repository.un_mirror.label')
.col-lg-10
= check_box_tag :un_mirror
= t 'repository.un_mirror.text'
= f.button :wrapped
| = simple_form_for resource, html: {class: 'form-horizontal', id: 'repository_form' } do |f|
= f.input :name, input_html: { class: 'input-xlarge' }, required: true, disabled: resource.persisted?, as: :string
= f.input :description, input_html: { rows: 8 }
- if resource.new_record?
= f.input :source_address, as: :url
#remote_type.form-group
= f.input :remote_type, collection: Repository::REMOTE_TYPES, as: :radio_buttons, hint: t('repository.remote_type.text')
- if !resource.new_record? && resource.mirror?
.form-group
= f.label t('repository.un_mirror.label')
.col-lg-10
= check_box_tag :un_mirror
= t 'repository.un_mirror.text'
= f.input :access, collection: resource.mirror? ? access_options_mirror : access_options, include_blank: false, hint: access_change_hint
.access-options.hide
= select_tag :access_options_non_mirror, options_for_select(access_options)
= select_tag :access_options_mirror, options_for_select(access_options_mirror)
= f.button :wrapped
| Move access select box down. | Move access select box down.
| Haml | agpl-3.0 | ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub,ontohub/ontohub | haml | ## Code Before:
= simple_form_for resource, html: {class: 'form-horizontal', id: 'repository_form' } do |f|
= f.input :name, input_html: { class: 'input-xlarge' }, required: true, disabled: resource.persisted?, as: :string
= f.input :description, input_html: { rows: 8 }
= f.input :access, collection: resource.mirror? ? access_options_mirror : access_options, include_blank: false, hint: access_change_hint
.access-options.hide
= select_tag :access_options_non_mirror, options_for_select(access_options)
= select_tag :access_options_mirror, options_for_select(access_options_mirror)
- if resource.new_record?
= f.input :source_address, as: :url
#remote_type.form-group
= f.input :remote_type, collection: Repository::REMOTE_TYPES, as: :radio_buttons, hint: t('repository.remote_type.text')
- if !resource.new_record? && resource.mirror?
.form-group
= f.label t('repository.un_mirror.label')
.col-lg-10
= check_box_tag :un_mirror
= t 'repository.un_mirror.text'
= f.button :wrapped
## Instruction:
Move access select box down.
## Code After:
= simple_form_for resource, html: {class: 'form-horizontal', id: 'repository_form' } do |f|
= f.input :name, input_html: { class: 'input-xlarge' }, required: true, disabled: resource.persisted?, as: :string
= f.input :description, input_html: { rows: 8 }
- if resource.new_record?
= f.input :source_address, as: :url
#remote_type.form-group
= f.input :remote_type, collection: Repository::REMOTE_TYPES, as: :radio_buttons, hint: t('repository.remote_type.text')
- if !resource.new_record? && resource.mirror?
.form-group
= f.label t('repository.un_mirror.label')
.col-lg-10
= check_box_tag :un_mirror
= t 'repository.un_mirror.text'
= f.input :access, collection: resource.mirror? ? access_options_mirror : access_options, include_blank: false, hint: access_change_hint
.access-options.hide
= select_tag :access_options_non_mirror, options_for_select(access_options)
= select_tag :access_options_mirror, options_for_select(access_options_mirror)
= f.button :wrapped
| = simple_form_for resource, html: {class: 'form-horizontal', id: 'repository_form' } do |f|
= f.input :name, input_html: { class: 'input-xlarge' }, required: true, disabled: resource.persisted?, as: :string
= f.input :description, input_html: { rows: 8 }
- = f.input :access, collection: resource.mirror? ? access_options_mirror : access_options, include_blank: false, hint: access_change_hint
- .access-options.hide
- = select_tag :access_options_non_mirror, options_for_select(access_options)
- = select_tag :access_options_mirror, options_for_select(access_options_mirror)
- if resource.new_record?
= f.input :source_address, as: :url
#remote_type.form-group
= f.input :remote_type, collection: Repository::REMOTE_TYPES, as: :radio_buttons, hint: t('repository.remote_type.text')
- if !resource.new_record? && resource.mirror?
.form-group
= f.label t('repository.un_mirror.label')
.col-lg-10
= check_box_tag :un_mirror
= t 'repository.un_mirror.text'
+ = f.input :access, collection: resource.mirror? ? access_options_mirror : access_options, include_blank: false, hint: access_change_hint
+ .access-options.hide
+ = select_tag :access_options_non_mirror, options_for_select(access_options)
+ = select_tag :access_options_mirror, options_for_select(access_options_mirror)
+
= f.button :wrapped | 9 | 0.409091 | 5 | 4 |
073a33fa87813dcda70448ff2b115703c7833999 | src/index.js | src/index.js | const Telegraf = require('telegraf');
const commandParts = require('telegraf-command-parts');
const cfg = require('../config');
const commander = require('./commander');
const middleware = require('./middleware');
const bot = new Telegraf(cfg.tgToken);
// Apply middleware
bot.use(commandParts());
bot.use(middleware.getSession);
bot.command('kirjaudu', commander.login);
bot.command('saldo', middleware.loggedIn, commander.saldo);
bot.command('lisaa', middleware.loggedIn, commander.add);
bot.command('viiva', middleware.loggedIn, commander.subtract);
bot.on('message', commander.message);
// Get own username to handle commands such as /start@my_bot
bot.telegram.getMe()
.then((botInfo) => {
bot.options.username = botInfo.username;
});
// Setup webhook when in production
if (cfg.isProduction) {
bot.telegram.setWebhook(`${cfg.appUrl}/bot${cfg.tgToken}`);
bot.startWebhook(`/bot${cfg.tgToken}`, null, cfg.appPort);
// If env is development, get updates by polling
} else {
bot.telegram.setWebhook(); // Unsubscribe webhook if it exists
bot.startPolling();
}
| const Telegraf = require('telegraf');
const commandParts = require('telegraf-command-parts');
const cfg = require('../config');
const commander = require('./commander');
const middleware = require('./middleware');
const bot = new Telegraf(cfg.tgToken);
// Apply middleware
bot.use(commandParts());
bot.use(middleware.getSession);
bot.command('start', commander.login);
bot.command('kirjaudu', commander.login);
bot.command('saldo', middleware.loggedIn, commander.saldo);
bot.command('lisaa', middleware.loggedIn, commander.add);
bot.command('viiva', middleware.loggedIn, commander.subtract);
bot.on('message', commander.message);
// Get own username to handle commands such as /start@my_bot
bot.telegram.getMe()
.then((botInfo) => {
bot.options.username = botInfo.username;
});
// Setup webhook when in production
if (cfg.isProduction) {
bot.telegram.setWebhook(`${cfg.appUrl}/bot${cfg.tgToken}`);
bot.startWebhook(`/bot${cfg.tgToken}`, null, cfg.appPort);
// If env is development, get updates by polling
} else {
bot.telegram.deleteWebhook(); // Unsubscribe webhook if it exists
bot.startPolling();
}
| Use /start command as login and use proper webhook remover function | Use /start command as login and use proper webhook remover function
| JavaScript | mit | majori/piikki-client-tg | javascript | ## Code Before:
const Telegraf = require('telegraf');
const commandParts = require('telegraf-command-parts');
const cfg = require('../config');
const commander = require('./commander');
const middleware = require('./middleware');
const bot = new Telegraf(cfg.tgToken);
// Apply middleware
bot.use(commandParts());
bot.use(middleware.getSession);
bot.command('kirjaudu', commander.login);
bot.command('saldo', middleware.loggedIn, commander.saldo);
bot.command('lisaa', middleware.loggedIn, commander.add);
bot.command('viiva', middleware.loggedIn, commander.subtract);
bot.on('message', commander.message);
// Get own username to handle commands such as /start@my_bot
bot.telegram.getMe()
.then((botInfo) => {
bot.options.username = botInfo.username;
});
// Setup webhook when in production
if (cfg.isProduction) {
bot.telegram.setWebhook(`${cfg.appUrl}/bot${cfg.tgToken}`);
bot.startWebhook(`/bot${cfg.tgToken}`, null, cfg.appPort);
// If env is development, get updates by polling
} else {
bot.telegram.setWebhook(); // Unsubscribe webhook if it exists
bot.startPolling();
}
## Instruction:
Use /start command as login and use proper webhook remover function
## Code After:
const Telegraf = require('telegraf');
const commandParts = require('telegraf-command-parts');
const cfg = require('../config');
const commander = require('./commander');
const middleware = require('./middleware');
const bot = new Telegraf(cfg.tgToken);
// Apply middleware
bot.use(commandParts());
bot.use(middleware.getSession);
bot.command('start', commander.login);
bot.command('kirjaudu', commander.login);
bot.command('saldo', middleware.loggedIn, commander.saldo);
bot.command('lisaa', middleware.loggedIn, commander.add);
bot.command('viiva', middleware.loggedIn, commander.subtract);
bot.on('message', commander.message);
// Get own username to handle commands such as /start@my_bot
bot.telegram.getMe()
.then((botInfo) => {
bot.options.username = botInfo.username;
});
// Setup webhook when in production
if (cfg.isProduction) {
bot.telegram.setWebhook(`${cfg.appUrl}/bot${cfg.tgToken}`);
bot.startWebhook(`/bot${cfg.tgToken}`, null, cfg.appPort);
// If env is development, get updates by polling
} else {
bot.telegram.deleteWebhook(); // Unsubscribe webhook if it exists
bot.startPolling();
}
| const Telegraf = require('telegraf');
const commandParts = require('telegraf-command-parts');
const cfg = require('../config');
const commander = require('./commander');
const middleware = require('./middleware');
const bot = new Telegraf(cfg.tgToken);
// Apply middleware
bot.use(commandParts());
bot.use(middleware.getSession);
+ bot.command('start', commander.login);
bot.command('kirjaudu', commander.login);
bot.command('saldo', middleware.loggedIn, commander.saldo);
bot.command('lisaa', middleware.loggedIn, commander.add);
bot.command('viiva', middleware.loggedIn, commander.subtract);
bot.on('message', commander.message);
// Get own username to handle commands such as /start@my_bot
bot.telegram.getMe()
.then((botInfo) => {
bot.options.username = botInfo.username;
});
// Setup webhook when in production
if (cfg.isProduction) {
bot.telegram.setWebhook(`${cfg.appUrl}/bot${cfg.tgToken}`);
bot.startWebhook(`/bot${cfg.tgToken}`, null, cfg.appPort);
// If env is development, get updates by polling
} else {
- bot.telegram.setWebhook(); // Unsubscribe webhook if it exists
? ^
+ bot.telegram.deleteWebhook(); // Unsubscribe webhook if it exists
? ^^^ +
bot.startPolling();
} | 3 | 0.083333 | 2 | 1 |
26861b183085e8fe2c7c21f4e3631ddd7d30e5e8 | csibe.py | csibe.py |
import os
import subprocess
import unittest
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_directory = "build"
if not os.path.isdir(build_directory):
os.makedirs(build_directory)
os.chdir(build_directory)
subprocess.call(["cmake", csibe_path])
|
import argparse
import os
import subprocess
import sys
parser = argparse.ArgumentParser()
parser.add_argument("-j", "--jobs", type=int, default=1, help="number of jobs for make")
args = parser.parse_args()
make_jobs = args.jobs
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_directory = "build"
if not os.path.isdir(build_directory):
os.makedirs(build_directory)
os.chdir(build_directory)
cmake_return_value = subprocess.call(["cmake", csibe_path])
if cmake_return_value:
sys.exit(cmake_return_value)
make_return_value = subprocess.call(["make", "-j{}".format(make_jobs)])
if make_return_value:
sys.exit(make_return_value)
make_size_return_value = subprocess.call(["make", "size"])
if make_size_return_value:
sys.exit(make_size_return_value)
| Add logic and error-handling for CMake and make invocations | Add logic and error-handling for CMake and make invocations
| Python | bsd-3-clause | szeged/csibe,bgabor666/csibe,szeged/csibe,szeged/csibe,bgabor666/csibe,bgabor666/csibe,bgabor666/csibe,loki04/csibe,loki04/csibe,loki04/csibe,szeged/csibe,bgabor666/csibe,bgabor666/csibe,bgabor666/csibe,loki04/csibe,loki04/csibe,szeged/csibe,szeged/csibe,loki04/csibe,loki04/csibe,szeged/csibe | python | ## Code Before:
import os
import subprocess
import unittest
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_directory = "build"
if not os.path.isdir(build_directory):
os.makedirs(build_directory)
os.chdir(build_directory)
subprocess.call(["cmake", csibe_path])
## Instruction:
Add logic and error-handling for CMake and make invocations
## Code After:
import argparse
import os
import subprocess
import sys
parser = argparse.ArgumentParser()
parser.add_argument("-j", "--jobs", type=int, default=1, help="number of jobs for make")
args = parser.parse_args()
make_jobs = args.jobs
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_directory = "build"
if not os.path.isdir(build_directory):
os.makedirs(build_directory)
os.chdir(build_directory)
cmake_return_value = subprocess.call(["cmake", csibe_path])
if cmake_return_value:
sys.exit(cmake_return_value)
make_return_value = subprocess.call(["make", "-j{}".format(make_jobs)])
if make_return_value:
sys.exit(make_return_value)
make_size_return_value = subprocess.call(["make", "size"])
if make_size_return_value:
sys.exit(make_size_return_value)
|
+ import argparse
import os
import subprocess
- import unittest
+ import sys
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument("-j", "--jobs", type=int, default=1, help="number of jobs for make")
+ args = parser.parse_args()
+
+ make_jobs = args.jobs
csibe_path = os.path.dirname(os.path.realpath(__file__))
build_directory = "build"
if not os.path.isdir(build_directory):
os.makedirs(build_directory)
os.chdir(build_directory)
- subprocess.call(["cmake", csibe_path])
+ cmake_return_value = subprocess.call(["cmake", csibe_path])
? +++++++++++++++++++++
+ if cmake_return_value:
+ sys.exit(cmake_return_value)
+ make_return_value = subprocess.call(["make", "-j{}".format(make_jobs)])
+ if make_return_value:
+ sys.exit(make_return_value)
+
+ make_size_return_value = subprocess.call(["make", "size"])
+ if make_size_return_value:
+ sys.exit(make_size_return_value)
+ | 21 | 1.4 | 19 | 2 |
94aec9e4a6501e875dbd6b59df57598f742a82da | ca_on_niagara/people.py | ca_on_niagara/people.py | from __future__ import unicode_literals
from utils import CSVScraper
COUNCIL_PAGE = 'http://www.niagararegion.ca/test/sherpa-list-to-csv.aspx?list=council-elected-officials-csv'
class NiagaraPersonScraper(CSVScraper):
csv_url = 'http://www.niagararegion.ca/test/sherpa-list-to-csv.aspx?list=council-elected-officials-csv'
many_posts_per_area = True
| from __future__ import unicode_literals
from utils import CSVScraper
COUNCIL_PAGE = 'http://www.niagararegion.ca/test/sherpa-list-to-csv.aspx?list=council-elected-officials-csv'
class NiagaraPersonScraper(CSVScraper):
# The new data file:
# * has underscores in headers
# * yses "District_ID" instead of "District name"
# * prefixes "District_ID" with "Niagara Region - "
# https://www.niagaraopendata.ca//dataset/ee767222-c7fc-4541-8cad-a27276a3522b/resource/af5621ad-c2e4-4569-803f-4aadca4173be/download/councilelectedofficials.csv
csv_url = 'http://www.niagararegion.ca/test/sherpa-list-to-csv.aspx?list=council-elected-officials-csv'
many_posts_per_area = True
| Add comments about new file | ca_on_niagara: Add comments about new file
| Python | mit | opencivicdata/scrapers-ca,opencivicdata/scrapers-ca | python | ## Code Before:
from __future__ import unicode_literals
from utils import CSVScraper
COUNCIL_PAGE = 'http://www.niagararegion.ca/test/sherpa-list-to-csv.aspx?list=council-elected-officials-csv'
class NiagaraPersonScraper(CSVScraper):
csv_url = 'http://www.niagararegion.ca/test/sherpa-list-to-csv.aspx?list=council-elected-officials-csv'
many_posts_per_area = True
## Instruction:
ca_on_niagara: Add comments about new file
## Code After:
from __future__ import unicode_literals
from utils import CSVScraper
COUNCIL_PAGE = 'http://www.niagararegion.ca/test/sherpa-list-to-csv.aspx?list=council-elected-officials-csv'
class NiagaraPersonScraper(CSVScraper):
# The new data file:
# * has underscores in headers
# * yses "District_ID" instead of "District name"
# * prefixes "District_ID" with "Niagara Region - "
# https://www.niagaraopendata.ca//dataset/ee767222-c7fc-4541-8cad-a27276a3522b/resource/af5621ad-c2e4-4569-803f-4aadca4173be/download/councilelectedofficials.csv
csv_url = 'http://www.niagararegion.ca/test/sherpa-list-to-csv.aspx?list=council-elected-officials-csv'
many_posts_per_area = True
| from __future__ import unicode_literals
from utils import CSVScraper
COUNCIL_PAGE = 'http://www.niagararegion.ca/test/sherpa-list-to-csv.aspx?list=council-elected-officials-csv'
class NiagaraPersonScraper(CSVScraper):
+ # The new data file:
+ # * has underscores in headers
+ # * yses "District_ID" instead of "District name"
+ # * prefixes "District_ID" with "Niagara Region - "
+ # https://www.niagaraopendata.ca//dataset/ee767222-c7fc-4541-8cad-a27276a3522b/resource/af5621ad-c2e4-4569-803f-4aadca4173be/download/councilelectedofficials.csv
csv_url = 'http://www.niagararegion.ca/test/sherpa-list-to-csv.aspx?list=council-elected-officials-csv'
many_posts_per_area = True | 5 | 0.555556 | 5 | 0 |
e2a2a2b9ecf607d282cfe038516ba045e1ae514d | .github/ISSUE_TEMPLATE/resolver-failure.md | .github/ISSUE_TEMPLATE/resolver-failure.md | ---
name: Dependency resolver failures / errors
about: Report when the pip dependency resolver fails
labels: ["K: UX", "K: crash", "C: new resolver", "C: dependency resolution"]
---
<!--
Please provide as much information as you can about your failure, so that we can understand the root cause.
Try if your issue has been fixed in the in-development version of pip. Use the following command to install pip from master:
python -m pip install -U "pip @ git+https://github.com/pypa/pip.git"
-->
**What did you want to do?**
<!-- Include any inputs you gave to pip, for example:
* Package requirements: any CLI arguments and/or your requirements.txt file
* Already installed packages, outputted via `pip freeze`
-->
**Output**
```
Paste what pip outputted in a code block. https://github.github.com/gfm/#fenced-code-blocks
```
**Additional information**
<!--
It would be great if you could also include your dependency tree. For this you can use pipdeptree: https://pypi.org/project/pipdeptree/
For users installing packages from a private repository or local directory, please try your best to describe your setup. We'd like to understand how to reproduce the error locally, so would need (at a minimum) a description of the packages you are trying to install, and a list of dependencies for each package.
-->
| ---
name: Dependency resolver failures / errors
about: Report when the pip dependency resolver fails
labels: ["K: UX", "K: crash", "C: new resolver", "C: dependency resolution"]
---
<!--
Please provide as much information as you can about your failure, so that we can understand the root cause.
Try if your issue has been fixed in the in-development version of pip. Use the following command to install pip from master:
python -m pip install -U "pip @ https://github.com/pypa/pip/archive/master.zip"
-->
**What did you want to do?**
<!-- Include any inputs you gave to pip, for example:
* Package requirements: any CLI arguments and/or your requirements.txt file
* Already installed packages, outputted via `pip freeze`
-->
**Output**
```
Paste what pip outputted in a code block. https://github.github.com/gfm/#fenced-code-blocks
```
**Additional information**
<!--
It would be great if you could also include your dependency tree. For this you can use pipdeptree: https://pypi.org/project/pipdeptree/
For users installing packages from a private repository or local directory, please try your best to describe your setup. We'd like to understand how to reproduce the error locally, so would need (at a minimum) a description of the packages you are trying to install, and a list of dependencies for each package.
-->
| Use GitHub snapshot to avoid Git dependency | Use GitHub snapshot to avoid Git dependency
Co-authored-by: Xavier Fernandez <26d0e519861c183645e00d0c8ead9f8391d807cd@gmail.com>
| Markdown | mit | pfmoore/pip,pfmoore/pip,pradyunsg/pip,pypa/pip,pradyunsg/pip,sbidoul/pip,sbidoul/pip,pypa/pip | markdown | ## Code Before:
---
name: Dependency resolver failures / errors
about: Report when the pip dependency resolver fails
labels: ["K: UX", "K: crash", "C: new resolver", "C: dependency resolution"]
---
<!--
Please provide as much information as you can about your failure, so that we can understand the root cause.
Try if your issue has been fixed in the in-development version of pip. Use the following command to install pip from master:
python -m pip install -U "pip @ git+https://github.com/pypa/pip.git"
-->
**What did you want to do?**
<!-- Include any inputs you gave to pip, for example:
* Package requirements: any CLI arguments and/or your requirements.txt file
* Already installed packages, outputted via `pip freeze`
-->
**Output**
```
Paste what pip outputted in a code block. https://github.github.com/gfm/#fenced-code-blocks
```
**Additional information**
<!--
It would be great if you could also include your dependency tree. For this you can use pipdeptree: https://pypi.org/project/pipdeptree/
For users installing packages from a private repository or local directory, please try your best to describe your setup. We'd like to understand how to reproduce the error locally, so would need (at a minimum) a description of the packages you are trying to install, and a list of dependencies for each package.
-->
## Instruction:
Use GitHub snapshot to avoid Git dependency
Co-authored-by: Xavier Fernandez <26d0e519861c183645e00d0c8ead9f8391d807cd@gmail.com>
## Code After:
---
name: Dependency resolver failures / errors
about: Report when the pip dependency resolver fails
labels: ["K: UX", "K: crash", "C: new resolver", "C: dependency resolution"]
---
<!--
Please provide as much information as you can about your failure, so that we can understand the root cause.
Try if your issue has been fixed in the in-development version of pip. Use the following command to install pip from master:
python -m pip install -U "pip @ https://github.com/pypa/pip/archive/master.zip"
-->
**What did you want to do?**
<!-- Include any inputs you gave to pip, for example:
* Package requirements: any CLI arguments and/or your requirements.txt file
* Already installed packages, outputted via `pip freeze`
-->
**Output**
```
Paste what pip outputted in a code block. https://github.github.com/gfm/#fenced-code-blocks
```
**Additional information**
<!--
It would be great if you could also include your dependency tree. For this you can use pipdeptree: https://pypi.org/project/pipdeptree/
For users installing packages from a private repository or local directory, please try your best to describe your setup. We'd like to understand how to reproduce the error locally, so would need (at a minimum) a description of the packages you are trying to install, and a list of dependencies for each package.
-->
| ---
name: Dependency resolver failures / errors
about: Report when the pip dependency resolver fails
labels: ["K: UX", "K: crash", "C: new resolver", "C: dependency resolution"]
---
<!--
Please provide as much information as you can about your failure, so that we can understand the root cause.
Try if your issue has been fixed in the in-development version of pip. Use the following command to install pip from master:
- python -m pip install -U "pip @ git+https://github.com/pypa/pip.git"
? ---- ^ ^
+ python -m pip install -U "pip @ https://github.com/pypa/pip/archive/master.zip"
? +++++++++++++++ ^ ^
-->
**What did you want to do?**
<!-- Include any inputs you gave to pip, for example:
* Package requirements: any CLI arguments and/or your requirements.txt file
* Already installed packages, outputted via `pip freeze`
-->
**Output**
```
Paste what pip outputted in a code block. https://github.github.com/gfm/#fenced-code-blocks
```
**Additional information**
<!--
It would be great if you could also include your dependency tree. For this you can use pipdeptree: https://pypi.org/project/pipdeptree/
For users installing packages from a private repository or local directory, please try your best to describe your setup. We'd like to understand how to reproduce the error locally, so would need (at a minimum) a description of the packages you are trying to install, and a list of dependencies for each package.
--> | 2 | 0.058824 | 1 | 1 |
bf5c15c692bcac3277107812c0ce1743bb9a1566 | QtKeychainConfig.cmake.in | QtKeychainConfig.cmake.in | get_filename_component(QTKEYCHAIN_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(EXISTS "${QTKEYCHAIN_CMAKE_DIR}/CMakeCache.txt")
# In build tree
include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainBuildTreeSettings.cmake")
else()
set(QTKEYCHAIN_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
endif()
# Our library dependencies (contains definitions for IMPORTED targets)
include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainLibraryDepends.cmake")
# These are IMPORTED targets created by FooBarLibraryDepends.cmake
set(QTKEYCHAIN_LIBRARIES qtkeychain)
| get_filename_component(QTKEYCHAIN_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(EXISTS "${QTKEYCHAIN_CMAKE_DIR}/CMakeCache.txt")
# In build tree
include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainBuildTreeSettings.cmake")
else()
set(QTKEYCHAIN_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
endif()
# Our library dependencies (contains definitions for IMPORTED targets)
include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainLibraryDepends.cmake")
# These are IMPORTED targets created by FooBarLibraryDepends.cmake
set(QTKEYCHAIN_LIBRARIES qtkeychain)
set(QTKEYCHAIN_FOUND TRUE)
| Add QTKEYCHAIN_FOUND var to config file | Add QTKEYCHAIN_FOUND var to config file
| unknown | bsd-2-clause | seem-sky/qtkeychain,seem-sky/qtkeychain | unknown | ## Code Before:
get_filename_component(QTKEYCHAIN_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(EXISTS "${QTKEYCHAIN_CMAKE_DIR}/CMakeCache.txt")
# In build tree
include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainBuildTreeSettings.cmake")
else()
set(QTKEYCHAIN_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
endif()
# Our library dependencies (contains definitions for IMPORTED targets)
include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainLibraryDepends.cmake")
# These are IMPORTED targets created by FooBarLibraryDepends.cmake
set(QTKEYCHAIN_LIBRARIES qtkeychain)
## Instruction:
Add QTKEYCHAIN_FOUND var to config file
## Code After:
get_filename_component(QTKEYCHAIN_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(EXISTS "${QTKEYCHAIN_CMAKE_DIR}/CMakeCache.txt")
# In build tree
include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainBuildTreeSettings.cmake")
else()
set(QTKEYCHAIN_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
endif()
# Our library dependencies (contains definitions for IMPORTED targets)
include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainLibraryDepends.cmake")
# These are IMPORTED targets created by FooBarLibraryDepends.cmake
set(QTKEYCHAIN_LIBRARIES qtkeychain)
set(QTKEYCHAIN_FOUND TRUE)
| get_filename_component(QTKEYCHAIN_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
if(EXISTS "${QTKEYCHAIN_CMAKE_DIR}/CMakeCache.txt")
# In build tree
include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainBuildTreeSettings.cmake")
else()
set(QTKEYCHAIN_INCLUDE_DIRS "@CMAKE_INSTALL_FULL_INCLUDEDIR@")
endif()
# Our library dependencies (contains definitions for IMPORTED targets)
include("${QTKEYCHAIN_CMAKE_DIR}/QtKeychainLibraryDepends.cmake")
# These are IMPORTED targets created by FooBarLibraryDepends.cmake
set(QTKEYCHAIN_LIBRARIES qtkeychain)
+
+ set(QTKEYCHAIN_FOUND TRUE) | 2 | 0.153846 | 2 | 0 |
48da195228d887f6ca6fd8c8242322e272a32c32 | python/requirements.txt | python/requirements.txt | ansible
awscli
beautifulsoup4
blinkstick
boto3
click
colorama
colorlog
curdling
django
fabric
flake8
flask
httpbin
ipython
isort
laboratory
percol
pew
pip
prospector[with_everything]
pylint
pytest
pytest-cov
requests
saws
setuptools
termcolor
tornado
tox
twine
uwsgi
vcrpy
vulture
wrapt
yapf
| ansible
awscli
beautifulsoup4
blinkstick
boto3
caniusepython3
click
colorama
colorlog
curdling
django
fabric
flake8
flask
future
httpbin
ipython
isort
laboratory
modernize
percol
pew
pip
prospector[with_everything]
pylint
pytest
pytest-cov
requests
saws
setuptools
termcolor
tornado
tox
twine
uwsgi
vcrpy
vulture
wrapt
yapf
| Add Python 3 conversion tools | feat: Add Python 3 conversion tools
| Text | mit | e4r7hbug/dotfiles,e4r7hbug/dotfiles | text | ## Code Before:
ansible
awscli
beautifulsoup4
blinkstick
boto3
click
colorama
colorlog
curdling
django
fabric
flake8
flask
httpbin
ipython
isort
laboratory
percol
pew
pip
prospector[with_everything]
pylint
pytest
pytest-cov
requests
saws
setuptools
termcolor
tornado
tox
twine
uwsgi
vcrpy
vulture
wrapt
yapf
## Instruction:
feat: Add Python 3 conversion tools
## Code After:
ansible
awscli
beautifulsoup4
blinkstick
boto3
caniusepython3
click
colorama
colorlog
curdling
django
fabric
flake8
flask
future
httpbin
ipython
isort
laboratory
modernize
percol
pew
pip
prospector[with_everything]
pylint
pytest
pytest-cov
requests
saws
setuptools
termcolor
tornado
tox
twine
uwsgi
vcrpy
vulture
wrapt
yapf
| ansible
awscli
beautifulsoup4
blinkstick
boto3
+ caniusepython3
click
colorama
colorlog
curdling
django
fabric
flake8
flask
+ future
httpbin
ipython
isort
laboratory
+ modernize
percol
pew
pip
prospector[with_everything]
pylint
pytest
pytest-cov
requests
saws
setuptools
termcolor
tornado
tox
twine
uwsgi
vcrpy
vulture
wrapt
yapf | 3 | 0.083333 | 3 | 0 |
ab4c92508eefce6ed440c18a0cbaebd5aa29b731 | app/routes/raids/index.js | app/routes/raids/index.js | import Ember from 'ember';
/* global moment */
export default Ember.Route.extend({
model: function() {
return this.store.filter('raid', { 'current': true }, function(raid) {
return moment(raid.get('date')).subtract(6, 'hours').isAfter();
});
},
setupController: function (controller, model) {
controller.set('model', model);
controller.set('roles', this.store.all('role'));
}
});
| import Ember from 'ember';
/* global moment */
export default Ember.Route.extend({
model: function() {
return this.store.filter('raid', {}, function(raid) {
return moment(raid.get('date')).subtract(6, 'hours').isAfter();
});
},
setupController: function (controller, model) {
controller.set('model', model);
controller.set('roles', this.store.all('role'));
}
});
| Use an empty query when grabbing filtered raids | Use an empty query when grabbing filtered raids
| JavaScript | mit | kelsin/coretheloothound,kelsin/coretheloothound | javascript | ## Code Before:
import Ember from 'ember';
/* global moment */
export default Ember.Route.extend({
model: function() {
return this.store.filter('raid', { 'current': true }, function(raid) {
return moment(raid.get('date')).subtract(6, 'hours').isAfter();
});
},
setupController: function (controller, model) {
controller.set('model', model);
controller.set('roles', this.store.all('role'));
}
});
## Instruction:
Use an empty query when grabbing filtered raids
## Code After:
import Ember from 'ember';
/* global moment */
export default Ember.Route.extend({
model: function() {
return this.store.filter('raid', {}, function(raid) {
return moment(raid.get('date')).subtract(6, 'hours').isAfter();
});
},
setupController: function (controller, model) {
controller.set('model', model);
controller.set('roles', this.store.all('role'));
}
});
| import Ember from 'ember';
/* global moment */
export default Ember.Route.extend({
model: function() {
- return this.store.filter('raid', { 'current': true }, function(raid) {
? -----------------
+ return this.store.filter('raid', {}, function(raid) {
return moment(raid.get('date')).subtract(6, 'hours').isAfter();
});
},
setupController: function (controller, model) {
controller.set('model', model);
controller.set('roles', this.store.all('role'));
}
}); | 2 | 0.133333 | 1 | 1 |
65bf633591a3441d8e17177c8d2a1bd1189f46bf | README.md | README.md | a library framework for the library that can be used for both Node.js and GoogleAppsScript
| a library framework for the library that can be used for both Node.js and GoogleAppsScript
## GAS Library
the project key of nougat is "Mgi5BONp-6aSyYfVnIfO1mGtj26Rh5Cwx".
| Add the project key of the nougat library on GAS | Add the project key of the nougat library on GAS
| Markdown | mit | unau/nougat | markdown | ## Code Before:
a library framework for the library that can be used for both Node.js and GoogleAppsScript
## Instruction:
Add the project key of the nougat library on GAS
## Code After:
a library framework for the library that can be used for both Node.js and GoogleAppsScript
## GAS Library
the project key of nougat is "Mgi5BONp-6aSyYfVnIfO1mGtj26Rh5Cwx".
| a library framework for the library that can be used for both Node.js and GoogleAppsScript
+
+
+ ## GAS Library
+ the project key of nougat is "Mgi5BONp-6aSyYfVnIfO1mGtj26Rh5Cwx". | 4 | 4 | 4 | 0 |
3cecda510d55db16636ae0eea0d0375fcb0924b4 | README.md | README.md | Searchisko configuration
|
The goal is to move Searchisko configuration files to separate repostory. Right now this repo is a WIP.
Progress of this task can be tracked in: <https://github.com/searchisko/searchisko/issues/71>
| Make clear what the status of this repo is | Make clear what the status of this repo is
| Markdown | apache-2.0 | searchisko/configuration,ollyjshaw/configuration,paulrobinson/configuration,ollyjshaw/configuration,paulrobinson/configuration,searchisko/configuration | markdown | ## Code Before:
Searchisko configuration
## Instruction:
Make clear what the status of this repo is
## Code After:
The goal is to move Searchisko configuration files to separate repostory. Right now this repo is a WIP.
Progress of this task can be tracked in: <https://github.com/searchisko/searchisko/issues/71>
| - Searchisko configuration
+
+ The goal is to move Searchisko configuration files to separate repostory. Right now this repo is a WIP.
+ Progress of this task can be tracked in: <https://github.com/searchisko/searchisko/issues/71> | 4 | 4 | 3 | 1 |
08fd41d394ad36a9846a78a69a35232f72315a78 | .travis.yml | .travis.yml | language: java
jdk:
- openjdk8
install:
- JAVA_HOME=$(jdk_switcher home openjdk8) ./gradlew classes testClasses
after_success:
- ./gradlew jacocoTestReport
- bash <(curl -s https://codecov.io/bash)
| dist: xenial
language: java
jdk:
- openjdk8
before_install:
- sudo apt-get -y install python2.7 python-pip
- python2 -m pip install --user google-apis-client-generator
install:
- JAVA_HOME=$(jdk_switcher home openjdk8) ./gradlew classes testClasses
after_success:
- ./gradlew jacocoTestReport
- bash <(curl -s https://codecov.io/bash)
| Install dependencies for code generation | Install dependencies for code generation
- add python and the code generator for
the unit test of the API client code
generation
| YAML | apache-2.0 | AODocs/endpoints-java,AODocs/endpoints-java | yaml | ## Code Before:
language: java
jdk:
- openjdk8
install:
- JAVA_HOME=$(jdk_switcher home openjdk8) ./gradlew classes testClasses
after_success:
- ./gradlew jacocoTestReport
- bash <(curl -s https://codecov.io/bash)
## Instruction:
Install dependencies for code generation
- add python and the code generator for
the unit test of the API client code
generation
## Code After:
dist: xenial
language: java
jdk:
- openjdk8
before_install:
- sudo apt-get -y install python2.7 python-pip
- python2 -m pip install --user google-apis-client-generator
install:
- JAVA_HOME=$(jdk_switcher home openjdk8) ./gradlew classes testClasses
after_success:
- ./gradlew jacocoTestReport
- bash <(curl -s https://codecov.io/bash)
| + dist: xenial
language: java
jdk:
- openjdk8
+ before_install:
+ - sudo apt-get -y install python2.7 python-pip
+ - python2 -m pip install --user google-apis-client-generator
install:
- JAVA_HOME=$(jdk_switcher home openjdk8) ./gradlew classes testClasses
after_success:
- ./gradlew jacocoTestReport
- bash <(curl -s https://codecov.io/bash) | 4 | 0.5 | 4 | 0 |
af90c2644c1cfd4e9a97d5ef57eee1f3f4cbdff3 | .github/config.yml | .github/config.yml | newIssueWelcomeComment: >
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.
backers:
- 78856
- 1359421
- 4650931
- 13532591
- 5097613
- 22454918
- 347552
- 977348
- 28748
- 2835826
- 515720
- 124171
- 230476
- 10102132
- 10038688
- 817509
- 163128
- 4762
- 933251
- 3974037
- 141159
- 10263
- 3117205
- 5697723
- 6803419
- 1718128
- 2042893
- 14060883
- 244396
| newIssueWelcomeComment: >
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.
backers:
- 78856
- 1359421
- 4650931
- 13532591
- 5097613
- 22454918
- 347552
- 977348
- 28748
- 2835826
- 515720
- 124171
- 230476
- 10102132
- 10038688
- 817509
- 163128
- 4762
- 933251
- 3974037
- 141159
- 10263
- 3117205
- 5697723
- 6803419
- 1718128
- 2042893
- 14060883
- 244396
- 8832878
| Add Tom Boland as a backer - thank you! :) | Add Tom Boland as a backer - thank you! :)
| YAML | mit | extr0py/oni,extr0py/oni,extr0py/oni,extr0py/oni,extr0py/oni | yaml | ## Code Before:
newIssueWelcomeComment: >
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.
backers:
- 78856
- 1359421
- 4650931
- 13532591
- 5097613
- 22454918
- 347552
- 977348
- 28748
- 2835826
- 515720
- 124171
- 230476
- 10102132
- 10038688
- 817509
- 163128
- 4762
- 933251
- 3974037
- 141159
- 10263
- 3117205
- 5697723
- 6803419
- 1718128
- 2042893
- 14060883
- 244396
## Instruction:
Add Tom Boland as a backer - thank you! :)
## Code After:
newIssueWelcomeComment: >
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.
backers:
- 78856
- 1359421
- 4650931
- 13532591
- 5097613
- 22454918
- 347552
- 977348
- 28748
- 2835826
- 515720
- 124171
- 230476
- 10102132
- 10038688
- 817509
- 163128
- 4762
- 933251
- 3974037
- 141159
- 10263
- 3117205
- 5697723
- 6803419
- 1718128
- 2042893
- 14060883
- 244396
- 8832878
| newIssueWelcomeComment: >
Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.
backers:
- 78856
- 1359421
- 4650931
- 13532591
- 5097613
- 22454918
- 347552
- 977348
- 28748
- 2835826
- 515720
- 124171
- 230476
- 10102132
- 10038688
- 817509
- 163128
- 4762
- 933251
- 3974037
- 141159
- 10263
- 3117205
- 5697723
- 6803419
- 1718128
- 2042893
- 14060883
- 244396
+ - 8832878
+ | 2 | 0.0625 | 2 | 0 |
1ef9e0c5181a7b79ddf92419a7ff76f2a3efc16f | .travis.yml | .travis.yml | language: go
sudo: false
env:
- GO15VENDOREXPERIMENT=1
matrix:
fast_finish: true
allow_failures:
- go: tip
go:
- 1.5
- tip
before_script:
- go vet .
before_install:
- python --version
- openssl version
- go get github.com/Masterminds/glide
- make depends
install:
- make build
script:
- make test
| language: go
sudo: false
env:
- GO15VENDOREXPERIMENT=1
go:
- 1.5
- 1.6
before_script:
- go vet .
before_install:
- python --version
- openssl version
- go get github.com/Masterminds/glide
- make depends
install:
- make build
script:
- make test
| Build on Go 1.6 in Travis-CI | Build on Go 1.6 in Travis-CI
| YAML | apache-2.0 | square/ghostunnel,square/ghostunnel | yaml | ## Code Before:
language: go
sudo: false
env:
- GO15VENDOREXPERIMENT=1
matrix:
fast_finish: true
allow_failures:
- go: tip
go:
- 1.5
- tip
before_script:
- go vet .
before_install:
- python --version
- openssl version
- go get github.com/Masterminds/glide
- make depends
install:
- make build
script:
- make test
## Instruction:
Build on Go 1.6 in Travis-CI
## Code After:
language: go
sudo: false
env:
- GO15VENDOREXPERIMENT=1
go:
- 1.5
- 1.6
before_script:
- go vet .
before_install:
- python --version
- openssl version
- go get github.com/Masterminds/glide
- make depends
install:
- make build
script:
- make test
| language: go
sudo: false
env:
- GO15VENDOREXPERIMENT=1
- matrix:
- fast_finish: true
- allow_failures:
- - go: tip
-
go:
- 1.5
- - tip
+ - 1.6
before_script:
- go vet .
before_install:
- python --version
- openssl version
- go get github.com/Masterminds/glide
- make depends
install:
- make build
script:
- make test | 7 | 0.233333 | 1 | 6 |
c343acbbcb250c95d6a9f940871bb12a71e88202 | CHANGES.rst | CHANGES.rst | Weitersager Changelog
=====================
Version 0.3
-----------
Unreleased
Version 0.2
-----------
Released 2020-09-13
- Raised minimum Python version to 3.7.
- HTTP protocol was changed:
- Only a single channel is allowed per message.
- Response code for successful submit was changed from 200 (OK) to
more appropriate 202 (Accepted).
- Divided code base into separate modules in a package.
- Switch to a ``src/`` layout.
- Dependency versions have been pinned.
- Updated irc version to 19.0.1 (from 12.3).
- Updated blinker to 1.4 (from 1.3).
- Do not use tox for tests anymore.
- Use ``dataclass`` instead of ``namedtuple`` for value objects.
- Allowed for custom shutdown predicate.
Version 0.1
-----------
Released 2015-04-24 at LANresort 2015
- First official release
| Weitersager Changelog
=====================
Version 0.3
-----------
Unreleased
Version 0.2
-----------
Released 2020-09-13
- Raised minimum Python version to 3.7.
- HTTP protocol was changed:
- Only a single channel is allowed per message.
- Response code for successful submit was changed from 200 (OK) to
more appropriate 202 (Accepted).
- Divided code base into separate modules in a package.
- Switch to a ``src/`` layout.
- Dependency versions have been pinned.
- Updated irc version to 19.0.1 (from 12.3).
- Updated blinker to 1.4 (from 1.3).
- Do not use tox for tests anymore.
- Use ``dataclass`` instead of ``namedtuple`` for value objects.
- Allowed for custom shutdown predicate.
Version 0.1
-----------
Released 2015-04-24 at LANresort 2015
- First official release
| Put blank lines between changelog items | Put blank lines between changelog items
Fixes rendering of nested list.
| reStructuredText | mit | homeworkprod/weitersager | restructuredtext | ## Code Before:
Weitersager Changelog
=====================
Version 0.3
-----------
Unreleased
Version 0.2
-----------
Released 2020-09-13
- Raised minimum Python version to 3.7.
- HTTP protocol was changed:
- Only a single channel is allowed per message.
- Response code for successful submit was changed from 200 (OK) to
more appropriate 202 (Accepted).
- Divided code base into separate modules in a package.
- Switch to a ``src/`` layout.
- Dependency versions have been pinned.
- Updated irc version to 19.0.1 (from 12.3).
- Updated blinker to 1.4 (from 1.3).
- Do not use tox for tests anymore.
- Use ``dataclass`` instead of ``namedtuple`` for value objects.
- Allowed for custom shutdown predicate.
Version 0.1
-----------
Released 2015-04-24 at LANresort 2015
- First official release
## Instruction:
Put blank lines between changelog items
Fixes rendering of nested list.
## Code After:
Weitersager Changelog
=====================
Version 0.3
-----------
Unreleased
Version 0.2
-----------
Released 2020-09-13
- Raised minimum Python version to 3.7.
- HTTP protocol was changed:
- Only a single channel is allowed per message.
- Response code for successful submit was changed from 200 (OK) to
more appropriate 202 (Accepted).
- Divided code base into separate modules in a package.
- Switch to a ``src/`` layout.
- Dependency versions have been pinned.
- Updated irc version to 19.0.1 (from 12.3).
- Updated blinker to 1.4 (from 1.3).
- Do not use tox for tests anymore.
- Use ``dataclass`` instead of ``namedtuple`` for value objects.
- Allowed for custom shutdown predicate.
Version 0.1
-----------
Released 2015-04-24 at LANresort 2015
- First official release
| Weitersager Changelog
=====================
Version 0.3
-----------
Unreleased
Version 0.2
-----------
Released 2020-09-13
- Raised minimum Python version to 3.7.
+
- HTTP protocol was changed:
+
- Only a single channel is allowed per message.
+
- Response code for successful submit was changed from 200 (OK) to
more appropriate 202 (Accepted).
+
- Divided code base into separate modules in a package.
+
- Switch to a ``src/`` layout.
+
- Dependency versions have been pinned.
+
- Updated irc version to 19.0.1 (from 12.3).
+
- Updated blinker to 1.4 (from 1.3).
+
- Do not use tox for tests anymore.
+
- Use ``dataclass`` instead of ``namedtuple`` for value objects.
+
- Allowed for custom shutdown predicate.
Version 0.1
-----------
Released 2015-04-24 at LANresort 2015
- First official release | 11 | 0.305556 | 11 | 0 |
b6c5c7fcc3a0a09053f7de1a1310e47480e64aba | src/plugins/iterate/README.md | src/plugins/iterate/README.md | - infos = Information about the iterate plugin is in keys below
- infos/author = Markus Raab <elektra@libelektra.org>
- infos/licence = BSD
- infos/provides =
- infos/needs =
- infos/placements = presetstorage postgetstorage
- infos/status = unittest nodep libc experimental unfinished nodoc concept
- infos/description = conditionally calls exported functions
## Usage
Suppose you have a plugin bar that exports the function `foo(Key *k)`.
Then you can mount:
kdb mount file.dump /example/iterate dump iterate when=bar foo Key
Which will execute `foo(k)` for every key that has the metadata `when`.
| - infos = Information about the iterate plugin is in keys below
- infos/author = Markus Raab <elektra@libelektra.org>
- infos/licence = BSD
- infos/provides =
- infos/needs =
- infos/placements = presetstorage postgetstorage
- infos/status = unittest nodep libc experimental unfinished nodoc concept
- infos/description = conditionally calls exported functions
## Usage
Suppose you have a plugin bar that exports the function `foo(Key *k)`.
Then you can mount:
```sh
kdb mount file.dump /example/iterate dump iterate when=bar foo Key
```
Which will execute `foo(k)` for every key that has the metadata `when`.
| Use fence for code snippet | Iterate: Use fence for code snippet
| Markdown | bsd-3-clause | ElektraInitiative/libelektra,BernhardDenner/libelektra,mpranj/libelektra,petermax2/libelektra,BernhardDenner/libelektra,mpranj/libelektra,mpranj/libelektra,petermax2/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,petermax2/libelektra,mpranj/libelektra,petermax2/libelektra,petermax2/libelektra,petermax2/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,mpranj/libelektra,petermax2/libelektra,ElektraInitiative/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,petermax2/libelektra,mpranj/libelektra,mpranj/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,BernhardDenner/libelektra,BernhardDenner/libelektra,ElektraInitiative/libelektra,mpranj/libelektra | markdown | ## Code Before:
- infos = Information about the iterate plugin is in keys below
- infos/author = Markus Raab <elektra@libelektra.org>
- infos/licence = BSD
- infos/provides =
- infos/needs =
- infos/placements = presetstorage postgetstorage
- infos/status = unittest nodep libc experimental unfinished nodoc concept
- infos/description = conditionally calls exported functions
## Usage
Suppose you have a plugin bar that exports the function `foo(Key *k)`.
Then you can mount:
kdb mount file.dump /example/iterate dump iterate when=bar foo Key
Which will execute `foo(k)` for every key that has the metadata `when`.
## Instruction:
Iterate: Use fence for code snippet
## Code After:
- infos = Information about the iterate plugin is in keys below
- infos/author = Markus Raab <elektra@libelektra.org>
- infos/licence = BSD
- infos/provides =
- infos/needs =
- infos/placements = presetstorage postgetstorage
- infos/status = unittest nodep libc experimental unfinished nodoc concept
- infos/description = conditionally calls exported functions
## Usage
Suppose you have a plugin bar that exports the function `foo(Key *k)`.
Then you can mount:
```sh
kdb mount file.dump /example/iterate dump iterate when=bar foo Key
```
Which will execute `foo(k)` for every key that has the metadata `when`.
| - infos = Information about the iterate plugin is in keys below
- infos/author = Markus Raab <elektra@libelektra.org>
- infos/licence = BSD
- infos/provides =
- infos/needs =
- infos/placements = presetstorage postgetstorage
- infos/status = unittest nodep libc experimental unfinished nodoc concept
- infos/description = conditionally calls exported functions
## Usage
Suppose you have a plugin bar that exports the function `foo(Key *k)`.
Then you can mount:
+ ```sh
- kdb mount file.dump /example/iterate dump iterate when=bar foo Key
? ----
+ kdb mount file.dump /example/iterate dump iterate when=bar foo Key
+ ```
Which will execute `foo(k)` for every key that has the metadata `when`. | 4 | 0.235294 | 3 | 1 |
cdb29356d47db83b517e053165ef78cfd81ff918 | db/models/beacons.js | db/models/beacons.js | const Sequelize = require('sequelize');
const db = require('../db.js');
const beacon = db.define('beacon', {
currentLocation: {
type: Sequelize.ARRAY(Sequelize.FLOAT),
},
})
module.exports = beacon;
| const Sequelize = require('sequelize');
const db = require('../db.js');
const beacon = db.define('beacon', {
currentLocation: {
type: Sequelize.ARRAY(Sequelize.FLOAT),
},
OS: {
type: Sequelize.STRING,
},
token: {
type: Sequelize.STRING,
},
lastNotification: {
type: Sequelize.DATE,
},
device: {
type: Sequelize.STRING,
}
})
module.exports = beacon;
| Add device info to beacon | refactor(database): Add device info to beacon
Add device info to beacon
| JavaScript | mit | LintLions/Respondr,LintLions/Respondr | javascript | ## Code Before:
const Sequelize = require('sequelize');
const db = require('../db.js');
const beacon = db.define('beacon', {
currentLocation: {
type: Sequelize.ARRAY(Sequelize.FLOAT),
},
})
module.exports = beacon;
## Instruction:
refactor(database): Add device info to beacon
Add device info to beacon
## Code After:
const Sequelize = require('sequelize');
const db = require('../db.js');
const beacon = db.define('beacon', {
currentLocation: {
type: Sequelize.ARRAY(Sequelize.FLOAT),
},
OS: {
type: Sequelize.STRING,
},
token: {
type: Sequelize.STRING,
},
lastNotification: {
type: Sequelize.DATE,
},
device: {
type: Sequelize.STRING,
}
})
module.exports = beacon;
| const Sequelize = require('sequelize');
const db = require('../db.js');
const beacon = db.define('beacon', {
currentLocation: {
type: Sequelize.ARRAY(Sequelize.FLOAT),
},
+ OS: {
+ type: Sequelize.STRING,
+ },
+ token: {
+ type: Sequelize.STRING,
+ },
+ lastNotification: {
+ type: Sequelize.DATE,
+ },
+ device: {
+ type: Sequelize.STRING,
+ }
})
module.exports = beacon;
| 12 | 1.090909 | 12 | 0 |
02b194c36659bfd85485aded4e52c3e587df48b0 | Runtime/Rendering/BufferDX11.h | Runtime/Rendering/BufferDX11.h |
namespace Mile
{
class MEAPI BufferDX11 : public ResourceDX11
{
public:
BufferDX11( RendererDX11* renderer ) :
m_buffer( nullptr ),
ResourceDX11( renderer )
{
}
~BufferDX11( )
{
SafeRelease( m_buffer );
}
virtual ID3D11Resource* GetResource( ) override;
D3D11_BUFFER_DESC GetDesc( ) const { return m_desc; }
virtual void* Map( ) { return nullptr; }
virtual void UnMap( ) { }
protected:
ID3D11Buffer* m_buffer;
D3D11_BUFFER_DESC m_desc;
};
} |
namespace Mile
{
class MEAPI BufferDX11 : public ResourceDX11
{
public:
BufferDX11( RendererDX11* renderer ) :
m_buffer( nullptr ),
ResourceDX11( renderer )
{
}
~BufferDX11( )
{
SafeRelease( m_buffer );
}
virtual ID3D11Resource* GetResource( ) override;
D3D11_BUFFER_DESC GetDesc( ) const { return m_desc; }
virtual void* Map( ) { return nullptr; }
virtual bool UnMap( ) { return false; }
protected:
ID3D11Buffer* m_buffer;
D3D11_BUFFER_DESC m_desc;
};
} | Modify UnMap function return boolean value that succesfully unmaped. | Modify UnMap function return boolean value that succesfully unmaped.
| C | mit | HoRangDev/MileEngine,HoRangDev/MileEngine | c | ## Code Before:
namespace Mile
{
class MEAPI BufferDX11 : public ResourceDX11
{
public:
BufferDX11( RendererDX11* renderer ) :
m_buffer( nullptr ),
ResourceDX11( renderer )
{
}
~BufferDX11( )
{
SafeRelease( m_buffer );
}
virtual ID3D11Resource* GetResource( ) override;
D3D11_BUFFER_DESC GetDesc( ) const { return m_desc; }
virtual void* Map( ) { return nullptr; }
virtual void UnMap( ) { }
protected:
ID3D11Buffer* m_buffer;
D3D11_BUFFER_DESC m_desc;
};
}
## Instruction:
Modify UnMap function return boolean value that succesfully unmaped.
## Code After:
namespace Mile
{
class MEAPI BufferDX11 : public ResourceDX11
{
public:
BufferDX11( RendererDX11* renderer ) :
m_buffer( nullptr ),
ResourceDX11( renderer )
{
}
~BufferDX11( )
{
SafeRelease( m_buffer );
}
virtual ID3D11Resource* GetResource( ) override;
D3D11_BUFFER_DESC GetDesc( ) const { return m_desc; }
virtual void* Map( ) { return nullptr; }
virtual bool UnMap( ) { return false; }
protected:
ID3D11Buffer* m_buffer;
D3D11_BUFFER_DESC m_desc;
};
} |
namespace Mile
{
class MEAPI BufferDX11 : public ResourceDX11
{
public:
BufferDX11( RendererDX11* renderer ) :
m_buffer( nullptr ),
ResourceDX11( renderer )
{
}
~BufferDX11( )
{
SafeRelease( m_buffer );
}
virtual ID3D11Resource* GetResource( ) override;
D3D11_BUFFER_DESC GetDesc( ) const { return m_desc; }
virtual void* Map( ) { return nullptr; }
- virtual void UnMap( ) { }
+ virtual bool UnMap( ) { return false; }
protected:
ID3D11Buffer* m_buffer;
D3D11_BUFFER_DESC m_desc;
};
} | 2 | 0.068966 | 1 | 1 |
6001a06f66e591ea2e764e8f1334b951ee0b4cef | src/main/scala/intellij/haskell/runconfig/console/HaskellConsoleViewMap.scala | src/main/scala/intellij/haskell/runconfig/console/HaskellConsoleViewMap.scala | package intellij.haskell.runconfig.console
import java.util.concurrent.ConcurrentHashMap
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import intellij.haskell.HaskellFile
import scala.collection.JavaConverters._
object HaskellConsoleViewMap {
private val consoleViews = new ConcurrentHashMap[Editor, HaskellConsoleView]().asScala
def addConsole(console: HaskellConsoleView) {
consoleViews.put(console.getConsoleEditor, console)
}
def delConsole(console: HaskellConsoleView) {
consoleViews.remove(console.getConsoleEditor)
}
def getConsole(editor: Editor): Option[HaskellConsoleView] = {
consoleViews.get(editor)
}
def getConsole(editor: Project): Option[HaskellConsoleView] = {
consoleViews.values.find(_.project == editor)
}
// File is project file and not file which represents console
val projectFileByConfigName = new ConcurrentHashMap[String, HaskellFile]().asScala
}
| package intellij.haskell.runconfig.console
import java.util.concurrent.ConcurrentHashMap
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import intellij.haskell.HaskellFile
import scala.collection.JavaConverters._
object HaskellConsoleViewMap {
private val consoleViews = new ConcurrentHashMap[Editor, HaskellConsoleView]().asScala
def addConsole(console: HaskellConsoleView) {
consoleViews.put(console.getConsoleEditor, console)
}
def delConsole(console: HaskellConsoleView) {
consoleViews.remove(console.getConsoleEditor)
}
def getConsole(editor: Editor): Option[HaskellConsoleView] = {
consoleViews.get(editor)
}
def getConsole(editor: Project): Option[HaskellConsoleView] = {
consoleViews.values.find(console => console.project == editor && console.isShowing)
}
// File is project file and not file which represents console
val projectFileByConfigName = new ConcurrentHashMap[String, HaskellFile]().asScala
}
| Fix getConsole to choose active console | Fix getConsole to choose active console
| Scala | apache-2.0 | rikvdkleij/intellij-haskell,rikvdkleij/intellij-haskell | scala | ## Code Before:
package intellij.haskell.runconfig.console
import java.util.concurrent.ConcurrentHashMap
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import intellij.haskell.HaskellFile
import scala.collection.JavaConverters._
object HaskellConsoleViewMap {
private val consoleViews = new ConcurrentHashMap[Editor, HaskellConsoleView]().asScala
def addConsole(console: HaskellConsoleView) {
consoleViews.put(console.getConsoleEditor, console)
}
def delConsole(console: HaskellConsoleView) {
consoleViews.remove(console.getConsoleEditor)
}
def getConsole(editor: Editor): Option[HaskellConsoleView] = {
consoleViews.get(editor)
}
def getConsole(editor: Project): Option[HaskellConsoleView] = {
consoleViews.values.find(_.project == editor)
}
// File is project file and not file which represents console
val projectFileByConfigName = new ConcurrentHashMap[String, HaskellFile]().asScala
}
## Instruction:
Fix getConsole to choose active console
## Code After:
package intellij.haskell.runconfig.console
import java.util.concurrent.ConcurrentHashMap
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import intellij.haskell.HaskellFile
import scala.collection.JavaConverters._
object HaskellConsoleViewMap {
private val consoleViews = new ConcurrentHashMap[Editor, HaskellConsoleView]().asScala
def addConsole(console: HaskellConsoleView) {
consoleViews.put(console.getConsoleEditor, console)
}
def delConsole(console: HaskellConsoleView) {
consoleViews.remove(console.getConsoleEditor)
}
def getConsole(editor: Editor): Option[HaskellConsoleView] = {
consoleViews.get(editor)
}
def getConsole(editor: Project): Option[HaskellConsoleView] = {
consoleViews.values.find(console => console.project == editor && console.isShowing)
}
// File is project file and not file which represents console
val projectFileByConfigName = new ConcurrentHashMap[String, HaskellFile]().asScala
}
| package intellij.haskell.runconfig.console
import java.util.concurrent.ConcurrentHashMap
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.project.Project
import intellij.haskell.HaskellFile
import scala.collection.JavaConverters._
object HaskellConsoleViewMap {
private val consoleViews = new ConcurrentHashMap[Editor, HaskellConsoleView]().asScala
def addConsole(console: HaskellConsoleView) {
consoleViews.put(console.getConsoleEditor, console)
}
def delConsole(console: HaskellConsoleView) {
consoleViews.remove(console.getConsoleEditor)
}
def getConsole(editor: Editor): Option[HaskellConsoleView] = {
consoleViews.get(editor)
}
def getConsole(editor: Project): Option[HaskellConsoleView] = {
- consoleViews.values.find(_.project == editor)
+ consoleViews.values.find(console => console.project == editor && console.isShowing)
}
// File is project file and not file which represents console
val projectFileByConfigName = new ConcurrentHashMap[String, HaskellFile]().asScala
} | 2 | 0.0625 | 1 | 1 |
b37de81cc9b3af321a6b00d95f21596bdacc3363 | README.md | README.md | Common Lisp (Parenscript) utilities for building web apps in ReactJs
### PSX
PSX is a Parenscript equivilent to JSX, ReactJs's extended JavaScript syntax. It uses the familiar CL-WHO syntax for markup generation.
````
(ps:ps
(psx
(:a :href "http://www.google.com"
(:span :class "text-green" "Click here!"))))
````
=>
````
React.createElement('a', { href: 'http://www.google.com' }, [
React.createElement('span', { className: 'text-green }, ["Click here"]
]);
````
| Common Lisp (Parenscript) utilities for building web apps in ReactJs
### PSX
PSX is a Parenscript equivilent to JSX, ReactJs's extended JavaScript syntax. It uses the familiar CL-WHO syntax for markup generation.
````common-lisp
(ps:ps
(psx
(:a :href "http://www.google.com"
(:span :class "text-green" "Click here!"))))
````
=>
````javascript
React.createElement('a', { href: 'http://www.google.com' }, [
React.createElement('span', { className: 'text-green' }, ["Click here"]
]);
````
| Add syntax highlight & fix typo | Add syntax highlight & fix typo | Markdown | mit | BnMcGn/cl-react,helmutkian/cl-react | markdown | ## Code Before:
Common Lisp (Parenscript) utilities for building web apps in ReactJs
### PSX
PSX is a Parenscript equivilent to JSX, ReactJs's extended JavaScript syntax. It uses the familiar CL-WHO syntax for markup generation.
````
(ps:ps
(psx
(:a :href "http://www.google.com"
(:span :class "text-green" "Click here!"))))
````
=>
````
React.createElement('a', { href: 'http://www.google.com' }, [
React.createElement('span', { className: 'text-green }, ["Click here"]
]);
````
## Instruction:
Add syntax highlight & fix typo
## Code After:
Common Lisp (Parenscript) utilities for building web apps in ReactJs
### PSX
PSX is a Parenscript equivilent to JSX, ReactJs's extended JavaScript syntax. It uses the familiar CL-WHO syntax for markup generation.
````common-lisp
(ps:ps
(psx
(:a :href "http://www.google.com"
(:span :class "text-green" "Click here!"))))
````
=>
````javascript
React.createElement('a', { href: 'http://www.google.com' }, [
React.createElement('span', { className: 'text-green' }, ["Click here"]
]);
````
| Common Lisp (Parenscript) utilities for building web apps in ReactJs
### PSX
PSX is a Parenscript equivilent to JSX, ReactJs's extended JavaScript syntax. It uses the familiar CL-WHO syntax for markup generation.
- ````
+ ````common-lisp
(ps:ps
(psx
(:a :href "http://www.google.com"
(:span :class "text-green" "Click here!"))))
````
=>
- ````
+ ````javascript
React.createElement('a', { href: 'http://www.google.com' }, [
- React.createElement('span', { className: 'text-green }, ["Click here"]
+ React.createElement('span', { className: 'text-green' }, ["Click here"]
? +
]);
```` | 6 | 0.3 | 3 | 3 |
2d46a5722fb287878b591ebf4be3debbc3ca6940 | lib/tasks/gitlab/assets.rake | lib/tasks/gitlab/assets.rake | namespace :gitlab do
namespace :assets do
desc 'GitLab | Assets | Compile all frontend assets'
task compile: [
'yarn:check',
'assets:precompile',
'webpack:compile',
'gitlab:assets:fix_urls'
]
desc 'GitLab | Assets | Clean up old compiled frontend assets'
task clean: ['assets:clean']
desc 'GitLab | Assets | Remove all compiled frontend assets'
task purge: ['assets:clobber']
desc 'GitLab | Assets | Uninstall frontend dependencies'
task purge_modules: ['yarn:clobber']
desc 'GitLab | Assets | Fix all absolute url references in CSS'
task :fix_urls do
css_files = Dir['public/assets/*.css']
css_files.each do |file|
# replace url(/assets/*) with url(./*)
puts "Fixing #{file}"
system "sed", "-i", "-e", 's/url(\([\"\']\?\)\/assets\//url(\1.\//g', file
# rewrite the corresponding gzip file (if it exists)
gzip = "#{file}.gz"
if File.exist?(gzip)
puts "Fixing #{gzip}"
FileUtils.rm(gzip)
mtime = File.stat(file).mtime
File.open(gzip, 'wb+') do |f|
gz = Zlib::GzipWriter.new(f, Zlib::BEST_COMPRESSION)
gz.mtime = mtime
gz.write IO.binread(file)
gz.close
File.utime(mtime, mtime, f.path)
end
end
end
end
end
end
| namespace :gitlab do
namespace :assets do
desc 'GitLab | Assets | Compile all frontend assets'
task compile: [
'yarn:check',
'rake:assets:precompile',
'webpack:compile',
'fix_urls'
]
desc 'GitLab | Assets | Clean up old compiled frontend assets'
task clean: ['rake:assets:clean']
desc 'GitLab | Assets | Remove all compiled frontend assets'
task purge: ['rake:assets:clobber']
desc 'GitLab | Assets | Uninstall frontend dependencies'
task purge_modules: ['yarn:clobber']
desc 'GitLab | Assets | Fix all absolute url references in CSS'
task :fix_urls do
css_files = Dir['public/assets/*.css']
css_files.each do |file|
# replace url(/assets/*) with url(./*)
puts "Fixing #{file}"
system "sed", "-i", "-e", 's/url(\([\"\']\?\)\/assets\//url(\1.\//g', file
# rewrite the corresponding gzip file (if it exists)
gzip = "#{file}.gz"
if File.exist?(gzip)
puts "Fixing #{gzip}"
FileUtils.rm(gzip)
mtime = File.stat(file).mtime
File.open(gzip, 'wb+') do |f|
gz = Zlib::GzipWriter.new(f, Zlib::BEST_COMPRESSION)
gz.mtime = mtime
gz.write IO.binread(file)
gz.close
File.utime(mtime, mtime, f.path)
end
end
end
end
end
end
| Resolve "Circular dependency detected" (duplicate) | Resolve "Circular dependency detected" (duplicate)
| Ruby | mit | iiet/iiet-git,dreampet/gitlab,htve/GitlabForChinese,jirutka/gitlabhq,iiet/iiet-git,axilleas/gitlabhq,t-zuehlsdorff/gitlabhq,t-zuehlsdorff/gitlabhq,axilleas/gitlabhq,dplarson/gitlabhq,dplarson/gitlabhq,dreampet/gitlab,t-zuehlsdorff/gitlabhq,darkrasid/gitlabhq,htve/GitlabForChinese,htve/GitlabForChinese,axilleas/gitlabhq,darkrasid/gitlabhq,stoplightio/gitlabhq,dplarson/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,jirutka/gitlabhq,t-zuehlsdorff/gitlabhq,htve/GitlabForChinese,mmkassem/gitlabhq,darkrasid/gitlabhq,mmkassem/gitlabhq,dreampet/gitlab,mmkassem/gitlabhq,axilleas/gitlabhq,dplarson/gitlabhq,mmkassem/gitlabhq,darkrasid/gitlabhq,dreampet/gitlab,jirutka/gitlabhq,stoplightio/gitlabhq,stoplightio/gitlabhq,jirutka/gitlabhq,iiet/iiet-git | ruby | ## Code Before:
namespace :gitlab do
namespace :assets do
desc 'GitLab | Assets | Compile all frontend assets'
task compile: [
'yarn:check',
'assets:precompile',
'webpack:compile',
'gitlab:assets:fix_urls'
]
desc 'GitLab | Assets | Clean up old compiled frontend assets'
task clean: ['assets:clean']
desc 'GitLab | Assets | Remove all compiled frontend assets'
task purge: ['assets:clobber']
desc 'GitLab | Assets | Uninstall frontend dependencies'
task purge_modules: ['yarn:clobber']
desc 'GitLab | Assets | Fix all absolute url references in CSS'
task :fix_urls do
css_files = Dir['public/assets/*.css']
css_files.each do |file|
# replace url(/assets/*) with url(./*)
puts "Fixing #{file}"
system "sed", "-i", "-e", 's/url(\([\"\']\?\)\/assets\//url(\1.\//g', file
# rewrite the corresponding gzip file (if it exists)
gzip = "#{file}.gz"
if File.exist?(gzip)
puts "Fixing #{gzip}"
FileUtils.rm(gzip)
mtime = File.stat(file).mtime
File.open(gzip, 'wb+') do |f|
gz = Zlib::GzipWriter.new(f, Zlib::BEST_COMPRESSION)
gz.mtime = mtime
gz.write IO.binread(file)
gz.close
File.utime(mtime, mtime, f.path)
end
end
end
end
end
end
## Instruction:
Resolve "Circular dependency detected" (duplicate)
## Code After:
namespace :gitlab do
namespace :assets do
desc 'GitLab | Assets | Compile all frontend assets'
task compile: [
'yarn:check',
'rake:assets:precompile',
'webpack:compile',
'fix_urls'
]
desc 'GitLab | Assets | Clean up old compiled frontend assets'
task clean: ['rake:assets:clean']
desc 'GitLab | Assets | Remove all compiled frontend assets'
task purge: ['rake:assets:clobber']
desc 'GitLab | Assets | Uninstall frontend dependencies'
task purge_modules: ['yarn:clobber']
desc 'GitLab | Assets | Fix all absolute url references in CSS'
task :fix_urls do
css_files = Dir['public/assets/*.css']
css_files.each do |file|
# replace url(/assets/*) with url(./*)
puts "Fixing #{file}"
system "sed", "-i", "-e", 's/url(\([\"\']\?\)\/assets\//url(\1.\//g', file
# rewrite the corresponding gzip file (if it exists)
gzip = "#{file}.gz"
if File.exist?(gzip)
puts "Fixing #{gzip}"
FileUtils.rm(gzip)
mtime = File.stat(file).mtime
File.open(gzip, 'wb+') do |f|
gz = Zlib::GzipWriter.new(f, Zlib::BEST_COMPRESSION)
gz.mtime = mtime
gz.write IO.binread(file)
gz.close
File.utime(mtime, mtime, f.path)
end
end
end
end
end
end
| namespace :gitlab do
namespace :assets do
desc 'GitLab | Assets | Compile all frontend assets'
task compile: [
'yarn:check',
- 'assets:precompile',
+ 'rake:assets:precompile',
? +++++
'webpack:compile',
- 'gitlab:assets:fix_urls'
+ 'fix_urls'
]
desc 'GitLab | Assets | Clean up old compiled frontend assets'
- task clean: ['assets:clean']
+ task clean: ['rake:assets:clean']
? +++++
desc 'GitLab | Assets | Remove all compiled frontend assets'
- task purge: ['assets:clobber']
+ task purge: ['rake:assets:clobber']
? +++++
desc 'GitLab | Assets | Uninstall frontend dependencies'
task purge_modules: ['yarn:clobber']
desc 'GitLab | Assets | Fix all absolute url references in CSS'
task :fix_urls do
css_files = Dir['public/assets/*.css']
css_files.each do |file|
# replace url(/assets/*) with url(./*)
puts "Fixing #{file}"
system "sed", "-i", "-e", 's/url(\([\"\']\?\)\/assets\//url(\1.\//g', file
# rewrite the corresponding gzip file (if it exists)
gzip = "#{file}.gz"
if File.exist?(gzip)
puts "Fixing #{gzip}"
FileUtils.rm(gzip)
mtime = File.stat(file).mtime
File.open(gzip, 'wb+') do |f|
gz = Zlib::GzipWriter.new(f, Zlib::BEST_COMPRESSION)
gz.mtime = mtime
gz.write IO.binread(file)
gz.close
File.utime(mtime, mtime, f.path)
end
end
end
end
end
end | 8 | 0.166667 | 4 | 4 |
62c6c66ffe92185dd4994c348d19daff0df93633 | docs/.vuepress/styles/palette.styl | docs/.vuepress/styles/palette.styl | // colors
$accentColor = #4F99A8
$textColor = #47585C
$borderColor = tint($textColor, 70%);
$codeBgColor = #282c34
$arrowBgColor = #68C8DB
$badgeTipColor = #68C8DB
$badgeWarningColor = darken(#EDAC5F, 35%)
$badgeErrorColor = #D74C44
| // colors
$accentColor = #4F99A8
$textColor = #47585C
$borderColor = tint($textColor, 70%);
$codeBgColor = #282c34
$arrowBgColor = #68C8DB
$badgeTipColor = #68C8DB
$badgeWarningColor = darken(#EDAC5F, 35%)
$badgeErrorColor = #D74C44
.credential-editor {
aside {
display: none !important;
width: 0 !important;
}
.page {
padding-left: 0 !important;
}
} | Add class to hide side bar and remove padding on page | Add class to hide side bar and remove padding on page
| Stylus | apache-2.0 | cassproject/cass-editor,cassproject/cass-editor | stylus | ## Code Before:
// colors
$accentColor = #4F99A8
$textColor = #47585C
$borderColor = tint($textColor, 70%);
$codeBgColor = #282c34
$arrowBgColor = #68C8DB
$badgeTipColor = #68C8DB
$badgeWarningColor = darken(#EDAC5F, 35%)
$badgeErrorColor = #D74C44
## Instruction:
Add class to hide side bar and remove padding on page
## Code After:
// colors
$accentColor = #4F99A8
$textColor = #47585C
$borderColor = tint($textColor, 70%);
$codeBgColor = #282c34
$arrowBgColor = #68C8DB
$badgeTipColor = #68C8DB
$badgeWarningColor = darken(#EDAC5F, 35%)
$badgeErrorColor = #D74C44
.credential-editor {
aside {
display: none !important;
width: 0 !important;
}
.page {
padding-left: 0 !important;
}
} | // colors
$accentColor = #4F99A8
$textColor = #47585C
$borderColor = tint($textColor, 70%);
$codeBgColor = #282c34
$arrowBgColor = #68C8DB
$badgeTipColor = #68C8DB
$badgeWarningColor = darken(#EDAC5F, 35%)
$badgeErrorColor = #D74C44
+
+
+ .credential-editor {
+ aside {
+ display: none !important;
+ width: 0 !important;
+ }
+ .page {
+ padding-left: 0 !important;
+ }
+ } | 11 | 1.222222 | 11 | 0 |
231afab3fda5340d6bbc2507cb827d4f3122a220 | app/models/gobierto_investments.rb | app/models/gobierto_investments.rb |
module GobiertoInvestments
def self.table_name_prefix
"ginv_"
end
def self.classes_with_custom_fields
[GobiertoInvestments::Project]
end
end
|
module GobiertoInvestments
def self.table_name_prefix
"ginv_"
end
def self.classes_with_custom_fields
[GobiertoInvestments::Project]
end
def self.doc_url
"https://gobierto.readme.io/docs/inversiones"
end
end
| Add doc_url to gobierto investments module | Add doc_url to gobierto investments module
| Ruby | agpl-3.0 | PopulateTools/gobierto-dev,PopulateTools/gobierto-dev,PopulateTools/gobierto-dev,PopulateTools/gobierto,PopulateTools/gobierto,PopulateTools/gobierto-dev,PopulateTools/gobierto,PopulateTools/gobierto | ruby | ## Code Before:
module GobiertoInvestments
def self.table_name_prefix
"ginv_"
end
def self.classes_with_custom_fields
[GobiertoInvestments::Project]
end
end
## Instruction:
Add doc_url to gobierto investments module
## Code After:
module GobiertoInvestments
def self.table_name_prefix
"ginv_"
end
def self.classes_with_custom_fields
[GobiertoInvestments::Project]
end
def self.doc_url
"https://gobierto.readme.io/docs/inversiones"
end
end
|
module GobiertoInvestments
def self.table_name_prefix
"ginv_"
end
def self.classes_with_custom_fields
[GobiertoInvestments::Project]
end
+
+ def self.doc_url
+ "https://gobierto.readme.io/docs/inversiones"
+ end
end | 4 | 0.4 | 4 | 0 |
fee5abd7cb28237ccabc12bd5d273bfa9be11979 | ext/unf_ext/extconf.rb | ext/unf_ext/extconf.rb | require 'mkmf'
if with_config('static-libstdc++')
$LDFLAGS << ' ' << `#{CONFIG['CC']} -print-file-name=libstdc++.a`.chomp
else
have_library('stdc++')
end
case RUBY_PLATFORM
when /\Aarm/
# A quick fix for char being unsigned by default on ARM
if defined?($CXXFLAGS)
$CXXFLAGS << ' -fsigned-char'
else
# Ruby < 2.0
$CFLAGS << ' -fsigned-char'
end
end
create_makefile 'unf_ext'
unless CONFIG['CXX']
case CONFIG['CC']
when %r{((?:.*[-/])?)gcc([-0-9.]*)$}
cxx = $1 + 'g++' + $2
when %r{((?:.*[-/])?)clang([-0-9.]*)$}
cxx = $1 + 'clang++' + $2
else
cxx = CONFIG['CC']
end
warn "CXX is automatically set to #{cxx}"
new_mf = <<-EOF << File.read('Makefile')
CXX=#{cxx}
EOF
File.open('Makefile', 'w') { |mf|
mf.print new_mf
}
end
| require 'mkmf'
if with_config('static-libstdc++')
$LDFLAGS << ' ' << `#{CONFIG['CC']} -print-file-name=libstdc++.a`.chomp
else
have_library('stdc++')
end
create_makefile 'unf_ext'
unless CONFIG['CXX']
case CONFIG['CC']
when %r{((?:.*[-/])?)gcc([-0-9.]*)$}
cxx = $1 + 'g++' + $2
when %r{((?:.*[-/])?)clang([-0-9.]*)$}
cxx = $1 + 'clang++' + $2
else
cxx = CONFIG['CC']
end
warn "CXX is automatically set to #{cxx}"
new_mf = <<-EOF << File.read('Makefile')
CXX=#{cxx}
EOF
File.open('Makefile', 'w') { |mf|
mf.print new_mf
}
end
| Revert special case for signed char in ARM | Revert special case for signed char in ARM
There other architectures where char is not signed as well.
Since 8a6a735b51ef903200fc541112e35b7cea781856 introduces
a real fix, I think this should be reverted. | Ruby | mit | knu/ruby-unf_ext,knu/ruby-unf_ext | ruby | ## Code Before:
require 'mkmf'
if with_config('static-libstdc++')
$LDFLAGS << ' ' << `#{CONFIG['CC']} -print-file-name=libstdc++.a`.chomp
else
have_library('stdc++')
end
case RUBY_PLATFORM
when /\Aarm/
# A quick fix for char being unsigned by default on ARM
if defined?($CXXFLAGS)
$CXXFLAGS << ' -fsigned-char'
else
# Ruby < 2.0
$CFLAGS << ' -fsigned-char'
end
end
create_makefile 'unf_ext'
unless CONFIG['CXX']
case CONFIG['CC']
when %r{((?:.*[-/])?)gcc([-0-9.]*)$}
cxx = $1 + 'g++' + $2
when %r{((?:.*[-/])?)clang([-0-9.]*)$}
cxx = $1 + 'clang++' + $2
else
cxx = CONFIG['CC']
end
warn "CXX is automatically set to #{cxx}"
new_mf = <<-EOF << File.read('Makefile')
CXX=#{cxx}
EOF
File.open('Makefile', 'w') { |mf|
mf.print new_mf
}
end
## Instruction:
Revert special case for signed char in ARM
There other architectures where char is not signed as well.
Since 8a6a735b51ef903200fc541112e35b7cea781856 introduces
a real fix, I think this should be reverted.
## Code After:
require 'mkmf'
if with_config('static-libstdc++')
$LDFLAGS << ' ' << `#{CONFIG['CC']} -print-file-name=libstdc++.a`.chomp
else
have_library('stdc++')
end
create_makefile 'unf_ext'
unless CONFIG['CXX']
case CONFIG['CC']
when %r{((?:.*[-/])?)gcc([-0-9.]*)$}
cxx = $1 + 'g++' + $2
when %r{((?:.*[-/])?)clang([-0-9.]*)$}
cxx = $1 + 'clang++' + $2
else
cxx = CONFIG['CC']
end
warn "CXX is automatically set to #{cxx}"
new_mf = <<-EOF << File.read('Makefile')
CXX=#{cxx}
EOF
File.open('Makefile', 'w') { |mf|
mf.print new_mf
}
end
| require 'mkmf'
if with_config('static-libstdc++')
$LDFLAGS << ' ' << `#{CONFIG['CC']} -print-file-name=libstdc++.a`.chomp
else
have_library('stdc++')
- end
-
- case RUBY_PLATFORM
- when /\Aarm/
- # A quick fix for char being unsigned by default on ARM
- if defined?($CXXFLAGS)
- $CXXFLAGS << ' -fsigned-char'
- else
- # Ruby < 2.0
- $CFLAGS << ' -fsigned-char'
- end
end
create_makefile 'unf_ext'
unless CONFIG['CXX']
case CONFIG['CC']
when %r{((?:.*[-/])?)gcc([-0-9.]*)$}
cxx = $1 + 'g++' + $2
when %r{((?:.*[-/])?)clang([-0-9.]*)$}
cxx = $1 + 'clang++' + $2
else
cxx = CONFIG['CC']
end
warn "CXX is automatically set to #{cxx}"
new_mf = <<-EOF << File.read('Makefile')
CXX=#{cxx}
EOF
File.open('Makefile', 'w') { |mf|
mf.print new_mf
}
end | 11 | 0.268293 | 0 | 11 |
78c96e56b46f800c972bcdb5c5aa525d73d84a80 | src/setuptools_scm/__main__.py | src/setuptools_scm/__main__.py | import sys
from setuptools_scm import _get_version
from setuptools_scm import get_version
from setuptools_scm.config import Configuration
from setuptools_scm.integration import find_files
def main() -> None:
files = list(sorted(find_files("."), key=len))
try:
pyproject = next(fname for fname in files if fname.endswith("pyproject.toml"))
print(_get_version(Configuration.from_file(pyproject)))
except (LookupError, StopIteration):
print("Guessed Version", get_version())
if "ls" in sys.argv:
for fname in files:
print(fname)
if __name__ == "__main__":
main()
| import argparse
import os
import warnings
from setuptools_scm import _get_version
from setuptools_scm.config import Configuration
from setuptools_scm.discover import walk_potential_roots
from setuptools_scm.integration import find_files
def main() -> None:
opts = _get_cli_opts()
root = opts.root or "."
try:
pyproject = opts.config or _find_pyproject(root)
root = opts.root or os.path.relpath(os.path.dirname(pyproject))
config = Configuration.from_file(pyproject)
config.root = root
except (LookupError, FileNotFoundError) as ex:
# no pyproject.toml OR no [tool.setuptools_scm]
warnings.warn(f"{ex}. Using default configuration.")
config = Configuration(root)
print(_get_version(config))
if opts.command == "ls":
for fname in find_files(config.root):
print(fname)
def _get_cli_opts():
prog = "python -m setuptools_scm"
desc = "Print project version according to SCM metadata"
parser = argparse.ArgumentParser(prog, description=desc)
# By default, help for `--help` starts with lower case, so we keep the pattern:
parser.add_argument(
"-r",
"--root",
default=None,
help='directory managed by the SCM, default: inferred from config file, or "."',
)
parser.add_argument(
"-c",
"--config",
default=None,
metavar="PATH",
help="path to 'pyproject.toml' with setuptools_scm config, "
"default: looked up in the current or parent directories",
)
sub = parser.add_subparsers(title="extra commands", dest="command", metavar="")
# We avoid `metavar` to prevent printing repetitive information
desc = "List files managed by the SCM"
sub.add_parser("ls", help=desc[0].lower() + desc[1:], description=desc)
return parser.parse_args()
def _find_pyproject(parent):
for directory in walk_potential_roots(os.path.abspath(parent)):
pyproject = os.path.join(directory, "pyproject.toml")
if os.path.exists(pyproject):
return pyproject
raise FileNotFoundError("'pyproject.toml' was not found")
if __name__ == "__main__":
main()
| Add options to better control CLI command | Add options to better control CLI command
Instead of trying to guess the `pyprojec.toml` file by looking at the
files controlled by the SCM, use explicit options to control it.
| Python | mit | pypa/setuptools_scm,pypa/setuptools_scm,RonnyPfannschmidt/setuptools_scm,RonnyPfannschmidt/setuptools_scm | python | ## Code Before:
import sys
from setuptools_scm import _get_version
from setuptools_scm import get_version
from setuptools_scm.config import Configuration
from setuptools_scm.integration import find_files
def main() -> None:
files = list(sorted(find_files("."), key=len))
try:
pyproject = next(fname for fname in files if fname.endswith("pyproject.toml"))
print(_get_version(Configuration.from_file(pyproject)))
except (LookupError, StopIteration):
print("Guessed Version", get_version())
if "ls" in sys.argv:
for fname in files:
print(fname)
if __name__ == "__main__":
main()
## Instruction:
Add options to better control CLI command
Instead of trying to guess the `pyprojec.toml` file by looking at the
files controlled by the SCM, use explicit options to control it.
## Code After:
import argparse
import os
import warnings
from setuptools_scm import _get_version
from setuptools_scm.config import Configuration
from setuptools_scm.discover import walk_potential_roots
from setuptools_scm.integration import find_files
def main() -> None:
opts = _get_cli_opts()
root = opts.root or "."
try:
pyproject = opts.config or _find_pyproject(root)
root = opts.root or os.path.relpath(os.path.dirname(pyproject))
config = Configuration.from_file(pyproject)
config.root = root
except (LookupError, FileNotFoundError) as ex:
# no pyproject.toml OR no [tool.setuptools_scm]
warnings.warn(f"{ex}. Using default configuration.")
config = Configuration(root)
print(_get_version(config))
if opts.command == "ls":
for fname in find_files(config.root):
print(fname)
def _get_cli_opts():
prog = "python -m setuptools_scm"
desc = "Print project version according to SCM metadata"
parser = argparse.ArgumentParser(prog, description=desc)
# By default, help for `--help` starts with lower case, so we keep the pattern:
parser.add_argument(
"-r",
"--root",
default=None,
help='directory managed by the SCM, default: inferred from config file, or "."',
)
parser.add_argument(
"-c",
"--config",
default=None,
metavar="PATH",
help="path to 'pyproject.toml' with setuptools_scm config, "
"default: looked up in the current or parent directories",
)
sub = parser.add_subparsers(title="extra commands", dest="command", metavar="")
# We avoid `metavar` to prevent printing repetitive information
desc = "List files managed by the SCM"
sub.add_parser("ls", help=desc[0].lower() + desc[1:], description=desc)
return parser.parse_args()
def _find_pyproject(parent):
for directory in walk_potential_roots(os.path.abspath(parent)):
pyproject = os.path.join(directory, "pyproject.toml")
if os.path.exists(pyproject):
return pyproject
raise FileNotFoundError("'pyproject.toml' was not found")
if __name__ == "__main__":
main()
| + import argparse
- import sys
? --
+ import os
? +
+ import warnings
from setuptools_scm import _get_version
- from setuptools_scm import get_version
from setuptools_scm.config import Configuration
+ from setuptools_scm.discover import walk_potential_roots
from setuptools_scm.integration import find_files
def main() -> None:
- files = list(sorted(find_files("."), key=len))
+ opts = _get_cli_opts()
+ root = opts.root or "."
+
try:
- pyproject = next(fname for fname in files if fname.endswith("pyproject.toml"))
+ pyproject = opts.config or _find_pyproject(root)
+ root = opts.root or os.path.relpath(os.path.dirname(pyproject))
- print(_get_version(Configuration.from_file(pyproject)))
? ^^^^^^^^^^^^^^^^ ^ --
+ config = Configuration.from_file(pyproject)
? ^ ^^^^^^
- except (LookupError, StopIteration):
- print("Guessed Version", get_version())
+ config.root = root
+ except (LookupError, FileNotFoundError) as ex:
+ # no pyproject.toml OR no [tool.setuptools_scm]
+ warnings.warn(f"{ex}. Using default configuration.")
+ config = Configuration(root)
- if "ls" in sys.argv:
+ print(_get_version(config))
+
+ if opts.command == "ls":
- for fname in files:
+ for fname in find_files(config.root):
? +++++ +++++++++++++
print(fname)
+
+
+ def _get_cli_opts():
+ prog = "python -m setuptools_scm"
+ desc = "Print project version according to SCM metadata"
+ parser = argparse.ArgumentParser(prog, description=desc)
+ # By default, help for `--help` starts with lower case, so we keep the pattern:
+ parser.add_argument(
+ "-r",
+ "--root",
+ default=None,
+ help='directory managed by the SCM, default: inferred from config file, or "."',
+ )
+ parser.add_argument(
+ "-c",
+ "--config",
+ default=None,
+ metavar="PATH",
+ help="path to 'pyproject.toml' with setuptools_scm config, "
+ "default: looked up in the current or parent directories",
+ )
+ sub = parser.add_subparsers(title="extra commands", dest="command", metavar="")
+ # We avoid `metavar` to prevent printing repetitive information
+ desc = "List files managed by the SCM"
+ sub.add_parser("ls", help=desc[0].lower() + desc[1:], description=desc)
+ return parser.parse_args()
+
+
+ def _find_pyproject(parent):
+ for directory in walk_potential_roots(os.path.abspath(parent)):
+ pyproject = os.path.join(directory, "pyproject.toml")
+ if os.path.exists(pyproject):
+ return pyproject
+
+ raise FileNotFoundError("'pyproject.toml' was not found")
if __name__ == "__main__":
main() | 63 | 2.73913 | 54 | 9 |
43139320a4a8915bef541b00985d5bf177c38a12 | packages/washington.formatter.browser/package.json | packages/washington.formatter.browser/package.json | {
"name": "washington.formatter.browser",
"version": "2.0.0-rc.0",
"description": "Colorful browser console formatter for the Washington unit test library",
"main": "formatterBrowser.js",
"scripts": {
"test": "node testEntrypoint"
},
"keywords": [
"washington",
"unit testing",
"test"
],
"author": "Fernando Vía Canel <fernando.via@gmail.com>",
"license": "BSD-2-Clause",
"dependencies": {
"folktale": "^2.0.0-alpha2",
"partial.lenses": "^9.4.1"
},
"devDependencies": {
"washington.core": "2.0.0-rc.0"
}
}
| {
"name": "washington.formatter.browser",
"version": "2.0.0-rc.0",
"description": "Colorful browser console formatter for the Washington unit test library",
"main": "formatterBrowser.js",
"scripts": {
"test": "node testEntrypoint"
},
"keywords": [
"washington",
"unit testing",
"test"
],
"author": "Fernando Vía Canel <fernando.via@gmail.com>",
"license": "BSD-2-Clause",
"dependencies": {
"folktale": "^2.0.0-alpha2",
"partial.lenses": "^9.4.1"
},
"devDependencies": {
"washington.core": "2.0.0-rc.0",
"immutable": "^3.8.1",
"immutable-ext": "^1.0.8",
}
}
| Add immutable-ext as devDep of formatter.browser | Add immutable-ext as devDep of formatter.browser
| JSON | bsd-2-clause | xaviervia/washington,xaviervia/washington | json | ## Code Before:
{
"name": "washington.formatter.browser",
"version": "2.0.0-rc.0",
"description": "Colorful browser console formatter for the Washington unit test library",
"main": "formatterBrowser.js",
"scripts": {
"test": "node testEntrypoint"
},
"keywords": [
"washington",
"unit testing",
"test"
],
"author": "Fernando Vía Canel <fernando.via@gmail.com>",
"license": "BSD-2-Clause",
"dependencies": {
"folktale": "^2.0.0-alpha2",
"partial.lenses": "^9.4.1"
},
"devDependencies": {
"washington.core": "2.0.0-rc.0"
}
}
## Instruction:
Add immutable-ext as devDep of formatter.browser
## Code After:
{
"name": "washington.formatter.browser",
"version": "2.0.0-rc.0",
"description": "Colorful browser console formatter for the Washington unit test library",
"main": "formatterBrowser.js",
"scripts": {
"test": "node testEntrypoint"
},
"keywords": [
"washington",
"unit testing",
"test"
],
"author": "Fernando Vía Canel <fernando.via@gmail.com>",
"license": "BSD-2-Clause",
"dependencies": {
"folktale": "^2.0.0-alpha2",
"partial.lenses": "^9.4.1"
},
"devDependencies": {
"washington.core": "2.0.0-rc.0",
"immutable": "^3.8.1",
"immutable-ext": "^1.0.8",
}
}
| {
"name": "washington.formatter.browser",
"version": "2.0.0-rc.0",
"description": "Colorful browser console formatter for the Washington unit test library",
"main": "formatterBrowser.js",
"scripts": {
"test": "node testEntrypoint"
},
"keywords": [
"washington",
"unit testing",
"test"
],
"author": "Fernando Vía Canel <fernando.via@gmail.com>",
"license": "BSD-2-Clause",
"dependencies": {
"folktale": "^2.0.0-alpha2",
"partial.lenses": "^9.4.1"
},
"devDependencies": {
- "washington.core": "2.0.0-rc.0"
+ "washington.core": "2.0.0-rc.0",
? +
+ "immutable": "^3.8.1",
+ "immutable-ext": "^1.0.8",
}
} | 4 | 0.173913 | 3 | 1 |
314f387e3a227181926531f5230f21887d35038b | uploader/uploader.py | uploader/uploader.py | import os
import glob
import logging
import dropbox
from dropbox.client import DropboxClient, ErrorResponse
import settings
from settings import DROPBOX_TOKEN_FILE
def load_dropbox_token():
with open(DROPBOX_TOKEN_FILE, 'r') as f:
dropbox_token = f.read()
return dropbox_token
def has_valid_dropbox_token():
try:
with open(DROPBOX_TOKEN_FILE, 'r') as f:
dropbox_token = f.read()
client = dropbox.client.DropboxClient(dropbox_token)
client.account_info()
except (IOError, ErrorResponse):
return False
return True
def get_files_to_upload():
return glob.glob(settings.IMAGES_DIRECTORY + "/*.jpg")
def upload_file(path):
access_token = load_dropbox_token()
client = DropboxClient(access_token)
name = path.split("/")[-1]
with open(path, 'rb') as data:
try:
client.put_file(name, data)
except Exception as e:
logging.exception(e)
else:
os.remove(path)
| import os
import glob
import logging
import subprocess
import dropbox
from dropbox.client import DropboxClient, ErrorResponse
import settings
from settings import DROPBOX_TOKEN_FILE
def load_dropbox_token():
with open(DROPBOX_TOKEN_FILE, 'r') as f:
dropbox_token = f.read()
return dropbox_token
def has_valid_dropbox_token():
try:
with open(DROPBOX_TOKEN_FILE, 'r') as f:
dropbox_token = f.read()
client = dropbox.client.DropboxClient(dropbox_token)
client.account_info()
except (IOError, ErrorResponse):
return False
return True
def get_files_to_upload():
return glob.glob(settings.IMAGES_DIRECTORY + "/*.jpg")
def upload_file(path):
access_token = load_dropbox_token()
client = DropboxClient(access_token)
name = path.split("/")[-1]
with open(path, 'rb') as data:
try:
client.put_file(name, data)
except Exception as e:
logging.exception(e)
else:
os.remove(path)
def has_network_conntection(self):
command = ['ping', '-c', '1', '-W', '2', 'www.dropbox.com']
try:
subprocess.check_output(command)
return True
except:
return False
| Add util to test network connection | Add util to test network connection
| Python | mit | projectweekend/Pi-Camera-Time-Lapse,projectweekend/Pi-Camera-Time-Lapse | python | ## Code Before:
import os
import glob
import logging
import dropbox
from dropbox.client import DropboxClient, ErrorResponse
import settings
from settings import DROPBOX_TOKEN_FILE
def load_dropbox_token():
with open(DROPBOX_TOKEN_FILE, 'r') as f:
dropbox_token = f.read()
return dropbox_token
def has_valid_dropbox_token():
try:
with open(DROPBOX_TOKEN_FILE, 'r') as f:
dropbox_token = f.read()
client = dropbox.client.DropboxClient(dropbox_token)
client.account_info()
except (IOError, ErrorResponse):
return False
return True
def get_files_to_upload():
return glob.glob(settings.IMAGES_DIRECTORY + "/*.jpg")
def upload_file(path):
access_token = load_dropbox_token()
client = DropboxClient(access_token)
name = path.split("/")[-1]
with open(path, 'rb') as data:
try:
client.put_file(name, data)
except Exception as e:
logging.exception(e)
else:
os.remove(path)
## Instruction:
Add util to test network connection
## Code After:
import os
import glob
import logging
import subprocess
import dropbox
from dropbox.client import DropboxClient, ErrorResponse
import settings
from settings import DROPBOX_TOKEN_FILE
def load_dropbox_token():
with open(DROPBOX_TOKEN_FILE, 'r') as f:
dropbox_token = f.read()
return dropbox_token
def has_valid_dropbox_token():
try:
with open(DROPBOX_TOKEN_FILE, 'r') as f:
dropbox_token = f.read()
client = dropbox.client.DropboxClient(dropbox_token)
client.account_info()
except (IOError, ErrorResponse):
return False
return True
def get_files_to_upload():
return glob.glob(settings.IMAGES_DIRECTORY + "/*.jpg")
def upload_file(path):
access_token = load_dropbox_token()
client = DropboxClient(access_token)
name = path.split("/")[-1]
with open(path, 'rb') as data:
try:
client.put_file(name, data)
except Exception as e:
logging.exception(e)
else:
os.remove(path)
def has_network_conntection(self):
command = ['ping', '-c', '1', '-W', '2', 'www.dropbox.com']
try:
subprocess.check_output(command)
return True
except:
return False
| import os
import glob
import logging
+ import subprocess
import dropbox
from dropbox.client import DropboxClient, ErrorResponse
import settings
from settings import DROPBOX_TOKEN_FILE
def load_dropbox_token():
with open(DROPBOX_TOKEN_FILE, 'r') as f:
dropbox_token = f.read()
return dropbox_token
def has_valid_dropbox_token():
try:
with open(DROPBOX_TOKEN_FILE, 'r') as f:
dropbox_token = f.read()
client = dropbox.client.DropboxClient(dropbox_token)
client.account_info()
except (IOError, ErrorResponse):
return False
return True
def get_files_to_upload():
return glob.glob(settings.IMAGES_DIRECTORY + "/*.jpg")
def upload_file(path):
access_token = load_dropbox_token()
client = DropboxClient(access_token)
name = path.split("/")[-1]
with open(path, 'rb') as data:
try:
client.put_file(name, data)
except Exception as e:
logging.exception(e)
else:
os.remove(path)
+
+
+ def has_network_conntection(self):
+ command = ['ping', '-c', '1', '-W', '2', 'www.dropbox.com']
+ try:
+ subprocess.check_output(command)
+ return True
+ except:
+ return False | 10 | 0.243902 | 10 | 0 |
5fa7e1cde8717640b3ed1ddd3c9c9366dc7f314f | .travis.yml | .travis.yml | dist: xenial
language: scala
scala:
- 2.11.12
- 2.12.8
- 2.13.1
jdk:
- oraclejdk11
dist: trusty
- openjdk11
before_install:
- sudo apt-get update -qq
#- sudo apt-get install -qq libatlas3gf-base libopenblas-base
sbt_args: -Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.F2jBLAS -Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.F2jLAPACK -Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.F2jARPACK
cache:
directories:
- $HOME/.ivy2
| dist: xenial
language: scala
scala:
- 2.12.8
- 2.13.1
jdk:
- oraclejdk11
dist: trusty
- openjdk11
before_install:
- sudo apt-get update -qq
#- sudo apt-get install -qq libatlas3gf-base libopenblas-base
sbt_args: -Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.F2jBLAS -Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.F2jLAPACK -Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.F2jARPACK
cache:
directories:
- $HOME/.ivy2
| Remove Scala 2.11 from Travis to fix build status | Remove Scala 2.11 from Travis to fix build status
It's still in the `.sbt` files so one could reenable it more easily in case someone really needs it. | YAML | apache-2.0 | scalanlp/breeze | yaml | ## Code Before:
dist: xenial
language: scala
scala:
- 2.11.12
- 2.12.8
- 2.13.1
jdk:
- oraclejdk11
dist: trusty
- openjdk11
before_install:
- sudo apt-get update -qq
#- sudo apt-get install -qq libatlas3gf-base libopenblas-base
sbt_args: -Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.F2jBLAS -Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.F2jLAPACK -Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.F2jARPACK
cache:
directories:
- $HOME/.ivy2
## Instruction:
Remove Scala 2.11 from Travis to fix build status
It's still in the `.sbt` files so one could reenable it more easily in case someone really needs it.
## Code After:
dist: xenial
language: scala
scala:
- 2.12.8
- 2.13.1
jdk:
- oraclejdk11
dist: trusty
- openjdk11
before_install:
- sudo apt-get update -qq
#- sudo apt-get install -qq libatlas3gf-base libopenblas-base
sbt_args: -Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.F2jBLAS -Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.F2jLAPACK -Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.F2jARPACK
cache:
directories:
- $HOME/.ivy2
| dist: xenial
language: scala
scala:
- - 2.11.12
- 2.12.8
- 2.13.1
jdk:
- oraclejdk11
dist: trusty
- openjdk11
before_install:
- sudo apt-get update -qq
#- sudo apt-get install -qq libatlas3gf-base libopenblas-base
sbt_args: -Dcom.github.fommil.netlib.BLAS=com.github.fommil.netlib.F2jBLAS -Dcom.github.fommil.netlib.LAPACK=com.github.fommil.netlib.F2jLAPACK -Dcom.github.fommil.netlib.ARPACK=com.github.fommil.netlib.F2jARPACK
cache:
directories:
- $HOME/.ivy2 | 1 | 0.058824 | 0 | 1 |
20eb61f2d513968ae7c916473f377f537f2fc19c | package_test.go | package_test.go | package main
import (
"testing"
)
var sourceURITests = []struct {
src string
dst string
}{
{
"https://github.com/sunaku/vim-unbundle",
"https://github.com/sunaku/vim-unbundle",
},
}
func TestSourceURI(t *testing.T) {
for _, test := range sourceURITests {
expect := test.dst
actual, err := ToSourceURI(test.src)
if err != nil {
t.Errorf("ToSourceURI(%q) returns %q, want nil", err)
}
if actual != expect {
t.Errorf("%q: got %q, want %q",
test.src, actual, expect)
}
}
}
| package main
import (
"testing"
)
var sourceURITests = []struct {
src string
dst string
}{
{
"https://github.com/sunaku/vim-unbundle",
"https://github.com/sunaku/vim-unbundle",
},
{
"Shougo/neobundle.vim",
"https://github.com/Shougo/neobundle.vim",
},
{
"thinca/vim-quickrun",
"https://github.com/thinca/vim-quickrun",
},
}
func TestSourceURI(t *testing.T) {
for _, test := range sourceURITests {
expect := test.dst
actual, err := ToSourceURI(test.src)
if err != nil {
t.Errorf("ToSourceURI(%q) returns %q, want nil", err)
}
if actual != expect {
t.Errorf("%q: got %q, want %q",
test.src, actual, expect)
}
}
}
| Add case of short GitHub URI for ToSourceURI | Add case of short GitHub URI for ToSourceURI
| Go | mit | kusabashira/vub | go | ## Code Before:
package main
import (
"testing"
)
var sourceURITests = []struct {
src string
dst string
}{
{
"https://github.com/sunaku/vim-unbundle",
"https://github.com/sunaku/vim-unbundle",
},
}
func TestSourceURI(t *testing.T) {
for _, test := range sourceURITests {
expect := test.dst
actual, err := ToSourceURI(test.src)
if err != nil {
t.Errorf("ToSourceURI(%q) returns %q, want nil", err)
}
if actual != expect {
t.Errorf("%q: got %q, want %q",
test.src, actual, expect)
}
}
}
## Instruction:
Add case of short GitHub URI for ToSourceURI
## Code After:
package main
import (
"testing"
)
var sourceURITests = []struct {
src string
dst string
}{
{
"https://github.com/sunaku/vim-unbundle",
"https://github.com/sunaku/vim-unbundle",
},
{
"Shougo/neobundle.vim",
"https://github.com/Shougo/neobundle.vim",
},
{
"thinca/vim-quickrun",
"https://github.com/thinca/vim-quickrun",
},
}
func TestSourceURI(t *testing.T) {
for _, test := range sourceURITests {
expect := test.dst
actual, err := ToSourceURI(test.src)
if err != nil {
t.Errorf("ToSourceURI(%q) returns %q, want nil", err)
}
if actual != expect {
t.Errorf("%q: got %q, want %q",
test.src, actual, expect)
}
}
}
| package main
import (
"testing"
)
var sourceURITests = []struct {
src string
dst string
}{
{
"https://github.com/sunaku/vim-unbundle",
"https://github.com/sunaku/vim-unbundle",
+ },
+
+ {
+ "Shougo/neobundle.vim",
+ "https://github.com/Shougo/neobundle.vim",
+ },
+ {
+ "thinca/vim-quickrun",
+ "https://github.com/thinca/vim-quickrun",
},
}
func TestSourceURI(t *testing.T) {
for _, test := range sourceURITests {
expect := test.dst
actual, err := ToSourceURI(test.src)
if err != nil {
t.Errorf("ToSourceURI(%q) returns %q, want nil", err)
}
if actual != expect {
t.Errorf("%q: got %q, want %q",
test.src, actual, expect)
}
}
} | 9 | 0.310345 | 9 | 0 |
f197b0595656d0b45f587f3ea115d7a84e32f724 | liquibase-core/src/main/java/liquibase/datatype/core/DoubleType.java | liquibase-core/src/main/java/liquibase/datatype/core/DoubleType.java | package liquibase.datatype.core;
import liquibase.database.Database;
import liquibase.database.core.*;
import liquibase.datatype.DataTypeInfo;
import liquibase.datatype.DatabaseDataType;
import liquibase.datatype.LiquibaseDataType;
@DataTypeInfo(name="double", aliases = {"java.sql.Types.DOUBLE", "java.lang.Double"}, minParameters = 0, maxParameters = 2, priority = LiquibaseDataType.PRIORITY_DEFAULT)
public class DoubleType extends LiquibaseDataType {
@Override
public DatabaseDataType toDatabaseDataType(Database database) {
if (database instanceof MSSQLDatabase) {
return new DatabaseDataType("FLOAT");
}
if (database instanceof DB2Database || database instanceof DerbyDatabase || database instanceof HsqlDatabase || database instanceof MySQLDatabase) {
return new DatabaseDataType("DOUBLE");
}
if (database instanceof OracleDatabase) {
return new DatabaseDataType("FLOAT", 24);
}
if (database instanceof PostgresDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
if (database instanceof InformixDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
return super.toDatabaseDataType(database);
}
}
| package liquibase.datatype.core;
import liquibase.database.Database;
import liquibase.database.core.*;
import liquibase.datatype.DataTypeInfo;
import liquibase.datatype.DatabaseDataType;
import liquibase.datatype.LiquibaseDataType;
@DataTypeInfo(name="double", aliases = {"java.sql.Types.DOUBLE", "java.lang.Double"}, minParameters = 0, maxParameters = 2, priority = LiquibaseDataType.PRIORITY_DEFAULT)
public class DoubleType extends LiquibaseDataType {
@Override
public DatabaseDataType toDatabaseDataType(Database database) {
if (database instanceof MSSQLDatabase) {
return new DatabaseDataType("FLOAT");
}
if (database instanceof DB2Database || database instanceof DerbyDatabase || database instanceof HsqlDatabase || database instanceof MySQLDatabase) {
return new DatabaseDataType("DOUBLE");
}
if (database instanceof OracleDatabase) {
return new DatabaseDataType("FLOAT", 24);
}
if (database instanceof PostgresDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
if (database instanceof InformixDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
if (database instanceof FirebirdDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
return super.toDatabaseDataType(database);
}
}
| Use double precision for double with Firebird | Use double precision for double with Firebird | Java | apache-2.0 | dprguard2000/liquibase,russ-p/liquibase,russ-p/liquibase,russ-p/liquibase,gquintana/liquibase,Willem1987/liquibase,evigeant/liquibase,Datical/liquibase,syncron/liquibase,OpenCST/liquibase,mbreslow/liquibase,syncron/liquibase,vbekiaris/liquibase,danielkec/liquibase,fossamagna/liquibase,evigeant/liquibase,vfpfafrf/liquibase,fbiville/liquibase,dyk/liquibase,FreshGrade/liquibase,maberle/liquibase,balazs-zsoldos/liquibase,gquintana/liquibase,syncron/liquibase,CoderPaulK/liquibase,danielkec/liquibase,NSIT/liquibase,klopfdreh/liquibase,mortegac/liquibase,hbogaards/liquibase,balazs-zsoldos/liquibase,maberle/liquibase,klopfdreh/liquibase,lazaronixon/liquibase,cleiter/liquibase,EVODelavega/liquibase,liquibase/liquibase,EVODelavega/liquibase,OpenCST/liquibase,liquibase/liquibase,EVODelavega/liquibase,iherasymenko/liquibase,evigeant/liquibase,vast-engineering/liquibase,vbekiaris/liquibase,tjardo83/liquibase,OpenCST/liquibase,cleiter/liquibase,jimmycd/liquibase,pellcorp/liquibase,FreshGrade/liquibase,mbreslow/liquibase,hbogaards/liquibase,danielkec/liquibase,C0mmi3/liquibase,NSIT/liquibase,mwaylabs/liquibase,mortegac/liquibase,talklittle/liquibase,foxel/liquibase,dprguard2000/liquibase,dbmanul/dbmanul,vfpfafrf/liquibase,mattbertolini/liquibase,OpenCST/liquibase,pellcorp/liquibase,dyk/liquibase,dyk/liquibase,talklittle/liquibase,evigeant/liquibase,Willem1987/liquibase,mwaylabs/liquibase,instantdelay/liquibase,foxel/liquibase,ivaylo5ev/liquibase,maberle/liquibase,vbekiaris/liquibase,ivaylo5ev/liquibase,vfpfafrf/liquibase,mbreslow/liquibase,FreshGrade/liquibase,danielkec/liquibase,lazaronixon/liquibase,vfpfafrf/liquibase,fbiville/liquibase,vast-engineering/liquibase,Datical/liquibase,C0mmi3/liquibase,balazs-zsoldos/liquibase,mwaylabs/liquibase,Datical/liquibase,lazaronixon/liquibase,dbmanul/dbmanul,CoderPaulK/liquibase,dbmanul/dbmanul,instantdelay/liquibase,Datical/liquibase,pellcorp/liquibase,mwaylabs/liquibase,dprguard2000/liquibase,dprguard2000/liquibase,mattbertolini/liquibase,Willem1987/liquibase,klopfdreh/liquibase,vbekiaris/liquibase,vast-engineering/liquibase,mortegac/liquibase,CoderPaulK/liquibase,fossamagna/liquibase,talklittle/liquibase,fbiville/liquibase,hbogaards/liquibase,jimmycd/liquibase,gquintana/liquibase,mortegac/liquibase,balazs-zsoldos/liquibase,liquibase/liquibase,Willem1987/liquibase,fossamagna/liquibase,instantdelay/liquibase,instantdelay/liquibase,NSIT/liquibase,foxel/liquibase,dbmanul/dbmanul,iherasymenko/liquibase,mattbertolini/liquibase,klopfdreh/liquibase,CoderPaulK/liquibase,tjardo83/liquibase,EVODelavega/liquibase,talklittle/liquibase,lazaronixon/liquibase,NSIT/liquibase,mattbertolini/liquibase,C0mmi3/liquibase,iherasymenko/liquibase,maberle/liquibase,cleiter/liquibase,cleiter/liquibase,syncron/liquibase,foxel/liquibase,C0mmi3/liquibase,tjardo83/liquibase,gquintana/liquibase,vast-engineering/liquibase,pellcorp/liquibase,iherasymenko/liquibase,jimmycd/liquibase,fbiville/liquibase,jimmycd/liquibase,dyk/liquibase,hbogaards/liquibase,russ-p/liquibase,mbreslow/liquibase,FreshGrade/liquibase,tjardo83/liquibase | java | ## Code Before:
package liquibase.datatype.core;
import liquibase.database.Database;
import liquibase.database.core.*;
import liquibase.datatype.DataTypeInfo;
import liquibase.datatype.DatabaseDataType;
import liquibase.datatype.LiquibaseDataType;
@DataTypeInfo(name="double", aliases = {"java.sql.Types.DOUBLE", "java.lang.Double"}, minParameters = 0, maxParameters = 2, priority = LiquibaseDataType.PRIORITY_DEFAULT)
public class DoubleType extends LiquibaseDataType {
@Override
public DatabaseDataType toDatabaseDataType(Database database) {
if (database instanceof MSSQLDatabase) {
return new DatabaseDataType("FLOAT");
}
if (database instanceof DB2Database || database instanceof DerbyDatabase || database instanceof HsqlDatabase || database instanceof MySQLDatabase) {
return new DatabaseDataType("DOUBLE");
}
if (database instanceof OracleDatabase) {
return new DatabaseDataType("FLOAT", 24);
}
if (database instanceof PostgresDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
if (database instanceof InformixDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
return super.toDatabaseDataType(database);
}
}
## Instruction:
Use double precision for double with Firebird
## Code After:
package liquibase.datatype.core;
import liquibase.database.Database;
import liquibase.database.core.*;
import liquibase.datatype.DataTypeInfo;
import liquibase.datatype.DatabaseDataType;
import liquibase.datatype.LiquibaseDataType;
@DataTypeInfo(name="double", aliases = {"java.sql.Types.DOUBLE", "java.lang.Double"}, minParameters = 0, maxParameters = 2, priority = LiquibaseDataType.PRIORITY_DEFAULT)
public class DoubleType extends LiquibaseDataType {
@Override
public DatabaseDataType toDatabaseDataType(Database database) {
if (database instanceof MSSQLDatabase) {
return new DatabaseDataType("FLOAT");
}
if (database instanceof DB2Database || database instanceof DerbyDatabase || database instanceof HsqlDatabase || database instanceof MySQLDatabase) {
return new DatabaseDataType("DOUBLE");
}
if (database instanceof OracleDatabase) {
return new DatabaseDataType("FLOAT", 24);
}
if (database instanceof PostgresDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
if (database instanceof InformixDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
if (database instanceof FirebirdDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
return super.toDatabaseDataType(database);
}
}
| package liquibase.datatype.core;
import liquibase.database.Database;
import liquibase.database.core.*;
import liquibase.datatype.DataTypeInfo;
import liquibase.datatype.DatabaseDataType;
import liquibase.datatype.LiquibaseDataType;
@DataTypeInfo(name="double", aliases = {"java.sql.Types.DOUBLE", "java.lang.Double"}, minParameters = 0, maxParameters = 2, priority = LiquibaseDataType.PRIORITY_DEFAULT)
public class DoubleType extends LiquibaseDataType {
@Override
public DatabaseDataType toDatabaseDataType(Database database) {
if (database instanceof MSSQLDatabase) {
return new DatabaseDataType("FLOAT");
}
if (database instanceof DB2Database || database instanceof DerbyDatabase || database instanceof HsqlDatabase || database instanceof MySQLDatabase) {
return new DatabaseDataType("DOUBLE");
}
if (database instanceof OracleDatabase) {
return new DatabaseDataType("FLOAT", 24);
}
if (database instanceof PostgresDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
if (database instanceof InformixDatabase) {
return new DatabaseDataType("DOUBLE PRECISION");
}
+ if (database instanceof FirebirdDatabase) {
+ return new DatabaseDataType("DOUBLE PRECISION");
+ }
return super.toDatabaseDataType(database);
}
} | 3 | 0.1 | 3 | 0 |
b6e6c5dae6f248512b4559a114319cebae95f95c | lib/asciidoctor/latex/inject_html.rb | lib/asciidoctor/latex/inject_html.rb |
require 'asciidoctor'
require 'asciidoctor/extensions'
require 'asciidoctor/latex/core_ext/colored_string'
#
module Asciidoctor::LaTeX
class InjectHTML < Asciidoctor::Extensions::Postprocessor
def process document, output
output.gsub('</head>', $click_insertion)
end
end
$click_insertion = <<EOF
<style>
.click .title { color: blue; }
.openblock>.box>.content { margin-top:1em;margin-bottom: 1em;margin-left:3em;margin-right:4em; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('.openblock.click').click( function() { $(this).find('.content').slideToggle('200');
$.reloadMathJax() } )
$('.openblock.click').find('.content').hide()
});
$(document).ready(function(){
$('.listingblock.click').click( function() { $(this).find('.content').slideToggle('200') } )
$('.listingblock.click').find('.content').hide()
});
$(document).ready(ready);
$(document).on('page:load', ready);
</script>
</head>
EOF
end
|
require 'asciidoctor'
require 'asciidoctor/extensions'
require 'asciidoctor/latex/core_ext/colored_string'
#
module Asciidoctor::LaTeX
class InjectHTML < Asciidoctor::Extensions::Postprocessor
def process document, output
output.gsub('</head>', $click_insertion)
end
end
$click_insertion = <<EOF
<style>
.click .title { color: blue; }
.openblock>.box>.content { margin-top:1em;margin-bottom: 1em;margin-left:3em;margin-right:4em; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
var ready2;
ready2 = function() {
$(document).ready(function(){
$('.openblock.click').click( function() { $(this).find('.content').slideToggle('200'); } )
$('.openblock.click').find('.content').hide()
$('.listingblock.click').click( function() { $(this).find('.content').slideToggle('200') } )
$('.listingblock.click').find('.content').hide()
});
}
$(document).ready(ready2);
$(document).on('page:load', ready2);
</script>
</head>
EOF
end
| Fix error in js code so that click blocks now function properly (hide/unhide) | Fix error in js code so that click blocks now function properly (hide/unhide)
| Ruby | mit | jxxcarlson/asciidoctor-latex,asciidoctor/asciidoctor-latex,asciidoctor/asciidoctor-latex,asciidoctor/asciidoctor-latex,jxxcarlson/asciidoctor-latex,jxxcarlson/asciidoctor-latex | ruby | ## Code Before:
require 'asciidoctor'
require 'asciidoctor/extensions'
require 'asciidoctor/latex/core_ext/colored_string'
#
module Asciidoctor::LaTeX
class InjectHTML < Asciidoctor::Extensions::Postprocessor
def process document, output
output.gsub('</head>', $click_insertion)
end
end
$click_insertion = <<EOF
<style>
.click .title { color: blue; }
.openblock>.box>.content { margin-top:1em;margin-bottom: 1em;margin-left:3em;margin-right:4em; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('.openblock.click').click( function() { $(this).find('.content').slideToggle('200');
$.reloadMathJax() } )
$('.openblock.click').find('.content').hide()
});
$(document).ready(function(){
$('.listingblock.click').click( function() { $(this).find('.content').slideToggle('200') } )
$('.listingblock.click').find('.content').hide()
});
$(document).ready(ready);
$(document).on('page:load', ready);
</script>
</head>
EOF
end
## Instruction:
Fix error in js code so that click blocks now function properly (hide/unhide)
## Code After:
require 'asciidoctor'
require 'asciidoctor/extensions'
require 'asciidoctor/latex/core_ext/colored_string'
#
module Asciidoctor::LaTeX
class InjectHTML < Asciidoctor::Extensions::Postprocessor
def process document, output
output.gsub('</head>', $click_insertion)
end
end
$click_insertion = <<EOF
<style>
.click .title { color: blue; }
.openblock>.box>.content { margin-top:1em;margin-bottom: 1em;margin-left:3em;margin-right:4em; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
var ready2;
ready2 = function() {
$(document).ready(function(){
$('.openblock.click').click( function() { $(this).find('.content').slideToggle('200'); } )
$('.openblock.click').find('.content').hide()
$('.listingblock.click').click( function() { $(this).find('.content').slideToggle('200') } )
$('.listingblock.click').find('.content').hide()
});
}
$(document).ready(ready2);
$(document).on('page:load', ready2);
</script>
</head>
EOF
end
|
require 'asciidoctor'
require 'asciidoctor/extensions'
require 'asciidoctor/latex/core_ext/colored_string'
#
module Asciidoctor::LaTeX
class InjectHTML < Asciidoctor::Extensions::Postprocessor
def process document, output
output.gsub('</head>', $click_insertion)
end
end
$click_insertion = <<EOF
<style>
.click .title { color: blue; }
.openblock>.box>.content { margin-top:1em;margin-bottom: 1em;margin-left:3em;margin-right:4em; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script>
- $(document).ready(function(){
- $('.openblock.click').click( function() { $(this).find('.content').slideToggle('200');
- $.reloadMathJax() } )
- $('.openblock.click').find('.content').hide()
- });
-
- $(document).ready(function(){
- $('.listingblock.click').click( function() { $(this).find('.content').slideToggle('200') } )
- $('.listingblock.click').find('.content').hide()
- });
+ var ready2;
+
+ ready2 = function() {
+
+ $(document).ready(function(){
+
+ $('.openblock.click').click( function() { $(this).find('.content').slideToggle('200'); } )
+ $('.openblock.click').find('.content').hide()
+
+
+ $('.listingblock.click').click( function() { $(this).find('.content').slideToggle('200') } )
+ $('.listingblock.click').find('.content').hide()
+
+ });
+
+ }
+
+
+
+
- $(document).ready(ready);
? --
+ $(document).ready(ready2);
? +
- $(document).on('page:load', ready);
? --
+ $(document).on('page:load', ready2);
? +
+
+
</script>
</head>
EOF
end | 36 | 0.72 | 24 | 12 |
7006c9c413345960f45dcf4fca3b1b2199d6ade9 | .travis.yml | .travis.yml | language: python
sudo: required
services:
- docker
cache:
directories:
- $HOME/.cache/pip
matrix:
include:
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 9.4
- python: 3.6
env: TOXENV=pep8
- python: 3.6
env: TOXENV=docs
install:
- pip install virtualenv wheel
- pip install -U pip
- python -m virtualenv ~/.venv
- source ~/.venv/bin/activate
- pip install tox codecov
script:
- source ~/.venv/bin/activate
- .travis/run_tests.sh
after_success:
- ./.travis/upload_coverage.sh
after_script:
- cat .tox/$TOXENV/log/$TOXENV-*.log
| language: python
sudo: required
services:
- docker
cache:
directories:
- $HOME/.cache/pip
matrix:
include:
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 9.4
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 9.5
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 9.6
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 10
- python: 3.6
env: TOXENV=pep8
- python: 3.6
env: TOXENV=docs
install:
- pip install virtualenv wheel
- pip install -U pip
- python -m virtualenv ~/.venv
- source ~/.venv/bin/activate
- pip install tox codecov
script:
- source ~/.venv/bin/activate
- .travis/run_tests.sh
after_success:
- ./.travis/upload_coverage.sh
after_script:
- cat .tox/$TOXENV/log/$TOXENV-*.log
| Test more PostgreSQL versions on Travis | Test more PostgreSQL versions on Travis
| YAML | mit | RazerM/pg_grant,RazerM/pg_grant | yaml | ## Code Before:
language: python
sudo: required
services:
- docker
cache:
directories:
- $HOME/.cache/pip
matrix:
include:
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 9.4
- python: 3.6
env: TOXENV=pep8
- python: 3.6
env: TOXENV=docs
install:
- pip install virtualenv wheel
- pip install -U pip
- python -m virtualenv ~/.venv
- source ~/.venv/bin/activate
- pip install tox codecov
script:
- source ~/.venv/bin/activate
- .travis/run_tests.sh
after_success:
- ./.travis/upload_coverage.sh
after_script:
- cat .tox/$TOXENV/log/$TOXENV-*.log
## Instruction:
Test more PostgreSQL versions on Travis
## Code After:
language: python
sudo: required
services:
- docker
cache:
directories:
- $HOME/.cache/pip
matrix:
include:
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 9.4
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 9.5
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 9.6
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 10
- python: 3.6
env: TOXENV=pep8
- python: 3.6
env: TOXENV=docs
install:
- pip install virtualenv wheel
- pip install -U pip
- python -m virtualenv ~/.venv
- source ~/.venv/bin/activate
- pip install tox codecov
script:
- source ~/.venv/bin/activate
- .travis/run_tests.sh
after_success:
- ./.travis/upload_coverage.sh
after_script:
- cat .tox/$TOXENV/log/$TOXENV-*.log
| language: python
sudo: required
services:
- docker
cache:
directories:
- $HOME/.cache/pip
matrix:
include:
- python: 3.4
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
- python: 3.6
env: TOXENV=py36
- python: 3.6
env:
- TOXENV=py36
- NOCONTAINER=1
addons:
postgresql: 9.4
- python: 3.6
+ env:
+ - TOXENV=py36
+ - NOCONTAINER=1
+ addons:
+ postgresql: 9.5
+ - python: 3.6
+ env:
+ - TOXENV=py36
+ - NOCONTAINER=1
+ addons:
+ postgresql: 9.6
+ - python: 3.6
+ env:
+ - TOXENV=py36
+ - NOCONTAINER=1
+ addons:
+ postgresql: 10
+ - python: 3.6
env: TOXENV=pep8
- python: 3.6
env: TOXENV=docs
install:
- pip install virtualenv wheel
- pip install -U pip
- python -m virtualenv ~/.venv
- source ~/.venv/bin/activate
- pip install tox codecov
script:
- source ~/.venv/bin/activate
- .travis/run_tests.sh
after_success:
- ./.travis/upload_coverage.sh
after_script:
- cat .tox/$TOXENV/log/$TOXENV-*.log | 18 | 0.4 | 18 | 0 |
6ecce7b35da94e8f78f8bf6b016adebabf29379e | packages/ca/cabalish.yaml | packages/ca/cabalish.yaml | homepage: https://github.com/RobertFischer/cabalish#readme
changelog-type: ''
hash: 324a3a40d24a48137534953d0ae016db076a32ef9351ac0958f3cc4964cb8e39
test-bench-deps: {}
maintainer: smokejumperit+stack@gmail.com
synopsis: Provides access to the cabal file data for shell scripts
changelog: ''
basic-deps:
Cabal: ! '>=1.24.2.0 && <2'
base: ! '>=4.7 && <5'
text: ! '>=1.2.2.1 && <2'
filepath: ! '>=1.4.1.1 && <2'
classy-prelude: ! '>=1.2.0.1 && <2'
optparse-applicative: ! '>=0.13.2.0 && <0.14'
directory: ! '>=1.3.0.0 && <2'
all-versions:
- '0.1.0.0'
author: Robert Fischer
latest: '0.1.0.0'
description-type: markdown
description: ! '# cabalish
'
license-name: BSD3
| homepage: https://github.com/RobertFischer/cabalish#readme
changelog-type: ''
hash: 3ca2f524a8ff853bb6bc6cc25db520e9a38790ed2a11bc8d17a3f3fd1cf38e48
test-bench-deps: {}
maintainer: smokejumperit+stack@gmail.com
synopsis: Provides access to the cabal file data for shell scripts
changelog: ''
basic-deps:
Cabal: ! '>=1.24.2.0 && <2'
base: ! '>=4.7 && <5'
text: ! '>=1.2.2.1 && <2'
filepath: ! '>=1.4.1.1 && <2'
classy-prelude: ! '>=1.2.0.1 && <2'
optparse-applicative: ! '>=0.13.2.0 && <0.14'
directory: ! '>=1.3.0.0 && <2'
all-versions:
- '0.1.0.0'
- '0.1.0.1'
author: Robert Fischer
latest: '0.1.0.1'
description-type: markdown
description: ! '# cabalish
'
license-name: BSD3
| Update from Hackage at 2017-04-25T18:02:21Z | Update from Hackage at 2017-04-25T18:02:21Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/RobertFischer/cabalish#readme
changelog-type: ''
hash: 324a3a40d24a48137534953d0ae016db076a32ef9351ac0958f3cc4964cb8e39
test-bench-deps: {}
maintainer: smokejumperit+stack@gmail.com
synopsis: Provides access to the cabal file data for shell scripts
changelog: ''
basic-deps:
Cabal: ! '>=1.24.2.0 && <2'
base: ! '>=4.7 && <5'
text: ! '>=1.2.2.1 && <2'
filepath: ! '>=1.4.1.1 && <2'
classy-prelude: ! '>=1.2.0.1 && <2'
optparse-applicative: ! '>=0.13.2.0 && <0.14'
directory: ! '>=1.3.0.0 && <2'
all-versions:
- '0.1.0.0'
author: Robert Fischer
latest: '0.1.0.0'
description-type: markdown
description: ! '# cabalish
'
license-name: BSD3
## Instruction:
Update from Hackage at 2017-04-25T18:02:21Z
## Code After:
homepage: https://github.com/RobertFischer/cabalish#readme
changelog-type: ''
hash: 3ca2f524a8ff853bb6bc6cc25db520e9a38790ed2a11bc8d17a3f3fd1cf38e48
test-bench-deps: {}
maintainer: smokejumperit+stack@gmail.com
synopsis: Provides access to the cabal file data for shell scripts
changelog: ''
basic-deps:
Cabal: ! '>=1.24.2.0 && <2'
base: ! '>=4.7 && <5'
text: ! '>=1.2.2.1 && <2'
filepath: ! '>=1.4.1.1 && <2'
classy-prelude: ! '>=1.2.0.1 && <2'
optparse-applicative: ! '>=0.13.2.0 && <0.14'
directory: ! '>=1.3.0.0 && <2'
all-versions:
- '0.1.0.0'
- '0.1.0.1'
author: Robert Fischer
latest: '0.1.0.1'
description-type: markdown
description: ! '# cabalish
'
license-name: BSD3
| homepage: https://github.com/RobertFischer/cabalish#readme
changelog-type: ''
- hash: 324a3a40d24a48137534953d0ae016db076a32ef9351ac0958f3cc4964cb8e39
+ hash: 3ca2f524a8ff853bb6bc6cc25db520e9a38790ed2a11bc8d17a3f3fd1cf38e48
test-bench-deps: {}
maintainer: smokejumperit+stack@gmail.com
synopsis: Provides access to the cabal file data for shell scripts
changelog: ''
basic-deps:
Cabal: ! '>=1.24.2.0 && <2'
base: ! '>=4.7 && <5'
text: ! '>=1.2.2.1 && <2'
filepath: ! '>=1.4.1.1 && <2'
classy-prelude: ! '>=1.2.0.1 && <2'
optparse-applicative: ! '>=0.13.2.0 && <0.14'
directory: ! '>=1.3.0.0 && <2'
all-versions:
- '0.1.0.0'
+ - '0.1.0.1'
author: Robert Fischer
- latest: '0.1.0.0'
? ^
+ latest: '0.1.0.1'
? ^
description-type: markdown
description: ! '# cabalish
'
license-name: BSD3 | 5 | 0.208333 | 3 | 2 |
4b716882b3e8e13e591d629a88e5b102c7f008b4 | mapit/management/commands/mapit_generation_deactivate.py | mapit/management/commands/mapit_generation_deactivate.py |
from optparse import make_option
from django.core.management.base import BaseCommand
from mapit.models import Generation
class Command(BaseCommand):
help = 'Deactivate a generation'
args = '<GENERATION-ID>'
option_list = BaseCommand.option_list + (
make_option('--commit', action='store_true', dest='commit',
help='Actually update the database'),
make_option('--force', action='store_true', dest='force',
help='Force deactivation, even if it would leave no active generations'))
def handle(self, generation_id, **options):
generation_to_deactivate = Generation.objects.get(id=int(generation_id, 10))
if not generation_to_deactivate.active:
raise CommandError, "The generation %s wasn't active" % (generation_id,)
active_generations = Generation.objects.filter(active=True).count()
if active_generations <= 1 and not options['force']:
raise CommandError, "You're trying to deactivate the only active generation. If this is what you intended, please re-run the command with --force"
generation_to_deactivate.active = False
if options['commit']:
generation_to_deactivate.save()
print "%s - deactivated" % generation_to_deactivate
else:
print "%s - not deactivated, dry run" % generation_to_deactivate
|
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from mapit.models import Generation
class Command(BaseCommand):
help = 'Deactivate a generation'
args = '<GENERATION-ID>'
option_list = BaseCommand.option_list + (
make_option('--commit', action='store_true', dest='commit',
help='Actually update the database'),
make_option('--force', action='store_true', dest='force',
help='Force deactivation, even if it would leave no active generations'))
def handle(self, generation_id, **options):
generation_to_deactivate = Generation.objects.get(id=int(generation_id, 10))
if not generation_to_deactivate.active:
raise CommandError, "The generation %s wasn't active" % (generation_id,)
active_generations = Generation.objects.filter(active=True).count()
if active_generations <= 1 and not options['force']:
raise CommandError, "You're trying to deactivate the only active generation. If this is what you intended, please re-run the command with --force"
generation_to_deactivate.active = False
if options['commit']:
generation_to_deactivate.save()
print "%s - deactivated" % generation_to_deactivate
else:
print "%s - not deactivated, dry run" % generation_to_deactivate
| Add the import for CommandError | Add the import for CommandError
| Python | agpl-3.0 | opencorato/mapit,chris48s/mapit,New-Bamboo/mapit,Code4SA/mapit,Code4SA/mapit,chris48s/mapit,New-Bamboo/mapit,Code4SA/mapit,Sinar/mapit,opencorato/mapit,opencorato/mapit,Sinar/mapit,chris48s/mapit | python | ## Code Before:
from optparse import make_option
from django.core.management.base import BaseCommand
from mapit.models import Generation
class Command(BaseCommand):
help = 'Deactivate a generation'
args = '<GENERATION-ID>'
option_list = BaseCommand.option_list + (
make_option('--commit', action='store_true', dest='commit',
help='Actually update the database'),
make_option('--force', action='store_true', dest='force',
help='Force deactivation, even if it would leave no active generations'))
def handle(self, generation_id, **options):
generation_to_deactivate = Generation.objects.get(id=int(generation_id, 10))
if not generation_to_deactivate.active:
raise CommandError, "The generation %s wasn't active" % (generation_id,)
active_generations = Generation.objects.filter(active=True).count()
if active_generations <= 1 and not options['force']:
raise CommandError, "You're trying to deactivate the only active generation. If this is what you intended, please re-run the command with --force"
generation_to_deactivate.active = False
if options['commit']:
generation_to_deactivate.save()
print "%s - deactivated" % generation_to_deactivate
else:
print "%s - not deactivated, dry run" % generation_to_deactivate
## Instruction:
Add the import for CommandError
## Code After:
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from mapit.models import Generation
class Command(BaseCommand):
help = 'Deactivate a generation'
args = '<GENERATION-ID>'
option_list = BaseCommand.option_list + (
make_option('--commit', action='store_true', dest='commit',
help='Actually update the database'),
make_option('--force', action='store_true', dest='force',
help='Force deactivation, even if it would leave no active generations'))
def handle(self, generation_id, **options):
generation_to_deactivate = Generation.objects.get(id=int(generation_id, 10))
if not generation_to_deactivate.active:
raise CommandError, "The generation %s wasn't active" % (generation_id,)
active_generations = Generation.objects.filter(active=True).count()
if active_generations <= 1 and not options['force']:
raise CommandError, "You're trying to deactivate the only active generation. If this is what you intended, please re-run the command with --force"
generation_to_deactivate.active = False
if options['commit']:
generation_to_deactivate.save()
print "%s - deactivated" % generation_to_deactivate
else:
print "%s - not deactivated, dry run" % generation_to_deactivate
|
from optparse import make_option
- from django.core.management.base import BaseCommand
+ from django.core.management.base import BaseCommand, CommandError
? ++++++++++++++
from mapit.models import Generation
class Command(BaseCommand):
help = 'Deactivate a generation'
args = '<GENERATION-ID>'
option_list = BaseCommand.option_list + (
make_option('--commit', action='store_true', dest='commit',
help='Actually update the database'),
make_option('--force', action='store_true', dest='force',
help='Force deactivation, even if it would leave no active generations'))
def handle(self, generation_id, **options):
generation_to_deactivate = Generation.objects.get(id=int(generation_id, 10))
if not generation_to_deactivate.active:
raise CommandError, "The generation %s wasn't active" % (generation_id,)
active_generations = Generation.objects.filter(active=True).count()
if active_generations <= 1 and not options['force']:
raise CommandError, "You're trying to deactivate the only active generation. If this is what you intended, please re-run the command with --force"
generation_to_deactivate.active = False
if options['commit']:
generation_to_deactivate.save()
print "%s - deactivated" % generation_to_deactivate
else:
print "%s - not deactivated, dry run" % generation_to_deactivate | 2 | 0.074074 | 1 | 1 |
82f8e81afee136c91a3bec67f18bef26cbdd393b | simpletabs.coffee | simpletabs.coffee | $ ->
hashTabs = ->
_element: ""
element: (element) ->
this._element = element
updateTab: (updateHash=true)->
this.updateTabLink()
this.updateTabContainer()
$('body').scrollTop(0)
if updateHash
this.updateURLHash()
updateTabLink: ->
this._element.parent().addClass('is-active').siblings('.is-active').removeClass('is-active')
updateTabContainer: ->
dataTab = this._element.data('tab')
$("[data-content='" + dataTab + "']").addClass('is-active').show().siblings().removeClass('is-active').hide()
updateURLHash: ->
window.location.hash = this._element.data('tab')
if $('[data-tab]').length
$(window).on 'load', ->
if window.location.hash != ""
hash = window.location.hash.replace("#", "")
tabs = new hashTabs()
tabs.element $("[data-tab='"+hash+"']")
tabs.updateTab()
else
tabs = new hashTabs()
tabs.element $("[data-tab]").first()
tabs.updateTab(updateHash=false)
$(window).on 'hashchange', ->
hash = window.location.hash.replace("#", "")
tabs = new hashTabs()
tabs.element $("[data-tab='"+hash+"']")
tabs.updateTab()
$('[data-tab]').on 'click', (e) ->
tabs = new hashTabs()
tabs.element $(this)
tabs.updateTab()
e.preventDefault()
| $ ->
hashTabs = ->
_element: ""
element: (element) ->
this._element = element
updateTab: (updateHash=true)->
this.updateTabLink()
this.updateTabContainer()
$('body').scrollTop(0)
if updateHash
this.updateURLHash()
updateTabLink: ->
this._element.parent().addClass('is-active').siblings('.is-active').removeClass('is-active')
updateTabContainer: ->
dataTab = this._element.data('tab')
contentTab = $("[data-content='" + dataTab + "']")
$('[data-content]').not(contentTab).removeClass('is-active')
contentTab.each ->
$(this).addClass('is-active')
updateURLHash: ->
window.location.hash = this._element.data('tab')
if $('[data-tab]').length
$(window).on 'load', ->
if window.location.hash != ""
hash = window.location.hash.replace("#", "")
tabs = new hashTabs()
tabs.element $("[data-tab='"+hash+"']")
tabs.updateTab()
else
tabs = new hashTabs()
tabs.element $("[data-tab]").first()
tabs.updateTab(updateHash=false)
$(window).on 'hashchange', ->
hash = window.location.hash.replace("#", "")
tabs = new hashTabs()
tabs.element $("[data-tab='"+hash+"']")
tabs.updateTab()
$('[data-tab]').on 'click', (e) ->
tabs = new hashTabs()
tabs.element $(this)
tabs.updateTab()
e.preventDefault() | Add possibility to show N content with the same data tab | Add possibility to show N content with the same data tab
| CoffeeScript | mit | romulomachado/simpletabs | coffeescript | ## Code Before:
$ ->
hashTabs = ->
_element: ""
element: (element) ->
this._element = element
updateTab: (updateHash=true)->
this.updateTabLink()
this.updateTabContainer()
$('body').scrollTop(0)
if updateHash
this.updateURLHash()
updateTabLink: ->
this._element.parent().addClass('is-active').siblings('.is-active').removeClass('is-active')
updateTabContainer: ->
dataTab = this._element.data('tab')
$("[data-content='" + dataTab + "']").addClass('is-active').show().siblings().removeClass('is-active').hide()
updateURLHash: ->
window.location.hash = this._element.data('tab')
if $('[data-tab]').length
$(window).on 'load', ->
if window.location.hash != ""
hash = window.location.hash.replace("#", "")
tabs = new hashTabs()
tabs.element $("[data-tab='"+hash+"']")
tabs.updateTab()
else
tabs = new hashTabs()
tabs.element $("[data-tab]").first()
tabs.updateTab(updateHash=false)
$(window).on 'hashchange', ->
hash = window.location.hash.replace("#", "")
tabs = new hashTabs()
tabs.element $("[data-tab='"+hash+"']")
tabs.updateTab()
$('[data-tab]').on 'click', (e) ->
tabs = new hashTabs()
tabs.element $(this)
tabs.updateTab()
e.preventDefault()
## Instruction:
Add possibility to show N content with the same data tab
## Code After:
$ ->
hashTabs = ->
_element: ""
element: (element) ->
this._element = element
updateTab: (updateHash=true)->
this.updateTabLink()
this.updateTabContainer()
$('body').scrollTop(0)
if updateHash
this.updateURLHash()
updateTabLink: ->
this._element.parent().addClass('is-active').siblings('.is-active').removeClass('is-active')
updateTabContainer: ->
dataTab = this._element.data('tab')
contentTab = $("[data-content='" + dataTab + "']")
$('[data-content]').not(contentTab).removeClass('is-active')
contentTab.each ->
$(this).addClass('is-active')
updateURLHash: ->
window.location.hash = this._element.data('tab')
if $('[data-tab]').length
$(window).on 'load', ->
if window.location.hash != ""
hash = window.location.hash.replace("#", "")
tabs = new hashTabs()
tabs.element $("[data-tab='"+hash+"']")
tabs.updateTab()
else
tabs = new hashTabs()
tabs.element $("[data-tab]").first()
tabs.updateTab(updateHash=false)
$(window).on 'hashchange', ->
hash = window.location.hash.replace("#", "")
tabs = new hashTabs()
tabs.element $("[data-tab='"+hash+"']")
tabs.updateTab()
$('[data-tab]').on 'click', (e) ->
tabs = new hashTabs()
tabs.element $(this)
tabs.updateTab()
e.preventDefault() | $ ->
hashTabs = ->
_element: ""
element: (element) ->
this._element = element
updateTab: (updateHash=true)->
this.updateTabLink()
this.updateTabContainer()
$('body').scrollTop(0)
if updateHash
this.updateURLHash()
updateTabLink: ->
this._element.parent().addClass('is-active').siblings('.is-active').removeClass('is-active')
updateTabContainer: ->
dataTab = this._element.data('tab')
- $("[data-content='" + dataTab + "']").addClass('is-active').show().siblings().removeClass('is-active').hide()
+ contentTab = $("[data-content='" + dataTab + "']")
+ $('[data-content]').not(contentTab).removeClass('is-active')
+ contentTab.each ->
+ $(this).addClass('is-active')
updateURLHash: ->
window.location.hash = this._element.data('tab')
if $('[data-tab]').length
$(window).on 'load', ->
if window.location.hash != ""
hash = window.location.hash.replace("#", "")
tabs = new hashTabs()
tabs.element $("[data-tab='"+hash+"']")
tabs.updateTab()
else
tabs = new hashTabs()
tabs.element $("[data-tab]").first()
tabs.updateTab(updateHash=false)
$(window).on 'hashchange', ->
hash = window.location.hash.replace("#", "")
tabs = new hashTabs()
tabs.element $("[data-tab='"+hash+"']")
tabs.updateTab()
$('[data-tab]').on 'click', (e) ->
tabs = new hashTabs()
tabs.element $(this)
tabs.updateTab()
e.preventDefault() | 5 | 0.106383 | 4 | 1 |
986faef86b65b9ab7471077da321020ee5164cf8 | src/set-env.js | src/set-env.js | const {webpack} = require('@webpack-blocks/webpack2');
/**
* Sets environment variables with all possible ways.
*/
module.exports = (options = {}) => {
const {
nodeEnv = 'development',
babelEnv = 'development',
} = options;
process.env.NODE_ENV = nodeEnv;
process.env.BABEL_ENV = babelEnv;
return () => ({
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(nodeEnv),
BABEL_ENV: JSON.stringify(babelEnv),
},
}),
new webpack.EnvironmentPlugin(['NODE_ENV', 'BABEL_ENV']),
],
});
};
| const {webpack} = require('@webpack-blocks/webpack2');
/**
* Sets environment variables with all possible ways.
*/
module.exports = (options = {}) => {
const {
nodeEnv,
babelEnv,
} = options;
process.env.NODE_ENV = nodeEnv;
process.env.BABEL_ENV = babelEnv;
return () => ({
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(nodeEnv),
BABEL_ENV: JSON.stringify(babelEnv),
},
}),
new webpack.EnvironmentPlugin(['NODE_ENV', 'BABEL_ENV']),
],
});
};
| Set setEnv defaults to undefined | Set setEnv defaults to undefined
| JavaScript | mit | fugr-ru/webpack-custom-blocks | javascript | ## Code Before:
const {webpack} = require('@webpack-blocks/webpack2');
/**
* Sets environment variables with all possible ways.
*/
module.exports = (options = {}) => {
const {
nodeEnv = 'development',
babelEnv = 'development',
} = options;
process.env.NODE_ENV = nodeEnv;
process.env.BABEL_ENV = babelEnv;
return () => ({
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(nodeEnv),
BABEL_ENV: JSON.stringify(babelEnv),
},
}),
new webpack.EnvironmentPlugin(['NODE_ENV', 'BABEL_ENV']),
],
});
};
## Instruction:
Set setEnv defaults to undefined
## Code After:
const {webpack} = require('@webpack-blocks/webpack2');
/**
* Sets environment variables with all possible ways.
*/
module.exports = (options = {}) => {
const {
nodeEnv,
babelEnv,
} = options;
process.env.NODE_ENV = nodeEnv;
process.env.BABEL_ENV = babelEnv;
return () => ({
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(nodeEnv),
BABEL_ENV: JSON.stringify(babelEnv),
},
}),
new webpack.EnvironmentPlugin(['NODE_ENV', 'BABEL_ENV']),
],
});
};
| const {webpack} = require('@webpack-blocks/webpack2');
/**
* Sets environment variables with all possible ways.
*/
module.exports = (options = {}) => {
const {
- nodeEnv = 'development',
- babelEnv = 'development',
+ nodeEnv,
+ babelEnv,
} = options;
process.env.NODE_ENV = nodeEnv;
process.env.BABEL_ENV = babelEnv;
return () => ({
plugins: [
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(nodeEnv),
BABEL_ENV: JSON.stringify(babelEnv),
},
}),
new webpack.EnvironmentPlugin(['NODE_ENV', 'BABEL_ENV']),
],
});
}; | 4 | 0.142857 | 2 | 2 |
03b3bd619dcf68fbba409fa6de788d2e02f4c0ca | test/selectors.spec.js | test/selectors.spec.js | import * as selectors from '../src/selectors'
describe('selectors', () => {
it('includes selector to get session data', () => {
const state = {
session: {
data: { token: 'abcde' }
}
}
const result = selectors.getSessionData(state)
expect(result).toEqual({ token: 'abcde' })
})
it('includes selector to get isAuthenticated', () => {
const state = {
session: {
isAuthenticated: true
}
}
const result = selectors.getIsAuthenticated(state)
expect(result).toEqual(true)
})
it('includes selector to get authenticator', () => {
const state = {
session: {
authenticator: 'credentials'
}
}
const result = selectors.getAuthenticator(state)
expect(result).toEqual('credentials')
})
it('includes selector to get isRestored', () => {
const state = {
session: {
isRestored: false
}
}
const result = selectors.getIsRestored(state)
expect(result).toEqual(false)
})
it('includes selector to get lastError', () => {
const state = {
session: {
lastError: 'You shall not pass'
}
}
const result = selectors.getLastError(state)
expect(result).toEqual('You shall not pass')
})
})
| import * as selectors from '../src/selectors'
describe('selectors', () => {
it('includes selector to get session data', () => {
const state = {
session: {
data: { token: 'abcde' }
}
}
const result = selectors.getSessionData(state)
expect(result).toEqual({ token: 'abcde' })
})
it('includes selector to get isAuthenticated', () => {
const state = {
session: {
isAuthenticated: true
}
}
const result = selectors.getIsAuthenticated(state)
expect(result).toEqual(true)
})
it('includes selector to get authenticator', () => {
const state = {
session: {
authenticator: 'credentials'
}
}
const result = selectors.getAuthenticator(state)
expect(result).toEqual('credentials')
})
it('includes selector to get isRestored', () => {
const state = {
session: {
isRestored: false
}
}
const result = selectors.getIsRestored(state)
expect(result).toEqual(false)
})
it('includes selector to get lastError', () => {
const state = {
session: {
lastError: 'You shall not pass'
}
}
const result = selectors.getLastError(state)
expect(result).toEqual('You shall not pass')
})
it('includes selector to get hasFailedAuth', () => {
const state = {
session: {
hasFailedAuth: true
}
}
const result = selectors.getHasFailedAuth(state)
expect(result).toEqual(true)
})
})
| Add test for getHasFailedAuth selector | Add test for getHasFailedAuth selector
| JavaScript | mit | jerelmiller/redux-simple-auth | javascript | ## Code Before:
import * as selectors from '../src/selectors'
describe('selectors', () => {
it('includes selector to get session data', () => {
const state = {
session: {
data: { token: 'abcde' }
}
}
const result = selectors.getSessionData(state)
expect(result).toEqual({ token: 'abcde' })
})
it('includes selector to get isAuthenticated', () => {
const state = {
session: {
isAuthenticated: true
}
}
const result = selectors.getIsAuthenticated(state)
expect(result).toEqual(true)
})
it('includes selector to get authenticator', () => {
const state = {
session: {
authenticator: 'credentials'
}
}
const result = selectors.getAuthenticator(state)
expect(result).toEqual('credentials')
})
it('includes selector to get isRestored', () => {
const state = {
session: {
isRestored: false
}
}
const result = selectors.getIsRestored(state)
expect(result).toEqual(false)
})
it('includes selector to get lastError', () => {
const state = {
session: {
lastError: 'You shall not pass'
}
}
const result = selectors.getLastError(state)
expect(result).toEqual('You shall not pass')
})
})
## Instruction:
Add test for getHasFailedAuth selector
## Code After:
import * as selectors from '../src/selectors'
describe('selectors', () => {
it('includes selector to get session data', () => {
const state = {
session: {
data: { token: 'abcde' }
}
}
const result = selectors.getSessionData(state)
expect(result).toEqual({ token: 'abcde' })
})
it('includes selector to get isAuthenticated', () => {
const state = {
session: {
isAuthenticated: true
}
}
const result = selectors.getIsAuthenticated(state)
expect(result).toEqual(true)
})
it('includes selector to get authenticator', () => {
const state = {
session: {
authenticator: 'credentials'
}
}
const result = selectors.getAuthenticator(state)
expect(result).toEqual('credentials')
})
it('includes selector to get isRestored', () => {
const state = {
session: {
isRestored: false
}
}
const result = selectors.getIsRestored(state)
expect(result).toEqual(false)
})
it('includes selector to get lastError', () => {
const state = {
session: {
lastError: 'You shall not pass'
}
}
const result = selectors.getLastError(state)
expect(result).toEqual('You shall not pass')
})
it('includes selector to get hasFailedAuth', () => {
const state = {
session: {
hasFailedAuth: true
}
}
const result = selectors.getHasFailedAuth(state)
expect(result).toEqual(true)
})
})
| import * as selectors from '../src/selectors'
describe('selectors', () => {
it('includes selector to get session data', () => {
const state = {
session: {
data: { token: 'abcde' }
}
}
const result = selectors.getSessionData(state)
expect(result).toEqual({ token: 'abcde' })
})
it('includes selector to get isAuthenticated', () => {
const state = {
session: {
isAuthenticated: true
}
}
const result = selectors.getIsAuthenticated(state)
expect(result).toEqual(true)
})
it('includes selector to get authenticator', () => {
const state = {
session: {
authenticator: 'credentials'
}
}
const result = selectors.getAuthenticator(state)
expect(result).toEqual('credentials')
})
it('includes selector to get isRestored', () => {
const state = {
session: {
isRestored: false
}
}
const result = selectors.getIsRestored(state)
expect(result).toEqual(false)
})
it('includes selector to get lastError', () => {
const state = {
session: {
lastError: 'You shall not pass'
}
}
const result = selectors.getLastError(state)
expect(result).toEqual('You shall not pass')
})
+
+ it('includes selector to get hasFailedAuth', () => {
+ const state = {
+ session: {
+ hasFailedAuth: true
+ }
+ }
+
+ const result = selectors.getHasFailedAuth(state)
+
+ expect(result).toEqual(true)
+ })
}) | 12 | 0.190476 | 12 | 0 |
c1986e03ba49b2e3fad138085a12921247831aeb | locales/ff/server.ftl | locales/ff/server.ftl | // Localization for Server-side strings of Firefox Screenshots
//
// Please don't localize Firefox, Firefox Screenshots, or Screenshots
// Global phrases shared across pages, prefixed with 'g'
[[ global ]]
[[ Footer ]]
// Note: link text for a link to mozilla.org
footerLinkMozilla = Mozilla
[[ Creating page ]]
creatingPageTitleDefault = hello
[[ Home page ]]
homePageDownloadFirefoxTitle = Firefox
[[ Leave Screenshots page ]]
leavePageButtonCancel = Haaytu
[[ Not Found page ]]
notFoundPageTitle = Hello ngoo yiytaaka
notFoundPageDescription = Hello ngoo yiytaaka
[[ Shot page ]]
shotPageKeepTenMinutes = Hojomaaji 10
shotPageKeepOneHour = Waktu 1
shotPageKeepOneWeek = Yontere 1
shotPageKeepOneMonth = Lewru 1
shotPageCancelExpiration = Haaytu
[[ Shotindex page ]]
shotIndexPageSearchButton
.title = Yiylo
shotIndexPageNoSearchResultsIntro = Hmm
// all metrics strings are optional for translation
[[ Metrics page ]]
| // Localization for Server-side strings of Firefox Screenshots
//
// Please don't localize Firefox, Firefox Screenshots, or Screenshots
// Global phrases shared across pages, prefixed with 'g'
[[ global ]]
[[ Footer ]]
// Note: link text for a link to mozilla.org
footerLinkMozilla = Mozilla
[[ Creating page ]]
creatingPageTitleDefault = hello
[[ Home page ]]
homePageDownloadFirefoxTitle = Firefox
[[ Leave Screenshots page ]]
leavePageButtonCancel = Haaytu
[[ Not Found page ]]
notFoundPageTitle = Hello ngoo yiytaaka
notFoundPageDescription = Hello ngoo yiytaaka
[[ Shot page ]]
shotPageKeepTenMinutes = Hojomaaji 10
shotPageKeepOneHour = Waktu 1
shotPageKeepOneWeek = Yontere 1
shotPageKeepOneMonth = Lewru 1
shotPageCancelExpiration = Haaytu
[[ Annotations ]]
[[ Shotindex page ]]
shotIndexPageSearchButton
.title = Yiylo
shotIndexPageNoSearchResultsIntro = Hmm
// all metrics strings are optional for translation
[[ Metrics page ]]
| Update Fulah (ff) localization of Firefox Screenshots | Pontoon: Update Fulah (ff) localization of Firefox Screenshots
Localization authors:
- gueyeamas <gueyeamas@yahoo.fr>
| FreeMarker | mpl-2.0 | mozilla-services/pageshot,mozilla-services/pageshot,mozilla-services/screenshots,mozilla-services/screenshots,mozilla-services/screenshots,mozilla-services/screenshots,mozilla-services/pageshot,mozilla-services/pageshot | freemarker | ## Code Before:
// Localization for Server-side strings of Firefox Screenshots
//
// Please don't localize Firefox, Firefox Screenshots, or Screenshots
// Global phrases shared across pages, prefixed with 'g'
[[ global ]]
[[ Footer ]]
// Note: link text for a link to mozilla.org
footerLinkMozilla = Mozilla
[[ Creating page ]]
creatingPageTitleDefault = hello
[[ Home page ]]
homePageDownloadFirefoxTitle = Firefox
[[ Leave Screenshots page ]]
leavePageButtonCancel = Haaytu
[[ Not Found page ]]
notFoundPageTitle = Hello ngoo yiytaaka
notFoundPageDescription = Hello ngoo yiytaaka
[[ Shot page ]]
shotPageKeepTenMinutes = Hojomaaji 10
shotPageKeepOneHour = Waktu 1
shotPageKeepOneWeek = Yontere 1
shotPageKeepOneMonth = Lewru 1
shotPageCancelExpiration = Haaytu
[[ Shotindex page ]]
shotIndexPageSearchButton
.title = Yiylo
shotIndexPageNoSearchResultsIntro = Hmm
// all metrics strings are optional for translation
[[ Metrics page ]]
## Instruction:
Pontoon: Update Fulah (ff) localization of Firefox Screenshots
Localization authors:
- gueyeamas <gueyeamas@yahoo.fr>
## Code After:
// Localization for Server-side strings of Firefox Screenshots
//
// Please don't localize Firefox, Firefox Screenshots, or Screenshots
// Global phrases shared across pages, prefixed with 'g'
[[ global ]]
[[ Footer ]]
// Note: link text for a link to mozilla.org
footerLinkMozilla = Mozilla
[[ Creating page ]]
creatingPageTitleDefault = hello
[[ Home page ]]
homePageDownloadFirefoxTitle = Firefox
[[ Leave Screenshots page ]]
leavePageButtonCancel = Haaytu
[[ Not Found page ]]
notFoundPageTitle = Hello ngoo yiytaaka
notFoundPageDescription = Hello ngoo yiytaaka
[[ Shot page ]]
shotPageKeepTenMinutes = Hojomaaji 10
shotPageKeepOneHour = Waktu 1
shotPageKeepOneWeek = Yontere 1
shotPageKeepOneMonth = Lewru 1
shotPageCancelExpiration = Haaytu
[[ Annotations ]]
[[ Shotindex page ]]
shotIndexPageSearchButton
.title = Yiylo
shotIndexPageNoSearchResultsIntro = Hmm
// all metrics strings are optional for translation
[[ Metrics page ]]
| // Localization for Server-side strings of Firefox Screenshots
//
// Please don't localize Firefox, Firefox Screenshots, or Screenshots
// Global phrases shared across pages, prefixed with 'g'
[[ global ]]
[[ Footer ]]
// Note: link text for a link to mozilla.org
footerLinkMozilla = Mozilla
[[ Creating page ]]
creatingPageTitleDefault = hello
[[ Home page ]]
homePageDownloadFirefoxTitle = Firefox
[[ Leave Screenshots page ]]
leavePageButtonCancel = Haaytu
[[ Not Found page ]]
notFoundPageTitle = Hello ngoo yiytaaka
notFoundPageDescription = Hello ngoo yiytaaka
[[ Shot page ]]
shotPageKeepTenMinutes = Hojomaaji 10
shotPageKeepOneHour = Waktu 1
shotPageKeepOneWeek = Yontere 1
shotPageKeepOneMonth = Lewru 1
shotPageCancelExpiration = Haaytu
+ [[ Annotations ]]
+
+
+
[[ Shotindex page ]]
shotIndexPageSearchButton
.title = Yiylo
shotIndexPageNoSearchResultsIntro = Hmm
// all metrics strings are optional for translation
[[ Metrics page ]]
| 4 | 0.070175 | 4 | 0 |
adb0ad91093b879f490c14828929f4c001d5961f | scripts/osx/update-all.sh | scripts/osx/update-all.sh | update-dotfiles
# apt packages
brew update
brew upgrade
# non-tracked packages
"${XDG_CONFIG_HOME}/fzf/install" --bin
# rust
rustup update
cargo install-update -a
# stack
stack --resolver nightly update
stack --resolver nightly upgrade
# npm
n-update -y
n stable
npm update -g
# python
pip3 list --outdated | cut -d ' ' -f 1 | xargs -n 1 pip3 install --upgrade
# vim
nvim +PlugUpgrade +PlugInstall +PlugUpdate +qall
| update-dotfiles
# apt packages
brew update
brew upgrade
# non-tracked packages
"${XDG_CONFIG_HOME}/fzf/install" --bin
# rust
rustup update
cargo install-update -a
# stack
stack --resolver nightly update
stack --resolver nightly upgrade
# npm
n-update -y
n stable
npm update -g
# python
pip3 list --outdated | cut -d ' ' -f 1 | xargs -n 1 pip3 install --upgrade
# vim
nvim +PlugUpgrade +PlugInstall +PlugUpdate +qall
# atom
apm upgrade --no-confirm
| Add atom packages to the auto update list | Add atom packages to the auto update list
| Shell | mit | Rypac/dotfiles,Rypac/dotfiles,Rypac/dotfiles | shell | ## Code Before:
update-dotfiles
# apt packages
brew update
brew upgrade
# non-tracked packages
"${XDG_CONFIG_HOME}/fzf/install" --bin
# rust
rustup update
cargo install-update -a
# stack
stack --resolver nightly update
stack --resolver nightly upgrade
# npm
n-update -y
n stable
npm update -g
# python
pip3 list --outdated | cut -d ' ' -f 1 | xargs -n 1 pip3 install --upgrade
# vim
nvim +PlugUpgrade +PlugInstall +PlugUpdate +qall
## Instruction:
Add atom packages to the auto update list
## Code After:
update-dotfiles
# apt packages
brew update
brew upgrade
# non-tracked packages
"${XDG_CONFIG_HOME}/fzf/install" --bin
# rust
rustup update
cargo install-update -a
# stack
stack --resolver nightly update
stack --resolver nightly upgrade
# npm
n-update -y
n stable
npm update -g
# python
pip3 list --outdated | cut -d ' ' -f 1 | xargs -n 1 pip3 install --upgrade
# vim
nvim +PlugUpgrade +PlugInstall +PlugUpdate +qall
# atom
apm upgrade --no-confirm
| update-dotfiles
# apt packages
brew update
brew upgrade
# non-tracked packages
"${XDG_CONFIG_HOME}/fzf/install" --bin
# rust
rustup update
cargo install-update -a
# stack
stack --resolver nightly update
stack --resolver nightly upgrade
# npm
n-update -y
n stable
npm update -g
# python
pip3 list --outdated | cut -d ' ' -f 1 | xargs -n 1 pip3 install --upgrade
# vim
nvim +PlugUpgrade +PlugInstall +PlugUpdate +qall
+
+ # atom
+ apm upgrade --no-confirm | 3 | 0.111111 | 3 | 0 |
72d02b1b9b6a18ae27342555d865011cc8d22ab7 | languages/es.php | languages/es.php | <?php
$Spanish = Array(
'informe:group_ap' => 'Agente de Proyecto',
'informe:group_pa' => 'Promotor Acesor',
'informe:error:missing:meeting_manager' => 'Falta el nombre del representante',
'informe:error:missing:building' => 'Falta el establecimiento',
'river:create:object:informe' => '%s ha publicado el %s',
'informe:empty:field' => '-',
);
add_translation('es', $Spanish);
| <?php
$Spanish = Array(
'informe:group_ap' => 'Agente de Proyecto',
'informe:group_pa' => 'Promotor Acesor',
'informe:error:missing:meeting_manager' => 'Falta el nombre del representante',
'informe:error:missing:building' => 'Falta el establecimiento',
'river:create:object:informe' => '%s ha publicado el %s',
'informe:empty:field' => '-',
'river:create:object:default' => '%s creó %s',
);
add_translation('es', $Spanish);
| Add default string for river update | Add default string for river update
| PHP | agpl-3.0 | Xicnet/elgg-cambiorural-informe | php | ## Code Before:
<?php
$Spanish = Array(
'informe:group_ap' => 'Agente de Proyecto',
'informe:group_pa' => 'Promotor Acesor',
'informe:error:missing:meeting_manager' => 'Falta el nombre del representante',
'informe:error:missing:building' => 'Falta el establecimiento',
'river:create:object:informe' => '%s ha publicado el %s',
'informe:empty:field' => '-',
);
add_translation('es', $Spanish);
## Instruction:
Add default string for river update
## Code After:
<?php
$Spanish = Array(
'informe:group_ap' => 'Agente de Proyecto',
'informe:group_pa' => 'Promotor Acesor',
'informe:error:missing:meeting_manager' => 'Falta el nombre del representante',
'informe:error:missing:building' => 'Falta el establecimiento',
'river:create:object:informe' => '%s ha publicado el %s',
'informe:empty:field' => '-',
'river:create:object:default' => '%s creó %s',
);
add_translation('es', $Spanish);
| <?php
$Spanish = Array(
'informe:group_ap' => 'Agente de Proyecto',
'informe:group_pa' => 'Promotor Acesor',
'informe:error:missing:meeting_manager' => 'Falta el nombre del representante',
'informe:error:missing:building' => 'Falta el establecimiento',
'river:create:object:informe' => '%s ha publicado el %s',
'informe:empty:field' => '-',
+ 'river:create:object:default' => '%s creó %s',
);
add_translation('es', $Spanish); | 1 | 0.083333 | 1 | 0 |
6f4d70c3d38dbc01b3902ca3d701633c38e23c9f | app/assets/stylesheets/functions/_golden-ratio.scss | app/assets/stylesheets/functions/_golden-ratio.scss | @function golden-ratio($value, $increment) {
@return modular-scale($value, $increment, $golden)
}
| @function golden-ratio($increment) {
@return modular-scale($increment, $ratio: $golden)
}
| Make golden ratio function compatible with update | Make golden ratio function compatible with update
| SCSS | mit | cllns/bourbon,jasonwalkow/bourbon,zyj1022/bourbon,craftsmen/bourbon,thoughtbot/bourbon,setie/bourbon,nickg33/bourbon,ismarkunc/bourbon,nickg33/bourbon,chriseppstein/bourbon,greyhwndz/bourbon,Jazz-Man/bourbon,Nikeshsuwal/bourbon,greyhwndz/bourbon,mindeavor/bourbon,craftsmen/bourbon,nagyistoce/sass-bourbon.io,mindeavor/bourbon,chriseppstein/bourbon,setie/bourbon,zyj1022/bourbon,smithdamen/bourbon,jasonwalkow/bourbon,smithdamen/bourbon,thoughtbot/bourbon,Jazz-Man/bourbon | scss | ## Code Before:
@function golden-ratio($value, $increment) {
@return modular-scale($value, $increment, $golden)
}
## Instruction:
Make golden ratio function compatible with update
## Code After:
@function golden-ratio($increment) {
@return modular-scale($increment, $ratio: $golden)
}
| - @function golden-ratio($value, $increment) {
? --------
+ @function golden-ratio($increment) {
- @return modular-scale($value, $increment, $golden)
? --------
+ @return modular-scale($increment, $ratio: $golden)
? ++++++++
} | 4 | 1.333333 | 2 | 2 |
08517b8cc97af75922ad40704fc333bdd0cba5fa | test/src/main.js | test/src/main.js | requirejs.config({
baseUrl: 'test',
paths: {
pvcf: '../../lib/pvcf',
when: '../test/vendor/when/when',
node: '../test/vendor/when/node',
callbacks: '../test/vendor/when/callbacks'
}
});
requirejs(['pvcf'], function run(pvcf) {
var definitions = pvcf.definitions;
var ViewDefinition = definitions.ViewDefinition;
var TabManager = pvcf.TabManager;
// ### View list. ###
// # Events #
var addEvent = new ViewDefinition('test/templates/addEvent.html', ['test/modules/addEvent.js'], true);
// # Tab manager #
var tabManager = new TabManager();
var startTab = tabManager.openTab();
startTab.openView(addEvent).done(function () {
tabManager.closeTab(startTab);
});
tabManager.getContainerElement().appendChild(startTab.getContainerElement());
document.body.appendChild(tabManager.getContainerElement());
}); | requirejs.config({
baseUrl: 'test',
paths: {
pvcf: '../../lib/pvcf',
when: '../test/vendor/when/when',
node: '../test/vendor/when/node',
callbacks: '../test/vendor/when/callbacks'
}
});
requirejs(['pvcf'], function run(pvcf) {
var definitions = pvcf.definitions;
var ViewDefinition = definitions.ViewDefinition;
var PatternDefinition = definitions.PatternDefinition;
var PatternManager = pvcf.PatternManager;
var TabManager = pvcf.TabManager;
// ### View list ###
// # Events #
var addEvent = new ViewDefinition('test/templates/addEvent.html', ['test/modules/addEvent.js'], true);
var showEvent = new ViewDefinition('test/templates/showEvent.html', ['test/modules/showEvent.js'], true);
// # Pattern manager #
var patternManager = new PatternManager();
// ### Pattern list ###
patternManager.addPattern(new PatternDefinition('event/add', addEvent));
patternManager.addPattern(new PatternDefinition('event/show/:id', showEvent));
// # Tab manager #
var tabManager = new TabManager();
document.body.appendChild(tabManager.getContainerElement());
function main() {
console.log('Appliaction started!');
}
// window.onload actions:
var startTab = tabManager.openTab();
startTab.openView(addEvent).done(function () {
tabManager.closeTab(startTab);
});
tabManager.getContainerElement().appendChild(startTab.getContainerElement());
main();
// window.hashchange actions:
window.addEventListener('hashchange', main);
}); | Extend initialize layer by pattern manager. | Extend initialize layer by pattern manager.
| JavaScript | mit | rootsher/pvcf,rootsher/pvcf,rootsher/pvcf | javascript | ## Code Before:
requirejs.config({
baseUrl: 'test',
paths: {
pvcf: '../../lib/pvcf',
when: '../test/vendor/when/when',
node: '../test/vendor/when/node',
callbacks: '../test/vendor/when/callbacks'
}
});
requirejs(['pvcf'], function run(pvcf) {
var definitions = pvcf.definitions;
var ViewDefinition = definitions.ViewDefinition;
var TabManager = pvcf.TabManager;
// ### View list. ###
// # Events #
var addEvent = new ViewDefinition('test/templates/addEvent.html', ['test/modules/addEvent.js'], true);
// # Tab manager #
var tabManager = new TabManager();
var startTab = tabManager.openTab();
startTab.openView(addEvent).done(function () {
tabManager.closeTab(startTab);
});
tabManager.getContainerElement().appendChild(startTab.getContainerElement());
document.body.appendChild(tabManager.getContainerElement());
});
## Instruction:
Extend initialize layer by pattern manager.
## Code After:
requirejs.config({
baseUrl: 'test',
paths: {
pvcf: '../../lib/pvcf',
when: '../test/vendor/when/when',
node: '../test/vendor/when/node',
callbacks: '../test/vendor/when/callbacks'
}
});
requirejs(['pvcf'], function run(pvcf) {
var definitions = pvcf.definitions;
var ViewDefinition = definitions.ViewDefinition;
var PatternDefinition = definitions.PatternDefinition;
var PatternManager = pvcf.PatternManager;
var TabManager = pvcf.TabManager;
// ### View list ###
// # Events #
var addEvent = new ViewDefinition('test/templates/addEvent.html', ['test/modules/addEvent.js'], true);
var showEvent = new ViewDefinition('test/templates/showEvent.html', ['test/modules/showEvent.js'], true);
// # Pattern manager #
var patternManager = new PatternManager();
// ### Pattern list ###
patternManager.addPattern(new PatternDefinition('event/add', addEvent));
patternManager.addPattern(new PatternDefinition('event/show/:id', showEvent));
// # Tab manager #
var tabManager = new TabManager();
document.body.appendChild(tabManager.getContainerElement());
function main() {
console.log('Appliaction started!');
}
// window.onload actions:
var startTab = tabManager.openTab();
startTab.openView(addEvent).done(function () {
tabManager.closeTab(startTab);
});
tabManager.getContainerElement().appendChild(startTab.getContainerElement());
main();
// window.hashchange actions:
window.addEventListener('hashchange', main);
}); | requirejs.config({
baseUrl: 'test',
paths: {
pvcf: '../../lib/pvcf',
when: '../test/vendor/when/when',
node: '../test/vendor/when/node',
callbacks: '../test/vendor/when/callbacks'
}
});
requirejs(['pvcf'], function run(pvcf) {
var definitions = pvcf.definitions;
+
var ViewDefinition = definitions.ViewDefinition;
+ var PatternDefinition = definitions.PatternDefinition;
+
+ var PatternManager = pvcf.PatternManager;
var TabManager = pvcf.TabManager;
- // ### View list. ###
? -
+ // ### View list ###
// # Events #
var addEvent = new ViewDefinition('test/templates/addEvent.html', ['test/modules/addEvent.js'], true);
+ var showEvent = new ViewDefinition('test/templates/showEvent.html', ['test/modules/showEvent.js'], true);
+
+
+ // # Pattern manager #
+
+ var patternManager = new PatternManager();
+
+ // ### Pattern list ###
+
+ patternManager.addPattern(new PatternDefinition('event/add', addEvent));
+ patternManager.addPattern(new PatternDefinition('event/show/:id', showEvent));
// # Tab manager #
var tabManager = new TabManager();
+ document.body.appendChild(tabManager.getContainerElement());
+
+
+ function main() {
+ console.log('Appliaction started!');
+ }
+
+
+ // window.onload actions:
var startTab = tabManager.openTab();
startTab.openView(addEvent).done(function () {
tabManager.closeTab(startTab);
});
tabManager.getContainerElement().appendChild(startTab.getContainerElement());
- document.body.appendChild(tabManager.getContainerElement());
+ main();
+
+
+ // window.hashchange actions:
+ window.addEventListener('hashchange', main);
}); | 32 | 0.914286 | 30 | 2 |
ef60b1392ca7817a6f5bce8f17e445df3036073f | frigg/templates/react-base.html | frigg/templates/react-base.html | {% load pipeline %}
<!DOCTYPE html>
<html manifest="/app.manifest">
<head>
<title>Frigg CI</title>
<meta charset='utf-8' />
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta name='description' content='' />
<meta name='viewport' content='width=device-width, initial-scale=1' />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Lato:700,400,300,100" rel="stylesheet" type="text/css">
<script src="//cdn.ravenjs.com/1.1.15/jquery,native/raven.min.js"></script>
<link href="/static/react-version.css" rel="stylesheet" />
{% stylesheet 'react' %}
</head>
<body>
<div id="content"></div>
{% if user %}
<script>
window.user = JSON.parse('{{ user|safe }}');
</script>
{% endif %}
{% javascript 'react' %}
{% if sentry_dsn %}
<script>
Raven.config('{{ sentry_dsn }}', {
release: '0.1.0'
}).install();
</script>
{% endif %}
</body>
</html>
| {% load pipeline %}
<!DOCTYPE html>
<html>
<head>
<title>Frigg CI</title>
<meta charset='utf-8' />
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta name='description' content='' />
<meta name='viewport' content='width=device-width, initial-scale=1' />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Lato:700,400,300,100" rel="stylesheet" type="text/css">
<script src="//cdn.ravenjs.com/1.1.15/jquery,native/raven.min.js"></script>
<link href="/static/react-version.css" rel="stylesheet" />
{% stylesheet 'react' %}
</head>
<body>
<div id="content"></div>
{% if user %}
<script>
window.user = JSON.parse('{{ user|safe }}');
</script>
{% endif %}
{% javascript 'react' %}
{% if sentry_dsn %}
<script>
Raven.config('{{ sentry_dsn }}', {
release: '0.1.0'
}).install();
</script>
{% endif %}
</body>
</html>
| Remove cache manifest reference in template | Remove cache manifest reference in template
Manifesto is broken, and this will have to do until we can fix the manifest generation. | HTML | mit | frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq | html | ## Code Before:
{% load pipeline %}
<!DOCTYPE html>
<html manifest="/app.manifest">
<head>
<title>Frigg CI</title>
<meta charset='utf-8' />
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta name='description' content='' />
<meta name='viewport' content='width=device-width, initial-scale=1' />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Lato:700,400,300,100" rel="stylesheet" type="text/css">
<script src="//cdn.ravenjs.com/1.1.15/jquery,native/raven.min.js"></script>
<link href="/static/react-version.css" rel="stylesheet" />
{% stylesheet 'react' %}
</head>
<body>
<div id="content"></div>
{% if user %}
<script>
window.user = JSON.parse('{{ user|safe }}');
</script>
{% endif %}
{% javascript 'react' %}
{% if sentry_dsn %}
<script>
Raven.config('{{ sentry_dsn }}', {
release: '0.1.0'
}).install();
</script>
{% endif %}
</body>
</html>
## Instruction:
Remove cache manifest reference in template
Manifesto is broken, and this will have to do until we can fix the manifest generation.
## Code After:
{% load pipeline %}
<!DOCTYPE html>
<html>
<head>
<title>Frigg CI</title>
<meta charset='utf-8' />
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta name='description' content='' />
<meta name='viewport' content='width=device-width, initial-scale=1' />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Lato:700,400,300,100" rel="stylesheet" type="text/css">
<script src="//cdn.ravenjs.com/1.1.15/jquery,native/raven.min.js"></script>
<link href="/static/react-version.css" rel="stylesheet" />
{% stylesheet 'react' %}
</head>
<body>
<div id="content"></div>
{% if user %}
<script>
window.user = JSON.parse('{{ user|safe }}');
</script>
{% endif %}
{% javascript 'react' %}
{% if sentry_dsn %}
<script>
Raven.config('{{ sentry_dsn }}', {
release: '0.1.0'
}).install();
</script>
{% endif %}
</body>
</html>
| {% load pipeline %}
<!DOCTYPE html>
- <html manifest="/app.manifest">
+ <html>
<head>
<title>Frigg CI</title>
<meta charset='utf-8' />
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta name='description' content='' />
<meta name='viewport' content='width=device-width, initial-scale=1' />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Lato:700,400,300,100" rel="stylesheet" type="text/css">
<script src="//cdn.ravenjs.com/1.1.15/jquery,native/raven.min.js"></script>
<link href="/static/react-version.css" rel="stylesheet" />
{% stylesheet 'react' %}
</head>
<body>
<div id="content"></div>
{% if user %}
<script>
window.user = JSON.parse('{{ user|safe }}');
</script>
{% endif %}
{% javascript 'react' %}
{% if sentry_dsn %}
<script>
Raven.config('{{ sentry_dsn }}', {
release: '0.1.0'
}).install();
</script>
{% endif %}
</body>
</html> | 2 | 0.0625 | 1 | 1 |
83ec6f83821c64396fb7a69b0a1223a68ef01443 | conf/api/find.ini | conf/api/find.ini | api.config.find.permitted_collections[]=lines
api.config.find.permitted_collections[]=rates
api.config.find.permitted_collections[]=plans
api.config.find.permitted_collections[]=subscribers
api.config.find.permitted_collections[]=log
api.config.find.permitted_collections[]=services
api.config.find.permitted_collections[]=users
api.config.find.permitted_collections[]=prepaidincludes
api.config.find.permitted_collections[]=balances
api.config.find.permitted_collections[]=queue
api.config.find.default_page_size=100
api.config.find.maximum_page_size=1000
api.config.find.timeout=60000 | api.config.find.permitted_collections[]=lines
api.config.find.permitted_collections[]=rates
api.config.find.permitted_collections[]=plans
api.config.find.permitted_collections[]=subscribers
api.config.find.permitted_collections[]=log
api.config.find.permitted_collections[]=services
api.config.find.permitted_collections[]=users
api.config.find.permitted_collections[]=prepaidincludes
api.config.find.permitted_collections[]=balances
api.config.find.permitted_collections[]=queue
api.config.find.permitted_collections[]=archive
api.config.find.default_page_size=100
api.config.find.maximum_page_size=1000
api.config.find.timeout=60000 | Allow "archive" collection in Find API | Allow "archive" collection in Find API | INI | agpl-3.0 | BillRun/system,BillRun/system,BillRun/system,BillRun/system | ini | ## Code Before:
api.config.find.permitted_collections[]=lines
api.config.find.permitted_collections[]=rates
api.config.find.permitted_collections[]=plans
api.config.find.permitted_collections[]=subscribers
api.config.find.permitted_collections[]=log
api.config.find.permitted_collections[]=services
api.config.find.permitted_collections[]=users
api.config.find.permitted_collections[]=prepaidincludes
api.config.find.permitted_collections[]=balances
api.config.find.permitted_collections[]=queue
api.config.find.default_page_size=100
api.config.find.maximum_page_size=1000
api.config.find.timeout=60000
## Instruction:
Allow "archive" collection in Find API
## Code After:
api.config.find.permitted_collections[]=lines
api.config.find.permitted_collections[]=rates
api.config.find.permitted_collections[]=plans
api.config.find.permitted_collections[]=subscribers
api.config.find.permitted_collections[]=log
api.config.find.permitted_collections[]=services
api.config.find.permitted_collections[]=users
api.config.find.permitted_collections[]=prepaidincludes
api.config.find.permitted_collections[]=balances
api.config.find.permitted_collections[]=queue
api.config.find.permitted_collections[]=archive
api.config.find.default_page_size=100
api.config.find.maximum_page_size=1000
api.config.find.timeout=60000 | api.config.find.permitted_collections[]=lines
api.config.find.permitted_collections[]=rates
api.config.find.permitted_collections[]=plans
api.config.find.permitted_collections[]=subscribers
api.config.find.permitted_collections[]=log
api.config.find.permitted_collections[]=services
api.config.find.permitted_collections[]=users
api.config.find.permitted_collections[]=prepaidincludes
api.config.find.permitted_collections[]=balances
api.config.find.permitted_collections[]=queue
+ api.config.find.permitted_collections[]=archive
api.config.find.default_page_size=100
api.config.find.maximum_page_size=1000
api.config.find.timeout=60000 | 1 | 0.076923 | 1 | 0 |
b9d99d1388ad5d466de831a2e52179c2e56a424e | libs/bootstrap.php | libs/bootstrap.php | <?php
// Loaded in the project itself
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
return require_once __DIR__ . '/../vendor/autoload.php';
}
// Loaded as a dependency
if (file_exists(__DIR__ . '/../../../../autoload.php')) {
return require_once __DIR__ . '/../../../../autoload.php';
}
// Loaded in the project itself, when vendor isn't installed
if (file_exists(__DIR__ . '/../daux.phar')) {
define('PHAR_DIR', __DIR__ . '/..');
return require_once 'phar://' . __DIR__ . '/../daux.phar/vendor/autoload.php';
}
throw new Exception('Impossible to load Daux, missing vendor/ or daux.phar');
| <?php
// Loaded as a dependency
if (file_exists(__DIR__ . '/../../../autoload.php')) {
return require_once __DIR__ . '/../../../autoload.php';
}
// Loaded in the project itself
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
return require_once __DIR__ . '/../vendor/autoload.php';
}
// Loaded in the project itself, when vendor isn't installed
if (file_exists(__DIR__ . '/../daux.phar')) {
define('PHAR_DIR', __DIR__ . '/..');
return require_once 'phar://' . __DIR__ . '/../daux.phar/vendor/autoload.php';
}
throw new Exception('Impossible to load Daux, missing vendor/ or daux.phar');
| Fix autoloading and prioritize getting it as a dependency | Fix autoloading and prioritize getting it as a dependency | PHP | mit | dauxio/daux.io,dauxio/daux.io,dauxio/daux.io | php | ## Code Before:
<?php
// Loaded in the project itself
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
return require_once __DIR__ . '/../vendor/autoload.php';
}
// Loaded as a dependency
if (file_exists(__DIR__ . '/../../../../autoload.php')) {
return require_once __DIR__ . '/../../../../autoload.php';
}
// Loaded in the project itself, when vendor isn't installed
if (file_exists(__DIR__ . '/../daux.phar')) {
define('PHAR_DIR', __DIR__ . '/..');
return require_once 'phar://' . __DIR__ . '/../daux.phar/vendor/autoload.php';
}
throw new Exception('Impossible to load Daux, missing vendor/ or daux.phar');
## Instruction:
Fix autoloading and prioritize getting it as a dependency
## Code After:
<?php
// Loaded as a dependency
if (file_exists(__DIR__ . '/../../../autoload.php')) {
return require_once __DIR__ . '/../../../autoload.php';
}
// Loaded in the project itself
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
return require_once __DIR__ . '/../vendor/autoload.php';
}
// Loaded in the project itself, when vendor isn't installed
if (file_exists(__DIR__ . '/../daux.phar')) {
define('PHAR_DIR', __DIR__ . '/..');
return require_once 'phar://' . __DIR__ . '/../daux.phar/vendor/autoload.php';
}
throw new Exception('Impossible to load Daux, missing vendor/ or daux.phar');
| <?php
+
+ // Loaded as a dependency
+ if (file_exists(__DIR__ . '/../../../autoload.php')) {
+ return require_once __DIR__ . '/../../../autoload.php';
+ }
// Loaded in the project itself
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
return require_once __DIR__ . '/../vendor/autoload.php';
- }
-
- // Loaded as a dependency
- if (file_exists(__DIR__ . '/../../../../autoload.php')) {
- return require_once __DIR__ . '/../../../../autoload.php';
}
// Loaded in the project itself, when vendor isn't installed
if (file_exists(__DIR__ . '/../daux.phar')) {
define('PHAR_DIR', __DIR__ . '/..');
return require_once 'phar://' . __DIR__ . '/../daux.phar/vendor/autoload.php';
}
throw new Exception('Impossible to load Daux, missing vendor/ or daux.phar'); | 10 | 0.5 | 5 | 5 |
cbced12d9e2cfe66795d7862e15ee15343daa4a6 | .travis.yml | .travis.yml | language: objective-c
osx_image: xcode9.1
script:
- swift test
- set -o pipefail
- xcodebuild -scheme ColorCode test | xcpretty
after_success:
- bash <(curl -s https://codecov.io/bash)
| language: objective-c
osx_image: xcode9.1
script:
- swift test
- set -o pipefail
- xcodebuild -scheme ColorCode test | xcpretty
- pod lib lint --quick
after_success:
- bash <(curl -s https://codecov.io/bash)
| Add pod lint to Travis CI | Add pod lint to Travis CI
| YAML | mit | 1024jp/WFColorCode | yaml | ## Code Before:
language: objective-c
osx_image: xcode9.1
script:
- swift test
- set -o pipefail
- xcodebuild -scheme ColorCode test | xcpretty
after_success:
- bash <(curl -s https://codecov.io/bash)
## Instruction:
Add pod lint to Travis CI
## Code After:
language: objective-c
osx_image: xcode9.1
script:
- swift test
- set -o pipefail
- xcodebuild -scheme ColorCode test | xcpretty
- pod lib lint --quick
after_success:
- bash <(curl -s https://codecov.io/bash)
| language: objective-c
osx_image: xcode9.1
script:
- swift test
- set -o pipefail
- xcodebuild -scheme ColorCode test | xcpretty
+ - pod lib lint --quick
after_success:
- bash <(curl -s https://codecov.io/bash) | 1 | 0.111111 | 1 | 0 |
f7f3d7aa972770eb042defd156517fd398581182 | index.md | index.md | ---
layout: page
title: About Me
tags: [about]
---

I am a Ph.D. candidate at [MILA](https://mila.umontreal.ca/) in Université de
Montréal. I am co-advised by
[Yoshua Bengio](https://mila.umontreal.ca/en/person/bengio-yoshua/) and
[Aaron Courville](https://mila.umontreal.ca/en/person/aaron-courville/).
I am interested in generative modelling applied to computer vision.
| ---
layout: page
permalink: /index.html
title: About Me
tags: [about]
---

I am a Ph.D. candidate at [MILA](https://mila.umontreal.ca/) in Université de
Montréal. I am co-advised by
[Yoshua Bengio](https://mila.umontreal.ca/en/person/bengio-yoshua/) and
[Aaron Courville](https://mila.umontreal.ca/en/person/aaron-courville/).
I am interested in generative modelling applied to computer vision.
| Fix page not found, second attempt | Fix page not found, second attempt
| Markdown | mit | vdumoulin/vdumoulin.github.io,vdumoulin/vdumoulin.github.io,vdumoulin/vdumoulin.github.io | markdown | ## Code Before:
---
layout: page
title: About Me
tags: [about]
---

I am a Ph.D. candidate at [MILA](https://mila.umontreal.ca/) in Université de
Montréal. I am co-advised by
[Yoshua Bengio](https://mila.umontreal.ca/en/person/bengio-yoshua/) and
[Aaron Courville](https://mila.umontreal.ca/en/person/aaron-courville/).
I am interested in generative modelling applied to computer vision.
## Instruction:
Fix page not found, second attempt
## Code After:
---
layout: page
permalink: /index.html
title: About Me
tags: [about]
---

I am a Ph.D. candidate at [MILA](https://mila.umontreal.ca/) in Université de
Montréal. I am co-advised by
[Yoshua Bengio](https://mila.umontreal.ca/en/person/bengio-yoshua/) and
[Aaron Courville](https://mila.umontreal.ca/en/person/aaron-courville/).
I am interested in generative modelling applied to computer vision.
| ---
layout: page
+ permalink: /index.html
title: About Me
tags: [about]
---

I am a Ph.D. candidate at [MILA](https://mila.umontreal.ca/) in Université de
Montréal. I am co-advised by
[Yoshua Bengio](https://mila.umontreal.ca/en/person/bengio-yoshua/) and
[Aaron Courville](https://mila.umontreal.ca/en/person/aaron-courville/).
I am interested in generative modelling applied to computer vision. | 1 | 0.071429 | 1 | 0 |
a48783fbe5726b3bcedd1edd35158775163db5fe | app/admin/feedback.rb | app/admin/feedback.rb | if defined?(ActiveAdmin) and Contact.config.admin_enabled.include?(:feedback)
ActiveAdmin.register Contact::Feedback do
menu :label => "Feedback", :parent => "Contact"
index :title => "Feedback" do
column :first_name
column :last_name
column :email
column :created_at
column :sent_at
default_actions
end
form do |f|
f.inputs "Feedback" do
f.input :first_name
f.input :last_name
f.input :email
f.input :message
f.input :newsletter_opt_in
f.input :created_at, :as => :datepicker
f.input :sent_at, :as => :datepicker
end
f.actions
end
filter :first_name
filter :last_name
filter :email
filter :created_at
filter :sent_at
end
end
| if defined?(ActiveAdmin) and Contact.config.admin_enabled.include?(:feedback)
ActiveAdmin.register Contact::Feedback do
menu :label => "Feedback", :parent => "Contact"
index :title => "Feedback" do
column :first_name
column :last_name
column :email
column :created_at
column :sent_at
default_actions
end
form do |f|
f.inputs "Feedback" do
f.input :first_name
f.input :last_name
f.input :email
f.input :message
f.input :newsletter_opt_in
f.input :created_at, :as => :datepicker
f.input :sent_at, :as => :datepicker
f.input :image, :hint => f.template.image_tag(f.object.image.url(:thumb))
end
f.actions
end
filter :first_name
filter :last_name
filter :email
filter :created_at
filter :sent_at
end
end
| Add image to Active Admin contact form | Add image to Active Admin contact form
| Ruby | mit | madetech/made-contact-engine,madetech/made-contact-engine,madetech/made-contact-engine | ruby | ## Code Before:
if defined?(ActiveAdmin) and Contact.config.admin_enabled.include?(:feedback)
ActiveAdmin.register Contact::Feedback do
menu :label => "Feedback", :parent => "Contact"
index :title => "Feedback" do
column :first_name
column :last_name
column :email
column :created_at
column :sent_at
default_actions
end
form do |f|
f.inputs "Feedback" do
f.input :first_name
f.input :last_name
f.input :email
f.input :message
f.input :newsletter_opt_in
f.input :created_at, :as => :datepicker
f.input :sent_at, :as => :datepicker
end
f.actions
end
filter :first_name
filter :last_name
filter :email
filter :created_at
filter :sent_at
end
end
## Instruction:
Add image to Active Admin contact form
## Code After:
if defined?(ActiveAdmin) and Contact.config.admin_enabled.include?(:feedback)
ActiveAdmin.register Contact::Feedback do
menu :label => "Feedback", :parent => "Contact"
index :title => "Feedback" do
column :first_name
column :last_name
column :email
column :created_at
column :sent_at
default_actions
end
form do |f|
f.inputs "Feedback" do
f.input :first_name
f.input :last_name
f.input :email
f.input :message
f.input :newsletter_opt_in
f.input :created_at, :as => :datepicker
f.input :sent_at, :as => :datepicker
f.input :image, :hint => f.template.image_tag(f.object.image.url(:thumb))
end
f.actions
end
filter :first_name
filter :last_name
filter :email
filter :created_at
filter :sent_at
end
end
| if defined?(ActiveAdmin) and Contact.config.admin_enabled.include?(:feedback)
ActiveAdmin.register Contact::Feedback do
menu :label => "Feedback", :parent => "Contact"
index :title => "Feedback" do
column :first_name
column :last_name
column :email
column :created_at
column :sent_at
default_actions
end
form do |f|
f.inputs "Feedback" do
f.input :first_name
f.input :last_name
f.input :email
f.input :message
f.input :newsletter_opt_in
f.input :created_at, :as => :datepicker
f.input :sent_at, :as => :datepicker
+ f.input :image, :hint => f.template.image_tag(f.object.image.url(:thumb))
end
f.actions
end
filter :first_name
filter :last_name
filter :email
filter :created_at
filter :sent_at
end
end | 1 | 0.028571 | 1 | 0 |
226798a3a09f635afddd48455ee69a9108f01abc | packages/hz/hzenity.yaml | packages/hz/hzenity.yaml | homepage: https://github.com/emilaxelsson/hzenity
changelog-type: ''
hash: f5fd749bc184a0fa1002b586f7b08e9dc3fa5bb224749e78ca067cd4c60ed8df
test-bench-deps: {}
maintainer: 78emil@gmail.com
synopsis: Haskell interface to Zenity dialogs
changelog: ''
basic-deps:
process-extras: <0.8
base: <5
time: <1.10
text: <1.3
process: <1.7
data-default: <0.8
containers: <0.7
all-versions:
- '0.1'
- '0.2'
- 0.2.1
- '0.3'
- '0.4'
author: Emil Axelsson
latest: '0.4'
description-type: haddock
description: |-
This is a Haskell wrapper around the
<https://en.wikipedia.org/wiki/Zenity Zenity> dialog
program.
Examples can be found in the <https://github.com/emilaxelsson/hzenity/tree/master/examples examples/>
directory.
license-name: BSD-3-Clause
| homepage: https://github.com/emilaxelsson/hzenity
changelog-type: ''
hash: 5bf5c289a9c25b9fa07471e32409020d784f2cba7bc6eb23e204b5f1b6fa6785
test-bench-deps: {}
maintainer: 78emil@gmail.com
synopsis: Haskell interface to Zenity dialogs
changelog: ''
basic-deps:
process-extras: <0.8
base: <5
time: <1.12
text: <1.3
process: <1.7
data-default: <0.8
containers: <0.7
all-versions:
- '0.1'
- '0.2'
- 0.2.1
- '0.3'
- '0.4'
author: Emil Axelsson
latest: '0.4'
description-type: haddock
description: |-
This is a Haskell wrapper around the
<https://en.wikipedia.org/wiki/Zenity Zenity> dialog
program.
Examples can be found in the <https://github.com/emilaxelsson/hzenity/tree/master/examples examples/>
directory.
license-name: BSD-3-Clause
| Update from Hackage at 2021-08-27T08:28:29Z | Update from Hackage at 2021-08-27T08:28:29Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/emilaxelsson/hzenity
changelog-type: ''
hash: f5fd749bc184a0fa1002b586f7b08e9dc3fa5bb224749e78ca067cd4c60ed8df
test-bench-deps: {}
maintainer: 78emil@gmail.com
synopsis: Haskell interface to Zenity dialogs
changelog: ''
basic-deps:
process-extras: <0.8
base: <5
time: <1.10
text: <1.3
process: <1.7
data-default: <0.8
containers: <0.7
all-versions:
- '0.1'
- '0.2'
- 0.2.1
- '0.3'
- '0.4'
author: Emil Axelsson
latest: '0.4'
description-type: haddock
description: |-
This is a Haskell wrapper around the
<https://en.wikipedia.org/wiki/Zenity Zenity> dialog
program.
Examples can be found in the <https://github.com/emilaxelsson/hzenity/tree/master/examples examples/>
directory.
license-name: BSD-3-Clause
## Instruction:
Update from Hackage at 2021-08-27T08:28:29Z
## Code After:
homepage: https://github.com/emilaxelsson/hzenity
changelog-type: ''
hash: 5bf5c289a9c25b9fa07471e32409020d784f2cba7bc6eb23e204b5f1b6fa6785
test-bench-deps: {}
maintainer: 78emil@gmail.com
synopsis: Haskell interface to Zenity dialogs
changelog: ''
basic-deps:
process-extras: <0.8
base: <5
time: <1.12
text: <1.3
process: <1.7
data-default: <0.8
containers: <0.7
all-versions:
- '0.1'
- '0.2'
- 0.2.1
- '0.3'
- '0.4'
author: Emil Axelsson
latest: '0.4'
description-type: haddock
description: |-
This is a Haskell wrapper around the
<https://en.wikipedia.org/wiki/Zenity Zenity> dialog
program.
Examples can be found in the <https://github.com/emilaxelsson/hzenity/tree/master/examples examples/>
directory.
license-name: BSD-3-Clause
| homepage: https://github.com/emilaxelsson/hzenity
changelog-type: ''
- hash: f5fd749bc184a0fa1002b586f7b08e9dc3fa5bb224749e78ca067cd4c60ed8df
+ hash: 5bf5c289a9c25b9fa07471e32409020d784f2cba7bc6eb23e204b5f1b6fa6785
test-bench-deps: {}
maintainer: 78emil@gmail.com
synopsis: Haskell interface to Zenity dialogs
changelog: ''
basic-deps:
process-extras: <0.8
base: <5
- time: <1.10
? ^
+ time: <1.12
? ^
text: <1.3
process: <1.7
data-default: <0.8
containers: <0.7
all-versions:
- '0.1'
- '0.2'
- 0.2.1
- '0.3'
- '0.4'
author: Emil Axelsson
latest: '0.4'
description-type: haddock
description: |-
This is a Haskell wrapper around the
<https://en.wikipedia.org/wiki/Zenity Zenity> dialog
program.
Examples can be found in the <https://github.com/emilaxelsson/hzenity/tree/master/examples examples/>
directory.
license-name: BSD-3-Clause | 4 | 0.125 | 2 | 2 |
39a40e11377a6af5de6aa35566ea0ee706b0b137 | src/Pippin/IPNParser.php | src/Pippin/IPNParser.php | <?php
namespace Pippin;
use Pippin\IPN;
final class IPNParser {
public function parse($IPNString) {
$IPNData = [];
$pairs = explode('&', $IPNString);
foreach ($pairs as $pair) {
$keyValue = explode('=', $pair);
if (count($keyValue) == 2) {
$IPNData[urldecode($keyValue[0])] = urldecode($keyValue[1]);
}
}
$transactions = TransactionFactory::transactionsFromIPNData($IPNData);
return new IPN($transactions, $IPNData);
}
}
| <?php
namespace Pippin;
use Pippin\IPN;
final class IPNParser {
public function parse($IPNString) {
$IPNData = [];
$pairs = explode('&', $IPNString);
foreach ($pairs as $pair) {
$keyValue = explode('=', $pair);
if (count($keyValue) == 2) {
$IPNData[urldecode($keyValue[0])] = urldecode($keyValue[1]);
}
}
if (array_key_exists('charset', $IPNData) && is_string($IPNData['charset'])) {
$charset = $IPNData['charset'];
foreach ($IPNData as $key => $value) {
$IPNData[$key] = mb_convert_encoding($value, 'utf-8', $charset);
}
}
$transactions = TransactionFactory::transactionsFromIPNData($IPNData);
return new IPN($transactions, $IPNData);
}
}
| Convert IPNs to UTF-8 when parsing. | Convert IPNs to UTF-8 when parsing.
| PHP | mit | grantjbutler/pippin | php | ## Code Before:
<?php
namespace Pippin;
use Pippin\IPN;
final class IPNParser {
public function parse($IPNString) {
$IPNData = [];
$pairs = explode('&', $IPNString);
foreach ($pairs as $pair) {
$keyValue = explode('=', $pair);
if (count($keyValue) == 2) {
$IPNData[urldecode($keyValue[0])] = urldecode($keyValue[1]);
}
}
$transactions = TransactionFactory::transactionsFromIPNData($IPNData);
return new IPN($transactions, $IPNData);
}
}
## Instruction:
Convert IPNs to UTF-8 when parsing.
## Code After:
<?php
namespace Pippin;
use Pippin\IPN;
final class IPNParser {
public function parse($IPNString) {
$IPNData = [];
$pairs = explode('&', $IPNString);
foreach ($pairs as $pair) {
$keyValue = explode('=', $pair);
if (count($keyValue) == 2) {
$IPNData[urldecode($keyValue[0])] = urldecode($keyValue[1]);
}
}
if (array_key_exists('charset', $IPNData) && is_string($IPNData['charset'])) {
$charset = $IPNData['charset'];
foreach ($IPNData as $key => $value) {
$IPNData[$key] = mb_convert_encoding($value, 'utf-8', $charset);
}
}
$transactions = TransactionFactory::transactionsFromIPNData($IPNData);
return new IPN($transactions, $IPNData);
}
}
| <?php
namespace Pippin;
use Pippin\IPN;
final class IPNParser {
public function parse($IPNString) {
$IPNData = [];
$pairs = explode('&', $IPNString);
foreach ($pairs as $pair) {
$keyValue = explode('=', $pair);
if (count($keyValue) == 2) {
$IPNData[urldecode($keyValue[0])] = urldecode($keyValue[1]);
}
}
+ if (array_key_exists('charset', $IPNData) && is_string($IPNData['charset'])) {
+ $charset = $IPNData['charset'];
+ foreach ($IPNData as $key => $value) {
+ $IPNData[$key] = mb_convert_encoding($value, 'utf-8', $charset);
+ }
+ }
+
$transactions = TransactionFactory::transactionsFromIPNData($IPNData);
return new IPN($transactions, $IPNData);
}
} | 7 | 0.291667 | 7 | 0 |
f7cd0e231e1f56f6c8ea1b76c4b3b766fff1e92c | middleman-core/lib/middleman-core/templates/extension/lib/lib.rb | middleman-core/lib/middleman-core/templates/extension/lib/lib.rb | require "middleman-core"
# Extension namespace
module MyExtension
class << self
# Called when user `activate`s your extension
def registered(app, options={})
# Include class methods
# app.extend ClassMethods
# Include instance methods
# app.send :include, InstanceMethods
app.after_configuration do
# Do something
end
end
alias :included :registered
end
# module ClassMethods
# def a_class_method
# end
# end
# module InstanceMethods
# def an_instance_method
# end
# end
end
# Register extensions which can be activated
# Make sure we have the version of Middleman we expect
# ::Middleman::Extensions.register(:extension_name) do
#
# # Return the extension module
# ::MyExtension
#
# end
| require "middleman-core"
# Extension namespace
module MyExtension < Middleman::Extension
option :my_option, "default", "An example option"
def initialize(app, options_hash={})
# Call super to build options from the options_hash
super
# Require libraries only when activated
# require 'necessary/library'
# Include helpers or instance methods for the Middleman app
# app.send :include, Helpers
# set up your extension
# puts options.my_option
end
def after_configuration
# Do something
end
# module Helpers
# def a_helper
# end
# end
end
# Register extensions which can be activated
# Make sure we have the version of Middleman we expect
# ::Middleman::Extensions.register(:extension_name) do
#
# # Return the extension class
# ::MyExtension
#
# end
| Update the extension template for the new Extension class. | Update the extension template for the new Extension class.
| Ruby | mit | ryanmark/middleman,Alx-l/middleman,williamcoates/middleman,blech75/middleman,ad-dc/middleman,nakamuraagatha/middleman,flossy/middleman,MetaAshley/middleman,bradgessler/middleman,wangyue-ramy/middleman,sigmike/middleman,datapimp/middleman,cnbin/middleman,cyberid41/middleman,ne-sachirou/middleman,cyberid41/middleman,kenshinji/middleman,williamcoates/middleman,ryanmark/middleman,ryanmark/middleman,blech75/middleman,jenniferyien/middleman,loayyoussef/middleman,bhollis/middleman,williamcoates/middleman,dg-ratiodata/middleman,pivotal-cf/middleman,mojavelinux/middleman,mvastola/middleman,loayyoussef/middleman,joost/middleman,datapimp/middleman,bradgessler/middleman,sigmike/middleman,jsdalton/middleman,bitnami/middleman,pivotal-cf/middleman,ashfurrow/middleman,ad-dc/middleman,bradgessler/middleman,flossy/middleman,ne-sachirou/middleman,mojavelinux/middleman,algolia/middleman,MetaAshley/middleman,cyberid41/middleman,bhollis/middleman,jsdalton/middleman,puyo/middleman,pivotal-cf/middleman,Alx-l/middleman,cnbin/middleman,datapimp/middleman,loayyoussef/middleman,datapimp/middleman,MetaAshley/middleman,Alx-l/middleman,joost/middleman,blech75/middleman,joost/middleman,ashfurrow/middleman,cnbin/middleman,joost/middleman,algolia/middleman,algolia/middleman,dg-ratiodata/middleman,cyberid41/middleman,Alx-l/middleman,jsdalton/middleman,Alx-l/middleman,puyo/middleman,flossy/middleman,blech75/middleman,wangyue-ramy/middleman,wangyue-ramy/middleman,bhollis/middleman,flossy/middleman,ashfurrow/middleman,mojavelinux/middleman,bitnami/middleman,jenniferyien/middleman,Alx-l/middleman,middleman/middleman,mvastola/middleman,mvastola/middleman,kenshinji/middleman,ashfurrow/middleman,joost/middleman,algolia/middleman,dg-ratiodata/middleman,pivotal-cf/middleman,loayyoussef/middleman,cnbin/middleman,williamcoates/middleman,cyberid41/middleman,kenshinji/middleman,algolia/middleman,jsdalton/middleman,pivotal-cf/middleman,jsdalton/middleman,wangyue-ramy/middleman,joallard/middleman,puyo/middleman,jsdalton/middleman,jenniferyien/middleman,jenniferyien/middleman,ad-dc/middleman,ad-dc/middleman,nakamuraagatha/middleman,nakamuraagatha/middleman,middleman/middleman,algolia/middleman,ryanmark/middleman,Alx-l/middleman,cnbin/middleman,ne-sachirou/middleman,ashfurrow/middleman,bradgessler/middleman,nakamuraagatha/middleman,sigmike/middleman,MetaAshley/middleman,joallard/middleman,dg-ratiodata/middleman,jenniferyien/middleman,mvastola/middleman,ne-sachirou/middleman,ne-sachirou/middleman,loayyoussef/middleman,datapimp/middleman,kenshinji/middleman,pivotal-cf/middleman,ad-dc/middleman,nakamuraagatha/middleman,ne-sachirou/middleman,middleman/middleman,joallard/middleman,algolia/middleman,blech75/middleman,puyo/middleman,bradgessler/middleman,pivotal-cf/middleman,blech75/middleman,flossy/middleman,wangyue-ramy/middleman,ryanmark/middleman,flossy/middleman,kenshinji/middleman,blech75/middleman,sigmike/middleman,cyberid41/middleman,flossy/middleman,nakamuraagatha/middleman,MetaAshley/middleman,cyberid41/middleman,bhollis/middleman,dg-ratiodata/middleman,ne-sachirou/middleman,kenshinji/middleman,wangyue-ramy/middleman,williamcoates/middleman,ashfurrow/middleman,williamcoates/middleman,bitnami/middleman,cnbin/middleman,jenniferyien/middleman,joallard/middleman,bradgessler/middleman,ad-dc/middleman,bhollis/middleman,sigmike/middleman,loayyoussef/middleman,bitnami/middleman,jsdalton/middleman,williamcoates/middleman,wangyue-ramy/middleman,kenshinji/middleman,ryanmark/middleman,loayyoussef/middleman,cnbin/middleman,MetaAshley/middleman,MetaAshley/middleman,datapimp/middleman,jenniferyien/middleman,middleman/middleman,nakamuraagatha/middleman,bradgessler/middleman,ryanmark/middleman,ad-dc/middleman,ashfurrow/middleman,datapimp/middleman,mojavelinux/middleman,bitnami/middleman | ruby | ## Code Before:
require "middleman-core"
# Extension namespace
module MyExtension
class << self
# Called when user `activate`s your extension
def registered(app, options={})
# Include class methods
# app.extend ClassMethods
# Include instance methods
# app.send :include, InstanceMethods
app.after_configuration do
# Do something
end
end
alias :included :registered
end
# module ClassMethods
# def a_class_method
# end
# end
# module InstanceMethods
# def an_instance_method
# end
# end
end
# Register extensions which can be activated
# Make sure we have the version of Middleman we expect
# ::Middleman::Extensions.register(:extension_name) do
#
# # Return the extension module
# ::MyExtension
#
# end
## Instruction:
Update the extension template for the new Extension class.
## Code After:
require "middleman-core"
# Extension namespace
module MyExtension < Middleman::Extension
option :my_option, "default", "An example option"
def initialize(app, options_hash={})
# Call super to build options from the options_hash
super
# Require libraries only when activated
# require 'necessary/library'
# Include helpers or instance methods for the Middleman app
# app.send :include, Helpers
# set up your extension
# puts options.my_option
end
def after_configuration
# Do something
end
# module Helpers
# def a_helper
# end
# end
end
# Register extensions which can be activated
# Make sure we have the version of Middleman we expect
# ::Middleman::Extensions.register(:extension_name) do
#
# # Return the extension class
# ::MyExtension
#
# end
| require "middleman-core"
# Extension namespace
- module MyExtension
- class << self
+ module MyExtension < Middleman::Extension
+ option :my_option, "default", "An example option"
+ def initialize(app, options_hash={})
+ # Call super to build options from the options_hash
+ super
- # Called when user `activate`s your extension
- def registered(app, options={})
- # Include class methods
- # app.extend ClassMethods
- # Include instance methods
- # app.send :include, InstanceMethods
+ # Require libraries only when activated
+ # require 'necessary/library'
- app.after_configuration do
- # Do something
- end
- end
- alias :included :registered
+ # Include helpers or instance methods for the Middleman app
+ # app.send :include, Helpers
+
+ # set up your extension
+ # puts options.my_option
end
+ def after_configuration
+ # Do something
- # module ClassMethods
- # def a_class_method
- # end
- # end
? --
+ end
- # module InstanceMethods
- # def an_instance_method
+ # module Helpers
+ # def a_helper
# end
# end
end
-
# Register extensions which can be activated
# Make sure we have the version of Middleman we expect
# ::Middleman::Extensions.register(:extension_name) do
#
- # # Return the extension module
? ^^^^ ^
+ # # Return the extension class
? ^ ^^^
# ::MyExtension
#
# end | 39 | 0.928571 | 18 | 21 |
417a681f9bb7224713ba41cc39bf5ed5a59ded58 | lib/rom/mapper/loader.rb | lib/rom/mapper/loader.rb | module ROM
class Mapper
class Loader
include Concord.new(:header, :model), Adamantium
def call(tuple)
header.each_with_object(model.allocate) { |attribute, object|
object.send("#{attribute.name}=", tuple[attribute.tuple_key])
}
end
def identity(tuple)
header.keys.map { |key| tuple[key.tuple_key] }
end
end # AttributeSet
end # Mapper
end # ROM
| module ROM
class Mapper
class Loader
include Concord.new(:header, :model), Adamantium
def call(tuple)
header.each_with_object(model.allocate) { |attribute, object|
object.instance_variable_set("@#{attribute.name}", tuple[attribute.tuple_key])
}
end
def identity(tuple)
header.keys.map { |key| tuple[key.tuple_key] }
end
end # AttributeSet
end # Mapper
end # ROM
| Set ivars instead of calling attr writers | Set ivars instead of calling attr writers
refs #2
| Ruby | mit | kwando/rom,jeremyf/rom,dcarral/rom,rom-rb/rom,rom-rb/rom,pvcarrera/rom,dekz/rom,Snuff/rom,rom-rb/rom,endash/rom,pdswan/rom,cored/rom,vrish88/rom,denyago/rom,pxlpnk/rom | ruby | ## Code Before:
module ROM
class Mapper
class Loader
include Concord.new(:header, :model), Adamantium
def call(tuple)
header.each_with_object(model.allocate) { |attribute, object|
object.send("#{attribute.name}=", tuple[attribute.tuple_key])
}
end
def identity(tuple)
header.keys.map { |key| tuple[key.tuple_key] }
end
end # AttributeSet
end # Mapper
end # ROM
## Instruction:
Set ivars instead of calling attr writers
refs #2
## Code After:
module ROM
class Mapper
class Loader
include Concord.new(:header, :model), Adamantium
def call(tuple)
header.each_with_object(model.allocate) { |attribute, object|
object.instance_variable_set("@#{attribute.name}", tuple[attribute.tuple_key])
}
end
def identity(tuple)
header.keys.map { |key| tuple[key.tuple_key] }
end
end # AttributeSet
end # Mapper
end # ROM
| module ROM
class Mapper
class Loader
include Concord.new(:header, :model), Adamantium
def call(tuple)
header.each_with_object(model.allocate) { |attribute, object|
- object.send("#{attribute.name}=", tuple[attribute.tuple_key])
? ^^ -
+ object.instance_variable_set("@#{attribute.name}", tuple[attribute.tuple_key])
? ++++++++++++++++++ ^ +
}
end
def identity(tuple)
header.keys.map { |key| tuple[key.tuple_key] }
end
end # AttributeSet
end # Mapper
end # ROM | 2 | 0.1 | 1 | 1 |
a7ccc0a72c0dc4673d87877dc1f739df63582aa1 | AV/Development/arrayTreeCON.js | AV/Development/arrayTreeCON.js |
(function ($) {
"use strict";
$(document).ready(init);
// Tree array testing function
function init($) {
createArrayTree();
// createOther();
}
function createArrayTree() {
var jsav = new JSAV("arrayTree");
var tree = new jsav.ds.arraytree(3);
tree.root([1, 1, 1]);
var child1 = tree.root().addChild([2, 2, 2]);
var child2 = tree.root().addChild([3, 3, 3]);
var child3 = tree.root().addChild([4, 4, 4]);
var child4 = tree.root().addChild([5, 5, 5]);
tree.layout();
}
function createOther() {
var jsav = new JSAV("other");
var arr = new jsav.ds.array([1, 2, 3, 4], {element: $('#hello')});
}
}(jQuery));
|
(function ($) {
"use strict";
$(document).ready(init);
// Tree array testing function
function init($) {
createArrayTree();
// createOther();
}
function createArrayTree() {
var jsav = new JSAV("arrayTree");
var tree = new jsav.ds.arraytree();
var n1 = tree.root([1, 1, 1]);
var n2 = n1.addChild([2,2,2]).child(0);
var n3 = n1.addChild([3,3,3,3]).child(1);
var n4 = n1.addChild([4,4,4]).child(2);
var n5 = n1.addChild([5,5,5]).child(3);
var n6 = n2.addChild([6,6,6]).child(0);
var n7 = n2.addChild([7,7,7]).child(1);
var n8 = n2.addChild([8,8,8]).child(2);
var n9 = n2.addChild([9,9,9]).child(3);
n6.value([6, 5, 4]);
n6.value([6, 5, 4, 3]);
n6.edgeToParent().addClass("superclass");
tree.layout();
}
function createOther() {
var jsav = new JSAV("other");
var arr = new jsav.ds.array([1, 2, 3, 4], {element: $('#hello')});
}
}(jQuery));
| Update array tree example for testing | Update array tree example for testing
| JavaScript | mit | hosamshahin/OpenDSA,hosamshahin/OpenDSA,RJFreund/OpenDSA,RJFreund/OpenDSA,hosamshahin/OpenDSA,hosamshahin/OpenDSA,hosamshahin/OpenDSA,RJFreund/OpenDSA,RJFreund/OpenDSA,hosamshahin/OpenDSA,hosamshahin/OpenDSA,RJFreund/OpenDSA,hosamshahin/OpenDSA,hosamshahin/OpenDSA,RJFreund/OpenDSA,RJFreund/OpenDSA,RJFreund/OpenDSA | javascript | ## Code Before:
(function ($) {
"use strict";
$(document).ready(init);
// Tree array testing function
function init($) {
createArrayTree();
// createOther();
}
function createArrayTree() {
var jsav = new JSAV("arrayTree");
var tree = new jsav.ds.arraytree(3);
tree.root([1, 1, 1]);
var child1 = tree.root().addChild([2, 2, 2]);
var child2 = tree.root().addChild([3, 3, 3]);
var child3 = tree.root().addChild([4, 4, 4]);
var child4 = tree.root().addChild([5, 5, 5]);
tree.layout();
}
function createOther() {
var jsav = new JSAV("other");
var arr = new jsav.ds.array([1, 2, 3, 4], {element: $('#hello')});
}
}(jQuery));
## Instruction:
Update array tree example for testing
## Code After:
(function ($) {
"use strict";
$(document).ready(init);
// Tree array testing function
function init($) {
createArrayTree();
// createOther();
}
function createArrayTree() {
var jsav = new JSAV("arrayTree");
var tree = new jsav.ds.arraytree();
var n1 = tree.root([1, 1, 1]);
var n2 = n1.addChild([2,2,2]).child(0);
var n3 = n1.addChild([3,3,3,3]).child(1);
var n4 = n1.addChild([4,4,4]).child(2);
var n5 = n1.addChild([5,5,5]).child(3);
var n6 = n2.addChild([6,6,6]).child(0);
var n7 = n2.addChild([7,7,7]).child(1);
var n8 = n2.addChild([8,8,8]).child(2);
var n9 = n2.addChild([9,9,9]).child(3);
n6.value([6, 5, 4]);
n6.value([6, 5, 4, 3]);
n6.edgeToParent().addClass("superclass");
tree.layout();
}
function createOther() {
var jsav = new JSAV("other");
var arr = new jsav.ds.array([1, 2, 3, 4], {element: $('#hello')});
}
}(jQuery));
|
(function ($) {
"use strict";
$(document).ready(init);
// Tree array testing function
function init($) {
createArrayTree();
// createOther();
}
function createArrayTree() {
var jsav = new JSAV("arrayTree");
- var tree = new jsav.ds.arraytree(3);
? -
+ var tree = new jsav.ds.arraytree();
- tree.root([1, 1, 1]);
+ var n1 = tree.root([1, 1, 1]);
? +++++++++
- var child1 = tree.root().addChild([2, 2, 2]);
- var child2 = tree.root().addChild([3, 3, 3]);
- var child3 = tree.root().addChild([4, 4, 4]);
- var child4 = tree.root().addChild([5, 5, 5]);
+ var n2 = n1.addChild([2,2,2]).child(0);
+ var n3 = n1.addChild([3,3,3,3]).child(1);
+ var n4 = n1.addChild([4,4,4]).child(2);
+ var n5 = n1.addChild([5,5,5]).child(3);
+
+ var n6 = n2.addChild([6,6,6]).child(0);
+ var n7 = n2.addChild([7,7,7]).child(1);
+ var n8 = n2.addChild([8,8,8]).child(2);
+ var n9 = n2.addChild([9,9,9]).child(3);
+
+ n6.value([6, 5, 4]);
+
+ n6.value([6, 5, 4, 3]);
+
+ n6.edgeToParent().addClass("superclass");
tree.layout();
}
function createOther() {
var jsav = new JSAV("other");
var arr = new jsav.ds.array([1, 2, 3, 4], {element: $('#hello')});
}
}(jQuery)); | 23 | 0.766667 | 17 | 6 |
0be47f132f4ad3aec5473834e51d9431b2976fd2 | src/LogTrackerBundle/Resources/config/routing.yml | src/LogTrackerBundle/Resources/config/routing.yml | log_tracker_admin:
path: /
defaults: { _controller: LogTrackerBundle:Admin:index }
requirements:
@siteaccess: admin
log_tracker_admin_logfile_edit:
path: /logfile/{id}
defaults: { _controller: LogTrackerBundle:Admin:logfileEdit, id: null }
requirements:
@siteaccess: admin
log_tracker_admin_logfile_del:
path: /logfile/delete/{id}
defaults: { _controller: LogTrackerBundle:Admin:logfileDelete, id: null }
requirements:
@siteaccess: admin
log_tracker_tool_homepage:
path: /
defaults: { _controller: LogTrackerBundle:Default:index }
options:
class: icon-doc-text
label: LogTracker
log_tracker_chart:
path: /chart/{query}
defaults: { _controller: LogTrackerBundle:Default:chart, query: '*' }
log_tracker_search:
path: /search/{query}/{start}/{rows}
defaults: { _controller: LogTrackerBundle:Default:search, query: '*', start: 0, rows: 10 }
log_tracker_data:
path: /data/{query}/{preventMonth}
defaults: { _controller: LogTrackerBundle:Default:data, query: null, preventMonth: 6 } | log_tracker_admin:
path: /
defaults: { _controller: LogTrackerBundle:Admin:index }
requirements:
@siteaccess: admin
log_tracker_admin_logfile_edit:
path: /logfile/{id}
defaults: { _controller: LogTrackerBundle:Admin:logfileEdit, id: null }
requirements:
@siteaccess: admin
log_tracker_admin_logfile_del:
path: /logfile/delete/{id}
defaults: { _controller: LogTrackerBundle:Admin:logfileDelete, id: null }
requirements:
@siteaccess: admin
log_tracker_tool_homepage:
path: /
defaults: { _controller: LogTrackerBundle:Default:index }
options:
class: icon-doc-text
label: LogTracker
log_tracker_chart:
path: /chart/{query}
defaults: { _controller: LogTrackerBundle:Default:chart, query: '*' }
log_tracker_search:
path: /search/{query}/{start}/{rows}
defaults: { _controller: LogTrackerBundle:Default:search, query: '*', start: 0, rows: 10 }
requirements:
start: "\d+"
rows: "\d+"
log_tracker_data:
path: /data/{query}/{preventMonth}
defaults: { _controller: LogTrackerBundle:Default:data, query: null, preventMonth: 6 }
requirements:
preventMonth: "\d+" | Add requirement to LogTracker routes | Add requirement to LogTracker routes
| YAML | mit | c0ki/asgard,c0ki/asgard,c0ki/asgard | yaml | ## Code Before:
log_tracker_admin:
path: /
defaults: { _controller: LogTrackerBundle:Admin:index }
requirements:
@siteaccess: admin
log_tracker_admin_logfile_edit:
path: /logfile/{id}
defaults: { _controller: LogTrackerBundle:Admin:logfileEdit, id: null }
requirements:
@siteaccess: admin
log_tracker_admin_logfile_del:
path: /logfile/delete/{id}
defaults: { _controller: LogTrackerBundle:Admin:logfileDelete, id: null }
requirements:
@siteaccess: admin
log_tracker_tool_homepage:
path: /
defaults: { _controller: LogTrackerBundle:Default:index }
options:
class: icon-doc-text
label: LogTracker
log_tracker_chart:
path: /chart/{query}
defaults: { _controller: LogTrackerBundle:Default:chart, query: '*' }
log_tracker_search:
path: /search/{query}/{start}/{rows}
defaults: { _controller: LogTrackerBundle:Default:search, query: '*', start: 0, rows: 10 }
log_tracker_data:
path: /data/{query}/{preventMonth}
defaults: { _controller: LogTrackerBundle:Default:data, query: null, preventMonth: 6 }
## Instruction:
Add requirement to LogTracker routes
## Code After:
log_tracker_admin:
path: /
defaults: { _controller: LogTrackerBundle:Admin:index }
requirements:
@siteaccess: admin
log_tracker_admin_logfile_edit:
path: /logfile/{id}
defaults: { _controller: LogTrackerBundle:Admin:logfileEdit, id: null }
requirements:
@siteaccess: admin
log_tracker_admin_logfile_del:
path: /logfile/delete/{id}
defaults: { _controller: LogTrackerBundle:Admin:logfileDelete, id: null }
requirements:
@siteaccess: admin
log_tracker_tool_homepage:
path: /
defaults: { _controller: LogTrackerBundle:Default:index }
options:
class: icon-doc-text
label: LogTracker
log_tracker_chart:
path: /chart/{query}
defaults: { _controller: LogTrackerBundle:Default:chart, query: '*' }
log_tracker_search:
path: /search/{query}/{start}/{rows}
defaults: { _controller: LogTrackerBundle:Default:search, query: '*', start: 0, rows: 10 }
requirements:
start: "\d+"
rows: "\d+"
log_tracker_data:
path: /data/{query}/{preventMonth}
defaults: { _controller: LogTrackerBundle:Default:data, query: null, preventMonth: 6 }
requirements:
preventMonth: "\d+" | log_tracker_admin:
path: /
defaults: { _controller: LogTrackerBundle:Admin:index }
requirements:
@siteaccess: admin
log_tracker_admin_logfile_edit:
path: /logfile/{id}
defaults: { _controller: LogTrackerBundle:Admin:logfileEdit, id: null }
requirements:
@siteaccess: admin
log_tracker_admin_logfile_del:
path: /logfile/delete/{id}
defaults: { _controller: LogTrackerBundle:Admin:logfileDelete, id: null }
requirements:
@siteaccess: admin
log_tracker_tool_homepage:
path: /
defaults: { _controller: LogTrackerBundle:Default:index }
options:
class: icon-doc-text
label: LogTracker
log_tracker_chart:
path: /chart/{query}
defaults: { _controller: LogTrackerBundle:Default:chart, query: '*' }
log_tracker_search:
path: /search/{query}/{start}/{rows}
defaults: { _controller: LogTrackerBundle:Default:search, query: '*', start: 0, rows: 10 }
+ requirements:
+ start: "\d+"
+ rows: "\d+"
log_tracker_data:
path: /data/{query}/{preventMonth}
defaults: { _controller: LogTrackerBundle:Default:data, query: null, preventMonth: 6 }
+ requirements:
+ preventMonth: "\d+" | 5 | 0.138889 | 5 | 0 |
c1dff6850a0d39c39b0c337f4f5473efb77fc075 | tests/utils/test_forms.py | tests/utils/test_forms.py | import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class TestRedirectForm(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.redirect_form = RedirectForm()
self.app_ctx.push()
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()
self.app_ctx.pop()
def test_is_safe_url(self):
with self.app.test_request_context():
self.assertFalse(self.redirect_form.is_safe_url('http://externalsite.com'))
self.assertTrue(self.redirect_form.is_safe_url('http://' + self.app.config[
'SERVER_NAME']))
self.assertTrue(self.redirect_form.is_safe_url('safe_internal_link'))
def test_get_redirect_target(self):
with self.app.test_request_context('/?next=http://externalsite.com'):
self.assertIsNone(self.redirect_form.get_redirect_target())
with self.app.test_request_context('/?next=safe_internal_link'):
self.assertEquals(self.redirect_form.get_redirect_target(), 'safe_internal_link')
| import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class FormTestCase(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()
self.app_ctx.pop()
class TestRedirectForm(FormTestCase):
def setUp(self):
super().setUp()
self.form = RedirectForm()
def test_is_safe_url(self):
with self.app.test_request_context():
self.assertFalse(self.form.is_safe_url('http://externalsite.com'))
self.assertTrue(self.form.is_safe_url('http://' + self.app.config[
'SERVER_NAME']))
self.assertTrue(self.form.is_safe_url('safe_internal_link'))
def test_get_redirect_target(self):
with self.app.test_request_context('/?next=http://externalsite.com'):
self.assertIsNone(self.form.get_redirect_target())
with self.app.test_request_context('/?next=safe_internal_link'):
self.assertEquals(self.form.get_redirect_target(), 'safe_internal_link')
| Move setUp and tearDown methods into general FormTestCase class | Move setUp and tearDown methods into general FormTestCase class
| Python | mit | Encrylize/flask-blogger,Encrylize/flask-blogger,Encrylize/flask-blogger | python | ## Code Before:
import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class TestRedirectForm(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.redirect_form = RedirectForm()
self.app_ctx.push()
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()
self.app_ctx.pop()
def test_is_safe_url(self):
with self.app.test_request_context():
self.assertFalse(self.redirect_form.is_safe_url('http://externalsite.com'))
self.assertTrue(self.redirect_form.is_safe_url('http://' + self.app.config[
'SERVER_NAME']))
self.assertTrue(self.redirect_form.is_safe_url('safe_internal_link'))
def test_get_redirect_target(self):
with self.app.test_request_context('/?next=http://externalsite.com'):
self.assertIsNone(self.redirect_form.get_redirect_target())
with self.app.test_request_context('/?next=safe_internal_link'):
self.assertEquals(self.redirect_form.get_redirect_target(), 'safe_internal_link')
## Instruction:
Move setUp and tearDown methods into general FormTestCase class
## Code After:
import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
class FormTestCase(unittest.TestCase):
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
self.app_ctx.push()
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()
self.app_ctx.pop()
class TestRedirectForm(FormTestCase):
def setUp(self):
super().setUp()
self.form = RedirectForm()
def test_is_safe_url(self):
with self.app.test_request_context():
self.assertFalse(self.form.is_safe_url('http://externalsite.com'))
self.assertTrue(self.form.is_safe_url('http://' + self.app.config[
'SERVER_NAME']))
self.assertTrue(self.form.is_safe_url('safe_internal_link'))
def test_get_redirect_target(self):
with self.app.test_request_context('/?next=http://externalsite.com'):
self.assertIsNone(self.form.get_redirect_target())
with self.app.test_request_context('/?next=safe_internal_link'):
self.assertEquals(self.form.get_redirect_target(), 'safe_internal_link')
| import unittest
from app import create_app, db
from app.utils.forms import RedirectForm
- class TestRedirectForm(unittest.TestCase):
? ^ ----------
+ class FormTestCase(unittest.TestCase):
? ++++ ^^^
def setUp(self):
self.app = create_app('testing')
self.app_ctx = self.app.app_context()
- self.redirect_form = RedirectForm()
self.app_ctx.push()
db.create_all()
def tearDown(self):
db.session.remove()
db.drop_all()
self.app_ctx.pop()
+
+ class TestRedirectForm(FormTestCase):
+ def setUp(self):
+ super().setUp()
+ self.form = RedirectForm()
+
def test_is_safe_url(self):
with self.app.test_request_context():
- self.assertFalse(self.redirect_form.is_safe_url('http://externalsite.com'))
? ---------
+ self.assertFalse(self.form.is_safe_url('http://externalsite.com'))
- self.assertTrue(self.redirect_form.is_safe_url('http://' + self.app.config[
? ---------
+ self.assertTrue(self.form.is_safe_url('http://' + self.app.config[
'SERVER_NAME']))
- self.assertTrue(self.redirect_form.is_safe_url('safe_internal_link'))
? ---------
+ self.assertTrue(self.form.is_safe_url('safe_internal_link'))
def test_get_redirect_target(self):
with self.app.test_request_context('/?next=http://externalsite.com'):
- self.assertIsNone(self.redirect_form.get_redirect_target())
? ---------
+ self.assertIsNone(self.form.get_redirect_target())
with self.app.test_request_context('/?next=safe_internal_link'):
- self.assertEquals(self.redirect_form.get_redirect_target(), 'safe_internal_link')
? ---------
+ self.assertEquals(self.form.get_redirect_target(), 'safe_internal_link') | 19 | 0.59375 | 12 | 7 |
ea4596885ea7e2873b72a5d6653d59c529585305 | src/main/resources/org/sagebionetworks/web/client/widget/entity/tabs/TabViewImpl.ui.xml | src/main/resources/org/sagebionetworks/web/client/widget/entity/tabs/TabViewImpl.ui.xml | <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder
xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
xmlns:bh="urn:import:org.gwtbootstrap3.client.ui.html"
>
<bh:Div>
<b:ListItem
ui:field="tabListItem"
addStyleNames="entity-tab"
visible="false"
>
<b:Anchor
ui:field="tabItem"
addStyleNames="text-align-center link no-background"
tabIndex="-1"
/>
</b:ListItem>
<b:TabPane
ui:field="tabPane"
active="true"
addStyleNames="row tab-background"
>
<bh:Div
ui:field="contentDiv"
addStyleNames="margin-left-15 margin-right-15"
/>
</b:TabPane>
</bh:Div>
</ui:UiBinder>
| <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder
xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
xmlns:bh="urn:import:org.gwtbootstrap3.client.ui.html"
>
<bh:Div>
<b:ListItem
ui:field="tabListItem"
addStyleNames="entity-tab"
visible="false"
>
<b:Anchor
ui:field="tabItem"
addStyleNames="text-align-center link no-background"
tabIndex="-1"
/>
</b:ListItem>
<b:TabPane ui:field="tabPane" active="true" addStyleNames="tab-background">
<bh:Div
ui:field="contentDiv"
addStyleNames="margin-left-15 margin-right-15"
/>
</b:TabPane>
</bh:Div>
</ui:UiBinder>
| Remove BS3 row styling from TabPane to fix negative margin exceeding body | Remove BS3 row styling from TabPane to fix negative margin exceeding body
| XML | apache-2.0 | Sage-Bionetworks/SynapseWebClient,Sage-Bionetworks/SynapseWebClient,Sage-Bionetworks/SynapseWebClient,Sage-Bionetworks/SynapseWebClient | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder
xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
xmlns:bh="urn:import:org.gwtbootstrap3.client.ui.html"
>
<bh:Div>
<b:ListItem
ui:field="tabListItem"
addStyleNames="entity-tab"
visible="false"
>
<b:Anchor
ui:field="tabItem"
addStyleNames="text-align-center link no-background"
tabIndex="-1"
/>
</b:ListItem>
<b:TabPane
ui:field="tabPane"
active="true"
addStyleNames="row tab-background"
>
<bh:Div
ui:field="contentDiv"
addStyleNames="margin-left-15 margin-right-15"
/>
</b:TabPane>
</bh:Div>
</ui:UiBinder>
## Instruction:
Remove BS3 row styling from TabPane to fix negative margin exceeding body
## Code After:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder
xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
xmlns:bh="urn:import:org.gwtbootstrap3.client.ui.html"
>
<bh:Div>
<b:ListItem
ui:field="tabListItem"
addStyleNames="entity-tab"
visible="false"
>
<b:Anchor
ui:field="tabItem"
addStyleNames="text-align-center link no-background"
tabIndex="-1"
/>
</b:ListItem>
<b:TabPane ui:field="tabPane" active="true" addStyleNames="tab-background">
<bh:Div
ui:field="contentDiv"
addStyleNames="margin-left-15 margin-right-15"
/>
</b:TabPane>
</bh:Div>
</ui:UiBinder>
| <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder
xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:b="urn:import:org.gwtbootstrap3.client.ui"
xmlns:bh="urn:import:org.gwtbootstrap3.client.ui.html"
>
<bh:Div>
<b:ListItem
ui:field="tabListItem"
addStyleNames="entity-tab"
visible="false"
>
<b:Anchor
ui:field="tabItem"
addStyleNames="text-align-center link no-background"
tabIndex="-1"
/>
</b:ListItem>
+ <b:TabPane ui:field="tabPane" active="true" addStyleNames="tab-background">
- <b:TabPane
- ui:field="tabPane"
- active="true"
- addStyleNames="row tab-background"
- >
<bh:Div
ui:field="contentDiv"
addStyleNames="margin-left-15 margin-right-15"
/>
</b:TabPane>
</bh:Div>
</ui:UiBinder> | 6 | 0.1875 | 1 | 5 |
dcae36238b904649e576d35e93046b8b6ec32433 | scripts/start.sh | scripts/start.sh | service fail2ban start
/usr/sbin/asterisk -vvvvvvv
| if [ -S /var/run/fail2ban/fail2ban.sock ]; then
rm /var/run/fail2ban/fail2ban.sock
fi
service fail2ban start
/usr/sbin/asterisk -vvvvvvv
| Check fail2ban socket file and remove it if exists | Check fail2ban socket file and remove it if exists
| Shell | mit | cleardevice/docker-cert-asterisk13-ubuntu | shell | ## Code Before:
service fail2ban start
/usr/sbin/asterisk -vvvvvvv
## Instruction:
Check fail2ban socket file and remove it if exists
## Code After:
if [ -S /var/run/fail2ban/fail2ban.sock ]; then
rm /var/run/fail2ban/fail2ban.sock
fi
service fail2ban start
/usr/sbin/asterisk -vvvvvvv
| + if [ -S /var/run/fail2ban/fail2ban.sock ]; then
+ rm /var/run/fail2ban/fail2ban.sock
+ fi
service fail2ban start
/usr/sbin/asterisk -vvvvvvv | 3 | 1.5 | 3 | 0 |
4dfd404e176e5c3e7ccb4b5815607661fb7c7cac | .travis.yml | .travis.yml | language: python
python:
- "3.6"
sudo: required
services:
- docker
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
script: travis/ci.sh
after_success: travis/cd.sh
| language: python
python:
- "3.6"
sudo: required
services:
- docker
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
script: travis/ci.sh
before_deploy:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
deploy:
- provider: script
script: travis/cd.sh
on:
repo: ascoderu/opwen-cloudserver
tags: true
| Move CD to Travis deploy section | Move CD to Travis deploy section
| YAML | apache-2.0 | ascoderu/opwen-cloudserver,ascoderu/opwen-cloudserver | yaml | ## Code Before:
language: python
python:
- "3.6"
sudo: required
services:
- docker
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
script: travis/ci.sh
after_success: travis/cd.sh
## Instruction:
Move CD to Travis deploy section
## Code After:
language: python
python:
- "3.6"
sudo: required
services:
- docker
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
script: travis/ci.sh
before_deploy:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
deploy:
- provider: script
script: travis/cd.sh
on:
repo: ascoderu/opwen-cloudserver
tags: true
| language: python
python:
- "3.6"
sudo: required
services:
- docker
addons:
apt:
sources:
- debian-sid
packages:
- shellcheck
- before_install:
+ script: travis/ci.sh
+
+ before_deploy:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
+ deploy:
+ - provider: script
- script: travis/ci.sh
? ^
+ script: travis/cd.sh
? ++++ ^
-
- after_success: travis/cd.sh
+ on:
+ repo: ascoderu/opwen-cloudserver
+ tags: true | 13 | 0.541667 | 9 | 4 |
d7f4d18c0033809faf77d7e26cd6934f13ffaef1 | chrome/browser/sync_file_system/drive_backend/metadata_database.proto | chrome/browser/sync_file_system/drive_backend/metadata_database.proto | // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Protocol buffer definitions for Drive backend of Syncable FileSystem.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package sync_file_system.drive_backend;
enum FileKind {
KIND_UNSUPPORTED = 0;
KIND_FILE = 1;
KIND_FOLDER = 2;
}
message ServiceMetadata {
optional int64 largest_change_id = 1;
optional string sync_root_folder_id = 2;
}
| // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Protocol buffer definitions for Drive backend of Syncable FileSystem.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package sync_file_system.drive_backend;
enum FileKind {
KIND_UNSUPPORTED = 0;
KIND_FILE = 1;
KIND_FOLDER = 2;
}
message ServiceMetadata {
optional int64 largest_change_id = 1;
optional int64 sync_root_tracker_id = 2;
// The sequence number of FileTrackers. Must be positive.
optional int64 next_tracker_id = 3;
}
// Holds details of file/folder metadata.
message FileDetails {
repeated string parent_folder_ids = 1;
optional string title = 2;
optional FileKind kind = 3;
optional string md5 = 4;
optional string etag = 5;
// Creation time and modification time of the resource.
// Serialized by Time::ToInternalValue.
optional int64 creation_time = 6;
optional int64 modification_time = 7;
optional bool deleted = 8;
optional int64 change_id = 9;
}
// Represents a server-side file.
message FileMetadata {
// File ID of the remote file/folder which the FileMetadata represents.
required string file_id = 1;
optional FileDetails details = 2;
}
// Represents synced local file.
message FileTracker {
// A unique sequence number to identify the tracker. Must be positive.
required int64 tracker_id = 1;
// Points the parent tracker in the tracker tree. 0 if there's no parent.
required int64 parent_tracker_id = 2;
required string file_id = 3;
optional string app_id = 4;
optional bool is_app_root = 5;
optional FileDetails synced_details = 6;
// True if the file is changed since the last update for this file.
optional bool dirty = 7;
// True if the FileTracker is active.
// Remote file modification should only be applied to active trackers.
// Active FileTracker must have a unique title under its parent.
optional bool active = 8;
// Valid only for folders.
// True if the folder contents have not yet been fetched.
optional bool needs_folder_listing = 9;
}
| Add FileMetadata and FileTracker for MetadataDatabase | [SyncFS] Add FileMetadata and FileTracker for MetadataDatabase
BUG=240165
Review URL: https://chromiumcodereview.appspot.com/22369003
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@215875 0039d316-1c4b-4281-b951-d872f2087c98
| Protocol Buffer | bsd-3-clause | M4sse/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,ondra-novak/chromium.src,ltilve/chromium,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,bright-sparks/chromium-spacewalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,Jonekee/chromium.src,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,mogoweb/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,ChromiumWebApps/chromium,jaruba/chromium.src,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,ondra-novak/chromium.src,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,dednal/chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,M4sse/chromium.src,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,dushu1203/chromium.src,axinging/chromium-crosswalk,ChromiumWebApps/chromium,Jonekee/chromium.src,Just-D/chromium-1,patrickm/chromium.src,dednal/chromium.src,patrickm/chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,Chilledheart/chromium,ChromiumWebApps/chromium,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,dednal/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,fujunwei/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,anirudhSK/chromium,patrickm/chromium.src,anirudhSK/chromium,littlstar/chromium.src,hgl888/chromium-crosswalk,Chilledheart/chromium,patrickm/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,M4sse/chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,anirudhSK/chromium,Fireblend/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,ltilve/chromium,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,jaruba/chromium.src,fujunwei/chromium-crosswalk,dednal/chromium.src,ltilve/chromium,ondra-novak/chromium.src,littlstar/chromium.src,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,anirudhSK/chromium,axinging/chromium-crosswalk,patrickm/chromium.src,ltilve/chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,littlstar/chromium.src,ondra-novak/chromium.src,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,bright-sparks/chromium-spacewalk,littlstar/chromium.src,axinging/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,littlstar/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,markYoungH/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,jaruba/chromium.src,patrickm/chromium.src,Chilledheart/chromium,dednal/chromium.src,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,Just-D/chromium-1,ChromiumWebApps/chromium,dednal/chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,dednal/chromium.src,mogoweb/chromium-crosswalk,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,Just-D/chromium-1,markYoungH/chromium.src,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,littlstar/chromium.src,dushu1203/chromium.src,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,patrickm/chromium.src,markYoungH/chromium.src,littlstar/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,markYoungH/chromium.src | protocol-buffer | ## Code Before:
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Protocol buffer definitions for Drive backend of Syncable FileSystem.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package sync_file_system.drive_backend;
enum FileKind {
KIND_UNSUPPORTED = 0;
KIND_FILE = 1;
KIND_FOLDER = 2;
}
message ServiceMetadata {
optional int64 largest_change_id = 1;
optional string sync_root_folder_id = 2;
}
## Instruction:
[SyncFS] Add FileMetadata and FileTracker for MetadataDatabase
BUG=240165
Review URL: https://chromiumcodereview.appspot.com/22369003
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@215875 0039d316-1c4b-4281-b951-d872f2087c98
## Code After:
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Protocol buffer definitions for Drive backend of Syncable FileSystem.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package sync_file_system.drive_backend;
enum FileKind {
KIND_UNSUPPORTED = 0;
KIND_FILE = 1;
KIND_FOLDER = 2;
}
message ServiceMetadata {
optional int64 largest_change_id = 1;
optional int64 sync_root_tracker_id = 2;
// The sequence number of FileTrackers. Must be positive.
optional int64 next_tracker_id = 3;
}
// Holds details of file/folder metadata.
message FileDetails {
repeated string parent_folder_ids = 1;
optional string title = 2;
optional FileKind kind = 3;
optional string md5 = 4;
optional string etag = 5;
// Creation time and modification time of the resource.
// Serialized by Time::ToInternalValue.
optional int64 creation_time = 6;
optional int64 modification_time = 7;
optional bool deleted = 8;
optional int64 change_id = 9;
}
// Represents a server-side file.
message FileMetadata {
// File ID of the remote file/folder which the FileMetadata represents.
required string file_id = 1;
optional FileDetails details = 2;
}
// Represents synced local file.
message FileTracker {
// A unique sequence number to identify the tracker. Must be positive.
required int64 tracker_id = 1;
// Points the parent tracker in the tracker tree. 0 if there's no parent.
required int64 parent_tracker_id = 2;
required string file_id = 3;
optional string app_id = 4;
optional bool is_app_root = 5;
optional FileDetails synced_details = 6;
// True if the file is changed since the last update for this file.
optional bool dirty = 7;
// True if the FileTracker is active.
// Remote file modification should only be applied to active trackers.
// Active FileTracker must have a unique title under its parent.
optional bool active = 8;
// Valid only for folders.
// True if the folder contents have not yet been fetched.
optional bool needs_folder_listing = 9;
}
| // Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Protocol buffer definitions for Drive backend of Syncable FileSystem.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package sync_file_system.drive_backend;
enum FileKind {
KIND_UNSUPPORTED = 0;
KIND_FILE = 1;
KIND_FOLDER = 2;
}
message ServiceMetadata {
optional int64 largest_change_id = 1;
- optional string sync_root_folder_id = 2;
? --- ^ ^^^^
+ optional int64 sync_root_tracker_id = 2;
? ^^^ ^^^^^
+
+ // The sequence number of FileTrackers. Must be positive.
+ optional int64 next_tracker_id = 3;
}
+
+ // Holds details of file/folder metadata.
+ message FileDetails {
+ repeated string parent_folder_ids = 1;
+
+ optional string title = 2;
+ optional FileKind kind = 3;
+ optional string md5 = 4;
+ optional string etag = 5;
+
+ // Creation time and modification time of the resource.
+ // Serialized by Time::ToInternalValue.
+ optional int64 creation_time = 6;
+ optional int64 modification_time = 7;
+
+ optional bool deleted = 8;
+ optional int64 change_id = 9;
+ }
+
+ // Represents a server-side file.
+ message FileMetadata {
+ // File ID of the remote file/folder which the FileMetadata represents.
+ required string file_id = 1;
+
+ optional FileDetails details = 2;
+ }
+
+ // Represents synced local file.
+ message FileTracker {
+ // A unique sequence number to identify the tracker. Must be positive.
+ required int64 tracker_id = 1;
+
+ // Points the parent tracker in the tracker tree. 0 if there's no parent.
+ required int64 parent_tracker_id = 2;
+
+ required string file_id = 3;
+
+ optional string app_id = 4;
+ optional bool is_app_root = 5;
+
+ optional FileDetails synced_details = 6;
+
+ // True if the file is changed since the last update for this file.
+ optional bool dirty = 7;
+
+ // True if the FileTracker is active.
+ // Remote file modification should only be applied to active trackers.
+ // Active FileTracker must have a unique title under its parent.
+ optional bool active = 8;
+
+ // Valid only for folders.
+ // True if the folder contents have not yet been fetched.
+ optional bool needs_folder_listing = 9;
+ } | 59 | 2.681818 | 58 | 1 |
e345a29d2c63158d18a32129637104fccd44b057 | lib/pliny/templates/endpoint_acceptance_test.erb | lib/pliny/templates/endpoint_acceptance_test.erb | require "spec_helper"
describe Endpoints::<%= plural_class_name %> do
include Committee::Test::Methods
include Rack::Test::Methods
def app
Routes
end
it "GET <%= url_path %>" do
get "<%= url_path %>"
last_response.status.should eq(200)
last_response.body.should eq("[]")
end
it "POST <%= url_path %>/:id" do
post "<%= url_path %>"
last_response.status.should eq(201)
last_response.body.should eq("{}")
end
it "GET <%= url_path %>/:id" do
get "<%= url_path %>/123"
last_response.status.should eq(200)
last_response.body.should eq("{}")
end
it "PATCH <%= url_path %>/:id" do
patch "<%= url_path %>/123"
last_response.status.should eq(200)
last_response.body.should eq("{}")
end
it "DELETE <%= url_path %>/:id" do
delete "<%= url_path %>/123"
last_response.status.should eq(200)
last_response.body.should eq("{}")
end
end
| require "spec_helper"
describe Endpoints::<%= plural_class_name %> do
include Committee::Test::Methods
include Rack::Test::Methods
def app
Routes
end
describe 'GET <%= url_path %>' do
it 'returns correct status code and conforms to schema' do
get '<%= url_path %>'
last_response.status.should eq(200)
assert_schema_conform
end
end
describe 'POST <%= url_path %>/:id' do
it 'returns correct status code and conforms to schema' do
header "Content-Type", "application/json"
post '<%= url_path %>', MultiJson.encode({})
last_response.status.should eq(201)
assert_schema_conform
end
end
describe 'GET <%= url_path %>/:id' do
it 'returns correct status code and conforms to schema' do
get "<%= url_path %>/123"
last_response.status.should eq(200)
assert_schema_conform
end
end
describe 'PATCH <%= url_path %>/:id' do
it 'returns correct status code and conforms to schema' do
header "Content-Type", "application/json"
patch '<%= url_path %>/123', MultiJson.encode({})
last_response.status.should eq(200)
assert_schema_conform
end
end
describe 'DELETE <%= url_path %>/:id' do
it 'returns correct status code and conforms to schema' do
delete '<%= url_path %>/123'
last_response.status.should eq(200)
assert_schema_conform
end
end
end
| Add grouping to acceptance spec | Add grouping to acceptance spec
| HTML+ERB | mit | fdr/pliny,fdr/pliny,interagent/pliny,interagent/pliny,interagent/pliny,hayduke19us/pliny,hayduke19us/pliny,fdr/pliny,hayduke19us/pliny | html+erb | ## Code Before:
require "spec_helper"
describe Endpoints::<%= plural_class_name %> do
include Committee::Test::Methods
include Rack::Test::Methods
def app
Routes
end
it "GET <%= url_path %>" do
get "<%= url_path %>"
last_response.status.should eq(200)
last_response.body.should eq("[]")
end
it "POST <%= url_path %>/:id" do
post "<%= url_path %>"
last_response.status.should eq(201)
last_response.body.should eq("{}")
end
it "GET <%= url_path %>/:id" do
get "<%= url_path %>/123"
last_response.status.should eq(200)
last_response.body.should eq("{}")
end
it "PATCH <%= url_path %>/:id" do
patch "<%= url_path %>/123"
last_response.status.should eq(200)
last_response.body.should eq("{}")
end
it "DELETE <%= url_path %>/:id" do
delete "<%= url_path %>/123"
last_response.status.should eq(200)
last_response.body.should eq("{}")
end
end
## Instruction:
Add grouping to acceptance spec
## Code After:
require "spec_helper"
describe Endpoints::<%= plural_class_name %> do
include Committee::Test::Methods
include Rack::Test::Methods
def app
Routes
end
describe 'GET <%= url_path %>' do
it 'returns correct status code and conforms to schema' do
get '<%= url_path %>'
last_response.status.should eq(200)
assert_schema_conform
end
end
describe 'POST <%= url_path %>/:id' do
it 'returns correct status code and conforms to schema' do
header "Content-Type", "application/json"
post '<%= url_path %>', MultiJson.encode({})
last_response.status.should eq(201)
assert_schema_conform
end
end
describe 'GET <%= url_path %>/:id' do
it 'returns correct status code and conforms to schema' do
get "<%= url_path %>/123"
last_response.status.should eq(200)
assert_schema_conform
end
end
describe 'PATCH <%= url_path %>/:id' do
it 'returns correct status code and conforms to schema' do
header "Content-Type", "application/json"
patch '<%= url_path %>/123', MultiJson.encode({})
last_response.status.should eq(200)
assert_schema_conform
end
end
describe 'DELETE <%= url_path %>/:id' do
it 'returns correct status code and conforms to schema' do
delete '<%= url_path %>/123'
last_response.status.should eq(200)
assert_schema_conform
end
end
end
| require "spec_helper"
describe Endpoints::<%= plural_class_name %> do
include Committee::Test::Methods
include Rack::Test::Methods
def app
Routes
end
- it "GET <%= url_path %>" do
? ^ ^ ^
+ describe 'GET <%= url_path %>' do
? +++++ ^^ ^ ^
+ it 'returns correct status code and conforms to schema' do
- get "<%= url_path %>"
? ^ ^
+ get '<%= url_path %>'
? ++ ^ ^
- last_response.status.should eq(200)
+ last_response.status.should eq(200)
? ++
- last_response.body.should eq("[]")
+ assert_schema_conform
+ end
end
- it "POST <%= url_path %>/:id" do
? ^ ^ ^
+ describe 'POST <%= url_path %>/:id' do
? +++++ ^^ ^ ^
- post "<%= url_path %>"
+ it 'returns correct status code and conforms to schema' do
+ header "Content-Type", "application/json"
+ post '<%= url_path %>', MultiJson.encode({})
- last_response.status.should eq(201)
+ last_response.status.should eq(201)
? ++
- last_response.body.should eq("{}")
+ assert_schema_conform
+ end
end
- it "GET <%= url_path %>/:id" do
? ^ ^ ^
+ describe 'GET <%= url_path %>/:id' do
? +++++ ^^ ^ ^
+ it 'returns correct status code and conforms to schema' do
- get "<%= url_path %>/123"
+ get "<%= url_path %>/123"
? ++
- last_response.status.should eq(200)
+ last_response.status.should eq(200)
? ++
- last_response.body.should eq("{}")
+ assert_schema_conform
+ end
end
- it "PATCH <%= url_path %>/:id" do
? ^ ^ ^
+ describe 'PATCH <%= url_path %>/:id' do
? +++++ ^^ ^ ^
- patch "<%= url_path %>/123"
+ it 'returns correct status code and conforms to schema' do
+ header "Content-Type", "application/json"
+ patch '<%= url_path %>/123', MultiJson.encode({})
- last_response.status.should eq(200)
+ last_response.status.should eq(200)
? ++
- last_response.body.should eq("{}")
+ assert_schema_conform
+ end
end
- it "DELETE <%= url_path %>/:id" do
? ^ ^ ^
+ describe 'DELETE <%= url_path %>/:id' do
? +++++ ^^ ^ ^
+ it 'returns correct status code and conforms to schema' do
- delete "<%= url_path %>/123"
? ^ ^
+ delete '<%= url_path %>/123'
? ++ ^ ^
- last_response.status.should eq(200)
+ last_response.status.should eq(200)
? ++
- last_response.body.should eq("{}")
+ assert_schema_conform
+ end
end
end | 52 | 1.3 | 32 | 20 |
439d0d5d057258e9950ccc9b356c24a31e833d53 | image-yaml/overcloud-images.yaml | image-yaml/overcloud-images.yaml | disk_images:
-
imagename: overcloud-full
arch: amd64
type: qcow2
elements:
- baremetal
- dhcp-all-interfaces
- overcloud-agent
- overcloud-full
- overcloud-controller
- overcloud-compute
- overcloud-ceph-storage
- puppet-modules
- hiera
- os-net-config
- stable-interface-names
- grub2
- element-manifest
- dynamic-login
- enable-packages-install
- pip-and-virtualenv-override
packages:
- python-psutil
- python-debtcollector
- plotnetcfg
- sos
- device-mapper-multipath
- python-heat-agent-puppet
- python-heat-agent-hiera
- python-heat-agent-apply-config
- python-heat-agent-ansible
options:
- "--min-tmpfs 5"
-
imagename: ironic-python-agent
arch: amd64
# This is bogus, but there's no initrd type in diskimage-builder
type: qcow2
# So we just override the extension instead
imageext: initramfs
elements:
- ironic-agent
- dynamic-login
- element-manifest
- network-gateway
- enable-packages-install
- pip-and-virtualenv-override
packages:
- python-hardware-detect
options:
- "--min-tmpfs=5"
| disk_images:
-
imagename: overcloud-full
arch: amd64
type: qcow2
elements:
- baremetal
- dhcp-all-interfaces
- overcloud-agent
- overcloud-full
- overcloud-controller
- overcloud-compute
- overcloud-ceph-storage
- puppet-modules
- hiera
- os-net-config
- stable-interface-names
- grub2
- element-manifest
- dynamic-login
- iptables
- enable-packages-install
- pip-and-virtualenv-override
packages:
- python-psutil
- python-debtcollector
- plotnetcfg
- sos
- device-mapper-multipath
- python-heat-agent-puppet
- python-heat-agent-hiera
- python-heat-agent-apply-config
- python-heat-agent-ansible
options:
- "--min-tmpfs 5"
-
imagename: ironic-python-agent
arch: amd64
# This is bogus, but there's no initrd type in diskimage-builder
type: qcow2
# So we just override the extension instead
imageext: initramfs
elements:
- ironic-agent
- dynamic-login
- element-manifest
- network-gateway
- enable-packages-install
- pip-and-virtualenv-override
packages:
- python-hardware-detect
options:
- "--min-tmpfs=5"
| Add the iptables element to the image building process | Add the iptables element to the image building process
Adding the iptables element will effectively empty
/etc/sysconfig/iptables and will solve the linked bug where a full
explanation of the different approaches has been provided.
This approach has been chosen because other approaches proved to
be either to complex *or* required that we enable the purging of
rules by default which might be disruptive for existing installations.
Closes-Bug: #1657108
Change-Id: Id0498a1158b5ace0df961248946f3ab5f11c26da
Depends-On: Iddc21316a1a3d42a1a43cbb4b9c178adba8f8db3
| YAML | apache-2.0 | openstack/tripleo-common,openstack/tripleo-common | yaml | ## Code Before:
disk_images:
-
imagename: overcloud-full
arch: amd64
type: qcow2
elements:
- baremetal
- dhcp-all-interfaces
- overcloud-agent
- overcloud-full
- overcloud-controller
- overcloud-compute
- overcloud-ceph-storage
- puppet-modules
- hiera
- os-net-config
- stable-interface-names
- grub2
- element-manifest
- dynamic-login
- enable-packages-install
- pip-and-virtualenv-override
packages:
- python-psutil
- python-debtcollector
- plotnetcfg
- sos
- device-mapper-multipath
- python-heat-agent-puppet
- python-heat-agent-hiera
- python-heat-agent-apply-config
- python-heat-agent-ansible
options:
- "--min-tmpfs 5"
-
imagename: ironic-python-agent
arch: amd64
# This is bogus, but there's no initrd type in diskimage-builder
type: qcow2
# So we just override the extension instead
imageext: initramfs
elements:
- ironic-agent
- dynamic-login
- element-manifest
- network-gateway
- enable-packages-install
- pip-and-virtualenv-override
packages:
- python-hardware-detect
options:
- "--min-tmpfs=5"
## Instruction:
Add the iptables element to the image building process
Adding the iptables element will effectively empty
/etc/sysconfig/iptables and will solve the linked bug where a full
explanation of the different approaches has been provided.
This approach has been chosen because other approaches proved to
be either to complex *or* required that we enable the purging of
rules by default which might be disruptive for existing installations.
Closes-Bug: #1657108
Change-Id: Id0498a1158b5ace0df961248946f3ab5f11c26da
Depends-On: Iddc21316a1a3d42a1a43cbb4b9c178adba8f8db3
## Code After:
disk_images:
-
imagename: overcloud-full
arch: amd64
type: qcow2
elements:
- baremetal
- dhcp-all-interfaces
- overcloud-agent
- overcloud-full
- overcloud-controller
- overcloud-compute
- overcloud-ceph-storage
- puppet-modules
- hiera
- os-net-config
- stable-interface-names
- grub2
- element-manifest
- dynamic-login
- iptables
- enable-packages-install
- pip-and-virtualenv-override
packages:
- python-psutil
- python-debtcollector
- plotnetcfg
- sos
- device-mapper-multipath
- python-heat-agent-puppet
- python-heat-agent-hiera
- python-heat-agent-apply-config
- python-heat-agent-ansible
options:
- "--min-tmpfs 5"
-
imagename: ironic-python-agent
arch: amd64
# This is bogus, but there's no initrd type in diskimage-builder
type: qcow2
# So we just override the extension instead
imageext: initramfs
elements:
- ironic-agent
- dynamic-login
- element-manifest
- network-gateway
- enable-packages-install
- pip-and-virtualenv-override
packages:
- python-hardware-detect
options:
- "--min-tmpfs=5"
| disk_images:
-
imagename: overcloud-full
arch: amd64
type: qcow2
elements:
- baremetal
- dhcp-all-interfaces
- overcloud-agent
- overcloud-full
- overcloud-controller
- overcloud-compute
- overcloud-ceph-storage
- puppet-modules
- hiera
- os-net-config
- stable-interface-names
- grub2
- element-manifest
- dynamic-login
+ - iptables
- enable-packages-install
- pip-and-virtualenv-override
packages:
- python-psutil
- python-debtcollector
- plotnetcfg
- sos
- device-mapper-multipath
- python-heat-agent-puppet
- python-heat-agent-hiera
- python-heat-agent-apply-config
- python-heat-agent-ansible
options:
- "--min-tmpfs 5"
-
imagename: ironic-python-agent
arch: amd64
# This is bogus, but there's no initrd type in diskimage-builder
type: qcow2
# So we just override the extension instead
imageext: initramfs
elements:
- ironic-agent
- dynamic-login
- element-manifest
- network-gateway
- enable-packages-install
- pip-and-virtualenv-override
packages:
- python-hardware-detect
options:
- "--min-tmpfs=5"
| 1 | 0.018868 | 1 | 0 |
26e6a8eb5dadbb63b0db1db753ed8f973fa237fd | src/DOMSelector.php | src/DOMSelector.php | <?php
namespace trejeraos;
use \DOMDocument;
use \DOMXpath;
use Symfony\Component\CssSelector\CssSelectorConverter;
/**
* DOMSelector makes selecting XML elements easy by using CSS like selectors
*
* @author Jeremie Jarosh <jeremie@jarosh.org>
* @version 0.3.0
*/
class DOMSelector extends DOMXpath
{
/**
* @var \Symfony\Component\CssSelector\CssSelectorConverter
*/
protected $converter;
public function __construct(DOMDocument $doc)
{
parent::__construct($doc);
$this->converter = new CssSelectorConverter(false);
}
/**
* Returns a list of the elements within the document that match the specified group of selectors.
*
* @param string $filename CSS Selector
*
* @return DOMNodeList
*/
public function querySelectorAll($cssSelectors)
{
$xpathQuery = $this->converter->toXPath($cssSelectors);
return $this->query($xpathQuery);
}
/**
* Returns the first element within the document that matches the specified group of selectors.
*
* @param string $filename CSS Selector
*
* @return DOMNode
*/
public function querySelector($cssSelectors)
{
return $this->querySelectorAll($cssSelectors)->item(0);
}
} | <?php
namespace trejeraos;
use \DOMDocument;
use \DOMXpath;
use Symfony\Component\CssSelector\CssSelectorConverter;
/**
* DOMSelector makes selecting XML elements easy by using CSS like selectors
*
* @author Jeremie Jarosh <jeremie@jarosh.org>
* @version 0.3.0
*/
class DOMSelector extends DOMXpath
{
/**
* @var \Symfony\Component\CssSelector\CssSelectorConverter
*/
protected $converter;
/**
* Creates a new DOMSelector object
*
* @param DOMDocument $doc The DOMDocument associated with the DOMSelector.
* @param bool $html Whether HTML support should be enabled. Disable it for XML documents.
*/
public function __construct(DOMDocument $doc, $html = true)
{
parent::__construct($doc);
$this->converter = new CssSelectorConverter($html);
}
/**
* Returns a list of the elements within the document that match the specified group of selectors.
*
* @param string $filename CSS Selector
*
* @return DOMNodeList
*/
public function querySelectorAll($cssSelectors)
{
$xpathQuery = $this->converter->toXPath($cssSelectors);
return $this->query($xpathQuery);
}
/**
* Returns the first element within the document that matches the specified group of selectors.
*
* @param string $filename CSS Selector
*
* @return DOMNode
*/
public function querySelector($cssSelectors)
{
return $this->querySelectorAll($cssSelectors)->item(0);
}
} | Support Both XML and HTML Documents (HTML is Default) | Support Both XML and HTML Documents (HTML is Default)
| PHP | mit | triple-j/DOMSelector | php | ## Code Before:
<?php
namespace trejeraos;
use \DOMDocument;
use \DOMXpath;
use Symfony\Component\CssSelector\CssSelectorConverter;
/**
* DOMSelector makes selecting XML elements easy by using CSS like selectors
*
* @author Jeremie Jarosh <jeremie@jarosh.org>
* @version 0.3.0
*/
class DOMSelector extends DOMXpath
{
/**
* @var \Symfony\Component\CssSelector\CssSelectorConverter
*/
protected $converter;
public function __construct(DOMDocument $doc)
{
parent::__construct($doc);
$this->converter = new CssSelectorConverter(false);
}
/**
* Returns a list of the elements within the document that match the specified group of selectors.
*
* @param string $filename CSS Selector
*
* @return DOMNodeList
*/
public function querySelectorAll($cssSelectors)
{
$xpathQuery = $this->converter->toXPath($cssSelectors);
return $this->query($xpathQuery);
}
/**
* Returns the first element within the document that matches the specified group of selectors.
*
* @param string $filename CSS Selector
*
* @return DOMNode
*/
public function querySelector($cssSelectors)
{
return $this->querySelectorAll($cssSelectors)->item(0);
}
}
## Instruction:
Support Both XML and HTML Documents (HTML is Default)
## Code After:
<?php
namespace trejeraos;
use \DOMDocument;
use \DOMXpath;
use Symfony\Component\CssSelector\CssSelectorConverter;
/**
* DOMSelector makes selecting XML elements easy by using CSS like selectors
*
* @author Jeremie Jarosh <jeremie@jarosh.org>
* @version 0.3.0
*/
class DOMSelector extends DOMXpath
{
/**
* @var \Symfony\Component\CssSelector\CssSelectorConverter
*/
protected $converter;
/**
* Creates a new DOMSelector object
*
* @param DOMDocument $doc The DOMDocument associated with the DOMSelector.
* @param bool $html Whether HTML support should be enabled. Disable it for XML documents.
*/
public function __construct(DOMDocument $doc, $html = true)
{
parent::__construct($doc);
$this->converter = new CssSelectorConverter($html);
}
/**
* Returns a list of the elements within the document that match the specified group of selectors.
*
* @param string $filename CSS Selector
*
* @return DOMNodeList
*/
public function querySelectorAll($cssSelectors)
{
$xpathQuery = $this->converter->toXPath($cssSelectors);
return $this->query($xpathQuery);
}
/**
* Returns the first element within the document that matches the specified group of selectors.
*
* @param string $filename CSS Selector
*
* @return DOMNode
*/
public function querySelector($cssSelectors)
{
return $this->querySelectorAll($cssSelectors)->item(0);
}
} | <?php
namespace trejeraos;
use \DOMDocument;
use \DOMXpath;
use Symfony\Component\CssSelector\CssSelectorConverter;
/**
* DOMSelector makes selecting XML elements easy by using CSS like selectors
*
* @author Jeremie Jarosh <jeremie@jarosh.org>
* @version 0.3.0
*/
class DOMSelector extends DOMXpath
{
/**
* @var \Symfony\Component\CssSelector\CssSelectorConverter
*/
protected $converter;
+ /**
+ * Creates a new DOMSelector object
+ *
+ * @param DOMDocument $doc The DOMDocument associated with the DOMSelector.
+ * @param bool $html Whether HTML support should be enabled. Disable it for XML documents.
+ */
- public function __construct(DOMDocument $doc)
+ public function __construct(DOMDocument $doc, $html = true)
? ++++++++++++++
{
parent::__construct($doc);
- $this->converter = new CssSelectorConverter(false);
? ^^ --
+ $this->converter = new CssSelectorConverter($html);
? ^^^^
}
/**
* Returns a list of the elements within the document that match the specified group of selectors.
*
* @param string $filename CSS Selector
*
* @return DOMNodeList
*/
public function querySelectorAll($cssSelectors)
{
$xpathQuery = $this->converter->toXPath($cssSelectors);
return $this->query($xpathQuery);
}
/**
* Returns the first element within the document that matches the specified group of selectors.
*
* @param string $filename CSS Selector
*
* @return DOMNode
*/
public function querySelector($cssSelectors)
{
return $this->querySelectorAll($cssSelectors)->item(0);
}
} | 10 | 0.185185 | 8 | 2 |
f6f788afdc692059151e7bd6945bd18ce0c36e90 | development.md | development.md |
If you use Eclipse, clone the project into a named or subdirectory of your workspace to work around [this](https://bugs.eclipse.org/bugs/show_bug.cgi?id=375073) [limitation](https://bugs.eclipse.org/bugs/show_bug.cgi?id=40493):
`git clone git@github.com:BlackPepperSoftware/hal-client.git hal-client-parent/`
Then import with `File -> Import -> Maven -> Existing Maven Projects`.
## Building ##
To build and install into the local Maven repository:
`mvn install`
To run the integration tests:
`mvn verify -PrunITs` |
To build and install into the local Maven repository:
`mvn install`
To run the integration tests:
`mvn verify -PrunITs` | Remove Eclipse import hint - no longer required | Remove Eclipse import hint - no longer required
| Markdown | apache-2.0 | BlackPepperSoftware/hal-client,BlackPepperSoftware/bowman | markdown | ## Code Before:
If you use Eclipse, clone the project into a named or subdirectory of your workspace to work around [this](https://bugs.eclipse.org/bugs/show_bug.cgi?id=375073) [limitation](https://bugs.eclipse.org/bugs/show_bug.cgi?id=40493):
`git clone git@github.com:BlackPepperSoftware/hal-client.git hal-client-parent/`
Then import with `File -> Import -> Maven -> Existing Maven Projects`.
## Building ##
To build and install into the local Maven repository:
`mvn install`
To run the integration tests:
`mvn verify -PrunITs`
## Instruction:
Remove Eclipse import hint - no longer required
## Code After:
To build and install into the local Maven repository:
`mvn install`
To run the integration tests:
`mvn verify -PrunITs` | -
- If you use Eclipse, clone the project into a named or subdirectory of your workspace to work around [this](https://bugs.eclipse.org/bugs/show_bug.cgi?id=375073) [limitation](https://bugs.eclipse.org/bugs/show_bug.cgi?id=40493):
-
- `git clone git@github.com:BlackPepperSoftware/hal-client.git hal-client-parent/`
-
- Then import with `File -> Import -> Maven -> Existing Maven Projects`.
-
- ## Building ##
To build and install into the local Maven repository:
`mvn install`
To run the integration tests:
`mvn verify -PrunITs` | 8 | 0.5 | 0 | 8 |
8fd6b687c32ac7c37d0d37660a4124b881764984 | doc/arch/adr-XXX.rst | doc/arch/adr-XXX.rst | ADRXXX
======
:Number: XXX
:Title: Short nouns summarizing the decision.
:Author: Max Mustermann
:Created: 2021-06-20
:Status: Approved
.. contents:: Table of Contents
Context
-------
Benefit / Purpose of the decision, and what the technical context was that lead to it.
Should be written in a way that can be understood by any team member three years later.
Decision
--------
Things of the following kind:
- Instead of doing X like we always did, we're now going to do Y.
- We're starting to do X.
- We're not doing Y anymore because reason X which lead to Y is obsolete.
Consequences
------------
Immediate changes are X, to consolidate all things to Y requires such and such effort.
Long term effects are Z.
In the dailly work of a developer working on C, instead of just doing D, D' has to be done as well.
| ADRXXX
======
:Number: XXX
:Title: Short nouns summarizing the decision.
:Author: Max Mustermann
:Created: 2021-06-20
:Status: Proposed / Approved / Postulated / Superseded
.. contents:: Table of Contents
Context
-------
Benefit / Purpose of the decision, and what the technical context was that lead to it.
Should be written in a way that can be understood by any team member three years later.
Decision
--------
Things of the following kind:
- Instead of doing X like we always did, we're now going to do Y.
- We're starting to do X.
- We're not doing Y anymore because reason X which lead to Y is obsolete.
Consequences
------------
Immediate changes are X, to consolidate all things to Y requires such and such effort.
Long term effects are Z.
In the dailly work of a developer working on C, instead of just doing D, D' has to be done as well.
| Add more status types to ADRs | Add more status types to ADRs
“Postulated” means that the author just made that decision.
I think it is a useful verb to have because many decisions are made by
the people with expertise in the area they're working in, and does not
undergo a formal democratic decision process.
Since ADRs should be lightweight and should not draw people towards
unnecessary bueaurocratization, I think this is a good clarification
to make.
| reStructuredText | apache-2.0 | agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft | restructuredtext | ## Code Before:
ADRXXX
======
:Number: XXX
:Title: Short nouns summarizing the decision.
:Author: Max Mustermann
:Created: 2021-06-20
:Status: Approved
.. contents:: Table of Contents
Context
-------
Benefit / Purpose of the decision, and what the technical context was that lead to it.
Should be written in a way that can be understood by any team member three years later.
Decision
--------
Things of the following kind:
- Instead of doing X like we always did, we're now going to do Y.
- We're starting to do X.
- We're not doing Y anymore because reason X which lead to Y is obsolete.
Consequences
------------
Immediate changes are X, to consolidate all things to Y requires such and such effort.
Long term effects are Z.
In the dailly work of a developer working on C, instead of just doing D, D' has to be done as well.
## Instruction:
Add more status types to ADRs
“Postulated” means that the author just made that decision.
I think it is a useful verb to have because many decisions are made by
the people with expertise in the area they're working in, and does not
undergo a formal democratic decision process.
Since ADRs should be lightweight and should not draw people towards
unnecessary bueaurocratization, I think this is a good clarification
to make.
## Code After:
ADRXXX
======
:Number: XXX
:Title: Short nouns summarizing the decision.
:Author: Max Mustermann
:Created: 2021-06-20
:Status: Proposed / Approved / Postulated / Superseded
.. contents:: Table of Contents
Context
-------
Benefit / Purpose of the decision, and what the technical context was that lead to it.
Should be written in a way that can be understood by any team member three years later.
Decision
--------
Things of the following kind:
- Instead of doing X like we always did, we're now going to do Y.
- We're starting to do X.
- We're not doing Y anymore because reason X which lead to Y is obsolete.
Consequences
------------
Immediate changes are X, to consolidate all things to Y requires such and such effort.
Long term effects are Z.
In the dailly work of a developer working on C, instead of just doing D, D' has to be done as well.
| ADRXXX
======
:Number: XXX
:Title: Short nouns summarizing the decision.
:Author: Max Mustermann
:Created: 2021-06-20
- :Status: Approved
+ :Status: Proposed / Approved / Postulated / Superseded
.. contents:: Table of Contents
Context
-------
Benefit / Purpose of the decision, and what the technical context was that lead to it.
Should be written in a way that can be understood by any team member three years later.
Decision
--------
Things of the following kind:
- Instead of doing X like we always did, we're now going to do Y.
- We're starting to do X.
- We're not doing Y anymore because reason X which lead to Y is obsolete.
Consequences
------------
Immediate changes are X, to consolidate all things to Y requires such and such effort.
Long term effects are Z.
In the dailly work of a developer working on C, instead of just doing D, D' has to be done as well. | 2 | 0.068966 | 1 | 1 |
744132d3fe588ca1398eb063525719b2f9ebd181 | app/inputs/date_field_input.rb | app/inputs/date_field_input.rb | class DateFieldInput < SimpleForm::Inputs::StringInput
def input
input_html_options['date-picker'] = true
super
end
end
| class DateFieldInput < SimpleForm::Inputs::StringInput
def input
input_html_options['date-picker'] = true
input_html_options[:type] = 'text'
super
end
end
| Use input type text instead of default date_field. | Use input type text instead of default date_field.
| Ruby | agpl-3.0 | hauledev/bookyt,gaapt/bookyt,silvermind/bookyt,silvermind/bookyt,silvermind/bookyt,xuewenfei/bookyt,huerlisi/bookyt,xuewenfei/bookyt,gaapt/bookyt,huerlisi/bookyt,huerlisi/bookyt,wtag/bookyt,xuewenfei/bookyt,gaapt/bookyt,hauledev/bookyt,hauledev/bookyt,gaapt/bookyt,wtag/bookyt,hauledev/bookyt,wtag/bookyt,silvermind/bookyt | ruby | ## Code Before:
class DateFieldInput < SimpleForm::Inputs::StringInput
def input
input_html_options['date-picker'] = true
super
end
end
## Instruction:
Use input type text instead of default date_field.
## Code After:
class DateFieldInput < SimpleForm::Inputs::StringInput
def input
input_html_options['date-picker'] = true
input_html_options[:type] = 'text'
super
end
end
| class DateFieldInput < SimpleForm::Inputs::StringInput
def input
input_html_options['date-picker'] = true
+ input_html_options[:type] = 'text'
super
end
end | 1 | 0.166667 | 1 | 0 |
9a5304f81aed256f02423ba88b78d751c2d28f87 | test/run-unit-tests.html | test/run-unit-tests.html | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dexie Unit tests</title>
<link rel="stylesheet" href="qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="qunit.js"></script>
<script src="../src/Dexie.js"></script>
<script src="tests-extendability.js"></script>
<script src="tests-table.js"></script>
<script src="tests-open.js"></script>
<script src="tests-collection.js"></script>
<script src="tests-whereclause.js"></script>
<script src="tests-exception-handling.js"></script>
<script src="tests-upgrading.js"></script>
<script src="tests-performance.js"></script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dexie Unit tests</title>
<link rel="stylesheet" href="qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="qunit.js"></script>
<script>
if (!(window.indexedDB || window.window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB))
// Pull down the polyfill if needed (Safari + older opera browser)
document.write('<script src="http://nparashuram.com/IndexedDBShim/dist/IndexedDBShim.min.js">\x3C/script>');
</script>
<script src="../src/Dexie.js"></script>
<script src="tests-extendability.js"></script>
<script src="tests-table.js"></script>
<script src="tests-open.js"></script>
<script src="tests-collection.js"></script>
<script src="tests-whereclause.js"></script>
<script src="tests-exception-handling.js"></script>
<script src="tests-upgrading.js"></script>
<script src="tests-performance.js"></script>
</body>
</html>
| Enable unit with indexeddb-shim on Safari | Enable unit with indexeddb-shim on Safari
However, seems something makes it fail badly on all tests with
indexeddb-shim. Funny since it works perfectly with Opera,Chrome,Mozilla
and IE.
| HTML | apache-2.0 | cesarmarinhorj/Dexie.js,jimmywarting/Dexie.js,YuriSolovyov/Dexie.js,YuriSolovyov/Dexie.js,dfahlander/Dexie.js,cesarmarinhorj/Dexie.js,jimmywarting/Dexie.js,chrahunt/Dexie.js,jimmywarting/Dexie.js,chrahunt/Dexie.js,jacobmarshall/ng-dexie,dfahlander/Dexie.js,dfahlander/Dexie.js,dfahlander/Dexie.js,jacobmarshall/ng-dexie,chrahunt/Dexie.js,jimmywarting/Dexie.js,chrahunt/Dexie.js | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dexie Unit tests</title>
<link rel="stylesheet" href="qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="qunit.js"></script>
<script src="../src/Dexie.js"></script>
<script src="tests-extendability.js"></script>
<script src="tests-table.js"></script>
<script src="tests-open.js"></script>
<script src="tests-collection.js"></script>
<script src="tests-whereclause.js"></script>
<script src="tests-exception-handling.js"></script>
<script src="tests-upgrading.js"></script>
<script src="tests-performance.js"></script>
</body>
</html>
## Instruction:
Enable unit with indexeddb-shim on Safari
However, seems something makes it fail badly on all tests with
indexeddb-shim. Funny since it works perfectly with Opera,Chrome,Mozilla
and IE.
## Code After:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dexie Unit tests</title>
<link rel="stylesheet" href="qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="qunit.js"></script>
<script>
if (!(window.indexedDB || window.window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB))
// Pull down the polyfill if needed (Safari + older opera browser)
document.write('<script src="http://nparashuram.com/IndexedDBShim/dist/IndexedDBShim.min.js">\x3C/script>');
</script>
<script src="../src/Dexie.js"></script>
<script src="tests-extendability.js"></script>
<script src="tests-table.js"></script>
<script src="tests-open.js"></script>
<script src="tests-collection.js"></script>
<script src="tests-whereclause.js"></script>
<script src="tests-exception-handling.js"></script>
<script src="tests-upgrading.js"></script>
<script src="tests-performance.js"></script>
</body>
</html>
| <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dexie Unit tests</title>
<link rel="stylesheet" href="qunit.css">
</head>
<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>
<script src="qunit.js"></script>
+ <script>
+ if (!(window.indexedDB || window.window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB))
+ // Pull down the polyfill if needed (Safari + older opera browser)
+ document.write('<script src="http://nparashuram.com/IndexedDBShim/dist/IndexedDBShim.min.js">\x3C/script>');
+ </script>
<script src="../src/Dexie.js"></script>
<script src="tests-extendability.js"></script>
<script src="tests-table.js"></script>
<script src="tests-open.js"></script>
<script src="tests-collection.js"></script>
<script src="tests-whereclause.js"></script>
<script src="tests-exception-handling.js"></script>
<script src="tests-upgrading.js"></script>
<script src="tests-performance.js"></script>
</body>
</html> | 5 | 0.227273 | 5 | 0 |
693a5a55d818d66b08e5498503c1c2c35d8dadc4 | test/spec/resources/monit_config_spec.rb | test/spec/resources/monit_config_spec.rb |
require 'spec_helper'
describe PoiseMonit::Resources::MonitConfig do
step_into(:monit_config)
before do
default_attributes['poise-monit'] ||= {}
# TODO update this when I write a dummy provider.
default_attributes['poise-monit']['provider'] = 'system'
end
context 'action :create' do
recipe do
monit 'monit' do
provider :system # REMOVE THIS
end
monit_config 'httpd' do
content 'check process httpd'
end
end
it { is_expected.to render_file('/etc/monit/conf.d/httpd.conf').with_content('check process httpd') }
end # /context action :create
end
|
require 'spec_helper'
describe PoiseMonit::Resources::MonitConfig do
step_into(:monit_config)
context 'action :create' do
recipe do
monit 'monit'
monit_config 'httpd' do
content 'check process httpd'
end
end
it { is_expected.to render_file('/etc/monit/conf.d/httpd.conf').with_content('check process httpd') }
end # /context action :create
end
| Use the new dummy provider (which happens by default on chefspec). | Use the new dummy provider (which happens by default on chefspec). | Ruby | apache-2.0 | poise/poise-monit,poise/poise-monit | ruby | ## Code Before:
require 'spec_helper'
describe PoiseMonit::Resources::MonitConfig do
step_into(:monit_config)
before do
default_attributes['poise-monit'] ||= {}
# TODO update this when I write a dummy provider.
default_attributes['poise-monit']['provider'] = 'system'
end
context 'action :create' do
recipe do
monit 'monit' do
provider :system # REMOVE THIS
end
monit_config 'httpd' do
content 'check process httpd'
end
end
it { is_expected.to render_file('/etc/monit/conf.d/httpd.conf').with_content('check process httpd') }
end # /context action :create
end
## Instruction:
Use the new dummy provider (which happens by default on chefspec).
## Code After:
require 'spec_helper'
describe PoiseMonit::Resources::MonitConfig do
step_into(:monit_config)
context 'action :create' do
recipe do
monit 'monit'
monit_config 'httpd' do
content 'check process httpd'
end
end
it { is_expected.to render_file('/etc/monit/conf.d/httpd.conf').with_content('check process httpd') }
end # /context action :create
end
|
require 'spec_helper'
describe PoiseMonit::Resources::MonitConfig do
step_into(:monit_config)
- before do
- default_attributes['poise-monit'] ||= {}
- # TODO update this when I write a dummy provider.
- default_attributes['poise-monit']['provider'] = 'system'
- end
context 'action :create' do
recipe do
- monit 'monit' do
? ---
+ monit 'monit'
- provider :system # REMOVE THIS
- end
monit_config 'httpd' do
content 'check process httpd'
end
end
it { is_expected.to render_file('/etc/monit/conf.d/httpd.conf').with_content('check process httpd') }
end # /context action :create
end | 9 | 0.375 | 1 | 8 |
6eca461aa789189aa9f72ce8b5e890f7cbb04e85 | resources/views/about.twig | resources/views/about.twig | {% extends 'partials/page.twig' %}
{% block title %}About Pxl{% endblock %}
{% block content %}
<div class="section">
<div class="row">
<div class="col s12 m12">
<div class="welcome-msg">
<div class="center"><img src="{{ asset('img/logo/Px-logo-cut-small.png') }}"></div>
<h2 class="center">Open Source Image Sharing</h2>
<p>Pxl is Max Korlaar's open source image sharing and hosting platform built on the concept of Pxl.lt.</p>
<img src="{{ asset('img/about/gallery_screenshot.png') }}" class="responsive-img right">
<p>The project is built on top of the PHP framework Laravel and may be freely forked on Github.
If you would like to contribute to the project, you are entirely free to do so.</p>
<p>Unlike Pxl.lt, this project is intended to be fully self-hosted and managed. I do not provide a free or paid service to the public,
in the hopes of people enjoying the project themselves and improving it. Pxl does have a feature to allow public registrations, but for private instances
you should keep this disabled.</p>
<p>You might see a different branding than 'Pxl' on this instance of Pxl. That is normal, since I have added an option to configure the
web application's name to your own branding.</p>
</div>
</div>
</div>
</div>
{% endblock %} | {% extends 'partials/page.twig' %}
{% block title %}About Pxl{% endblock %}
{% block content %}
<div class="section">
<div class="row">
<div class="col s12 m12">
<div class="welcome-msg">
<div class="center"><img src="{{ asset('img/logo/Px-logo-cut-small.png') }}"></div>
<h2 class="center">Open Source Image Sharing</h2>
<p>Pxl is Max Korlaar's open source image sharing and hosting platform built on the concept of Pxl.lt.</p>
<img src="{{ asset('img/about/gallery_screenshot.png') }}" class="responsive-img right">
<p>The project is built on top of the PHP framework Laravel and may be freely forked on Github.
If you would like to contribute to the project, you are entirely free to do so.</p>
<p>Unlike Pxl.lt, this project is intended to be fully self-hosted and managed. I do not provide a free or paid service to the public,
in the hopes of people enjoying the project themselves and improving it. Pxl does have a feature to allow public registrations, but for private instances
you should keep this disabled.</p>
<p>You might see a different branding than 'Pxl' on this instance of Pxl. That is normal, since I have added an option to configure the
web application's name to your own branding.</p>
<p><a class="btn blue" href="//pxl.maxkorlaar.com">Visit Pxl's website for more info</a></p>
</div>
</div>
</div>
</div>
{% endblock %} | Add button linking to site | Add button linking to site
| Twig | mit | MaxKorlaar/Pxl,MaxKorlaar/Pxl,MaxKorlaar/Pxl | twig | ## Code Before:
{% extends 'partials/page.twig' %}
{% block title %}About Pxl{% endblock %}
{% block content %}
<div class="section">
<div class="row">
<div class="col s12 m12">
<div class="welcome-msg">
<div class="center"><img src="{{ asset('img/logo/Px-logo-cut-small.png') }}"></div>
<h2 class="center">Open Source Image Sharing</h2>
<p>Pxl is Max Korlaar's open source image sharing and hosting platform built on the concept of Pxl.lt.</p>
<img src="{{ asset('img/about/gallery_screenshot.png') }}" class="responsive-img right">
<p>The project is built on top of the PHP framework Laravel and may be freely forked on Github.
If you would like to contribute to the project, you are entirely free to do so.</p>
<p>Unlike Pxl.lt, this project is intended to be fully self-hosted and managed. I do not provide a free or paid service to the public,
in the hopes of people enjoying the project themselves and improving it. Pxl does have a feature to allow public registrations, but for private instances
you should keep this disabled.</p>
<p>You might see a different branding than 'Pxl' on this instance of Pxl. That is normal, since I have added an option to configure the
web application's name to your own branding.</p>
</div>
</div>
</div>
</div>
{% endblock %}
## Instruction:
Add button linking to site
## Code After:
{% extends 'partials/page.twig' %}
{% block title %}About Pxl{% endblock %}
{% block content %}
<div class="section">
<div class="row">
<div class="col s12 m12">
<div class="welcome-msg">
<div class="center"><img src="{{ asset('img/logo/Px-logo-cut-small.png') }}"></div>
<h2 class="center">Open Source Image Sharing</h2>
<p>Pxl is Max Korlaar's open source image sharing and hosting platform built on the concept of Pxl.lt.</p>
<img src="{{ asset('img/about/gallery_screenshot.png') }}" class="responsive-img right">
<p>The project is built on top of the PHP framework Laravel and may be freely forked on Github.
If you would like to contribute to the project, you are entirely free to do so.</p>
<p>Unlike Pxl.lt, this project is intended to be fully self-hosted and managed. I do not provide a free or paid service to the public,
in the hopes of people enjoying the project themselves and improving it. Pxl does have a feature to allow public registrations, but for private instances
you should keep this disabled.</p>
<p>You might see a different branding than 'Pxl' on this instance of Pxl. That is normal, since I have added an option to configure the
web application's name to your own branding.</p>
<p><a class="btn blue" href="//pxl.maxkorlaar.com">Visit Pxl's website for more info</a></p>
</div>
</div>
</div>
</div>
{% endblock %} | {% extends 'partials/page.twig' %}
{% block title %}About Pxl{% endblock %}
{% block content %}
<div class="section">
<div class="row">
<div class="col s12 m12">
<div class="welcome-msg">
<div class="center"><img src="{{ asset('img/logo/Px-logo-cut-small.png') }}"></div>
<h2 class="center">Open Source Image Sharing</h2>
<p>Pxl is Max Korlaar's open source image sharing and hosting platform built on the concept of Pxl.lt.</p>
<img src="{{ asset('img/about/gallery_screenshot.png') }}" class="responsive-img right">
<p>The project is built on top of the PHP framework Laravel and may be freely forked on Github.
If you would like to contribute to the project, you are entirely free to do so.</p>
<p>Unlike Pxl.lt, this project is intended to be fully self-hosted and managed. I do not provide a free or paid service to the public,
in the hopes of people enjoying the project themselves and improving it. Pxl does have a feature to allow public registrations, but for private instances
you should keep this disabled.</p>
<p>You might see a different branding than 'Pxl' on this instance of Pxl. That is normal, since I have added an option to configure the
web application's name to your own branding.</p>
-
+ <p><a class="btn blue" href="//pxl.maxkorlaar.com">Visit Pxl's website for more info</a></p>
</div>
</div>
</div>
</div>
{% endblock %} | 2 | 0.083333 | 1 | 1 |
022cfde2bc9ee014f9cf3a329455930ee4fec48e | bin/updateos.sh | bin/updateos.sh | sudo apt-get update
sudo apt-get upgrade -y --force-yes
sudo apt-get dist-upgrade -y --force-yes
sudo apt-get autoclean
| sudo apt update && \
sudo apt upgrade -y && \
sudo apt dist-upgrade -y && \
sudo apt autoclean
| Use apt instead of apt-get | Use apt instead of apt-get
* Add && to stop next command if current command error
* Remove --force-yes
| Shell | apache-2.0 | elleryq/oh-my-home,elleryq/oh-my-home,elleryq/oh-my-home | shell | ## Code Before:
sudo apt-get update
sudo apt-get upgrade -y --force-yes
sudo apt-get dist-upgrade -y --force-yes
sudo apt-get autoclean
## Instruction:
Use apt instead of apt-get
* Add && to stop next command if current command error
* Remove --force-yes
## Code After:
sudo apt update && \
sudo apt upgrade -y && \
sudo apt dist-upgrade -y && \
sudo apt autoclean
| - sudo apt-get update
? ----
+ sudo apt update && \
? ++++
- sudo apt-get upgrade -y --force-yes
- sudo apt-get dist-upgrade -y --force-yes
+ sudo apt upgrade -y && \
+ sudo apt dist-upgrade -y && \
- sudo apt-get autoclean
? ----
+ sudo apt autoclean
? ++++
- | 9 | 1.8 | 4 | 5 |
05145b215dd8fde82fb19f0f7bec2bc3be4f6d49 | tools/testenv/mysql-create-schema.sh | tools/testenv/mysql-create-schema.sh |
echo "MySQL: creating schema"
SCHEMA="$(readlink -e $(dirname $0)/../../config/contrib/sql/schema-mysql.sql)"
test ! -z "$1" && SCHEMA="$1"
DBPASS=""
test ! -z "$OXI_TEST_DB_MYSQL_DBPASSWORD" && DBPASS="-p$OXI_TEST_DB_MYSQL_DBPASSWORD" || true
mysql \
-h $OXI_TEST_DB_MYSQL_DBHOST -P $OXI_TEST_DB_MYSQL_DBPORT \
-u$OXI_TEST_DB_MYSQL_DBUSER $DBPASS \
$OXI_TEST_DB_MYSQL_NAME \
< "$SCHEMA"
# Give privileges to hardcoded frontend session user (must be done after table creation)
cat <<__SQL | mysql -h $OXI_TEST_DB_MYSQL_DBHOST -P $OXI_TEST_DB_MYSQL_DBPORT -u$OXI_TEST_DB_MYSQL_DBUSER $DBPASS
GRANT SELECT, INSERT, UPDATE, DELETE ON $OXI_TEST_DB_MYSQL_NAME.frontend_session TO 'openxpki_session'@'%';
flush privileges;
__SQL
|
echo "MySQL: creating schema"
SCHEMA="$OXI_TEST_SAMPLECONFIG_DIR/contrib/sql/schema-mysql.sql"
test ! -z "$1" && SCHEMA="$1"
DBPASS=""
test ! -z "$OXI_TEST_DB_MYSQL_DBPASSWORD" && DBPASS="-p$OXI_TEST_DB_MYSQL_DBPASSWORD" || true
mysql \
-h $OXI_TEST_DB_MYSQL_DBHOST -P $OXI_TEST_DB_MYSQL_DBPORT \
-u$OXI_TEST_DB_MYSQL_DBUSER $DBPASS \
$OXI_TEST_DB_MYSQL_NAME \
< "$SCHEMA"
# Give privileges to hardcoded frontend session user (must be done after table creation)
cat <<__SQL | mysql -h $OXI_TEST_DB_MYSQL_DBHOST -P $OXI_TEST_DB_MYSQL_DBPORT -u$OXI_TEST_DB_MYSQL_DBUSER $DBPASS
GRANT SELECT, INSERT, UPDATE, DELETE ON $OXI_TEST_DB_MYSQL_NAME.frontend_session TO 'openxpki_session'@'%';
flush privileges;
__SQL
| Fix config source path in Docker MySQL setup | Fix config source path in Docker MySQL setup
| Shell | apache-2.0 | openxpki/openxpki,oliwel/openxpki,oliwel/openxpki,oliwel/openxpki,openxpki/openxpki,oliwel/openxpki,oliwel/openxpki,openxpki/openxpki,openxpki/openxpki,oliwel/openxpki | shell | ## Code Before:
echo "MySQL: creating schema"
SCHEMA="$(readlink -e $(dirname $0)/../../config/contrib/sql/schema-mysql.sql)"
test ! -z "$1" && SCHEMA="$1"
DBPASS=""
test ! -z "$OXI_TEST_DB_MYSQL_DBPASSWORD" && DBPASS="-p$OXI_TEST_DB_MYSQL_DBPASSWORD" || true
mysql \
-h $OXI_TEST_DB_MYSQL_DBHOST -P $OXI_TEST_DB_MYSQL_DBPORT \
-u$OXI_TEST_DB_MYSQL_DBUSER $DBPASS \
$OXI_TEST_DB_MYSQL_NAME \
< "$SCHEMA"
# Give privileges to hardcoded frontend session user (must be done after table creation)
cat <<__SQL | mysql -h $OXI_TEST_DB_MYSQL_DBHOST -P $OXI_TEST_DB_MYSQL_DBPORT -u$OXI_TEST_DB_MYSQL_DBUSER $DBPASS
GRANT SELECT, INSERT, UPDATE, DELETE ON $OXI_TEST_DB_MYSQL_NAME.frontend_session TO 'openxpki_session'@'%';
flush privileges;
__SQL
## Instruction:
Fix config source path in Docker MySQL setup
## Code After:
echo "MySQL: creating schema"
SCHEMA="$OXI_TEST_SAMPLECONFIG_DIR/contrib/sql/schema-mysql.sql"
test ! -z "$1" && SCHEMA="$1"
DBPASS=""
test ! -z "$OXI_TEST_DB_MYSQL_DBPASSWORD" && DBPASS="-p$OXI_TEST_DB_MYSQL_DBPASSWORD" || true
mysql \
-h $OXI_TEST_DB_MYSQL_DBHOST -P $OXI_TEST_DB_MYSQL_DBPORT \
-u$OXI_TEST_DB_MYSQL_DBUSER $DBPASS \
$OXI_TEST_DB_MYSQL_NAME \
< "$SCHEMA"
# Give privileges to hardcoded frontend session user (must be done after table creation)
cat <<__SQL | mysql -h $OXI_TEST_DB_MYSQL_DBHOST -P $OXI_TEST_DB_MYSQL_DBPORT -u$OXI_TEST_DB_MYSQL_DBUSER $DBPASS
GRANT SELECT, INSERT, UPDATE, DELETE ON $OXI_TEST_DB_MYSQL_NAME.frontend_session TO 'openxpki_session'@'%';
flush privileges;
__SQL
|
echo "MySQL: creating schema"
- SCHEMA="$(readlink -e $(dirname $0)/../../config/contrib/sql/schema-mysql.sql)"
+ SCHEMA="$OXI_TEST_SAMPLECONFIG_DIR/contrib/sql/schema-mysql.sql"
test ! -z "$1" && SCHEMA="$1"
DBPASS=""
test ! -z "$OXI_TEST_DB_MYSQL_DBPASSWORD" && DBPASS="-p$OXI_TEST_DB_MYSQL_DBPASSWORD" || true
mysql \
-h $OXI_TEST_DB_MYSQL_DBHOST -P $OXI_TEST_DB_MYSQL_DBPORT \
-u$OXI_TEST_DB_MYSQL_DBUSER $DBPASS \
$OXI_TEST_DB_MYSQL_NAME \
< "$SCHEMA"
# Give privileges to hardcoded frontend session user (must be done after table creation)
cat <<__SQL | mysql -h $OXI_TEST_DB_MYSQL_DBHOST -P $OXI_TEST_DB_MYSQL_DBPORT -u$OXI_TEST_DB_MYSQL_DBUSER $DBPASS
GRANT SELECT, INSERT, UPDATE, DELETE ON $OXI_TEST_DB_MYSQL_NAME.frontend_session TO 'openxpki_session'@'%';
flush privileges;
__SQL | 2 | 0.1 | 1 | 1 |
e49b51acea7c8ecc10d19bdad7b6e7fb5c76b9cd | recipes-support/suxi-tools/sunxi-tools_git.bb | recipes-support/suxi-tools/sunxi-tools_git.bb | DESCRIPTION = "Tools to help hacking Allwinner A10"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PV = "1.0+git${SRCPV}"
PKGV = "1.0+git${GITPKGV}"
PR = "r1"
SRCREV = "1f5056275a6c026f308ac6f7ae52125c390d1d7c"
SRC_URI = "git://github.com/amery/sunxi-tools.git;protocol=git"
S = "${WORKDIR}/git"
FILES_${PN} = "${bindir}/*"
do_compile() {
cd ${S}
${CC} -I./include nand-part.c -o nand-part
}
do_install() {
install -d ${D}/${bindir}
install -m 755 ${S}/nand-part ${D}/${bindir}
} | DESCRIPTION = "Tools to help hacking Allwinner A10"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PV = "1.0+git${SRCPV}"
PKGV = "1.0+git${GITPKGV}"
PR = "r2"
SRCREV = "ed6f7969d80b91048b0ed95ccb61cc98f46fead7"
DEPENDS += "libusb"
SRC_URI = "git://github.com/linux-sunxi/sunxi-tools;protocol=git"
S = "${WORKDIR}/git"
BBCLASSEXTEND = "native nativesdk"
FILES_${PN} = "${bindir}/*"
CFLAGS = "-std=c99 -D_POSIX_C_SOURCE=200112L -I./include"
do_install() {
install -d ${D}/${bindir}
install -m 755 ${S}/bootinfo ${D}/${bindir}
install -m 755 ${S}/bin2fex ${D}/${bindir}
install -m 755 ${S}/fel ${D}/${bindir}
install -m 755 ${S}/fel-gpio ${D}/${bindir}
install -m 755 ${S}/fex2bin ${D}/${bindir}
install -m 755 ${S}/fexc ${D}/${bindir}
install -m 755 ${S}/nand-part ${D}/${bindir}
install -m 755 ${S}/pio ${D}/${bindir}
install -m 755 ${S}/usb-boot ${D}/${bindir}
} | Update sunxi-tools repository, and install all tools | Update sunxi-tools repository, and install all tools
| BitBake | mit | geomatsi/meta-sunxi,soderstrom-rikard/meta-sunxi,linux-sunxi/meta-sunxi,rofehr/meta-sunxi,rofehr/meta-sunxi,O-Computers/meta-sunxi,soderstrom-rikard/meta-sunxi,O-Computers/meta-sunxi,rofehr/meta-sunxi,jlucius/meta-sunxi,ebutera/meta-sunxi,twoerner/meta-sunxi,twoerner/meta-sunxi,geomatsi/meta-sunxi,remahl/meta-sunxi,net147/meta-sunxi,jlucius/meta-sunxi,linux-sunxi/meta-sunxi,ebutera/meta-sunxi,linux-sunxi/meta-sunxi,O-Computers/meta-sunxi,net147/meta-sunxi,jlucius/meta-sunxi | bitbake | ## Code Before:
DESCRIPTION = "Tools to help hacking Allwinner A10"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PV = "1.0+git${SRCPV}"
PKGV = "1.0+git${GITPKGV}"
PR = "r1"
SRCREV = "1f5056275a6c026f308ac6f7ae52125c390d1d7c"
SRC_URI = "git://github.com/amery/sunxi-tools.git;protocol=git"
S = "${WORKDIR}/git"
FILES_${PN} = "${bindir}/*"
do_compile() {
cd ${S}
${CC} -I./include nand-part.c -o nand-part
}
do_install() {
install -d ${D}/${bindir}
install -m 755 ${S}/nand-part ${D}/${bindir}
}
## Instruction:
Update sunxi-tools repository, and install all tools
## Code After:
DESCRIPTION = "Tools to help hacking Allwinner A10"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PV = "1.0+git${SRCPV}"
PKGV = "1.0+git${GITPKGV}"
PR = "r2"
SRCREV = "ed6f7969d80b91048b0ed95ccb61cc98f46fead7"
DEPENDS += "libusb"
SRC_URI = "git://github.com/linux-sunxi/sunxi-tools;protocol=git"
S = "${WORKDIR}/git"
BBCLASSEXTEND = "native nativesdk"
FILES_${PN} = "${bindir}/*"
CFLAGS = "-std=c99 -D_POSIX_C_SOURCE=200112L -I./include"
do_install() {
install -d ${D}/${bindir}
install -m 755 ${S}/bootinfo ${D}/${bindir}
install -m 755 ${S}/bin2fex ${D}/${bindir}
install -m 755 ${S}/fel ${D}/${bindir}
install -m 755 ${S}/fel-gpio ${D}/${bindir}
install -m 755 ${S}/fex2bin ${D}/${bindir}
install -m 755 ${S}/fexc ${D}/${bindir}
install -m 755 ${S}/nand-part ${D}/${bindir}
install -m 755 ${S}/pio ${D}/${bindir}
install -m 755 ${S}/usb-boot ${D}/${bindir}
} | DESCRIPTION = "Tools to help hacking Allwinner A10"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PV = "1.0+git${SRCPV}"
PKGV = "1.0+git${GITPKGV}"
- PR = "r1"
? ^
+ PR = "r2"
? ^
- SRCREV = "1f5056275a6c026f308ac6f7ae52125c390d1d7c"
+ SRCREV = "ed6f7969d80b91048b0ed95ccb61cc98f46fead7"
+ DEPENDS += "libusb"
+
- SRC_URI = "git://github.com/amery/sunxi-tools.git;protocol=git"
? ^^^^^ ----
+ SRC_URI = "git://github.com/linux-sunxi/sunxi-tools;protocol=git"
? ^^^^^^^^^^^
S = "${WORKDIR}/git"
+ BBCLASSEXTEND = "native nativesdk"
+
FILES_${PN} = "${bindir}/*"
+ CFLAGS = "-std=c99 -D_POSIX_C_SOURCE=200112L -I./include"
- do_compile() {
- cd ${S}
- ${CC} -I./include nand-part.c -o nand-part
- }
do_install() {
install -d ${D}/${bindir}
+ install -m 755 ${S}/bootinfo ${D}/${bindir}
+ install -m 755 ${S}/bin2fex ${D}/${bindir}
+ install -m 755 ${S}/fel ${D}/${bindir}
+ install -m 755 ${S}/fel-gpio ${D}/${bindir}
+ install -m 755 ${S}/fex2bin ${D}/${bindir}
+ install -m 755 ${S}/fexc ${D}/${bindir}
install -m 755 ${S}/nand-part ${D}/${bindir}
+ install -m 755 ${S}/pio ${D}/${bindir}
+ install -m 755 ${S}/usb-boot ${D}/${bindir}
} | 23 | 0.92 | 16 | 7 |
2d9e6279046d872c2ee038ca537d476f31f68e8d | test/e2e/ephemeral/ephemeral_app_completed_scaled_driver.sh | test/e2e/ephemeral/ephemeral_app_completed_scaled_driver.sh | TEST_DIR=$(readlink -f `dirname "${BASH_SOURCE[0]}"` | grep -o '.*/oshinko-s2i/test/e2e')
source $TEST_DIR/common
set_worker_count $S2I_TEST_WORKERS
function ephemeral_app_completed_scaled_driver() {
set_defaults
clear_spark_sleep
run_app true
os::cmd::try_until_success 'oc get dc "$MASTER_DC"' $((2*minute))
os::cmd::try_until_success 'oc get dc "$WORKER_DC"'
DRIVER=$(oc get pod -l deploymentconfig=$APP_NAME --template='{{index .items 0 "metadata" "name"}}')
os::cmd::try_until_text 'oc logs "$DRIVER"' 'Running Spark' $((5*minute))
os::cmd::expect_success 'oc scale dc/"$APP_NAME" --replicas=2'
os::cmd::try_until_text 'oc logs "$DRIVER"' 'Deleting cluster' $((5*minute))
os::cmd::try_until_text 'oc logs "$DRIVER"' 'driver replica count > 0'
os::cmd::try_until_text 'oc logs "$DRIVER"' 'cluster not deleted'
cleanup_app $DRIVER
}
os::test::junit::declare_suite_start "$MY_SCRIPT"
# Make the S2I test image if it's not already in the project
make_image
ephemeral_app_completed_scaled_driver
os::test::junit::declare_suite_end
| TEST_DIR=$(readlink -f `dirname "${BASH_SOURCE[0]}"` | grep -o '.*/oshinko-s2i/test/e2e')
source $TEST_DIR/common
set_worker_count $S2I_TEST_WORKERS
function ephemeral_app_completed_scaled_driver() {
set_defaults
clear_spark_sleep
run_app true
os::cmd::try_until_success 'oc get dc "$MASTER_DC"' $((2*minute))
os::cmd::try_until_success 'oc get dc "$WORKER_DC"'
DRIVER=$(oc get pod -l deploymentconfig=$APP_NAME --template='{{index .items 0 "metadata" "name"}}')
os::cmd::try_until_text 'oc logs "$DRIVER"' 'test app completed' $((5*minute))
os::cmd::expect_success 'oc scale dc/"$APP_NAME" --replicas=2'
os::cmd::try_until_text 'oc logs "$DRIVER"' 'Deleting cluster' $((5*minute))
os::cmd::try_until_text 'oc logs "$DRIVER"' 'driver replica count > 0'
os::cmd::try_until_text 'oc logs "$DRIVER"' 'cluster not deleted'
cleanup_app $DRIVER
}
os::test::junit::declare_suite_start "$MY_SCRIPT"
# Make the S2I test image if it's not already in the project
make_image
ephemeral_app_completed_scaled_driver
os::test::junit::declare_suite_end
| Modify ephemeral scaled driver test | Modify ephemeral scaled driver test
| Shell | apache-2.0 | rimolive/oshinko-s2i,rimolive/oshinko-s2i,rimolive/oshinko-s2i | shell | ## Code Before:
TEST_DIR=$(readlink -f `dirname "${BASH_SOURCE[0]}"` | grep -o '.*/oshinko-s2i/test/e2e')
source $TEST_DIR/common
set_worker_count $S2I_TEST_WORKERS
function ephemeral_app_completed_scaled_driver() {
set_defaults
clear_spark_sleep
run_app true
os::cmd::try_until_success 'oc get dc "$MASTER_DC"' $((2*minute))
os::cmd::try_until_success 'oc get dc "$WORKER_DC"'
DRIVER=$(oc get pod -l deploymentconfig=$APP_NAME --template='{{index .items 0 "metadata" "name"}}')
os::cmd::try_until_text 'oc logs "$DRIVER"' 'Running Spark' $((5*minute))
os::cmd::expect_success 'oc scale dc/"$APP_NAME" --replicas=2'
os::cmd::try_until_text 'oc logs "$DRIVER"' 'Deleting cluster' $((5*minute))
os::cmd::try_until_text 'oc logs "$DRIVER"' 'driver replica count > 0'
os::cmd::try_until_text 'oc logs "$DRIVER"' 'cluster not deleted'
cleanup_app $DRIVER
}
os::test::junit::declare_suite_start "$MY_SCRIPT"
# Make the S2I test image if it's not already in the project
make_image
ephemeral_app_completed_scaled_driver
os::test::junit::declare_suite_end
## Instruction:
Modify ephemeral scaled driver test
## Code After:
TEST_DIR=$(readlink -f `dirname "${BASH_SOURCE[0]}"` | grep -o '.*/oshinko-s2i/test/e2e')
source $TEST_DIR/common
set_worker_count $S2I_TEST_WORKERS
function ephemeral_app_completed_scaled_driver() {
set_defaults
clear_spark_sleep
run_app true
os::cmd::try_until_success 'oc get dc "$MASTER_DC"' $((2*minute))
os::cmd::try_until_success 'oc get dc "$WORKER_DC"'
DRIVER=$(oc get pod -l deploymentconfig=$APP_NAME --template='{{index .items 0 "metadata" "name"}}')
os::cmd::try_until_text 'oc logs "$DRIVER"' 'test app completed' $((5*minute))
os::cmd::expect_success 'oc scale dc/"$APP_NAME" --replicas=2'
os::cmd::try_until_text 'oc logs "$DRIVER"' 'Deleting cluster' $((5*minute))
os::cmd::try_until_text 'oc logs "$DRIVER"' 'driver replica count > 0'
os::cmd::try_until_text 'oc logs "$DRIVER"' 'cluster not deleted'
cleanup_app $DRIVER
}
os::test::junit::declare_suite_start "$MY_SCRIPT"
# Make the S2I test image if it's not already in the project
make_image
ephemeral_app_completed_scaled_driver
os::test::junit::declare_suite_end
| TEST_DIR=$(readlink -f `dirname "${BASH_SOURCE[0]}"` | grep -o '.*/oshinko-s2i/test/e2e')
source $TEST_DIR/common
set_worker_count $S2I_TEST_WORKERS
function ephemeral_app_completed_scaled_driver() {
set_defaults
clear_spark_sleep
run_app true
os::cmd::try_until_success 'oc get dc "$MASTER_DC"' $((2*minute))
os::cmd::try_until_success 'oc get dc "$WORKER_DC"'
DRIVER=$(oc get pod -l deploymentconfig=$APP_NAME --template='{{index .items 0 "metadata" "name"}}')
- os::cmd::try_until_text 'oc logs "$DRIVER"' 'Running Spark' $((5*minute))
? ^^^^^^^ ^ ^^^
+ os::cmd::try_until_text 'oc logs "$DRIVER"' 'test app completed' $((5*minute))
? ^^^^ ^ ^^^^^^^^^^^
os::cmd::expect_success 'oc scale dc/"$APP_NAME" --replicas=2'
os::cmd::try_until_text 'oc logs "$DRIVER"' 'Deleting cluster' $((5*minute))
os::cmd::try_until_text 'oc logs "$DRIVER"' 'driver replica count > 0'
os::cmd::try_until_text 'oc logs "$DRIVER"' 'cluster not deleted'
cleanup_app $DRIVER
}
os::test::junit::declare_suite_start "$MY_SCRIPT"
# Make the S2I test image if it's not already in the project
make_image
ephemeral_app_completed_scaled_driver
os::test::junit::declare_suite_end | 2 | 0.0625 | 1 | 1 |
36069921ca5f874885d297d94a7712ee0a065cfd | InstallSelfSignedCert.ps1 | InstallSelfSignedCert.ps1 | $cert = New-SelfSignedCertificate -DnsName ("localtest.me","*.localtest.me") -CertStoreLocation cert:\LocalMachine\My
$rootStore = Get-Item cert:\LocalMachine\Root
$rootStore.Open("ReadWrite")
$rootStore.Add($cert)
$rootStore.Close();
Import-Module WebAdministration
Set-Location IIS:\SslBindings
New-WebBinding -Name "Kitos" -IP "*" -Port 44300 -Protocol https
$cert | New-Item 0.0.0.0!44300 | $cert = New-SelfSignedCertificate -DnsName ("localtest.me","*.localtest.me") -CertStoreLocation cert:\LocalMachine\My
$rootStore = Get-Item cert:\LocalMachine\Root
$rootStore.Open("ReadWrite")
$rootStore.Add($cert)
$rootStore.Close();
Import-Module WebAdministration
Set-Location IIS:\SslBindings
New-WebBinding -Name "Default Web Site" -IP "*" -Port 443 -Protocol https
$cert | New-Item 0.0.0.0!443
| Use default script for self signing. | Use default script for self signing.
| PowerShell | mpl-2.0 | miracle-as/kitos,os2kitos/kitos,miracle-as/kitos,os2kitos/kitos,miracle-as/kitos,miracle-as/kitos,os2kitos/kitos,os2kitos/kitos | powershell | ## Code Before:
$cert = New-SelfSignedCertificate -DnsName ("localtest.me","*.localtest.me") -CertStoreLocation cert:\LocalMachine\My
$rootStore = Get-Item cert:\LocalMachine\Root
$rootStore.Open("ReadWrite")
$rootStore.Add($cert)
$rootStore.Close();
Import-Module WebAdministration
Set-Location IIS:\SslBindings
New-WebBinding -Name "Kitos" -IP "*" -Port 44300 -Protocol https
$cert | New-Item 0.0.0.0!44300
## Instruction:
Use default script for self signing.
## Code After:
$cert = New-SelfSignedCertificate -DnsName ("localtest.me","*.localtest.me") -CertStoreLocation cert:\LocalMachine\My
$rootStore = Get-Item cert:\LocalMachine\Root
$rootStore.Open("ReadWrite")
$rootStore.Add($cert)
$rootStore.Close();
Import-Module WebAdministration
Set-Location IIS:\SslBindings
New-WebBinding -Name "Default Web Site" -IP "*" -Port 443 -Protocol https
$cert | New-Item 0.0.0.0!443
| $cert = New-SelfSignedCertificate -DnsName ("localtest.me","*.localtest.me") -CertStoreLocation cert:\LocalMachine\My
$rootStore = Get-Item cert:\LocalMachine\Root
$rootStore.Open("ReadWrite")
$rootStore.Add($cert)
$rootStore.Close();
Import-Module WebAdministration
Set-Location IIS:\SslBindings
- New-WebBinding -Name "Kitos" -IP "*" -Port 44300 -Protocol https
? ^ ^^ --
+ New-WebBinding -Name "Default Web Site" -IP "*" -Port 443 -Protocol https
? ^^^^^^^^^^^^^ ^
- $cert | New-Item 0.0.0.0!44300
? --
+ $cert | New-Item 0.0.0.0!443 | 4 | 0.444444 | 2 | 2 |
7c22f9c1532452081be0cfce05c9f23291d8ef0f | README.md | README.md | Symfony Polyfill / Intl: Normalizer
===================================
This component provides a fallback implementation for the
[`Normalizer`](http://php.net/manual/en/class.normalizer.php) class provided
by the [Intl](http://php.net/intl) extension.
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
License
=======
This library is released under the [MIT license](LICENSE).
| Symfony Polyfill / Intl: Normalizer
===================================
This component provides a fallback implementation for the
[`Normalizer`](https://php.net/Normalizer) class provided
by the [Intl](https://php.net/intl) extension.
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
License
=======
This library is released under the [MIT license](LICENSE).
| Add link in intl idn readme | Add link in intl idn readme
| Markdown | mit | symfony/polyfill-intl-normalizer | markdown | ## Code Before:
Symfony Polyfill / Intl: Normalizer
===================================
This component provides a fallback implementation for the
[`Normalizer`](http://php.net/manual/en/class.normalizer.php) class provided
by the [Intl](http://php.net/intl) extension.
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
License
=======
This library is released under the [MIT license](LICENSE).
## Instruction:
Add link in intl idn readme
## Code After:
Symfony Polyfill / Intl: Normalizer
===================================
This component provides a fallback implementation for the
[`Normalizer`](https://php.net/Normalizer) class provided
by the [Intl](https://php.net/intl) extension.
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
License
=======
This library is released under the [MIT license](LICENSE).
| Symfony Polyfill / Intl: Normalizer
===================================
This component provides a fallback implementation for the
- [`Normalizer`](http://php.net/manual/en/class.normalizer.php) class provided
? ^^^^^^^^^^^^^^^^^ ----
+ [`Normalizer`](https://php.net/Normalizer) class provided
? + ^
- by the [Intl](http://php.net/intl) extension.
+ by the [Intl](https://php.net/intl) extension.
? +
More information can be found in the
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
License
=======
This library is released under the [MIT license](LICENSE). | 4 | 0.285714 | 2 | 2 |
6196d5ac4af07488b5a3a2b71ee8c985eab9615d | src/client/react/scss/components/_loading-spinner.scss | src/client/react/scss/components/_loading-spinner.scss | $logo-size: 3.5rem;
.loading-spinner {
.pt-spinner:after {
content: '';
width: $logo-size;
height: $logo-size;
background-image: url('/images/logo_gray.png');
background-size: $logo-size;
display: block;
position: relative;
margin: auto;
margin-top: -5rem;
margin-bottom: 2rem;
}
}
| $logo-size: 3.5rem;
.loading-spinner {
.pt-spinner:after {
content: '';
width: $logo-size;
height: $logo-size;
background-image: url('/images/logo_gray.png');
background-size: $logo-size;
display: block;
position: relative;
margin: auto;
margin-top: -5rem;
margin-bottom: 2rem;
animation: pt-spinner-animation 4s infinite;
}
}
| Add a little animation to the custom loader to make it more interesting | [ADD] Add a little animation to the custom loader to make it more interesting
| SCSS | mit | bwyap/ptc-amazing-g-race,bwyap/ptc-amazing-g-race | scss | ## Code Before:
$logo-size: 3.5rem;
.loading-spinner {
.pt-spinner:after {
content: '';
width: $logo-size;
height: $logo-size;
background-image: url('/images/logo_gray.png');
background-size: $logo-size;
display: block;
position: relative;
margin: auto;
margin-top: -5rem;
margin-bottom: 2rem;
}
}
## Instruction:
[ADD] Add a little animation to the custom loader to make it more interesting
## Code After:
$logo-size: 3.5rem;
.loading-spinner {
.pt-spinner:after {
content: '';
width: $logo-size;
height: $logo-size;
background-image: url('/images/logo_gray.png');
background-size: $logo-size;
display: block;
position: relative;
margin: auto;
margin-top: -5rem;
margin-bottom: 2rem;
animation: pt-spinner-animation 4s infinite;
}
}
| $logo-size: 3.5rem;
.loading-spinner {
.pt-spinner:after {
content: '';
width: $logo-size;
height: $logo-size;
background-image: url('/images/logo_gray.png');
background-size: $logo-size;
display: block;
position: relative;
margin: auto;
margin-top: -5rem;
margin-bottom: 2rem;
+ animation: pt-spinner-animation 4s infinite;
}
} | 1 | 0.0625 | 1 | 0 |
43a277b6de8f6387d68533a4a5b2a1ee869202c6 | js/src/util.js | js/src/util.js | /** Wrap DOM selector methods:
* document.querySelector,
* document.getElementById,
* document.getElementsByClassName]
*/
const dom = {
query(arg) {
return document.querySelector(arg);
},
id(arg) {
return document.getElementById(arg);
},
class(arg) {
return document.getElementsByClassName(arg);
},
};
/**
* Returns a (nested) propery from an object, or undefined if it doesn't exist
* @param {String | Array} props - An array of properties or a single property
* @param {Object | Array} obj
*/
const path = (props, obj) => {
let nested = obj;
const properties = typeof props === 'string' ? props.split('.') : props;
for (let i = 0; i < properties.length; i++) {
nested = nested[properties[i]];
if (nested === undefined) {
return nested;
}
}
return nested;
};
module.exports = {
dom,
path,
};
| /** Wrap DOM selector methods:
* document.querySelector,
* document.getElementById,
* document.getElementsByClassName]
*/
const dom = {
query(arg) {
return document.querySelector(arg);
},
id(arg) {
return document.getElementById(arg);
},
class(arg) {
return document.getElementsByClassName(arg);
},
};
/**
* Returns a (nested) propery from an object, or undefined if it doesn't exist
* @param {String | Array} props - An array of properties or a single property
* @param {Object | Array} obj
*/
const path = (props, obj) => {
let nested = obj;
const properties = typeof props === 'string' ? props.split('.') : props;
for (const property of properties) {
nested = nested[property];
if (nested === undefined) {
return nested;
}
}
return nested;
};
/**
* Converts a string to proper case (e.g. 'camera' => 'Camera')
* @param {String} text
* @returns {String}
*/
const properCase = text => `${text[0].toUpperCase()}${text.slice(1)}`;
module.exports = {
dom,
path,
properCase,
};
| Add properCase. Use 'for-of' statement in path. | Add properCase. Use 'for-of' statement in path.
| JavaScript | mit | opentok/accelerator-core-js,adrice727/accelerator-core-js,opentok/accelerator-core-js,adrice727/accelerator-core-js | javascript | ## Code Before:
/** Wrap DOM selector methods:
* document.querySelector,
* document.getElementById,
* document.getElementsByClassName]
*/
const dom = {
query(arg) {
return document.querySelector(arg);
},
id(arg) {
return document.getElementById(arg);
},
class(arg) {
return document.getElementsByClassName(arg);
},
};
/**
* Returns a (nested) propery from an object, or undefined if it doesn't exist
* @param {String | Array} props - An array of properties or a single property
* @param {Object | Array} obj
*/
const path = (props, obj) => {
let nested = obj;
const properties = typeof props === 'string' ? props.split('.') : props;
for (let i = 0; i < properties.length; i++) {
nested = nested[properties[i]];
if (nested === undefined) {
return nested;
}
}
return nested;
};
module.exports = {
dom,
path,
};
## Instruction:
Add properCase. Use 'for-of' statement in path.
## Code After:
/** Wrap DOM selector methods:
* document.querySelector,
* document.getElementById,
* document.getElementsByClassName]
*/
const dom = {
query(arg) {
return document.querySelector(arg);
},
id(arg) {
return document.getElementById(arg);
},
class(arg) {
return document.getElementsByClassName(arg);
},
};
/**
* Returns a (nested) propery from an object, or undefined if it doesn't exist
* @param {String | Array} props - An array of properties or a single property
* @param {Object | Array} obj
*/
const path = (props, obj) => {
let nested = obj;
const properties = typeof props === 'string' ? props.split('.') : props;
for (const property of properties) {
nested = nested[property];
if (nested === undefined) {
return nested;
}
}
return nested;
};
/**
* Converts a string to proper case (e.g. 'camera' => 'Camera')
* @param {String} text
* @returns {String}
*/
const properCase = text => `${text[0].toUpperCase()}${text.slice(1)}`;
module.exports = {
dom,
path,
properCase,
};
| /** Wrap DOM selector methods:
* document.querySelector,
* document.getElementById,
* document.getElementsByClassName]
*/
const dom = {
query(arg) {
return document.querySelector(arg);
},
id(arg) {
return document.getElementById(arg);
},
class(arg) {
return document.getElementsByClassName(arg);
},
};
/**
* Returns a (nested) propery from an object, or undefined if it doesn't exist
* @param {String | Array} props - An array of properties or a single property
* @param {Object | Array} obj
*/
const path = (props, obj) => {
let nested = obj;
const properties = typeof props === 'string' ? props.split('.') : props;
- for (let i = 0; i < properties.length; i++) {
+ for (const property of properties) {
- nested = nested[properties[i]];
? ^^^^^^
+ nested = nested[property];
? ^
if (nested === undefined) {
return nested;
}
}
return nested;
};
+ /**
+ * Converts a string to proper case (e.g. 'camera' => 'Camera')
+ * @param {String} text
+ * @returns {String}
+ */
+ const properCase = text => `${text[0].toUpperCase()}${text.slice(1)}`;
+
module.exports = {
dom,
path,
+ properCase,
}; | 12 | 0.3 | 10 | 2 |
f3dd55f6106d2c9da0e9e840e76c10f80963f484 | frontend/src/app/modules/result-selection/components/chart-switch-menu/chart-switch-menu.component.html | frontend/src/app/modules/result-selection/components/chart-switch-menu/chart-switch-menu.component.html | <h1>
<span *ngFor="let chart of chartSwitchMenu">
<a *ngIf="!router.url.startsWith(chart.baseUrl)" [href]="chart.baseUrl" class="btn">
<i [ngClass]="chart.icon"></i>
</a>
<span *ngIf="router.url.startsWith(chart.baseUrl)">
{{ chart.label | translate }} (Dev)
</span>
</span>
</h1>
| <h1>
<span *ngFor="let chart of chartSwitchMenu">
<span *ngIf="router.url.startsWith(chart.baseUrl); else showIcon">
{{ chart.label | translate }} (Dev)
</span>
<ng-template #showIcon>
<a [href]="chart.baseUrl" class="btn">
<i [ngClass]="chart.icon"></i>
</a>
</ng-template>
</span>
</h1>
| Change two ngIfs to ngIf-else. | Change two ngIfs to ngIf-else.
| HTML | apache-2.0 | iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor,iteratec/OpenSpeedMonitor | html | ## Code Before:
<h1>
<span *ngFor="let chart of chartSwitchMenu">
<a *ngIf="!router.url.startsWith(chart.baseUrl)" [href]="chart.baseUrl" class="btn">
<i [ngClass]="chart.icon"></i>
</a>
<span *ngIf="router.url.startsWith(chart.baseUrl)">
{{ chart.label | translate }} (Dev)
</span>
</span>
</h1>
## Instruction:
Change two ngIfs to ngIf-else.
## Code After:
<h1>
<span *ngFor="let chart of chartSwitchMenu">
<span *ngIf="router.url.startsWith(chart.baseUrl); else showIcon">
{{ chart.label | translate }} (Dev)
</span>
<ng-template #showIcon>
<a [href]="chart.baseUrl" class="btn">
<i [ngClass]="chart.icon"></i>
</a>
</ng-template>
</span>
</h1>
| <h1>
<span *ngFor="let chart of chartSwitchMenu">
- <a *ngIf="!router.url.startsWith(chart.baseUrl)" [href]="chart.baseUrl" class="btn">
+ <span *ngIf="router.url.startsWith(chart.baseUrl); else showIcon">
+ {{ chart.label | translate }} (Dev)
+ </span>
+ <ng-template #showIcon>
+ <a [href]="chart.baseUrl" class="btn">
<i [ngClass]="chart.icon"></i>
</a>
+ </ng-template>
- <span *ngIf="router.url.startsWith(chart.baseUrl)">
- {{ chart.label | translate }} (Dev)
- </span>
</span>
</h1> | 10 | 1 | 6 | 4 |
70909528e9ba50de8b7790f5c24f5cf13c1aa14e | Cargo.toml | Cargo.toml | [workspace]
# Python and R binding are not added as members here yet until more developed
members = ["rust", "cli", "node"]
[profile.release]
# Settings that help reduce the binary size based on https://github.com/johnthagen/min-sized-rust
lto = true
codegen-units = 1
panic = 'abort'
| [workspace]
# Python and R binding are not added as members here yet until more developed
members = ["rust", "cli", "node"]
[profile.release]
# Settings that help reduce the binary size based on https://github.com/johnthagen/min-sized-rust
lto = true
codegen-units = 1
# Currently, disable `panic = 'abort'` given that it causes the linking error described here
# https://stackoverflow.com/questions/39844260/how-to-use-panic-abort-with-external-dependencies
# because the crate `human_name` specifies `dylib` as one of its library types.
# panic = 'abort'
| Disable panic = 'abort' to avoid linker error | chore(Build): Disable panic = 'abort' to avoid linker error
| TOML | apache-2.0 | stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila | toml | ## Code Before:
[workspace]
# Python and R binding are not added as members here yet until more developed
members = ["rust", "cli", "node"]
[profile.release]
# Settings that help reduce the binary size based on https://github.com/johnthagen/min-sized-rust
lto = true
codegen-units = 1
panic = 'abort'
## Instruction:
chore(Build): Disable panic = 'abort' to avoid linker error
## Code After:
[workspace]
# Python and R binding are not added as members here yet until more developed
members = ["rust", "cli", "node"]
[profile.release]
# Settings that help reduce the binary size based on https://github.com/johnthagen/min-sized-rust
lto = true
codegen-units = 1
# Currently, disable `panic = 'abort'` given that it causes the linking error described here
# https://stackoverflow.com/questions/39844260/how-to-use-panic-abort-with-external-dependencies
# because the crate `human_name` specifies `dylib` as one of its library types.
# panic = 'abort'
| [workspace]
# Python and R binding are not added as members here yet until more developed
members = ["rust", "cli", "node"]
[profile.release]
# Settings that help reduce the binary size based on https://github.com/johnthagen/min-sized-rust
lto = true
codegen-units = 1
+ # Currently, disable `panic = 'abort'` given that it causes the linking error described here
+ # https://stackoverflow.com/questions/39844260/how-to-use-panic-abort-with-external-dependencies
+ # because the crate `human_name` specifies `dylib` as one of its library types.
- panic = 'abort'
+ # panic = 'abort'
? ++
| 5 | 0.5 | 4 | 1 |
be276f27d69146aafde08c960ea038aad19b2585 | ansible/roles/wordpress/tasks/main.yml | ansible/roles/wordpress/tasks/main.yml |
- name: Check whether WordPress is already installed
stat:
path: "{{ wp_path_config_php }}"
register: _wp_config_php_stat
- name: "Backup"
include: '{{ "backup.yml" if play_backup is match("yes") else "noop.yml" }}'
- name: "Create or restore (if requested)"
include: '{{ "create-or-restore.yml" if play_create_or_restore is match("yes") else "noop.yml" }}'
- name: "Update themes and plugins (if requested)"
include: '{{ "update.yml" if play_update is match("yes") else "noop.yml" }}'
- name: "Dump (if requested)"
include: '{{ "dump.yml" if (play_dump is match("yes")) and (dump_local_dir is defined) else "noop.yml" }}'
- name: "Undump WXR (if requested)"
include: '{{ "undump.yml" if (play_undump is match("yes")) and (undump_local_dir is defined) else "noop.yml" }}'
|
- name: Check whether WordPress is already installed
stat:
path: "{{ wp_path_config_php }}"
register: _wp_config_php_stat
- name: "Backup"
include: '{{ "backup.yml" if play_backup is match("yes") else "noop.yml" }}'
- name: "Create or restore (if requested)"
include: '{{ "create-or-restore.yml" if play_create_or_restore is match("yes") else "noop.yml" }}'
- name: "Update themes and plugins (if requested)"
include: '{{ "update.yml" if play_update is match("yes") else "noop.yml" }}'
- name: "Dump (if requested)"
include: '{{ "dump.yml" if (play_dump is match("yes") and dump_local_dir is defined) else "noop.yml" }}'
- name: "Undump WXR (if requested)"
include: '{{ "undump.yml" if (play_undump is match("yes") and undump_local_dir is defined and wp_can.write_data) else "noop.yml" }}'
| Fix dump / undump guards | Fix dump / undump guards
| YAML | mit | epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp | yaml | ## Code Before:
- name: Check whether WordPress is already installed
stat:
path: "{{ wp_path_config_php }}"
register: _wp_config_php_stat
- name: "Backup"
include: '{{ "backup.yml" if play_backup is match("yes") else "noop.yml" }}'
- name: "Create or restore (if requested)"
include: '{{ "create-or-restore.yml" if play_create_or_restore is match("yes") else "noop.yml" }}'
- name: "Update themes and plugins (if requested)"
include: '{{ "update.yml" if play_update is match("yes") else "noop.yml" }}'
- name: "Dump (if requested)"
include: '{{ "dump.yml" if (play_dump is match("yes")) and (dump_local_dir is defined) else "noop.yml" }}'
- name: "Undump WXR (if requested)"
include: '{{ "undump.yml" if (play_undump is match("yes")) and (undump_local_dir is defined) else "noop.yml" }}'
## Instruction:
Fix dump / undump guards
## Code After:
- name: Check whether WordPress is already installed
stat:
path: "{{ wp_path_config_php }}"
register: _wp_config_php_stat
- name: "Backup"
include: '{{ "backup.yml" if play_backup is match("yes") else "noop.yml" }}'
- name: "Create or restore (if requested)"
include: '{{ "create-or-restore.yml" if play_create_or_restore is match("yes") else "noop.yml" }}'
- name: "Update themes and plugins (if requested)"
include: '{{ "update.yml" if play_update is match("yes") else "noop.yml" }}'
- name: "Dump (if requested)"
include: '{{ "dump.yml" if (play_dump is match("yes") and dump_local_dir is defined) else "noop.yml" }}'
- name: "Undump WXR (if requested)"
include: '{{ "undump.yml" if (play_undump is match("yes") and undump_local_dir is defined and wp_can.write_data) else "noop.yml" }}'
|
- name: Check whether WordPress is already installed
stat:
path: "{{ wp_path_config_php }}"
register: _wp_config_php_stat
- name: "Backup"
include: '{{ "backup.yml" if play_backup is match("yes") else "noop.yml" }}'
- name: "Create or restore (if requested)"
include: '{{ "create-or-restore.yml" if play_create_or_restore is match("yes") else "noop.yml" }}'
- name: "Update themes and plugins (if requested)"
include: '{{ "update.yml" if play_update is match("yes") else "noop.yml" }}'
- name: "Dump (if requested)"
- include: '{{ "dump.yml" if (play_dump is match("yes")) and (dump_local_dir is defined) else "noop.yml" }}'
? - -
+ include: '{{ "dump.yml" if (play_dump is match("yes") and dump_local_dir is defined) else "noop.yml" }}'
- name: "Undump WXR (if requested)"
- include: '{{ "undump.yml" if (play_undump is match("yes")) and (undump_local_dir is defined) else "noop.yml" }}'
? - -
+ include: '{{ "undump.yml" if (play_undump is match("yes") and undump_local_dir is defined and wp_can.write_data) else "noop.yml" }}'
? ++++++++++++++++++++++
| 4 | 0.2 | 2 | 2 |
2674f597f3c2a7e9b2e30edf4daff7c518ffb6ad | apps/ello_events/lib/ello_events/mark_notifications_as_read.ex | apps/ello_events/lib/ello_events/mark_notifications_as_read.ex | defmodule Ello.Events.MarkNotificationsAsRead do
use Ello.Events.Sidekiq
defstruct [
user_id: nil,
last_notification_time: 0,
]
def args(struct) do
[
user: struct.user_id,
last_notification_time: struct.last_notification_time,
]
end
end
| defmodule Ello.Events.MarkNotificationsAsRead do
use Ello.Events.Sidekiq
defstruct [
user_id: nil,
last_notification_time: 0,
]
def args(struct) do
[
%{
user: struct.user_id,
last_notification_time: struct.last_notification_time,
}
]
end
end
| Fix marking notifications as read take 2. | Fix marking notifications as read take 2.
| Elixir | mit | ello/apex,ello/apex,ello/apex | elixir | ## Code Before:
defmodule Ello.Events.MarkNotificationsAsRead do
use Ello.Events.Sidekiq
defstruct [
user_id: nil,
last_notification_time: 0,
]
def args(struct) do
[
user: struct.user_id,
last_notification_time: struct.last_notification_time,
]
end
end
## Instruction:
Fix marking notifications as read take 2.
## Code After:
defmodule Ello.Events.MarkNotificationsAsRead do
use Ello.Events.Sidekiq
defstruct [
user_id: nil,
last_notification_time: 0,
]
def args(struct) do
[
%{
user: struct.user_id,
last_notification_time: struct.last_notification_time,
}
]
end
end
| defmodule Ello.Events.MarkNotificationsAsRead do
use Ello.Events.Sidekiq
defstruct [
user_id: nil,
last_notification_time: 0,
]
def args(struct) do
[
+ %{
- user: struct.user_id,
+ user: struct.user_id,
? ++
- last_notification_time: struct.last_notification_time,
+ last_notification_time: struct.last_notification_time,
? ++
+ }
]
end
end | 6 | 0.4 | 4 | 2 |
3791011ae62c41baa54027bfc951b3d99919cb5a | src/Baum/Extensions/Eloquent/Collection.php | src/Baum/Extensions/Eloquent/Collection.php | <?php
namespace Baum\Extensions\Eloquent;
use Illuminate\Database\Eloquent\Collection as BaseCollection;
class Collection extends BaseCollection {
public function toHierarchy() {
$dict = $this->getDictionary();
return new BaseCollection($this->hierarchical($dict));
}
protected function hierarchical($result) {
foreach($result as $key => $node)
$node->setRelation('children', new BaseCollection);
$nestedKeys = array();
foreach($result as $key => $node) {
$parentKey = $node->getParentId();
if ( !is_null($parentKey) && array_key_exists($parentKey, $result) ) {
$result[$parentKey]->children[] = $node;
$nestedKeys[] = $node->getKey();
}
}
foreach($nestedKeys as $key)
unset($result[$key]);
return $result;
}
}
| <?php
namespace Baum\Extensions\Eloquent;
use Illuminate\Database\Eloquent\Collection as BaseCollection;
class Collection extends BaseCollection {
public function toHierarchy() {
$dict = $this->getDictionary();
// sort based on orderColumn
uasort($dict, function($a, $b){
return ($a->getOrder() >= $b->getOrder()) ? 1 : -1;
});
return new BaseCollection($this->hierarchical($dict));
}
protected function hierarchical($result) {
foreach($result as $key => $node)
$node->setRelation('children', new BaseCollection);
$nestedKeys = array();
foreach($result as $key => $node) {
$parentKey = $node->getParentId();
if ( !is_null($parentKey) && array_key_exists($parentKey, $result) ) {
$result[$parentKey]->children[] = $node;
$nestedKeys[] = $node->getKey();
}
}
foreach($nestedKeys as $key)
unset($result[$key]);
return $result;
}
}
| Sort hierarchy tree by $orderColumn | Sort hierarchy tree by $orderColumn | PHP | mit | atorscho/baum,masterakado/baum,unikent/baum,etrepat/baum,retroconduct/baum,sebdesign/baum | php | ## Code Before:
<?php
namespace Baum\Extensions\Eloquent;
use Illuminate\Database\Eloquent\Collection as BaseCollection;
class Collection extends BaseCollection {
public function toHierarchy() {
$dict = $this->getDictionary();
return new BaseCollection($this->hierarchical($dict));
}
protected function hierarchical($result) {
foreach($result as $key => $node)
$node->setRelation('children', new BaseCollection);
$nestedKeys = array();
foreach($result as $key => $node) {
$parentKey = $node->getParentId();
if ( !is_null($parentKey) && array_key_exists($parentKey, $result) ) {
$result[$parentKey]->children[] = $node;
$nestedKeys[] = $node->getKey();
}
}
foreach($nestedKeys as $key)
unset($result[$key]);
return $result;
}
}
## Instruction:
Sort hierarchy tree by $orderColumn
## Code After:
<?php
namespace Baum\Extensions\Eloquent;
use Illuminate\Database\Eloquent\Collection as BaseCollection;
class Collection extends BaseCollection {
public function toHierarchy() {
$dict = $this->getDictionary();
// sort based on orderColumn
uasort($dict, function($a, $b){
return ($a->getOrder() >= $b->getOrder()) ? 1 : -1;
});
return new BaseCollection($this->hierarchical($dict));
}
protected function hierarchical($result) {
foreach($result as $key => $node)
$node->setRelation('children', new BaseCollection);
$nestedKeys = array();
foreach($result as $key => $node) {
$parentKey = $node->getParentId();
if ( !is_null($parentKey) && array_key_exists($parentKey, $result) ) {
$result[$parentKey]->children[] = $node;
$nestedKeys[] = $node->getKey();
}
}
foreach($nestedKeys as $key)
unset($result[$key]);
return $result;
}
}
| <?php
namespace Baum\Extensions\Eloquent;
use Illuminate\Database\Eloquent\Collection as BaseCollection;
class Collection extends BaseCollection {
public function toHierarchy() {
$dict = $this->getDictionary();
+
+ // sort based on orderColumn
+ uasort($dict, function($a, $b){
+ return ($a->getOrder() >= $b->getOrder()) ? 1 : -1;
+ });
return new BaseCollection($this->hierarchical($dict));
}
protected function hierarchical($result) {
foreach($result as $key => $node)
$node->setRelation('children', new BaseCollection);
$nestedKeys = array();
foreach($result as $key => $node) {
$parentKey = $node->getParentId();
if ( !is_null($parentKey) && array_key_exists($parentKey, $result) ) {
$result[$parentKey]->children[] = $node;
$nestedKeys[] = $node->getKey();
}
}
foreach($nestedKeys as $key)
unset($result[$key]);
return $result;
}
} | 5 | 0.138889 | 5 | 0 |
4b9dd36799c9c44957c571e2f0ea590036bafd8e | tests/Functional/Command/ValidateCommandTest.php | tests/Functional/Command/ValidateCommandTest.php | <?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\Tests\Functional\Command;
use Overblog\GraphQLBundle\Tests\Functional\TestCase;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Tester\CommandTester;
class ValidateCommandTest extends TestCase
{
/** @var Command */
private $command;
/** @var CommandTester */
private $commandTester;
public function setUp(): void
{
parent::setUp();
static::bootKernel(['test_case' => 'validation']);
$this->command = static::$kernel->getContainer()->get('overblog_graphql.command.validate');
$this->commandTester = new CommandTester($this->command);
}
public function testValidSchema(): void
{
$this->commandTester->execute([]);
$this->assertEquals(0, $this->commandTester->getStatusCode());
$this->assertEquals('No error', \trim($this->commandTester->getDisplay()));
}
}
| <?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\Tests\Functional\Command;
use GraphQL\Error\InvariantViolation;
use Overblog\GraphQLBundle\Command\ValidateCommand;
use Overblog\GraphQLBundle\Definition\Type\ExtensibleSchema;
use Overblog\GraphQLBundle\Request\Executor;
use Overblog\GraphQLBundle\Tests\Functional\TestCase;
use Symfony\Component\Console\Tester\CommandTester;
class ValidateCommandTest extends TestCase
{
/** @var ValidateCommand */
private $command;
/** @var CommandTester */
private $commandTester;
public function setUp(): void
{
parent::setUp();
static::bootKernel(['test_case' => 'validation']);
$this->command = static::$kernel->getContainer()->get('overblog_graphql.command.validate');
$this->commandTester = new CommandTester($this->command);
}
public function testValidSchema(): void
{
$this->commandTester->execute([]);
$this->assertEquals(0, $this->commandTester->getStatusCode());
$this->assertEquals('No error', \trim($this->commandTester->getDisplay()));
}
public function testValidSchemaThrowException(): void
{
$schema = $this->getMockBuilder(ExtensibleSchema::class)
->disableOriginalConstructor()
->setMethods(['assertValid'])
->getMock();
$executor = $this->getMockBuilder(Executor::class)
->disableOriginalConstructor()
->setMethods(['getSchema'])
->getMock();
$executor->expects($this->once())->method('getSchema')
->with('foo')
->willReturn($schema);
$schema->expects($this->once())->method('assertValid')->willThrowException(new InvariantViolation('broken schema'));
$this->command->setRequestExecutorFactory([function () use ($executor) {
return $executor;
}, []]);
$this->commandTester->execute(['--schema' => 'foo']);
$this->assertEquals(0, $this->commandTester->getStatusCode());
$this->assertEquals('broken schema', \trim($this->commandTester->getDisplay()));
}
}
| Add test for validSchemaCommand throwException | Add test for validSchemaCommand throwException
| PHP | mit | overblog/GraphQLBundle | php | ## Code Before:
<?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\Tests\Functional\Command;
use Overblog\GraphQLBundle\Tests\Functional\TestCase;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Tester\CommandTester;
class ValidateCommandTest extends TestCase
{
/** @var Command */
private $command;
/** @var CommandTester */
private $commandTester;
public function setUp(): void
{
parent::setUp();
static::bootKernel(['test_case' => 'validation']);
$this->command = static::$kernel->getContainer()->get('overblog_graphql.command.validate');
$this->commandTester = new CommandTester($this->command);
}
public function testValidSchema(): void
{
$this->commandTester->execute([]);
$this->assertEquals(0, $this->commandTester->getStatusCode());
$this->assertEquals('No error', \trim($this->commandTester->getDisplay()));
}
}
## Instruction:
Add test for validSchemaCommand throwException
## Code After:
<?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\Tests\Functional\Command;
use GraphQL\Error\InvariantViolation;
use Overblog\GraphQLBundle\Command\ValidateCommand;
use Overblog\GraphQLBundle\Definition\Type\ExtensibleSchema;
use Overblog\GraphQLBundle\Request\Executor;
use Overblog\GraphQLBundle\Tests\Functional\TestCase;
use Symfony\Component\Console\Tester\CommandTester;
class ValidateCommandTest extends TestCase
{
/** @var ValidateCommand */
private $command;
/** @var CommandTester */
private $commandTester;
public function setUp(): void
{
parent::setUp();
static::bootKernel(['test_case' => 'validation']);
$this->command = static::$kernel->getContainer()->get('overblog_graphql.command.validate');
$this->commandTester = new CommandTester($this->command);
}
public function testValidSchema(): void
{
$this->commandTester->execute([]);
$this->assertEquals(0, $this->commandTester->getStatusCode());
$this->assertEquals('No error', \trim($this->commandTester->getDisplay()));
}
public function testValidSchemaThrowException(): void
{
$schema = $this->getMockBuilder(ExtensibleSchema::class)
->disableOriginalConstructor()
->setMethods(['assertValid'])
->getMock();
$executor = $this->getMockBuilder(Executor::class)
->disableOriginalConstructor()
->setMethods(['getSchema'])
->getMock();
$executor->expects($this->once())->method('getSchema')
->with('foo')
->willReturn($schema);
$schema->expects($this->once())->method('assertValid')->willThrowException(new InvariantViolation('broken schema'));
$this->command->setRequestExecutorFactory([function () use ($executor) {
return $executor;
}, []]);
$this->commandTester->execute(['--schema' => 'foo']);
$this->assertEquals(0, $this->commandTester->getStatusCode());
$this->assertEquals('broken schema', \trim($this->commandTester->getDisplay()));
}
}
| <?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\Tests\Functional\Command;
+ use GraphQL\Error\InvariantViolation;
+ use Overblog\GraphQLBundle\Command\ValidateCommand;
+ use Overblog\GraphQLBundle\Definition\Type\ExtensibleSchema;
+ use Overblog\GraphQLBundle\Request\Executor;
use Overblog\GraphQLBundle\Tests\Functional\TestCase;
- use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Tester\CommandTester;
class ValidateCommandTest extends TestCase
{
- /** @var Command */
+ /** @var ValidateCommand */
? ++++++++
private $command;
/** @var CommandTester */
private $commandTester;
public function setUp(): void
{
parent::setUp();
static::bootKernel(['test_case' => 'validation']);
$this->command = static::$kernel->getContainer()->get('overblog_graphql.command.validate');
$this->commandTester = new CommandTester($this->command);
}
public function testValidSchema(): void
{
$this->commandTester->execute([]);
$this->assertEquals(0, $this->commandTester->getStatusCode());
$this->assertEquals('No error', \trim($this->commandTester->getDisplay()));
}
+
+ public function testValidSchemaThrowException(): void
+ {
+ $schema = $this->getMockBuilder(ExtensibleSchema::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['assertValid'])
+ ->getMock();
+ $executor = $this->getMockBuilder(Executor::class)
+ ->disableOriginalConstructor()
+ ->setMethods(['getSchema'])
+ ->getMock();
+
+ $executor->expects($this->once())->method('getSchema')
+ ->with('foo')
+ ->willReturn($schema);
+ $schema->expects($this->once())->method('assertValid')->willThrowException(new InvariantViolation('broken schema'));
+
+ $this->command->setRequestExecutorFactory([function () use ($executor) {
+ return $executor;
+ }, []]);
+
+ $this->commandTester->execute(['--schema' => 'foo']);
+ $this->assertEquals(0, $this->commandTester->getStatusCode());
+ $this->assertEquals('broken schema', \trim($this->commandTester->getDisplay()));
+ }
} | 32 | 0.941176 | 30 | 2 |
0152bd20e95a4205892c2fc52296b0bee65a594e | locales/tl/experiments.ftl | locales/tl/experiments.ftl | activitystreamDescription = Ang masaganang visual na kasaysayan sa feed at isang reimagined home page magiging mas madali upang mahanap nang eksakto kung ano ang iyong hinahanap para sa Firefox.
minvidContributors0Title = Engineer
minvidContributors1Title = Staff Engineer
minvidContributors2Title = Engineering Intern
minvidContributors3Title = Engineering Contributor
nomore404sSubtitle = Powered by the Wayback Machine
nomore404sDetails1Copy = Ibinahagi sayo ng ating mga kaibigan at ng Internet Archive.
universalsearchContributors3Title = Senior Engineer
universalsearchEolwarning = Awtomatiko naming i-disable ang eksperimento sa Universal Search at mag-ulat ng mga resulta kapag ito ay nagtatapos.
| activitystreamDescription = Ang masaganang visual na kasaysayan sa feed at isang reimagined home page magiging mas madali upang mahanap nang eksakto kung ano ang iyong hinahanap para sa Firefox.
activitystreamContributors1Title = Web Engineer
activitystreamContributors2Title = Software Developer
activitystreamContributors3Title = Desktop Firefox Engineer
activitystreamContributors4Title = Software Engineer
activitystreamContributors5Title = Technical Program Manager
activitystreamContributors6Title = Cloud Services Engineer
activitystreamContributors7Title = Engineering Intern
activitystreamContributors8Title = Engineering Intern
activitystreamContributors9Title = Product Manager
activitystreamContributors10Title = Engineering Manager
activitystreamContributors11Title = Software Engineer
activitystreamContributors12Title = Senior UX Designer
minvidContributors0Title = Engineer
minvidContributors1Title = Staff Engineer
minvidContributors2Title = Engineering Intern
minvidContributors3Title = Engineering Contributor
nomore404sSubtitle = Powered by the Wayback Machine
nomore404sDetails1Copy = Ibinahagi sayo ng ating mga kaibigan at ng Internet Archive.
pageshotContributors0TitleEngineer = Software Engineer
pageshotContributors1Title = Software Engineer
pageshotContributors2Title = UX Designer
universalsearchContributors0Title = Product Manager
universalsearchContributors1Title = Senior UX Designer
universalsearchContributors2Title = Staff Engineer
universalsearchContributors3Title = Senior Engineer
universalsearchEolwarning = Awtomatiko naming i-disable ang eksperimento sa Universal Search at mag-ulat ng mga resulta kapag ito ay nagtatapos.
| Update Tagalog (tl) localization of Test Pilot Website | Pontoon: Update Tagalog (tl) localization of Test Pilot Website
Localization authors:
- Frederick Villaluna <fv_comscie@yahoo.com>
| FreeMarker | mpl-2.0 | fzzzy/testpilot,mozilla/idea-town-server,lmorchard/idea-town-server,chuckharmston/testpilot,lmorchard/idea-town-server,chuckharmston/testpilot,meandavejustice/testpilot,flodolo/testpilot,mathjazz/testpilot,flodolo/testpilot,mathjazz/testpilot,mathjazz/testpilot,meandavejustice/testpilot,meandavejustice/testpilot,mozilla/idea-town,mozilla/idea-town,lmorchard/idea-town-server,lmorchard/testpilot,lmorchard/idea-town,mathjazz/testpilot,mozilla/idea-town-server,mozilla/idea-town,chuckharmston/testpilot,fzzzy/testpilot,chuckharmston/testpilot,lmorchard/idea-town,lmorchard/idea-town,flodolo/testpilot,mozilla/idea-town-server,mozilla/idea-town,lmorchard/idea-town-server,fzzzy/testpilot,meandavejustice/testpilot,mozilla/idea-town-server,fzzzy/testpilot,flodolo/testpilot,lmorchard/testpilot,lmorchard/testpilot,lmorchard/idea-town,lmorchard/testpilot | freemarker | ## Code Before:
activitystreamDescription = Ang masaganang visual na kasaysayan sa feed at isang reimagined home page magiging mas madali upang mahanap nang eksakto kung ano ang iyong hinahanap para sa Firefox.
minvidContributors0Title = Engineer
minvidContributors1Title = Staff Engineer
minvidContributors2Title = Engineering Intern
minvidContributors3Title = Engineering Contributor
nomore404sSubtitle = Powered by the Wayback Machine
nomore404sDetails1Copy = Ibinahagi sayo ng ating mga kaibigan at ng Internet Archive.
universalsearchContributors3Title = Senior Engineer
universalsearchEolwarning = Awtomatiko naming i-disable ang eksperimento sa Universal Search at mag-ulat ng mga resulta kapag ito ay nagtatapos.
## Instruction:
Pontoon: Update Tagalog (tl) localization of Test Pilot Website
Localization authors:
- Frederick Villaluna <fv_comscie@yahoo.com>
## Code After:
activitystreamDescription = Ang masaganang visual na kasaysayan sa feed at isang reimagined home page magiging mas madali upang mahanap nang eksakto kung ano ang iyong hinahanap para sa Firefox.
activitystreamContributors1Title = Web Engineer
activitystreamContributors2Title = Software Developer
activitystreamContributors3Title = Desktop Firefox Engineer
activitystreamContributors4Title = Software Engineer
activitystreamContributors5Title = Technical Program Manager
activitystreamContributors6Title = Cloud Services Engineer
activitystreamContributors7Title = Engineering Intern
activitystreamContributors8Title = Engineering Intern
activitystreamContributors9Title = Product Manager
activitystreamContributors10Title = Engineering Manager
activitystreamContributors11Title = Software Engineer
activitystreamContributors12Title = Senior UX Designer
minvidContributors0Title = Engineer
minvidContributors1Title = Staff Engineer
minvidContributors2Title = Engineering Intern
minvidContributors3Title = Engineering Contributor
nomore404sSubtitle = Powered by the Wayback Machine
nomore404sDetails1Copy = Ibinahagi sayo ng ating mga kaibigan at ng Internet Archive.
pageshotContributors0TitleEngineer = Software Engineer
pageshotContributors1Title = Software Engineer
pageshotContributors2Title = UX Designer
universalsearchContributors0Title = Product Manager
universalsearchContributors1Title = Senior UX Designer
universalsearchContributors2Title = Staff Engineer
universalsearchContributors3Title = Senior Engineer
universalsearchEolwarning = Awtomatiko naming i-disable ang eksperimento sa Universal Search at mag-ulat ng mga resulta kapag ito ay nagtatapos.
| activitystreamDescription = Ang masaganang visual na kasaysayan sa feed at isang reimagined home page magiging mas madali upang mahanap nang eksakto kung ano ang iyong hinahanap para sa Firefox.
+ activitystreamContributors1Title = Web Engineer
+ activitystreamContributors2Title = Software Developer
+ activitystreamContributors3Title = Desktop Firefox Engineer
+ activitystreamContributors4Title = Software Engineer
+ activitystreamContributors5Title = Technical Program Manager
+ activitystreamContributors6Title = Cloud Services Engineer
+ activitystreamContributors7Title = Engineering Intern
+ activitystreamContributors8Title = Engineering Intern
+ activitystreamContributors9Title = Product Manager
+ activitystreamContributors10Title = Engineering Manager
+ activitystreamContributors11Title = Software Engineer
+ activitystreamContributors12Title = Senior UX Designer
minvidContributors0Title = Engineer
minvidContributors1Title = Staff Engineer
minvidContributors2Title = Engineering Intern
minvidContributors3Title = Engineering Contributor
nomore404sSubtitle = Powered by the Wayback Machine
nomore404sDetails1Copy = Ibinahagi sayo ng ating mga kaibigan at ng Internet Archive.
+ pageshotContributors0TitleEngineer = Software Engineer
+ pageshotContributors1Title = Software Engineer
+ pageshotContributors2Title = UX Designer
+ universalsearchContributors0Title = Product Manager
+ universalsearchContributors1Title = Senior UX Designer
+ universalsearchContributors2Title = Staff Engineer
universalsearchContributors3Title = Senior Engineer
universalsearchEolwarning = Awtomatiko naming i-disable ang eksperimento sa Universal Search at mag-ulat ng mga resulta kapag ito ay nagtatapos. | 18 | 2 | 18 | 0 |
1a7a761743a6f288e388b345879d8b694e06690d | gatsby-node.js | gatsby-node.js | const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const merge = require('lodash/merge');
const defaultOptions = {
logo: './src/favicon.png',
emitStats: true,
statsFilename: '.iconstats.json',
persistentCache: true,
inject: false,
appName: null,
appDescription: null,
developerName: null,
developerURL: null,
dir: 'auto',
lang: 'en-US',
background: '#fff',
theme_color: '#fff',
display: 'standalone',
orientation: 'any',
start_url: '/?homescreen=1',
version: '1.0',
icons: {
android: true,
appleIcon: true,
appleStartup: true,
coast: false,
favicons: true,
firefox: true,
opengraph: false,
twitter: false,
yandex: false,
windows: false,
},
};
module.exports.onCreateWebpackConfig = ({ actions, stage }, options) => {
if (stage === 'develop-html' || stage === 'build-html') {
let finalOptions = {};
merge(finalOptions, defaultOptions, options);
actions.setWebpackConfig({
plugins: [
new FaviconsWebpackPlugin(finalOptions),
],
});
}
};
| const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const merge = require('lodash/merge');
const defaultOptions = {
logo: './src/favicon.png',
emitStats: true,
statsFilename: '.iconstats.json',
persistentCache: true,
inject: false,
appName: null,
appDescription: null,
developerName: null,
developerURL: null,
dir: 'auto',
lang: 'en-US',
background: '#fff',
theme_color: '#fff',
display: 'standalone',
orientation: 'any',
start_url: '/?homescreen=1',
version: '1.0',
icons: {
android: true,
appleIcon: true,
appleStartup: true,
coast: false,
favicons: true,
firefox: true,
opengraph: false,
twitter: false,
yandex: false,
windows: false,
},
};
function isHtmlStage(stage) {
return stage === 'develop-html' || stage === 'build-html';
}
function getOptions(options) {
let finalOptions = {};
merge(finalOptions, defaultOptions, options);
return finalOptions;
}
// Gatsby v1
module.exports.modifyWebpackConfig = ({ config, stage }, options) => {
if (isHtmlStage(stage)) {
config.plugin(`Favicon`, FaviconsWebpackPlugin, [getOptions(options)]):
}
};
// Gatsby v2
module.exports.onCreateWebpackConfig = ({ actions, stage }, options) => {
if (isHtmlStage(stage)) {
actions.setWebpackConfig({
plugins: [
new FaviconsWebpackPlugin(getOptions(options)),
],
});
}
};
| Add support back for Gatsby v1 | Add support back for Gatsby v1
| JavaScript | mit | Creatiwity/gatsby-plugin-favicon | javascript | ## Code Before:
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const merge = require('lodash/merge');
const defaultOptions = {
logo: './src/favicon.png',
emitStats: true,
statsFilename: '.iconstats.json',
persistentCache: true,
inject: false,
appName: null,
appDescription: null,
developerName: null,
developerURL: null,
dir: 'auto',
lang: 'en-US',
background: '#fff',
theme_color: '#fff',
display: 'standalone',
orientation: 'any',
start_url: '/?homescreen=1',
version: '1.0',
icons: {
android: true,
appleIcon: true,
appleStartup: true,
coast: false,
favicons: true,
firefox: true,
opengraph: false,
twitter: false,
yandex: false,
windows: false,
},
};
module.exports.onCreateWebpackConfig = ({ actions, stage }, options) => {
if (stage === 'develop-html' || stage === 'build-html') {
let finalOptions = {};
merge(finalOptions, defaultOptions, options);
actions.setWebpackConfig({
plugins: [
new FaviconsWebpackPlugin(finalOptions),
],
});
}
};
## Instruction:
Add support back for Gatsby v1
## Code After:
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const merge = require('lodash/merge');
const defaultOptions = {
logo: './src/favicon.png',
emitStats: true,
statsFilename: '.iconstats.json',
persistentCache: true,
inject: false,
appName: null,
appDescription: null,
developerName: null,
developerURL: null,
dir: 'auto',
lang: 'en-US',
background: '#fff',
theme_color: '#fff',
display: 'standalone',
orientation: 'any',
start_url: '/?homescreen=1',
version: '1.0',
icons: {
android: true,
appleIcon: true,
appleStartup: true,
coast: false,
favicons: true,
firefox: true,
opengraph: false,
twitter: false,
yandex: false,
windows: false,
},
};
function isHtmlStage(stage) {
return stage === 'develop-html' || stage === 'build-html';
}
function getOptions(options) {
let finalOptions = {};
merge(finalOptions, defaultOptions, options);
return finalOptions;
}
// Gatsby v1
module.exports.modifyWebpackConfig = ({ config, stage }, options) => {
if (isHtmlStage(stage)) {
config.plugin(`Favicon`, FaviconsWebpackPlugin, [getOptions(options)]):
}
};
// Gatsby v2
module.exports.onCreateWebpackConfig = ({ actions, stage }, options) => {
if (isHtmlStage(stage)) {
actions.setWebpackConfig({
plugins: [
new FaviconsWebpackPlugin(getOptions(options)),
],
});
}
};
| const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const merge = require('lodash/merge');
const defaultOptions = {
logo: './src/favicon.png',
emitStats: true,
statsFilename: '.iconstats.json',
persistentCache: true,
inject: false,
appName: null,
appDescription: null,
developerName: null,
developerURL: null,
dir: 'auto',
lang: 'en-US',
background: '#fff',
theme_color: '#fff',
display: 'standalone',
orientation: 'any',
start_url: '/?homescreen=1',
version: '1.0',
icons: {
android: true,
appleIcon: true,
appleStartup: true,
coast: false,
favicons: true,
firefox: true,
opengraph: false,
twitter: false,
yandex: false,
windows: false,
},
};
+ function isHtmlStage(stage) {
+ return stage === 'develop-html' || stage === 'build-html';
+ }
+
+ function getOptions(options) {
+ let finalOptions = {};
+ merge(finalOptions, defaultOptions, options);
+ return finalOptions;
+ }
+
+ // Gatsby v1
+ module.exports.modifyWebpackConfig = ({ config, stage }, options) => {
+ if (isHtmlStage(stage)) {
+ config.plugin(`Favicon`, FaviconsWebpackPlugin, [getOptions(options)]):
+ }
+ };
+
+ // Gatsby v2
module.exports.onCreateWebpackConfig = ({ actions, stage }, options) => {
+ if (isHtmlStage(stage)) {
- if (stage === 'develop-html' || stage === 'build-html') {
- let finalOptions = {};
- merge(finalOptions, defaultOptions, options);
-
actions.setWebpackConfig({
plugins: [
- new FaviconsWebpackPlugin(finalOptions),
? ^^^^^
+ new FaviconsWebpackPlugin(getOptions(options)),
? ^^^ +++++++++
],
});
}
}; | 25 | 0.510204 | 20 | 5 |
112b6a4008167c014e1691146a3c28e93e97fbdf | README.rst | README.rst | template-formula
================
A saltstack formula that is empty. It has dummy content to help with a quick start on a new formula.
| ================
template-formula
================
A saltstack formula that is empty. It has dummy content to help with a quick start on a new formula.
.. note::
See the full `Salt Formulas installation and usage instructions
<http://docs.saltstack.com/topics/conventions/formulas.html>`_.
| Add link to Salt Formula documentation | Add link to Salt Formula documentation
| reStructuredText | apache-2.0 | hoonetorg/template-formula | restructuredtext | ## Code Before:
template-formula
================
A saltstack formula that is empty. It has dummy content to help with a quick start on a new formula.
## Instruction:
Add link to Salt Formula documentation
## Code After:
================
template-formula
================
A saltstack formula that is empty. It has dummy content to help with a quick start on a new formula.
.. note::
See the full `Salt Formulas installation and usage instructions
<http://docs.saltstack.com/topics/conventions/formulas.html>`_.
| + ================
template-formula
================
A saltstack formula that is empty. It has dummy content to help with a quick start on a new formula.
+
+ .. note::
+
+ See the full `Salt Formulas installation and usage instructions
+ <http://docs.saltstack.com/topics/conventions/formulas.html>`_. | 6 | 1.5 | 6 | 0 |
834b7ff81d6e2777d3952bb588a53f12f5ace5f5 | setup.py | setup.py |
from distutils.core import setup
# If we did a straight `import regobj` here we wouldn't be able
# to build on non-win32 machines.
regobj = {}
try:
execfile("regobj.py",regobj)
except ImportError:
pass
VERSION = regobj["__version__"]
NAME = "regobj"
DESCRIPTION = "Pythonic object-based access to the Windows Registry."
LONG_DESC = regobj["__doc__"]
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "ryan@rfk.id.au"
URL="https://github.com/rfk/regobj"
LICENSE = "MIT"
KEYWORDS = "windows registry"
setup(name=NAME,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
description=DESCRIPTION,
long_description=LONG_DESC,
license=LICENSE,
keywords=KEYWORDS,
py_modules=["regobj"],
)
|
from distutils.core import setup
# If we did a straight `import regobj` here we wouldn't be able
# to build on non-win32 machines.
regobj = {}
try:
execfile("regobj.py",regobj)
except ImportError:
pass
VERSION = regobj["__version__"]
NAME = "regobj"
DESCRIPTION = "Pythonic object-based access to the Windows Registry."
LONG_DESC = regobj["__doc__"]
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "ryan@rfk.id.au"
URL="https://github.com/rfk/regobj"
LICENSE = "MIT"
KEYWORDS = "windows registry"
setup(name=NAME,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
description=DESCRIPTION,
long_description=LONG_DESC,
license=LICENSE,
keywords=KEYWORDS,
py_modules=["regobj"],
classifiers=[c.strip() for c in """
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Topic :: Software Development :: Libraries :: Python Modules
""".split('\n') if c.strip()],
)
| Add a Python 3 classifier recommended by community | Add a Python 3 classifier recommended by community
| Python | mit | rfk/regobj | python | ## Code Before:
from distutils.core import setup
# If we did a straight `import regobj` here we wouldn't be able
# to build on non-win32 machines.
regobj = {}
try:
execfile("regobj.py",regobj)
except ImportError:
pass
VERSION = regobj["__version__"]
NAME = "regobj"
DESCRIPTION = "Pythonic object-based access to the Windows Registry."
LONG_DESC = regobj["__doc__"]
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "ryan@rfk.id.au"
URL="https://github.com/rfk/regobj"
LICENSE = "MIT"
KEYWORDS = "windows registry"
setup(name=NAME,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
description=DESCRIPTION,
long_description=LONG_DESC,
license=LICENSE,
keywords=KEYWORDS,
py_modules=["regobj"],
)
## Instruction:
Add a Python 3 classifier recommended by community
## Code After:
from distutils.core import setup
# If we did a straight `import regobj` here we wouldn't be able
# to build on non-win32 machines.
regobj = {}
try:
execfile("regobj.py",regobj)
except ImportError:
pass
VERSION = regobj["__version__"]
NAME = "regobj"
DESCRIPTION = "Pythonic object-based access to the Windows Registry."
LONG_DESC = regobj["__doc__"]
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "ryan@rfk.id.au"
URL="https://github.com/rfk/regobj"
LICENSE = "MIT"
KEYWORDS = "windows registry"
setup(name=NAME,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
description=DESCRIPTION,
long_description=LONG_DESC,
license=LICENSE,
keywords=KEYWORDS,
py_modules=["regobj"],
classifiers=[c.strip() for c in """
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Topic :: Software Development :: Libraries :: Python Modules
""".split('\n') if c.strip()],
)
|
from distutils.core import setup
# If we did a straight `import regobj` here we wouldn't be able
# to build on non-win32 machines.
regobj = {}
try:
execfile("regobj.py",regobj)
except ImportError:
pass
VERSION = regobj["__version__"]
NAME = "regobj"
DESCRIPTION = "Pythonic object-based access to the Windows Registry."
LONG_DESC = regobj["__doc__"]
AUTHOR = "Ryan Kelly"
AUTHOR_EMAIL = "ryan@rfk.id.au"
URL="https://github.com/rfk/regobj"
LICENSE = "MIT"
KEYWORDS = "windows registry"
setup(name=NAME,
version=VERSION,
author=AUTHOR,
author_email=AUTHOR_EMAIL,
url=URL,
description=DESCRIPTION,
long_description=LONG_DESC,
license=LICENSE,
keywords=KEYWORDS,
py_modules=["regobj"],
+ classifiers=[c.strip() for c in """
+ Intended Audience :: Developers
+ License :: OSI Approved :: MIT License
+ Programming Language :: Python :: 2
+ Programming Language :: Python :: 3
+ Topic :: Software Development :: Libraries :: Python Modules
+ """.split('\n') if c.strip()],
)
| 7 | 0.212121 | 7 | 0 |
11af5f23fa6911d7f86f8bee4deb2eabe296492c | process_memory/process_usage.yml | process_memory/process_usage.yml | options:
command_name:
name: Command Name
notes: The name of the command to pull statistics for.
default: mongrel_rails
ps_command:
name: The Process Status (ps) Command
notes: The command with options. The default works on most systems.
default: ps auxww
ps_regex:
name: The regex used to match a command name.
notes: "By default, this matches a command name anywhere in the ps output line. The word COMMAND get's replaced with the command you gave (regex escaped). You may wish to try the following pattern if you only want to match a command in the last column: (?i:COMMAND\\s+$)"
default: "(?i:\\bCOMMAND\\b)"
metadata:
memory:
label: Memory Usage
units: MB
precision: 0
triggers:
- type: peak
dname: memory
max_value: 10
- type: trend
dname: memory
direction: UP
percentage_change: 20
duration: 60
window_reference: LAST_WEEK
min_value: 5 | options:
command_name:
name: Command Name
notes: The name of the command to pull statistics for.
default: mongrel_rails
ps_command:
name: The Process Status (ps) Command
notes: The command with options. The default works on most systems.
default: ps auxww
ps_regex:
name: The regex used to match a command name.
notes: "By default, this matches a command name anywhere in the ps output line. The word COMMAND get's replaced with the command you gave (regex escaped). You may wish to try the following pattern if you only want to match a command in the last column: (?i:COMMAND\\s+$)"
default: "(?i:\\bCOMMAND\\b)"
metadata:
memory:
label: Memory Usage
units: MB
precision: 0
restarts:
label: Restarts
units: ""
precision: 0
triggers:
- type: peak
dname: memory
max_value: 10
- type: trend
dname: memory
direction: UP
percentage_change: 20
duration: 60
window_reference: LAST_WEEK
min_value: 5
| Add precision for Restarts on ProcessUsage plugin. | Add precision for Restarts on ProcessUsage plugin.
| YAML | mit | envato/scout-plugins,envato/scout-plugins,pap/scout-plugins,scoutapp/scout-plugins,scoutapp/scout-plugins,skiold/scout-plugins,skiold/scout-plugins,pingdomserver/scout-plugins,envato/scout-plugins,scoutapp/scout-plugins,pingdomserver/scout-plugins,wenyanw/scout-plugins,pap/scout-plugins,skiold/scout-plugins,wenyanw/scout-plugins,pap/scout-plugins,pingdomserver/scout-plugins,wenyanw/scout-plugins | yaml | ## Code Before:
options:
command_name:
name: Command Name
notes: The name of the command to pull statistics for.
default: mongrel_rails
ps_command:
name: The Process Status (ps) Command
notes: The command with options. The default works on most systems.
default: ps auxww
ps_regex:
name: The regex used to match a command name.
notes: "By default, this matches a command name anywhere in the ps output line. The word COMMAND get's replaced with the command you gave (regex escaped). You may wish to try the following pattern if you only want to match a command in the last column: (?i:COMMAND\\s+$)"
default: "(?i:\\bCOMMAND\\b)"
metadata:
memory:
label: Memory Usage
units: MB
precision: 0
triggers:
- type: peak
dname: memory
max_value: 10
- type: trend
dname: memory
direction: UP
percentage_change: 20
duration: 60
window_reference: LAST_WEEK
min_value: 5
## Instruction:
Add precision for Restarts on ProcessUsage plugin.
## Code After:
options:
command_name:
name: Command Name
notes: The name of the command to pull statistics for.
default: mongrel_rails
ps_command:
name: The Process Status (ps) Command
notes: The command with options. The default works on most systems.
default: ps auxww
ps_regex:
name: The regex used to match a command name.
notes: "By default, this matches a command name anywhere in the ps output line. The word COMMAND get's replaced with the command you gave (regex escaped). You may wish to try the following pattern if you only want to match a command in the last column: (?i:COMMAND\\s+$)"
default: "(?i:\\bCOMMAND\\b)"
metadata:
memory:
label: Memory Usage
units: MB
precision: 0
restarts:
label: Restarts
units: ""
precision: 0
triggers:
- type: peak
dname: memory
max_value: 10
- type: trend
dname: memory
direction: UP
percentage_change: 20
duration: 60
window_reference: LAST_WEEK
min_value: 5
| options:
command_name:
name: Command Name
notes: The name of the command to pull statistics for.
default: mongrel_rails
ps_command:
name: The Process Status (ps) Command
notes: The command with options. The default works on most systems.
default: ps auxww
ps_regex:
name: The regex used to match a command name.
notes: "By default, this matches a command name anywhere in the ps output line. The word COMMAND get's replaced with the command you gave (regex escaped). You may wish to try the following pattern if you only want to match a command in the last column: (?i:COMMAND\\s+$)"
default: "(?i:\\bCOMMAND\\b)"
metadata:
memory:
label: Memory Usage
units: MB
precision: 0
+ restarts:
+ label: Restarts
+ units: ""
+ precision: 0
-
+
? +
triggers:
- type: peak
dname: memory
max_value: 10
- type: trend
dname: memory
direction: UP
percentage_change: 20
duration: 60
window_reference: LAST_WEEK
min_value: 5 | 6 | 0.193548 | 5 | 1 |
3cdf15f40797ac75cc38a294dd9ae21a212868db | app/assets/stylesheets/datepickers.scss | app/assets/stylesheets/datepickers.scss | div.bootstrap-datetimepicker-widget.dropdown-menu.usetwentyfour.float-right ul.list-unstyled li.show {
font-size: 1rem;
}
div.week-view .bootstrap-datetimepicker-widget table tbody tr:hover {
background-color: #007bff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
div.week-view .bootstrap-datetimepicker-widget table tbody td:hover {
background-color: #007bff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
| div.bootstrap-datetimepicker-widget.dropdown-menu.usetwentyfour ul.list-unstyled li.show {
font-size: 1rem;
}
div.week-view .bootstrap-datetimepicker-widget table tbody tr:hover {
background-color: #007bff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
div.week-view .bootstrap-datetimepicker-widget table tbody td:hover {
background-color: #007bff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
| Remove over-specific float selector for calendar font size | Remove over-specific float selector for calendar font size
| SCSS | mit | BathHacked/energy-sparks,BathHacked/energy-sparks,BathHacked/energy-sparks,BathHacked/energy-sparks | scss | ## Code Before:
div.bootstrap-datetimepicker-widget.dropdown-menu.usetwentyfour.float-right ul.list-unstyled li.show {
font-size: 1rem;
}
div.week-view .bootstrap-datetimepicker-widget table tbody tr:hover {
background-color: #007bff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
div.week-view .bootstrap-datetimepicker-widget table tbody td:hover {
background-color: #007bff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
## Instruction:
Remove over-specific float selector for calendar font size
## Code After:
div.bootstrap-datetimepicker-widget.dropdown-menu.usetwentyfour ul.list-unstyled li.show {
font-size: 1rem;
}
div.week-view .bootstrap-datetimepicker-widget table tbody tr:hover {
background-color: #007bff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
div.week-view .bootstrap-datetimepicker-widget table tbody td:hover {
background-color: #007bff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
| - div.bootstrap-datetimepicker-widget.dropdown-menu.usetwentyfour.float-right ul.list-unstyled li.show {
? ------------
+ div.bootstrap-datetimepicker-widget.dropdown-menu.usetwentyfour ul.list-unstyled li.show {
font-size: 1rem;
}
div.week-view .bootstrap-datetimepicker-widget table tbody tr:hover {
background-color: #007bff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
div.week-view .bootstrap-datetimepicker-widget table tbody td:hover {
background-color: #007bff;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
} | 2 | 0.133333 | 1 | 1 |
0774eea1027bc9bb88b5289854aa26109f258712 | great_expectations/exceptions.py | great_expectations/exceptions.py | class GreatExpectationsError(Exception):
pass
class ExpectationsConfigNotFoundError(GreatExpectationsError):
def __init__(self, data_asset_name):
self.data_asset_name = data_asset_name
self.message = "No expectations config found for data_asset_name %s" % data_asset_name
class BatchKwargsError(GreatExpectationsError):
def __init__(self, message, batch_kwargs):
self.message = message | class GreatExpectationsError(Exception):
pass
class ExpectationsConfigNotFoundError(GreatExpectationsError):
def __init__(self, data_asset_name):
self.data_asset_name = data_asset_name
self.message = "No expectations config found for data_asset_name %s" % data_asset_name
class BatchKwargsError(GreatExpectationsError):
def __init__(self, message, batch_kwargs):
self.message = message
self.batch_kwargs = batch_kwargs | Add batch_kwargs to custom error | Add batch_kwargs to custom error
| Python | apache-2.0 | great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations | python | ## Code Before:
class GreatExpectationsError(Exception):
pass
class ExpectationsConfigNotFoundError(GreatExpectationsError):
def __init__(self, data_asset_name):
self.data_asset_name = data_asset_name
self.message = "No expectations config found for data_asset_name %s" % data_asset_name
class BatchKwargsError(GreatExpectationsError):
def __init__(self, message, batch_kwargs):
self.message = message
## Instruction:
Add batch_kwargs to custom error
## Code After:
class GreatExpectationsError(Exception):
pass
class ExpectationsConfigNotFoundError(GreatExpectationsError):
def __init__(self, data_asset_name):
self.data_asset_name = data_asset_name
self.message = "No expectations config found for data_asset_name %s" % data_asset_name
class BatchKwargsError(GreatExpectationsError):
def __init__(self, message, batch_kwargs):
self.message = message
self.batch_kwargs = batch_kwargs | class GreatExpectationsError(Exception):
pass
class ExpectationsConfigNotFoundError(GreatExpectationsError):
def __init__(self, data_asset_name):
self.data_asset_name = data_asset_name
self.message = "No expectations config found for data_asset_name %s" % data_asset_name
class BatchKwargsError(GreatExpectationsError):
def __init__(self, message, batch_kwargs):
self.message = message
+ self.batch_kwargs = batch_kwargs | 1 | 0.076923 | 1 | 0 |
dbfc1a11c0ced8ab7a997944e943a17ff0069199 | lexer.py | lexer.py | import ply.lex as lex
import re
tokens = ( 'SECTION',
'IDENTIFIER',
'LBRACE',
'RBRACE',
'SEMI',
'TRUE',
'FALSE' )
def t_SECTION(t):
r'section'
return t
def t_TRUE(t):
r'(true|1)'
return t
def t_FALSE(t):
r'(false|0)'
return t
def t_IDENTIFIER(t):
r'[a-zA-Z\-0-9]+'
return t
def t_LBRACE(t):
r'{'
return t
def t_RBRACE(t):
r'}'
return t
def t_SEMI(t):
r';'
return t
def t_NEWLINE(t):
r'\n+'
t.lexer.lineno += len(t.value)
return t
t_ignore = ' \t\n'
# Error handling rule
def t_error(t):
print("Illegal character '{0}' at line {1}".format(t.value[0], t.lineno))
t.lexer.skip(1)
lexer = lex.lex()
| import ply.lex as lex
import re
tokens = ( 'SECTION',
'IDENTIFIER',
'STRING',
'LBRACE',
'RBRACE',
'SEMI',
'EQU',
'TRUE',
'FALSE' )
def t_SECTION(t):
r'section'
return t
def t_TRUE(t):
r'(true|1)'
return t
def t_FALSE(t):
r'(false|0)'
return t
def t_IDENTIFIER(t):
r'[a-zA-Z\-0-9]+'
return t
def t_STRING(t):
r'(\".*\"|\'.*\')'
t.value = t.value[1:-1]
return t
def t_LBRACE(t):
r'{'
return t
def t_EQU(t):
r'='
return t
def t_RBRACE(t):
r'}'
return t
def t_SEMI(t):
r';'
return t
def t_NEWLINE(t):
r'\n+'
t.lexer.lineno += len(t.value)
return t
t_ignore = ' \t\n'
# Error handling rule
def t_error(t):
print("Illegal character '{0}' at line {1}".format(t.value[0], t.lineno))
t.lexer.skip(1)
lexer = lex.lex()
| Add rudimentary string support and a token for '=' sign. | Add rudimentary string support and a token for '=' sign.
| Python | cc0-1.0 | dmbaturin/ply-example | python | ## Code Before:
import ply.lex as lex
import re
tokens = ( 'SECTION',
'IDENTIFIER',
'LBRACE',
'RBRACE',
'SEMI',
'TRUE',
'FALSE' )
def t_SECTION(t):
r'section'
return t
def t_TRUE(t):
r'(true|1)'
return t
def t_FALSE(t):
r'(false|0)'
return t
def t_IDENTIFIER(t):
r'[a-zA-Z\-0-9]+'
return t
def t_LBRACE(t):
r'{'
return t
def t_RBRACE(t):
r'}'
return t
def t_SEMI(t):
r';'
return t
def t_NEWLINE(t):
r'\n+'
t.lexer.lineno += len(t.value)
return t
t_ignore = ' \t\n'
# Error handling rule
def t_error(t):
print("Illegal character '{0}' at line {1}".format(t.value[0], t.lineno))
t.lexer.skip(1)
lexer = lex.lex()
## Instruction:
Add rudimentary string support and a token for '=' sign.
## Code After:
import ply.lex as lex
import re
tokens = ( 'SECTION',
'IDENTIFIER',
'STRING',
'LBRACE',
'RBRACE',
'SEMI',
'EQU',
'TRUE',
'FALSE' )
def t_SECTION(t):
r'section'
return t
def t_TRUE(t):
r'(true|1)'
return t
def t_FALSE(t):
r'(false|0)'
return t
def t_IDENTIFIER(t):
r'[a-zA-Z\-0-9]+'
return t
def t_STRING(t):
r'(\".*\"|\'.*\')'
t.value = t.value[1:-1]
return t
def t_LBRACE(t):
r'{'
return t
def t_EQU(t):
r'='
return t
def t_RBRACE(t):
r'}'
return t
def t_SEMI(t):
r';'
return t
def t_NEWLINE(t):
r'\n+'
t.lexer.lineno += len(t.value)
return t
t_ignore = ' \t\n'
# Error handling rule
def t_error(t):
print("Illegal character '{0}' at line {1}".format(t.value[0], t.lineno))
t.lexer.skip(1)
lexer = lex.lex()
| import ply.lex as lex
import re
tokens = ( 'SECTION',
'IDENTIFIER',
+ 'STRING',
'LBRACE',
'RBRACE',
'SEMI',
+ 'EQU',
'TRUE',
'FALSE' )
def t_SECTION(t):
r'section'
return t
def t_TRUE(t):
r'(true|1)'
return t
def t_FALSE(t):
r'(false|0)'
return t
def t_IDENTIFIER(t):
r'[a-zA-Z\-0-9]+'
return t
+ def t_STRING(t):
+ r'(\".*\"|\'.*\')'
+ t.value = t.value[1:-1]
+ return t
+
def t_LBRACE(t):
r'{'
+ return t
+
+ def t_EQU(t):
+ r'='
return t
def t_RBRACE(t):
r'}'
return t
def t_SEMI(t):
r';'
return t
def t_NEWLINE(t):
r'\n+'
t.lexer.lineno += len(t.value)
return t
t_ignore = ' \t\n'
# Error handling rule
def t_error(t):
print("Illegal character '{0}' at line {1}".format(t.value[0], t.lineno))
t.lexer.skip(1)
lexer = lex.lex() | 11 | 0.203704 | 11 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.