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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f34f758fdd7657b381579266d482d04b75aecf33 | junit/src/test/java/cucumber/runtime/junit/TestPickleBuilder.java | junit/src/test/java/cucumber/runtime/junit/TestPickleBuilder.java | package cucumber.runtime.junit;
import cucumber.runtime.io.Resource;
import cucumber.runtime.model.CucumberFeature;
import cucumber.runtime.model.FeatureParser;
import gherkin.events.PickleEvent;
import gherkin.pickles.Compiler;
import gherkin.pickles.Pickle;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
class TestPickleBuilder {
private TestPickleBuilder() {
}
static List<PickleEvent> pickleEventsFromFeature(final String path, final String source) {
List<PickleEvent> pickleEvents = new ArrayList<PickleEvent>();
Compiler compiler = new Compiler();
CucumberFeature feature = parseFeature(path, source);
for (Pickle pickle : compiler.compile(feature.getGherkinFeature())) {
pickleEvents.add(new PickleEvent(feature.getUri().toString(), pickle));
}
return pickleEvents;
}
static CucumberFeature parseFeature(final String path, final String source) {
return parseFeature(URI.create(path), source);
}
static CucumberFeature parseFeature(final URI path, final String source) {
return FeatureParser.parseResource(new Resource() {
@Override
public URI getPath() {
return path;
}
@Override
public InputStream getInputStream() {
return new ByteArrayInputStream(source.getBytes());
}
});
}
}
| package cucumber.runtime.junit;
import cucumber.runtime.io.Resource;
import cucumber.runtime.model.CucumberFeature;
import cucumber.runtime.model.FeatureParser;
import gherkin.events.PickleEvent;
import gherkin.pickles.Compiler;
import gherkin.pickles.Pickle;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
class TestPickleBuilder {
private TestPickleBuilder() {
}
static List<PickleEvent> pickleEventsFromFeature(final String path, final String source) {
List<PickleEvent> pickleEvents = new ArrayList<PickleEvent>();
Compiler compiler = new Compiler();
CucumberFeature feature = parseFeature(path, source);
for (Pickle pickle : compiler.compile(feature.getGherkinFeature())) {
pickleEvents.add(new PickleEvent(feature.getUri().toString(), pickle));
}
return pickleEvents;
}
static CucumberFeature parseFeature(final String path, final String source) {
return parseFeature(URI.create(path), source);
}
static CucumberFeature parseFeature(final URI path, final String source) {
return FeatureParser.parseResource(new Resource() {
@Override
public URI getPath() {
return path;
}
@Override
public InputStream getInputStream() {
return new ByteArrayInputStream(source.getBytes(StandardCharsets.UTF_8));
}
});
}
}
| Use explicit encoding when getting bytes from String | [JUnit] Use explicit encoding when getting bytes from String
| Java | mit | cucumber/cucumber-jvm,cucumber/cucumber-jvm,cucumber/cucumber-jvm,cucumber/cucumber-jvm,cucumber/cucumber-jvm | java | ## Code Before:
package cucumber.runtime.junit;
import cucumber.runtime.io.Resource;
import cucumber.runtime.model.CucumberFeature;
import cucumber.runtime.model.FeatureParser;
import gherkin.events.PickleEvent;
import gherkin.pickles.Compiler;
import gherkin.pickles.Pickle;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;
class TestPickleBuilder {
private TestPickleBuilder() {
}
static List<PickleEvent> pickleEventsFromFeature(final String path, final String source) {
List<PickleEvent> pickleEvents = new ArrayList<PickleEvent>();
Compiler compiler = new Compiler();
CucumberFeature feature = parseFeature(path, source);
for (Pickle pickle : compiler.compile(feature.getGherkinFeature())) {
pickleEvents.add(new PickleEvent(feature.getUri().toString(), pickle));
}
return pickleEvents;
}
static CucumberFeature parseFeature(final String path, final String source) {
return parseFeature(URI.create(path), source);
}
static CucumberFeature parseFeature(final URI path, final String source) {
return FeatureParser.parseResource(new Resource() {
@Override
public URI getPath() {
return path;
}
@Override
public InputStream getInputStream() {
return new ByteArrayInputStream(source.getBytes());
}
});
}
}
## Instruction:
[JUnit] Use explicit encoding when getting bytes from String
## Code After:
package cucumber.runtime.junit;
import cucumber.runtime.io.Resource;
import cucumber.runtime.model.CucumberFeature;
import cucumber.runtime.model.FeatureParser;
import gherkin.events.PickleEvent;
import gherkin.pickles.Compiler;
import gherkin.pickles.Pickle;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.net.URI;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
class TestPickleBuilder {
private TestPickleBuilder() {
}
static List<PickleEvent> pickleEventsFromFeature(final String path, final String source) {
List<PickleEvent> pickleEvents = new ArrayList<PickleEvent>();
Compiler compiler = new Compiler();
CucumberFeature feature = parseFeature(path, source);
for (Pickle pickle : compiler.compile(feature.getGherkinFeature())) {
pickleEvents.add(new PickleEvent(feature.getUri().toString(), pickle));
}
return pickleEvents;
}
static CucumberFeature parseFeature(final String path, final String source) {
return parseFeature(URI.create(path), source);
}
static CucumberFeature parseFeature(final URI path, final String source) {
return FeatureParser.parseResource(new Resource() {
@Override
public URI getPath() {
return path;
}
@Override
public InputStream getInputStream() {
return new ByteArrayInputStream(source.getBytes(StandardCharsets.UTF_8));
}
});
}
}
| package cucumber.runtime.junit;
import cucumber.runtime.io.Resource;
import cucumber.runtime.model.CucumberFeature;
import cucumber.runtime.model.FeatureParser;
import gherkin.events.PickleEvent;
import gherkin.pickles.Compiler;
import gherkin.pickles.Pickle;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.net.URI;
+ import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
class TestPickleBuilder {
private TestPickleBuilder() {
}
static List<PickleEvent> pickleEventsFromFeature(final String path, final String source) {
List<PickleEvent> pickleEvents = new ArrayList<PickleEvent>();
Compiler compiler = new Compiler();
CucumberFeature feature = parseFeature(path, source);
for (Pickle pickle : compiler.compile(feature.getGherkinFeature())) {
pickleEvents.add(new PickleEvent(feature.getUri().toString(), pickle));
}
return pickleEvents;
}
static CucumberFeature parseFeature(final String path, final String source) {
return parseFeature(URI.create(path), source);
}
static CucumberFeature parseFeature(final URI path, final String source) {
return FeatureParser.parseResource(new Resource() {
@Override
public URI getPath() {
return path;
}
@Override
public InputStream getInputStream() {
- return new ByteArrayInputStream(source.getBytes());
+ return new ByteArrayInputStream(source.getBytes(StandardCharsets.UTF_8));
? ++++++++++++++++++++++
}
});
}
} | 3 | 0.058824 | 2 | 1 |
028d6af13f5581f3bebb2772c6c5c163ec9fd0ea | README.md | README.md |
[](https://quay.io/repository/aptible/ubuntu)
Ubuntu base image with custom Aptible patches and Dockerfile building tools.
## Installation and Usage
docker pull quay.io/aptible/ubuntu
docker run -i -t quay.io/aptible/ubuntu
## Available Tags
* `latest`: Ubuntu 12.04 (LTS)
* `12.04`: Ubuntu 12.04 (LTS)
* `12.10`: Ubuntu 12.10
## Included Tools/Patches
* `bats`: The [Bats](https://github.com/sstephenson/bats) Bash Automated Testing System
* `git`: Git Version Control System.
## Tests
Tests are run as part of the `Dockerfile` build. To execute them separately within a container, run:
bats test
## Deployment
To push the Docker image to Quay, run the following command:
make release
## Copyright and License
MIT License, see [LICENSE](LICENSE.md) for details.
Copyright (c) 2014 [Aptible](https://www.aptible.com), [Frank Macreery](https://github.com/fancyremarker), and contributors.
|
[](https://quay.io/repository/aptible/ubuntu)
Ubuntu base image with custom Aptible patches and Dockerfile building tools.
## Installation and Usage
docker pull quay.io/aptible/ubuntu
docker run -i -t quay.io/aptible/ubuntu
## Available Tags
* `latest`: Ubuntu 12.04 (LTS)
* `12.04`: Ubuntu 12.04 (LTS)
## Included Tools/Patches
* `bats`: The [Bats](https://github.com/sstephenson/bats) Bash Automated Testing System
* `git`: Git Version Control System.
* All Ubuntu LTS security updates (but not non-critical updates).
## Tests
Tests are run as part of the `Dockerfile` build. To execute them separately within a container, run:
bats test
## Deployment
To push the Docker image to Quay, run the following command:
make release
## Copyright and License
MIT License, see [LICENSE](LICENSE.md) for details.
Copyright (c) 2014 [Aptible](https://www.aptible.com), [Frank Macreery](https://github.com/fancyremarker), and contributors.
| Remove official support for 12.10 and add note about LTS updates | Remove official support for 12.10 and add note about LTS updates
| Markdown | mit | aptible/docker-ubuntu,aptible/docker-ubuntu | markdown | ## Code Before:
[](https://quay.io/repository/aptible/ubuntu)
Ubuntu base image with custom Aptible patches and Dockerfile building tools.
## Installation and Usage
docker pull quay.io/aptible/ubuntu
docker run -i -t quay.io/aptible/ubuntu
## Available Tags
* `latest`: Ubuntu 12.04 (LTS)
* `12.04`: Ubuntu 12.04 (LTS)
* `12.10`: Ubuntu 12.10
## Included Tools/Patches
* `bats`: The [Bats](https://github.com/sstephenson/bats) Bash Automated Testing System
* `git`: Git Version Control System.
## Tests
Tests are run as part of the `Dockerfile` build. To execute them separately within a container, run:
bats test
## Deployment
To push the Docker image to Quay, run the following command:
make release
## Copyright and License
MIT License, see [LICENSE](LICENSE.md) for details.
Copyright (c) 2014 [Aptible](https://www.aptible.com), [Frank Macreery](https://github.com/fancyremarker), and contributors.
## Instruction:
Remove official support for 12.10 and add note about LTS updates
## Code After:
[](https://quay.io/repository/aptible/ubuntu)
Ubuntu base image with custom Aptible patches and Dockerfile building tools.
## Installation and Usage
docker pull quay.io/aptible/ubuntu
docker run -i -t quay.io/aptible/ubuntu
## Available Tags
* `latest`: Ubuntu 12.04 (LTS)
* `12.04`: Ubuntu 12.04 (LTS)
## Included Tools/Patches
* `bats`: The [Bats](https://github.com/sstephenson/bats) Bash Automated Testing System
* `git`: Git Version Control System.
* All Ubuntu LTS security updates (but not non-critical updates).
## Tests
Tests are run as part of the `Dockerfile` build. To execute them separately within a container, run:
bats test
## Deployment
To push the Docker image to Quay, run the following command:
make release
## Copyright and License
MIT License, see [LICENSE](LICENSE.md) for details.
Copyright (c) 2014 [Aptible](https://www.aptible.com), [Frank Macreery](https://github.com/fancyremarker), and contributors.
|
[](https://quay.io/repository/aptible/ubuntu)
Ubuntu base image with custom Aptible patches and Dockerfile building tools.
## Installation and Usage
docker pull quay.io/aptible/ubuntu
docker run -i -t quay.io/aptible/ubuntu
## Available Tags
* `latest`: Ubuntu 12.04 (LTS)
* `12.04`: Ubuntu 12.04 (LTS)
- * `12.10`: Ubuntu 12.10
## Included Tools/Patches
* `bats`: The [Bats](https://github.com/sstephenson/bats) Bash Automated Testing System
* `git`: Git Version Control System.
+ * All Ubuntu LTS security updates (but not non-critical updates).
## Tests
Tests are run as part of the `Dockerfile` build. To execute them separately within a container, run:
bats test
## Deployment
To push the Docker image to Quay, run the following command:
make release
## Copyright and License
MIT License, see [LICENSE](LICENSE.md) for details.
Copyright (c) 2014 [Aptible](https://www.aptible.com), [Frank Macreery](https://github.com/fancyremarker), and contributors. | 2 | 0.052632 | 1 | 1 |
6ae829a88c2354a3bbf0c05d7909b37f1f0077ca | packages/do/dom-parser.yaml | packages/do/dom-parser.yaml | homepage: ''
changelog-type: markdown
hash: 9e3184d7892afb6ed51f7e27f562e47b446dc5082c8808c1ac8d893bb0cee996
test-bench-deps:
shakespeare: -any
dom-parser: -any
xml-conduit: -any
base: -any
hspec: -any
text: -any
data-default: -any
semigroups: -any
lens: -any
maintainer: makeit@typeable.io
synopsis: Simple monadic DOM parser
changelog: ! '# CHANGELOG
## 0.1.0
* Public release
'
basic-deps:
shakespeare: -any
open-union: -any
xml-conduit: -any
base: ! '>=4.7 && <5'
text: -any
xml-lens: -any
semigroups: -any
lens: -any
mtl: -any
type-fun: -any
transformers: -any
all-versions:
- '0.0.1'
- '0.1.0'
author: Typeable.io contributors
latest: '0.1.0'
description-type: haddock
description: ''
license-name: MIT
| homepage: ''
changelog-type: markdown
hash: 981bb1101657f8643235ec32c5c31ca705183d91fb7e14eccb1ca62bbea5f2ef
test-bench-deps:
shakespeare: -any
dom-parser: -any
xml-conduit: -any
base: -any
hspec: -any
text: -any
data-default: -any
semigroups: -any
lens: -any
maintainer: makeit@typeable.io
synopsis: Simple monadic DOM parser
changelog: ! '# CHANGELOG
## 0.1.0
* Public release
'
basic-deps:
shakespeare: -any
open-union: ! '>=0.2'
xml-conduit: -any
base: ! '>=4.7 && <5'
text: -any
xml-lens: -any
semigroups: -any
lens: -any
mtl: -any
type-fun: ! '>=0.1.1'
transformers: -any
all-versions:
- '0.0.1'
- '0.1.0'
- '0.1.1'
author: Typeable.io contributors
latest: '0.1.1'
description-type: haddock
description: ''
license-name: MIT
| Update from Hackage at 2016-11-21T19:08:14Z | Update from Hackage at 2016-11-21T19:08:14Z | YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: markdown
hash: 9e3184d7892afb6ed51f7e27f562e47b446dc5082c8808c1ac8d893bb0cee996
test-bench-deps:
shakespeare: -any
dom-parser: -any
xml-conduit: -any
base: -any
hspec: -any
text: -any
data-default: -any
semigroups: -any
lens: -any
maintainer: makeit@typeable.io
synopsis: Simple monadic DOM parser
changelog: ! '# CHANGELOG
## 0.1.0
* Public release
'
basic-deps:
shakespeare: -any
open-union: -any
xml-conduit: -any
base: ! '>=4.7 && <5'
text: -any
xml-lens: -any
semigroups: -any
lens: -any
mtl: -any
type-fun: -any
transformers: -any
all-versions:
- '0.0.1'
- '0.1.0'
author: Typeable.io contributors
latest: '0.1.0'
description-type: haddock
description: ''
license-name: MIT
## Instruction:
Update from Hackage at 2016-11-21T19:08:14Z
## Code After:
homepage: ''
changelog-type: markdown
hash: 981bb1101657f8643235ec32c5c31ca705183d91fb7e14eccb1ca62bbea5f2ef
test-bench-deps:
shakespeare: -any
dom-parser: -any
xml-conduit: -any
base: -any
hspec: -any
text: -any
data-default: -any
semigroups: -any
lens: -any
maintainer: makeit@typeable.io
synopsis: Simple monadic DOM parser
changelog: ! '# CHANGELOG
## 0.1.0
* Public release
'
basic-deps:
shakespeare: -any
open-union: ! '>=0.2'
xml-conduit: -any
base: ! '>=4.7 && <5'
text: -any
xml-lens: -any
semigroups: -any
lens: -any
mtl: -any
type-fun: ! '>=0.1.1'
transformers: -any
all-versions:
- '0.0.1'
- '0.1.0'
- '0.1.1'
author: Typeable.io contributors
latest: '0.1.1'
description-type: haddock
description: ''
license-name: MIT
| homepage: ''
changelog-type: markdown
- hash: 9e3184d7892afb6ed51f7e27f562e47b446dc5082c8808c1ac8d893bb0cee996
+ hash: 981bb1101657f8643235ec32c5c31ca705183d91fb7e14eccb1ca62bbea5f2ef
test-bench-deps:
shakespeare: -any
dom-parser: -any
xml-conduit: -any
base: -any
hspec: -any
text: -any
data-default: -any
semigroups: -any
lens: -any
maintainer: makeit@typeable.io
synopsis: Simple monadic DOM parser
changelog: ! '# CHANGELOG
## 0.1.0
* Public release
'
basic-deps:
shakespeare: -any
- open-union: -any
+ open-union: ! '>=0.2'
xml-conduit: -any
base: ! '>=4.7 && <5'
text: -any
xml-lens: -any
semigroups: -any
lens: -any
mtl: -any
- type-fun: -any
+ type-fun: ! '>=0.1.1'
transformers: -any
all-versions:
- '0.0.1'
- '0.1.0'
+ - '0.1.1'
author: Typeable.io contributors
- latest: '0.1.0'
? ^
+ latest: '0.1.1'
? ^
description-type: haddock
description: ''
license-name: MIT | 9 | 0.209302 | 5 | 4 |
50d6d7730c21b320f3f62474d00f5dc41c8819c3 | spec/factories/subjects.rb | spec/factories/subjects.rb | FactoryGirl.define do
factory :subject do
project
association :uploader, factory: :user
sequence(:zooniverse_id) { |n| "TES#{n.to_s(26).rjust(8, '0')}" }
metadata({distance_from_earth: "42 light years",
brightness: -20,
loudness: 11})
trait :with_mediums do
after(:create) do |s|
create_list(:medium, 2, linked: s)
end
end
trait :with_collections do
after(:create) do |s|
create_list(:collection, 2, subjects: [s])
end
end
trait :with_subject_sets do
after(:create) do |s|
create_list(:set_member_subject, 2, subject: s)
end
end
end
end
| FactoryGirl.define do
factory :subject do
project
association :uploader, factory: :user
sequence(:zooniverse_id) { |n| "TES#{n.to_s(26).rjust(8, '0')}" }
metadata({distance_from_earth: "42 light years",
brightness: -20,
loudness: 11})
trait :with_mediums do
after(:create) do |s|
create_list(:medium, 2, linked: s)
end
end
trait :with_collections do
after(:create) do |s|
create_list(:collection, 2, subjects: [s])
end
end
trait :with_subject_sets do
after(:create) do |s|
2.times do |i|
create(:set_member_subject, subject: s, subject_set: create(:subject_set, project: s.project))
end
end
end
end
end
| Create subject sets all for the same project | Create subject sets all for the same project
| Ruby | apache-2.0 | srallen/Panoptes,edpaget/Panoptes,zooniverse/Panoptes,srallen/Panoptes,srallen/Panoptes,zooniverse/Panoptes,parrish/Panoptes,astopy/Panoptes,astopy/Panoptes,camallen/Panoptes,edpaget/Panoptes,camallen/Panoptes,astopy/Panoptes,parrish/Panoptes,zooniverse/Panoptes,camallen/Panoptes,zooniverse/Panoptes,astopy/Panoptes,edpaget/Panoptes,parrish/Panoptes,srallen/Panoptes,camallen/Panoptes,edpaget/Panoptes,parrish/Panoptes | ruby | ## Code Before:
FactoryGirl.define do
factory :subject do
project
association :uploader, factory: :user
sequence(:zooniverse_id) { |n| "TES#{n.to_s(26).rjust(8, '0')}" }
metadata({distance_from_earth: "42 light years",
brightness: -20,
loudness: 11})
trait :with_mediums do
after(:create) do |s|
create_list(:medium, 2, linked: s)
end
end
trait :with_collections do
after(:create) do |s|
create_list(:collection, 2, subjects: [s])
end
end
trait :with_subject_sets do
after(:create) do |s|
create_list(:set_member_subject, 2, subject: s)
end
end
end
end
## Instruction:
Create subject sets all for the same project
## Code After:
FactoryGirl.define do
factory :subject do
project
association :uploader, factory: :user
sequence(:zooniverse_id) { |n| "TES#{n.to_s(26).rjust(8, '0')}" }
metadata({distance_from_earth: "42 light years",
brightness: -20,
loudness: 11})
trait :with_mediums do
after(:create) do |s|
create_list(:medium, 2, linked: s)
end
end
trait :with_collections do
after(:create) do |s|
create_list(:collection, 2, subjects: [s])
end
end
trait :with_subject_sets do
after(:create) do |s|
2.times do |i|
create(:set_member_subject, subject: s, subject_set: create(:subject_set, project: s.project))
end
end
end
end
end
| FactoryGirl.define do
factory :subject do
project
association :uploader, factory: :user
sequence(:zooniverse_id) { |n| "TES#{n.to_s(26).rjust(8, '0')}" }
metadata({distance_from_earth: "42 light years",
brightness: -20,
loudness: 11})
trait :with_mediums do
after(:create) do |s|
create_list(:medium, 2, linked: s)
end
end
trait :with_collections do
after(:create) do |s|
create_list(:collection, 2, subjects: [s])
end
end
trait :with_subject_sets do
after(:create) do |s|
- create_list(:set_member_subject, 2, subject: s)
+ 2.times do |i|
+ create(:set_member_subject, subject: s, subject_set: create(:subject_set, project: s.project))
+ end
end
end
end
end | 4 | 0.137931 | 3 | 1 |
8b41b21a15c00f2ca60843c118a77e0404167765 | meta-ti-bsp/recipes-devtools/k3conf/k3conf_git.bb | meta-ti-bsp/recipes-devtools/k3conf/k3conf_git.bb | SUMMARY = "Diagnostic tool for TI K3 processors"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://common/k3conf.c;beginline=1;endline=34;md5=7154c0ffcd418064ffa528e34e70ca9d"
PV = "0.2+git${SRCPV}"
COMPATIBLE_MACHINE = "k3"
BRANCH ?= "master"
SRCREV = "79f007cd462384ce22e750e9002b714878f56892"
SRC_URI = "git://git.ti.com/k3conf/k3conf.git;protocol=git;branch=${BRANCH}"
S = "${WORKDIR}/git"
do_compile () {
oe_runmake CC="${CC}" CROSS_COMPILE=${TARGET_PREFIX} all
}
do_install () {
install -d ${D}${bindir}
install ${S}/k3conf ${D}${bindir}
}
| SUMMARY = "Diagnostic tool for TI K3 processors"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://common/k3conf.c;beginline=1;endline=34;md5=7154c0ffcd418064ffa528e34e70ca9d"
PV = "0.2+git${SRCPV}"
COMPATIBLE_MACHINE = "k3"
BRANCH ?= "master"
SRCREV = "966a5695b73bc53039ca60d196b77de0640088d4"
SRC_URI = "git://git.ti.com/k3conf/k3conf.git;protocol=git;branch=${BRANCH}"
S = "${WORKDIR}/git"
do_compile () {
oe_runmake CC="${CC}" CROSS_COMPILE=${TARGET_PREFIX} all
}
do_install () {
install -d ${D}${bindir}
install ${S}/k3conf ${D}${bindir}
}
| Update SRCREV to pick AM62x support | k3conf: Update SRCREV to pick AM62x support
Update the k3conf to the latest SHA.
This adds AM62x support.
Signed-off-by: Praneeth Bajjuri <5cbfdb29322859ed5c637fdb11a8f23fddd8e511@ti.com>
Signed-off-by: Ryan Eatmon <c832a3efa8dfb59911a35349a6eeba0397feadf1@ti.com>
Signed-off-by: Denys Dmytriyenko <d29de71aea38aad3a87d486929cb0aad173ae612@konsulko.com>
Signed-off-by: Ryan Eatmon <c832a3efa8dfb59911a35349a6eeba0397feadf1@ti.com>
| BitBake | mit | rcn-ee/meta-ti,rcn-ee/meta-ti,rcn-ee/meta-ti,rcn-ee/meta-ti | bitbake | ## Code Before:
SUMMARY = "Diagnostic tool for TI K3 processors"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://common/k3conf.c;beginline=1;endline=34;md5=7154c0ffcd418064ffa528e34e70ca9d"
PV = "0.2+git${SRCPV}"
COMPATIBLE_MACHINE = "k3"
BRANCH ?= "master"
SRCREV = "79f007cd462384ce22e750e9002b714878f56892"
SRC_URI = "git://git.ti.com/k3conf/k3conf.git;protocol=git;branch=${BRANCH}"
S = "${WORKDIR}/git"
do_compile () {
oe_runmake CC="${CC}" CROSS_COMPILE=${TARGET_PREFIX} all
}
do_install () {
install -d ${D}${bindir}
install ${S}/k3conf ${D}${bindir}
}
## Instruction:
k3conf: Update SRCREV to pick AM62x support
Update the k3conf to the latest SHA.
This adds AM62x support.
Signed-off-by: Praneeth Bajjuri <5cbfdb29322859ed5c637fdb11a8f23fddd8e511@ti.com>
Signed-off-by: Ryan Eatmon <c832a3efa8dfb59911a35349a6eeba0397feadf1@ti.com>
Signed-off-by: Denys Dmytriyenko <d29de71aea38aad3a87d486929cb0aad173ae612@konsulko.com>
Signed-off-by: Ryan Eatmon <c832a3efa8dfb59911a35349a6eeba0397feadf1@ti.com>
## Code After:
SUMMARY = "Diagnostic tool for TI K3 processors"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://common/k3conf.c;beginline=1;endline=34;md5=7154c0ffcd418064ffa528e34e70ca9d"
PV = "0.2+git${SRCPV}"
COMPATIBLE_MACHINE = "k3"
BRANCH ?= "master"
SRCREV = "966a5695b73bc53039ca60d196b77de0640088d4"
SRC_URI = "git://git.ti.com/k3conf/k3conf.git;protocol=git;branch=${BRANCH}"
S = "${WORKDIR}/git"
do_compile () {
oe_runmake CC="${CC}" CROSS_COMPILE=${TARGET_PREFIX} all
}
do_install () {
install -d ${D}${bindir}
install ${S}/k3conf ${D}${bindir}
}
| SUMMARY = "Diagnostic tool for TI K3 processors"
LICENSE = "BSD-3-Clause"
LIC_FILES_CHKSUM = "file://common/k3conf.c;beginline=1;endline=34;md5=7154c0ffcd418064ffa528e34e70ca9d"
PV = "0.2+git${SRCPV}"
COMPATIBLE_MACHINE = "k3"
BRANCH ?= "master"
- SRCREV = "79f007cd462384ce22e750e9002b714878f56892"
+ SRCREV = "966a5695b73bc53039ca60d196b77de0640088d4"
SRC_URI = "git://git.ti.com/k3conf/k3conf.git;protocol=git;branch=${BRANCH}"
S = "${WORKDIR}/git"
do_compile () {
oe_runmake CC="${CC}" CROSS_COMPILE=${TARGET_PREFIX} all
}
do_install () {
install -d ${D}${bindir}
install ${S}/k3conf ${D}${bindir}
} | 2 | 0.083333 | 1 | 1 |
1684197404c712a1a350870b234d8eb861ef330d | src/com/blazeloader/api/api/general/ApiGeneral.java | src/com/blazeloader/api/api/general/ApiGeneral.java | package com.blazeloader.api.api.general;
import com.blazeloader.api.main.BLMain;
import java.io.File;
/**
* General API functions
*/
public class ApiGeneral {
/**
* Location of Minecraft's working directory (.minecraft).
*/
public static File mainDir = new File("./");
/**
* Location of the working directory for mods. Mods should load and save configurations, resources, etc. here.
*/
public static File modDir = new File("./BL/mods/");
/**
* Location of the storage directory for mod Configs. Mods do not have to obey this, but should if possible.
*/
public static File configDir = new File("./BL/config/");
/**
* Shuts down the game with a specified error code. Use 0 for normal shutdown.
*
* @param code The error code to return to the system after shutdown.
*/
public static void shutdown(String message, int code) {
BLMain.instance().shutdown(message, code);
}
}
| package com.blazeloader.api.api.general;
import com.blazeloader.api.main.BLMain;
import java.io.File;
/**
* General API functions
*/
public class ApiGeneral {
/**
* Location of Minecraft's working directory (.minecraft).
*/
public static File mainDir = new File("./");
/**
* Shuts down the game with a specified error code. Use 0 for normal shutdown.
*
* @param code The error code to return to the system after shutdown.
*/
public static void shutdown(String message, int code) {
BLMain.instance().shutdown(message, code);
}
}
| Remove unneeded fields from APIGeneral | Remove unneeded fields from APIGeneral
| Java | bsd-2-clause | Sollace/BlazeLoader,BlazeLoader/BlazeLoader,warriordog/BlazeLoader,Sollace/BlazeLoader,BlazeLoader/BlazeLoader,warriordog/BlazeLoader,BlazeLoader/BlazeLoader | java | ## Code Before:
package com.blazeloader.api.api.general;
import com.blazeloader.api.main.BLMain;
import java.io.File;
/**
* General API functions
*/
public class ApiGeneral {
/**
* Location of Minecraft's working directory (.minecraft).
*/
public static File mainDir = new File("./");
/**
* Location of the working directory for mods. Mods should load and save configurations, resources, etc. here.
*/
public static File modDir = new File("./BL/mods/");
/**
* Location of the storage directory for mod Configs. Mods do not have to obey this, but should if possible.
*/
public static File configDir = new File("./BL/config/");
/**
* Shuts down the game with a specified error code. Use 0 for normal shutdown.
*
* @param code The error code to return to the system after shutdown.
*/
public static void shutdown(String message, int code) {
BLMain.instance().shutdown(message, code);
}
}
## Instruction:
Remove unneeded fields from APIGeneral
## Code After:
package com.blazeloader.api.api.general;
import com.blazeloader.api.main.BLMain;
import java.io.File;
/**
* General API functions
*/
public class ApiGeneral {
/**
* Location of Minecraft's working directory (.minecraft).
*/
public static File mainDir = new File("./");
/**
* Shuts down the game with a specified error code. Use 0 for normal shutdown.
*
* @param code The error code to return to the system after shutdown.
*/
public static void shutdown(String message, int code) {
BLMain.instance().shutdown(message, code);
}
}
| package com.blazeloader.api.api.general;
import com.blazeloader.api.main.BLMain;
import java.io.File;
/**
* General API functions
*/
public class ApiGeneral {
/**
* Location of Minecraft's working directory (.minecraft).
*/
public static File mainDir = new File("./");
/**
- * Location of the working directory for mods. Mods should load and save configurations, resources, etc. here.
- */
- public static File modDir = new File("./BL/mods/");
-
- /**
- * Location of the storage directory for mod Configs. Mods do not have to obey this, but should if possible.
- */
- public static File configDir = new File("./BL/config/");
-
- /**
* Shuts down the game with a specified error code. Use 0 for normal shutdown.
*
* @param code The error code to return to the system after shutdown.
*/
public static void shutdown(String message, int code) {
BLMain.instance().shutdown(message, code);
}
} | 10 | 0.294118 | 0 | 10 |
39a58432b74739ff79c2ffb78df656e66726de72 | docs/Development_Setup.md | docs/Development_Setup.md |
[Homebrew](http://brew.sh) is the easiest way to install everything on Mac.
1. Install Xcode
1. Install Homebrew
1. Install Rust and Cargo
1. Install ImageMagick
```
$ xcode-select --install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install rust
$ brew install imagemagick
```
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## FreeBSD
1. Install Rust
1. Install Cargo
1. Install ImageMagick
1. Install the Clang libraries
See the FreeBSD `fabfile.py` for an example of how to install everything. In particular, note that it may be necessary to set `LIBCLANG_PATH` to the path containing the `libclang.so` library.
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## Ubuntu Linux
1. Install Rust and Cargo
1. Install ImageMagick
1. Install the Clang libraries
See the Ubuntu `fabfile.py` for an example of how to install everything.
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`). If running the tests fails because the MagickWand library cannot be found, try rebuilding the ldconfig cache (`sudo ldconfig`).
|
[Homebrew](http://brew.sh) is the easiest way to install everything on Mac.
1. Install Xcode
1. Install Homebrew
1. Install Rust and Cargo
1. Install ImageMagick
```
$ xcode-select --install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install rust
$ brew install imagemagick
```
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## FreeBSD
1. Install Rust
1. Install Cargo
1. Install ImageMagick
1. Install the Clang libraries
See the FreeBSD `fabfile.py` for an example of how to install everything. In particular, note that it may be necessary to set `LIBCLANG_PATH` to the path containing the `libclang.so` library.
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## Ubuntu Linux
1. Install Rust and Cargo
1. Install ImageMagick
1. Install the Clang libraries
See the Ubuntu `fabfile.py` for an example of how to install everything. In particular, note that it may be necessary to set `LIBCLANG_PATH` to the path containing the `libclang.so` library.
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`). If running the tests fails because the MagickWand library cannot be found, try rebuilding the ldconfig cache (`sudo ldconfig`).
| Include note about LIBCLANG_PATH envar for Linux | Include note about LIBCLANG_PATH envar for Linux
| Markdown | apache-2.0 | nlfiedler/magick-rust | markdown | ## Code Before:
[Homebrew](http://brew.sh) is the easiest way to install everything on Mac.
1. Install Xcode
1. Install Homebrew
1. Install Rust and Cargo
1. Install ImageMagick
```
$ xcode-select --install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install rust
$ brew install imagemagick
```
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## FreeBSD
1. Install Rust
1. Install Cargo
1. Install ImageMagick
1. Install the Clang libraries
See the FreeBSD `fabfile.py` for an example of how to install everything. In particular, note that it may be necessary to set `LIBCLANG_PATH` to the path containing the `libclang.so` library.
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## Ubuntu Linux
1. Install Rust and Cargo
1. Install ImageMagick
1. Install the Clang libraries
See the Ubuntu `fabfile.py` for an example of how to install everything.
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`). If running the tests fails because the MagickWand library cannot be found, try rebuilding the ldconfig cache (`sudo ldconfig`).
## Instruction:
Include note about LIBCLANG_PATH envar for Linux
## Code After:
[Homebrew](http://brew.sh) is the easiest way to install everything on Mac.
1. Install Xcode
1. Install Homebrew
1. Install Rust and Cargo
1. Install ImageMagick
```
$ xcode-select --install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install rust
$ brew install imagemagick
```
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## FreeBSD
1. Install Rust
1. Install Cargo
1. Install ImageMagick
1. Install the Clang libraries
See the FreeBSD `fabfile.py` for an example of how to install everything. In particular, note that it may be necessary to set `LIBCLANG_PATH` to the path containing the `libclang.so` library.
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## Ubuntu Linux
1. Install Rust and Cargo
1. Install ImageMagick
1. Install the Clang libraries
See the Ubuntu `fabfile.py` for an example of how to install everything. In particular, note that it may be necessary to set `LIBCLANG_PATH` to the path containing the `libclang.so` library.
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`). If running the tests fails because the MagickWand library cannot be found, try rebuilding the ldconfig cache (`sudo ldconfig`).
|
[Homebrew](http://brew.sh) is the easiest way to install everything on Mac.
1. Install Xcode
1. Install Homebrew
1. Install Rust and Cargo
1. Install ImageMagick
```
$ xcode-select --install
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew install rust
$ brew install imagemagick
```
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## FreeBSD
1. Install Rust
1. Install Cargo
1. Install ImageMagick
1. Install the Clang libraries
See the FreeBSD `fabfile.py` for an example of how to install everything. In particular, note that it may be necessary to set `LIBCLANG_PATH` to the path containing the `libclang.so` library.
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`).
## Ubuntu Linux
1. Install Rust and Cargo
1. Install ImageMagick
1. Install the Clang libraries
- See the Ubuntu `fabfile.py` for an example of how to install everything.
+ See the Ubuntu `fabfile.py` for an example of how to install everything. In particular, note that it may be necessary to set `LIBCLANG_PATH` to the path containing the `libclang.so` library.
Then build in the usual manner, as shown in the `README.md` file (i.e. `cargo build` and `cargo test`). If running the tests fails because the MagickWand library cannot be found, try rebuilding the ldconfig cache (`sudo ldconfig`). | 2 | 0.054054 | 1 | 1 |
ff14d9b78cd64c01c0031be07ab35153c3c481bb | Casks/nndd.rb | Casks/nndd.rb | cask :v1 => 'nndd' do
version '2.4.3'
sha256 '6a73dcad2e73d877ad1503ed1162cae1a1c84f21d1abaa6aaf9b31bb2fbca531'
url 'http://dl.sourceforge.jp/nndd/62201/NNDD_v2_4_3.dmg'
name 'NNDD'
homepage 'http://sourceforge.jp/projects/nndd/'
license :x11
preflight do
system_command staged_path.join('Install NNDD.app/Contents/MacOS/Install NNDD'),
:args => ['-silent', '-eulaAccepted', '-location', staged_path]
end
app 'NNDD.app'
depends_on :cask => 'adobe-air'
end
| cask :v1 => 'nndd' do
version '2.4.3'
sha256 '6a73dcad2e73d877ad1503ed1162cae1a1c84f21d1abaa6aaf9b31bb2fbca531'
url 'http://dl.osdn.jp/nndd/62201/NNDD_v2_4_3.dmg'
name 'NNDD'
homepage 'http://osdn.jp/projects/nndd/'
license :x11
preflight do
system_command staged_path.join('Install NNDD.app/Contents/MacOS/Install NNDD'),
:args => ['-silent', '-eulaAccepted', '-location', staged_path]
end
app 'NNDD.app'
depends_on :cask => 'adobe-air'
end
| Change hosting service name in NNDD.app Cask | Change hosting service name in NNDD.app Cask
| Ruby | bsd-2-clause | christer155/homebrew-cask,tan9/homebrew-cask,nathansgreen/homebrew-cask,sosedoff/homebrew-cask,albertico/homebrew-cask,slnovak/homebrew-cask,christophermanning/homebrew-cask,hvisage/homebrew-cask,mokagio/homebrew-cask,kryhear/homebrew-cask,dspeckhard/homebrew-cask,blogabe/homebrew-cask,wickles/homebrew-cask,feigaochn/homebrew-cask,kesara/homebrew-cask,gerrypower/homebrew-cask,scottsuch/homebrew-cask,epardee/homebrew-cask,chrisRidgers/homebrew-cask,jconley/homebrew-cask,caskroom/homebrew-cask,crzrcn/homebrew-cask,goxberry/homebrew-cask,Labutin/homebrew-cask,wizonesolutions/homebrew-cask,jeroenj/homebrew-cask,zeusdeux/homebrew-cask,ctrevino/homebrew-cask,AnastasiaSulyagina/homebrew-cask,bendoerr/homebrew-cask,blogabe/homebrew-cask,albertico/homebrew-cask,fwiesel/homebrew-cask,sanyer/homebrew-cask,kei-yamazaki/homebrew-cask,nrlquaker/homebrew-cask,zerrot/homebrew-cask,englishm/homebrew-cask,mazehall/homebrew-cask,claui/homebrew-cask,antogg/homebrew-cask,syscrusher/homebrew-cask,mingzhi22/homebrew-cask,retbrown/homebrew-cask,miguelfrde/homebrew-cask,seanorama/homebrew-cask,rogeriopradoj/homebrew-cask,scribblemaniac/homebrew-cask,SamiHiltunen/homebrew-cask,tan9/homebrew-cask,illusionfield/homebrew-cask,remko/homebrew-cask,jalaziz/homebrew-cask,Keloran/homebrew-cask,epmatsw/homebrew-cask,kostasdizas/homebrew-cask,neil-ca-moore/homebrew-cask,yurrriq/homebrew-cask,thehunmonkgroup/homebrew-cask,caskroom/homebrew-cask,boecko/homebrew-cask,nickpellant/homebrew-cask,samshadwell/homebrew-cask,mikem/homebrew-cask,underyx/homebrew-cask,MerelyAPseudonym/homebrew-cask,adriweb/homebrew-cask,nysthee/homebrew-cask,jacobdam/homebrew-cask,howie/homebrew-cask,royalwang/homebrew-cask,napaxton/homebrew-cask,BenjaminHCCarr/homebrew-cask,lauantai/homebrew-cask,faun/homebrew-cask,0rax/homebrew-cask,slnovak/homebrew-cask,xtian/homebrew-cask,paulbreslin/homebrew-cask,aktau/homebrew-cask,uetchy/homebrew-cask,theoriginalgri/homebrew-cask,anbotero/homebrew-cask,fkrone/homebrew-cask,iAmGhost/homebrew-cask,bric3/homebrew-cask,dustinblackman/homebrew-cask,santoshsahoo/homebrew-cask,jmeridth/homebrew-cask,nshemonsky/homebrew-cask,asins/homebrew-cask,cprecioso/homebrew-cask,rickychilcott/homebrew-cask,singingwolfboy/homebrew-cask,coneman/homebrew-cask,mrmachine/homebrew-cask,kuno/homebrew-cask,githubutilities/homebrew-cask,dvdoliveira/homebrew-cask,imgarylai/homebrew-cask,JoelLarson/homebrew-cask,claui/homebrew-cask,rickychilcott/homebrew-cask,reitermarkus/homebrew-cask,colindean/homebrew-cask,MatzFan/homebrew-cask,bgandon/homebrew-cask,adrianchia/homebrew-cask,thii/homebrew-cask,rajiv/homebrew-cask,ahundt/homebrew-cask,Bombenleger/homebrew-cask,jasmas/homebrew-cask,seanorama/homebrew-cask,remko/homebrew-cask,dcondrey/homebrew-cask,wKovacs64/homebrew-cask,robertgzr/homebrew-cask,mauricerkelly/homebrew-cask,corbt/homebrew-cask,MoOx/homebrew-cask,andrewdisley/homebrew-cask,franklouwers/homebrew-cask,samdoran/homebrew-cask,aguynamedryan/homebrew-cask,3van/homebrew-cask,tolbkni/homebrew-cask,moonboots/homebrew-cask,qbmiller/homebrew-cask,n8henrie/homebrew-cask,gyugyu/homebrew-cask,dcondrey/homebrew-cask,mjgardner/homebrew-cask,neverfox/homebrew-cask,julionc/homebrew-cask,MerelyAPseudonym/homebrew-cask,johndbritton/homebrew-cask,jonathanwiesel/homebrew-cask,puffdad/homebrew-cask,jeanregisser/homebrew-cask,vuquoctuan/homebrew-cask,josa42/homebrew-cask,FranklinChen/homebrew-cask,mwilmer/homebrew-cask,bric3/homebrew-cask,Ephemera/homebrew-cask,dieterdemeyer/homebrew-cask,djakarta-trap/homebrew-myCask,buo/homebrew-cask,linc01n/homebrew-cask,corbt/homebrew-cask,adelinofaria/homebrew-cask,skyyuan/homebrew-cask,jedahan/homebrew-cask,Cottser/homebrew-cask,schneidmaster/homebrew-cask,yutarody/homebrew-cask,vin047/homebrew-cask,markthetech/homebrew-cask,nathanielvarona/homebrew-cask,squid314/homebrew-cask,yuhki50/homebrew-cask,ohammersmith/homebrew-cask,jmeridth/homebrew-cask,slack4u/homebrew-cask,stevenmaguire/homebrew-cask,dieterdemeyer/homebrew-cask,BahtiyarB/homebrew-cask,syscrusher/homebrew-cask,guerrero/homebrew-cask,wickedsp1d3r/homebrew-cask,jangalinski/homebrew-cask,BenjaminHCCarr/homebrew-cask,kongslund/homebrew-cask,jbeagley52/homebrew-cask,neverfox/homebrew-cask,diogodamiani/homebrew-cask,Saklad5/homebrew-cask,xight/homebrew-cask,sebcode/homebrew-cask,morganestes/homebrew-cask,johndbritton/homebrew-cask,inta/homebrew-cask,3van/homebrew-cask,rcuza/homebrew-cask,franklouwers/homebrew-cask,cedwardsmedia/homebrew-cask,williamboman/homebrew-cask,josa42/homebrew-cask,dvdoliveira/homebrew-cask,flaviocamilo/homebrew-cask,mattfelsen/homebrew-cask,mauricerkelly/homebrew-cask,psibre/homebrew-cask,asbachb/homebrew-cask,CameronGarrett/homebrew-cask,MisumiRize/homebrew-cask,reitermarkus/homebrew-cask,coeligena/homebrew-customized,Nitecon/homebrew-cask,mingzhi22/homebrew-cask,skatsuta/homebrew-cask,ianyh/homebrew-cask,inta/homebrew-cask,alexg0/homebrew-cask,gabrielizaias/homebrew-cask,JikkuJose/homebrew-cask,thomanq/homebrew-cask,miccal/homebrew-cask,alebcay/homebrew-cask,crmne/homebrew-cask,johan/homebrew-cask,santoshsahoo/homebrew-cask,gmkey/homebrew-cask,mariusbutuc/homebrew-cask,mlocher/homebrew-cask,jellyfishcoder/homebrew-cask,jen20/homebrew-cask,crzrcn/homebrew-cask,moimikey/homebrew-cask,fwiesel/homebrew-cask,farmerchris/homebrew-cask,d/homebrew-cask,danielgomezrico/homebrew-cask,colindean/homebrew-cask,jpmat296/homebrew-cask,jonathanwiesel/homebrew-cask,okket/homebrew-cask,danielbayley/homebrew-cask,stephenwade/homebrew-cask,yurikoles/homebrew-cask,thomanq/homebrew-cask,zchee/homebrew-cask,adrianchia/homebrew-cask,diguage/homebrew-cask,Ketouem/homebrew-cask,adelinofaria/homebrew-cask,m3nu/homebrew-cask,asins/homebrew-cask,winkelsdorf/homebrew-cask,gyugyu/homebrew-cask,uetchy/homebrew-cask,JacopKane/homebrew-cask,MisumiRize/homebrew-cask,zorosteven/homebrew-cask,tsparber/homebrew-cask,coeligena/homebrew-customized,Ephemera/homebrew-cask,moonboots/homebrew-cask,wastrachan/homebrew-cask,ebraminio/homebrew-cask,singingwolfboy/homebrew-cask,tarwich/homebrew-cask,sirodoht/homebrew-cask,wmorin/homebrew-cask,gurghet/homebrew-cask,vin047/homebrew-cask,kirikiriyamama/homebrew-cask,codeurge/homebrew-cask,ahundt/homebrew-cask,kassi/homebrew-cask,rogeriopradoj/homebrew-cask,dictcp/homebrew-cask,hyuna917/homebrew-cask,xight/homebrew-cask,jacobdam/homebrew-cask,fharbe/homebrew-cask,leipert/homebrew-cask,forevergenin/homebrew-cask,fazo96/homebrew-cask,qnm/homebrew-cask,jconley/homebrew-cask,Whoaa512/homebrew-cask,chuanxd/homebrew-cask,johan/homebrew-cask,feniix/homebrew-cask,Bombenleger/homebrew-cask,kesara/homebrew-cask,optikfluffel/homebrew-cask,malford/homebrew-cask,toonetown/homebrew-cask,robbiethegeek/homebrew-cask,katoquro/homebrew-cask,jeroenj/homebrew-cask,dictcp/homebrew-cask,shoichiaizawa/homebrew-cask,mfpierre/homebrew-cask,seanzxx/homebrew-cask,mattrobenolt/homebrew-cask,My2ndAngelic/homebrew-cask,shanonvl/homebrew-cask,norio-nomura/homebrew-cask,FranklinChen/homebrew-cask,haha1903/homebrew-cask,phpwutz/homebrew-cask,greg5green/homebrew-cask,blogabe/homebrew-cask,jasmas/homebrew-cask,jacobbednarz/homebrew-cask,tjnycum/homebrew-cask,artdevjs/homebrew-cask,frapposelli/homebrew-cask,MircoT/homebrew-cask,brianshumate/homebrew-cask,arranubels/homebrew-cask,xyb/homebrew-cask,haha1903/homebrew-cask,astorije/homebrew-cask,ddm/homebrew-cask,Gasol/homebrew-cask,englishm/homebrew-cask,tranc99/homebrew-cask,mattrobenolt/homebrew-cask,kamilboratynski/homebrew-cask,ldong/homebrew-cask,JacopKane/homebrew-cask,spruceb/homebrew-cask,sjackman/homebrew-cask,lukeadams/homebrew-cask,Amorymeltzer/homebrew-cask,illusionfield/homebrew-cask,jaredsampson/homebrew-cask,decrement/homebrew-cask,miku/homebrew-cask,gmkey/homebrew-cask,Nitecon/homebrew-cask,vmrob/homebrew-cask,barravi/homebrew-cask,esebastian/homebrew-cask,tjt263/homebrew-cask,norio-nomura/homebrew-cask,wesen/homebrew-cask,yutarody/homebrew-cask,williamboman/homebrew-cask,0rax/homebrew-cask,vuquoctuan/homebrew-cask,usami-k/homebrew-cask,leonmachadowilcox/homebrew-cask,ahvigil/homebrew-cask,m3nu/homebrew-cask,arronmabrey/homebrew-cask,unasuke/homebrew-cask,ctrevino/homebrew-cask,RJHsiao/homebrew-cask,FredLackeyOfficial/homebrew-cask,feniix/homebrew-cask,dwihn0r/homebrew-cask,MicTech/homebrew-cask,coneman/homebrew-cask,elyscape/homebrew-cask,mhubig/homebrew-cask,frapposelli/homebrew-cask,elyscape/homebrew-cask,cprecioso/homebrew-cask,sscotth/homebrew-cask,bcomnes/homebrew-cask,samdoran/homebrew-cask,iamso/homebrew-cask,lauantai/homebrew-cask,astorije/homebrew-cask,Amorymeltzer/homebrew-cask,nathanielvarona/homebrew-cask,wizonesolutions/homebrew-cask,kei-yamazaki/homebrew-cask,scottsuch/homebrew-cask,mjgardner/homebrew-cask,tarwich/homebrew-cask,Ketouem/homebrew-cask,MichaelPei/homebrew-cask,exherb/homebrew-cask,gurghet/homebrew-cask,sebcode/homebrew-cask,retbrown/homebrew-cask,lolgear/homebrew-cask,dwkns/homebrew-cask,renard/homebrew-cask,pinut/homebrew-cask,winkelsdorf/homebrew-cask,danielbayley/homebrew-cask,xakraz/homebrew-cask,kongslund/homebrew-cask,y00rb/homebrew-cask,jeanregisser/homebrew-cask,bsiddiqui/homebrew-cask,danielbayley/homebrew-cask,lalyos/homebrew-cask,klane/homebrew-cask,sjackman/homebrew-cask,inz/homebrew-cask,ptb/homebrew-cask,mjdescy/homebrew-cask,squid314/homebrew-cask,optikfluffel/homebrew-cask,andrewdisley/homebrew-cask,onlynone/homebrew-cask,ksylvan/homebrew-cask,hellosky806/homebrew-cask,cfillion/homebrew-cask,guylabs/homebrew-cask,lcasey001/homebrew-cask,wKovacs64/homebrew-cask,andyli/homebrew-cask,jamesmlees/homebrew-cask,ahvigil/homebrew-cask,elnappo/homebrew-cask,drostron/homebrew-cask,kpearson/homebrew-cask,gabrielizaias/homebrew-cask,malford/homebrew-cask,farmerchris/homebrew-cask,chadcatlett/caskroom-homebrew-cask,mikem/homebrew-cask,kamilboratynski/homebrew-cask,zmwangx/homebrew-cask,chrisfinazzo/homebrew-cask,mchlrmrz/homebrew-cask,hakamadare/homebrew-cask,paour/homebrew-cask,tmoreira2020/homebrew,muan/homebrew-cask,onlynone/homebrew-cask,ftiff/homebrew-cask,hanxue/caskroom,qbmiller/homebrew-cask,Dremora/homebrew-cask,neverfox/homebrew-cask,ftiff/homebrew-cask,stonehippo/homebrew-cask,gguillotte/homebrew-cask,tsparber/homebrew-cask,doits/homebrew-cask,gguillotte/homebrew-cask,nightscape/homebrew-cask,anbotero/homebrew-cask,scw/homebrew-cask,thii/homebrew-cask,dunn/homebrew-cask,ajbw/homebrew-cask,fanquake/homebrew-cask,jpmat296/homebrew-cask,Hywan/homebrew-cask,jen20/homebrew-cask,mazehall/homebrew-cask,doits/homebrew-cask,nightscape/homebrew-cask,kevyau/homebrew-cask,mathbunnyru/homebrew-cask,vitorgalvao/homebrew-cask,lvicentesanchez/homebrew-cask,sgnh/homebrew-cask,6uclz1/homebrew-cask,reitermarkus/homebrew-cask,bosr/homebrew-cask,amatos/homebrew-cask,stephenwade/homebrew-cask,paulbreslin/homebrew-cask,lukasbestle/homebrew-cask,zeusdeux/homebrew-cask,kteru/homebrew-cask,mattrobenolt/homebrew-cask,napaxton/homebrew-cask,lumaxis/homebrew-cask,stephenwade/homebrew-cask,alexg0/homebrew-cask,joschi/homebrew-cask,singingwolfboy/homebrew-cask,tjt263/homebrew-cask,ericbn/homebrew-cask,tedski/homebrew-cask,cohei/homebrew-cask,xyb/homebrew-cask,lantrix/homebrew-cask,mattfelsen/homebrew-cask,atsuyim/homebrew-cask,jawshooah/homebrew-cask,okket/homebrew-cask,ericbn/homebrew-cask,Fedalto/homebrew-cask,ksato9700/homebrew-cask,josa42/homebrew-cask,jayshao/homebrew-cask,arranubels/homebrew-cask,sanchezm/homebrew-cask,AnastasiaSulyagina/homebrew-cask,shonjir/homebrew-cask,maxnordlund/homebrew-cask,sohtsuka/homebrew-cask,jiashuw/homebrew-cask,aki77/homebrew-cask,optikfluffel/homebrew-cask,chino/homebrew-cask,n8henrie/homebrew-cask,andrewdisley/homebrew-cask,cedwardsmedia/homebrew-cask,zhuzihhhh/homebrew-cask,tranc99/homebrew-cask,asbachb/homebrew-cask,mkozjak/homebrew-cask,n0ts/homebrew-cask,drostron/homebrew-cask,gilesdring/homebrew-cask,stevehedrick/homebrew-cask,ayohrling/homebrew-cask,giannitm/homebrew-cask,jgarber623/homebrew-cask,adriweb/homebrew-cask,Labutin/homebrew-cask,miccal/homebrew-cask,sanyer/homebrew-cask,githubutilities/homebrew-cask,arronmabrey/homebrew-cask,joshka/homebrew-cask,nrlquaker/homebrew-cask,troyxmccall/homebrew-cask,casidiablo/homebrew-cask,neil-ca-moore/homebrew-cask,hvisage/homebrew-cask,jangalinski/homebrew-cask,retrography/homebrew-cask,genewoo/homebrew-cask,jalaziz/homebrew-cask,ajbw/homebrew-cask,Dremora/homebrew-cask,pacav69/homebrew-cask,howie/homebrew-cask,dspeckhard/homebrew-cask,mrmachine/homebrew-cask,KosherBacon/homebrew-cask,gerrypower/homebrew-cask,hakamadare/homebrew-cask,lalyos/homebrew-cask,kkdd/homebrew-cask,rcuza/homebrew-cask,timsutton/homebrew-cask,mahori/homebrew-cask,riyad/homebrew-cask,cliffcotino/homebrew-cask,cobyism/homebrew-cask,rubenerd/homebrew-cask,mgryszko/homebrew-cask,johnjelinek/homebrew-cask,SentinelWarren/homebrew-cask,mahori/homebrew-cask,koenrh/homebrew-cask,Cottser/homebrew-cask,aki77/homebrew-cask,cblecker/homebrew-cask,a-x-/homebrew-cask,michelegera/homebrew-cask,larseggert/homebrew-cask,schneidmaster/homebrew-cask,rhendric/homebrew-cask,nivanchikov/homebrew-cask,timsutton/homebrew-cask,johnste/homebrew-cask,lifepillar/homebrew-cask,ksylvan/homebrew-cask,jbeagley52/homebrew-cask,SentinelWarren/homebrew-cask,kingthorin/homebrew-cask,malob/homebrew-cask,fanquake/homebrew-cask,cohei/homebrew-cask,wickles/homebrew-cask,julionc/homebrew-cask,klane/homebrew-cask,genewoo/homebrew-cask,Ngrd/homebrew-cask,kiliankoe/homebrew-cask,afh/homebrew-cask,guylabs/homebrew-cask,flaviocamilo/homebrew-cask,hackhandslabs/homebrew-cask,mchlrmrz/homebrew-cask,a1russell/homebrew-cask,MoOx/homebrew-cask,janlugt/homebrew-cask,colindunn/homebrew-cask,vigosan/homebrew-cask,dwkns/homebrew-cask,jhowtan/homebrew-cask,blainesch/homebrew-cask,scribblemaniac/homebrew-cask,retrography/homebrew-cask,barravi/homebrew-cask,underyx/homebrew-cask,stonehippo/homebrew-cask,pkq/homebrew-cask,otaran/homebrew-cask,rhendric/homebrew-cask,bcomnes/homebrew-cask,renard/homebrew-cask,hanxue/caskroom,bchatard/homebrew-cask,lukeadams/homebrew-cask,troyxmccall/homebrew-cask,koenrh/homebrew-cask,cobyism/homebrew-cask,patresi/homebrew-cask,shorshe/homebrew-cask,rajiv/homebrew-cask,reelsense/homebrew-cask,bcaceiro/homebrew-cask,chrisfinazzo/homebrew-cask,CameronGarrett/homebrew-cask,joshka/homebrew-cask,wmorin/homebrew-cask,cblecker/homebrew-cask,zerrot/homebrew-cask,yutarody/homebrew-cask,renaudguerin/homebrew-cask,sparrc/homebrew-cask,mathbunnyru/homebrew-cask,moimikey/homebrew-cask,mfpierre/homebrew-cask,mishari/homebrew-cask,supriyantomaftuh/homebrew-cask,markhuber/homebrew-cask,kryhear/homebrew-cask,diogodamiani/homebrew-cask,chuanxd/homebrew-cask,perfide/homebrew-cask,nickpellant/homebrew-cask,tangestani/homebrew-cask,ywfwj2008/homebrew-cask,moimikey/homebrew-cask,reelsense/homebrew-cask,bcaceiro/homebrew-cask,malob/homebrew-cask,taherio/homebrew-cask,jppelteret/homebrew-cask,nshemonsky/homebrew-cask,lifepillar/homebrew-cask,hanxue/caskroom,forevergenin/homebrew-cask,renaudguerin/homebrew-cask,kolomiichenko/homebrew-cask,chrisfinazzo/homebrew-cask,codeurge/homebrew-cask,jalaziz/homebrew-cask,MicTech/homebrew-cask,6uclz1/homebrew-cask,kevyau/homebrew-cask,amatos/homebrew-cask,sscotth/homebrew-cask,lucasmezencio/homebrew-cask,stigkj/homebrew-caskroom-cask,mahori/homebrew-cask,gilesdring/homebrew-cask,wickedsp1d3r/homebrew-cask,mwek/homebrew-cask,mindriot101/homebrew-cask,artdevjs/homebrew-cask,stigkj/homebrew-caskroom-cask,ksato9700/homebrew-cask,yumitsu/homebrew-cask,moogar0880/homebrew-cask,jpodlech/homebrew-cask,jppelteret/homebrew-cask,yumitsu/homebrew-cask,bdhess/homebrew-cask,jeroenseegers/homebrew-cask,askl56/homebrew-cask,lukasbestle/homebrew-cask,yuhki50/homebrew-cask,faun/homebrew-cask,muan/homebrew-cask,Ephemera/homebrew-cask,imgarylai/homebrew-cask,a1russell/homebrew-cask,pablote/homebrew-cask,sosedoff/homebrew-cask,wayou/homebrew-cask,guerrero/homebrew-cask,kievechua/homebrew-cask,deiga/homebrew-cask,iAmGhost/homebrew-cask,Ngrd/homebrew-cask,deiga/homebrew-cask,wuman/homebrew-cask,xight/homebrew-cask,mwean/homebrew-cask,JosephViolago/homebrew-cask,tangestani/homebrew-cask,vitorgalvao/homebrew-cask,devmynd/homebrew-cask,bkono/homebrew-cask,gibsjose/homebrew-cask,scottsuch/homebrew-cask,victorpopkov/homebrew-cask,markthetech/homebrew-cask,tolbkni/homebrew-cask,Keloran/homebrew-cask,linc01n/homebrew-cask,kkdd/homebrew-cask,rogeriopradoj/homebrew-cask,tjnycum/homebrew-cask,gerrymiller/homebrew-cask,Gasol/homebrew-cask,stonehippo/homebrew-cask,ayohrling/homebrew-cask,christophermanning/homebrew-cask,fly19890211/homebrew-cask,leonmachadowilcox/homebrew-cask,samnung/homebrew-cask,y00rb/homebrew-cask,sparrc/homebrew-cask,feigaochn/homebrew-cask,johntrandall/homebrew-cask,mathbunnyru/homebrew-cask,gwaldo/homebrew-cask,johnste/homebrew-cask,wesen/homebrew-cask,zorosteven/homebrew-cask,jayshao/homebrew-cask,phpwutz/homebrew-cask,lucasmezencio/homebrew-cask,hellosky806/homebrew-cask,greg5green/homebrew-cask,joschi/homebrew-cask,wayou/homebrew-cask,chrisRidgers/homebrew-cask,Whoaa512/homebrew-cask,leipert/homebrew-cask,opsdev-ws/homebrew-cask,bric3/homebrew-cask,shonjir/homebrew-cask,andersonba/homebrew-cask,kTitan/homebrew-cask,Ibuprofen/homebrew-cask,Amorymeltzer/homebrew-cask,bchatard/homebrew-cask,tyage/homebrew-cask,Fedalto/homebrew-cask,axodys/homebrew-cask,fly19890211/homebrew-cask,devmynd/homebrew-cask,alebcay/homebrew-cask,mwean/homebrew-cask,bosr/homebrew-cask,royalwang/homebrew-cask,hackhandslabs/homebrew-cask,boydj/homebrew-cask,johnjelinek/homebrew-cask,MircoT/homebrew-cask,gyndav/homebrew-cask,jawshooah/homebrew-cask,paulombcosta/homebrew-cask,My2ndAngelic/homebrew-cask,m3nu/homebrew-cask,theoriginalgri/homebrew-cask,hristozov/homebrew-cask,bsiddiqui/homebrew-cask,giannitm/homebrew-cask,miccal/homebrew-cask,antogg/homebrew-cask,kTitan/homebrew-cask,lcasey001/homebrew-cask,perfide/homebrew-cask,daften/homebrew-cask,nivanchikov/homebrew-cask,RogerThiede/homebrew-cask,blainesch/homebrew-cask,patresi/homebrew-cask,unasuke/homebrew-cask,kiliankoe/homebrew-cask,af/homebrew-cask,enriclluelles/homebrew-cask,mlocher/homebrew-cask,scribblemaniac/homebrew-cask,dictcp/homebrew-cask,JosephViolago/homebrew-cask,pinut/homebrew-cask,dwihn0r/homebrew-cask,riyad/homebrew-cask,aguynamedryan/homebrew-cask,hyuna917/homebrew-cask,athrunsun/homebrew-cask,tedski/homebrew-cask,joschi/homebrew-cask,pkq/homebrew-cask,antogg/homebrew-cask,bdhess/homebrew-cask,chino/homebrew-cask,deiga/homebrew-cask,sgnh/homebrew-cask,nrlquaker/homebrew-cask,victorpopkov/homebrew-cask,yurikoles/homebrew-cask,kteru/homebrew-cask,askl56/homebrew-cask,boecko/homebrew-cask,mishari/homebrew-cask,mariusbutuc/homebrew-cask,colindunn/homebrew-cask,LaurentFough/homebrew-cask,shoichiaizawa/homebrew-cask,MatzFan/homebrew-cask,yurikoles/homebrew-cask,elnappo/homebrew-cask,RogerThiede/homebrew-cask,zmwangx/homebrew-cask,mwek/homebrew-cask,danielgomezrico/homebrew-cask,tyage/homebrew-cask,shanonvl/homebrew-cask,fazo96/homebrew-cask,cfillion/homebrew-cask,shishi/homebrew-cask,kronicd/homebrew-cask,sscotth/homebrew-cask,seanzxx/homebrew-cask,mjdescy/homebrew-cask,kuno/homebrew-cask,RickWong/homebrew-cask,zchee/homebrew-cask,rajiv/homebrew-cask,iamso/homebrew-cask,larseggert/homebrew-cask,shishi/homebrew-cask,toonetown/homebrew-cask,kingthorin/homebrew-cask,a-x-/homebrew-cask,janlugt/homebrew-cask,johntrandall/homebrew-cask,ldong/homebrew-cask,nathansgreen/homebrew-cask,epardee/homebrew-cask,Saklad5/homebrew-cask,13k/homebrew-cask,sohtsuka/homebrew-cask,stevehedrick/homebrew-cask,mwilmer/homebrew-cask,bgandon/homebrew-cask,paulombcosta/homebrew-cask,nathancahill/homebrew-cask,jellyfishcoder/homebrew-cask,deanmorin/homebrew-cask,JosephViolago/homebrew-cask,cclauss/homebrew-cask,spruceb/homebrew-cask,tangestani/homebrew-cask,ptb/homebrew-cask,kronicd/homebrew-cask,cobyism/homebrew-cask,fkrone/homebrew-cask,mkozjak/homebrew-cask,coeligena/homebrew-customized,huanzhang/homebrew-cask,gerrymiller/homebrew-cask,casidiablo/homebrew-cask,shorshe/homebrew-cask,jedahan/homebrew-cask,samshadwell/homebrew-cask,lantrix/homebrew-cask,a1russell/homebrew-cask,ddm/homebrew-cask,usami-k/homebrew-cask,alexg0/homebrew-cask,wuman/homebrew-cask,tedbundyjr/homebrew-cask,tjnycum/homebrew-cask,helloIAmPau/homebrew-cask,af/homebrew-cask,brianshumate/homebrew-cask,jrwesolo/homebrew-cask,malob/homebrew-cask,kpearson/homebrew-cask,athrunsun/homebrew-cask,kievechua/homebrew-cask,timsutton/homebrew-cask,aktau/homebrew-cask,hovancik/homebrew-cask,crmne/homebrew-cask,mgryszko/homebrew-cask,afdnlw/homebrew-cask,gwaldo/homebrew-cask,kostasdizas/homebrew-cask,chadcatlett/caskroom-homebrew-cask,huanzhang/homebrew-cask,adrianchia/homebrew-cask,pablote/homebrew-cask,13k/homebrew-cask,fharbe/homebrew-cask,ericbn/homebrew-cask,tmoreira2020/homebrew,sanchezm/homebrew-cask,nathanielvarona/homebrew-cask,michelegera/homebrew-cask,esebastian/homebrew-cask,andersonba/homebrew-cask,kirikiriyamama/homebrew-cask,goxberry/homebrew-cask,xcezx/homebrew-cask,ywfwj2008/homebrew-cask,mjgardner/homebrew-cask,Ibuprofen/homebrew-cask,ninjahoahong/homebrew-cask,gibsjose/homebrew-cask,vmrob/homebrew-cask,axodys/homebrew-cask,ebraminio/homebrew-cask,epmatsw/homebrew-cask,daften/homebrew-cask,mokagio/homebrew-cask,hristozov/homebrew-cask,FinalDes/homebrew-cask,lolgear/homebrew-cask,stevenmaguire/homebrew-cask,tedbundyjr/homebrew-cask,esebastian/homebrew-cask,sirodoht/homebrew-cask,mchlrmrz/homebrew-cask,LaurentFough/homebrew-cask,JoelLarson/homebrew-cask,shonjir/homebrew-cask,wmorin/homebrew-cask,christer155/homebrew-cask,JacopKane/homebrew-cask,alebcay/homebrew-cask,robbiethegeek/homebrew-cask,qnm/homebrew-cask,kesara/homebrew-cask,RJHsiao/homebrew-cask,vigosan/homebrew-cask,gyndav/homebrew-cask,atsuyim/homebrew-cask,afdnlw/homebrew-cask,RickWong/homebrew-cask,inz/homebrew-cask,robertgzr/homebrew-cask,mindriot101/homebrew-cask,jeroenseegers/homebrew-cask,miku/homebrew-cask,otaran/homebrew-cask,jgarber623/homebrew-cask,cblecker/homebrew-cask,puffdad/homebrew-cask,miguelfrde/homebrew-cask,skyyuan/homebrew-cask,imgarylai/homebrew-cask,wastrachan/homebrew-cask,ohammersmith/homebrew-cask,n0ts/homebrew-cask,decrement/homebrew-cask,slack4u/homebrew-cask,cclauss/homebrew-cask,opsdev-ws/homebrew-cask,skatsuta/homebrew-cask,supriyantomaftuh/homebrew-cask,jgarber623/homebrew-cask,boydj/homebrew-cask,nysthee/homebrew-cask,bendoerr/homebrew-cask,pkq/homebrew-cask,uetchy/homebrew-cask,shoichiaizawa/homebrew-cask,0xadada/homebrew-cask,yurrriq/homebrew-cask,jaredsampson/homebrew-cask,psibre/homebrew-cask,lvicentesanchez/homebrew-cask,andyli/homebrew-cask,jrwesolo/homebrew-cask,zhuzihhhh/homebrew-cask,gyndav/homebrew-cask,paour/homebrew-cask,KosherBacon/homebrew-cask,jacobbednarz/homebrew-cask,xcezx/homebrew-cask,samnung/homebrew-cask,enriclluelles/homebrew-cask,hovancik/homebrew-cask,nicolas-brousse/homebrew-cask,exherb/homebrew-cask,paour/homebrew-cask,jiashuw/homebrew-cask,xakraz/homebrew-cask,kingthorin/homebrew-cask,katoquro/homebrew-cask,maxnordlund/homebrew-cask,xyb/homebrew-cask,dustinblackman/homebrew-cask,akiomik/homebrew-cask,FredLackeyOfficial/homebrew-cask,jhowtan/homebrew-cask,kassi/homebrew-cask,taherio/homebrew-cask,julionc/homebrew-cask,scw/homebrew-cask,mhubig/homebrew-cask,JikkuJose/homebrew-cask,nicolas-brousse/homebrew-cask,deanmorin/homebrew-cask,BenjaminHCCarr/homebrew-cask,winkelsdorf/homebrew-cask,buo/homebrew-cask,moogar0880/homebrew-cask,xtian/homebrew-cask,jamesmlees/homebrew-cask,rubenerd/homebrew-cask,Hywan/homebrew-cask,jpodlech/homebrew-cask,djakarta-trap/homebrew-myCask,nathancahill/homebrew-cask,MichaelPei/homebrew-cask,FinalDes/homebrew-cask,sanyer/homebrew-cask,dunn/homebrew-cask,pacav69/homebrew-cask,ninjahoahong/homebrew-cask,akiomik/homebrew-cask,cliffcotino/homebrew-cask,d/homebrew-cask,claui/homebrew-cask,markhuber/homebrew-cask,ianyh/homebrew-cask,0xadada/homebrew-cask,diguage/homebrew-cask,helloIAmPau/homebrew-cask,lumaxis/homebrew-cask,kolomiichenko/homebrew-cask,thehunmonkgroup/homebrew-cask,morganestes/homebrew-cask,bkono/homebrew-cask,SamiHiltunen/homebrew-cask,joshka/homebrew-cask,BahtiyarB/homebrew-cask,afh/homebrew-cask | ruby | ## Code Before:
cask :v1 => 'nndd' do
version '2.4.3'
sha256 '6a73dcad2e73d877ad1503ed1162cae1a1c84f21d1abaa6aaf9b31bb2fbca531'
url 'http://dl.sourceforge.jp/nndd/62201/NNDD_v2_4_3.dmg'
name 'NNDD'
homepage 'http://sourceforge.jp/projects/nndd/'
license :x11
preflight do
system_command staged_path.join('Install NNDD.app/Contents/MacOS/Install NNDD'),
:args => ['-silent', '-eulaAccepted', '-location', staged_path]
end
app 'NNDD.app'
depends_on :cask => 'adobe-air'
end
## Instruction:
Change hosting service name in NNDD.app Cask
## Code After:
cask :v1 => 'nndd' do
version '2.4.3'
sha256 '6a73dcad2e73d877ad1503ed1162cae1a1c84f21d1abaa6aaf9b31bb2fbca531'
url 'http://dl.osdn.jp/nndd/62201/NNDD_v2_4_3.dmg'
name 'NNDD'
homepage 'http://osdn.jp/projects/nndd/'
license :x11
preflight do
system_command staged_path.join('Install NNDD.app/Contents/MacOS/Install NNDD'),
:args => ['-silent', '-eulaAccepted', '-location', staged_path]
end
app 'NNDD.app'
depends_on :cask => 'adobe-air'
end
| cask :v1 => 'nndd' do
version '2.4.3'
sha256 '6a73dcad2e73d877ad1503ed1162cae1a1c84f21d1abaa6aaf9b31bb2fbca531'
- url 'http://dl.sourceforge.jp/nndd/62201/NNDD_v2_4_3.dmg'
? ^^^^^^^^^^
+ url 'http://dl.osdn.jp/nndd/62201/NNDD_v2_4_3.dmg'
? + ^^
name 'NNDD'
- homepage 'http://sourceforge.jp/projects/nndd/'
? ^^^^^^^^^^
+ homepage 'http://osdn.jp/projects/nndd/'
? + ^^
license :x11
preflight do
system_command staged_path.join('Install NNDD.app/Contents/MacOS/Install NNDD'),
:args => ['-silent', '-eulaAccepted', '-location', staged_path]
end
app 'NNDD.app'
depends_on :cask => 'adobe-air'
end | 4 | 0.235294 | 2 | 2 |
867686580ae5d00b33efbbde567371d431c20c5c | package.json | package.json | {
"name": "postcss-assets",
"version": "4.0.0",
"description": "PostCSS plugin to manage assets",
"keywords": [
"assets",
"base64",
"css",
"image",
"path",
"postcss",
"postcss-plugin",
"size",
"url"
],
"license": "MIT",
"author": "Vadym Borodin <borodean@gmail.com>",
"repository": "assetsjs/postcss-assets",
"scripts": {
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"
},
"dependencies": {
"assets": "^2.0.0",
"postcss": "^5.0.12",
"postcss-functions": "^2.1.0"
},
"devDependencies": {
"ava": "^0.11.0",
"eslint": "^1.10.3",
"nyc": "^5.5.0"
}
}
| {
"name": "postcss-assets",
"version": "4.0.0",
"description": "PostCSS plugin to manage assets",
"keywords": [
"assets",
"base64",
"css",
"image",
"path",
"postcss",
"postcss-plugin",
"size",
"url"
],
"license": "MIT",
"author": "Vadym Borodin <borodean@gmail.com>",
"contributors": [
"Alexey Plutalov <demiazz.py@gmail.com> (https://twitter.com/demiazz)",
"Andrey Sitnik <andrey@sitnik.ru> (http://sitnik.ru)",
"Dave Clayton <davedx@gmail.com> (http://www.dave78.com)",
"Ivan Vlasenko (https://github.com/avanes)",
"Pascal Duez (http://pascalduez.me)"
],
"repository": "assetsjs/postcss-assets",
"scripts": {
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"
},
"dependencies": {
"assets": "^2.0.0",
"postcss": "^5.0.12",
"postcss-functions": "^2.1.0"
},
"devDependencies": {
"ava": "^0.11.0",
"eslint": "^1.10.3",
"nyc": "^5.5.0"
}
}
| Add the list of contributors | Add the list of contributors
| JSON | mit | assetsjs/postcss-assets,borodean/postcss-assets | json | ## Code Before:
{
"name": "postcss-assets",
"version": "4.0.0",
"description": "PostCSS plugin to manage assets",
"keywords": [
"assets",
"base64",
"css",
"image",
"path",
"postcss",
"postcss-plugin",
"size",
"url"
],
"license": "MIT",
"author": "Vadym Borodin <borodean@gmail.com>",
"repository": "assetsjs/postcss-assets",
"scripts": {
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"
},
"dependencies": {
"assets": "^2.0.0",
"postcss": "^5.0.12",
"postcss-functions": "^2.1.0"
},
"devDependencies": {
"ava": "^0.11.0",
"eslint": "^1.10.3",
"nyc": "^5.5.0"
}
}
## Instruction:
Add the list of contributors
## Code After:
{
"name": "postcss-assets",
"version": "4.0.0",
"description": "PostCSS plugin to manage assets",
"keywords": [
"assets",
"base64",
"css",
"image",
"path",
"postcss",
"postcss-plugin",
"size",
"url"
],
"license": "MIT",
"author": "Vadym Borodin <borodean@gmail.com>",
"contributors": [
"Alexey Plutalov <demiazz.py@gmail.com> (https://twitter.com/demiazz)",
"Andrey Sitnik <andrey@sitnik.ru> (http://sitnik.ru)",
"Dave Clayton <davedx@gmail.com> (http://www.dave78.com)",
"Ivan Vlasenko (https://github.com/avanes)",
"Pascal Duez (http://pascalduez.me)"
],
"repository": "assetsjs/postcss-assets",
"scripts": {
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"
},
"dependencies": {
"assets": "^2.0.0",
"postcss": "^5.0.12",
"postcss-functions": "^2.1.0"
},
"devDependencies": {
"ava": "^0.11.0",
"eslint": "^1.10.3",
"nyc": "^5.5.0"
}
}
| {
"name": "postcss-assets",
"version": "4.0.0",
"description": "PostCSS plugin to manage assets",
"keywords": [
"assets",
"base64",
"css",
"image",
"path",
"postcss",
"postcss-plugin",
"size",
"url"
],
"license": "MIT",
"author": "Vadym Borodin <borodean@gmail.com>",
+ "contributors": [
+ "Alexey Plutalov <demiazz.py@gmail.com> (https://twitter.com/demiazz)",
+ "Andrey Sitnik <andrey@sitnik.ru> (http://sitnik.ru)",
+ "Dave Clayton <davedx@gmail.com> (http://www.dave78.com)",
+ "Ivan Vlasenko (https://github.com/avanes)",
+ "Pascal Duez (http://pascalduez.me)"
+ ],
"repository": "assetsjs/postcss-assets",
"scripts": {
"coveralls": "nyc report --reporter=text-lcov | coveralls",
"test": "eslint --ignore-path .gitignore . && nyc --reporter=text --reporter=html ./node_modules/ava/cli.js"
},
"dependencies": {
"assets": "^2.0.0",
"postcss": "^5.0.12",
"postcss-functions": "^2.1.0"
},
"devDependencies": {
"ava": "^0.11.0",
"eslint": "^1.10.3",
"nyc": "^5.5.0"
}
} | 7 | 0.212121 | 7 | 0 |
f969a9b919fb9765c8f955ab2c68284c41abb097 | aes.c | aes.c |
static void aes_encrypt_block_openssl(const unsigned char *, unsigned char *, const AES_KEY *);
static void aes_encrypt_block_aesni(const unsigned char *, unsigned char *, const AES_KEY *);
int
use_aesni()
{
return 0;
}
void
aes_encrypt_block(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
if (use_aesni())
{
aes_encrypt_block_aesni(in, out, key);
}
else
{
aes_encrypt_block_openssl(in, out, key);
}
}
static void
aes_encrypt_block_openssl(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
AES_encrypt(in, out, key);
}
static void
aes_encrypt_block_aesni(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
AES_encrypt(in, out, key);
}
|
static void aes_encrypt_block_openssl(const unsigned char *, unsigned char *, const AES_KEY *);
static void aes_encrypt_block_aesni(const unsigned char *, unsigned char *, const AES_KEY *);
int
use_aesni()
{
return 0;
}
void
aes_encrypt_block(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
static int aesni;
if (aesni == 0)
{
aesni = use_aesni();
}
if (aesni == 1)
{
aes_encrypt_block_aesni(in, out, key);
}
else
{
aes_encrypt_block_openssl(in, out, key);
}
}
static void
aes_encrypt_block_openssl(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
AES_encrypt(in, out, key);
}
static void
aes_encrypt_block_aesni(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
AES_encrypt(in, out, key);
}
| Use a static variable to track whether to use AES-NI | Use a static variable to track whether to use AES-NI
| C | bsd-2-clause | seankelly/aesni,seankelly/aesni | c | ## Code Before:
static void aes_encrypt_block_openssl(const unsigned char *, unsigned char *, const AES_KEY *);
static void aes_encrypt_block_aesni(const unsigned char *, unsigned char *, const AES_KEY *);
int
use_aesni()
{
return 0;
}
void
aes_encrypt_block(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
if (use_aesni())
{
aes_encrypt_block_aesni(in, out, key);
}
else
{
aes_encrypt_block_openssl(in, out, key);
}
}
static void
aes_encrypt_block_openssl(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
AES_encrypt(in, out, key);
}
static void
aes_encrypt_block_aesni(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
AES_encrypt(in, out, key);
}
## Instruction:
Use a static variable to track whether to use AES-NI
## Code After:
static void aes_encrypt_block_openssl(const unsigned char *, unsigned char *, const AES_KEY *);
static void aes_encrypt_block_aesni(const unsigned char *, unsigned char *, const AES_KEY *);
int
use_aesni()
{
return 0;
}
void
aes_encrypt_block(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
static int aesni;
if (aesni == 0)
{
aesni = use_aesni();
}
if (aesni == 1)
{
aes_encrypt_block_aesni(in, out, key);
}
else
{
aes_encrypt_block_openssl(in, out, key);
}
}
static void
aes_encrypt_block_openssl(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
AES_encrypt(in, out, key);
}
static void
aes_encrypt_block_aesni(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
AES_encrypt(in, out, key);
}
|
static void aes_encrypt_block_openssl(const unsigned char *, unsigned char *, const AES_KEY *);
static void aes_encrypt_block_aesni(const unsigned char *, unsigned char *, const AES_KEY *);
int
use_aesni()
{
return 0;
}
void
aes_encrypt_block(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
- if (use_aesni())
+ static int aesni;
+
+ if (aesni == 0)
+ {
+ aesni = use_aesni();
+ }
+
+ if (aesni == 1)
{
aes_encrypt_block_aesni(in, out, key);
}
else
{
aes_encrypt_block_openssl(in, out, key);
}
}
static void
aes_encrypt_block_openssl(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
AES_encrypt(in, out, key);
}
static void
aes_encrypt_block_aesni(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
AES_encrypt(in, out, key);
} | 9 | 0.264706 | 8 | 1 |
3d7601095c39de4ed485c464f8f02551c72f3e8c | spec/features/admin/products/search_for_product_spec.rb | spec/features/admin/products/search_for_product_spec.rb | require 'rails_helper'
feature 'Search for product' do
let!(:product) { FactoryGirl.create(:product, name: 'Organic Cotton Romper') }
background do
FactoryGirl.create(:website)
sign_in_as_admin
end
scenario 'Search for and navigate to product', js: true do
given_i_am_on_the_product_index
and_i_search_for 'Organic'
when_i_click_on 'Organic Cotton Romper'
then_i_should_be_on_the_edit_product_page
end
def given_i_am_on_the_product_index
visit admin_products_path
end
def and_i_search_for query
save_and_open_page
fill_in 'query', with: query
click_button 'Search'
end
def when_i_click_on link_text
within(:css, '#search-results') do
click_link link_text
end
end
def then_i_should_be_on_the_edit_product_page
expect(page).to have_css(:h1, text: 'Edit Product')
end
end
| require 'rails_helper'
feature 'Search for product' do
let!(:product) { FactoryGirl.create(:product, name: 'Organic Cotton Romper') }
background do
FactoryGirl.create(:website)
sign_in_as_admin
end
scenario 'Search for and navigate to product', js: true do
given_i_am_on_the_product_index
and_i_search_for 'Organic'
when_i_click_on 'Organic Cotton Romper'
then_i_should_be_on_the_edit_product_page
end
def given_i_am_on_the_product_index
visit admin_products_path
end
def and_i_search_for query
fill_in 'query', with: query
click_button 'Search'
end
def when_i_click_on link_text
within(:css, '#search-results') do
click_link link_text
end
end
def then_i_should_be_on_the_edit_product_page
expect(page).to have_css(:h1, text: 'Edit Product')
end
end
| Remove debugging code in failing spec | Remove debugging code in failing spec
| Ruby | mit | ianfleeton/zmey,ianfleeton/zmey,ianfleeton/zmey,ianfleeton/zmey | ruby | ## Code Before:
require 'rails_helper'
feature 'Search for product' do
let!(:product) { FactoryGirl.create(:product, name: 'Organic Cotton Romper') }
background do
FactoryGirl.create(:website)
sign_in_as_admin
end
scenario 'Search for and navigate to product', js: true do
given_i_am_on_the_product_index
and_i_search_for 'Organic'
when_i_click_on 'Organic Cotton Romper'
then_i_should_be_on_the_edit_product_page
end
def given_i_am_on_the_product_index
visit admin_products_path
end
def and_i_search_for query
save_and_open_page
fill_in 'query', with: query
click_button 'Search'
end
def when_i_click_on link_text
within(:css, '#search-results') do
click_link link_text
end
end
def then_i_should_be_on_the_edit_product_page
expect(page).to have_css(:h1, text: 'Edit Product')
end
end
## Instruction:
Remove debugging code in failing spec
## Code After:
require 'rails_helper'
feature 'Search for product' do
let!(:product) { FactoryGirl.create(:product, name: 'Organic Cotton Romper') }
background do
FactoryGirl.create(:website)
sign_in_as_admin
end
scenario 'Search for and navigate to product', js: true do
given_i_am_on_the_product_index
and_i_search_for 'Organic'
when_i_click_on 'Organic Cotton Romper'
then_i_should_be_on_the_edit_product_page
end
def given_i_am_on_the_product_index
visit admin_products_path
end
def and_i_search_for query
fill_in 'query', with: query
click_button 'Search'
end
def when_i_click_on link_text
within(:css, '#search-results') do
click_link link_text
end
end
def then_i_should_be_on_the_edit_product_page
expect(page).to have_css(:h1, text: 'Edit Product')
end
end
| require 'rails_helper'
feature 'Search for product' do
let!(:product) { FactoryGirl.create(:product, name: 'Organic Cotton Romper') }
background do
FactoryGirl.create(:website)
sign_in_as_admin
end
scenario 'Search for and navigate to product', js: true do
given_i_am_on_the_product_index
and_i_search_for 'Organic'
when_i_click_on 'Organic Cotton Romper'
then_i_should_be_on_the_edit_product_page
end
def given_i_am_on_the_product_index
visit admin_products_path
end
def and_i_search_for query
- save_and_open_page
fill_in 'query', with: query
click_button 'Search'
end
def when_i_click_on link_text
within(:css, '#search-results') do
click_link link_text
end
end
def then_i_should_be_on_the_edit_product_page
expect(page).to have_css(:h1, text: 'Edit Product')
end
end | 1 | 0.027027 | 0 | 1 |
578138ec68a7481c29c11c15a0ff978b3ff1a2bb | EduChainApp/js/tabs/tasks/TaskListContainer.js | EduChainApp/js/tabs/tasks/TaskListContainer.js | /**
*
* @flow
*/
'use strict';
import React from 'react';
import TaskListView from './TaskListView';
import type {Task} from '../../reducers/tasks';
import ENV from '../../common/Environment';
export default class TaskListContainer extends React.Component {
state: {
tasks: Array<Task>
};
constructor() {
super();
this.state = {
tasks: []
};
}
async getAllTasks(): Promise {
try {
let response = await fetch(ENV.__API_BRIDGE+'/tasks');
let responseJSON = await response.json();
return responseJSON.data;
} catch (err) {
console.error("getAllTasks() -> Error: ", err);
}
}
componentWillMount() {
let testRows = () => {
let arr = [];
let flip = false;
for (let i = 0; i < 20; i++) {
arr.push({
id: `${i}`,
title: `Task ${i}`,
desc: `desc for task ${i}`,
reward: '200',
complete: '3/5',
status: flip ? 'To Do' : 'Completed',
address: "asdasdadasdas"
});
flip = !flip;
}
return arr;
};
let tr: Array<Task> = testRows();
this.setState({tasks: tr});
}
componentDidMount() {
this.getAllTasks().then(tasks => {
this.setState({tasks: tasks});
});
}
render() {
return (
<TaskListView navigator={this.props.navigator} tasks={this.state.tasks} />
);
}
}
| /**
*
* @flow
*/
'use strict';
import React from 'react';
import TaskListView from './TaskListView';
import type {Task} from '../../reducers/tasks';
import ENV from '../../common/Environment';
export default class TaskListContainer extends React.Component {
state: {
tasks: Array<Task>
};
constructor() {
super();
this.state = {
tasks: []
};
}
setTasks(tasks: Array<Task>) {
return this.setState({tasks: tasks});
}
async getAllTasks(): Promise {
try {
let response = await fetch(ENV.__API_BRIDGE+'/tasks');
let responseJSON = await response.json();
return responseJSON.data;
} catch (err) {
console.error("getAllTasks() -> Error: ", err);
}
}
async onRefresh(): Promise {
console.log("Refreshing TaskList...");
this.getAllTasks().then(tasks => this.setTasks(tasks));
}
componentDidMount() {
this.getAllTasks().then(tasks => this.setTasks(tasks));
}
render() {
return (
<TaskListView
tasks={this.state.tasks}
navigator={this.props.navigator}
onRefresh={this.onRefresh.bind(this)}
/>
);
}
}
| Remove test row generator. Adds `onRefresh` & `setTasks` methods. | Remove test row generator. Adds `onRefresh` & `setTasks` methods.
| JavaScript | mit | bkrem/educhain,bkrem/educhain,bkrem/educhain,bkrem/educhain | javascript | ## Code Before:
/**
*
* @flow
*/
'use strict';
import React from 'react';
import TaskListView from './TaskListView';
import type {Task} from '../../reducers/tasks';
import ENV from '../../common/Environment';
export default class TaskListContainer extends React.Component {
state: {
tasks: Array<Task>
};
constructor() {
super();
this.state = {
tasks: []
};
}
async getAllTasks(): Promise {
try {
let response = await fetch(ENV.__API_BRIDGE+'/tasks');
let responseJSON = await response.json();
return responseJSON.data;
} catch (err) {
console.error("getAllTasks() -> Error: ", err);
}
}
componentWillMount() {
let testRows = () => {
let arr = [];
let flip = false;
for (let i = 0; i < 20; i++) {
arr.push({
id: `${i}`,
title: `Task ${i}`,
desc: `desc for task ${i}`,
reward: '200',
complete: '3/5',
status: flip ? 'To Do' : 'Completed',
address: "asdasdadasdas"
});
flip = !flip;
}
return arr;
};
let tr: Array<Task> = testRows();
this.setState({tasks: tr});
}
componentDidMount() {
this.getAllTasks().then(tasks => {
this.setState({tasks: tasks});
});
}
render() {
return (
<TaskListView navigator={this.props.navigator} tasks={this.state.tasks} />
);
}
}
## Instruction:
Remove test row generator. Adds `onRefresh` & `setTasks` methods.
## Code After:
/**
*
* @flow
*/
'use strict';
import React from 'react';
import TaskListView from './TaskListView';
import type {Task} from '../../reducers/tasks';
import ENV from '../../common/Environment';
export default class TaskListContainer extends React.Component {
state: {
tasks: Array<Task>
};
constructor() {
super();
this.state = {
tasks: []
};
}
setTasks(tasks: Array<Task>) {
return this.setState({tasks: tasks});
}
async getAllTasks(): Promise {
try {
let response = await fetch(ENV.__API_BRIDGE+'/tasks');
let responseJSON = await response.json();
return responseJSON.data;
} catch (err) {
console.error("getAllTasks() -> Error: ", err);
}
}
async onRefresh(): Promise {
console.log("Refreshing TaskList...");
this.getAllTasks().then(tasks => this.setTasks(tasks));
}
componentDidMount() {
this.getAllTasks().then(tasks => this.setTasks(tasks));
}
render() {
return (
<TaskListView
tasks={this.state.tasks}
navigator={this.props.navigator}
onRefresh={this.onRefresh.bind(this)}
/>
);
}
}
| /**
*
* @flow
*/
'use strict';
import React from 'react';
import TaskListView from './TaskListView';
import type {Task} from '../../reducers/tasks';
import ENV from '../../common/Environment';
export default class TaskListContainer extends React.Component {
state: {
tasks: Array<Task>
};
constructor() {
super();
this.state = {
tasks: []
};
}
+ setTasks(tasks: Array<Task>) {
+ return this.setState({tasks: tasks});
+ }
+
async getAllTasks(): Promise {
try {
let response = await fetch(ENV.__API_BRIDGE+'/tasks');
let responseJSON = await response.json();
return responseJSON.data;
} catch (err) {
console.error("getAllTasks() -> Error: ", err);
}
}
+
+ async onRefresh(): Promise {
+ console.log("Refreshing TaskList...");
+ this.getAllTasks().then(tasks => this.setTasks(tasks));
- componentWillMount() {
- let testRows = () => {
- let arr = [];
- let flip = false;
- for (let i = 0; i < 20; i++) {
- arr.push({
- id: `${i}`,
- title: `Task ${i}`,
- desc: `desc for task ${i}`,
- reward: '200',
- complete: '3/5',
- status: flip ? 'To Do' : 'Completed',
- address: "asdasdadasdas"
- });
- flip = !flip;
- }
- return arr;
- };
- let tr: Array<Task> = testRows();
- this.setState({tasks: tr});
}
componentDidMount() {
- this.getAllTasks().then(tasks => {
? ^
+ this.getAllTasks().then(tasks => this.setTasks(tasks));
? ^^^^^^^^^^^^^^^^^^^^^^
- this.setState({tasks: tasks});
- });
}
render() {
return (
- <TaskListView navigator={this.props.navigator} tasks={this.state.tasks} />
+ <TaskListView
+ tasks={this.state.tasks}
+ navigator={this.props.navigator}
+ onRefresh={this.onRefresh.bind(this)}
+ />
);
}
} | 38 | 0.567164 | 14 | 24 |
3a9a92186f0c241eaeb8b531e607a6f62cb623be | spec/models/user_spec.rb | spec/models/user_spec.rb | require 'spec_helper'
describe User do
it "should return login on User.login" do
user = User.create!(:email => 'icesik@altlinux.org',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.login.should == 'icesik'
end
it "should return true for altlinux team member" do
user = User.create!(:email => 'icesik@altlinux.org',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_true
end
it "should return false for non altlinux team member" do
user = User.create!(:email => 'user@email.com',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_false
end
it "should deny change email" do
user = User.create!(:email => 'user@email.com',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.email = 'icesik@altlinux.org'
user.save.should be_false
end
end
| require 'spec_helper'
describe User do
it "should return login on User.login" do
user = User.create!(:email => 'icesik@altlinux.org',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.login.should == 'icesik'
end
it "should return true for @altlinux.org emails" do
user = User.create!(:email => 'icesik@altlinux.org',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_true
end
it "should return true for @altlinux.ru emails" do
user = User.create!(:email => 'icesik@altlinux.ru',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_true
end
it "should return false for non altlinux team member" do
user = User.create!(:email => 'user@email.com',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_false
end
it "should deny change email" do
user = User.create!(:email => 'user@email.com',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.email = 'icesik@altlinux.org'
user.save.should be_false
end
end
| Add more specs for User model | Add more specs for User model
| Ruby | mit | biow0lf/prometheus2.0,biow0lf/prometheus2.0,biow0lf/prometheus2.0,biow0lf/prometheus2.0 | ruby | ## Code Before:
require 'spec_helper'
describe User do
it "should return login on User.login" do
user = User.create!(:email => 'icesik@altlinux.org',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.login.should == 'icesik'
end
it "should return true for altlinux team member" do
user = User.create!(:email => 'icesik@altlinux.org',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_true
end
it "should return false for non altlinux team member" do
user = User.create!(:email => 'user@email.com',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_false
end
it "should deny change email" do
user = User.create!(:email => 'user@email.com',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.email = 'icesik@altlinux.org'
user.save.should be_false
end
end
## Instruction:
Add more specs for User model
## Code After:
require 'spec_helper'
describe User do
it "should return login on User.login" do
user = User.create!(:email => 'icesik@altlinux.org',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.login.should == 'icesik'
end
it "should return true for @altlinux.org emails" do
user = User.create!(:email => 'icesik@altlinux.org',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_true
end
it "should return true for @altlinux.ru emails" do
user = User.create!(:email => 'icesik@altlinux.ru',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_true
end
it "should return false for non altlinux team member" do
user = User.create!(:email => 'user@email.com',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_false
end
it "should deny change email" do
user = User.create!(:email => 'user@email.com',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.email = 'icesik@altlinux.org'
user.save.should be_false
end
end
| require 'spec_helper'
describe User do
it "should return login on User.login" do
user = User.create!(:email => 'icesik@altlinux.org',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.login.should == 'icesik'
end
- it "should return true for altlinux team member" do
? ------ ^^^
+ it "should return true for @altlinux.org emails" do
? + ++++ ^^^^
user = User.create!(:email => 'icesik@altlinux.org',
+ :password => 'password',
+ :password_confirmation => 'password')
+ user.confirmed_at = Time.zone.now
+ user.save!
+ user.is_alt_team?.should be_true
+ end
+
+ it "should return true for @altlinux.ru emails" do
+ user = User.create!(:email => 'icesik@altlinux.ru',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_true
end
it "should return false for non altlinux team member" do
user = User.create!(:email => 'user@email.com',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.is_alt_team?.should be_false
end
it "should deny change email" do
user = User.create!(:email => 'user@email.com',
:password => 'password',
:password_confirmation => 'password')
user.confirmed_at = Time.zone.now
user.save!
user.email = 'icesik@altlinux.org'
user.save.should be_false
end
end | 11 | 0.275 | 10 | 1 |
4e84f307bf9df8a2667016d545428f86ea1b8aa1 | client/templates/layout/appLayout.html | client/templates/layout/appLayout.html | <head>
<title>Mandrill</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/ManDfav.png">
<script src="/countdown.min.js"></script>
<script src="/moment-countdown.min.js"></script>
</head>
<template name="appLayout">
{{#if currentUser}}
{{> appSidebar}}
<div id="appContent">
<div class="row">
<div class="col-xs-12">{{> yield}}</div>
</div>
<hr />
<p class="app-footer small text-muted text-center">
<a href="https://github.com/wollardj/Mandrill" target="_blank">
Mandrill {{mandrillVersion}}
</a> on <a href="https://www.meteor.com" target="_blank">
Meteor {{meteorVersion}}
</a>
</p>
</div>
{{/if}}
{{#unless currentUser}}
{{> yield}}
{{/unless}}
{{> serverStatusDialog}}
</template> | <head>
<title>Mandrill</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/ManDfav.png">
<script src="/countdown.min.js"></script>
<script src="/moment-countdown.min.js"></script>
</head>
<template name="appLayout">
{{#if currentUser}}
{{> appSidebar}}
<div id="appContent">
<div class="row">
<div class="col-xs-12">{{> yield}}</div>
</div>
<hr />
<p class="app-footer small text-muted text-center">
Mandrill {{mandrillVersion}} on Meteor {{meteorVersion}}
</p>
</div>
{{/if}}
{{#unless currentUser}}
{{> yield}}
{{/unless}}
{{> serverStatusDialog}}
</template> | Revert "Clickable version info in the footer." | Revert "Clickable version info in the footer."
This reverts commit 7268d5686edbc0476b19fd62f0e9506b193042d5.
| HTML | apache-2.0 | wollardj/Mandrill | html | ## Code Before:
<head>
<title>Mandrill</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/ManDfav.png">
<script src="/countdown.min.js"></script>
<script src="/moment-countdown.min.js"></script>
</head>
<template name="appLayout">
{{#if currentUser}}
{{> appSidebar}}
<div id="appContent">
<div class="row">
<div class="col-xs-12">{{> yield}}</div>
</div>
<hr />
<p class="app-footer small text-muted text-center">
<a href="https://github.com/wollardj/Mandrill" target="_blank">
Mandrill {{mandrillVersion}}
</a> on <a href="https://www.meteor.com" target="_blank">
Meteor {{meteorVersion}}
</a>
</p>
</div>
{{/if}}
{{#unless currentUser}}
{{> yield}}
{{/unless}}
{{> serverStatusDialog}}
</template>
## Instruction:
Revert "Clickable version info in the footer."
This reverts commit 7268d5686edbc0476b19fd62f0e9506b193042d5.
## Code After:
<head>
<title>Mandrill</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/ManDfav.png">
<script src="/countdown.min.js"></script>
<script src="/moment-countdown.min.js"></script>
</head>
<template name="appLayout">
{{#if currentUser}}
{{> appSidebar}}
<div id="appContent">
<div class="row">
<div class="col-xs-12">{{> yield}}</div>
</div>
<hr />
<p class="app-footer small text-muted text-center">
Mandrill {{mandrillVersion}} on Meteor {{meteorVersion}}
</p>
</div>
{{/if}}
{{#unless currentUser}}
{{> yield}}
{{/unless}}
{{> serverStatusDialog}}
</template> | <head>
<title>Mandrill</title>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/ManDfav.png">
<script src="/countdown.min.js"></script>
<script src="/moment-countdown.min.js"></script>
</head>
<template name="appLayout">
{{#if currentUser}}
{{> appSidebar}}
<div id="appContent">
<div class="row">
<div class="col-xs-12">{{> yield}}</div>
</div>
<hr />
<p class="app-footer small text-muted text-center">
+ Mandrill {{mandrillVersion}} on Meteor {{meteorVersion}}
- <a href="https://github.com/wollardj/Mandrill" target="_blank">
- Mandrill {{mandrillVersion}}
- </a> on <a href="https://www.meteor.com" target="_blank">
- Meteor {{meteorVersion}}
- </a>
</p>
</div>
{{/if}}
{{#unless currentUser}}
{{> yield}}
{{/unless}}
{{> serverStatusDialog}}
</template> | 6 | 0.181818 | 1 | 5 |
9c901d5bcbd6088b28e7bbac7013b85d465bf5bb | README.md | README.md | MKCommons-Android
=================
Utility library for Android
| MKCommons-Android
=================
While I don't mind sharing the code, this is mostly a private collecton of random stuff that I pretty often. You won't find much documentation or an overview here, and lots of the stuff is also pretty old.
I want to extract the code that I need frequently into separate libraries, but well... you know how it works. One day ;-)
| Add short explanation about the repo | Add short explanation about the repo | Markdown | bsd-3-clause | mikumi/MKCommons-Android | markdown | ## Code Before:
MKCommons-Android
=================
Utility library for Android
## Instruction:
Add short explanation about the repo
## Code After:
MKCommons-Android
=================
While I don't mind sharing the code, this is mostly a private collecton of random stuff that I pretty often. You won't find much documentation or an overview here, and lots of the stuff is also pretty old.
I want to extract the code that I need frequently into separate libraries, but well... you know how it works. One day ;-)
| MKCommons-Android
=================
- Utility library for Android
+ While I don't mind sharing the code, this is mostly a private collecton of random stuff that I pretty often. You won't find much documentation or an overview here, and lots of the stuff is also pretty old.
+
+ I want to extract the code that I need frequently into separate libraries, but well... you know how it works. One day ;-) | 4 | 1 | 3 | 1 |
ebe25ecbc9028051d346f89da1357dd199949c31 | lib/generators/templates/carpetbomb.rb | lib/generators/templates/carpetbomb.rb | require 'redcarpet'
Carpetbomb.configure do |config|
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,
:autolink => true,
:space_after_headers => true,
:fenced_code_blocks => true)
config.render do |markdown_source|
markdown.render(markdown_source)
end
end
| require 'redcarpet'
Carpetbomb.configure do |config|
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,
:autolink => true,
:tables => true,
:footnotes => true,
:space_after_headers => true,
:fenced_code_blocks => true)
config.render do |markdown_source|
markdown.render(markdown_source)
end
end
| Enable tables and footnotes options in redcarpet | Enable tables and footnotes options in redcarpet | Ruby | mit | albertogg/carpetbomb | ruby | ## Code Before:
require 'redcarpet'
Carpetbomb.configure do |config|
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,
:autolink => true,
:space_after_headers => true,
:fenced_code_blocks => true)
config.render do |markdown_source|
markdown.render(markdown_source)
end
end
## Instruction:
Enable tables and footnotes options in redcarpet
## Code After:
require 'redcarpet'
Carpetbomb.configure do |config|
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,
:autolink => true,
:tables => true,
:footnotes => true,
:space_after_headers => true,
:fenced_code_blocks => true)
config.render do |markdown_source|
markdown.render(markdown_source)
end
end
| require 'redcarpet'
Carpetbomb.configure do |config|
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML,
:autolink => true,
+ :tables => true,
+ :footnotes => true,
:space_after_headers => true,
:fenced_code_blocks => true)
config.render do |markdown_source|
markdown.render(markdown_source)
end
end
| 2 | 0.142857 | 2 | 0 |
5b6f4b84119000d45c084455bb57b43e8b76d775 | include/pre_config.php | include/pre_config.php | <?php
// Setup I18N
require_once "../src/Core/I18N.php";
require_once "setup_i18n.php"; | <?php
// Setup I18N before autoload to prevent Laravel helpers from overriding translation function __()
// These two lines must be before autoload.php
require_once (__DIR__."../src/Core/I18N.php");
require_once (__DIR__."setup_i18n.php"); | Fix require path to i18n | Fix require path to i18n
| PHP | apache-2.0 | tsugiproject/tsugi-php,csev/tsugi-php,csev/tsugi-php,tsugiproject/tsugi-php,tsugiproject/tsugi-php | php | ## Code Before:
<?php
// Setup I18N
require_once "../src/Core/I18N.php";
require_once "setup_i18n.php";
## Instruction:
Fix require path to i18n
## Code After:
<?php
// Setup I18N before autoload to prevent Laravel helpers from overriding translation function __()
// These two lines must be before autoload.php
require_once (__DIR__."../src/Core/I18N.php");
require_once (__DIR__."setup_i18n.php"); | <?php
- // Setup I18N
+ // Setup I18N before autoload to prevent Laravel helpers from overriding translation function __()
+ // These two lines must be before autoload.php
- require_once "../src/Core/I18N.php";
+ require_once (__DIR__."../src/Core/I18N.php");
? +++++++++ +
- require_once "setup_i18n.php";
+ require_once (__DIR__."setup_i18n.php");
? +++++++++ +
| 7 | 1.4 | 4 | 3 |
99d92791f997fba8bb1a07464cfb146badc28ff1 | config/template_openstack.yml.erb | config/template_openstack.yml.erb | name: <%= name %>----{{user `image_name`}}
type: openstack
username: <%= cloud.key %>
password: <%= cloud.secret %>
tenant_name: <%= cloud.tenant_name %>
identity_endpoint: <%= cloud.entry_point %>v2.0/tokens
domain_name: default
region: RegionOne
flavor: <%= cloud.client.adapter.flavor(CloudConductor::Config.packer.openstack_flavor_name).id %>
image_name: '{{user `pattern_name`}}-{{user `image_name`}}-<%= platform %>-{{uuid}}'
source_image: <%= source_image %>
ssh_username: <%= ssh_username %>
use_floating_ip: true
floating_ip_pool: public
| name: <%= name %>----{{user `image_name`}}
type: openstack
username: <%= cloud.key %>
password: <%= cloud.secret %>
tenant_name: <%= cloud.tenant_name %>
identity_endpoint: <%= cloud.entry_point %>v2.0/tokens
region: RegionOne
flavor: <%= cloud.client.adapter.flavor(CloudConductor::Config.packer.openstack_flavor_name).id %>
image_name: '{{user `pattern_name`}}-{{user `image_name`}}-<%= platform %>-{{uuid}}'
source_image: <%= source_image %>
ssh_username: <%= ssh_username %>
use_floating_ip: true
floating_ip_pool: public
| Delete domain_name variable to support Openstack Liberty | Delete domain_name variable to support Openstack Liberty
| HTML+ERB | apache-2.0 | cloudconductor/cloud_conductor,cloudconductor/cloud_conductor,cloudconductor/cloud_conductor | html+erb | ## Code Before:
name: <%= name %>----{{user `image_name`}}
type: openstack
username: <%= cloud.key %>
password: <%= cloud.secret %>
tenant_name: <%= cloud.tenant_name %>
identity_endpoint: <%= cloud.entry_point %>v2.0/tokens
domain_name: default
region: RegionOne
flavor: <%= cloud.client.adapter.flavor(CloudConductor::Config.packer.openstack_flavor_name).id %>
image_name: '{{user `pattern_name`}}-{{user `image_name`}}-<%= platform %>-{{uuid}}'
source_image: <%= source_image %>
ssh_username: <%= ssh_username %>
use_floating_ip: true
floating_ip_pool: public
## Instruction:
Delete domain_name variable to support Openstack Liberty
## Code After:
name: <%= name %>----{{user `image_name`}}
type: openstack
username: <%= cloud.key %>
password: <%= cloud.secret %>
tenant_name: <%= cloud.tenant_name %>
identity_endpoint: <%= cloud.entry_point %>v2.0/tokens
region: RegionOne
flavor: <%= cloud.client.adapter.flavor(CloudConductor::Config.packer.openstack_flavor_name).id %>
image_name: '{{user `pattern_name`}}-{{user `image_name`}}-<%= platform %>-{{uuid}}'
source_image: <%= source_image %>
ssh_username: <%= ssh_username %>
use_floating_ip: true
floating_ip_pool: public
| name: <%= name %>----{{user `image_name`}}
type: openstack
username: <%= cloud.key %>
password: <%= cloud.secret %>
tenant_name: <%= cloud.tenant_name %>
identity_endpoint: <%= cloud.entry_point %>v2.0/tokens
- domain_name: default
region: RegionOne
flavor: <%= cloud.client.adapter.flavor(CloudConductor::Config.packer.openstack_flavor_name).id %>
image_name: '{{user `pattern_name`}}-{{user `image_name`}}-<%= platform %>-{{uuid}}'
source_image: <%= source_image %>
ssh_username: <%= ssh_username %>
use_floating_ip: true
floating_ip_pool: public | 1 | 0.071429 | 0 | 1 |
51660291b043b88eab599c59d8c1ef7ae9dc74d7 | src/core/models.py | src/core/models.py | from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
started_at = models.DateTimeField('started at', auto_now_add=True)
# On Python 3: def __str__(self):
def __unicode__(self):
return self.name
def save(self, *args, **kwargs):
existing_session_names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
self.name = get_or_generate_session_name(self.name, existing_session_names)
super(Session, self).save(*args, **kwargs) # Call the "real" save() method.
class Spec(models.Model):
code = models.TextField()
session = models.ForeignKey(Session)
author = models.ForeignKey(User, verbose_name='The author of this last update.')
tests_passed = models.NullBooleanField(default=False)
saved_at = models.DateTimeField(auto_now_add=True)
class Meta:
get_latest_by = 'saved_at'
| from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
from util.session import DEFAULT_SESSION_NAME_PREFIX
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
started_at = models.DateTimeField('started at', auto_now_add=True)
# On Python 3: def __str__(self):
def __unicode__(self):
return self.name
def save(self, *args, **kwargs):
existing_session_names = Session.objects.filter(name__startswith=DEFAULT_SESSION_NAME_PREFIX, user=self.user).only('name')
self.name = get_or_generate_session_name(self.name, existing_session_names)
super(Session, self).save(*args, **kwargs) # Call the "real" save() method.
class Spec(models.Model):
code = models.TextField()
session = models.ForeignKey(Session)
author = models.ForeignKey(User, verbose_name='The author of this last update.')
tests_passed = models.NullBooleanField(default=False)
saved_at = models.DateTimeField(auto_now_add=True)
class Meta:
get_latest_by = 'saved_at'
| Use the existing default name. | Use the existing default name. | Python | mit | uxebu/tddbin-backend,uxebu/tddbin-backend | python | ## Code Before:
from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
started_at = models.DateTimeField('started at', auto_now_add=True)
# On Python 3: def __str__(self):
def __unicode__(self):
return self.name
def save(self, *args, **kwargs):
existing_session_names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
self.name = get_or_generate_session_name(self.name, existing_session_names)
super(Session, self).save(*args, **kwargs) # Call the "real" save() method.
class Spec(models.Model):
code = models.TextField()
session = models.ForeignKey(Session)
author = models.ForeignKey(User, verbose_name='The author of this last update.')
tests_passed = models.NullBooleanField(default=False)
saved_at = models.DateTimeField(auto_now_add=True)
class Meta:
get_latest_by = 'saved_at'
## Instruction:
Use the existing default name.
## Code After:
from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
from util.session import DEFAULT_SESSION_NAME_PREFIX
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
started_at = models.DateTimeField('started at', auto_now_add=True)
# On Python 3: def __str__(self):
def __unicode__(self):
return self.name
def save(self, *args, **kwargs):
existing_session_names = Session.objects.filter(name__startswith=DEFAULT_SESSION_NAME_PREFIX, user=self.user).only('name')
self.name = get_or_generate_session_name(self.name, existing_session_names)
super(Session, self).save(*args, **kwargs) # Call the "real" save() method.
class Spec(models.Model):
code = models.TextField()
session = models.ForeignKey(Session)
author = models.ForeignKey(User, verbose_name='The author of this last update.')
tests_passed = models.NullBooleanField(default=False)
saved_at = models.DateTimeField(auto_now_add=True)
class Meta:
get_latest_by = 'saved_at'
| from django.db import models
from django.contrib.auth.models import User
from util.session import get_or_generate_session_name
+ from util.session import DEFAULT_SESSION_NAME_PREFIX
class Session(models.Model):
name = models.CharField(max_length=255)
user = models.ForeignKey(User, blank=True, null=True)
started_at = models.DateTimeField('started at', auto_now_add=True)
# On Python 3: def __str__(self):
def __unicode__(self):
return self.name
def save(self, *args, **kwargs):
- existing_session_names = Session.objects.filter(name__startswith=self.UNTITLED_PREFIX, user=self.user).only('name')
? ^^^^^ ^^^^ -
+ existing_session_names = Session.objects.filter(name__startswith=DEFAULT_SESSION_NAME_PREFIX, user=self.user).only('name')
? ^^^^ +++++++++ ^^^^
self.name = get_or_generate_session_name(self.name, existing_session_names)
super(Session, self).save(*args, **kwargs) # Call the "real" save() method.
class Spec(models.Model):
code = models.TextField()
session = models.ForeignKey(Session)
author = models.ForeignKey(User, verbose_name='The author of this last update.')
tests_passed = models.NullBooleanField(default=False)
saved_at = models.DateTimeField(auto_now_add=True)
class Meta:
get_latest_by = 'saved_at' | 3 | 0.103448 | 2 | 1 |
27ee2ce2bcf750210b6f704fa435176f4e3d8889 | app/views/elements/header/_header.html.slim | app/views/elements/header/_header.html.slim | = render 'elements/ribbon' if Rails.env.development? || Rails.env.staging?
header.header-site
- if @search_module.enabled? || I18n.available_locales.length > 1
.upper-header
.row
.small-12.columns
= render 'elements/header/language' if I18n.available_locales.length > 1
= render 'searches/form' if @search_module.enabled? && params[:controller] != 'searches'
.lower-header
.row.small-collapse.large-uncollapse
.small-12.medium-3.columns.columns-for-logo
= render 'elements/header/logo', primary: true
.small-12.medium-8.columns.columns.columns-for-menu
= render 'elements/menu/no_dropdown'
.clearfix
== breadcrumbs pretext: t('breadcrumb.here'), separator: '', style: :ol, semantic: true if @breadcrumb_module.enabled? && setting.show_breadcrumb?
| = render 'elements/ribbon' if Rails.env.development? || Rails.env.staging?
header.header-site
- if @search_module.enabled? || I18n.available_locales.length > 1
.upper-header
.row
.small-12.columns
= render 'elements/header/language' if I18n.available_locales.length > 1
= render 'searches/form' if @search_module.enabled? && params[:controller] != 'searches'
.lower-header
.row.small-collapse.large-uncollapse
.small-12.medium-3.columns.columns-for-logo
= render 'elements/header/logo', primary: true
.small-12.medium-8.columns.columns.columns-for-menu
= render 'elements/menu/no_dropdown'
== breadcrumbs pretext: t('breadcrumb.here'), separator: '', style: :ol, semantic: true if @breadcrumb_module.enabled? && setting.show_breadcrumb?
| Remove clearfix div between header and breadcrumb | Remove clearfix div between header and breadcrumb
| Slim | mit | lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter,lr-agenceweb/rails-starter | slim | ## Code Before:
= render 'elements/ribbon' if Rails.env.development? || Rails.env.staging?
header.header-site
- if @search_module.enabled? || I18n.available_locales.length > 1
.upper-header
.row
.small-12.columns
= render 'elements/header/language' if I18n.available_locales.length > 1
= render 'searches/form' if @search_module.enabled? && params[:controller] != 'searches'
.lower-header
.row.small-collapse.large-uncollapse
.small-12.medium-3.columns.columns-for-logo
= render 'elements/header/logo', primary: true
.small-12.medium-8.columns.columns.columns-for-menu
= render 'elements/menu/no_dropdown'
.clearfix
== breadcrumbs pretext: t('breadcrumb.here'), separator: '', style: :ol, semantic: true if @breadcrumb_module.enabled? && setting.show_breadcrumb?
## Instruction:
Remove clearfix div between header and breadcrumb
## Code After:
= render 'elements/ribbon' if Rails.env.development? || Rails.env.staging?
header.header-site
- if @search_module.enabled? || I18n.available_locales.length > 1
.upper-header
.row
.small-12.columns
= render 'elements/header/language' if I18n.available_locales.length > 1
= render 'searches/form' if @search_module.enabled? && params[:controller] != 'searches'
.lower-header
.row.small-collapse.large-uncollapse
.small-12.medium-3.columns.columns-for-logo
= render 'elements/header/logo', primary: true
.small-12.medium-8.columns.columns.columns-for-menu
= render 'elements/menu/no_dropdown'
== breadcrumbs pretext: t('breadcrumb.here'), separator: '', style: :ol, semantic: true if @breadcrumb_module.enabled? && setting.show_breadcrumb?
| = render 'elements/ribbon' if Rails.env.development? || Rails.env.staging?
header.header-site
- if @search_module.enabled? || I18n.available_locales.length > 1
.upper-header
.row
.small-12.columns
= render 'elements/header/language' if I18n.available_locales.length > 1
= render 'searches/form' if @search_module.enabled? && params[:controller] != 'searches'
.lower-header
.row.small-collapse.large-uncollapse
.small-12.medium-3.columns.columns-for-logo
= render 'elements/header/logo', primary: true
.small-12.medium-8.columns.columns.columns-for-menu
= render 'elements/menu/no_dropdown'
- .clearfix
-
== breadcrumbs pretext: t('breadcrumb.here'), separator: '', style: :ol, semantic: true if @breadcrumb_module.enabled? && setting.show_breadcrumb? | 2 | 0.095238 | 0 | 2 |
f5a59fea56b0389801ce39b00bbfe5918dc01ec2 | lib/kanaveral/output.rb | lib/kanaveral/output.rb | module Kanaveral
module Output
def self.password remote
ask "Password for #{remote} : "
password = STDIN.noecho(&:gets).chop
cr
password
end
def self.cmd_output text
text ||= ''
cr
text = ' '.freeze + text
print Rainbow(text).cyan
cr
end
def self.ask text
cr
print Rainbow(text).green
end
def self.command text
cr
text = '-> ' + text
notice(text)
end
def self.deploy name
cr
title = " Deploy to #{name} "
banner '-'*(title.length + 1)
banner title
banner '-'*(title.length + 1)
end
def self.banner text
puts Rainbow(text).cyan
end
def self.notice text
puts Rainbow(text).white
end
def self.warn text
puts Rainbow(text).yellow.bright.underline
end
def self.cr
puts "\n"
end
end
end | module Kanaveral
module Output
def self.password remote
ask "Password for #{remote} : "
password = STDIN.noecho(&:gets).chop
cr
password
end
def self.cmd_output text
text ||= ''
cr
print Rainbow(text).cyan
cr
end
def self.ask text
cr
print Rainbow(text).green
end
def self.command text
cr
text = '-> ' + text
notice(text)
end
def self.deploy name
cr
title = " Deploy to #{name} "
banner '-'*(title.length + 1)
banner title
banner '-'*(title.length + 1)
end
def self.banner text
puts Rainbow(text).cyan
end
def self.notice text
puts Rainbow(text).white
end
def self.warn text
puts Rainbow(text).yellow.bright.underline
end
def self.cr
puts "\n"
end
end
end | Remove leading space of command stdout | Remove leading space of command stdout | Ruby | mit | anoiaque/kanaveral,anoiaque/kanaveral | ruby | ## Code Before:
module Kanaveral
module Output
def self.password remote
ask "Password for #{remote} : "
password = STDIN.noecho(&:gets).chop
cr
password
end
def self.cmd_output text
text ||= ''
cr
text = ' '.freeze + text
print Rainbow(text).cyan
cr
end
def self.ask text
cr
print Rainbow(text).green
end
def self.command text
cr
text = '-> ' + text
notice(text)
end
def self.deploy name
cr
title = " Deploy to #{name} "
banner '-'*(title.length + 1)
banner title
banner '-'*(title.length + 1)
end
def self.banner text
puts Rainbow(text).cyan
end
def self.notice text
puts Rainbow(text).white
end
def self.warn text
puts Rainbow(text).yellow.bright.underline
end
def self.cr
puts "\n"
end
end
end
## Instruction:
Remove leading space of command stdout
## Code After:
module Kanaveral
module Output
def self.password remote
ask "Password for #{remote} : "
password = STDIN.noecho(&:gets).chop
cr
password
end
def self.cmd_output text
text ||= ''
cr
print Rainbow(text).cyan
cr
end
def self.ask text
cr
print Rainbow(text).green
end
def self.command text
cr
text = '-> ' + text
notice(text)
end
def self.deploy name
cr
title = " Deploy to #{name} "
banner '-'*(title.length + 1)
banner title
banner '-'*(title.length + 1)
end
def self.banner text
puts Rainbow(text).cyan
end
def self.notice text
puts Rainbow(text).white
end
def self.warn text
puts Rainbow(text).yellow.bright.underline
end
def self.cr
puts "\n"
end
end
end | module Kanaveral
module Output
def self.password remote
ask "Password for #{remote} : "
password = STDIN.noecho(&:gets).chop
cr
password
end
def self.cmd_output text
text ||= ''
cr
- text = ' '.freeze + text
print Rainbow(text).cyan
cr
end
def self.ask text
cr
print Rainbow(text).green
end
def self.command text
cr
text = '-> ' + text
notice(text)
end
def self.deploy name
cr
title = " Deploy to #{name} "
banner '-'*(title.length + 1)
banner title
banner '-'*(title.length + 1)
end
def self.banner text
puts Rainbow(text).cyan
end
def self.notice text
puts Rainbow(text).white
end
def self.warn text
puts Rainbow(text).yellow.bright.underline
end
def self.cr
puts "\n"
end
end
end | 1 | 0.018519 | 0 | 1 |
226c8e089a834b4bbe28f61105d6c6c666e71a28 | requirements.txt | requirements.txt | Django==1.5.9
requests==2.4.1
python-dateutil==1.4
# Production server
gunicorn==0.17.2
# Riemann client
bernhard==0.1.1
# Mock python objects for testing
mock==1.0.1
# Memcache client
pylibmc==1.2.3
# Gevent requests
# grequests==0.2.0
git+https://github.com/microcosm-cc/grequests.git@85884230bff825063e2f05e7b5de1d31c8e9cfd2
newrelic==2.16.0.12
| Django==1.5.9
requests==1.1.0
python-dateutil==1.4
# Production server
gunicorn==0.17.2
# Riemann client
bernhard==0.1.1
# Mock python objects for testing
mock==1.0.1
# Memcache client
pylibmc==1.2.3
# Gevent requests
grequests==0.2.0
newrelic==2.16.0.12
| Revert "Update requests to latest and use a Microcosm fork of grequests" | Revert "Update requests to latest and use a Microcosm fork of grequests"
This reverts commit 85df88ac9454992740efd1ef796f4d7e3d427a67.
| Text | agpl-3.0 | microcosm-cc/microweb,microcosm-cc/microweb,microcosm-cc/microweb,microcosm-cc/microweb,microcosm-cc/microweb,microcosm-cc/microweb | text | ## Code Before:
Django==1.5.9
requests==2.4.1
python-dateutil==1.4
# Production server
gunicorn==0.17.2
# Riemann client
bernhard==0.1.1
# Mock python objects for testing
mock==1.0.1
# Memcache client
pylibmc==1.2.3
# Gevent requests
# grequests==0.2.0
git+https://github.com/microcosm-cc/grequests.git@85884230bff825063e2f05e7b5de1d31c8e9cfd2
newrelic==2.16.0.12
## Instruction:
Revert "Update requests to latest and use a Microcosm fork of grequests"
This reverts commit 85df88ac9454992740efd1ef796f4d7e3d427a67.
## Code After:
Django==1.5.9
requests==1.1.0
python-dateutil==1.4
# Production server
gunicorn==0.17.2
# Riemann client
bernhard==0.1.1
# Mock python objects for testing
mock==1.0.1
# Memcache client
pylibmc==1.2.3
# Gevent requests
grequests==0.2.0
newrelic==2.16.0.12
| Django==1.5.9
- requests==2.4.1
? ^^^
+ requests==1.1.0
? ^ ++
python-dateutil==1.4
# Production server
gunicorn==0.17.2
# Riemann client
bernhard==0.1.1
# Mock python objects for testing
mock==1.0.1
# Memcache client
pylibmc==1.2.3
# Gevent requests
- # grequests==0.2.0
? --
+ grequests==0.2.0
- git+https://github.com/microcosm-cc/grequests.git@85884230bff825063e2f05e7b5de1d31c8e9cfd2
newrelic==2.16.0.12 | 5 | 0.238095 | 2 | 3 |
f4df3fffe8702be8506e10ecf901c9988988b5de | Sources/TSCUtility/CMakeLists.txt | Sources/TSCUtility/CMakeLists.txt |
add_library(TSCUtility
Archiver.swift
ArgumentParser.swift
ArgumentParserShellCompletion.swift
BuildFlags.swift
CollectionExtensions.swift
Diagnostics.swift
dlopen.swift
Downloader.swift
FloatingPointExtensions.swift
FSWatch.swift
Git.swift
IndexStore.swift
InterruptHandler.swift
JSONMessageStreamingParser.swift
misc.swift
OSLog.swift
PkgConfig.swift
Platform.swift
PolymorphicCodable.swift
ProgressAnimation.swift
SimplePersistence.swift
StringExtensions.swift
StringMangling.swift
URL.swift
Verbosity.swift
Version.swift
Versioning.swift
)
target_link_libraries(TSCUtility PUBLIC
TSCBasic)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(TSCUtility PUBLIC
FoundationNetworking)
endif()
# NOTE(compnerd) workaround for CMake not setting up include flags yet
set_target_properties(TSCUtility PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
set_property(GLOBAL APPEND PROPERTY TSC_EXPORTS TSCUtility)
|
add_library(TSCUtility
Archiver.swift
ArgumentParser.swift
ArgumentParserShellCompletion.swift
BuildFlags.swift
CollectionExtensions.swift
Diagnostics.swift
Downloader.swift
FSWatch.swift
FloatingPointExtensions.swift
Git.swift
IndexStore.swift
InterruptHandler.swift
JSONMessageStreamingParser.swift
OSLog.swift
PersistenceCache.swift
PkgConfig.swift
Platform.swift
PolymorphicCodable.swift
ProgressAnimation.swift
SQLite.swift
SimplePersistence.swift
StringExtensions.swift
StringMangling.swift
URL.swift
Verbosity.swift
Version.swift
Versioning.swift
dlopen.swift
misc.swift
)
target_link_libraries(TSCUtility PUBLIC
TSCBasic)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(TSCUtility PUBLIC
FoundationNetworking)
endif()
# NOTE(compnerd) workaround for CMake not setting up include flags yet
set_target_properties(TSCUtility PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
set_property(GLOBAL APPEND PROPERTY TSC_EXPORTS TSCUtility)
| Add some new files to cmake | Add some new files to cmake
| Text | apache-2.0 | apple/swift-tools-support-core,apple/swift-tools-support-core,apple/swift-tools-support-core,apple/swift-tools-support-core | text | ## Code Before:
add_library(TSCUtility
Archiver.swift
ArgumentParser.swift
ArgumentParserShellCompletion.swift
BuildFlags.swift
CollectionExtensions.swift
Diagnostics.swift
dlopen.swift
Downloader.swift
FloatingPointExtensions.swift
FSWatch.swift
Git.swift
IndexStore.swift
InterruptHandler.swift
JSONMessageStreamingParser.swift
misc.swift
OSLog.swift
PkgConfig.swift
Platform.swift
PolymorphicCodable.swift
ProgressAnimation.swift
SimplePersistence.swift
StringExtensions.swift
StringMangling.swift
URL.swift
Verbosity.swift
Version.swift
Versioning.swift
)
target_link_libraries(TSCUtility PUBLIC
TSCBasic)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(TSCUtility PUBLIC
FoundationNetworking)
endif()
# NOTE(compnerd) workaround for CMake not setting up include flags yet
set_target_properties(TSCUtility PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
set_property(GLOBAL APPEND PROPERTY TSC_EXPORTS TSCUtility)
## Instruction:
Add some new files to cmake
## Code After:
add_library(TSCUtility
Archiver.swift
ArgumentParser.swift
ArgumentParserShellCompletion.swift
BuildFlags.swift
CollectionExtensions.swift
Diagnostics.swift
Downloader.swift
FSWatch.swift
FloatingPointExtensions.swift
Git.swift
IndexStore.swift
InterruptHandler.swift
JSONMessageStreamingParser.swift
OSLog.swift
PersistenceCache.swift
PkgConfig.swift
Platform.swift
PolymorphicCodable.swift
ProgressAnimation.swift
SQLite.swift
SimplePersistence.swift
StringExtensions.swift
StringMangling.swift
URL.swift
Verbosity.swift
Version.swift
Versioning.swift
dlopen.swift
misc.swift
)
target_link_libraries(TSCUtility PUBLIC
TSCBasic)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(TSCUtility PUBLIC
FoundationNetworking)
endif()
# NOTE(compnerd) workaround for CMake not setting up include flags yet
set_target_properties(TSCUtility PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
set_property(GLOBAL APPEND PROPERTY TSC_EXPORTS TSCUtility)
|
add_library(TSCUtility
Archiver.swift
ArgumentParser.swift
ArgumentParserShellCompletion.swift
BuildFlags.swift
CollectionExtensions.swift
Diagnostics.swift
- dlopen.swift
Downloader.swift
+ FSWatch.swift
FloatingPointExtensions.swift
- FSWatch.swift
Git.swift
IndexStore.swift
InterruptHandler.swift
JSONMessageStreamingParser.swift
- misc.swift
OSLog.swift
+ PersistenceCache.swift
PkgConfig.swift
Platform.swift
PolymorphicCodable.swift
ProgressAnimation.swift
+ SQLite.swift
SimplePersistence.swift
StringExtensions.swift
StringMangling.swift
URL.swift
Verbosity.swift
Version.swift
Versioning.swift
+ dlopen.swift
+ misc.swift
)
target_link_libraries(TSCUtility PUBLIC
TSCBasic)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(TSCUtility PUBLIC
FoundationNetworking)
endif()
# NOTE(compnerd) workaround for CMake not setting up include flags yet
set_target_properties(TSCUtility PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
set_property(GLOBAL APPEND PROPERTY TSC_EXPORTS TSCUtility) | 8 | 0.195122 | 5 | 3 |
11b0608f2cab4f9c804d5a2e67edfc4270448b71 | ectoken.py | ectoken.py | from ctypes import CDLL, create_string_buffer, byref
import pkg_resources
bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so'))
def ectoken_generate(key, string):
if isinstance(string, unicode):
string = string.encode('utf-8')
string = 'ec_secure=%03d&%s' % (len(string) + 14, string)
string_len = len(string)
output = create_string_buffer(string_len)
bf.bfencrypt(key, len(key), string, byref(output), string_len)
return output.raw.encode('hex_codec')
| from ctypes import CDLL, create_string_buffer, byref
import pkg_resources
bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so'))
def ectoken_generate(key, string):
if len(string) > 512:
raise ValueError(
'%r exceeds maximum length of 512 characters' % string)
if isinstance(string, unicode):
string = string.encode('utf-8')
string = 'ec_secure=%03d&%s' % (len(string) + 14, string)
string_len = len(string)
output = create_string_buffer(string_len)
bf.bfencrypt(key, len(key), string, byref(output), string_len)
return output.raw.encode('hex_codec')
| Add check for maximum length (taken from the original Edgecast ec_encrypt.c example) | Add check for maximum length (taken from the original Edgecast ec_encrypt.c example)
| Python | bsd-3-clause | sebest/ectoken-py,sebest/ectoken-py | python | ## Code Before:
from ctypes import CDLL, create_string_buffer, byref
import pkg_resources
bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so'))
def ectoken_generate(key, string):
if isinstance(string, unicode):
string = string.encode('utf-8')
string = 'ec_secure=%03d&%s' % (len(string) + 14, string)
string_len = len(string)
output = create_string_buffer(string_len)
bf.bfencrypt(key, len(key), string, byref(output), string_len)
return output.raw.encode('hex_codec')
## Instruction:
Add check for maximum length (taken from the original Edgecast ec_encrypt.c example)
## Code After:
from ctypes import CDLL, create_string_buffer, byref
import pkg_resources
bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so'))
def ectoken_generate(key, string):
if len(string) > 512:
raise ValueError(
'%r exceeds maximum length of 512 characters' % string)
if isinstance(string, unicode):
string = string.encode('utf-8')
string = 'ec_secure=%03d&%s' % (len(string) + 14, string)
string_len = len(string)
output = create_string_buffer(string_len)
bf.bfencrypt(key, len(key), string, byref(output), string_len)
return output.raw.encode('hex_codec')
| from ctypes import CDLL, create_string_buffer, byref
import pkg_resources
bf = CDLL(pkg_resources.resource_filename(__name__, '_ecblowfish.so'))
def ectoken_generate(key, string):
+ if len(string) > 512:
+ raise ValueError(
+ '%r exceeds maximum length of 512 characters' % string)
if isinstance(string, unicode):
string = string.encode('utf-8')
string = 'ec_secure=%03d&%s' % (len(string) + 14, string)
string_len = len(string)
output = create_string_buffer(string_len)
bf.bfencrypt(key, len(key), string, byref(output), string_len)
return output.raw.encode('hex_codec') | 3 | 0.214286 | 3 | 0 |
1e0fc561b98895ac2c7eae34670783997863504f | src/mex_compile.sh | src/mex_compile.sh | mex -g rosbag_wrapper.cpp parser.cpp \
./librosbag.a \
./librosconsole.a \
./libroscpp_serialization.a \
./libros.a \
./librostime.a \
./liblog4cxx.a \
./libaprutil-1.a \
./libapr-1.a \
./libexpat.a \
../lib_boost/libboost_filesystem.a \
../lib_boost/libboost_system.a \
../lib_boost/libboost_signals.a \
../lib_boost/libboost_thread.a \
../lib_boost/libboost_regex.a \
-I/opt/ros/electric/stacks/ros_comm/tools/rosbag/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/xmlrpcpp/src \
-I/opt/ros/electric/stacks/ros_comm/tools/rosconsole/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/rostime/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/cpp_common/include \
-lbz2 \
-lrt
| mex -g rosbag_wrapper.cpp parser.cpp \
../lib/librosbag.a \
../lib/librosconsole.a \
../lib/libroscpp_serialization.a \
../lib/libros.a \
../lib/librostime.a \
../lib/liblog4cxx.a \
../lib/libaprutil-1.a \
../lib/libapr-1.a \
../lib/libexpat.a \
../lib/libboost_filesystem.a \
../lib/libboost_system.a \
../lib/libboost_signals.a \
../lib/libboost_thread.a \
../lib/libboost_regex.a \
../lib/libbz2.a \
-I/opt/ros/electric/stacks/ros_comm/tools/rosbag/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/xmlrpcpp/src \
-I/opt/ros/electric/stacks/ros_comm/tools/rosconsole/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/rostime/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/cpp_common/include \
-lrt
| Change archive location for mex compile script | Change archive location for mex compile script
| Shell | bsd-3-clause | zheng-rong/matlab_rosbag,zheng-rong/matlab_rosbag,bcharrow/matlab_rosbag,bcharrow/matlab_rosbag,bcharrow/matlab_rosbag,zheng-rong/matlab_rosbag | shell | ## Code Before:
mex -g rosbag_wrapper.cpp parser.cpp \
./librosbag.a \
./librosconsole.a \
./libroscpp_serialization.a \
./libros.a \
./librostime.a \
./liblog4cxx.a \
./libaprutil-1.a \
./libapr-1.a \
./libexpat.a \
../lib_boost/libboost_filesystem.a \
../lib_boost/libboost_system.a \
../lib_boost/libboost_signals.a \
../lib_boost/libboost_thread.a \
../lib_boost/libboost_regex.a \
-I/opt/ros/electric/stacks/ros_comm/tools/rosbag/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/xmlrpcpp/src \
-I/opt/ros/electric/stacks/ros_comm/tools/rosconsole/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/rostime/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/cpp_common/include \
-lbz2 \
-lrt
## Instruction:
Change archive location for mex compile script
## Code After:
mex -g rosbag_wrapper.cpp parser.cpp \
../lib/librosbag.a \
../lib/librosconsole.a \
../lib/libroscpp_serialization.a \
../lib/libros.a \
../lib/librostime.a \
../lib/liblog4cxx.a \
../lib/libaprutil-1.a \
../lib/libapr-1.a \
../lib/libexpat.a \
../lib/libboost_filesystem.a \
../lib/libboost_system.a \
../lib/libboost_signals.a \
../lib/libboost_thread.a \
../lib/libboost_regex.a \
../lib/libbz2.a \
-I/opt/ros/electric/stacks/ros_comm/tools/rosbag/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/xmlrpcpp/src \
-I/opt/ros/electric/stacks/ros_comm/tools/rosconsole/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/rostime/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/cpp_common/include \
-lrt
| mex -g rosbag_wrapper.cpp parser.cpp \
- ./librosbag.a \
+ ../lib/librosbag.a \
? +++++
- ./librosconsole.a \
+ ../lib/librosconsole.a \
? +++++
- ./libroscpp_serialization.a \
+ ../lib/libroscpp_serialization.a \
? +++++
- ./libros.a \
+ ../lib/libros.a \
? +++++
- ./librostime.a \
+ ../lib/librostime.a \
? +++++
- ./liblog4cxx.a \
+ ../lib/liblog4cxx.a \
? +++++
- ./libaprutil-1.a \
+ ../lib/libaprutil-1.a \
? +++++
- ./libapr-1.a \
+ ../lib/libapr-1.a \
? +++++
- ./libexpat.a \
+ ../lib/libexpat.a \
? +++++
- ../lib_boost/libboost_filesystem.a \
? ------
+ ../lib/libboost_filesystem.a \
- ../lib_boost/libboost_system.a \
? ------
+ ../lib/libboost_system.a \
- ../lib_boost/libboost_signals.a \
? ------
+ ../lib/libboost_signals.a \
- ../lib_boost/libboost_thread.a \
? ------
+ ../lib/libboost_thread.a \
- ../lib_boost/libboost_regex.a \
? ------
+ ../lib/libboost_regex.a \
+ ../lib/libbz2.a \
-I/opt/ros/electric/stacks/ros_comm/tools/rosbag/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_serialization/include \
-I/opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp_traits/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/xmlrpcpp/src \
-I/opt/ros/electric/stacks/ros_comm/tools/rosconsole/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/rostime/include \
-I/opt/ros/electric/stacks/ros_comm/utilities/cpp_common/include \
- -lbz2 \
-lrt | 30 | 1.2 | 15 | 15 |
be7b413beca25a47e9b1d60717fe9c1a7342bdb1 | fml/patches/common/net/minecraft/src/EntityVillager.java.patch | fml/patches/common/net/minecraft/src/EntityVillager.java.patch | --- ../src-base/common/net/minecraft/src/EntityVillager.java
+++ ../src-work/common/net/minecraft/src/EntityVillager.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -175,7 +177,7 @@
case 4:
return "/mob/villager/butcher.png";
default:
- return super.func_70073_O();
+ return VillagerRegistry.getVillagerSkin(this.func_70946_n(), super.func_70073_O());
}
}
@@ -400,6 +402,8 @@
}
Collections.shuffle(var2);
+
+ VillagerRegistry.manageVillagerTrades(var2, this, this.func_70946_n(), this.field_70146_Z);
if (this.field_70963_i == null)
{
| --- ../src-base/common/net/minecraft/src/EntityVillager.java
+++ ../src-work/common/net/minecraft/src/EntityVillager.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -175,7 +177,7 @@
case 4:
return "/mob/villager/butcher.png";
default:
- return super.func_70073_O();
+ return VillagerRegistry.getVillagerSkin(this.func_70946_n(), super.func_70073_O());
}
}
@@ -393,6 +395,8 @@
func_70949_b(var2, Item.field_77782_ar.field_77779_bT, this.field_70146_Z, 0.3F);
func_70949_b(var2, Item.field_77734_bj.field_77779_bT, this.field_70146_Z, 0.3F);
}
+
+ VillagerRegistry.manageVillagerTrades(var2, this, this.func_70946_n(), this.field_70146_Z);
if (var2.isEmpty())
{
| Move villager trading hook up a bit. thanks sengir. | Move villager trading hook up a bit. thanks sengir.
| Diff | lgpl-2.1 | RainWarrior/MinecraftForge,shadekiller666/MinecraftForge,brubo1/MinecraftForge,mickkay/MinecraftForge,karlthepagan/MinecraftForge,Vorquel/MinecraftForge,fcjailybo/MinecraftForge,ThiagoGarciaAlves/MinecraftForge,Mathe172/MinecraftForge,Zaggy1024/MinecraftForge,Ghostlyr/MinecraftForge,blay09/MinecraftForge,bonii-xx/MinecraftForge,Theerapak/MinecraftForge,jdpadrnos/MinecraftForge,CrafterKina/MinecraftForge,simon816/MinecraftForge,dmf444/MinecraftForge,luacs1998/MinecraftForge | diff | ## Code Before:
--- ../src-base/common/net/minecraft/src/EntityVillager.java
+++ ../src-work/common/net/minecraft/src/EntityVillager.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -175,7 +177,7 @@
case 4:
return "/mob/villager/butcher.png";
default:
- return super.func_70073_O();
+ return VillagerRegistry.getVillagerSkin(this.func_70946_n(), super.func_70073_O());
}
}
@@ -400,6 +402,8 @@
}
Collections.shuffle(var2);
+
+ VillagerRegistry.manageVillagerTrades(var2, this, this.func_70946_n(), this.field_70146_Z);
if (this.field_70963_i == null)
{
## Instruction:
Move villager trading hook up a bit. thanks sengir.
## Code After:
--- ../src-base/common/net/minecraft/src/EntityVillager.java
+++ ../src-work/common/net/minecraft/src/EntityVillager.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -175,7 +177,7 @@
case 4:
return "/mob/villager/butcher.png";
default:
- return super.func_70073_O();
+ return VillagerRegistry.getVillagerSkin(this.func_70946_n(), super.func_70073_O());
}
}
@@ -393,6 +395,8 @@
func_70949_b(var2, Item.field_77782_ar.field_77779_bT, this.field_70146_Z, 0.3F);
func_70949_b(var2, Item.field_77734_bj.field_77779_bT, this.field_70146_Z, 0.3F);
}
+
+ VillagerRegistry.manageVillagerTrades(var2, this, this.func_70946_n(), this.field_70146_Z);
if (var2.isEmpty())
{
| --- ../src-base/common/net/minecraft/src/EntityVillager.java
+++ ../src-work/common/net/minecraft/src/EntityVillager.java
@@ -2,6 +2,8 @@
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
+import cpw.mods.fml.common.registry.VillagerRegistry;
+
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@@ -175,7 +177,7 @@
case 4:
return "/mob/villager/butcher.png";
default:
- return super.func_70073_O();
+ return VillagerRegistry.getVillagerSkin(this.func_70946_n(), super.func_70073_O());
}
}
- @@ -400,6 +402,8 @@
+ @@ -393,6 +395,8 @@
+ func_70949_b(var2, Item.field_77782_ar.field_77779_bT, this.field_70146_Z, 0.3F);
+ func_70949_b(var2, Item.field_77734_bj.field_77779_bT, this.field_70146_Z, 0.3F);
}
-
- Collections.shuffle(var2);
+
+ VillagerRegistry.manageVillagerTrades(var2, this, this.func_70946_n(), this.field_70146_Z);
- if (this.field_70963_i == null)
+ if (var2.isEmpty())
{ | 8 | 0.275862 | 4 | 4 |
bf0356d2574bdc50a809246ec444b21abbbf1ab0 | functions/weather.fetch.fish | functions/weather.fetch.fish | function weather.fetch -d "Fetches data from a URL backed by a cache"
set md5 (echo $argv[1] | md5sum | cut -d " " -f 1)
if not find /tmp/$md5.url -mmin +30 ^ /dev/null
curl -s $argv[1] > /tmp/$md5.url
or return 1
end
cat /tmp/$md5.url
end
| function weather.fetch -d "Fetches data from a URL backed by a cache"
set md5 (__md5 "$argv")
if test (count $argv) -gt 1
for param in $argv[2..-1]
set flags $flags --data-urlencode $param
end
end
if not find /tmp/$md5.url -mmin +$weather_cache_age > /dev/null ^ /dev/null
curl -Gs $flags $argv[1] > /tmp/$md5.url
or return 1
end
cat /tmp/$md5.url
end
function __md5
if available md5sum
echo $argv[1] | md5sum | cut -d " " -f 1
return 0
end
if available md5
echo $argv[1] | md5 | cut -d " " -f 2
return 0
end
if available openssl
echo $argv[1] | openssl md5 | cut -d " " -f 2
return 0
end
return 1
end
| Add GET parameters and more md5 providers | Add GET parameters and more md5 providers
| fish | mit | oh-my-fish/plugin-weather | fish | ## Code Before:
function weather.fetch -d "Fetches data from a URL backed by a cache"
set md5 (echo $argv[1] | md5sum | cut -d " " -f 1)
if not find /tmp/$md5.url -mmin +30 ^ /dev/null
curl -s $argv[1] > /tmp/$md5.url
or return 1
end
cat /tmp/$md5.url
end
## Instruction:
Add GET parameters and more md5 providers
## Code After:
function weather.fetch -d "Fetches data from a URL backed by a cache"
set md5 (__md5 "$argv")
if test (count $argv) -gt 1
for param in $argv[2..-1]
set flags $flags --data-urlencode $param
end
end
if not find /tmp/$md5.url -mmin +$weather_cache_age > /dev/null ^ /dev/null
curl -Gs $flags $argv[1] > /tmp/$md5.url
or return 1
end
cat /tmp/$md5.url
end
function __md5
if available md5sum
echo $argv[1] | md5sum | cut -d " " -f 1
return 0
end
if available md5
echo $argv[1] | md5 | cut -d " " -f 2
return 0
end
if available openssl
echo $argv[1] | openssl md5 | cut -d " " -f 2
return 0
end
return 1
end
| function weather.fetch -d "Fetches data from a URL backed by a cache"
- set md5 (echo $argv[1] | md5sum | cut -d " " -f 1)
+ set md5 (__md5 "$argv")
- if not find /tmp/$md5.url -mmin +30 ^ /dev/null
+ if test (count $argv) -gt 1
+ for param in $argv[2..-1]
+ set flags $flags --data-urlencode $param
+ end
+ end
+
+ if not find /tmp/$md5.url -mmin +$weather_cache_age > /dev/null ^ /dev/null
- curl -s $argv[1] > /tmp/$md5.url
+ curl -Gs $flags $argv[1] > /tmp/$md5.url
? ++++++++
or return 1
end
cat /tmp/$md5.url
end
+
+ function __md5
+ if available md5sum
+ echo $argv[1] | md5sum | cut -d " " -f 1
+ return 0
+ end
+
+ if available md5
+ echo $argv[1] | md5 | cut -d " " -f 2
+ return 0
+ end
+
+ if available openssl
+ echo $argv[1] | openssl md5 | cut -d " " -f 2
+ return 0
+ end
+
+ return 1
+ end | 31 | 3.1 | 28 | 3 |
9b5977599011d00d962b469d26851459cc365ad0 | Platforms/PythonApp/Resources/ResourceReader.txt | Platforms/PythonApp/Resources/ResourceReader.txt |
_UNICODE_BOM = '\xef\xbb\xbf'
def ResourceReader_readTextFile(path):
path = path.replace('/', os.sep)
c = open(path, 'rt')
text = c.read()
c.close()
if text[:3] == _UNICODE_BOM:
text = text[3:]
return text
def ResourceReader_readImageFile(path):
path = path.replace('/', os.sep)
return pygame.image.load(path).convert_alpha()
|
def ResourceReader_readTextFile(path):
path = path.replace('/', os.sep)
c = open(path, 'rt')
text = c.read()
c.close()
# Trim the unicode BOM
if text[:3] == '\xef\xbb\xbf':
text = text[3:]
elif text[:1] == '\ufeff':
text = text[1:]
return text
def ResourceReader_readImageFile(path):
path = path.replace('/', os.sep)
return pygame.image.load(path).convert_alpha()
| Fix unicode BOM trimming in Python 3 for text resources. | Fix unicode BOM trimming in Python 3 for text resources.
| Text | mit | blakeohare/crayon,blakeohare/crayon,blakeohare/crayon,blakeohare/crayon,blakeohare/crayon,blakeohare/crayon,blakeohare/crayon,blakeohare/crayon | text | ## Code Before:
_UNICODE_BOM = '\xef\xbb\xbf'
def ResourceReader_readTextFile(path):
path = path.replace('/', os.sep)
c = open(path, 'rt')
text = c.read()
c.close()
if text[:3] == _UNICODE_BOM:
text = text[3:]
return text
def ResourceReader_readImageFile(path):
path = path.replace('/', os.sep)
return pygame.image.load(path).convert_alpha()
## Instruction:
Fix unicode BOM trimming in Python 3 for text resources.
## Code After:
def ResourceReader_readTextFile(path):
path = path.replace('/', os.sep)
c = open(path, 'rt')
text = c.read()
c.close()
# Trim the unicode BOM
if text[:3] == '\xef\xbb\xbf':
text = text[3:]
elif text[:1] == '\ufeff':
text = text[1:]
return text
def ResourceReader_readImageFile(path):
path = path.replace('/', os.sep)
return pygame.image.load(path).convert_alpha()
|
- _UNICODE_BOM = '\xef\xbb\xbf'
def ResourceReader_readTextFile(path):
path = path.replace('/', os.sep)
c = open(path, 'rt')
text = c.read()
c.close()
- if text[:3] == _UNICODE_BOM:
+
+ # Trim the unicode BOM
+ if text[:3] == '\xef\xbb\xbf':
text = text[3:]
+ elif text[:1] == '\ufeff':
+ text = text[1:]
+
return text
def ResourceReader_readImageFile(path):
path = path.replace('/', os.sep)
return pygame.image.load(path).convert_alpha() | 8 | 0.571429 | 6 | 2 |
2e62004624102f8111a6dcb53449d70fe8819ea8 | _posts/2021-12-17-national-park-typeface.markdown | _posts/2021-12-17-national-park-typeface.markdown | ---
layout: post
title: "National Park Typeface"
date: 2021-12-17 15:03:22 -0800
external-url: https://nationalparktypeface.com/
---
A handful of designers decided to create a typeface which mimics the signs
seen on trails and such at National Parks which are carved by router bits.
It's a playful round sans serif typeface offered in 4 weights.
The website they built for it includes sample shots from national parks
signs and a great story about how they got to working on it.
Licensed under the [SIL Open Font License](https://nationalparktypeface.com/License).
| ---
layout: post
title: "National Park Typeface"
date: 2021-12-17 15:03:22 -0800
external-url: https://nationalparktypeface.com/
---
A handful of designers decided to create a typeface which mimics the signs
seen on trails and such at National Parks which are carved by router bits.
It's a playful round sans serif typeface offered in 4 weights.
The website they built for it includes sample shots from national parks
signs and a great story about how they got to working on it.
Licensed under the SIL Open Font License at the time of this post.
| Remove link to national park typeface license that no longer exists | Remove link to national park typeface license that no longer exists
| Markdown | mit | parkr/stuff,parkr/stuff,parkr/stuff,parkr/stuff,parkr/stuff,parkr/stuff | markdown | ## Code Before:
---
layout: post
title: "National Park Typeface"
date: 2021-12-17 15:03:22 -0800
external-url: https://nationalparktypeface.com/
---
A handful of designers decided to create a typeface which mimics the signs
seen on trails and such at National Parks which are carved by router bits.
It's a playful round sans serif typeface offered in 4 weights.
The website they built for it includes sample shots from national parks
signs and a great story about how they got to working on it.
Licensed under the [SIL Open Font License](https://nationalparktypeface.com/License).
## Instruction:
Remove link to national park typeface license that no longer exists
## Code After:
---
layout: post
title: "National Park Typeface"
date: 2021-12-17 15:03:22 -0800
external-url: https://nationalparktypeface.com/
---
A handful of designers decided to create a typeface which mimics the signs
seen on trails and such at National Parks which are carved by router bits.
It's a playful round sans serif typeface offered in 4 weights.
The website they built for it includes sample shots from national parks
signs and a great story about how they got to working on it.
Licensed under the SIL Open Font License at the time of this post.
| ---
layout: post
title: "National Park Typeface"
date: 2021-12-17 15:03:22 -0800
external-url: https://nationalparktypeface.com/
---
A handful of designers decided to create a typeface which mimics the signs
seen on trails and such at National Parks which are carved by router bits.
It's a playful round sans serif typeface offered in 4 weights.
The website they built for it includes sample shots from national parks
signs and a great story about how they got to working on it.
- Licensed under the [SIL Open Font License](https://nationalparktypeface.com/License).
+ Licensed under the SIL Open Font License at the time of this post. | 2 | 0.133333 | 1 | 1 |
40f2a72ade192efcfc49f4967882eb7718ae4ed5 | wp-app/wp-content/themes/hiid/assets/images/hid-about-faculty-philosophy-bg.svg | wp-app/wp-content/themes/hiid/assets/images/hid-about-faculty-philosophy-bg.svg | <svg xmlns="http://www.w3.org/2000/svg" width="720" height="1155"><path fill="#0047BA" fill-rule="evenodd" d="M720 1108H159.97L0 991.9238V0h719.932L720 1108zm-.068 0l.068 47-73-47h72.932z"/></svg>
| <svg xmlns="http://www.w3.org/2000/svg" width="720" height="1155" preserveAspectRatio="xMinYMin none"><path fill="#0047BA" fill-rule="evenodd" d="M720 1108H159.97L0 991.9238V0h719.932L720 1108zm-.068 0l.068 47-73-47h72.932z"/></svg>
| Fix background sprite SVG option | Fix background sprite SVG option
| SVG | apache-2.0 | HongikID/hongikid.ac.kr,HongikID/hongikid.ac.kr | svg | ## Code Before:
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="1155"><path fill="#0047BA" fill-rule="evenodd" d="M720 1108H159.97L0 991.9238V0h719.932L720 1108zm-.068 0l.068 47-73-47h72.932z"/></svg>
## Instruction:
Fix background sprite SVG option
## Code After:
<svg xmlns="http://www.w3.org/2000/svg" width="720" height="1155" preserveAspectRatio="xMinYMin none"><path fill="#0047BA" fill-rule="evenodd" d="M720 1108H159.97L0 991.9238V0h719.932L720 1108zm-.068 0l.068 47-73-47h72.932z"/></svg>
| - <svg xmlns="http://www.w3.org/2000/svg" width="720" height="1155"><path fill="#0047BA" fill-rule="evenodd" d="M720 1108H159.97L0 991.9238V0h719.932L720 1108zm-.068 0l.068 47-73-47h72.932z"/></svg>
+ <svg xmlns="http://www.w3.org/2000/svg" width="720" height="1155" preserveAspectRatio="xMinYMin none"><path fill="#0047BA" fill-rule="evenodd" d="M720 1108H159.97L0 991.9238V0h719.932L720 1108zm-.068 0l.068 47-73-47h72.932z"/></svg>
? ++++++++++++++++++++++++++++++++++++
| 2 | 2 | 1 | 1 |
e8523654f85df6218d7067c28e72d68bf2511121 | .travis.yml | .travis.yml | language: node_js
sudo: false
before_script:
- npm install web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- bower install
branches:
only:
- gh-pages
node_js: 4
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
script:
- xvfb-run wct --skip-plugin sauce
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct --skip-plugin local --plugin sauce; fi"
| language: node_js
sudo: required
dist: trusty
before_script:
- npm install web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- bower install
branches:
only:
- gh-pages
node_js: 4
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
script:
- xvfb-run wct --skip-plugin sauce
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct --skip-plugin local --plugin sauce; fi"
| Upgrade Travis CI to Ubuntu Trusty to fix Chrome usage in testing | Upgrade Travis CI to Ubuntu Trusty to fix Chrome usage in testing | YAML | mit | Juicy/imported-template,Juicy/imported-template | yaml | ## Code Before:
language: node_js
sudo: false
before_script:
- npm install web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- bower install
branches:
only:
- gh-pages
node_js: 4
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
script:
- xvfb-run wct --skip-plugin sauce
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct --skip-plugin local --plugin sauce; fi"
## Instruction:
Upgrade Travis CI to Ubuntu Trusty to fix Chrome usage in testing
## Code After:
language: node_js
sudo: required
dist: trusty
before_script:
- npm install web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- bower install
branches:
only:
- gh-pages
node_js: 4
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
script:
- xvfb-run wct --skip-plugin sauce
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct --skip-plugin local --plugin sauce; fi"
| language: node_js
- sudo: false
+ sudo: required
+ dist: trusty
before_script:
- npm install web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- bower install
branches:
only:
- gh-pages
node_js: 4
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
script:
- xvfb-run wct --skip-plugin sauce
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct --skip-plugin local --plugin sauce; fi" | 3 | 0.142857 | 2 | 1 |
0610dfa5c76ea998f242e07e60e0f99aaa258c97 | config/initializers/custom_initializer.rb | config/initializers/custom_initializer.rb | require 'random_gen'
require 'ok_redis'
require 'paperclip_helper.rb'
require 'two_legged_oauth'
module ActiveModel
class Errors
def merge!(errors, options={})
fields_to_merge = if only=options[:only]
only
elsif except=options[:except]
except = [except] unless except.is_a?(Array)
except.map!(&:to_sym)
errors.entries.map(&:first).select do |field|
!except.include?(field.to_sym)
end
else
errors.entries.map(&:first)
end
fields_to_merge = [fields_to_merge] unless fields_to_merge.is_a?(Array)
fields_to_merge.map!(&:to_sym)
errors.entries.each do |field, msg|
add field, msg if fields_to_merge.include?(field.to_sym)
end
end
end
end
unless ENV['RAILS_ENV'] == 'development'
Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
end
Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
| require 'random_gen'
require 'ok_redis'
require 'paperclip_helper.rb'
require 'two_legged_oauth'
module ActiveModel
class Errors
def merge!(errors, options={})
fields_to_merge = if only=options[:only]
only
elsif except=options[:except]
except = [except] unless except.is_a?(Array)
except.map!(&:to_sym)
errors.entries.map(&:first).select do |field|
!except.include?(field.to_sym)
end
else
errors.entries.map(&:first)
end
fields_to_merge = [fields_to_merge] unless fields_to_merge.is_a?(Array)
fields_to_merge.map!(&:to_sym)
errors.entries.each do |field, msg|
add field, msg if fields_to_merge.include?(field.to_sym)
end
end
end
end
unless ENV['RACK_ENV'] == 'development'
Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
end
| Use RACK_ENV to check for environment, so thin works | Use RACK_ENV to check for environment, so thin works
| Ruby | agpl-3.0 | nagyistoce/openkit-server,nagyistoce/openkit-server,nagyistoce/openkit-server,nagyistoce/openkit-server | ruby | ## Code Before:
require 'random_gen'
require 'ok_redis'
require 'paperclip_helper.rb'
require 'two_legged_oauth'
module ActiveModel
class Errors
def merge!(errors, options={})
fields_to_merge = if only=options[:only]
only
elsif except=options[:except]
except = [except] unless except.is_a?(Array)
except.map!(&:to_sym)
errors.entries.map(&:first).select do |field|
!except.include?(field.to_sym)
end
else
errors.entries.map(&:first)
end
fields_to_merge = [fields_to_merge] unless fields_to_merge.is_a?(Array)
fields_to_merge.map!(&:to_sym)
errors.entries.each do |field, msg|
add field, msg if fields_to_merge.include?(field.to_sym)
end
end
end
end
unless ENV['RAILS_ENV'] == 'development'
Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
end
Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
## Instruction:
Use RACK_ENV to check for environment, so thin works
## Code After:
require 'random_gen'
require 'ok_redis'
require 'paperclip_helper.rb'
require 'two_legged_oauth'
module ActiveModel
class Errors
def merge!(errors, options={})
fields_to_merge = if only=options[:only]
only
elsif except=options[:except]
except = [except] unless except.is_a?(Array)
except.map!(&:to_sym)
errors.entries.map(&:first).select do |field|
!except.include?(field.to_sym)
end
else
errors.entries.map(&:first)
end
fields_to_merge = [fields_to_merge] unless fields_to_merge.is_a?(Array)
fields_to_merge.map!(&:to_sym)
errors.entries.each do |field, msg|
add field, msg if fields_to_merge.include?(field.to_sym)
end
end
end
end
unless ENV['RACK_ENV'] == 'development'
Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
end
| require 'random_gen'
require 'ok_redis'
require 'paperclip_helper.rb'
require 'two_legged_oauth'
module ActiveModel
class Errors
def merge!(errors, options={})
fields_to_merge = if only=options[:only]
only
elsif except=options[:except]
except = [except] unless except.is_a?(Array)
except.map!(&:to_sym)
errors.entries.map(&:first).select do |field|
!except.include?(field.to_sym)
end
else
errors.entries.map(&:first)
end
fields_to_merge = [fields_to_merge] unless fields_to_merge.is_a?(Array)
fields_to_merge.map!(&:to_sym)
errors.entries.each do |field, msg|
add field, msg if fields_to_merge.include?(field.to_sym)
end
end
end
end
- unless ENV['RAILS_ENV'] == 'development'
? ^^^
+ unless ENV['RACK_ENV'] == 'development'
? ^^
Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
+ Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
end
- Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
| 4 | 0.114286 | 2 | 2 |
0e7409970d663854d97ec94f27b9b231ac661210 | app/models/notification_subscription.rb | app/models/notification_subscription.rb | class NotificationSubscription < ActiveRecord::Base
attr_protected
belongs_to :property
# validations (email)
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
validates :email, uniqueness: {
case_sensitive: false,
scope: :property_id,
message: "You've already subscribed to this property"
}
before_create :create_auth_token, :set_last_email_sent_at
after_create :send_confirmation_email, unless: "bulk_added"
def confirm!
self.update_attributes(confirmed: true)
end
def confirmed?
!!self.confirmed
end
def confirmation_sent?
!self.confirmation_sent_at.nil?
end
private
def send_confirmation_email
# send the email
NotificationMailer.confirmation_email(self).deliver
self.update_attributes(confirmation_sent_at: DateTime.now)
end
def set_last_email_sent_at
self.last_email_sent_at = self.created_at
end
def create_auth_token
self.auth_token = SecureRandom.urlsafe_base64(nil, false)
end
end
| class NotificationSubscription < ActiveRecord::Base
attr_protected
belongs_to :property
# validations (email)
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
validates :email, uniqueness: {
case_sensitive: false,
scope: :property_id,
message: "You've already subscribed to this property"
}
before_create :create_auth_token, :set_last_email_sent_at
after_create :send_confirmation_email, unless: "bulk_added"
def confirm!
self.update_attributes(confirmed: true)
end
def confirmed?
!!self.confirmed
end
def confirmation_sent?
!self.confirmation_sent_at.nil?
end
def override_last_email_sent_at_to!(datetime)
self.update_attribute(:last_email_sent_at, datetime)
end
private
def send_confirmation_email
# send the email
NotificationMailer.confirmation_email(self).deliver
self.update_attributes(confirmation_sent_at: DateTime.now)
end
def set_last_email_sent_at
self.last_email_sent_at = self.created_at
end
def create_auth_token
self.auth_token = SecureRandom.urlsafe_base64(nil, false)
end
end
| Add method to NotificationSubscription that allows overriding the last_email_sent_at attribute | Add method to NotificationSubscription that allows overriding the last_email_sent_at attribute
| Ruby | mit | codeforgso/cityvoice,daguar/cityvoice,daguar/cityvoice,codeforamerica/cityvoice,codeforamerica/cityvoice,codeforgso/cityvoice,ajb/cityvoice,codeforgso/cityvoice,ajb/cityvoice,ajb/cityvoice,daguar/cityvoice,daguar/cityvoice,codeforamerica/cityvoice,ajb/cityvoice,codeforgso/cityvoice,codeforamerica/cityvoice | ruby | ## Code Before:
class NotificationSubscription < ActiveRecord::Base
attr_protected
belongs_to :property
# validations (email)
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
validates :email, uniqueness: {
case_sensitive: false,
scope: :property_id,
message: "You've already subscribed to this property"
}
before_create :create_auth_token, :set_last_email_sent_at
after_create :send_confirmation_email, unless: "bulk_added"
def confirm!
self.update_attributes(confirmed: true)
end
def confirmed?
!!self.confirmed
end
def confirmation_sent?
!self.confirmation_sent_at.nil?
end
private
def send_confirmation_email
# send the email
NotificationMailer.confirmation_email(self).deliver
self.update_attributes(confirmation_sent_at: DateTime.now)
end
def set_last_email_sent_at
self.last_email_sent_at = self.created_at
end
def create_auth_token
self.auth_token = SecureRandom.urlsafe_base64(nil, false)
end
end
## Instruction:
Add method to NotificationSubscription that allows overriding the last_email_sent_at attribute
## Code After:
class NotificationSubscription < ActiveRecord::Base
attr_protected
belongs_to :property
# validations (email)
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
validates :email, uniqueness: {
case_sensitive: false,
scope: :property_id,
message: "You've already subscribed to this property"
}
before_create :create_auth_token, :set_last_email_sent_at
after_create :send_confirmation_email, unless: "bulk_added"
def confirm!
self.update_attributes(confirmed: true)
end
def confirmed?
!!self.confirmed
end
def confirmation_sent?
!self.confirmation_sent_at.nil?
end
def override_last_email_sent_at_to!(datetime)
self.update_attribute(:last_email_sent_at, datetime)
end
private
def send_confirmation_email
# send the email
NotificationMailer.confirmation_email(self).deliver
self.update_attributes(confirmation_sent_at: DateTime.now)
end
def set_last_email_sent_at
self.last_email_sent_at = self.created_at
end
def create_auth_token
self.auth_token = SecureRandom.urlsafe_base64(nil, false)
end
end
| class NotificationSubscription < ActiveRecord::Base
attr_protected
belongs_to :property
# validations (email)
validates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i
validates :email, uniqueness: {
case_sensitive: false,
scope: :property_id,
message: "You've already subscribed to this property"
}
before_create :create_auth_token, :set_last_email_sent_at
after_create :send_confirmation_email, unless: "bulk_added"
def confirm!
self.update_attributes(confirmed: true)
end
def confirmed?
!!self.confirmed
end
def confirmation_sent?
!self.confirmation_sent_at.nil?
end
+ def override_last_email_sent_at_to!(datetime)
+ self.update_attribute(:last_email_sent_at, datetime)
+ end
+
private
def send_confirmation_email
# send the email
NotificationMailer.confirmation_email(self).deliver
self.update_attributes(confirmation_sent_at: DateTime.now)
end
def set_last_email_sent_at
self.last_email_sent_at = self.created_at
end
def create_auth_token
self.auth_token = SecureRandom.urlsafe_base64(nil, false)
end
end | 4 | 0.090909 | 4 | 0 |
c6575b9442e9741856dfcc58ca01de74c1036608 | application.rb | application.rb | require 'config/application'
# It's good to decide how tools we shall use!
# This is my opinion:
#
# ORM: Datamapper
# Database: PostgreSQL
# Views: Erb
#
# I put this choices in Gemfile.
# Let's decide together and modified if is really necessary.
# Persist the videos?
# I don't know for sure, but let's start with this choice.
class RubyCasts
use Rack::Session::Cookie, :secret => "heyhihello"
use Rack::Flash
set :root, File.dirname(__FILE__)
set :environment, 'development'
set :views, Proc.new { File.join(root, "views") }
set :public, Proc.new { File.join(root, "public") }
helpers do
include Rubycasts::Helpers
end
get '/' do
haml :index
end
get '/about' do
haml :about
end
get '/contact' do
haml :contact
end
get '/admin/upload' do
haml :upload
end
get '/stylesheets/application.css' do
content_type "text/css"
sass :application
end
end
| current_dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift(current_dir) unless $LOAD_PATH.include?(current_dir)
require 'config/application'
# It's good to decide how tools we shall use!
# This is my opinion:
#
# ORM: Datamapper
# Database: PostgreSQL
# Views: Erb
#
# I put this choices in Gemfile.
# Let's decide together and modified if is really necessary.
# Persist the videos?
# I don't know for sure, but let's start with this choice.
class RubyCasts
use Rack::Session::Cookie, :secret => "heyhihello"
use Rack::Flash
set :root, File.dirname(__FILE__)
set :environment, 'development'
set :views, Proc.new { File.join(root, "views") }
set :public, Proc.new { File.join(root, "public") }
helpers do
include Rubycasts::Helpers
end
get '/' do
haml :index
end
get '/about' do
haml :about
end
get '/contact' do
haml :contact
end
get '/admin/upload' do
haml :upload
end
get '/stylesheets/application.css' do
content_type "text/css"
sass :application
end
post '/proposta' do
proposta = DmProposta.new
proposta.attributes(params)
if proposta.valid?
proposta.save
env['x-rack.flash'][:notice] = '<p>Preencha os campos obrigatorios.</p>'
else
env['x-rack.flash'][:notice] = '<p class="error">Preencha os campos obrigatorios.</p>'
redirect '/'
end
end
end
| Add post proposta, need help please | Add post proposta, need help please
| Ruby | bsd-3-clause | tomas-stefano/rubycasts,tomas-stefano/rubycasts,tomas-stefano/rubycasts | ruby | ## Code Before:
require 'config/application'
# It's good to decide how tools we shall use!
# This is my opinion:
#
# ORM: Datamapper
# Database: PostgreSQL
# Views: Erb
#
# I put this choices in Gemfile.
# Let's decide together and modified if is really necessary.
# Persist the videos?
# I don't know for sure, but let's start with this choice.
class RubyCasts
use Rack::Session::Cookie, :secret => "heyhihello"
use Rack::Flash
set :root, File.dirname(__FILE__)
set :environment, 'development'
set :views, Proc.new { File.join(root, "views") }
set :public, Proc.new { File.join(root, "public") }
helpers do
include Rubycasts::Helpers
end
get '/' do
haml :index
end
get '/about' do
haml :about
end
get '/contact' do
haml :contact
end
get '/admin/upload' do
haml :upload
end
get '/stylesheets/application.css' do
content_type "text/css"
sass :application
end
end
## Instruction:
Add post proposta, need help please
## Code After:
current_dir = File.expand_path(File.dirname(__FILE__))
$LOAD_PATH.unshift(current_dir) unless $LOAD_PATH.include?(current_dir)
require 'config/application'
# It's good to decide how tools we shall use!
# This is my opinion:
#
# ORM: Datamapper
# Database: PostgreSQL
# Views: Erb
#
# I put this choices in Gemfile.
# Let's decide together and modified if is really necessary.
# Persist the videos?
# I don't know for sure, but let's start with this choice.
class RubyCasts
use Rack::Session::Cookie, :secret => "heyhihello"
use Rack::Flash
set :root, File.dirname(__FILE__)
set :environment, 'development'
set :views, Proc.new { File.join(root, "views") }
set :public, Proc.new { File.join(root, "public") }
helpers do
include Rubycasts::Helpers
end
get '/' do
haml :index
end
get '/about' do
haml :about
end
get '/contact' do
haml :contact
end
get '/admin/upload' do
haml :upload
end
get '/stylesheets/application.css' do
content_type "text/css"
sass :application
end
post '/proposta' do
proposta = DmProposta.new
proposta.attributes(params)
if proposta.valid?
proposta.save
env['x-rack.flash'][:notice] = '<p>Preencha os campos obrigatorios.</p>'
else
env['x-rack.flash'][:notice] = '<p class="error">Preencha os campos obrigatorios.</p>'
redirect '/'
end
end
end
| + current_dir = File.expand_path(File.dirname(__FILE__))
+ $LOAD_PATH.unshift(current_dir) unless $LOAD_PATH.include?(current_dir)
+
require 'config/application'
# It's good to decide how tools we shall use!
# This is my opinion:
#
# ORM: Datamapper
# Database: PostgreSQL
# Views: Erb
#
# I put this choices in Gemfile.
# Let's decide together and modified if is really necessary.
# Persist the videos?
# I don't know for sure, but let's start with this choice.
class RubyCasts
use Rack::Session::Cookie, :secret => "heyhihello"
use Rack::Flash
set :root, File.dirname(__FILE__)
set :environment, 'development'
set :views, Proc.new { File.join(root, "views") }
set :public, Proc.new { File.join(root, "public") }
helpers do
include Rubycasts::Helpers
end
get '/' do
haml :index
end
get '/about' do
haml :about
end
get '/contact' do
haml :contact
end
get '/admin/upload' do
haml :upload
end
get '/stylesheets/application.css' do
content_type "text/css"
sass :application
end
+ post '/proposta' do
+ proposta = DmProposta.new
+ proposta.attributes(params)
+
+ if proposta.valid?
+ proposta.save
+ env['x-rack.flash'][:notice] = '<p>Preencha os campos obrigatorios.</p>'
+ else
+ env['x-rack.flash'][:notice] = '<p class="error">Preencha os campos obrigatorios.</p>'
+ redirect '/'
+ end
+
+ end
end | 16 | 0.301887 | 16 | 0 |
c1e6d14ee6e4c46b92fa326c81e3644e4626cacf | doc/AboutUs.md | doc/AboutUs.md |
* [Role](#role)
* [Kai Ling](#kai-ling)
* [Yi Hang](#yi-hang)
* [Rong Hua](#rong-hua)
* [Charlton](#charlton)
* [Contact](#contact)
## Role
#### Kai Ling
1. Team Leader
2. Documentation
#### Yi Hang
1. Code Quality
2. Integration
#### Rong Hua
1. Test
2. Intern
#### Charlton
1. Scheduling and Tracking
2. Deliverables and Deadlines
## Contact
* Kai Ling (https://github.com/Kaiiiii)
* Yi Hang (https://github.com/yihangho)
* Rong Hua (https://github.com/Roahhh)
* Charlton (https://github.com/cadmusthefounder)
|
* [Role](#role)
* [Kai Ling](#kai-ling)
* [Yi Hang](#yi-hang)
* [Rong Hua](#rong-hua)
* [Charlton](#charlton)
* [Contact](#contact)
## Role
#### Kai Ling
1. Team Leader - In charge of overall project coordination.
2. Documentation - Ensures that project documentations are in order.
#### Yi Hang
1. Code Quality - Ensures adherence to coding standards.
2. Integration - In charge of versioning and code maintainence.
3. Git Expert - Advisor for other members with regards to Git.
#### Rong Hua
1. Test - Ensures testing of the project is done properly and on time.
2. Eclipse Expert - Advisor for other members with regards to Eclipse.
3. Intern - Helps out everyone for free.
#### Charlton
1. Scheduling and Tracking - In charge of defining, assigning, and tracking project tasks.
2. Deliverables and Deadlines - Ensure project deliverables are done on time and in the right format.
## Contact
* Kai Ling (https://github.com/Kaiiiii)
* Yi Hang (https://github.com/yihangho)
* Rong Hua (https://github.com/Roahhh)
* Charlton (https://github.com/cadmusthefounder)
| Add responsibilities in About Us | Add responsibilities in About Us
| Markdown | mit | CS2103AUG2016-W11-C1/main | markdown | ## Code Before:
* [Role](#role)
* [Kai Ling](#kai-ling)
* [Yi Hang](#yi-hang)
* [Rong Hua](#rong-hua)
* [Charlton](#charlton)
* [Contact](#contact)
## Role
#### Kai Ling
1. Team Leader
2. Documentation
#### Yi Hang
1. Code Quality
2. Integration
#### Rong Hua
1. Test
2. Intern
#### Charlton
1. Scheduling and Tracking
2. Deliverables and Deadlines
## Contact
* Kai Ling (https://github.com/Kaiiiii)
* Yi Hang (https://github.com/yihangho)
* Rong Hua (https://github.com/Roahhh)
* Charlton (https://github.com/cadmusthefounder)
## Instruction:
Add responsibilities in About Us
## Code After:
* [Role](#role)
* [Kai Ling](#kai-ling)
* [Yi Hang](#yi-hang)
* [Rong Hua](#rong-hua)
* [Charlton](#charlton)
* [Contact](#contact)
## Role
#### Kai Ling
1. Team Leader - In charge of overall project coordination.
2. Documentation - Ensures that project documentations are in order.
#### Yi Hang
1. Code Quality - Ensures adherence to coding standards.
2. Integration - In charge of versioning and code maintainence.
3. Git Expert - Advisor for other members with regards to Git.
#### Rong Hua
1. Test - Ensures testing of the project is done properly and on time.
2. Eclipse Expert - Advisor for other members with regards to Eclipse.
3. Intern - Helps out everyone for free.
#### Charlton
1. Scheduling and Tracking - In charge of defining, assigning, and tracking project tasks.
2. Deliverables and Deadlines - Ensure project deliverables are done on time and in the right format.
## Contact
* Kai Ling (https://github.com/Kaiiiii)
* Yi Hang (https://github.com/yihangho)
* Rong Hua (https://github.com/Roahhh)
* Charlton (https://github.com/cadmusthefounder)
|
* [Role](#role)
* [Kai Ling](#kai-ling)
* [Yi Hang](#yi-hang)
* [Rong Hua](#rong-hua)
* [Charlton](#charlton)
* [Contact](#contact)
## Role
#### Kai Ling
- 1. Team Leader
- 2. Documentation
+ 1. Team Leader - In charge of overall project coordination.
+ 2. Documentation - Ensures that project documentations are in order.
#### Yi Hang
- 1. Code Quality
- 2. Integration
+ 1. Code Quality - Ensures adherence to coding standards.
+ 2. Integration - In charge of versioning and code maintainence.
+ 3. Git Expert - Advisor for other members with regards to Git.
#### Rong Hua
- 1. Test
- 2. Intern
+ 1. Test - Ensures testing of the project is done properly and on time.
+ 2. Eclipse Expert - Advisor for other members with regards to Eclipse.
+ 3. Intern - Helps out everyone for free.
#### Charlton
- 1. Scheduling and Tracking
- 2. Deliverables and Deadlines
+ 1. Scheduling and Tracking - In charge of defining, assigning, and tracking project tasks.
+ 2. Deliverables and Deadlines - Ensure project deliverables are done on time and in the right format.
## Contact
* Kai Ling (https://github.com/Kaiiiii)
* Yi Hang (https://github.com/yihangho)
* Rong Hua (https://github.com/Roahhh)
* Charlton (https://github.com/cadmusthefounder) | 18 | 0.5 | 10 | 8 |
2a615c43db64959594b6e7a612a54de27e9a851d | lib/flipper/feature.rb | lib/flipper/feature.rb | require 'flipper/adapter'
require 'flipper/errors'
require 'flipper/type'
require 'flipper/toggle'
require 'flipper/gate'
module Flipper
class Feature
attr_reader :name
attr_reader :adapter
def initialize(name, adapter)
@name = name
@adapter = Adapter.wrap(adapter)
end
def enable(thing = Types::Boolean.new)
gate_for(thing).enable(thing)
end
def disable(thing = Types::Boolean.new)
gate_for(thing).disable(thing)
end
def enabled?(actor = nil)
!! catch(:short_circuit) { gates.detect { |gate| gate.open?(actor) } }
end
def disabled?(actor = nil)
!enabled?(actor)
end
# Internal: Gates to check to see if feature is enabled/disabled
#
# Returns an array of gates
def gates
@gates ||= [
Gates::Boolean.new(self),
Gates::Group.new(self),
Gates::Actor.new(self),
Gates::PercentageOfActors.new(self),
Gates::PercentageOfRandom.new(self),
]
end
private
def gate_for(thing)
gates.detect { |gate| gate.protects?(thing) } ||
raise(GateNotFound.new(thing))
end
end
end
| require 'flipper/adapter'
require 'flipper/errors'
require 'flipper/type'
require 'flipper/toggle'
require 'flipper/gate'
module Flipper
class Feature
attr_reader :name
attr_reader :adapter
def initialize(name, adapter)
@name = name
@adapter = Adapter.wrap(adapter)
end
def enable(thing = Types::Boolean.new)
gate_for(thing).enable(thing)
end
def disable(thing = Types::Boolean.new)
gate_for(thing).disable(thing)
end
def enabled?(actor = nil)
!! catch(:short_circuit) { gates.detect { |gate| gate.open?(actor) } }
end
def disabled?(actor = nil)
!enabled?(actor)
end
# Internal: Gates to check to see if feature is enabled/disabled
#
# Returns an array of gates
def gates
@gates ||= [
Gates::Boolean.new(self),
Gates::Group.new(self),
Gates::Actor.new(self),
Gates::PercentageOfActors.new(self),
Gates::PercentageOfRandom.new(self),
]
end
def gate_for(thing)
find_gate(thing) || raise(GateNotFound.new(thing))
end
private
def find_gate(thing)
gates.detect { |gate| gate.protects?(thing) }
end
end
end
| Split up gate_for and finding of gate. | Split up gate_for and finding of gate.
Publicized gate_for for internal use. Finding the gate is still private.
| Ruby | mit | gdavison/flipper,carlthuringer/flipper,jnunemaker/flipper,gdavison/flipper,alabeduarte/flipper,jnunemaker/flipper,carlthuringer/flipper,gdavison/flipper,jnunemaker/flipper,carlthuringer/flipper,gdavison/flipper,alabeduarte/flipper,carlthuringer/flipper,alabeduarte/flipper,jnunemaker/flipper,alabeduarte/flipper | ruby | ## Code Before:
require 'flipper/adapter'
require 'flipper/errors'
require 'flipper/type'
require 'flipper/toggle'
require 'flipper/gate'
module Flipper
class Feature
attr_reader :name
attr_reader :adapter
def initialize(name, adapter)
@name = name
@adapter = Adapter.wrap(adapter)
end
def enable(thing = Types::Boolean.new)
gate_for(thing).enable(thing)
end
def disable(thing = Types::Boolean.new)
gate_for(thing).disable(thing)
end
def enabled?(actor = nil)
!! catch(:short_circuit) { gates.detect { |gate| gate.open?(actor) } }
end
def disabled?(actor = nil)
!enabled?(actor)
end
# Internal: Gates to check to see if feature is enabled/disabled
#
# Returns an array of gates
def gates
@gates ||= [
Gates::Boolean.new(self),
Gates::Group.new(self),
Gates::Actor.new(self),
Gates::PercentageOfActors.new(self),
Gates::PercentageOfRandom.new(self),
]
end
private
def gate_for(thing)
gates.detect { |gate| gate.protects?(thing) } ||
raise(GateNotFound.new(thing))
end
end
end
## Instruction:
Split up gate_for and finding of gate.
Publicized gate_for for internal use. Finding the gate is still private.
## Code After:
require 'flipper/adapter'
require 'flipper/errors'
require 'flipper/type'
require 'flipper/toggle'
require 'flipper/gate'
module Flipper
class Feature
attr_reader :name
attr_reader :adapter
def initialize(name, adapter)
@name = name
@adapter = Adapter.wrap(adapter)
end
def enable(thing = Types::Boolean.new)
gate_for(thing).enable(thing)
end
def disable(thing = Types::Boolean.new)
gate_for(thing).disable(thing)
end
def enabled?(actor = nil)
!! catch(:short_circuit) { gates.detect { |gate| gate.open?(actor) } }
end
def disabled?(actor = nil)
!enabled?(actor)
end
# Internal: Gates to check to see if feature is enabled/disabled
#
# Returns an array of gates
def gates
@gates ||= [
Gates::Boolean.new(self),
Gates::Group.new(self),
Gates::Actor.new(self),
Gates::PercentageOfActors.new(self),
Gates::PercentageOfRandom.new(self),
]
end
def gate_for(thing)
find_gate(thing) || raise(GateNotFound.new(thing))
end
private
def find_gate(thing)
gates.detect { |gate| gate.protects?(thing) }
end
end
end
| require 'flipper/adapter'
require 'flipper/errors'
require 'flipper/type'
require 'flipper/toggle'
require 'flipper/gate'
module Flipper
class Feature
attr_reader :name
attr_reader :adapter
def initialize(name, adapter)
@name = name
@adapter = Adapter.wrap(adapter)
end
def enable(thing = Types::Boolean.new)
gate_for(thing).enable(thing)
end
def disable(thing = Types::Boolean.new)
gate_for(thing).disable(thing)
end
def enabled?(actor = nil)
!! catch(:short_circuit) { gates.detect { |gate| gate.open?(actor) } }
end
def disabled?(actor = nil)
!enabled?(actor)
end
# Internal: Gates to check to see if feature is enabled/disabled
#
# Returns an array of gates
def gates
@gates ||= [
Gates::Boolean.new(self),
Gates::Group.new(self),
Gates::Actor.new(self),
Gates::PercentageOfActors.new(self),
Gates::PercentageOfRandom.new(self),
]
end
+ def gate_for(thing)
+ find_gate(thing) || raise(GateNotFound.new(thing))
+ end
+
private
- def gate_for(thing)
? ----
+ def find_gate(thing)
? +++++
- gates.detect { |gate| gate.protects?(thing) } ||
? ---
+ gates.detect { |gate| gate.protects?(thing) }
- raise(GateNotFound.new(thing))
end
end
end | 9 | 0.169811 | 6 | 3 |
a55b9e88b5e3cf0a9eeded84b15c115acfdf38b8 | deployment/group_vars/all/main.yml | deployment/group_vars/all/main.yml | ---
ploy_hostname: "{{_ploy_instance.id}}"
devpi_proto: https
devpi_base_url: pypi.senic.com/
devpi_index: senic/dev
devpi_auth_user: deploy
devpi_index_url: "{{devpi_proto}}://{{devpi_auth_user}}:{{devpi_auth_password}}@{{devpi_base_url}}{{devpi_index}}/+simple/"
build_user: senic
run_user: nuimo
| ---
ploy_hostname: "{{_ploy_instance.id}}"
devpi_proto: https
devpi_base_url: pypi.senic.com/
devpi_index: senic/dev
devpi_auth_user: deploy
devpi_index_url: "{{devpi_proto}}://{{devpi_base_url}}{{devpi_index}}/+simple/"
build_user: senic
run_user: nuimo
| Adjust to new devpi setup without basic auth | Adjust to new devpi setup without basic auth
| YAML | mit | grunskis/nuimo-hub-backend,grunskis/senic-hub,grunskis/senic-hub,grunskis/senic-hub,getsenic/senic-hub,getsenic/senic-hub,grunskis/nuimo-hub-backend,grunskis/nuimo-hub-backend,grunskis/senic-hub,grunskis/senic-hub,grunskis/senic-hub,grunskis/nuimo-hub-backend,grunskis/nuimo-hub-backend | yaml | ## Code Before:
---
ploy_hostname: "{{_ploy_instance.id}}"
devpi_proto: https
devpi_base_url: pypi.senic.com/
devpi_index: senic/dev
devpi_auth_user: deploy
devpi_index_url: "{{devpi_proto}}://{{devpi_auth_user}}:{{devpi_auth_password}}@{{devpi_base_url}}{{devpi_index}}/+simple/"
build_user: senic
run_user: nuimo
## Instruction:
Adjust to new devpi setup without basic auth
## Code After:
---
ploy_hostname: "{{_ploy_instance.id}}"
devpi_proto: https
devpi_base_url: pypi.senic.com/
devpi_index: senic/dev
devpi_auth_user: deploy
devpi_index_url: "{{devpi_proto}}://{{devpi_base_url}}{{devpi_index}}/+simple/"
build_user: senic
run_user: nuimo
| ---
ploy_hostname: "{{_ploy_instance.id}}"
devpi_proto: https
devpi_base_url: pypi.senic.com/
devpi_index: senic/dev
devpi_auth_user: deploy
- devpi_index_url: "{{devpi_proto}}://{{devpi_auth_user}}:{{devpi_auth_password}}@{{devpi_base_url}}{{devpi_index}}/+simple/"
? --------------------------------------------
+ devpi_index_url: "{{devpi_proto}}://{{devpi_base_url}}{{devpi_index}}/+simple/"
build_user: senic
run_user: nuimo | 2 | 0.222222 | 1 | 1 |
219e9c510a92741634b2c59ad2de446ca811ce4f | recipes/locarna/meta.yaml | recipes/locarna/meta.yaml | package:
name: locarna
version: "1.8.7"
build:
number: 0
source:
fn: locarna-1.8.7.tar.gz
url: "http://www.bioinf.uni-freiburg.de/Software/LocARNA/Releases/locarna-1.8.7.tar.gz"
sha1: 602a0d5a5652f3e5577099859c6ccfaaed5c6fa1
requirements:
build:
- viennarna <=2.1.9
run:
- viennarna <=2.1.9
- perl-threaded
test:
commands:
- mlocarna --help
- locarna --help
- locarna_p --help
- exparna_p --help
about:
home: http://www.bioinf.uni-freiburg.de/Software/LocARNA/
license: GPL
license_file: COPYING
summary: Multiple alignment of RNAs
| package:
name: locarna
version: "1.8.7"
about:
home: http://www.bioinf.uni-freiburg.de/Software/LocARNA/
license: GPL
license_file: COPYING
summary: Multiple alignment of RNAs
build:
number: 1
skip: True # [osx]
source:
fn: locarna-1.8.7.tar.gz
url: "http://www.bioinf.uni-freiburg.de/Software/LocARNA/Releases/locarna-1.8.7.tar.gz"
sha1: 602a0d5a5652f3e5577099859c6ccfaaed5c6fa1
requirements:
build:
- viennarna <=2.1.9
run:
- viennarna <=2.1.9
- perl-threaded
test:
commands:
- mlocarna --version
- locarna --version
- locarna_p --version
- exparna_p --version
| Update locarna recipe (skip osx build) | Update locarna recipe (skip osx build)
| YAML | mit | lpantano/recipes,bioconda/bioconda-recipes,joachimwolff/bioconda-recipes,mcornwell1957/bioconda-recipes,matthdsm/bioconda-recipes,guowei-he/bioconda-recipes,matthdsm/bioconda-recipes,ivirshup/bioconda-recipes,ostrokach/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,phac-nml/bioconda-recipes,colinbrislawn/bioconda-recipes,blankenberg/bioconda-recipes,dmaticzka/bioconda-recipes,gregvonkuster/bioconda-recipes,npavlovikj/bioconda-recipes,zwanli/bioconda-recipes,blankenberg/bioconda-recipes,martin-mann/bioconda-recipes,matthdsm/bioconda-recipes,saketkc/bioconda-recipes,ivirshup/bioconda-recipes,omicsnut/bioconda-recipes,ThomasWollmann/bioconda-recipes,joachimwolff/bioconda-recipes,dkoppstein/recipes,joachimwolff/bioconda-recipes,jfallmann/bioconda-recipes,ThomasWollmann/bioconda-recipes,bow/bioconda-recipes,joachimwolff/bioconda-recipes,shenwei356/bioconda-recipes,daler/bioconda-recipes,rob-p/bioconda-recipes,joachimwolff/bioconda-recipes,omicsnut/bioconda-recipes,phac-nml/bioconda-recipes,jasper1918/bioconda-recipes,CGATOxford/bioconda-recipes,bioconda/recipes,jasper1918/bioconda-recipes,keuv-grvl/bioconda-recipes,gvlproject/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,saketkc/bioconda-recipes,blankenberg/bioconda-recipes,jasper1918/bioconda-recipes,colinbrislawn/bioconda-recipes,mcornwell1957/bioconda-recipes,shenwei356/bioconda-recipes,cokelaer/bioconda-recipes,blankenberg/bioconda-recipes,lpantano/recipes,daler/bioconda-recipes,HassanAmr/bioconda-recipes,colinbrislawn/bioconda-recipes,hardingnj/bioconda-recipes,CGATOxford/bioconda-recipes,xguse/bioconda-recipes,JenCabral/bioconda-recipes,daler/bioconda-recipes,phac-nml/bioconda-recipes,yesimon/bioconda-recipes,matthdsm/bioconda-recipes,mdehollander/bioconda-recipes,omicsnut/bioconda-recipes,peterjc/bioconda-recipes,martin-mann/bioconda-recipes,gvlproject/bioconda-recipes,rvalieris/bioconda-recipes,keuv-grvl/bioconda-recipes,abims-sbr/bioconda-recipes,dmaticzka/bioconda-recipes,mdehollander/bioconda-recipes,bebatut/bioconda-recipes,ivirshup/bioconda-recipes,ostrokach/bioconda-recipes,roryk/recipes,zwanli/bioconda-recipes,npavlovikj/bioconda-recipes,HassanAmr/bioconda-recipes,hardingnj/bioconda-recipes,acaprez/recipes,instituteofpathologyheidelberg/bioconda-recipes,lpantano/recipes,roryk/recipes,peterjc/bioconda-recipes,cokelaer/bioconda-recipes,Luobiny/bioconda-recipes,phac-nml/bioconda-recipes,JenCabral/bioconda-recipes,zachcp/bioconda-recipes,keuv-grvl/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,CGATOxford/bioconda-recipes,acaprez/recipes,chapmanb/bioconda-recipes,npavlovikj/bioconda-recipes,gvlproject/bioconda-recipes,hardingnj/bioconda-recipes,zachcp/bioconda-recipes,daler/bioconda-recipes,matthdsm/bioconda-recipes,phac-nml/bioconda-recipes,HassanAmr/bioconda-recipes,chapmanb/bioconda-recipes,JenCabral/bioconda-recipes,zwanli/bioconda-recipes,ostrokach/bioconda-recipes,saketkc/bioconda-recipes,mcornwell1957/bioconda-recipes,yesimon/bioconda-recipes,ThomasWollmann/bioconda-recipes,martin-mann/bioconda-recipes,bioconda/bioconda-recipes,rvalieris/bioconda-recipes,keuv-grvl/bioconda-recipes,ostrokach/bioconda-recipes,matthdsm/bioconda-recipes,jasper1918/bioconda-recipes,JenCabral/bioconda-recipes,oena/bioconda-recipes,bebatut/bioconda-recipes,rvalieris/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,xguse/bioconda-recipes,bioconda/bioconda-recipes,saketkc/bioconda-recipes,npavlovikj/bioconda-recipes,xguse/bioconda-recipes,gvlproject/bioconda-recipes,pinguinkiste/bioconda-recipes,lpantano/recipes,ostrokach/bioconda-recipes,colinbrislawn/bioconda-recipes,Luobiny/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,gregvonkuster/bioconda-recipes,bow/bioconda-recipes,mdehollander/bioconda-recipes,yesimon/bioconda-recipes,abims-sbr/bioconda-recipes,HassanAmr/bioconda-recipes,abims-sbr/bioconda-recipes,saketkc/bioconda-recipes,cokelaer/bioconda-recipes,rvalieris/bioconda-recipes,ThomasWollmann/bioconda-recipes,mdehollander/bioconda-recipes,peterjc/bioconda-recipes,pinguinkiste/bioconda-recipes,gregvonkuster/bioconda-recipes,keuv-grvl/bioconda-recipes,jfallmann/bioconda-recipes,zachcp/bioconda-recipes,keuv-grvl/bioconda-recipes,daler/bioconda-recipes,bow/bioconda-recipes,shenwei356/bioconda-recipes,CGATOxford/bioconda-recipes,peterjc/bioconda-recipes,chapmanb/bioconda-recipes,Luobiny/bioconda-recipes,bow/bioconda-recipes,bow/bioconda-recipes,peterjc/bioconda-recipes,oena/bioconda-recipes,jfallmann/bioconda-recipes,oena/bioconda-recipes,chapmanb/bioconda-recipes,colinbrislawn/bioconda-recipes,dkoppstein/recipes,pinguinkiste/bioconda-recipes,pinguinkiste/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,mcornwell1957/bioconda-recipes,martin-mann/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,mdehollander/bioconda-recipes,dmaticzka/bioconda-recipes,omicsnut/bioconda-recipes,guowei-he/bioconda-recipes,gregvonkuster/bioconda-recipes,dkoppstein/recipes,yesimon/bioconda-recipes,dmaticzka/bioconda-recipes,zwanli/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,abims-sbr/bioconda-recipes,oena/bioconda-recipes,rob-p/bioconda-recipes,abims-sbr/bioconda-recipes,hardingnj/bioconda-recipes,BIMSBbioinfo/bioconda-recipes,ivirshup/bioconda-recipes,rob-p/bioconda-recipes,instituteofpathologyheidelberg/bioconda-recipes,mcornwell1957/bioconda-recipes,oena/bioconda-recipes,gvlproject/bioconda-recipes,daler/bioconda-recipes,ivirshup/bioconda-recipes,pinguinkiste/bioconda-recipes,xguse/bioconda-recipes,guowei-he/bioconda-recipes,bioconda/recipes,CGATOxford/bioconda-recipes,zwanli/bioconda-recipes,guowei-he/bioconda-recipes,rvalieris/bioconda-recipes,rvalieris/bioconda-recipes,gvlproject/bioconda-recipes,bebatut/bioconda-recipes,bow/bioconda-recipes,ostrokach/bioconda-recipes,hardingnj/bioconda-recipes,colinbrislawn/bioconda-recipes,omicsnut/bioconda-recipes,pinguinkiste/bioconda-recipes,bioconda/recipes,martin-mann/bioconda-recipes,peterjc/bioconda-recipes,jasper1918/bioconda-recipes,zachcp/bioconda-recipes,saketkc/bioconda-recipes,chapmanb/bioconda-recipes,xguse/bioconda-recipes,acaprez/recipes,guowei-he/bioconda-recipes,mdehollander/bioconda-recipes,ThomasWollmann/bioconda-recipes,Luobiny/bioconda-recipes,JenCabral/bioconda-recipes,acaprez/recipes,HassanAmr/bioconda-recipes,ivirshup/bioconda-recipes,jfallmann/bioconda-recipes,JenCabral/bioconda-recipes,CGATOxford/bioconda-recipes,bioconda/bioconda-recipes,joachimwolff/bioconda-recipes,ThomasWollmann/bioconda-recipes,shenwei356/bioconda-recipes,dmaticzka/bioconda-recipes,abims-sbr/bioconda-recipes,rob-p/bioconda-recipes,zwanli/bioconda-recipes,roryk/recipes,bebatut/bioconda-recipes,HassanAmr/bioconda-recipes,cokelaer/bioconda-recipes,dmaticzka/bioconda-recipes | yaml | ## Code Before:
package:
name: locarna
version: "1.8.7"
build:
number: 0
source:
fn: locarna-1.8.7.tar.gz
url: "http://www.bioinf.uni-freiburg.de/Software/LocARNA/Releases/locarna-1.8.7.tar.gz"
sha1: 602a0d5a5652f3e5577099859c6ccfaaed5c6fa1
requirements:
build:
- viennarna <=2.1.9
run:
- viennarna <=2.1.9
- perl-threaded
test:
commands:
- mlocarna --help
- locarna --help
- locarna_p --help
- exparna_p --help
about:
home: http://www.bioinf.uni-freiburg.de/Software/LocARNA/
license: GPL
license_file: COPYING
summary: Multiple alignment of RNAs
## Instruction:
Update locarna recipe (skip osx build)
## Code After:
package:
name: locarna
version: "1.8.7"
about:
home: http://www.bioinf.uni-freiburg.de/Software/LocARNA/
license: GPL
license_file: COPYING
summary: Multiple alignment of RNAs
build:
number: 1
skip: True # [osx]
source:
fn: locarna-1.8.7.tar.gz
url: "http://www.bioinf.uni-freiburg.de/Software/LocARNA/Releases/locarna-1.8.7.tar.gz"
sha1: 602a0d5a5652f3e5577099859c6ccfaaed5c6fa1
requirements:
build:
- viennarna <=2.1.9
run:
- viennarna <=2.1.9
- perl-threaded
test:
commands:
- mlocarna --version
- locarna --version
- locarna_p --version
- exparna_p --version
| package:
name: locarna
version: "1.8.7"
+ about:
+ home: http://www.bioinf.uni-freiburg.de/Software/LocARNA/
+ license: GPL
+ license_file: COPYING
+ summary: Multiple alignment of RNAs
+
build:
- number: 0
? ^
+ number: 1
? ^
+ skip: True # [osx]
source:
fn: locarna-1.8.7.tar.gz
url: "http://www.bioinf.uni-freiburg.de/Software/LocARNA/Releases/locarna-1.8.7.tar.gz"
sha1: 602a0d5a5652f3e5577099859c6ccfaaed5c6fa1
requirements:
build:
- viennarna <=2.1.9
run:
- viennarna <=2.1.9
- perl-threaded
test:
commands:
- - mlocarna --help
? ^ ^^
+ - mlocarna --version
? ^ ^^^^^
- - locarna --help
? ^ ^^
+ - locarna --version
? ^ ^^^^^
- - locarna_p --help
? ^ ^^
+ - locarna_p --version
? ^ ^^^^^
- - exparna_p --help
? ^ ^^
+ - exparna_p --version
? ^ ^^^^^
-
- about:
- home: http://www.bioinf.uni-freiburg.de/Software/LocARNA/
- license: GPL
- license_file: COPYING
- summary: Multiple alignment of RNAs | 23 | 0.741935 | 12 | 11 |
412ace9941410b177ee5739aab9a18c63ac6bdaf | meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb | meta-xilinx-core/recipes-bsp/u-boot/u-boot-xlnx_2022.1.bb | UBOOT_VERSION = "v2021.01"
UBRANCH ?= "xlnx_rebase_v2022.01"
SRCREV = "c50d6c48f4e1368cd38699278e35563cb4b0e444"
include u-boot-xlnx.inc
include u-boot-spl-zynq-init.inc
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897"
# u-boot-xlnx has support for these
HAS_PLATFORM_INIT ?= " \
xilinx_zynqmp_virt_config \
xilinx_zynq_virt_defconfig \
xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \
"
| UBOOT_VERSION = "v2021.01"
UBRANCH ?= "xlnx_rebase_v2022.01_2022.1_update"
SRCREV = "a807cf8f6ce03ef1441c246a90aefbc8b6ea4c43"
include u-boot-xlnx.inc
include u-boot-spl-zynq-init.inc
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897"
# u-boot-xlnx has support for these
HAS_PLATFORM_INIT ?= " \
xilinx_zynqmp_virt_config \
xilinx_zynq_virt_defconfig \
xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \
"
| Update branch and SRCREV for update release | u-boot-xlnx: Update branch and SRCREV for update release
Update the u-boot branch and commit ID for the 2022.1_update1 release.
Signed-off-by: Christian Kohn <cddab1f837c400ff9c3b002761e2cb74669ec6d1@xilinx.com>
| BitBake | mit | Xilinx/meta-xilinx,Xilinx/meta-xilinx,Xilinx/meta-xilinx,Xilinx/meta-xilinx,Xilinx/meta-xilinx,Xilinx/meta-xilinx | bitbake | ## Code Before:
UBOOT_VERSION = "v2021.01"
UBRANCH ?= "xlnx_rebase_v2022.01"
SRCREV = "c50d6c48f4e1368cd38699278e35563cb4b0e444"
include u-boot-xlnx.inc
include u-boot-spl-zynq-init.inc
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897"
# u-boot-xlnx has support for these
HAS_PLATFORM_INIT ?= " \
xilinx_zynqmp_virt_config \
xilinx_zynq_virt_defconfig \
xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \
"
## Instruction:
u-boot-xlnx: Update branch and SRCREV for update release
Update the u-boot branch and commit ID for the 2022.1_update1 release.
Signed-off-by: Christian Kohn <cddab1f837c400ff9c3b002761e2cb74669ec6d1@xilinx.com>
## Code After:
UBOOT_VERSION = "v2021.01"
UBRANCH ?= "xlnx_rebase_v2022.01_2022.1_update"
SRCREV = "a807cf8f6ce03ef1441c246a90aefbc8b6ea4c43"
include u-boot-xlnx.inc
include u-boot-spl-zynq-init.inc
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897"
# u-boot-xlnx has support for these
HAS_PLATFORM_INIT ?= " \
xilinx_zynqmp_virt_config \
xilinx_zynq_virt_defconfig \
xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \
"
| UBOOT_VERSION = "v2021.01"
- UBRANCH ?= "xlnx_rebase_v2022.01"
+ UBRANCH ?= "xlnx_rebase_v2022.01_2022.1_update"
? ++++++++++++++
- SRCREV = "c50d6c48f4e1368cd38699278e35563cb4b0e444"
+ SRCREV = "a807cf8f6ce03ef1441c246a90aefbc8b6ea4c43"
include u-boot-xlnx.inc
include u-boot-spl-zynq-init.inc
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://README;beginline=1;endline=4;md5=744e7e3bb0c94b4b9f6b3db3bf893897"
# u-boot-xlnx has support for these
HAS_PLATFORM_INIT ?= " \
xilinx_zynqmp_virt_config \
xilinx_zynq_virt_defconfig \
xilinx_versal_vc_p_a2197_revA_x_prc_01_revA \
"
| 4 | 0.210526 | 2 | 2 |
1558beef907436874204cd0e6806d27045971f0c | .travis.yml | .travis.yml | sudo: false
language: ruby
rvm:
- 2.2.0
- 2.4.0
before_install: gem install bundler -v 1.15.1
| sudo: false
language: ruby
rvm:
- 2.2.0
- 2.4.0
before_install: gem install bundler -v 1.15.1
deploy:
provider: rubygems
api_key:
secure: F5vH20pJfj7beutCPvr0qJQ4An46+GqF4IimizAkcpWPyVnbwiLN0Ngph0ifjBRzx3vByHEzvEqg2abS8tlm8ZZJoSOywHKAtXM8X1UcAJnvTf6VOjGTWMHZcUmp6cuGLYbqvV5hf0Cfji2R+Co1x1pDRnT/C9J9Ew7TSQ2/cFhEdoOrxCwvUmeSJ4RWIjdu8XjL728AVvA9npXp7fFC4TIWWW3fZkRJZD2BGM5lBhmlmfCUSbFiSGJVKsGtHtqZwYBdiXv74Ujen0G8PMQB/1oJC/NH9IiYCnNFz4WxWMFT/ufp/PuuqKC9Bquo40XJT8E82Akg0BkmeEl38NJ+lW0dZyrt4MrJ6UF5zOh/rx1oBdbmF11ZGLu+fpmituWqhTMWFAM7bPb0m+3jS3bkbF8IravRo09CY3NpVDOkJH+5g8HLS4jDuelQw+SZ06CUbGwv0lZgIcn6fPrJqQBgwoW7R6HDOsjcga/UMvGpQ9NArAvUp2OnfFUqOcrqgUANsS7evFYoMka8GYSlUkEPu0fcOppzrHONVIgtj9vG3DvbUPiK8jwx+JfQNiSVhRgyCUQTENW5UCxRZr3Q4Jeaek+PIvG1O+psqi/K3yM/nlYP8Zee0PC8X5re1ZTctJO3crCpBNxTBDhwuBjIQMjQbz+mS5ahnijhHBdXxTmSxCo=
on:
tags: true
gem: kcna
| Use Travis to deploy gem | Use Travis to deploy gem
| YAML | mit | hinamiyagk/kcna.rb | yaml | ## Code Before:
sudo: false
language: ruby
rvm:
- 2.2.0
- 2.4.0
before_install: gem install bundler -v 1.15.1
## Instruction:
Use Travis to deploy gem
## Code After:
sudo: false
language: ruby
rvm:
- 2.2.0
- 2.4.0
before_install: gem install bundler -v 1.15.1
deploy:
provider: rubygems
api_key:
secure: F5vH20pJfj7beutCPvr0qJQ4An46+GqF4IimizAkcpWPyVnbwiLN0Ngph0ifjBRzx3vByHEzvEqg2abS8tlm8ZZJoSOywHKAtXM8X1UcAJnvTf6VOjGTWMHZcUmp6cuGLYbqvV5hf0Cfji2R+Co1x1pDRnT/C9J9Ew7TSQ2/cFhEdoOrxCwvUmeSJ4RWIjdu8XjL728AVvA9npXp7fFC4TIWWW3fZkRJZD2BGM5lBhmlmfCUSbFiSGJVKsGtHtqZwYBdiXv74Ujen0G8PMQB/1oJC/NH9IiYCnNFz4WxWMFT/ufp/PuuqKC9Bquo40XJT8E82Akg0BkmeEl38NJ+lW0dZyrt4MrJ6UF5zOh/rx1oBdbmF11ZGLu+fpmituWqhTMWFAM7bPb0m+3jS3bkbF8IravRo09CY3NpVDOkJH+5g8HLS4jDuelQw+SZ06CUbGwv0lZgIcn6fPrJqQBgwoW7R6HDOsjcga/UMvGpQ9NArAvUp2OnfFUqOcrqgUANsS7evFYoMka8GYSlUkEPu0fcOppzrHONVIgtj9vG3DvbUPiK8jwx+JfQNiSVhRgyCUQTENW5UCxRZr3Q4Jeaek+PIvG1O+psqi/K3yM/nlYP8Zee0PC8X5re1ZTctJO3crCpBNxTBDhwuBjIQMjQbz+mS5ahnijhHBdXxTmSxCo=
on:
tags: true
gem: kcna
| sudo: false
language: ruby
rvm:
- 2.2.0
- 2.4.0
before_install: gem install bundler -v 1.15.1
+ deploy:
+ provider: rubygems
+ api_key:
+ secure: F5vH20pJfj7beutCPvr0qJQ4An46+GqF4IimizAkcpWPyVnbwiLN0Ngph0ifjBRzx3vByHEzvEqg2abS8tlm8ZZJoSOywHKAtXM8X1UcAJnvTf6VOjGTWMHZcUmp6cuGLYbqvV5hf0Cfji2R+Co1x1pDRnT/C9J9Ew7TSQ2/cFhEdoOrxCwvUmeSJ4RWIjdu8XjL728AVvA9npXp7fFC4TIWWW3fZkRJZD2BGM5lBhmlmfCUSbFiSGJVKsGtHtqZwYBdiXv74Ujen0G8PMQB/1oJC/NH9IiYCnNFz4WxWMFT/ufp/PuuqKC9Bquo40XJT8E82Akg0BkmeEl38NJ+lW0dZyrt4MrJ6UF5zOh/rx1oBdbmF11ZGLu+fpmituWqhTMWFAM7bPb0m+3jS3bkbF8IravRo09CY3NpVDOkJH+5g8HLS4jDuelQw+SZ06CUbGwv0lZgIcn6fPrJqQBgwoW7R6HDOsjcga/UMvGpQ9NArAvUp2OnfFUqOcrqgUANsS7evFYoMka8GYSlUkEPu0fcOppzrHONVIgtj9vG3DvbUPiK8jwx+JfQNiSVhRgyCUQTENW5UCxRZr3Q4Jeaek+PIvG1O+psqi/K3yM/nlYP8Zee0PC8X5re1ZTctJO3crCpBNxTBDhwuBjIQMjQbz+mS5ahnijhHBdXxTmSxCo=
+ on:
+ tags: true
+ gem: kcna | 7 | 1.166667 | 7 | 0 |
101caa0a7bff0a84b1d67ebc22060bd8a604a618 | sql/speakeasy/donations.sql | sql/speakeasy/donations.sql | -- Donations count
INSERT INTO speakeasy_petition_metrics (campaign_id, activity, npeople)
SELECT
campaign_id, 'donation', count(id) donations_count
FROM civicrm_contribution
WHERE contribution_status_id = 1 AND is_test = 0 AND campaign_id IS NOT NULL
GROUP BY campaign_id;
-- Donations amount
INSERT INTO speakeasy_petition_metrics (campaign_id, activity, npeople)
SELECT
campaign_id, 'donation_amount', sum(total_amount)
FROM civicrm_contribution
WHERE contribution_status_id = 1 AND is_test = 0 AND campaign_id IS NOT NULL
GROUP BY campaign_id;
| -- Donations count
INSERT INTO speakeasy_petition_metrics (activity, campaign_id, status, npeople)
SELECT
'donation', campaign_id, currency, count(id) donations_count
FROM civicrm_contribution
WHERE contribution_status_id = 1 AND is_test = 0 AND campaign_id IS NOT NULL
GROUP BY campaign_id, currency;
-- Donations amount
INSERT INTO speakeasy_petition_metrics (activity, campaign_id, status, npeople)
SELECT
'donation_amount', campaign_id, currency, sum(total_amount)
FROM civicrm_contribution
WHERE contribution_status_id = 1 AND is_test = 0 AND campaign_id IS NOT NULL
GROUP BY campaign_id, currency;
| Add currency to donation metrics | Add currency to donation metrics
| SQL | agpl-3.0 | WeMoveEU/bsd_api | sql | ## Code Before:
-- Donations count
INSERT INTO speakeasy_petition_metrics (campaign_id, activity, npeople)
SELECT
campaign_id, 'donation', count(id) donations_count
FROM civicrm_contribution
WHERE contribution_status_id = 1 AND is_test = 0 AND campaign_id IS NOT NULL
GROUP BY campaign_id;
-- Donations amount
INSERT INTO speakeasy_petition_metrics (campaign_id, activity, npeople)
SELECT
campaign_id, 'donation_amount', sum(total_amount)
FROM civicrm_contribution
WHERE contribution_status_id = 1 AND is_test = 0 AND campaign_id IS NOT NULL
GROUP BY campaign_id;
## Instruction:
Add currency to donation metrics
## Code After:
-- Donations count
INSERT INTO speakeasy_petition_metrics (activity, campaign_id, status, npeople)
SELECT
'donation', campaign_id, currency, count(id) donations_count
FROM civicrm_contribution
WHERE contribution_status_id = 1 AND is_test = 0 AND campaign_id IS NOT NULL
GROUP BY campaign_id, currency;
-- Donations amount
INSERT INTO speakeasy_petition_metrics (activity, campaign_id, status, npeople)
SELECT
'donation_amount', campaign_id, currency, sum(total_amount)
FROM civicrm_contribution
WHERE contribution_status_id = 1 AND is_test = 0 AND campaign_id IS NOT NULL
GROUP BY campaign_id, currency;
| -- Donations count
- INSERT INTO speakeasy_petition_metrics (campaign_id, activity, npeople)
? - ^^^^^
+ INSERT INTO speakeasy_petition_metrics (activity, campaign_id, status, npeople)
? ++++++++++ ++ ^^
SELECT
- campaign_id, 'donation', count(id) donations_count
? ^^^ ^^^^^^
+ 'donation', campaign_id, currency, count(id) donations_count
? ++++++++++++ ^^^^^ ^^
FROM civicrm_contribution
WHERE contribution_status_id = 1 AND is_test = 0 AND campaign_id IS NOT NULL
- GROUP BY campaign_id;
+ GROUP BY campaign_id, currency;
? ++++++++++
-- Donations amount
- INSERT INTO speakeasy_petition_metrics (campaign_id, activity, npeople)
? - ^^^^^
+ INSERT INTO speakeasy_petition_metrics (activity, campaign_id, status, npeople)
? ++++++++++ ++ ^^
SELECT
- campaign_id, 'donation_amount', sum(total_amount)
+ 'donation_amount', campaign_id, currency, sum(total_amount)
FROM civicrm_contribution
WHERE contribution_status_id = 1 AND is_test = 0 AND campaign_id IS NOT NULL
- GROUP BY campaign_id;
+ GROUP BY campaign_id, currency;
? ++++++++++
| 12 | 0.8 | 6 | 6 |
05b238c8c7db2b78562994efcb5fde08c9558b76 | features/step_definitions/call_steps.rb | features/step_definitions/call_steps.rb | Then %r/^I should see call for application '([^']*)'(?: with description '([^']*)':)?$/ do |*args|
name, description, table = args
check_details '.call-details', name, description, table
end
def check_personal_details(container_selector, person_attributes)
check_that_contains_values container_selector, person_attributes[:first_name], person_attributes[:last_name],
person_attributes[:phone], person_attributes[:email]
end
Then %r/^I should see my own name, phone number and email\-address in the application form$/ do
check_personal_details '.applicant-details', FactoryGirl.attributes_for(:eija)
end
Then %r/^I should see my own name, phone number and email\-address in the confirmation dialog$/ do
check_personal_details '#application-sent .applicant-details', FactoryGirl.attributes_for(:eija)
end
Then %r/^I should see (\d+) persons in '([^']*)'$/ do |person_count, title|
all(".organ-members:contains('#{title}') .member-card" ).count().should == person_count.to_i
end
def member(name)
find ".edit_call .member-card:contains('#{name}')"
end
Then %r/^I set applicant '([^']*)' as '([^']*)'$/ do |name, position|
member_slot = find ".member-card-empty:contains('#{position.downcase}')"
member(name).drag_to member_slot
end
| Then %r/^I should see call for application '([^']*)'(?: with description '([^']*)':)?$/ do |*args|
name, description, table = args
check_details '.call-details', name, description, table
end
def check_personal_details(container_selector, person_attributes)
check_that_contains_values container_selector, person_attributes[:first_name], person_attributes[:last_name],
person_attributes[:phone], person_attributes[:email]
end
Then %r/^I should see my own name, phone number and email\-address in the application form$/ do
check_personal_details '.applicant-details', FactoryGirl.attributes_for(:eija)
end
Then %r/^I should see my own name, phone number and email\-address in the confirmation dialog$/ do
check_personal_details '#application-sent .applicant-details', FactoryGirl.attributes_for(:eija)
end
Then %r/^I should see (\d+) persons in '([^']*)'$/ do |person_count, title|
all(".organ-members:contains('#{title}') .member-card" ).count().should == person_count.to_i
end
def applicant(name)
find ".applicants .member-card:contains('#{name}')"
end
Then %r/^I set applicant '([^']*)' as '([^']*)'$/ do |name, position|
member_slot = find ".member-card-empty:contains('#{position.downcase}')"
applicant(name).drag_to member_slot
end
| Fix step to find the applicant card | Fix step to find the applicant card | Ruby | mit | experq/hhj,experq/hhj,experq/hhj,ayystudentunion/hhj,ayystudentunion/hhj,ayystudentunion/hhj,ayystudentunion/hhj,experq/hhj | ruby | ## Code Before:
Then %r/^I should see call for application '([^']*)'(?: with description '([^']*)':)?$/ do |*args|
name, description, table = args
check_details '.call-details', name, description, table
end
def check_personal_details(container_selector, person_attributes)
check_that_contains_values container_selector, person_attributes[:first_name], person_attributes[:last_name],
person_attributes[:phone], person_attributes[:email]
end
Then %r/^I should see my own name, phone number and email\-address in the application form$/ do
check_personal_details '.applicant-details', FactoryGirl.attributes_for(:eija)
end
Then %r/^I should see my own name, phone number and email\-address in the confirmation dialog$/ do
check_personal_details '#application-sent .applicant-details', FactoryGirl.attributes_for(:eija)
end
Then %r/^I should see (\d+) persons in '([^']*)'$/ do |person_count, title|
all(".organ-members:contains('#{title}') .member-card" ).count().should == person_count.to_i
end
def member(name)
find ".edit_call .member-card:contains('#{name}')"
end
Then %r/^I set applicant '([^']*)' as '([^']*)'$/ do |name, position|
member_slot = find ".member-card-empty:contains('#{position.downcase}')"
member(name).drag_to member_slot
end
## Instruction:
Fix step to find the applicant card
## Code After:
Then %r/^I should see call for application '([^']*)'(?: with description '([^']*)':)?$/ do |*args|
name, description, table = args
check_details '.call-details', name, description, table
end
def check_personal_details(container_selector, person_attributes)
check_that_contains_values container_selector, person_attributes[:first_name], person_attributes[:last_name],
person_attributes[:phone], person_attributes[:email]
end
Then %r/^I should see my own name, phone number and email\-address in the application form$/ do
check_personal_details '.applicant-details', FactoryGirl.attributes_for(:eija)
end
Then %r/^I should see my own name, phone number and email\-address in the confirmation dialog$/ do
check_personal_details '#application-sent .applicant-details', FactoryGirl.attributes_for(:eija)
end
Then %r/^I should see (\d+) persons in '([^']*)'$/ do |person_count, title|
all(".organ-members:contains('#{title}') .member-card" ).count().should == person_count.to_i
end
def applicant(name)
find ".applicants .member-card:contains('#{name}')"
end
Then %r/^I set applicant '([^']*)' as '([^']*)'$/ do |name, position|
member_slot = find ".member-card-empty:contains('#{position.downcase}')"
applicant(name).drag_to member_slot
end
| Then %r/^I should see call for application '([^']*)'(?: with description '([^']*)':)?$/ do |*args|
name, description, table = args
check_details '.call-details', name, description, table
end
def check_personal_details(container_selector, person_attributes)
check_that_contains_values container_selector, person_attributes[:first_name], person_attributes[:last_name],
person_attributes[:phone], person_attributes[:email]
end
Then %r/^I should see my own name, phone number and email\-address in the application form$/ do
check_personal_details '.applicant-details', FactoryGirl.attributes_for(:eija)
end
Then %r/^I should see my own name, phone number and email\-address in the confirmation dialog$/ do
check_personal_details '#application-sent .applicant-details', FactoryGirl.attributes_for(:eija)
end
Then %r/^I should see (\d+) persons in '([^']*)'$/ do |person_count, title|
all(".organ-members:contains('#{title}') .member-card" ).count().should == person_count.to_i
end
- def member(name)
+ def applicant(name)
- find ".edit_call .member-card:contains('#{name}')"
? ^^ -- ^^
+ find ".applicants .member-card:contains('#{name}')"
? ^^^^ ^^^
end
Then %r/^I set applicant '([^']*)' as '([^']*)'$/ do |name, position|
member_slot = find ".member-card-empty:contains('#{position.downcase}')"
- member(name).drag_to member_slot
? ^^^^^^
+ applicant(name).drag_to member_slot
? ^^^^^^^^^
end | 6 | 0.2 | 3 | 3 |
fe7117c7e0b6e812535713f997fdc666686c7e04 | src/ringo-server.js | src/ringo-server.js |
var config = {
server_port: 5000,
server_opts: {}
};
var server = require('http').Server();
var serverio = require('socket.io').listen(server, config.server_opts);
server.listen(config.server_port);
var players = [];
var data = require('../data/apples.json');
var red = data.red,
green = data.green;
serverio.of('/game').on('connection', function(socket) {
// TODO: add socket
socket.on('disconnect', function() {
// TODO: remove socket
});
socket.on('authme', function() {
});
});
|
var config = {
server_port: 5000,
server_opts: {}
};
var server = require('http').Server();
var serverio = require('socket.io').listen(server, config.server_opts);
server.listen(config.server_port);
var _ = require('_');
var players = [];
var data = require('../data/apples.json');
var red = data.red,
green = data.green;
serverio.of('/game').on('connection', function(socket) {
socket.on('disconnect', function() {
players = _.without(players, socket);
console.log('Player count', players.length);
});
socket.on('authme', function() {
players.append(socket);
});
});
| Add players to server on connect | Add players to server on connect
| JavaScript | mit | Alphadelta14/ringo-ni-ringo | javascript | ## Code Before:
var config = {
server_port: 5000,
server_opts: {}
};
var server = require('http').Server();
var serverio = require('socket.io').listen(server, config.server_opts);
server.listen(config.server_port);
var players = [];
var data = require('../data/apples.json');
var red = data.red,
green = data.green;
serverio.of('/game').on('connection', function(socket) {
// TODO: add socket
socket.on('disconnect', function() {
// TODO: remove socket
});
socket.on('authme', function() {
});
});
## Instruction:
Add players to server on connect
## Code After:
var config = {
server_port: 5000,
server_opts: {}
};
var server = require('http').Server();
var serverio = require('socket.io').listen(server, config.server_opts);
server.listen(config.server_port);
var _ = require('_');
var players = [];
var data = require('../data/apples.json');
var red = data.red,
green = data.green;
serverio.of('/game').on('connection', function(socket) {
socket.on('disconnect', function() {
players = _.without(players, socket);
console.log('Player count', players.length);
});
socket.on('authme', function() {
players.append(socket);
});
});
|
var config = {
server_port: 5000,
server_opts: {}
};
var server = require('http').Server();
var serverio = require('socket.io').listen(server, config.server_opts);
server.listen(config.server_port);
+ var _ = require('_');
var players = [];
var data = require('../data/apples.json');
var red = data.red,
green = data.green;
serverio.of('/game').on('connection', function(socket) {
- // TODO: add socket
socket.on('disconnect', function() {
- // TODO: remove socket
+ players = _.without(players, socket);
+ console.log('Player count', players.length);
});
socket.on('authme', function() {
-
+ players.append(socket);
});
}); | 7 | 0.259259 | 4 | 3 |
b5188aa96e87c0f41cf2071b27d55b7ff55c77ad | README.rst | README.rst | ==================
Spiral Galaxy Game
==================
Spiral Galaxy Game - an open source semi-massively multiplayer turn
based space strategy game! (-with a rather generic title.)
Status
======
This codebase is currently exploratory as I'm learning a lot about
PostgresQL, twisted web apps, and html5.
| ==================
Spiral Galaxy Game
==================
Spiral Galaxy Game - an open source semi-massively multiplayer turn
based space strategy game! (-with a rather generic title.)
Status
======
This codebase is currently exploratory as I'm learning a lot about
PostgresQL, twisted web apps, and html5.
Quick Start
===========
This assumes a debian-like system::
$ git checkout https://github.com/nejucomo/sgg
$ cd ./sgg
$ T="$HOME/virtualenvs/sgg-dev"
$ mkdir -p "$T"
$ virtualenv "$T"
$ source "$T/bin/activate"
$ ./setup.py develop
$ sudo apt-get install postgresql{,-doc,-client}
$ sudo -u postgres $(which sgg-create-db-user)
If all has gone well ``sgg-create-db-user`` should have given instructions
for how to edit ``pg_hba.conf``, so follow them::
$ sudo vim /etc/postgresql/9.3/main/pg_hba.conf
$ sudo /etc/init.d/postgresql reload
This step is not yet implemented::
$ sgg-demiurge # Create a galaxy.
| Add quick start instructions, in case anyone else is interested. | Add quick start instructions, in case anyone else is interested.
| reStructuredText | agpl-3.0 | nejucomo/sgg,nejucomo/sgg,nejucomo/sgg | restructuredtext | ## Code Before:
==================
Spiral Galaxy Game
==================
Spiral Galaxy Game - an open source semi-massively multiplayer turn
based space strategy game! (-with a rather generic title.)
Status
======
This codebase is currently exploratory as I'm learning a lot about
PostgresQL, twisted web apps, and html5.
## Instruction:
Add quick start instructions, in case anyone else is interested.
## Code After:
==================
Spiral Galaxy Game
==================
Spiral Galaxy Game - an open source semi-massively multiplayer turn
based space strategy game! (-with a rather generic title.)
Status
======
This codebase is currently exploratory as I'm learning a lot about
PostgresQL, twisted web apps, and html5.
Quick Start
===========
This assumes a debian-like system::
$ git checkout https://github.com/nejucomo/sgg
$ cd ./sgg
$ T="$HOME/virtualenvs/sgg-dev"
$ mkdir -p "$T"
$ virtualenv "$T"
$ source "$T/bin/activate"
$ ./setup.py develop
$ sudo apt-get install postgresql{,-doc,-client}
$ sudo -u postgres $(which sgg-create-db-user)
If all has gone well ``sgg-create-db-user`` should have given instructions
for how to edit ``pg_hba.conf``, so follow them::
$ sudo vim /etc/postgresql/9.3/main/pg_hba.conf
$ sudo /etc/init.d/postgresql reload
This step is not yet implemented::
$ sgg-demiurge # Create a galaxy.
| ==================
Spiral Galaxy Game
==================
Spiral Galaxy Game - an open source semi-massively multiplayer turn
based space strategy game! (-with a rather generic title.)
Status
======
This codebase is currently exploratory as I'm learning a lot about
PostgresQL, twisted web apps, and html5.
+
+ Quick Start
+ ===========
+
+ This assumes a debian-like system::
+
+ $ git checkout https://github.com/nejucomo/sgg
+ $ cd ./sgg
+ $ T="$HOME/virtualenvs/sgg-dev"
+ $ mkdir -p "$T"
+ $ virtualenv "$T"
+ $ source "$T/bin/activate"
+ $ ./setup.py develop
+ $ sudo apt-get install postgresql{,-doc,-client}
+ $ sudo -u postgres $(which sgg-create-db-user)
+
+ If all has gone well ``sgg-create-db-user`` should have given instructions
+ for how to edit ``pg_hba.conf``, so follow them::
+
+ $ sudo vim /etc/postgresql/9.3/main/pg_hba.conf
+ $ sudo /etc/init.d/postgresql reload
+
+ This step is not yet implemented::
+
+ $ sgg-demiurge # Create a galaxy. | 25 | 2.083333 | 25 | 0 |
645f05f7c110052a5631964a2a59c0f696f407de | ansible/roles/apiserver/defaults/main.yml | ansible/roles/apiserver/defaults/main.yml | server_version: 1.2.0
server_url: https://github.com/credentials/irma_api_server/releases/download/v{{ server_version }}/irma_api_server.zip
conf_path: /etc/irma_api_server
base_install_path: /opt
install_path: /opt/irma_api_server
http_port: 8081
https_port: 8444
irma_configuration: "https://github.com/credentials/irma_configuration"
irma_configuration_name:
irma_configuration_subpath: false
irma_configuration_branch: combined
jwt_issuer: "apiserver"
reject_unfloored_validity_timestamps: "false"
enable_issuing: "false"
enable_verification: "false"
enable_signing: "false"
allow_unsigned_issue_requests: "false"
allow_unsigned_verification_requests: "false"
allow_unsigned_signature_requests: "false"
authorized_idps:
authorized_sps:
authorized_sigclients:
client_names:
| server_version: 1.3.1
server_url: https://github.com/credentials/irma_api_server/releases/download/v{{ server_version }}/irma_api_server.zip
conf_path: /etc/irma_api_server
base_install_path: /opt
install_path: /opt/irma_api_server
http_port: 8081
https_port: 8444
irma_configuration: "https://github.com/credentials/irma-demo-schememanager"
irma_configuration_name: irma-demo
irma_configuration_subpath: true
irma_configuration_branch: master
jwt_issuer: "apiserver"
reject_unfloored_validity_timestamps: "false"
enable_issuing: "false"
enable_verification: "false"
enable_signing: "false"
allow_unsigned_issue_requests: "false"
allow_unsigned_verification_requests: "false"
allow_unsigned_signature_requests: "false"
authorized_idps:
authorized_sps:
authorized_sigclients:
client_names:
| Update ansible script to v1.3.1 | Update ansible script to v1.3.1
| YAML | bsd-3-clause | credentials/irma_verification_server,credentials/irma_verification_server | yaml | ## Code Before:
server_version: 1.2.0
server_url: https://github.com/credentials/irma_api_server/releases/download/v{{ server_version }}/irma_api_server.zip
conf_path: /etc/irma_api_server
base_install_path: /opt
install_path: /opt/irma_api_server
http_port: 8081
https_port: 8444
irma_configuration: "https://github.com/credentials/irma_configuration"
irma_configuration_name:
irma_configuration_subpath: false
irma_configuration_branch: combined
jwt_issuer: "apiserver"
reject_unfloored_validity_timestamps: "false"
enable_issuing: "false"
enable_verification: "false"
enable_signing: "false"
allow_unsigned_issue_requests: "false"
allow_unsigned_verification_requests: "false"
allow_unsigned_signature_requests: "false"
authorized_idps:
authorized_sps:
authorized_sigclients:
client_names:
## Instruction:
Update ansible script to v1.3.1
## Code After:
server_version: 1.3.1
server_url: https://github.com/credentials/irma_api_server/releases/download/v{{ server_version }}/irma_api_server.zip
conf_path: /etc/irma_api_server
base_install_path: /opt
install_path: /opt/irma_api_server
http_port: 8081
https_port: 8444
irma_configuration: "https://github.com/credentials/irma-demo-schememanager"
irma_configuration_name: irma-demo
irma_configuration_subpath: true
irma_configuration_branch: master
jwt_issuer: "apiserver"
reject_unfloored_validity_timestamps: "false"
enable_issuing: "false"
enable_verification: "false"
enable_signing: "false"
allow_unsigned_issue_requests: "false"
allow_unsigned_verification_requests: "false"
allow_unsigned_signature_requests: "false"
authorized_idps:
authorized_sps:
authorized_sigclients:
client_names:
| - server_version: 1.2.0
? ^ ^
+ server_version: 1.3.1
? ^ ^
server_url: https://github.com/credentials/irma_api_server/releases/download/v{{ server_version }}/irma_api_server.zip
conf_path: /etc/irma_api_server
base_install_path: /opt
install_path: /opt/irma_api_server
http_port: 8081
https_port: 8444
- irma_configuration: "https://github.com/credentials/irma_configuration"
? ^ ^ ^^ ^ -----
+ irma_configuration: "https://github.com/credentials/irma-demo-schememanager"
? ^^^^^^^ ^^^^^^ ^ ^
- irma_configuration_name:
+ irma_configuration_name: irma-demo
? ++++++++++
- irma_configuration_subpath: false
? ^^^^
+ irma_configuration_subpath: true
? ^^^
- irma_configuration_branch: combined
? -- ^^^ ^
+ irma_configuration_branch: master
? ^^^ ^
jwt_issuer: "apiserver"
reject_unfloored_validity_timestamps: "false"
enable_issuing: "false"
enable_verification: "false"
enable_signing: "false"
allow_unsigned_issue_requests: "false"
allow_unsigned_verification_requests: "false"
allow_unsigned_signature_requests: "false"
authorized_idps:
authorized_sps:
authorized_sigclients:
client_names: | 10 | 0.344828 | 5 | 5 |
fa0a01b1310932a8482f6e2017e8a0373b45fdb6 | views/layout.haml | views/layout.haml | !!!
%html{:lang => 'en'}
%head
%title TreeStats
%link{:rel => "stylesheet", :type => "text/css", :href => "/styles.css" }
%link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", :rel => "stylesheet", :type => 'text/css'}
%body
%table
%tbody
%tr
%td{:colspan => 2}
%table
%tbody
%tr#header
%td#title
%h1
%a{:href => "/"} TreeStats
%td#misc= haml :misc
%tr
%td#search
= haml :_search
%td#download
Download:
%a{:href => "/download"} Latest Release
%tr.line
%td#nav
= haml :nav
%td#content
= yield
%tr
%td#footer.center{:colspan => 2} This website created with love by Kolth.
%td#footer.center{:colspan => 2} This website created with love by <a href="https://github.com/amoeba">Kolth</a>.
| !!!
%html{:lang => 'en'}
%head
%title TreeStats
%link{:rel => "stylesheet", :type => "text/css", :href => "/styles.css" }
%link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", :rel => "stylesheet", :type => 'text/css'}
%body
%table
%tbody
%tr
%td{:colspan => 2}
%table
%tbody
%tr#header
%td#title
%h1
%a{:href => "/"} TreeStats
%td#misc= haml :misc
%tr
%td#search
= haml :_search
%td#download
Download:
%a{:href => "/download"} Latest Release
%tr.line
%td#nav
= haml :nav
%td#content
= yield
%tr
%td#footer.center{:colspan => 2} This website created with love by <a href="https://github.com/amoeba">Kolth</a>.
| Add URL to my GH account in the footer | Add URL to my GH account in the footer
| Haml | mit | amoeba/treestats.net,amoeba/treestats.net,amoeba/treestats.net | haml | ## Code Before:
!!!
%html{:lang => 'en'}
%head
%title TreeStats
%link{:rel => "stylesheet", :type => "text/css", :href => "/styles.css" }
%link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", :rel => "stylesheet", :type => 'text/css'}
%body
%table
%tbody
%tr
%td{:colspan => 2}
%table
%tbody
%tr#header
%td#title
%h1
%a{:href => "/"} TreeStats
%td#misc= haml :misc
%tr
%td#search
= haml :_search
%td#download
Download:
%a{:href => "/download"} Latest Release
%tr.line
%td#nav
= haml :nav
%td#content
= yield
%tr
%td#footer.center{:colspan => 2} This website created with love by Kolth.
%td#footer.center{:colspan => 2} This website created with love by <a href="https://github.com/amoeba">Kolth</a>.
## Instruction:
Add URL to my GH account in the footer
## Code After:
!!!
%html{:lang => 'en'}
%head
%title TreeStats
%link{:rel => "stylesheet", :type => "text/css", :href => "/styles.css" }
%link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", :rel => "stylesheet", :type => 'text/css'}
%body
%table
%tbody
%tr
%td{:colspan => 2}
%table
%tbody
%tr#header
%td#title
%h1
%a{:href => "/"} TreeStats
%td#misc= haml :misc
%tr
%td#search
= haml :_search
%td#download
Download:
%a{:href => "/download"} Latest Release
%tr.line
%td#nav
= haml :nav
%td#content
= yield
%tr
%td#footer.center{:colspan => 2} This website created with love by <a href="https://github.com/amoeba">Kolth</a>.
| !!!
%html{:lang => 'en'}
%head
%title TreeStats
%link{:rel => "stylesheet", :type => "text/css", :href => "/styles.css" }
%link{:href => "https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700", :rel => "stylesheet", :type => 'text/css'}
%body
%table
%tbody
%tr
%td{:colspan => 2}
%table
%tbody
%tr#header
%td#title
%h1
%a{:href => "/"} TreeStats
%td#misc= haml :misc
%tr
%td#search
= haml :_search
%td#download
Download:
%a{:href => "/download"} Latest Release
%tr.line
%td#nav
= haml :nav
%td#content
= yield
%tr
- %td#footer.center{:colspan => 2} This website created with love by Kolth.
%td#footer.center{:colspan => 2} This website created with love by <a href="https://github.com/amoeba">Kolth</a>. | 1 | 0.028571 | 0 | 1 |
c0e7060a95e877564979a0d860985c583a044498 | pr_consistency/pr_checks.sh | pr_consistency/pr_checks.sh | if [[ -z $PR_PACKAGE ]]; then
package=astropy/astropy
else
package=${PR_PACKAGE}
fi
if [[ -z $CHANGELOG ]]; then
changelog=CHANGES.rst
else
changelog=${CHANGELOG}
fi
python 1.get_merged_prs.py ${package}
python 2.find_pr_branches.py ${package}
python 3.find_pr_changelog_section.py ${package} ${changelog}
python 4.check_consistency.py ${package} > consistency.html | if [[ -z $PR_PACKAGE ]]; then
package=astropy/astropy
else
package=${PR_PACKAGE}
fi
if [[ -z $CHANGELOG ]]; then
changelog=CHANGES.rst
else
changelog=${CHANGELOG}
fi
if [[ -z $PYEXEC ]]; then
pyexec=python
else
pyexec=${PYEXEC}
fi
pyexec 1.get_merged_prs.py ${package}
pyexec 2.find_pr_branches.py ${package}
pyexec 3.find_pr_changelog_section.py ${package} ${changelog}
pyexec 4.check_consistency.py ${package} > consistency.html
| Add option for alternate Python executable | Add option for alternate Python executable | Shell | bsd-3-clause | astropy/astropy-tools,astropy/astropy-tools | shell | ## Code Before:
if [[ -z $PR_PACKAGE ]]; then
package=astropy/astropy
else
package=${PR_PACKAGE}
fi
if [[ -z $CHANGELOG ]]; then
changelog=CHANGES.rst
else
changelog=${CHANGELOG}
fi
python 1.get_merged_prs.py ${package}
python 2.find_pr_branches.py ${package}
python 3.find_pr_changelog_section.py ${package} ${changelog}
python 4.check_consistency.py ${package} > consistency.html
## Instruction:
Add option for alternate Python executable
## Code After:
if [[ -z $PR_PACKAGE ]]; then
package=astropy/astropy
else
package=${PR_PACKAGE}
fi
if [[ -z $CHANGELOG ]]; then
changelog=CHANGES.rst
else
changelog=${CHANGELOG}
fi
if [[ -z $PYEXEC ]]; then
pyexec=python
else
pyexec=${PYEXEC}
fi
pyexec 1.get_merged_prs.py ${package}
pyexec 2.find_pr_branches.py ${package}
pyexec 3.find_pr_changelog_section.py ${package} ${changelog}
pyexec 4.check_consistency.py ${package} > consistency.html
| if [[ -z $PR_PACKAGE ]]; then
package=astropy/astropy
else
package=${PR_PACKAGE}
fi
if [[ -z $CHANGELOG ]]; then
changelog=CHANGES.rst
else
changelog=${CHANGELOG}
fi
+ if [[ -z $PYEXEC ]]; then
+ pyexec=python
+ else
+ pyexec=${PYEXEC}
+ fi
+
- python 1.get_merged_prs.py ${package}
? ^^^^
+ pyexec 1.get_merged_prs.py ${package}
? ^^^^
- python 2.find_pr_branches.py ${package}
? ^^^^
+ pyexec 2.find_pr_branches.py ${package}
? ^^^^
- python 3.find_pr_changelog_section.py ${package} ${changelog}
? ^^^^
+ pyexec 3.find_pr_changelog_section.py ${package} ${changelog}
? ^^^^
- python 4.check_consistency.py ${package} > consistency.html
? ^^^^
+ pyexec 4.check_consistency.py ${package} > consistency.html
? ^^^^
| 14 | 0.875 | 10 | 4 |
98ffd9d0aeadf895be50d102de28d380185cf696 | CMakeLists.txt | CMakeLists.txt | cmake_minimum_required(VERSION 2.8)
project(CppAnalyze)
find_package(LLVM)
if( NOT LLVM_FOUND )
message(FATAL_ERROR "LLVM package can't be found. Set CMAKE_PREFIX_PATH variable to LLVM's installation prefix.")
endif()
add_definitions(${LLVM_DEFINITIONS} -fno-rtti)
include_directories( ${LLVM_INCLUDE_DIRS} )
link_directories( ${LLVM_LIBRARY_DIRS} )
set(clang_used_libraries
clangFrontendTool
clangFrontend
clangDriver
clangSerialization
clangCodeGen
clangParse
clangSema
clangAnalysis
clangIndex
clangRewrite
clangAST
clangLex
clangBasic
)
add_library(cppanalyze SHARED "src/cppanalyze.cpp")
target_link_libraries(cppanalyze
${clang_used_libraries}
# XXX add find boost and clean that
boost_filesystem
)
| cmake_minimum_required(VERSION 2.8)
project(CppAnalyze)
find_package(LLVM)
if( NOT LLVM_FOUND )
message(FATAL_ERROR "LLVM package can't be found. Set CMAKE_PREFIX_PATH variable to LLVM's installation prefix.")
endif()
add_definitions(${LLVM_DEFINITIONS} -fno-rtti)
include_directories( ${LLVM_INCLUDE_DIRS} )
link_directories( ${LLVM_LIBRARY_DIRS} )
set(clang_used_libraries
clangFrontendTool
clangFrontend
clangDriver
clangSerialization
clangCodeGen
clangParse
clangSema
clangAnalysis
clangIndex
clangRewrite
clangAST
clangLex
clangBasic
)
set(SRC_DIR "src")
set(CPPANALYZE_SRC
${SRC_DIR}/cppanalyze.cpp
)
set(CPPANALYZE_HEADERS
${SRC_DIR}/rename_consumer.h
)
add_library(cppanalyze SHARED
${CPPANALYZE_SRC}
${CPPANALYZE_HEADERS}
)
target_link_libraries(cppanalyze
${clang_used_libraries}
# XXX add find boost and clean that
boost_filesystem
)
| Add header to the cmake project | Add header to the cmake project
| Text | mit | achauve/cppanalyze,achauve/cppanalyze,achauve/cppanalyze | text | ## Code Before:
cmake_minimum_required(VERSION 2.8)
project(CppAnalyze)
find_package(LLVM)
if( NOT LLVM_FOUND )
message(FATAL_ERROR "LLVM package can't be found. Set CMAKE_PREFIX_PATH variable to LLVM's installation prefix.")
endif()
add_definitions(${LLVM_DEFINITIONS} -fno-rtti)
include_directories( ${LLVM_INCLUDE_DIRS} )
link_directories( ${LLVM_LIBRARY_DIRS} )
set(clang_used_libraries
clangFrontendTool
clangFrontend
clangDriver
clangSerialization
clangCodeGen
clangParse
clangSema
clangAnalysis
clangIndex
clangRewrite
clangAST
clangLex
clangBasic
)
add_library(cppanalyze SHARED "src/cppanalyze.cpp")
target_link_libraries(cppanalyze
${clang_used_libraries}
# XXX add find boost and clean that
boost_filesystem
)
## Instruction:
Add header to the cmake project
## Code After:
cmake_minimum_required(VERSION 2.8)
project(CppAnalyze)
find_package(LLVM)
if( NOT LLVM_FOUND )
message(FATAL_ERROR "LLVM package can't be found. Set CMAKE_PREFIX_PATH variable to LLVM's installation prefix.")
endif()
add_definitions(${LLVM_DEFINITIONS} -fno-rtti)
include_directories( ${LLVM_INCLUDE_DIRS} )
link_directories( ${LLVM_LIBRARY_DIRS} )
set(clang_used_libraries
clangFrontendTool
clangFrontend
clangDriver
clangSerialization
clangCodeGen
clangParse
clangSema
clangAnalysis
clangIndex
clangRewrite
clangAST
clangLex
clangBasic
)
set(SRC_DIR "src")
set(CPPANALYZE_SRC
${SRC_DIR}/cppanalyze.cpp
)
set(CPPANALYZE_HEADERS
${SRC_DIR}/rename_consumer.h
)
add_library(cppanalyze SHARED
${CPPANALYZE_SRC}
${CPPANALYZE_HEADERS}
)
target_link_libraries(cppanalyze
${clang_used_libraries}
# XXX add find boost and clean that
boost_filesystem
)
| cmake_minimum_required(VERSION 2.8)
project(CppAnalyze)
find_package(LLVM)
if( NOT LLVM_FOUND )
message(FATAL_ERROR "LLVM package can't be found. Set CMAKE_PREFIX_PATH variable to LLVM's installation prefix.")
endif()
add_definitions(${LLVM_DEFINITIONS} -fno-rtti)
include_directories( ${LLVM_INCLUDE_DIRS} )
link_directories( ${LLVM_LIBRARY_DIRS} )
set(clang_used_libraries
clangFrontendTool
clangFrontend
clangDriver
clangSerialization
clangCodeGen
clangParse
clangSema
clangAnalysis
clangIndex
clangRewrite
clangAST
clangLex
clangBasic
)
+ set(SRC_DIR "src")
+ set(CPPANALYZE_SRC
+ ${SRC_DIR}/cppanalyze.cpp
+ )
+ set(CPPANALYZE_HEADERS
+ ${SRC_DIR}/rename_consumer.h
+ )
- add_library(cppanalyze SHARED "src/cppanalyze.cpp")
+
+ add_library(cppanalyze SHARED
+ ${CPPANALYZE_SRC}
+ ${CPPANALYZE_HEADERS}
+ )
target_link_libraries(cppanalyze
${clang_used_libraries}
# XXX add find boost and clean that
boost_filesystem
) | 13 | 0.333333 | 12 | 1 |
b25a454133455060ee49c329037ea5f685ba0370 | server/models/group.js | server/models/group.js | module.exports = (sequelize, DataTypes) => {
const Group = sequelize.define('Group', {
name: {
type: DataTypes.STRING,
allowNull: false,
},
description: {
type: DataTypes.STRING,
allowNull: false,
}
}, {
classMethods: {
associate: (models) => {
Group.hasMany(models.Message, {
foreignKey: 'groupId',
as: 'groupMesages',
});
Group.belongsToMany(models.User, {
as: 'Groups',
foreignKey: 'userId',
through: 'UserGroup',
});
},
},
});
return Group;
};
| module.exports = (sequelize, DataTypes) => {
const Group = sequelize.define('Group', {
name: {
type: DataTypes.STRING,
allowNull: false,
},
description: {
type: DataTypes.STRING,
allowNull: false,
}
});
Group.associate = (models) => {
Group.hasMany(models.Message, {
foreignKey: 'groupId',
as: 'groupMesages',
});
Group.belongsToMany(models.User, {
as: 'Groups',
foreignKey: 'userId',
through: 'UserGroup',
});
};
return Group;
};
| Refactor code using latest syntax | Refactor code using latest syntax
| JavaScript | mit | 3m3kalionel/PostIt,3m3kalionel/PostIt | javascript | ## Code Before:
module.exports = (sequelize, DataTypes) => {
const Group = sequelize.define('Group', {
name: {
type: DataTypes.STRING,
allowNull: false,
},
description: {
type: DataTypes.STRING,
allowNull: false,
}
}, {
classMethods: {
associate: (models) => {
Group.hasMany(models.Message, {
foreignKey: 'groupId',
as: 'groupMesages',
});
Group.belongsToMany(models.User, {
as: 'Groups',
foreignKey: 'userId',
through: 'UserGroup',
});
},
},
});
return Group;
};
## Instruction:
Refactor code using latest syntax
## Code After:
module.exports = (sequelize, DataTypes) => {
const Group = sequelize.define('Group', {
name: {
type: DataTypes.STRING,
allowNull: false,
},
description: {
type: DataTypes.STRING,
allowNull: false,
}
});
Group.associate = (models) => {
Group.hasMany(models.Message, {
foreignKey: 'groupId',
as: 'groupMesages',
});
Group.belongsToMany(models.User, {
as: 'Groups',
foreignKey: 'userId',
through: 'UserGroup',
});
};
return Group;
};
| module.exports = (sequelize, DataTypes) => {
const Group = sequelize.define('Group', {
name: {
type: DataTypes.STRING,
allowNull: false,
},
description: {
type: DataTypes.STRING,
allowNull: false,
}
- }, {
- classMethods: {
- associate: (models) => {
- Group.hasMany(models.Message, {
- foreignKey: 'groupId',
- as: 'groupMesages',
- });
- Group.belongsToMany(models.User, {
- as: 'Groups',
- foreignKey: 'userId',
- through: 'UserGroup',
- });
- },
- },
});
+ Group.associate = (models) => {
+ Group.hasMany(models.Message, {
+ foreignKey: 'groupId',
+ as: 'groupMesages',
+ });
+ Group.belongsToMany(models.User, {
+ as: 'Groups',
+ foreignKey: 'userId',
+ through: 'UserGroup',
+ });
+ };
return Group;
}; | 25 | 0.925926 | 11 | 14 |
8ca09fda641f314f6507560addab6a544a2c3a0e | scripts/ensure-compatible-npm.sh | scripts/ensure-compatible-npm.sh |
set -o nounset
set -o errexit
npm install semver
if node -e "process.exit(require('semver').lt(process.argv[1], '1.3.7') ? 0 : 1)" $(npm -v); then
npm install -g npm@'>= 1.3.7'
fi
npm uninstall semver
|
set -o nounset
set -o errexit
npm install semver
if node -e "process.exit(require('semver').lt(process.argv[1], '1.3.7') ? 0 : 1)" $(npm -v); then
npm install -g npm@2
npm install -g npm
fi
npm uninstall semver
| Fix node 0.8 blowing up upgrading npm 1 -> 3 | Fix node 0.8 blowing up upgrading npm 1 -> 3
Relevant: https://github.com/npm/npm/issues/9668 | Shell | mit | GerHobbelt/mocha,aaroncrows/mocha,Khan/mocha,santiagoaguiar/mocha,GerHobbelt/mocha,pumpupapp/mocha,moander/mocha,nexdrew/mocha,ryanshawty/mocha,beatfactor/mocha,sul4bh/mocha,hashcube/mocha,jasonkarns/mocha,igwejk/mocha,beatfactor/mocha,Hacker0x01/mocha,rlugojr/mocha,santiagoaguiar/mocha,sul4bh/mocha,hoverduck/mocha,hoverduck/mocha,upfrontIO/mocha,gaye/mocha,node-rookie/mocha,villesau/mocha,beni55/mocha,ryanshawty/mocha,JohnnyEstilles/mocha,beatfactor/mocha,jjoos/mocha,Shyp/mocha,ryanshawty/mocha,ELLIOTTCABLE/mocha,boneskull/mocha,cleberar38/mocha,nexdrew/mocha,villesau/mocha,jasonkarns/mocha,upfrontIO/mocha,apkiernan/mocha,Shyp/mocha,apkiernan/mocha,menelaos/mocha-solarized,boneskull/mocha,imsobear/mocha,rlugojr/mocha,adamgruber/mocha,rlugojr/mocha,tswaters/mocha,beni55/mocha,netei/mocha,jjoos/mocha,menelaos/mocha-solarized,GerHobbelt/mocha,verkkokauppacom/mocha,KevinTCoughlin/mocha,beni55/mocha,node-rookie/mocha,node-rookie/mocha,adamgruber/mocha,upfrontIO/mocha,hashcube/mocha,aaroncrows/mocha,hoverduck/mocha,verkkokauppacom/mocha,nightwatchjs/mocha-nightwatch,Khan/mocha,ELLIOTTCABLE/mocha,outsideris/mocha,pumpupapp/mocha,adamgruber/mocha,mochajs/mocha,pumpupapp/mocha,hoverduck/mocha,menelaos/mocha-solarized,KevinTCoughlin/mocha,sul4bh/mocha,tinganho/mocha,Khan/mocha,moander/mocha,tinganho/mocha,jasonkarns/mocha,gaye/mocha,tswaters/mocha,igwejk/mocha,nightwatchjs/mocha-nightwatch,nightwatchjs/mocha-nightwatch,apkiernan/mocha,verkkokauppacom/mocha,tswaters/mocha,Hacker0x01/mocha,aaroncrows/mocha,cleberar38/mocha,JohnnyEstilles/mocha,outsideris/mocha,gaye/mocha,imsobear/mocha,mochajs/mocha,Hacker0x01/mocha,moander/mocha,boneskull/mocha,villesau/mocha,santiagoaguiar/mocha,imsobear/mocha,KevinTCoughlin/mocha,JohnnyEstilles/mocha,netei/mocha,Shyp/mocha,mochajs/mocha,jjoos/mocha,netei/mocha,hashcube/mocha,tinganho/mocha,ELLIOTTCABLE/mocha,nexdrew/mocha,cleberar38/mocha | shell | ## Code Before:
set -o nounset
set -o errexit
npm install semver
if node -e "process.exit(require('semver').lt(process.argv[1], '1.3.7') ? 0 : 1)" $(npm -v); then
npm install -g npm@'>= 1.3.7'
fi
npm uninstall semver
## Instruction:
Fix node 0.8 blowing up upgrading npm 1 -> 3
Relevant: https://github.com/npm/npm/issues/9668
## Code After:
set -o nounset
set -o errexit
npm install semver
if node -e "process.exit(require('semver').lt(process.argv[1], '1.3.7') ? 0 : 1)" $(npm -v); then
npm install -g npm@2
npm install -g npm
fi
npm uninstall semver
|
set -o nounset
set -o errexit
npm install semver
if node -e "process.exit(require('semver').lt(process.argv[1], '1.3.7') ? 0 : 1)" $(npm -v); then
- npm install -g npm@'>= 1.3.7'
? ^^^^^^^^^^
+ npm install -g npm@2
? ^
+ npm install -g npm
fi
npm uninstall semver | 3 | 0.333333 | 2 | 1 |
19458f9bab3d5e303f074a7bd641ef90491795e6 | src/sortablejs-options.ts | src/sortablejs-options.ts | export interface SortablejsOptions {
group?: string | {
name?: string;
pull?: boolean | 'clone' | Function;
put?: boolean | string[] | Function;
revertClone?: boolean;
};
sort?: boolean;
delay?: number;
disabled?: boolean;
store?: {
get: (sortable: any) => any[];
set: (sortable: any) => any;
};
animation?: number;
handle?: string;
filter?: any;
draggable?: string;
ghostClass?: string;
chosenClass?: string;
dataIdAttr?: string;
forceFallback?: boolean;
fallbackClass?: string;
fallbackOnBody?: boolean;
scroll?: boolean | HTMLElement;
scrollSensitivity?: number;
scrollSpeed?: number;
preventOnFilter?: boolean;
dragClass?: string;
fallbackTolerance?: number;
setData?: (dataTransfer: any, draggedElement: any) => any;
onStart?: (event: any) => any;
onEnd?: (event: any) => any;
onAdd?: (event: any) => any;
onAddOriginal?: (event: any) => any;
onUpdate?: (event: any) => any;
onSort?: (event: any) => any;
onRemove?: (event: any) => any;
onFilter?: (event: any) => any;
onMove?: (event: any) => boolean;
scrollFn?: (offsetX: any, offsetY: any, originalEvent: any) => any;
onChoose?: (event: any) => any;
onClone?: (event: any) => any;
}
| export interface SortablejsOptions {
group?: string | {
name?: string;
pull?: boolean | 'clone' | Function;
put?: boolean | string[] | Function;
revertClone?: boolean;
};
sort?: boolean;
delay?: number;
disabled?: boolean;
store?: {
get: (sortable: any) => any[];
set: (sortable: any) => any;
};
animation?: number;
handle?: string;
filter?: any;
draggable?: string;
ghostClass?: string;
chosenClass?: string;
dataIdAttr?: string;
forceFallback?: boolean;
fallbackClass?: string;
fallbackOnBody?: boolean;
scroll?: boolean | HTMLElement;
scrollSensitivity?: number;
scrollSpeed?: number;
preventOnFilter?: boolean;
dragClass?: string;
fallbackTolerance?: number;
setData?: (dataTransfer: any, draggedElement: any) => any;
onStart?: (event: any) => any;
onEnd?: (event: any) => any;
onAdd?: (event: any) => any;
onAddOriginal?: (event: any) => any;
onUpdate?: (event: any) => any;
onSort?: (event: any) => any;
onRemove?: (event: any) => any;
onFilter?: (event: any) => any;
onMove?: (event: any) => boolean;
scrollFn?: (offsetX: any, offsetY: any, originalEvent: any) => any;
onChoose?: (event: any) => any;
onUnchoose?: (event: any) => any;
onClone?: (event: any) => any;
}
| Add onUnchoose method to options interface. | Add onUnchoose method to options interface.
Related PR: https://github.com/RubaXa/Sortable/pull/1033 | TypeScript | mit | SortableJS/angular-sortablejs | typescript | ## Code Before:
export interface SortablejsOptions {
group?: string | {
name?: string;
pull?: boolean | 'clone' | Function;
put?: boolean | string[] | Function;
revertClone?: boolean;
};
sort?: boolean;
delay?: number;
disabled?: boolean;
store?: {
get: (sortable: any) => any[];
set: (sortable: any) => any;
};
animation?: number;
handle?: string;
filter?: any;
draggable?: string;
ghostClass?: string;
chosenClass?: string;
dataIdAttr?: string;
forceFallback?: boolean;
fallbackClass?: string;
fallbackOnBody?: boolean;
scroll?: boolean | HTMLElement;
scrollSensitivity?: number;
scrollSpeed?: number;
preventOnFilter?: boolean;
dragClass?: string;
fallbackTolerance?: number;
setData?: (dataTransfer: any, draggedElement: any) => any;
onStart?: (event: any) => any;
onEnd?: (event: any) => any;
onAdd?: (event: any) => any;
onAddOriginal?: (event: any) => any;
onUpdate?: (event: any) => any;
onSort?: (event: any) => any;
onRemove?: (event: any) => any;
onFilter?: (event: any) => any;
onMove?: (event: any) => boolean;
scrollFn?: (offsetX: any, offsetY: any, originalEvent: any) => any;
onChoose?: (event: any) => any;
onClone?: (event: any) => any;
}
## Instruction:
Add onUnchoose method to options interface.
Related PR: https://github.com/RubaXa/Sortable/pull/1033
## Code After:
export interface SortablejsOptions {
group?: string | {
name?: string;
pull?: boolean | 'clone' | Function;
put?: boolean | string[] | Function;
revertClone?: boolean;
};
sort?: boolean;
delay?: number;
disabled?: boolean;
store?: {
get: (sortable: any) => any[];
set: (sortable: any) => any;
};
animation?: number;
handle?: string;
filter?: any;
draggable?: string;
ghostClass?: string;
chosenClass?: string;
dataIdAttr?: string;
forceFallback?: boolean;
fallbackClass?: string;
fallbackOnBody?: boolean;
scroll?: boolean | HTMLElement;
scrollSensitivity?: number;
scrollSpeed?: number;
preventOnFilter?: boolean;
dragClass?: string;
fallbackTolerance?: number;
setData?: (dataTransfer: any, draggedElement: any) => any;
onStart?: (event: any) => any;
onEnd?: (event: any) => any;
onAdd?: (event: any) => any;
onAddOriginal?: (event: any) => any;
onUpdate?: (event: any) => any;
onSort?: (event: any) => any;
onRemove?: (event: any) => any;
onFilter?: (event: any) => any;
onMove?: (event: any) => boolean;
scrollFn?: (offsetX: any, offsetY: any, originalEvent: any) => any;
onChoose?: (event: any) => any;
onUnchoose?: (event: any) => any;
onClone?: (event: any) => any;
}
| export interface SortablejsOptions {
group?: string | {
name?: string;
pull?: boolean | 'clone' | Function;
put?: boolean | string[] | Function;
revertClone?: boolean;
};
sort?: boolean;
delay?: number;
disabled?: boolean;
store?: {
get: (sortable: any) => any[];
set: (sortable: any) => any;
};
animation?: number;
handle?: string;
filter?: any;
draggable?: string;
ghostClass?: string;
chosenClass?: string;
dataIdAttr?: string;
forceFallback?: boolean;
fallbackClass?: string;
fallbackOnBody?: boolean;
scroll?: boolean | HTMLElement;
scrollSensitivity?: number;
scrollSpeed?: number;
preventOnFilter?: boolean;
dragClass?: string;
fallbackTolerance?: number;
setData?: (dataTransfer: any, draggedElement: any) => any;
onStart?: (event: any) => any;
onEnd?: (event: any) => any;
onAdd?: (event: any) => any;
onAddOriginal?: (event: any) => any;
onUpdate?: (event: any) => any;
onSort?: (event: any) => any;
onRemove?: (event: any) => any;
onFilter?: (event: any) => any;
onMove?: (event: any) => boolean;
scrollFn?: (offsetX: any, offsetY: any, originalEvent: any) => any;
onChoose?: (event: any) => any;
+ onUnchoose?: (event: any) => any;
onClone?: (event: any) => any;
} | 1 | 0.022727 | 1 | 0 |
022a4e4efa6326a35539a5a7d1225d539ca4fd04 | README.md | README.md |
iOS App for group project
|
iOS App for group project
## User stories
The following user stories are non-negotiable
- [-] Users can upload and browse their clothes (metadata could include color, event type, hot/warm/cool/cold usage, collar, sleeve length, etc.)
- [-] App suggests what to wear based on coordination of color/pattern, warm/cold, formality
- [-] Facebook authentication
The following should be clarified. Put your name in the appropriate box to indicate your support.
App supports as many accessory types as we can think of [E] Yes [ ] No
The following user stories are votable
**Request**
Please try to limit your votes to 8 or fewer items. In our first pass we may not be able to accomplish much and we'll likely need to prioritize from a rather short list. Some of the below may also have been assumed in our discussion of the above. If so we should discuss clarifying the above points.
- [E] User can search clothing by keyword (color, category, etc.)
- [E] User can build an outfit around an article or articles of clothing
- [E] Users can categorize their clothes by closets/wardrobes/etc. (same clothes can be in different groupings)
- [ ] App suggestion based on forecasted weather (as opposed to user-entered preference)
- [ ] App suggestion based on article usage rate
- [E] App suggestion based on shared outfit (for coordination)
- [E] User can accept/reject individual articles in suggestions, gets new recommendations
- [ ] User can specify their temperature perceptions to be used when they finding warm/cool clothing for temperature-based search
- [E] User can share their closets/wardrobes/outfits/calendar (stuff) with friends
- [E] User can schedule what they'll wear into a calendar
- [ ] User can rate their clothes/outfits
- [ ] User can track their hamper status
- [E] User can request feedback for outfit (proposed outfit, or wants to find suggestions) from community/friends
- [ ] User can say where they bought their shirt, how much, etc.
- [ ] Monetization through advertising and/or other methods
- [ ] App can suggest clothes to buy based on lack of matches
| Update to add user stories | Update to add user stories
| Markdown | apache-2.0 | cpoutfitters/cpoutfitters,cpoutfitters/cpoutfitters | markdown | ## Code Before:
iOS App for group project
## Instruction:
Update to add user stories
## Code After:
iOS App for group project
## User stories
The following user stories are non-negotiable
- [-] Users can upload and browse their clothes (metadata could include color, event type, hot/warm/cool/cold usage, collar, sleeve length, etc.)
- [-] App suggests what to wear based on coordination of color/pattern, warm/cold, formality
- [-] Facebook authentication
The following should be clarified. Put your name in the appropriate box to indicate your support.
App supports as many accessory types as we can think of [E] Yes [ ] No
The following user stories are votable
**Request**
Please try to limit your votes to 8 or fewer items. In our first pass we may not be able to accomplish much and we'll likely need to prioritize from a rather short list. Some of the below may also have been assumed in our discussion of the above. If so we should discuss clarifying the above points.
- [E] User can search clothing by keyword (color, category, etc.)
- [E] User can build an outfit around an article or articles of clothing
- [E] Users can categorize their clothes by closets/wardrobes/etc. (same clothes can be in different groupings)
- [ ] App suggestion based on forecasted weather (as opposed to user-entered preference)
- [ ] App suggestion based on article usage rate
- [E] App suggestion based on shared outfit (for coordination)
- [E] User can accept/reject individual articles in suggestions, gets new recommendations
- [ ] User can specify their temperature perceptions to be used when they finding warm/cool clothing for temperature-based search
- [E] User can share their closets/wardrobes/outfits/calendar (stuff) with friends
- [E] User can schedule what they'll wear into a calendar
- [ ] User can rate their clothes/outfits
- [ ] User can track their hamper status
- [E] User can request feedback for outfit (proposed outfit, or wants to find suggestions) from community/friends
- [ ] User can say where they bought their shirt, how much, etc.
- [ ] Monetization through advertising and/or other methods
- [ ] App can suggest clothes to buy based on lack of matches
|
iOS App for group project
+
+
+ ## User stories
+
+ The following user stories are non-negotiable
+ - [-] Users can upload and browse their clothes (metadata could include color, event type, hot/warm/cool/cold usage, collar, sleeve length, etc.)
+ - [-] App suggests what to wear based on coordination of color/pattern, warm/cold, formality
+ - [-] Facebook authentication
+
+ The following should be clarified. Put your name in the appropriate box to indicate your support.
+ App supports as many accessory types as we can think of [E] Yes [ ] No
+
+ The following user stories are votable
+
+ **Request**
+ Please try to limit your votes to 8 or fewer items. In our first pass we may not be able to accomplish much and we'll likely need to prioritize from a rather short list. Some of the below may also have been assumed in our discussion of the above. If so we should discuss clarifying the above points.
+
+ - [E] User can search clothing by keyword (color, category, etc.)
+ - [E] User can build an outfit around an article or articles of clothing
+ - [E] Users can categorize their clothes by closets/wardrobes/etc. (same clothes can be in different groupings)
+ - [ ] App suggestion based on forecasted weather (as opposed to user-entered preference)
+ - [ ] App suggestion based on article usage rate
+ - [E] App suggestion based on shared outfit (for coordination)
+ - [E] User can accept/reject individual articles in suggestions, gets new recommendations
+ - [ ] User can specify their temperature perceptions to be used when they finding warm/cool clothing for temperature-based search
+ - [E] User can share their closets/wardrobes/outfits/calendar (stuff) with friends
+ - [E] User can schedule what they'll wear into a calendar
+ - [ ] User can rate their clothes/outfits
+ - [ ] User can track their hamper status
+ - [E] User can request feedback for outfit (proposed outfit, or wants to find suggestions) from community/friends
+ - [ ] User can say where they bought their shirt, how much, etc.
+ - [ ] Monetization through advertising and/or other methods
+ - [ ] App can suggest clothes to buy based on lack of matches
+ | 34 | 17 | 34 | 0 |
e0f83b2df9efd6cce17374f4681def98b0d31704 | package.json | package.json | {
"name": "es6-js-helper-functions",
"version": "1.0.0",
"description": "Helper classes and functions to provide functionality for common operations written in ES6",
"main": "index.js",
"scripts": {
"test": "mocha --compilers js:babel-core/register test/*.js",
"build": "eslint src/*.js test/*.js && mocha && babel src -d dist",
"lint": "eslint src/*.js test/*.js",
"lint-fix": "eslint --fix gulpfile.js src/*.js test/*.js"
},
"repository": {
"type": "git",
"url": "https://github.com/keenanamigos/es6-js-helper-functions.git"
},
"author": "keenan johnson",
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-preset-env": "^1.6.0",
"chai": "^4.1.1",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.0",
"gulp-print": "^2.0.1",
"mocha": "^3.5.0"
},
"dependencies": {
"eslint": "^4.12.0"
}
}
| {
"name": "es6-js-helper-functions",
"version": "1.0.0",
"description": "Helper classes and functions to provide functionality for common operations written in ES6",
"main": "index.js",
"scripts": {
"test": "mocha --compilers js:babel-core/register",
"build": "eslint src/*.js test/*.js && mocha --compilers js:babel-core/register && babel src -d dist",
"lint": "eslint src/*.js test/*.js",
"lint-fix": "eslint --fix gulpfile.js src/*.js test/*.js"
},
"repository": {
"type": "git",
"url": "https://github.com/keenanamigos/es6-js-helper-functions.git"
},
"author": "keenan johnson",
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-preset-env": "^1.6.0",
"chai": "^4.1.1",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.0",
"gulp-print": "^2.0.1",
"mocha": "^3.5.0"
},
"dependencies": {
"eslint": "^4.12.0"
}
}
| Update npm test command to omit unnecessary directory path | Update npm test command to omit unnecessary directory path
| JSON | mit | keenanamigos/es6-js-helper-functions | json | ## Code Before:
{
"name": "es6-js-helper-functions",
"version": "1.0.0",
"description": "Helper classes and functions to provide functionality for common operations written in ES6",
"main": "index.js",
"scripts": {
"test": "mocha --compilers js:babel-core/register test/*.js",
"build": "eslint src/*.js test/*.js && mocha && babel src -d dist",
"lint": "eslint src/*.js test/*.js",
"lint-fix": "eslint --fix gulpfile.js src/*.js test/*.js"
},
"repository": {
"type": "git",
"url": "https://github.com/keenanamigos/es6-js-helper-functions.git"
},
"author": "keenan johnson",
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-preset-env": "^1.6.0",
"chai": "^4.1.1",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.0",
"gulp-print": "^2.0.1",
"mocha": "^3.5.0"
},
"dependencies": {
"eslint": "^4.12.0"
}
}
## Instruction:
Update npm test command to omit unnecessary directory path
## Code After:
{
"name": "es6-js-helper-functions",
"version": "1.0.0",
"description": "Helper classes and functions to provide functionality for common operations written in ES6",
"main": "index.js",
"scripts": {
"test": "mocha --compilers js:babel-core/register",
"build": "eslint src/*.js test/*.js && mocha --compilers js:babel-core/register && babel src -d dist",
"lint": "eslint src/*.js test/*.js",
"lint-fix": "eslint --fix gulpfile.js src/*.js test/*.js"
},
"repository": {
"type": "git",
"url": "https://github.com/keenanamigos/es6-js-helper-functions.git"
},
"author": "keenan johnson",
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-preset-env": "^1.6.0",
"chai": "^4.1.1",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.0",
"gulp-print": "^2.0.1",
"mocha": "^3.5.0"
},
"dependencies": {
"eslint": "^4.12.0"
}
}
| {
"name": "es6-js-helper-functions",
"version": "1.0.0",
"description": "Helper classes and functions to provide functionality for common operations written in ES6",
"main": "index.js",
"scripts": {
- "test": "mocha --compilers js:babel-core/register test/*.js",
? ----------
+ "test": "mocha --compilers js:babel-core/register",
- "build": "eslint src/*.js test/*.js && mocha && babel src -d dist",
+ "build": "eslint src/*.js test/*.js && mocha --compilers js:babel-core/register && babel src -d dist",
? +++++++++++++++++++++++++++++++++++
"lint": "eslint src/*.js test/*.js",
"lint-fix": "eslint --fix gulpfile.js src/*.js test/*.js"
},
"repository": {
"type": "git",
"url": "https://github.com/keenanamigos/es6-js-helper-functions.git"
},
"author": "keenan johnson",
"license": "MIT",
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-preset-env": "^1.6.0",
"chai": "^4.1.1",
"gulp": "^3.9.1",
"gulp-babel": "^7.0.0",
"gulp-print": "^2.0.1",
"mocha": "^3.5.0"
},
"dependencies": {
"eslint": "^4.12.0"
}
} | 4 | 0.133333 | 2 | 2 |
4ddaa88b3a90ead90a74251660af27f33c1ffdc6 | package.json | package.json | {
"name": "@watson-virtual-agent/client-sdk",
"version": "1.0.2",
"description": "JS Client SDK for IBM Watson Virtual Agents",
"main": "index.js",
"scripts": {
"build": "jsdoc2md \"src/sdk.js\" > docs/JSDOCS.md && npm run build-web && npm run build-node",
"build-web": "webpack --config ./config/web.js",
"watch-web": "webpack --config ./config/web.js --watch",
"build-node": "webpack --config ./config/node.js",
"watch-node": "webpack --config ./config/node.js --watch",
"publish": "npm run build && npm publish",
"test": "echo \"No Tests\""
},
"keywords": [
"IBM",
"Watson",
"Watson Virtual Agent"
],
"author": "IBM Corp",
"license": "Apache-2.0",
"dependencies": {
"axios": "0.12.0",
"es6-promise": "3.2.1",
"lodash.assign": "4.1.0"
},
"devDependencies": {
"eslint": "3.0.0",
"eslint-loader": "1.4.0",
"inquirer": "1.1.1",
"jsdoc-to-markdown": "1.3.7",
"json-loader": "0.5.4",
"webpack": "1.13.1"
}
}
| {
"name": "@watson-virtual-agent/client-sdk",
"version": "1.0.2",
"description": "JS Client SDK for IBM Watson Virtual Agents",
"main": "index.js",
"scripts": {
"build": "jsdoc2md \"src/sdk.js\" > docs/JSDOCS.md && npm run build-web && npm run build-node",
"build-web": "webpack --config ./config/web.js",
"watch-web": "webpack --config ./config/web.js --watch",
"build-node": "webpack --config ./config/node.js",
"watch-node": "webpack --config ./config/node.js --watch",
"prepublish": "npm run build",
"test": "echo \"No Tests\""
},
"keywords": [
"IBM",
"Watson",
"Watson Virtual Agent"
],
"author": "IBM Corp",
"license": "Apache-2.0",
"dependencies": {
"axios": "0.12.0",
"es6-promise": "3.2.1",
"lodash.assign": "4.1.0"
},
"devDependencies": {
"eslint": "3.0.0",
"eslint-loader": "1.4.0",
"inquirer": "1.1.1",
"jsdoc-to-markdown": "1.3.7",
"json-loader": "0.5.4",
"webpack": "1.13.1"
}
}
| Use prepublish script to build correctly. | Use prepublish script to build correctly.
| JSON | apache-2.0 | watson-virtual-agents/client-sdk | json | ## Code Before:
{
"name": "@watson-virtual-agent/client-sdk",
"version": "1.0.2",
"description": "JS Client SDK for IBM Watson Virtual Agents",
"main": "index.js",
"scripts": {
"build": "jsdoc2md \"src/sdk.js\" > docs/JSDOCS.md && npm run build-web && npm run build-node",
"build-web": "webpack --config ./config/web.js",
"watch-web": "webpack --config ./config/web.js --watch",
"build-node": "webpack --config ./config/node.js",
"watch-node": "webpack --config ./config/node.js --watch",
"publish": "npm run build && npm publish",
"test": "echo \"No Tests\""
},
"keywords": [
"IBM",
"Watson",
"Watson Virtual Agent"
],
"author": "IBM Corp",
"license": "Apache-2.0",
"dependencies": {
"axios": "0.12.0",
"es6-promise": "3.2.1",
"lodash.assign": "4.1.0"
},
"devDependencies": {
"eslint": "3.0.0",
"eslint-loader": "1.4.0",
"inquirer": "1.1.1",
"jsdoc-to-markdown": "1.3.7",
"json-loader": "0.5.4",
"webpack": "1.13.1"
}
}
## Instruction:
Use prepublish script to build correctly.
## Code After:
{
"name": "@watson-virtual-agent/client-sdk",
"version": "1.0.2",
"description": "JS Client SDK for IBM Watson Virtual Agents",
"main": "index.js",
"scripts": {
"build": "jsdoc2md \"src/sdk.js\" > docs/JSDOCS.md && npm run build-web && npm run build-node",
"build-web": "webpack --config ./config/web.js",
"watch-web": "webpack --config ./config/web.js --watch",
"build-node": "webpack --config ./config/node.js",
"watch-node": "webpack --config ./config/node.js --watch",
"prepublish": "npm run build",
"test": "echo \"No Tests\""
},
"keywords": [
"IBM",
"Watson",
"Watson Virtual Agent"
],
"author": "IBM Corp",
"license": "Apache-2.0",
"dependencies": {
"axios": "0.12.0",
"es6-promise": "3.2.1",
"lodash.assign": "4.1.0"
},
"devDependencies": {
"eslint": "3.0.0",
"eslint-loader": "1.4.0",
"inquirer": "1.1.1",
"jsdoc-to-markdown": "1.3.7",
"json-loader": "0.5.4",
"webpack": "1.13.1"
}
}
| {
"name": "@watson-virtual-agent/client-sdk",
"version": "1.0.2",
"description": "JS Client SDK for IBM Watson Virtual Agents",
"main": "index.js",
"scripts": {
"build": "jsdoc2md \"src/sdk.js\" > docs/JSDOCS.md && npm run build-web && npm run build-node",
"build-web": "webpack --config ./config/web.js",
"watch-web": "webpack --config ./config/web.js --watch",
"build-node": "webpack --config ./config/node.js",
"watch-node": "webpack --config ./config/node.js --watch",
- "publish": "npm run build && npm publish",
? ---------------
+ "prepublish": "npm run build",
? +++
"test": "echo \"No Tests\""
},
"keywords": [
"IBM",
"Watson",
"Watson Virtual Agent"
],
"author": "IBM Corp",
"license": "Apache-2.0",
"dependencies": {
"axios": "0.12.0",
"es6-promise": "3.2.1",
"lodash.assign": "4.1.0"
},
"devDependencies": {
"eslint": "3.0.0",
"eslint-loader": "1.4.0",
"inquirer": "1.1.1",
"jsdoc-to-markdown": "1.3.7",
"json-loader": "0.5.4",
"webpack": "1.13.1"
}
} | 2 | 0.057143 | 1 | 1 |
e06b714bce89f2ba2f389cc07699fcc3e9f58524 | metal-sys/src/protocols/mtl_command_buffer.rs | metal-sys/src/protocols/mtl_command_buffer.rs | use cocoa::base::id;
pub trait MTLCommandBuffer {
}
impl MTLCommandBuffer for id {
}
| use cocoa::base::id;
pub trait MTLCommandBuffer {
fn renderCommandEncoderWithDescriptor(self, renderPassDescriptor: id) -> id;
}
impl MTLCommandBuffer for id {
}
| Add MTLCommandBuffer::renderCommandEncoderWithDescriptor to MTLCommandBuffer trait def | Add MTLCommandBuffer::renderCommandEncoderWithDescriptor to MTLCommandBuffer trait def
| Rust | apache-2.0 | burtonageo/metl | rust | ## Code Before:
use cocoa::base::id;
pub trait MTLCommandBuffer {
}
impl MTLCommandBuffer for id {
}
## Instruction:
Add MTLCommandBuffer::renderCommandEncoderWithDescriptor to MTLCommandBuffer trait def
## Code After:
use cocoa::base::id;
pub trait MTLCommandBuffer {
fn renderCommandEncoderWithDescriptor(self, renderPassDescriptor: id) -> id;
}
impl MTLCommandBuffer for id {
}
| use cocoa::base::id;
pub trait MTLCommandBuffer {
-
+ fn renderCommandEncoderWithDescriptor(self, renderPassDescriptor: id) -> id;
}
impl MTLCommandBuffer for id {
} | 2 | 0.222222 | 1 | 1 |
e0de6546fb58af113d18cf7e836407e3f8a1a985 | contrib/bosco/bosco-cluster-remote-hosts.py | contrib/bosco/bosco-cluster-remote-hosts.py |
import os
import subprocess
import sys
try:
import classad
import htcondor
except ImportError:
sys.exit("ERROR: Could not load HTCondor Python bindings. "
"Ensure the 'htcondor' and 'classad' are in PYTHONPATH")
jre = classad.parseAds('JOB_ROUTER_ENTRIES')
grs = ( x["GridResource"] for x in jre )
rhosts = ( x.split()[1:3] for x in grs )
for batchtype, rhost in rhosts:
subprocess.call(['bosco_cluster', '-o', os.getenv("OVERRIDE_DIR"),
rhost, batchtype])
|
import os
import subprocess
import sys
try:
import classad
except ImportError:
sys.exit("ERROR: Could not load HTCondor Python bindings. "
"Ensure the 'htcondor' and 'classad' are in PYTHONPATH")
jre = classad.parseAds('JOB_ROUTER_ENTRIES')
grs = ( x["GridResource"] for x in jre )
rhosts = ( x.split()[1:3] for x in grs )
for batchtype, rhost in rhosts:
subprocess.call(['bosco_cluster', '-o', os.getenv("OVERRIDE_DIR"),
rhost, batchtype])
| Delete unused import htcondor (SOFTWARE-4687) | Delete unused import htcondor (SOFTWARE-4687)
| Python | apache-2.0 | brianhlin/htcondor-ce,matyasselmeci/htcondor-ce,matyasselmeci/htcondor-ce,brianhlin/htcondor-ce,matyasselmeci/htcondor-ce,brianhlin/htcondor-ce | python | ## Code Before:
import os
import subprocess
import sys
try:
import classad
import htcondor
except ImportError:
sys.exit("ERROR: Could not load HTCondor Python bindings. "
"Ensure the 'htcondor' and 'classad' are in PYTHONPATH")
jre = classad.parseAds('JOB_ROUTER_ENTRIES')
grs = ( x["GridResource"] for x in jre )
rhosts = ( x.split()[1:3] for x in grs )
for batchtype, rhost in rhosts:
subprocess.call(['bosco_cluster', '-o', os.getenv("OVERRIDE_DIR"),
rhost, batchtype])
## Instruction:
Delete unused import htcondor (SOFTWARE-4687)
## Code After:
import os
import subprocess
import sys
try:
import classad
except ImportError:
sys.exit("ERROR: Could not load HTCondor Python bindings. "
"Ensure the 'htcondor' and 'classad' are in PYTHONPATH")
jre = classad.parseAds('JOB_ROUTER_ENTRIES')
grs = ( x["GridResource"] for x in jre )
rhosts = ( x.split()[1:3] for x in grs )
for batchtype, rhost in rhosts:
subprocess.call(['bosco_cluster', '-o', os.getenv("OVERRIDE_DIR"),
rhost, batchtype])
|
import os
import subprocess
import sys
try:
import classad
- import htcondor
except ImportError:
sys.exit("ERROR: Could not load HTCondor Python bindings. "
"Ensure the 'htcondor' and 'classad' are in PYTHONPATH")
jre = classad.parseAds('JOB_ROUTER_ENTRIES')
grs = ( x["GridResource"] for x in jre )
rhosts = ( x.split()[1:3] for x in grs )
for batchtype, rhost in rhosts:
subprocess.call(['bosco_cluster', '-o', os.getenv("OVERRIDE_DIR"),
rhost, batchtype])
| 1 | 0.05 | 0 | 1 |
0012fdc1c445fbfe4f7c4b25d06359357a8bb89b | server/src/main/java/de/fau/amos/virtualledger/server/banking/adorsys/api/BankingApiConfiguration.java | server/src/main/java/de/fau/amos/virtualledger/server/banking/adorsys/api/BankingApiConfiguration.java | package de.fau.amos.virtualledger.server.banking.adorsys.api;
import org.springframework.stereotype.Component;
/**
* Class that holds all configuration required for the banking api access
* examples: URL of the banking api, dummy configuration, ...
*/
@Component
public class BankingApiConfiguration {
private final String bankingApiUrlAbsolute = "https://multibanking-service.dev.adorsys.de:443/api/v1/";
private final String bankAccessApiUrlRelative = "users/{userId}/bankaccesses";
private final String bankAccountApiUrlRelative = "users/{userId}/bankaccesses/{accessId}/accounts";
private final String bankAccountSyncApiUrlRelative = "users/{userId}/bankaccesses/{accessId}/accounts/{accountId}/sync";
/**
* username of the test user that does not use adorsys api but dummies
*/
private final String testUserName = "test@user.de";
public String getBankingApiUrlAbsolute() {
return bankingApiUrlAbsolute;
}
public String getBankAccessApiUrlRelative() {
return bankAccessApiUrlRelative;
}
public String getBankAccountApiUrlRelative() {
return bankAccountApiUrlRelative;
}
public String getBankAccountSyncApiUrlRelative() {
return bankAccountSyncApiUrlRelative;
}
public String getTestUserName() {
return testUserName;
}
}
| package de.fau.amos.virtualledger.server.banking.adorsys.api;
import org.springframework.stereotype.Component;
/**
* Class that holds all configuration required for the banking api access
* examples: URL of the banking api, dummy configuration, ...
*/
@Component
public class BankingApiConfiguration {
private final String bankingApiUrlAbsolute = "https://multibanking-service.dev.adorsys.de:443/api/v1/";
private final String bankAccessApiUrlRelative = "bankaccesses";
private final String bankAccountApiUrlRelative = "bankaccesses/{accessId}/accounts";
private final String bankAccountSyncApiUrlRelative = "bankaccesses/{accessId}/accounts/{accountId}/sync";
/**
* username of the test user that does not use adorsys api but dummies
*/
private final String testUserName = "test@user.de";
public String getBankingApiUrlAbsolute() {
return bankingApiUrlAbsolute;
}
public String getBankAccessApiUrlRelative() {
return bankAccessApiUrlRelative;
}
public String getBankAccountApiUrlRelative() {
return bankAccountApiUrlRelative;
}
public String getBankAccountSyncApiUrlRelative() {
return bankAccountSyncApiUrlRelative;
}
public String getTestUserName() {
return testUserName;
}
}
| Remove old user from adorsys url paths | Remove old user from adorsys url paths
| Java | apache-2.0 | BankingBoys/amos-ss17-proj7,BankingBoys/amos-ss17-proj7 | java | ## Code Before:
package de.fau.amos.virtualledger.server.banking.adorsys.api;
import org.springframework.stereotype.Component;
/**
* Class that holds all configuration required for the banking api access
* examples: URL of the banking api, dummy configuration, ...
*/
@Component
public class BankingApiConfiguration {
private final String bankingApiUrlAbsolute = "https://multibanking-service.dev.adorsys.de:443/api/v1/";
private final String bankAccessApiUrlRelative = "users/{userId}/bankaccesses";
private final String bankAccountApiUrlRelative = "users/{userId}/bankaccesses/{accessId}/accounts";
private final String bankAccountSyncApiUrlRelative = "users/{userId}/bankaccesses/{accessId}/accounts/{accountId}/sync";
/**
* username of the test user that does not use adorsys api but dummies
*/
private final String testUserName = "test@user.de";
public String getBankingApiUrlAbsolute() {
return bankingApiUrlAbsolute;
}
public String getBankAccessApiUrlRelative() {
return bankAccessApiUrlRelative;
}
public String getBankAccountApiUrlRelative() {
return bankAccountApiUrlRelative;
}
public String getBankAccountSyncApiUrlRelative() {
return bankAccountSyncApiUrlRelative;
}
public String getTestUserName() {
return testUserName;
}
}
## Instruction:
Remove old user from adorsys url paths
## Code After:
package de.fau.amos.virtualledger.server.banking.adorsys.api;
import org.springframework.stereotype.Component;
/**
* Class that holds all configuration required for the banking api access
* examples: URL of the banking api, dummy configuration, ...
*/
@Component
public class BankingApiConfiguration {
private final String bankingApiUrlAbsolute = "https://multibanking-service.dev.adorsys.de:443/api/v1/";
private final String bankAccessApiUrlRelative = "bankaccesses";
private final String bankAccountApiUrlRelative = "bankaccesses/{accessId}/accounts";
private final String bankAccountSyncApiUrlRelative = "bankaccesses/{accessId}/accounts/{accountId}/sync";
/**
* username of the test user that does not use adorsys api but dummies
*/
private final String testUserName = "test@user.de";
public String getBankingApiUrlAbsolute() {
return bankingApiUrlAbsolute;
}
public String getBankAccessApiUrlRelative() {
return bankAccessApiUrlRelative;
}
public String getBankAccountApiUrlRelative() {
return bankAccountApiUrlRelative;
}
public String getBankAccountSyncApiUrlRelative() {
return bankAccountSyncApiUrlRelative;
}
public String getTestUserName() {
return testUserName;
}
}
| package de.fau.amos.virtualledger.server.banking.adorsys.api;
import org.springframework.stereotype.Component;
/**
* Class that holds all configuration required for the banking api access
* examples: URL of the banking api, dummy configuration, ...
*/
@Component
public class BankingApiConfiguration {
private final String bankingApiUrlAbsolute = "https://multibanking-service.dev.adorsys.de:443/api/v1/";
- private final String bankAccessApiUrlRelative = "users/{userId}/bankaccesses";
? ---------------
+ private final String bankAccessApiUrlRelative = "bankaccesses";
- private final String bankAccountApiUrlRelative = "users/{userId}/bankaccesses/{accessId}/accounts";
? ---------------
+ private final String bankAccountApiUrlRelative = "bankaccesses/{accessId}/accounts";
- private final String bankAccountSyncApiUrlRelative = "users/{userId}/bankaccesses/{accessId}/accounts/{accountId}/sync";
? ---------------
+ private final String bankAccountSyncApiUrlRelative = "bankaccesses/{accessId}/accounts/{accountId}/sync";
/**
* username of the test user that does not use adorsys api but dummies
*/
private final String testUserName = "test@user.de";
public String getBankingApiUrlAbsolute() {
return bankingApiUrlAbsolute;
}
public String getBankAccessApiUrlRelative() {
return bankAccessApiUrlRelative;
}
public String getBankAccountApiUrlRelative() {
return bankAccountApiUrlRelative;
}
public String getBankAccountSyncApiUrlRelative() {
return bankAccountSyncApiUrlRelative;
}
public String getTestUserName() {
return testUserName;
}
} | 6 | 0.130435 | 3 | 3 |
0c39d969e2508f8c94c73121d51890cb1ed7b3bf | website/pages/introduction.md | website/pages/introduction.md | Introduction
============
## About
Plates is a native PHP template system that’s fast, easy to use and easy to extend. It’s inspired by the excellent [Twig](http://twig.sensiolabs.org/) template engine and tries to bring modern template language functionality to native PHP templates. Plates is designed for developers who prefer to use native PHP templates over compiled templates, such as Twig or Smarty.
## Highlights
- Native PHP templates, no new syntax to learn
- Plates is a template system, not a template language
- Plates encourages the use of existing PHP functions
- Template layouts and inheritance
- Template folders for grouping templates into namespaces
- Easy to extend using extensions
- Framework-agnostic, will work with any project
- Decoupled design makes templates easy to test
- Composer ready and PSR-2 compliant
## Who is behind Plates?
Plates was created by Jonathan Reinink. Find him on Twitter at [@reinink](https://twitter.com/reinink). | Introduction
============
## About
Plates is a native PHP template system that’s fast, easy to use and easy to extend. It’s inspired by the excellent [Twig](http://twig.sensiolabs.org/) template engine and tries to bring modern template language functionality to native PHP templates. Plates is designed for developers who prefer to use native PHP templates over compiled templates, such as Twig or Smarty.
## Highlights
- Native PHP templates, no new syntax to learn
- Plates is a template system, not a template language
- Plates encourages the use of existing PHP functions
- Template layouts and inheritance
- Template folders for grouping templates into namespaces
- Easy to extend using extensions
- Framework-agnostic, will work with any project
- Decoupled design makes templates easy to test
- Composer ready and PSR-2 compliant
## Source code
Find Plates on GitHub at [github.com/reinink/Plates](https://github.com/reinink/Plates).
## Questions?
Plates was created by Jonathan Reinink. Find him on Twitter at [@reinink](https://twitter.com/reinink). | Add link to GitHub on project homepage. | Add link to GitHub on project homepage.
| Markdown | mit | thephpleague/plates,localheinz/plates,vlakoff/plates,samsonasik/plates,okaprinarjaya/plates | markdown | ## Code Before:
Introduction
============
## About
Plates is a native PHP template system that’s fast, easy to use and easy to extend. It’s inspired by the excellent [Twig](http://twig.sensiolabs.org/) template engine and tries to bring modern template language functionality to native PHP templates. Plates is designed for developers who prefer to use native PHP templates over compiled templates, such as Twig or Smarty.
## Highlights
- Native PHP templates, no new syntax to learn
- Plates is a template system, not a template language
- Plates encourages the use of existing PHP functions
- Template layouts and inheritance
- Template folders for grouping templates into namespaces
- Easy to extend using extensions
- Framework-agnostic, will work with any project
- Decoupled design makes templates easy to test
- Composer ready and PSR-2 compliant
## Who is behind Plates?
Plates was created by Jonathan Reinink. Find him on Twitter at [@reinink](https://twitter.com/reinink).
## Instruction:
Add link to GitHub on project homepage.
## Code After:
Introduction
============
## About
Plates is a native PHP template system that’s fast, easy to use and easy to extend. It’s inspired by the excellent [Twig](http://twig.sensiolabs.org/) template engine and tries to bring modern template language functionality to native PHP templates. Plates is designed for developers who prefer to use native PHP templates over compiled templates, such as Twig or Smarty.
## Highlights
- Native PHP templates, no new syntax to learn
- Plates is a template system, not a template language
- Plates encourages the use of existing PHP functions
- Template layouts and inheritance
- Template folders for grouping templates into namespaces
- Easy to extend using extensions
- Framework-agnostic, will work with any project
- Decoupled design makes templates easy to test
- Composer ready and PSR-2 compliant
## Source code
Find Plates on GitHub at [github.com/reinink/Plates](https://github.com/reinink/Plates).
## Questions?
Plates was created by Jonathan Reinink. Find him on Twitter at [@reinink](https://twitter.com/reinink). | Introduction
============
## About
Plates is a native PHP template system that’s fast, easy to use and easy to extend. It’s inspired by the excellent [Twig](http://twig.sensiolabs.org/) template engine and tries to bring modern template language functionality to native PHP templates. Plates is designed for developers who prefer to use native PHP templates over compiled templates, such as Twig or Smarty.
## Highlights
- Native PHP templates, no new syntax to learn
- Plates is a template system, not a template language
- Plates encourages the use of existing PHP functions
- Template layouts and inheritance
- Template folders for grouping templates into namespaces
- Easy to extend using extensions
- Framework-agnostic, will work with any project
- Decoupled design makes templates easy to test
- Composer ready and PSR-2 compliant
- ## Who is behind Plates?
+ ## Source code
+
+ Find Plates on GitHub at [github.com/reinink/Plates](https://github.com/reinink/Plates).
+
+ ## Questions?
+
Plates was created by Jonathan Reinink. Find him on Twitter at [@reinink](https://twitter.com/reinink). | 7 | 0.333333 | 6 | 1 |
dda3d14fd1d39201302524ab4f59231a8e025d14 | src/app/common/tpls/content.tpl.html | src/app/common/tpls/content.tpl.html | <pre>
<span class="comment">// Copyright 2015 Denis Karanja. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// Find the code <a href="https://github.com/yoda-yoda/yoda-face.git" HERE </span>
<span class="keyword">package</span> deebeat
<span class="keyword">import</span> <span class="string">"net/url"</span>
<span class="reserved">typedef</span> <span class="reserved">struct</span> Profile {
<span class="reserved">char</span> author = <span class="string">"Denis Karanja"</span>;
<span class="comment">// You can check out my code at these places:</span>
<span class="reserved">char </span><a href="https://github.com/yoda-yoda" target="_blank">github;</a>
<span class="comment">// You can stalk me on these places:</span>
<span class="reserved">char </span> <a href="mailto:dee.caranja@gmail.com" target="_blank">email,</a> <a href="htpps://twitter.com/dee_beat" target="_blank">twitter;</a>
} open;
</pre> | <pre>
<span class="comment">// Copyright 2015 Denis Karanja. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// Find the code <a href="https://github.com/yoda-yoda/yoda-face.git" target="_blank">HERE</a> </span>
<span class="keyword">package</span> deebeat
<span class="keyword">import</span> <span class="string">"net/url"</span>
<span class="reserved">typedef</span> <span class="reserved">struct</span> Profile {
<span class="reserved">char</span> author = <span class="string">"Denis Karanja"</span>;
<span class="comment">// You can check out my code at these places:</span>
<span class="reserved">char </span><a href="https://github.com/yoda-yoda" target="_blank">github;</a>
<span class="comment">// You can stalk me on these places:</span>
<span class="reserved">char </span> <a href="mailto:dee.caranja@gmail.com" target="_blank">email,</a> <a href="htpps://twitter.com/dee_beat" target="_blank">twitter;</a>
} open;
</pre> | Change package name to deebeat | Change package name to deebeat
| HTML | mit | yoda-yoda/yoda-face,yoda-yoda/yoda-face | html | ## Code Before:
<pre>
<span class="comment">// Copyright 2015 Denis Karanja. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// Find the code <a href="https://github.com/yoda-yoda/yoda-face.git" HERE </span>
<span class="keyword">package</span> deebeat
<span class="keyword">import</span> <span class="string">"net/url"</span>
<span class="reserved">typedef</span> <span class="reserved">struct</span> Profile {
<span class="reserved">char</span> author = <span class="string">"Denis Karanja"</span>;
<span class="comment">// You can check out my code at these places:</span>
<span class="reserved">char </span><a href="https://github.com/yoda-yoda" target="_blank">github;</a>
<span class="comment">// You can stalk me on these places:</span>
<span class="reserved">char </span> <a href="mailto:dee.caranja@gmail.com" target="_blank">email,</a> <a href="htpps://twitter.com/dee_beat" target="_blank">twitter;</a>
} open;
</pre>
## Instruction:
Change package name to deebeat
## Code After:
<pre>
<span class="comment">// Copyright 2015 Denis Karanja. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
// Find the code <a href="https://github.com/yoda-yoda/yoda-face.git" target="_blank">HERE</a> </span>
<span class="keyword">package</span> deebeat
<span class="keyword">import</span> <span class="string">"net/url"</span>
<span class="reserved">typedef</span> <span class="reserved">struct</span> Profile {
<span class="reserved">char</span> author = <span class="string">"Denis Karanja"</span>;
<span class="comment">// You can check out my code at these places:</span>
<span class="reserved">char </span><a href="https://github.com/yoda-yoda" target="_blank">github;</a>
<span class="comment">// You can stalk me on these places:</span>
<span class="reserved">char </span> <a href="mailto:dee.caranja@gmail.com" target="_blank">email,</a> <a href="htpps://twitter.com/dee_beat" target="_blank">twitter;</a>
} open;
</pre> | <pre>
<span class="comment">// Copyright 2015 Denis Karanja. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
- // Find the code <a href="https://github.com/yoda-yoda/yoda-face.git" HERE </span>
+ // Find the code <a href="https://github.com/yoda-yoda/yoda-face.git" target="_blank">HERE</a> </span>
? ++++++++++++++++ ++++
<span class="keyword">package</span> deebeat
<span class="keyword">import</span> <span class="string">"net/url"</span>
<span class="reserved">typedef</span> <span class="reserved">struct</span> Profile {
<span class="reserved">char</span> author = <span class="string">"Denis Karanja"</span>;
<span class="comment">// You can check out my code at these places:</span>
<span class="reserved">char </span><a href="https://github.com/yoda-yoda" target="_blank">github;</a>
<span class="comment">// You can stalk me on these places:</span>
<span class="reserved">char </span> <a href="mailto:dee.caranja@gmail.com" target="_blank">email,</a> <a href="htpps://twitter.com/dee_beat" target="_blank">twitter;</a>
} open;
</pre> | 2 | 0.1 | 1 | 1 |
0fa74bb8480d2b46fcd4e38ffbe28c2b6e97e0ca | install_elpa.el | install_elpa.el | (setq user-init-file "/tmp/.emacs")
;; Marmalade: http://marmalade-repo.org/
(require 'package)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'color-theme)
(package-install 'gh)
(package-install 'gist)
(package-install 'paredit)
(package-install 'ruby-mode)
(package-install 'smex)
(package-install 'typopunct)
(package-install 'dash)
| (setq user-init-file "/tmp/.emacs")
;; Marmalade: http://marmalade-repo.org/
(require 'package)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'color-theme)
(package-install 'gh)
(package-install 'gist)
(package-install 'pkg-info)
(package-install 'paredit)
(package-install 'ruby-mode)
(package-install 'smex)
(package-install 'typopunct)
(package-install 'dash)
| Add pkg-info package (depended on by nrepl.el) | Emacs: Add pkg-info package (depended on by nrepl.el)
| Emacs Lisp | mit | Moocar/dotfiles | emacs-lisp | ## Code Before:
(setq user-init-file "/tmp/.emacs")
;; Marmalade: http://marmalade-repo.org/
(require 'package)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'color-theme)
(package-install 'gh)
(package-install 'gist)
(package-install 'paredit)
(package-install 'ruby-mode)
(package-install 'smex)
(package-install 'typopunct)
(package-install 'dash)
## Instruction:
Emacs: Add pkg-info package (depended on by nrepl.el)
## Code After:
(setq user-init-file "/tmp/.emacs")
;; Marmalade: http://marmalade-repo.org/
(require 'package)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'color-theme)
(package-install 'gh)
(package-install 'gist)
(package-install 'pkg-info)
(package-install 'paredit)
(package-install 'ruby-mode)
(package-install 'smex)
(package-install 'typopunct)
(package-install 'dash)
| (setq user-init-file "/tmp/.emacs")
;; Marmalade: http://marmalade-repo.org/
(require 'package)
(add-to-list 'package-archives
'("marmalade" .
"http://marmalade-repo.org/packages/"))
(package-initialize)
(package-refresh-contents)
(package-install 'color-theme)
(package-install 'gh)
(package-install 'gist)
+ (package-install 'pkg-info)
(package-install 'paredit)
(package-install 'ruby-mode)
(package-install 'smex)
(package-install 'typopunct)
(package-install 'dash) | 1 | 0.052632 | 1 | 0 |
f719e78bad91f62f9f9affad186d7deec031f6ca | features/support/env.rb | features/support/env.rb | require 'vim-flavor'
class FakeUserEnvironment
def create_file virtual_path, content
File.open(expand(virtual_path), 'w') do |f|
f.write(content)
end
end
def expand(virtual_path)
virtual_path.gsub(/\$([a-z_]+)/) {
variable_table[$1]
}
end
def make_flavor_path(vimfiles_path, repo_name)
expand("#{vimfiles_path.to_flavors_path}/#{repo_name.zap}")
end
def make_repo_path(basename)
expand("$tmp/repos/#{basename}")
end
def make_repo_uri(basename)
"file://#{make_repo_path(basename)}"
end
def variable_table
@variable_table ||= Hash.new
end
end
World do
FakeUserEnvironment.new
end
| require 'fileutils'
require 'vim-flavor'
class FakeUserEnvironment
def create_file virtual_path, content
File.open(expand(virtual_path), 'w') do |f|
f.write(content)
end
end
def delete_path path
FileUtils.remove_entry_secure(path)
end
def expand(virtual_path)
virtual_path.gsub(/\$([a-z_]+)/) {
variable_table[$1]
}
end
def make_flavor_path(vimfiles_path, repo_name)
expand("#{vimfiles_path.to_flavors_path}/#{repo_name.zap}")
end
def make_repo_path(basename)
expand("$tmp/repos/#{basename}")
end
def make_repo_uri(basename)
"file://#{make_repo_path(basename)}"
end
def variable_table
@variable_table ||= Hash.new
end
end
World do
FakeUserEnvironment.new
end
| Add a helper method - delete_path | Add a helper method - delete_path
| Ruby | mit | ngtk/vim-flavor,kana/vim-flavor | ruby | ## Code Before:
require 'vim-flavor'
class FakeUserEnvironment
def create_file virtual_path, content
File.open(expand(virtual_path), 'w') do |f|
f.write(content)
end
end
def expand(virtual_path)
virtual_path.gsub(/\$([a-z_]+)/) {
variable_table[$1]
}
end
def make_flavor_path(vimfiles_path, repo_name)
expand("#{vimfiles_path.to_flavors_path}/#{repo_name.zap}")
end
def make_repo_path(basename)
expand("$tmp/repos/#{basename}")
end
def make_repo_uri(basename)
"file://#{make_repo_path(basename)}"
end
def variable_table
@variable_table ||= Hash.new
end
end
World do
FakeUserEnvironment.new
end
## Instruction:
Add a helper method - delete_path
## Code After:
require 'fileutils'
require 'vim-flavor'
class FakeUserEnvironment
def create_file virtual_path, content
File.open(expand(virtual_path), 'w') do |f|
f.write(content)
end
end
def delete_path path
FileUtils.remove_entry_secure(path)
end
def expand(virtual_path)
virtual_path.gsub(/\$([a-z_]+)/) {
variable_table[$1]
}
end
def make_flavor_path(vimfiles_path, repo_name)
expand("#{vimfiles_path.to_flavors_path}/#{repo_name.zap}")
end
def make_repo_path(basename)
expand("$tmp/repos/#{basename}")
end
def make_repo_uri(basename)
"file://#{make_repo_path(basename)}"
end
def variable_table
@variable_table ||= Hash.new
end
end
World do
FakeUserEnvironment.new
end
| + require 'fileutils'
require 'vim-flavor'
class FakeUserEnvironment
def create_file virtual_path, content
File.open(expand(virtual_path), 'w') do |f|
f.write(content)
end
+ end
+
+ def delete_path path
+ FileUtils.remove_entry_secure(path)
end
def expand(virtual_path)
virtual_path.gsub(/\$([a-z_]+)/) {
variable_table[$1]
}
end
def make_flavor_path(vimfiles_path, repo_name)
expand("#{vimfiles_path.to_flavors_path}/#{repo_name.zap}")
end
def make_repo_path(basename)
expand("$tmp/repos/#{basename}")
end
def make_repo_uri(basename)
"file://#{make_repo_path(basename)}"
end
def variable_table
@variable_table ||= Hash.new
end
end
World do
FakeUserEnvironment.new
end | 5 | 0.142857 | 5 | 0 |
d0e8ecf5eafff47eacbe2cb0c604885ccca98e46 | index.js | index.js | const readTask = require('./src/read-task');
const taskToGeoJSON = require('./src/task-to-geojson');
const viewGeoJSON = require('./src/view-geojson');
let task = readTask(`${__dirname}/fixtures/2017-07-15-lev/task.tsk`);
let json = taskToGeoJSON(task);
viewGeoJSON(json);
| const turf = require('@turf/turf');
const readTask = require('./src/read-task');
const taskToGeoJSON = require('./src/task-to-geojson');
const readFlight = require('./src/read-flight');
const viewGeoJSON = require('./src/view-geojson');
let task = readTask(`${__dirname}/fixtures/2017-07-15-lev/task.tsk`);
let flight = readFlight(`${__dirname}/fixtures/2017-07-15-lev/SW_77flqgg1.igc`);
let json = taskToGeoJSON(task);
json.features.push(turf.lineString(flight, { color: 'red', opacity: 0.85 }));
viewGeoJSON(json);
| Add flight to GeoJSON view | Add flight to GeoJSON view
| JavaScript | mit | Turbo87/aeroscore,Turbo87/aeroscore | javascript | ## Code Before:
const readTask = require('./src/read-task');
const taskToGeoJSON = require('./src/task-to-geojson');
const viewGeoJSON = require('./src/view-geojson');
let task = readTask(`${__dirname}/fixtures/2017-07-15-lev/task.tsk`);
let json = taskToGeoJSON(task);
viewGeoJSON(json);
## Instruction:
Add flight to GeoJSON view
## Code After:
const turf = require('@turf/turf');
const readTask = require('./src/read-task');
const taskToGeoJSON = require('./src/task-to-geojson');
const readFlight = require('./src/read-flight');
const viewGeoJSON = require('./src/view-geojson');
let task = readTask(`${__dirname}/fixtures/2017-07-15-lev/task.tsk`);
let flight = readFlight(`${__dirname}/fixtures/2017-07-15-lev/SW_77flqgg1.igc`);
let json = taskToGeoJSON(task);
json.features.push(turf.lineString(flight, { color: 'red', opacity: 0.85 }));
viewGeoJSON(json);
| + const turf = require('@turf/turf');
+
const readTask = require('./src/read-task');
const taskToGeoJSON = require('./src/task-to-geojson');
+ const readFlight = require('./src/read-flight');
const viewGeoJSON = require('./src/view-geojson');
let task = readTask(`${__dirname}/fixtures/2017-07-15-lev/task.tsk`);
+ let flight = readFlight(`${__dirname}/fixtures/2017-07-15-lev/SW_77flqgg1.igc`);
+
let json = taskToGeoJSON(task);
+ json.features.push(turf.lineString(flight, { color: 'red', opacity: 0.85 }));
viewGeoJSON(json); | 6 | 0.75 | 6 | 0 |
ee3a76b380e5902cc9f6b40c8a267eabcf6d3fa6 | src/main/sh/publish_docs.sh | src/main/sh/publish_docs.sh |
site_dir=$1
tmp_dir=$2
version=$3
git clone git@github.com:wildfly-swarm/wildfly-swarm.git $tmp_dir
cd $tmp_dir
git checkout gh-pages
rsync -avz $site_dir/ $tmp_dir
git add $version
git commit -m "CI generated API documentation for $version"
git push origin gh-pages
|
site_dir=$1
tmp_dir=$2
version=$3
git clone git@github.com:wildfly-swarm/wildfly-swarm.git $tmp_dir
cd $tmp_dir
git checkout gh-pages
rsync -avz $site_dir/ $tmp_dir
git add $version
if grep -q $version _data/versions.yml; then
echo "$version exists in _data/versions.yml"
else
echo -e "\n- $version" >> _data/versions.yml
git add _data/versions.yml
fi
git commit -m "CI generated API documentation for $version"
git push origin gh-pages
| Add the version to versions.yml when building javadocs | Add the version to versions.yml when building javadocs [SWARM-10]
We use jekyll to build an index page for the javadocs, and it needs to
know the versions to link, so we add the currently built version to the
version list (if it isn't there already).
| Shell | apache-2.0 | heiko-braun/wildfly-swarm-1,jamesnetherton/wildfly-swarm,christian-posta/wildfly-swarm,christian-posta/wildfly-swarm,christian-posta/wildfly-swarm,emag/wildfly-swarm,juangon/wildfly-swarm,kenfinnigan/wildfly-swarm,jamezp/wildfly-swarm,jamesnetherton/wildfly-swarm,jamesnetherton/wildfly-swarm,wildfly-swarm/wildfly-swarm-core,Ladicek/wildfly-swarm,kenfinnigan/wildfly-swarm,bobmcwhirter/wildfly-swarm,nelsongraca/wildfly-swarm,wildfly-swarm/wildfly-swarm,nelsongraca/wildfly-swarm,emag/wildfly-swarm,christian-posta/wildfly-swarm,nelsongraca/wildfly-swarm,jamezp/wildfly-swarm,Ladicek/wildfly-swarm,emag/wildfly-swarm,wildfly-swarm/wildfly-swarm,jamesnetherton/wildfly-swarm,gastaldi/wildfly-swarm,wildfly-swarm/wildfly-swarm-core,wildfly-swarm/wildfly-swarm,jamesnetherton/wildfly-swarm,wildfly-swarm/wildfly-swarm-core,Ladicek/wildfly-swarm,bobmcwhirter/wildfly-swarm,bobmcwhirter/wildfly-swarm,nelsongraca/wildfly-swarm,juangon/wildfly-swarm,emag/wildfly-swarm,kenfinnigan/wildfly-swarm,heiko-braun/wildfly-swarm-1,jamezp/wildfly-swarm,jamezp/wildfly-swarm,juangon/wildfly-swarm,bobmcwhirter/wildfly-swarm,wildfly-swarm/wildfly-swarm,wildfly-swarm/wildfly-swarm-core,wildfly-swarm/wildfly-swarm-core,emag/wildfly-swarm,juangon/wildfly-swarm,gastaldi/wildfly-swarm,christian-posta/wildfly-swarm,gastaldi/wildfly-swarm,bobmcwhirter/wildfly-swarm,kenfinnigan/wildfly-swarm,Ladicek/wildfly-swarm,kenfinnigan/wildfly-swarm,heiko-braun/wildfly-swarm-1,heiko-braun/wildfly-swarm-1,heiko-braun/wildfly-swarm-1,Ladicek/wildfly-swarm,jamezp/wildfly-swarm,wildfly-swarm/wildfly-swarm,juangon/wildfly-swarm,gastaldi/wildfly-swarm,nelsongraca/wildfly-swarm,gastaldi/wildfly-swarm | shell | ## Code Before:
site_dir=$1
tmp_dir=$2
version=$3
git clone git@github.com:wildfly-swarm/wildfly-swarm.git $tmp_dir
cd $tmp_dir
git checkout gh-pages
rsync -avz $site_dir/ $tmp_dir
git add $version
git commit -m "CI generated API documentation for $version"
git push origin gh-pages
## Instruction:
Add the version to versions.yml when building javadocs [SWARM-10]
We use jekyll to build an index page for the javadocs, and it needs to
know the versions to link, so we add the currently built version to the
version list (if it isn't there already).
## Code After:
site_dir=$1
tmp_dir=$2
version=$3
git clone git@github.com:wildfly-swarm/wildfly-swarm.git $tmp_dir
cd $tmp_dir
git checkout gh-pages
rsync -avz $site_dir/ $tmp_dir
git add $version
if grep -q $version _data/versions.yml; then
echo "$version exists in _data/versions.yml"
else
echo -e "\n- $version" >> _data/versions.yml
git add _data/versions.yml
fi
git commit -m "CI generated API documentation for $version"
git push origin gh-pages
|
site_dir=$1
tmp_dir=$2
version=$3
git clone git@github.com:wildfly-swarm/wildfly-swarm.git $tmp_dir
cd $tmp_dir
git checkout gh-pages
rsync -avz $site_dir/ $tmp_dir
git add $version
+
+ if grep -q $version _data/versions.yml; then
+ echo "$version exists in _data/versions.yml"
+ else
+ echo -e "\n- $version" >> _data/versions.yml
+ git add _data/versions.yml
+ fi
+
git commit -m "CI generated API documentation for $version"
git push origin gh-pages | 8 | 0.666667 | 8 | 0 |
b9e8e0bdf8a83889cac8e16c962e74dd57f50e4e | .travis.yml | .travis.yml | language: go
go:
- 1.5.1
sudo: false
script: make test
| language: go
go:
- 1.5.1
sudo: false
install:
- go get github.com/tools/godep
- godep restore
script: make unit-tests
| Update testing config for Travis CI | Update testing config for Travis CI
| YAML | apache-2.0 | mrkschan/nginxbeat,mrkschan/nginxbeat,mrkschan/nginxbeat | yaml | ## Code Before:
language: go
go:
- 1.5.1
sudo: false
script: make test
## Instruction:
Update testing config for Travis CI
## Code After:
language: go
go:
- 1.5.1
sudo: false
install:
- go get github.com/tools/godep
- godep restore
script: make unit-tests
| language: go
go:
- 1.5.1
sudo: false
+ install:
+ - go get github.com/tools/godep
+ - godep restore
+
- script: make test
+ script: make unit-tests
? +++++ +
| 6 | 0.75 | 5 | 1 |
28692d7df9a9b7f1049789baf0e04a270c0ec3a6 | proj.android_studio/ee-x-unity-ads/src/main/AndroidManifest.xml | proj.android_studio/ee-x-unity-ads/src/main/AndroidManifest.xml | <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ee.unityads">
</manifest>
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ee.unityads">
<!-- Register permissions and activities for ironSource mediation -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application>
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitTransparentActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitTransparentSoftwareActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="false"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitSoftwareActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="false"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
</application>
</manifest>
| Fix unity ad not displayed if ironsource mediation is enabled. | Fix unity ad not displayed if ironsource mediation is enabled.
| XML | mit | Senspark/ee-x,Senspark/ee-x,Senspark/ee-x,Senspark/ee-x,Senspark/ee-x,Senspark/ee-x,Senspark/ee-x,Senspark/ee-x,Senspark/ee-x | xml | ## Code Before:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ee.unityads">
</manifest>
## Instruction:
Fix unity ad not displayed if ironsource mediation is enabled.
## Code After:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ee.unityads">
<!-- Register permissions and activities for ironSource mediation -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application>
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitTransparentActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitTransparentSoftwareActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="false"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.unity3d.services.ads.adunit.AdUnitSoftwareActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
android:hardwareAccelerated="false"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
</application>
</manifest>
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ee.unityads">
+
+ <!-- Register permissions and activities for ironSource mediation -->
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+ <uses-permission android:name="android.permission.INTERNET" />
+
+ <application>
+ <activity
+ android:name="com.unity3d.services.ads.adunit.AdUnitActivity"
+ android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
+ android:hardwareAccelerated="true"
+ android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
+ <activity
+ android:name="com.unity3d.services.ads.adunit.AdUnitTransparentActivity"
+ android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
+ android:hardwareAccelerated="true"
+ android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
+ <activity
+ android:name="com.unity3d.services.ads.adunit.AdUnitTransparentSoftwareActivity"
+ android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
+ android:hardwareAccelerated="false"
+ android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
+ <activity
+ android:name="com.unity3d.services.ads.adunit.AdUnitSoftwareActivity"
+ android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen"
+ android:hardwareAccelerated="false"
+ android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
+ </application>
</manifest> | 27 | 9 | 27 | 0 |
1d651204175139868a25548c5c3e2e070a0763d2 | README.md | README.md |
Run the Zeud Gem as a daemon
[](http://badge.fury.io/rb/zeusd) [](https://travis-ci.org/veloper/zeusd) [](https://codeclimate.com/github/veloper/zeusd)
## Installation
Add this line to your application's Gemfile:
gem 'zeusd'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zeusd
## Usage
### Commands
```
zeusd start [--block]
zeusd stop
zeusd restart
```
### Global Flags
* `--cwd=current/work/directory/of/rails/app` or alias `-d`
* `--verbose` or `-v`
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Write and test your changes
3. Commit your changes and specs (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## License
* Zeusd is released under the New BSD license. http://dan.doezema.com/licenses/new-bsd/ |
Run the Zeud Gem as a daemon
[](http://badge.fury.io/rb/zeusd) [](https://travis-ci.org/veloper/zeusd) [](https://coveralls.io/r/veloper/zeusd) [](https://codeclimate.com/github/veloper/zeusd)
## Installation
Add this line to your application's Gemfile:
gem 'zeusd'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zeusd
## Usage
### Commands
```
zeusd start [--block]
zeusd stop
zeusd restart
```
### Global Flags
* `--cwd=current/work/directory/of/rails/app` or alias `-d`
* `--verbose` or `-v`
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Write and test your changes
3. Commit your changes and specs (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## License
* Zeusd is released under the New BSD license. http://dan.doezema.com/licenses/new-bsd/ | ADD ALL THE BADGES haha | ADD ALL THE BADGES haha
| Markdown | bsd-3-clause | veloper/zeusd,veloper/zeusd | markdown | ## Code Before:
Run the Zeud Gem as a daemon
[](http://badge.fury.io/rb/zeusd) [](https://travis-ci.org/veloper/zeusd) [](https://codeclimate.com/github/veloper/zeusd)
## Installation
Add this line to your application's Gemfile:
gem 'zeusd'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zeusd
## Usage
### Commands
```
zeusd start [--block]
zeusd stop
zeusd restart
```
### Global Flags
* `--cwd=current/work/directory/of/rails/app` or alias `-d`
* `--verbose` or `-v`
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Write and test your changes
3. Commit your changes and specs (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## License
* Zeusd is released under the New BSD license. http://dan.doezema.com/licenses/new-bsd/
## Instruction:
ADD ALL THE BADGES haha
## Code After:
Run the Zeud Gem as a daemon
[](http://badge.fury.io/rb/zeusd) [](https://travis-ci.org/veloper/zeusd) [](https://coveralls.io/r/veloper/zeusd) [](https://codeclimate.com/github/veloper/zeusd)
## Installation
Add this line to your application's Gemfile:
gem 'zeusd'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zeusd
## Usage
### Commands
```
zeusd start [--block]
zeusd stop
zeusd restart
```
### Global Flags
* `--cwd=current/work/directory/of/rails/app` or alias `-d`
* `--verbose` or `-v`
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Write and test your changes
3. Commit your changes and specs (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## License
* Zeusd is released under the New BSD license. http://dan.doezema.com/licenses/new-bsd/ |
Run the Zeud Gem as a daemon
- [](http://badge.fury.io/rb/zeusd) [](https://travis-ci.org/veloper/zeusd) [](https://codeclimate.com/github/veloper/zeusd)
+ [](http://badge.fury.io/rb/zeusd) [](https://travis-ci.org/veloper/zeusd) [](https://coveralls.io/r/veloper/zeusd) [](https://codeclimate.com/github/veloper/zeusd)
## Installation
Add this line to your application's Gemfile:
gem 'zeusd'
And then execute:
$ bundle
Or install it yourself as:
$ gem install zeusd
## Usage
### Commands
```
zeusd start [--block]
zeusd stop
zeusd restart
```
### Global Flags
* `--cwd=current/work/directory/of/rails/app` or alias `-d`
* `--verbose` or `-v`
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Write and test your changes
3. Commit your changes and specs (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request
## License
* Zeusd is released under the New BSD license. http://dan.doezema.com/licenses/new-bsd/ | 2 | 0.042553 | 1 | 1 |
e437ca6f6d1bba319345d8018882262f3f16dc36 | pull_request_template.md | pull_request_template.md |
- **Thank you for your contribution to Looker Components!**
- To ensure a successful review, please double check our checklist of requirements below.
- Also including a short description of changes and relevant screenshots will help us more quickly understand the ultimate goal of your work (🗑 replace this introduction with your summary of changes).
### :white_check_mark: Requirements
- [ ] Includes test coverage for all changes
- [ ] Build and tests are passing
- [ ] PR is ideally < 400LOC
- [ ] Link(s) to related Github issues
### :camera: Screenshots
|
- **Thank you for your contribution to Looker Components!**
- To ensure a successful review, please double check our checklist of requirements below.
- Also including a short description of changes and relevant screenshots will help us more quickly understand the ultimate goal of your work (🗑 replace this introduction with your summary of changes).
### :white_check_mark: Requirements
- [ ] Includes test coverage for all changes
- [ ] Build and tests are passing
- [ ] Update documentation
- [ ] Updated CHANGELOG
- [ ] Checked for i18n impacts
- [ ] Checked for a11y impacts
- [ ] PR is ideally < ~400LOC
### :camera: Screenshots
| Update PR template a smidge | Update PR template a smidge
| Markdown | mit | looker-open-source/components,looker-open-source/components,looker-open-source/components,looker-open-source/components | markdown | ## Code Before:
- **Thank you for your contribution to Looker Components!**
- To ensure a successful review, please double check our checklist of requirements below.
- Also including a short description of changes and relevant screenshots will help us more quickly understand the ultimate goal of your work (🗑 replace this introduction with your summary of changes).
### :white_check_mark: Requirements
- [ ] Includes test coverage for all changes
- [ ] Build and tests are passing
- [ ] PR is ideally < 400LOC
- [ ] Link(s) to related Github issues
### :camera: Screenshots
## Instruction:
Update PR template a smidge
## Code After:
- **Thank you for your contribution to Looker Components!**
- To ensure a successful review, please double check our checklist of requirements below.
- Also including a short description of changes and relevant screenshots will help us more quickly understand the ultimate goal of your work (🗑 replace this introduction with your summary of changes).
### :white_check_mark: Requirements
- [ ] Includes test coverage for all changes
- [ ] Build and tests are passing
- [ ] Update documentation
- [ ] Updated CHANGELOG
- [ ] Checked for i18n impacts
- [ ] Checked for a11y impacts
- [ ] PR is ideally < ~400LOC
### :camera: Screenshots
|
- **Thank you for your contribution to Looker Components!**
- - To ensure a successful review, please double check our checklist of requirements below.
? -
+ - To ensure a successful review, please double check our checklist of requirements below.
- - Also including a short description of changes and relevant screenshots will help us more quickly understand the ultimate goal of your work (🗑 replace this introduction with your summary of changes).
? -
+ - Also including a short description of changes and relevant screenshots will help us more quickly understand the ultimate goal of your work (🗑 replace this introduction with your summary of changes).
### :white_check_mark: Requirements
- [ ] Includes test coverage for all changes
- [ ] Build and tests are passing
+ - [ ] Update documentation
+ - [ ] Updated CHANGELOG
+ - [ ] Checked for i18n impacts
+ - [ ] Checked for a11y impacts
- - [ ] PR is ideally < 400LOC
+ - [ ] PR is ideally < ~400LOC
? +
- - [ ] Link(s) to related Github issues
### :camera: Screenshots | 11 | 0.846154 | 7 | 4 |
f55542e5fd038139042a32dc86aeb643a14e88f5 | src/definitions/skills.coffee | src/definitions/skills.coffee | _ = require 'lodash'
game = require '../game'
log = require '../log'
prompts = game.prompts
direction = require '../direction'
vectorMath = require '../vector-math'
calc = require '../calc'
Skill = class exports.Skill
name: 'skill'
# symbol: 'skill' # allow symbols for skills (to show in list maybe)
class exports.TentacleWhip extends Skill
name: 'tentacle whip'
askParams: (creature) ->
# only called for player, to populate params to pass to #use()
params = {}
prompts.position 'Whip towards where?', default: creature
.then (pos) -> params.position = pos
.then -> params
use: (creature, params) ->
console.log 'whip:', params
12
class exports.SenseLasagna extends Skill
name: 'sense lasagna'
use: (creature) ->
game.message "
You feel no presence of any lasagna aura in your vicinity. Disappointing.
" | _ = require 'lodash'
Promise = require 'bluebird'
game = require '../game'
log = require '../log'
prompts = game.prompts
direction = require '../direction'
vectorMath = require '../vector-math'
calc = require '../calc'
Skill = class exports.Skill
name: 'skill'
# symbol: 'skill' # allow symbols for skills (to show in list maybe)
class exports.TentacleWhip extends Skill
name: 'tentacle whip'
askParams: (creature) ->
# only called for player, to populate params to pass to #use()
Promise.all [
prompts.position 'Whip towards where?', default: creature
]
.then ([position]) -> {position}
use: (creature, params) ->
console.log 'whip:', params
12
class exports.SenseLasagna extends Skill
name: 'sense lasagna'
use: (creature) ->
game.message "
You feel no presence of any lasagna aura in your vicinity. Disappointing.
" | Tweak askParams of TentacleWhip skill | Tweak askParams of TentacleWhip skill
| CoffeeScript | mit | raymond-h/krogue | coffeescript | ## Code Before:
_ = require 'lodash'
game = require '../game'
log = require '../log'
prompts = game.prompts
direction = require '../direction'
vectorMath = require '../vector-math'
calc = require '../calc'
Skill = class exports.Skill
name: 'skill'
# symbol: 'skill' # allow symbols for skills (to show in list maybe)
class exports.TentacleWhip extends Skill
name: 'tentacle whip'
askParams: (creature) ->
# only called for player, to populate params to pass to #use()
params = {}
prompts.position 'Whip towards where?', default: creature
.then (pos) -> params.position = pos
.then -> params
use: (creature, params) ->
console.log 'whip:', params
12
class exports.SenseLasagna extends Skill
name: 'sense lasagna'
use: (creature) ->
game.message "
You feel no presence of any lasagna aura in your vicinity. Disappointing.
"
## Instruction:
Tweak askParams of TentacleWhip skill
## Code After:
_ = require 'lodash'
Promise = require 'bluebird'
game = require '../game'
log = require '../log'
prompts = game.prompts
direction = require '../direction'
vectorMath = require '../vector-math'
calc = require '../calc'
Skill = class exports.Skill
name: 'skill'
# symbol: 'skill' # allow symbols for skills (to show in list maybe)
class exports.TentacleWhip extends Skill
name: 'tentacle whip'
askParams: (creature) ->
# only called for player, to populate params to pass to #use()
Promise.all [
prompts.position 'Whip towards where?', default: creature
]
.then ([position]) -> {position}
use: (creature, params) ->
console.log 'whip:', params
12
class exports.SenseLasagna extends Skill
name: 'sense lasagna'
use: (creature) ->
game.message "
You feel no presence of any lasagna aura in your vicinity. Disappointing.
" | _ = require 'lodash'
+ Promise = require 'bluebird'
game = require '../game'
log = require '../log'
prompts = game.prompts
direction = require '../direction'
vectorMath = require '../vector-math'
calc = require '../calc'
Skill = class exports.Skill
name: 'skill'
# symbol: 'skill' # allow symbols for skills (to show in list maybe)
class exports.TentacleWhip extends Skill
name: 'tentacle whip'
askParams: (creature) ->
# only called for player, to populate params to pass to #use()
- params = {}
+ Promise.all [
+ prompts.position 'Whip towards where?', default: creature
+ ]
+ .then ([position]) -> {position}
- prompts.position 'Whip towards where?', default: creature
- .then (pos) -> params.position = pos
-
- .then -> params
use: (creature, params) ->
console.log 'whip:', params
12
class exports.SenseLasagna extends Skill
name: 'sense lasagna'
use: (creature) ->
game.message "
You feel no presence of any lasagna aura in your vicinity. Disappointing.
" | 10 | 0.263158 | 5 | 5 |
e8494d9a04ff85d7d758c9d76692d4b8098d70f8 | hieradata/node/fr.lan/c7d01.yaml | hieradata/node/fr.lan/c7d01.yaml | ---
profile::base::linux::network::interfaces:
ens192:
ipaddress: '10.1.1.53'
netmask: '255.255.255.0'
gateway: '10.1.1.1'
dns_nameservers: '10.1.1.1'
dns_search: 'fr.lan' | ---
profile::base::linux::network::interfaces:
ens192:
ipaddress: '10.1.1.55'
netmask: '255.255.255.0'
gateway: '10.1.1.1'
dns1: '10.1.1.1'
dns_search: 'fr.lan' | Update test system network intefaces. | Update test system network intefaces.
| YAML | apache-2.0 | cdrobey/puppet-repo,cdrobey/puppet-repo | yaml | ## Code Before:
---
profile::base::linux::network::interfaces:
ens192:
ipaddress: '10.1.1.53'
netmask: '255.255.255.0'
gateway: '10.1.1.1'
dns_nameservers: '10.1.1.1'
dns_search: 'fr.lan'
## Instruction:
Update test system network intefaces.
## Code After:
---
profile::base::linux::network::interfaces:
ens192:
ipaddress: '10.1.1.55'
netmask: '255.255.255.0'
gateway: '10.1.1.1'
dns1: '10.1.1.1'
dns_search: 'fr.lan' | ---
profile::base::linux::network::interfaces:
ens192:
- ipaddress: '10.1.1.53'
? ^
+ ipaddress: '10.1.1.55'
? ^
netmask: '255.255.255.0'
gateway: '10.1.1.1'
- dns_nameservers: '10.1.1.1'
+ dns1: '10.1.1.1'
dns_search: 'fr.lan' | 4 | 0.5 | 2 | 2 |
c570a4e9468112d3251b6b9cc371de98ee4c788d | docker-images/setup-kubelet-volumes.sh | docker-images/setup-kubelet-volumes.sh |
if [[ $(docker inspect --format='{{.State.Status}}' kubelet-volumes) = 'exited' ]]
then
exit
else
docker_root=/var/lib/docker
kubelet_root=/var/lib/kubelet
if [ -d /rootfs/etc ] && [ -f /rootfs/etc/os-release ]
then
case "$(eval `cat /rootfs/etc/os-release` ; echo $ID)" in
boot2docker)
docker_root=/mnt/sda1/var/lib/docker
kubelet_root=/mnt/sda1/var/lib/kubelet
mkdir -p /rootfs$kubelet_root
ln -sf $kubelet_root /rootfs/var/lib/kubelet
break
;;
*)
break
;;
esac
fi
docker run \
--volume="/:/rootfs:ro" \
--volume="/sys:/sys:ro" \
--volume="/dev:/dev" \
--volume="${docker_root}/:${docker_root}:rw" \
--volume="${kubelet_root}/:/var/lib/kubelet:rw" \
--volume="/var/run:/var/run:rw" \
--volume="/var/run/weave/weave.sock:/weave.sock" \
--name=kubelet-volumes \
weaveworks/kubernetes-anywhere:tools /bin/true
fi
|
if [[ $(docker inspect --format='{{.State.Status}}' kubelet-volumes) = 'exited' ]]
then
exit
else
def_docker_root="/var/lib/docker"
def_kubelet_root="/var/lib/kubelet"
if [ -d /rootfs/etc ] && [ -f /rootfs/etc/os-release ]
then
case "$(eval `cat /rootfs/etc/os-release` ; echo $ID)" in
boot2docker)
docker_root="/mnt/sda1/${def_docker_root}"
kubelet_root="/mnt/sda1/${def_kubelet_root}"
mkdir -p "/rootfs/${kubelet_root}"
ln -sf "${kubelet_root}" "/rootfs/var/lib/kubelet"
docker_root_vol=" \
--volume=\"${docker_root}:${docker_root}:rw\" \
--volume=\"${def_docker_root}:${def_docker_root}:rw\" \
"
kubelet_root_vol=" \
--volume=\"${kubelet_root}:${def_kubelet_root}:rw\" \
"
break
;;
*)
docker_root_vol="\
--volume=\"${def_docker_root}/:${def_docker_root}:rw\" \
"
kubelet_root_vol=" \
--volume=\"${def_kubelet_root}:${def_kubelet_root}:rw\" \
"
break
;;
esac
fi
docker run \
--volume="/:/rootfs:ro" \
--volume="/sys:/sys:ro" \
--volume="/dev:/dev" \
--volume="/var/run:/var/run:rw" \
${kubelet_root_vol} \
${docker_root_vol} \
--volume="/var/run/weave/weave.sock:/weave.sock" \
--name="kubelet-volumes" \
weaveworks/kubernetes-anywhere:tools "/bin/true"
fi
| Fix and refactor volume setup helper | Fix and refactor volume setup helper
| Shell | apache-2.0 | rohitjogvmw/kubernetes-anywhere,weaveworks/kubernetes-anywhere,mikedanese/kubernetes-anywhere,weaveworks/weave-kubernetes-anywhere,errordeveloper/kubernetes-anywhere | shell | ## Code Before:
if [[ $(docker inspect --format='{{.State.Status}}' kubelet-volumes) = 'exited' ]]
then
exit
else
docker_root=/var/lib/docker
kubelet_root=/var/lib/kubelet
if [ -d /rootfs/etc ] && [ -f /rootfs/etc/os-release ]
then
case "$(eval `cat /rootfs/etc/os-release` ; echo $ID)" in
boot2docker)
docker_root=/mnt/sda1/var/lib/docker
kubelet_root=/mnt/sda1/var/lib/kubelet
mkdir -p /rootfs$kubelet_root
ln -sf $kubelet_root /rootfs/var/lib/kubelet
break
;;
*)
break
;;
esac
fi
docker run \
--volume="/:/rootfs:ro" \
--volume="/sys:/sys:ro" \
--volume="/dev:/dev" \
--volume="${docker_root}/:${docker_root}:rw" \
--volume="${kubelet_root}/:/var/lib/kubelet:rw" \
--volume="/var/run:/var/run:rw" \
--volume="/var/run/weave/weave.sock:/weave.sock" \
--name=kubelet-volumes \
weaveworks/kubernetes-anywhere:tools /bin/true
fi
## Instruction:
Fix and refactor volume setup helper
## Code After:
if [[ $(docker inspect --format='{{.State.Status}}' kubelet-volumes) = 'exited' ]]
then
exit
else
def_docker_root="/var/lib/docker"
def_kubelet_root="/var/lib/kubelet"
if [ -d /rootfs/etc ] && [ -f /rootfs/etc/os-release ]
then
case "$(eval `cat /rootfs/etc/os-release` ; echo $ID)" in
boot2docker)
docker_root="/mnt/sda1/${def_docker_root}"
kubelet_root="/mnt/sda1/${def_kubelet_root}"
mkdir -p "/rootfs/${kubelet_root}"
ln -sf "${kubelet_root}" "/rootfs/var/lib/kubelet"
docker_root_vol=" \
--volume=\"${docker_root}:${docker_root}:rw\" \
--volume=\"${def_docker_root}:${def_docker_root}:rw\" \
"
kubelet_root_vol=" \
--volume=\"${kubelet_root}:${def_kubelet_root}:rw\" \
"
break
;;
*)
docker_root_vol="\
--volume=\"${def_docker_root}/:${def_docker_root}:rw\" \
"
kubelet_root_vol=" \
--volume=\"${def_kubelet_root}:${def_kubelet_root}:rw\" \
"
break
;;
esac
fi
docker run \
--volume="/:/rootfs:ro" \
--volume="/sys:/sys:ro" \
--volume="/dev:/dev" \
--volume="/var/run:/var/run:rw" \
${kubelet_root_vol} \
${docker_root_vol} \
--volume="/var/run/weave/weave.sock:/weave.sock" \
--name="kubelet-volumes" \
weaveworks/kubernetes-anywhere:tools "/bin/true"
fi
|
if [[ $(docker inspect --format='{{.State.Status}}' kubelet-volumes) = 'exited' ]]
then
exit
else
- docker_root=/var/lib/docker
+ def_docker_root="/var/lib/docker"
? ++++ + +
- kubelet_root=/var/lib/kubelet
+ def_kubelet_root="/var/lib/kubelet"
? ++++ + +
if [ -d /rootfs/etc ] && [ -f /rootfs/etc/os-release ]
then
case "$(eval `cat /rootfs/etc/os-release` ; echo $ID)" in
boot2docker)
- docker_root=/mnt/sda1/var/lib/docker
? ^^^^^^^^
+ docker_root="/mnt/sda1/${def_docker_root}"
? + ^^^^^^ +++++++
- kubelet_root=/mnt/sda1/var/lib/kubelet
? ^^^^^^^^
+ kubelet_root="/mnt/sda1/${def_kubelet_root}"
? + ^^^^^^ +++++++
- mkdir -p /rootfs$kubelet_root
+ mkdir -p "/rootfs/${kubelet_root}"
? + + + ++
- ln -sf $kubelet_root /rootfs/var/lib/kubelet
+ ln -sf "${kubelet_root}" "/rootfs/var/lib/kubelet"
? + + ++ + +
+ docker_root_vol=" \
+ --volume=\"${docker_root}:${docker_root}:rw\" \
+ --volume=\"${def_docker_root}:${def_docker_root}:rw\" \
+ "
+ kubelet_root_vol=" \
+ --volume=\"${kubelet_root}:${def_kubelet_root}:rw\" \
+ "
break
;;
*)
+ docker_root_vol="\
+ --volume=\"${def_docker_root}/:${def_docker_root}:rw\" \
+ "
+ kubelet_root_vol=" \
+ --volume=\"${def_kubelet_root}:${def_kubelet_root}:rw\" \
+ "
break
;;
esac
fi
docker run \
--volume="/:/rootfs:ro" \
--volume="/sys:/sys:ro" \
--volume="/dev:/dev" \
- --volume="${docker_root}/:${docker_root}:rw" \
- --volume="${kubelet_root}/:/var/lib/kubelet:rw" \
--volume="/var/run:/var/run:rw" \
+ ${kubelet_root_vol} \
+ ${docker_root_vol} \
--volume="/var/run/weave/weave.sock:/weave.sock" \
- --name=kubelet-volumes \
+ --name="kubelet-volumes" \
? + +
- weaveworks/kubernetes-anywhere:tools /bin/true
+ weaveworks/kubernetes-anywhere:tools "/bin/true"
? + +
fi | 33 | 0.916667 | 23 | 10 |
b69f528b0251817b8a4349b7ddccdf9bf29adb39 | source/Button.js | source/Button.js | /**
_moon.Button_ is an <a href="#enyo.Button">enyo.Button</a> with Moonstone
styling applied. The color of the button may be customized by specifying a
background color.
For more information, see the documentation on
<a href='https://github.com/enyojs/enyo/wiki/Buttons'>Buttons</a> in the
Enyo Developer Guide.
*/
enyo.kind({
name : 'moon.Button',
kind : 'enyo.Button',
publiched : {
/**
_small_ is a parameter to indicates the size of button.
If it has true value, diameter of this button is 60px.
However, the tap-target for button still has 78px, so it has
invisible DOM which wrap this small button to provide wider tap zone.
*/
small : false,
},
classes : 'moon-button enyo-unselectable',
spotlight : true,
handlers: {
onSpotlightSelect : 'depress',
onSpotlightKeyUp : 'undepress'
},
depress: function() {
this.addClass('pressed');
},
undepress: function() {
this.removeClass('pressed');
},
smallChanged: function() {
this.addRemoveClass(this.small, 'small');
}
}); | /**
_moon.Button_ is an <a href="#enyo.Button">enyo.Button</a> with Moonstone
styling applied. The color of the button may be customized by specifying a
background color.
For more information, see the documentation on
<a href='https://github.com/enyojs/enyo/wiki/Buttons'>Buttons</a> in the
Enyo Developer Guide.
*/
enyo.kind({
name : 'moon.Button',
kind : 'enyo.Button',
publiched : {
/**
_small_ is a parameter to indicates the size of button.
If it has true value, diameter of this button is 60px.
However, the tap-target for button still has 78px, so it has
invisible DOM which wrap this small button to provide wider tap zone.
*/
small : false,
},
classes : 'moon-button enyo-unselectable',
spotlight : true,
handlers: {
onSpotlightSelect : 'depress',
onSpotlightKeyUp : 'undepress'
},
create: function() {
this.inherited(arguments);
this.smallChanged();
},
depress: function() {
this.addClass('pressed');
},
undepress: function() {
this.removeClass('pressed');
},
smallChanged: function() {
this.addRemoveClass('small', this.small);
}
}); | Add a call for changed method in create time | GF-5039: Add a call for changed method in create time
Enyo-DCO-1.1-Signed-off-by: David Um <david.um@lge.com>
| JavaScript | apache-2.0 | mcanthony/moonstone,enyojs/moonstone,mcanthony/moonstone,mcanthony/moonstone | javascript | ## Code Before:
/**
_moon.Button_ is an <a href="#enyo.Button">enyo.Button</a> with Moonstone
styling applied. The color of the button may be customized by specifying a
background color.
For more information, see the documentation on
<a href='https://github.com/enyojs/enyo/wiki/Buttons'>Buttons</a> in the
Enyo Developer Guide.
*/
enyo.kind({
name : 'moon.Button',
kind : 'enyo.Button',
publiched : {
/**
_small_ is a parameter to indicates the size of button.
If it has true value, diameter of this button is 60px.
However, the tap-target for button still has 78px, so it has
invisible DOM which wrap this small button to provide wider tap zone.
*/
small : false,
},
classes : 'moon-button enyo-unselectable',
spotlight : true,
handlers: {
onSpotlightSelect : 'depress',
onSpotlightKeyUp : 'undepress'
},
depress: function() {
this.addClass('pressed');
},
undepress: function() {
this.removeClass('pressed');
},
smallChanged: function() {
this.addRemoveClass(this.small, 'small');
}
});
## Instruction:
GF-5039: Add a call for changed method in create time
Enyo-DCO-1.1-Signed-off-by: David Um <david.um@lge.com>
## Code After:
/**
_moon.Button_ is an <a href="#enyo.Button">enyo.Button</a> with Moonstone
styling applied. The color of the button may be customized by specifying a
background color.
For more information, see the documentation on
<a href='https://github.com/enyojs/enyo/wiki/Buttons'>Buttons</a> in the
Enyo Developer Guide.
*/
enyo.kind({
name : 'moon.Button',
kind : 'enyo.Button',
publiched : {
/**
_small_ is a parameter to indicates the size of button.
If it has true value, diameter of this button is 60px.
However, the tap-target for button still has 78px, so it has
invisible DOM which wrap this small button to provide wider tap zone.
*/
small : false,
},
classes : 'moon-button enyo-unselectable',
spotlight : true,
handlers: {
onSpotlightSelect : 'depress',
onSpotlightKeyUp : 'undepress'
},
create: function() {
this.inherited(arguments);
this.smallChanged();
},
depress: function() {
this.addClass('pressed');
},
undepress: function() {
this.removeClass('pressed');
},
smallChanged: function() {
this.addRemoveClass('small', this.small);
}
}); | /**
_moon.Button_ is an <a href="#enyo.Button">enyo.Button</a> with Moonstone
styling applied. The color of the button may be customized by specifying a
background color.
For more information, see the documentation on
<a href='https://github.com/enyojs/enyo/wiki/Buttons'>Buttons</a> in the
Enyo Developer Guide.
*/
enyo.kind({
name : 'moon.Button',
kind : 'enyo.Button',
publiched : {
/**
_small_ is a parameter to indicates the size of button.
If it has true value, diameter of this button is 60px.
However, the tap-target for button still has 78px, so it has
invisible DOM which wrap this small button to provide wider tap zone.
*/
small : false,
},
classes : 'moon-button enyo-unselectable',
spotlight : true,
handlers: {
onSpotlightSelect : 'depress',
onSpotlightKeyUp : 'undepress'
},
+ create: function() {
+ this.inherited(arguments);
+ this.smallChanged();
+ },
+
depress: function() {
this.addClass('pressed');
},
undepress: function() {
this.removeClass('pressed');
},
smallChanged: function() {
- this.addRemoveClass(this.small, 'small');
? ---------
+ this.addRemoveClass('small', this.small);
? +++++++++
}
}); | 7 | 0.162791 | 6 | 1 |
74c792d5783e6c3939bc4eb25bc14ef5a0705737 | vendor-bin/behat/composer.json | vendor-bin/behat/composer.json | {
"require": {
"behat/behat": "^3.6",
"behat/mink": "1.7.1",
"behat/mink-extension": "^2.3",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "^1.4",
"jarnaiz/behat-junit-formatter": "^1.3",
"rdx/behat-variables": "^1.2",
"sensiolabs/behat-page-object-extension": "^2.3",
"symfony/translation": "^4.4",
"sabre/xml": "^2.2",
"guzzlehttp/guzzle": "^6.5",
"phpunit/phpunit": "^8.5",
"zendframework/zend-ldap": "^2.10"
}
}
| {
"require": {
"behat/behat": "^3.7",
"behat/mink": "1.7.1",
"behat/mink-extension": "^2.3",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "^1.4",
"jarnaiz/behat-junit-formatter": "^1.3",
"rdx/behat-variables": "^1.2",
"sensiolabs/behat-page-object-extension": "^2.3",
"symfony/translation": "^4.4",
"sabre/xml": "^2.2",
"guzzlehttp/guzzle": "^6.5",
"phpunit/phpunit": "^8.5",
"laminas/laminas-ldap": "^2.10"
}
}
| Use laminas-ldap in acceptance tests | Use laminas-ldap in acceptance tests
| JSON | agpl-3.0 | phil-davis/core,owncloud/core,owncloud/core,owncloud/core,owncloud/core,owncloud/core | json | ## Code Before:
{
"require": {
"behat/behat": "^3.6",
"behat/mink": "1.7.1",
"behat/mink-extension": "^2.3",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "^1.4",
"jarnaiz/behat-junit-formatter": "^1.3",
"rdx/behat-variables": "^1.2",
"sensiolabs/behat-page-object-extension": "^2.3",
"symfony/translation": "^4.4",
"sabre/xml": "^2.2",
"guzzlehttp/guzzle": "^6.5",
"phpunit/phpunit": "^8.5",
"zendframework/zend-ldap": "^2.10"
}
}
## Instruction:
Use laminas-ldap in acceptance tests
## Code After:
{
"require": {
"behat/behat": "^3.7",
"behat/mink": "1.7.1",
"behat/mink-extension": "^2.3",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "^1.4",
"jarnaiz/behat-junit-formatter": "^1.3",
"rdx/behat-variables": "^1.2",
"sensiolabs/behat-page-object-extension": "^2.3",
"symfony/translation": "^4.4",
"sabre/xml": "^2.2",
"guzzlehttp/guzzle": "^6.5",
"phpunit/phpunit": "^8.5",
"laminas/laminas-ldap": "^2.10"
}
}
| {
"require": {
- "behat/behat": "^3.6",
? ^
+ "behat/behat": "^3.7",
? ^
"behat/mink": "1.7.1",
"behat/mink-extension": "^2.3",
"behat/mink-goutte-driver": "^1.2",
"behat/mink-selenium2-driver": "^1.4",
"jarnaiz/behat-junit-formatter": "^1.3",
"rdx/behat-variables": "^1.2",
"sensiolabs/behat-page-object-extension": "^2.3",
"symfony/translation": "^4.4",
"sabre/xml": "^2.2",
"guzzlehttp/guzzle": "^6.5",
"phpunit/phpunit": "^8.5",
- "zendframework/zend-ldap": "^2.10"
+ "laminas/laminas-ldap": "^2.10"
}
} | 4 | 0.235294 | 2 | 2 |
e45fff968f37f558a49cf82b582d1f514a97b5af | tests/test_pool.py | tests/test_pool.py | import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
random.seed(None)
def test_select(self):
s = RandomSelector()
r = s.select([1, 2, 3])
self.assertEqual(2, r)
class TestRoundRobinSelector(unittest.TestCase):
def test_select(self):
s = RoundRobinSelector()
r = s.select([1, 2, 3])
self.assertEqual(2, r)
r = s.select([1, 2, 3])
self.assertEqual(3, r)
r = s.select([1, 2, 3])
self.assertEqual(1, r)
r = s.select([1, 2, 3])
self.assertEqual(2, r)
| import asyncio
import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector, ConnectionPool
from aioes.transport import Endpoint
from aioes.connection import Connection
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
random.seed(None)
def test_select(self):
s = RandomSelector()
r = s.select([1, 2, 3])
self.assertEqual(2, r)
class TestRoundRobinSelector(unittest.TestCase):
def test_select(self):
s = RoundRobinSelector()
r = s.select([1, 2, 3])
self.assertEqual(2, r)
r = s.select([1, 2, 3])
self.assertEqual(3, r)
r = s.select([1, 2, 3])
self.assertEqual(1, r)
r = s.select([1, 2, 3])
self.assertEqual(2, r)
class TestConnectionPool(unittest.TestCase):
def setUp(self):
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(None)
def tearDown(self):
self.loop.close()
def make_pool(self):
conn = Connection(Endpoint('localhost', 9200), loop=self.loop)
pool = ConnectionPool([conn], loop=self.loop)
self.addCleanup(pool.close)
return pool
def test_ctor(self):
pool = self.make_pool()
self.assertAlmostEqual(60, pool.dead_timeout)
self.assertAlmostEqual(5, pool.timeout_cutoff)
| Add more tests for pool | Add more tests for pool
| Python | apache-2.0 | aio-libs/aioes | python | ## Code Before:
import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
random.seed(None)
def test_select(self):
s = RandomSelector()
r = s.select([1, 2, 3])
self.assertEqual(2, r)
class TestRoundRobinSelector(unittest.TestCase):
def test_select(self):
s = RoundRobinSelector()
r = s.select([1, 2, 3])
self.assertEqual(2, r)
r = s.select([1, 2, 3])
self.assertEqual(3, r)
r = s.select([1, 2, 3])
self.assertEqual(1, r)
r = s.select([1, 2, 3])
self.assertEqual(2, r)
## Instruction:
Add more tests for pool
## Code After:
import asyncio
import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector, ConnectionPool
from aioes.transport import Endpoint
from aioes.connection import Connection
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
random.seed(None)
def test_select(self):
s = RandomSelector()
r = s.select([1, 2, 3])
self.assertEqual(2, r)
class TestRoundRobinSelector(unittest.TestCase):
def test_select(self):
s = RoundRobinSelector()
r = s.select([1, 2, 3])
self.assertEqual(2, r)
r = s.select([1, 2, 3])
self.assertEqual(3, r)
r = s.select([1, 2, 3])
self.assertEqual(1, r)
r = s.select([1, 2, 3])
self.assertEqual(2, r)
class TestConnectionPool(unittest.TestCase):
def setUp(self):
self.loop = asyncio.new_event_loop()
asyncio.set_event_loop(None)
def tearDown(self):
self.loop.close()
def make_pool(self):
conn = Connection(Endpoint('localhost', 9200), loop=self.loop)
pool = ConnectionPool([conn], loop=self.loop)
self.addCleanup(pool.close)
return pool
def test_ctor(self):
pool = self.make_pool()
self.assertAlmostEqual(60, pool.dead_timeout)
self.assertAlmostEqual(5, pool.timeout_cutoff)
| + import asyncio
import random
import unittest
- from aioes.pool import RandomSelector, RoundRobinSelector
+ from aioes.pool import RandomSelector, RoundRobinSelector, ConnectionPool
? ++++++++++++++++
+ from aioes.transport import Endpoint
+ from aioes.connection import Connection
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
random.seed(None)
def test_select(self):
s = RandomSelector()
r = s.select([1, 2, 3])
self.assertEqual(2, r)
class TestRoundRobinSelector(unittest.TestCase):
def test_select(self):
s = RoundRobinSelector()
r = s.select([1, 2, 3])
self.assertEqual(2, r)
r = s.select([1, 2, 3])
self.assertEqual(3, r)
r = s.select([1, 2, 3])
self.assertEqual(1, r)
r = s.select([1, 2, 3])
self.assertEqual(2, r)
+
+
+ class TestConnectionPool(unittest.TestCase):
+
+ def setUp(self):
+ self.loop = asyncio.new_event_loop()
+ asyncio.set_event_loop(None)
+
+ def tearDown(self):
+ self.loop.close()
+
+ def make_pool(self):
+ conn = Connection(Endpoint('localhost', 9200), loop=self.loop)
+ pool = ConnectionPool([conn], loop=self.loop)
+ self.addCleanup(pool.close)
+ return pool
+
+ def test_ctor(self):
+ pool = self.make_pool()
+ self.assertAlmostEqual(60, pool.dead_timeout)
+ self.assertAlmostEqual(5, pool.timeout_cutoff) | 26 | 0.8125 | 25 | 1 |
a9c143ef4311bc9c3f19add7812ae5750ccbf51a | src/delir-core/src/project/timelane.ts | src/delir-core/src/project/timelane.ts | // @flow
import * as _ from 'lodash'
import Layer from './layer'
import {TimelaneScheme} from './scheme/timelane'
export default class TimeLane
{
static deserialize(timelaneJson: TimelaneScheme)
{
const timelane = new TimeLane
const config = _.pick(timelaneJson.config, ['name']) as TimelaneScheme
const layers = timelaneJson.layers.map(layerJson => Layer.deserialize(layerJson))
Object.defineProperty(timelane, 'id', {value: timelaneJson.id})
timelane.layers = new Set<Layer>(layers)
Object.assign(timelane.config, config)
return timelane
}
id: string|null = null
layers: Set<Layer> = new Set()
config: {
name: string|null,
} = {
name: null
}
get name(): string { return (this.config.name as string) }
set name(name: string) { this.config.name = name }
constructor()
{
Object.seal(this)
}
toPreBSON(): Object
{
return {
id: this.id,
config: Object.assign({}, this.config),
layers: Array.from(this.layers.values()).map(layer => layer.toPreBSON()),
}
}
toJSON(): Object
{
return {
id: this.id,
config: Object.assign({}, this.config),
layers: Array.from(this.layers.values()).map(layer => layer.toJSON()),
}
}
}
| // @flow
import * as _ from 'lodash'
import Clip from './clip'
import {TimelaneScheme} from './scheme/timelane'
export default class TimeLane
{
static deserialize(timelaneJson: TimelaneScheme)
{
const timelane = new TimeLane
const config = _.pick(timelaneJson.config, ['name']) as TimelaneScheme
const layers = timelaneJson.layers.map(layerJson => Clip.deserialize(layerJson))
Object.defineProperty(timelane, 'id', {value: timelaneJson.id})
timelane.layers = new Set<Clip>(layers)
Object.assign(timelane.config, config)
return timelane
}
id: string|null = null
layers: Set<Clip> = new Set()
config: {
name: string|null,
} = {
name: null
}
get name(): string { return (this.config.name as string) }
set name(name: string) { this.config.name = name }
constructor()
{
Object.seal(this)
}
toPreBSON(): Object
{
return {
id: this.id,
config: Object.assign({}, this.config),
layers: Array.from(this.layers.values()).map(layer => layer.toPreBSON()),
}
}
toJSON(): Object
{
return {
id: this.id,
config: Object.assign({}, this.config),
layers: Array.from(this.layers.values()).map(layer => layer.toJSON()),
}
}
}
| Replace reference to clip on Timelane | Replace reference to clip on Timelane
| TypeScript | mit | Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir | typescript | ## Code Before:
// @flow
import * as _ from 'lodash'
import Layer from './layer'
import {TimelaneScheme} from './scheme/timelane'
export default class TimeLane
{
static deserialize(timelaneJson: TimelaneScheme)
{
const timelane = new TimeLane
const config = _.pick(timelaneJson.config, ['name']) as TimelaneScheme
const layers = timelaneJson.layers.map(layerJson => Layer.deserialize(layerJson))
Object.defineProperty(timelane, 'id', {value: timelaneJson.id})
timelane.layers = new Set<Layer>(layers)
Object.assign(timelane.config, config)
return timelane
}
id: string|null = null
layers: Set<Layer> = new Set()
config: {
name: string|null,
} = {
name: null
}
get name(): string { return (this.config.name as string) }
set name(name: string) { this.config.name = name }
constructor()
{
Object.seal(this)
}
toPreBSON(): Object
{
return {
id: this.id,
config: Object.assign({}, this.config),
layers: Array.from(this.layers.values()).map(layer => layer.toPreBSON()),
}
}
toJSON(): Object
{
return {
id: this.id,
config: Object.assign({}, this.config),
layers: Array.from(this.layers.values()).map(layer => layer.toJSON()),
}
}
}
## Instruction:
Replace reference to clip on Timelane
## Code After:
// @flow
import * as _ from 'lodash'
import Clip from './clip'
import {TimelaneScheme} from './scheme/timelane'
export default class TimeLane
{
static deserialize(timelaneJson: TimelaneScheme)
{
const timelane = new TimeLane
const config = _.pick(timelaneJson.config, ['name']) as TimelaneScheme
const layers = timelaneJson.layers.map(layerJson => Clip.deserialize(layerJson))
Object.defineProperty(timelane, 'id', {value: timelaneJson.id})
timelane.layers = new Set<Clip>(layers)
Object.assign(timelane.config, config)
return timelane
}
id: string|null = null
layers: Set<Clip> = new Set()
config: {
name: string|null,
} = {
name: null
}
get name(): string { return (this.config.name as string) }
set name(name: string) { this.config.name = name }
constructor()
{
Object.seal(this)
}
toPreBSON(): Object
{
return {
id: this.id,
config: Object.assign({}, this.config),
layers: Array.from(this.layers.values()).map(layer => layer.toPreBSON()),
}
}
toJSON(): Object
{
return {
id: this.id,
config: Object.assign({}, this.config),
layers: Array.from(this.layers.values()).map(layer => layer.toJSON()),
}
}
}
| // @flow
import * as _ from 'lodash'
- import Layer from './layer'
+ import Clip from './clip'
import {TimelaneScheme} from './scheme/timelane'
export default class TimeLane
{
static deserialize(timelaneJson: TimelaneScheme)
{
const timelane = new TimeLane
const config = _.pick(timelaneJson.config, ['name']) as TimelaneScheme
- const layers = timelaneJson.layers.map(layerJson => Layer.deserialize(layerJson))
? ^^^^^
+ const layers = timelaneJson.layers.map(layerJson => Clip.deserialize(layerJson))
? ^^^^
Object.defineProperty(timelane, 'id', {value: timelaneJson.id})
- timelane.layers = new Set<Layer>(layers)
? ^^^^^
+ timelane.layers = new Set<Clip>(layers)
? ^^^^
Object.assign(timelane.config, config)
return timelane
}
id: string|null = null
- layers: Set<Layer> = new Set()
? ^^^^^
+ layers: Set<Clip> = new Set()
? ^^^^
config: {
name: string|null,
} = {
name: null
}
get name(): string { return (this.config.name as string) }
set name(name: string) { this.config.name = name }
constructor()
{
Object.seal(this)
}
toPreBSON(): Object
{
return {
id: this.id,
config: Object.assign({}, this.config),
layers: Array.from(this.layers.values()).map(layer => layer.toPreBSON()),
}
}
toJSON(): Object
{
return {
id: this.id,
config: Object.assign({}, this.config),
layers: Array.from(this.layers.values()).map(layer => layer.toJSON()),
}
}
} | 8 | 0.145455 | 4 | 4 |
1d48882f832cb6fcc60a4ffcc2c8e0a063a9caee | templates/blocks/layout-base.php | templates/blocks/layout-base.php | <?php
$classes = 'block-' . get_row_layout();
?>
<section class="block-wrap <?=$classes?>">
<div class="block">
<?php cfb_template('blocks/parts/block', 'title'); ?>
<?php cfb_template('blocks/layout', get_row_layout()); ?>
</div> <!-- /block -->
</section> <!-- /block-wrap --> | <?php
$classes = 'block-' . get_row_layout();
$image = get_sub_field('background_image');
$styles = (get_sub_field('background_image')) ? 'background-image: url(' . $image['url'] . ');' : '';
$styles .= (get_sub_field('background_color')) ? 'background-color: ' . get_sub_field('background_color') . ';' : '';
?>
<section class="block-wrap <?=$classes?>" style="<?=$styles?>">
<div class="block">
<?php cfb_template('blocks/parts/block', 'title'); ?>
<?php cfb_template('blocks/layout', get_row_layout()); ?>
</div> <!-- /block -->
</section> <!-- /block-wrap --> | Implement background images and colors | Implement background images and colors
| PHP | mit | MWDelaney/acf-flexible-content-blocks,MWDelaney/acf-flexible-content-blocks | php | ## Code Before:
<?php
$classes = 'block-' . get_row_layout();
?>
<section class="block-wrap <?=$classes?>">
<div class="block">
<?php cfb_template('blocks/parts/block', 'title'); ?>
<?php cfb_template('blocks/layout', get_row_layout()); ?>
</div> <!-- /block -->
</section> <!-- /block-wrap -->
## Instruction:
Implement background images and colors
## Code After:
<?php
$classes = 'block-' . get_row_layout();
$image = get_sub_field('background_image');
$styles = (get_sub_field('background_image')) ? 'background-image: url(' . $image['url'] . ');' : '';
$styles .= (get_sub_field('background_color')) ? 'background-color: ' . get_sub_field('background_color') . ';' : '';
?>
<section class="block-wrap <?=$classes?>" style="<?=$styles?>">
<div class="block">
<?php cfb_template('blocks/parts/block', 'title'); ?>
<?php cfb_template('blocks/layout', get_row_layout()); ?>
</div> <!-- /block -->
</section> <!-- /block-wrap --> | <?php
+
- $classes = 'block-' . get_row_layout();
+ $classes = 'block-' . get_row_layout();
? +++
+
+ $image = get_sub_field('background_image');
+
+ $styles = (get_sub_field('background_image')) ? 'background-image: url(' . $image['url'] . ');' : '';
+ $styles .= (get_sub_field('background_color')) ? 'background-color: ' . get_sub_field('background_color') . ';' : '';
+
?>
- <section class="block-wrap <?=$classes?>">
+ <section class="block-wrap <?=$classes?>" style="<?=$styles?>">
? +++++++++++++++++++ ++
<div class="block">
<?php cfb_template('blocks/parts/block', 'title'); ?>
<?php cfb_template('blocks/layout', get_row_layout()); ?>
</div> <!-- /block -->
</section> <!-- /block-wrap --> | 11 | 1 | 9 | 2 |
5cb47021ac15f00e54151de0c7aefa03461a980c | bencode/misc.go | bencode/misc.go | package bencode
import (
"reflect"
"unsafe"
)
// Wow Go is retarded.
var marshalerType = reflect.TypeOf(func() *Marshaler {
var m Marshaler
return &m
}()).Elem()
// Wow Go is retarded.
var unmarshalerType = reflect.TypeOf(func() *Unmarshaler {
var i Unmarshaler
return &i
}()).Elem()
func bytesAsString(b []byte) string {
if len(b) == 0 {
return ""
}
return *(*string)(unsafe.Pointer(&reflect.StringHeader{
uintptr(unsafe.Pointer(&b[0])),
len(b),
}))
}
| package bencode
import (
"reflect"
"unsafe"
)
// Wow Go is retarded.
var marshalerType = reflect.TypeOf(func() *Marshaler {
var m Marshaler
return &m
}()).Elem()
// Wow Go is retarded.
var unmarshalerType = reflect.TypeOf(func() *Unmarshaler {
var i Unmarshaler
return &i
}()).Elem()
func bytesAsString(b []byte) string {
if len(b) == 0 {
return ""
}
// See https://github.com/golang/go/issues/40701.
var s string
hdr := (*reflect.StringHeader)(unsafe.Pointer(&s))
hdr.Data = uintptr(unsafe.Pointer(&b[0]))
hdr.Len = len(b)
return s
}
| Fix possible misuse of reflect.StringHeader | Fix possible misuse of reflect.StringHeader
| Go | mpl-2.0 | anacrolix/torrent,anacrolix/torrent | go | ## Code Before:
package bencode
import (
"reflect"
"unsafe"
)
// Wow Go is retarded.
var marshalerType = reflect.TypeOf(func() *Marshaler {
var m Marshaler
return &m
}()).Elem()
// Wow Go is retarded.
var unmarshalerType = reflect.TypeOf(func() *Unmarshaler {
var i Unmarshaler
return &i
}()).Elem()
func bytesAsString(b []byte) string {
if len(b) == 0 {
return ""
}
return *(*string)(unsafe.Pointer(&reflect.StringHeader{
uintptr(unsafe.Pointer(&b[0])),
len(b),
}))
}
## Instruction:
Fix possible misuse of reflect.StringHeader
## Code After:
package bencode
import (
"reflect"
"unsafe"
)
// Wow Go is retarded.
var marshalerType = reflect.TypeOf(func() *Marshaler {
var m Marshaler
return &m
}()).Elem()
// Wow Go is retarded.
var unmarshalerType = reflect.TypeOf(func() *Unmarshaler {
var i Unmarshaler
return &i
}()).Elem()
func bytesAsString(b []byte) string {
if len(b) == 0 {
return ""
}
// See https://github.com/golang/go/issues/40701.
var s string
hdr := (*reflect.StringHeader)(unsafe.Pointer(&s))
hdr.Data = uintptr(unsafe.Pointer(&b[0]))
hdr.Len = len(b)
return s
}
| package bencode
import (
"reflect"
"unsafe"
)
// Wow Go is retarded.
var marshalerType = reflect.TypeOf(func() *Marshaler {
var m Marshaler
return &m
}()).Elem()
// Wow Go is retarded.
var unmarshalerType = reflect.TypeOf(func() *Unmarshaler {
var i Unmarshaler
return &i
}()).Elem()
func bytesAsString(b []byte) string {
if len(b) == 0 {
return ""
}
- return *(*string)(unsafe.Pointer(&reflect.StringHeader{
+ // See https://github.com/golang/go/issues/40701.
+ var s string
+ hdr := (*reflect.StringHeader)(unsafe.Pointer(&s))
- uintptr(unsafe.Pointer(&b[0])),
? ^ -
+ hdr.Data = uintptr(unsafe.Pointer(&b[0]))
? ^^^^^^^^^^^
- len(b),
- }))
+ hdr.Len = len(b)
+ return s
} | 10 | 0.357143 | 6 | 4 |
d4a935802c90533a51053ead6f935bbc41a87214 | ui/build/bundle/systemjs.js | ui/build/bundle/systemjs.js | 'use strict'
const sourcemaps = require('gulp-sourcemaps')
const concat = require('gulp-concat')
const footer = require('gulp-footer')
const uglify = require('gulp-uglify')
const flatten = require('gulp-flatten')
const rev = require('gulp-rev')
const util = require('gulp-util')
const path = require('path')
const filenames = require('gulp-filenames')
exports.dep = ['bundle:app']
exports.fn = function (gulp, paths, mode, done) {
return gulp.src([paths.src + 'jspm_packages/system.js',
paths.src + 'app-bundle.conf.js'], { base: '.' })
.pipe(!mode.production ? sourcemaps.init({loadMaps: true}) : util.noop())
.pipe(concat('app-bootstrap.js'))
.pipe(footer('\nSystem.import(\'aurelia-bootstrapper\').catch(console.error.bind(console));'))
.pipe(uglify({mangle: mode.production}))
.pipe(flatten())
.pipe(mode.production ? rev() : util.noop())
.pipe(filenames('bootstrapjs'))
.pipe(!mode.production ? sourcemaps.write('.', {
mapSources: function (sourcePath) {
var truncatedSourcePath = sourcePath.substr(sourcePath.indexOf(path.sep) + 1)
util.log('SourcePath within source map truncated to:', util.colors.cyan(truncatedSourcePath))
return truncatedSourcePath
}
}) : util.noop())
.pipe(gulp.dest(paths.wwwroot))
}
| 'use strict'
const sourcemaps = require('gulp-sourcemaps')
const concat = require('gulp-concat')
const footer = require('gulp-footer')
const uglify = require('gulp-uglify')
const flatten = require('gulp-flatten')
const rev = require('gulp-rev')
const util = require('gulp-util')
const filenames = require('gulp-filenames')
exports.dep = ['bundle:app']
exports.fn = function (gulp, paths, mode, done) {
return gulp.src([paths.src + 'jspm_packages/system.js',
paths.src + 'app-bundle.conf.js'], { base: '.' })
.pipe(!mode.production ? sourcemaps.init({loadMaps: true}) : util.noop())
.pipe(concat('app-bootstrap.js'))
.pipe(footer('\nSystem.import(\'aurelia-bootstrapper\').catch(console.error.bind(console));'))
.pipe(uglify({mangle: mode.production}))
.pipe(flatten())
.pipe(mode.production ? rev() : util.noop())
.pipe(filenames('bootstrapjs'))
.pipe(!mode.production ? sourcemaps.write('.', {
mapSources: function (sourcePath) {
var truncatedSourcePath = sourcePath.substr(sourcePath.indexOf('/') + 1)
util.log('SourcePath within source map truncated to:', util.colors.cyan(truncatedSourcePath))
return truncatedSourcePath
}
}) : util.noop())
.pipe(gulp.dest(paths.wwwroot))
}
| Use slash instead of path.sep to have identical behavior in windows. | Use slash instead of path.sep to have identical behavior in windows.
| JavaScript | mit | jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr,jp7677/hellocoreclr | javascript | ## Code Before:
'use strict'
const sourcemaps = require('gulp-sourcemaps')
const concat = require('gulp-concat')
const footer = require('gulp-footer')
const uglify = require('gulp-uglify')
const flatten = require('gulp-flatten')
const rev = require('gulp-rev')
const util = require('gulp-util')
const path = require('path')
const filenames = require('gulp-filenames')
exports.dep = ['bundle:app']
exports.fn = function (gulp, paths, mode, done) {
return gulp.src([paths.src + 'jspm_packages/system.js',
paths.src + 'app-bundle.conf.js'], { base: '.' })
.pipe(!mode.production ? sourcemaps.init({loadMaps: true}) : util.noop())
.pipe(concat('app-bootstrap.js'))
.pipe(footer('\nSystem.import(\'aurelia-bootstrapper\').catch(console.error.bind(console));'))
.pipe(uglify({mangle: mode.production}))
.pipe(flatten())
.pipe(mode.production ? rev() : util.noop())
.pipe(filenames('bootstrapjs'))
.pipe(!mode.production ? sourcemaps.write('.', {
mapSources: function (sourcePath) {
var truncatedSourcePath = sourcePath.substr(sourcePath.indexOf(path.sep) + 1)
util.log('SourcePath within source map truncated to:', util.colors.cyan(truncatedSourcePath))
return truncatedSourcePath
}
}) : util.noop())
.pipe(gulp.dest(paths.wwwroot))
}
## Instruction:
Use slash instead of path.sep to have identical behavior in windows.
## Code After:
'use strict'
const sourcemaps = require('gulp-sourcemaps')
const concat = require('gulp-concat')
const footer = require('gulp-footer')
const uglify = require('gulp-uglify')
const flatten = require('gulp-flatten')
const rev = require('gulp-rev')
const util = require('gulp-util')
const filenames = require('gulp-filenames')
exports.dep = ['bundle:app']
exports.fn = function (gulp, paths, mode, done) {
return gulp.src([paths.src + 'jspm_packages/system.js',
paths.src + 'app-bundle.conf.js'], { base: '.' })
.pipe(!mode.production ? sourcemaps.init({loadMaps: true}) : util.noop())
.pipe(concat('app-bootstrap.js'))
.pipe(footer('\nSystem.import(\'aurelia-bootstrapper\').catch(console.error.bind(console));'))
.pipe(uglify({mangle: mode.production}))
.pipe(flatten())
.pipe(mode.production ? rev() : util.noop())
.pipe(filenames('bootstrapjs'))
.pipe(!mode.production ? sourcemaps.write('.', {
mapSources: function (sourcePath) {
var truncatedSourcePath = sourcePath.substr(sourcePath.indexOf('/') + 1)
util.log('SourcePath within source map truncated to:', util.colors.cyan(truncatedSourcePath))
return truncatedSourcePath
}
}) : util.noop())
.pipe(gulp.dest(paths.wwwroot))
}
| 'use strict'
const sourcemaps = require('gulp-sourcemaps')
const concat = require('gulp-concat')
const footer = require('gulp-footer')
const uglify = require('gulp-uglify')
const flatten = require('gulp-flatten')
const rev = require('gulp-rev')
const util = require('gulp-util')
- const path = require('path')
const filenames = require('gulp-filenames')
exports.dep = ['bundle:app']
exports.fn = function (gulp, paths, mode, done) {
return gulp.src([paths.src + 'jspm_packages/system.js',
paths.src + 'app-bundle.conf.js'], { base: '.' })
.pipe(!mode.production ? sourcemaps.init({loadMaps: true}) : util.noop())
.pipe(concat('app-bootstrap.js'))
.pipe(footer('\nSystem.import(\'aurelia-bootstrapper\').catch(console.error.bind(console));'))
.pipe(uglify({mangle: mode.production}))
.pipe(flatten())
.pipe(mode.production ? rev() : util.noop())
.pipe(filenames('bootstrapjs'))
.pipe(!mode.production ? sourcemaps.write('.', {
mapSources: function (sourcePath) {
- var truncatedSourcePath = sourcePath.substr(sourcePath.indexOf(path.sep) + 1)
? ^^^^^^^^
+ var truncatedSourcePath = sourcePath.substr(sourcePath.indexOf('/') + 1)
? ^^^
util.log('SourcePath within source map truncated to:', util.colors.cyan(truncatedSourcePath))
return truncatedSourcePath
}
}) : util.noop())
.pipe(gulp.dest(paths.wwwroot))
} | 3 | 0.09375 | 1 | 2 |
d3f058e112a15849b6109f7961979ae9b332dd81 | metlog-vault/src-server/metlog_vault/scheduler.clj | metlog-vault/src-server/metlog_vault/scheduler.clj | (ns metlog-vault.scheduler
(:use metlog-common.core)
(:require [clojure.tools.logging :as log]))
(defn start [ ]
(doto (it.sauronsoftware.cron4j.Scheduler.)
(.setDaemon true)
(.start)))
(defn schedule-job [ scheduler desc cron job-fn ]
(do
(log/info "Background job scheduled (cron:" cron "):" desc )
(.schedule scheduler cron
#(do
(log/info "Running scheduled job: " desc)
(exception-barrier job-fn (str "scheduled job:" desc))
(log/info "End scheduled job: " desc)))))
| (ns metlog-vault.scheduler
(:use metlog-common.core)
(:require [clojure.tools.logging :as log]))
(defn start [ ]
(doto (it.sauronsoftware.cron4j.Scheduler.)
(.setDaemon true)
(.start)))
(defn schedule-job [ scheduler desc cron job-fn ]
(let [ job-fn (exception-barrier job-fn (str "scheduled job:" desc))]
(log/info "Background job scheduled (cron:" cron "):" desc )
(.schedule scheduler cron
#(do
(log/info "Running scheduled job: " desc)
(job-fn)
(log/info "End scheduled job: " desc)))))
| Correct a bug that prevented scheduled jobs fromw orking at all. | Correct a bug that prevented scheduled jobs fromw orking at all.
| Clojure | epl-1.0 | mschaef/metlog | clojure | ## Code Before:
(ns metlog-vault.scheduler
(:use metlog-common.core)
(:require [clojure.tools.logging :as log]))
(defn start [ ]
(doto (it.sauronsoftware.cron4j.Scheduler.)
(.setDaemon true)
(.start)))
(defn schedule-job [ scheduler desc cron job-fn ]
(do
(log/info "Background job scheduled (cron:" cron "):" desc )
(.schedule scheduler cron
#(do
(log/info "Running scheduled job: " desc)
(exception-barrier job-fn (str "scheduled job:" desc))
(log/info "End scheduled job: " desc)))))
## Instruction:
Correct a bug that prevented scheduled jobs fromw orking at all.
## Code After:
(ns metlog-vault.scheduler
(:use metlog-common.core)
(:require [clojure.tools.logging :as log]))
(defn start [ ]
(doto (it.sauronsoftware.cron4j.Scheduler.)
(.setDaemon true)
(.start)))
(defn schedule-job [ scheduler desc cron job-fn ]
(let [ job-fn (exception-barrier job-fn (str "scheduled job:" desc))]
(log/info "Background job scheduled (cron:" cron "):" desc )
(.schedule scheduler cron
#(do
(log/info "Running scheduled job: " desc)
(job-fn)
(log/info "End scheduled job: " desc)))))
| (ns metlog-vault.scheduler
(:use metlog-common.core)
(:require [clojure.tools.logging :as log]))
(defn start [ ]
(doto (it.sauronsoftware.cron4j.Scheduler.)
(.setDaemon true)
(.start)))
(defn schedule-job [ scheduler desc cron job-fn ]
- (do
+ (let [ job-fn (exception-barrier job-fn (str "scheduled job:" desc))]
(log/info "Background job scheduled (cron:" cron "):" desc )
(.schedule scheduler cron
#(do
(log/info "Running scheduled job: " desc)
- (exception-barrier job-fn (str "scheduled job:" desc))
+ (job-fn)
(log/info "End scheduled job: " desc))))) | 4 | 0.235294 | 2 | 2 |
f7838042f1f316c5d48c843696d27b384b467d07 | plugins/reply/reply.go | plugins/reply/reply.go | package reply
import (
"regexp"
"github.com/tucnak/telebot"
"github.com/asdine/storm"
"github.com/focusshifter/muxgoob/registry"
)
type ReplyPlugin struct {
}
var db *storm.DB
func init() {
registry.RegisterPlugin(&ReplyPlugin{})
}
func (p *ReplyPlugin) Start(sharedDb *storm.DB) {
db = sharedDb
}
func (p *ReplyPlugin) Run(message telebot.Message) {
highlightedExp := regexp.MustCompile(`^.*(gooby|губи|губ(я)+н).*$`)
if highlightedExp.MatchString(message.Text) {
bot := registry.Bot
bot.SendMessage(message.Chat, "herp derp", nil)
}
}
func (p *ReplyPlugin) Stop() {
}
| package reply
import (
"regexp"
"math/rand"
"time"
"github.com/tucnak/telebot"
"github.com/asdine/storm"
"github.com/focusshifter/muxgoob/registry"
)
type ReplyPlugin struct {
}
var db *storm.DB
var rng *rand.Rand
func init() {
registry.RegisterPlugin(&ReplyPlugin{})
}
func (p *ReplyPlugin) Start(sharedDb *storm.DB) {
db = sharedDb
rng = rand.New(rand.NewSource(time.Now().UnixNano()))
}
func (p *ReplyPlugin) Run(message telebot.Message) {
bot := registry.Bot
techExp := regexp.MustCompile(`(?i)^\!ттх$`)
questionExp := regexp.MustCompile(`^.*(gooby|губи|губ(я)+н).*\?$`)
highlightedExp := regexp.MustCompile(`^.*(gooby|губи|губ(я)+н).*$`)
switch {
case techExp.MatchString(message.Text):
bot.SendMessage(message.Chat,
"ТТХ: https://drive.google.com/open?id=139ZWbP-CAV_u5nzQ6skbHRjb7eofzfdh8eA4_q7McFM",
&telebot.SendOptions{DisableWebPagePreview: true, DisableNotification: true})
case questionExp.MatchString(message.Text):
var replyText string
rngInt := rng.Int()
switch {
case rngInt % 100 == 0:
replyText = "Заткнись, пидор"
case rngInt % 2 == 0:
replyText = "Да"
default:
replyText = "Нет"
}
bot.SendMessage(message.Chat, replyText, &telebot.SendOptions{ReplyTo: message})
case highlightedExp.MatchString(message.Text):
bot.SendMessage(message.Chat, "herp derp", nil)
}
}
func (p *ReplyPlugin) Stop() {
}
| Allow to react to the questions and printing 'chat specs' | Allow to react to the questions and printing 'chat specs'
| Go | mit | focusshifter/muxgoob | go | ## Code Before:
package reply
import (
"regexp"
"github.com/tucnak/telebot"
"github.com/asdine/storm"
"github.com/focusshifter/muxgoob/registry"
)
type ReplyPlugin struct {
}
var db *storm.DB
func init() {
registry.RegisterPlugin(&ReplyPlugin{})
}
func (p *ReplyPlugin) Start(sharedDb *storm.DB) {
db = sharedDb
}
func (p *ReplyPlugin) Run(message telebot.Message) {
highlightedExp := regexp.MustCompile(`^.*(gooby|губи|губ(я)+н).*$`)
if highlightedExp.MatchString(message.Text) {
bot := registry.Bot
bot.SendMessage(message.Chat, "herp derp", nil)
}
}
func (p *ReplyPlugin) Stop() {
}
## Instruction:
Allow to react to the questions and printing 'chat specs'
## Code After:
package reply
import (
"regexp"
"math/rand"
"time"
"github.com/tucnak/telebot"
"github.com/asdine/storm"
"github.com/focusshifter/muxgoob/registry"
)
type ReplyPlugin struct {
}
var db *storm.DB
var rng *rand.Rand
func init() {
registry.RegisterPlugin(&ReplyPlugin{})
}
func (p *ReplyPlugin) Start(sharedDb *storm.DB) {
db = sharedDb
rng = rand.New(rand.NewSource(time.Now().UnixNano()))
}
func (p *ReplyPlugin) Run(message telebot.Message) {
bot := registry.Bot
techExp := regexp.MustCompile(`(?i)^\!ттх$`)
questionExp := regexp.MustCompile(`^.*(gooby|губи|губ(я)+н).*\?$`)
highlightedExp := regexp.MustCompile(`^.*(gooby|губи|губ(я)+н).*$`)
switch {
case techExp.MatchString(message.Text):
bot.SendMessage(message.Chat,
"ТТХ: https://drive.google.com/open?id=139ZWbP-CAV_u5nzQ6skbHRjb7eofzfdh8eA4_q7McFM",
&telebot.SendOptions{DisableWebPagePreview: true, DisableNotification: true})
case questionExp.MatchString(message.Text):
var replyText string
rngInt := rng.Int()
switch {
case rngInt % 100 == 0:
replyText = "Заткнись, пидор"
case rngInt % 2 == 0:
replyText = "Да"
default:
replyText = "Нет"
}
bot.SendMessage(message.Chat, replyText, &telebot.SendOptions{ReplyTo: message})
case highlightedExp.MatchString(message.Text):
bot.SendMessage(message.Chat, "herp derp", nil)
}
}
func (p *ReplyPlugin) Stop() {
}
| package reply
import (
"regexp"
+ "math/rand"
+ "time"
"github.com/tucnak/telebot"
"github.com/asdine/storm"
"github.com/focusshifter/muxgoob/registry"
)
type ReplyPlugin struct {
}
var db *storm.DB
+ var rng *rand.Rand
func init() {
registry.RegisterPlugin(&ReplyPlugin{})
}
func (p *ReplyPlugin) Start(sharedDb *storm.DB) {
db = sharedDb
+ rng = rand.New(rand.NewSource(time.Now().UnixNano()))
}
func (p *ReplyPlugin) Run(message telebot.Message) {
+ bot := registry.Bot
+
+ techExp := regexp.MustCompile(`(?i)^\!ттх$`)
+ questionExp := regexp.MustCompile(`^.*(gooby|губи|губ(я)+н).*\?$`)
highlightedExp := regexp.MustCompile(`^.*(gooby|губи|губ(я)+н).*$`)
+ switch {
- if highlightedExp.MatchString(message.Text) {
? ^^ -------- ^ ^^
+ case techExp.MatchString(message.Text):
? ^^^^^ ^^ ^
- bot := registry.Bot
+ bot.SendMessage(message.Chat,
+ "ТТХ: https://drive.google.com/open?id=139ZWbP-CAV_u5nzQ6skbHRjb7eofzfdh8eA4_q7McFM",
+ &telebot.SendOptions{DisableWebPagePreview: true, DisableNotification: true})
+ case questionExp.MatchString(message.Text):
+ var replyText string
+
+ rngInt := rng.Int()
+
+ switch {
+ case rngInt % 100 == 0:
+ replyText = "Заткнись, пидор"
+ case rngInt % 2 == 0:
+ replyText = "Да"
+ default:
+ replyText = "Нет"
+ }
+
+ bot.SendMessage(message.Chat, replyText, &telebot.SendOptions{ReplyTo: message})
+
+ case highlightedExp.MatchString(message.Text):
- bot.SendMessage(message.Chat, "herp derp", nil)
+ bot.SendMessage(message.Chat, "herp derp", nil)
? +
}
}
func (p *ReplyPlugin) Stop() {
} | 34 | 0.944444 | 31 | 3 |
48cd473c79811d04012b188978b9f007f0830d88 | api/api_test.go | api/api_test.go | package api
import (
"testing"
"github.com/chromium/hstspreload.appspot.com/database"
)
func TestCheckConnection(t *testing.T) {
ms := database.MockState{}
a := API{database.Mock{State: &ms}}
if err := a.CheckConnection(); err != nil {
t.Errorf("%s", err)
}
ms.FailCalls = true
if err := a.CheckConnection(); err == nil {
t.Errorf("connection should fail")
}
}
| package api
import (
"bytes"
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"github.com/chromium/hstspreload.appspot.com/database"
)
func TestCheckConnection(t *testing.T) {
ms := database.MockState{}
a := API{database.Mock{State: &ms}}
if err := a.CheckConnection(); err != nil {
t.Errorf("%s", err)
}
ms.FailCalls = true
if err := a.CheckConnection(); err == nil {
t.Error("connection should fail")
}
}
func TestStatus(t *testing.T) {
ms := database.MockState{}
a := API{database.Mock{State: &ms}}
w := httptest.NewRecorder()
r, err := http.NewRequest("GET", "?domain=garron.net", nil)
if err != nil {
t.Fatal(err)
}
b := &bytes.Buffer{}
w.Body = b
a.Status(w, r)
s := database.DomainState{}
if err := json.Unmarshal(w.Body.Bytes(), &s); err != nil {
t.Fatal(err)
}
if s.Name != "garron.net" {
t.Errorf("Wrong name: %s", s.Name)
}
if s.Status != database.StatusUnknown {
t.Errorf("Wrong status: %s", s.Status)
}
}
| Implement a test for api.Status(). | Implement a test for api.Status().
| Go | bsd-3-clause | chromium/hstspreload.org,chromium/hstspreload.org,chromium/hstspreload.org,chromium/hstspreload.org | go | ## Code Before:
package api
import (
"testing"
"github.com/chromium/hstspreload.appspot.com/database"
)
func TestCheckConnection(t *testing.T) {
ms := database.MockState{}
a := API{database.Mock{State: &ms}}
if err := a.CheckConnection(); err != nil {
t.Errorf("%s", err)
}
ms.FailCalls = true
if err := a.CheckConnection(); err == nil {
t.Errorf("connection should fail")
}
}
## Instruction:
Implement a test for api.Status().
## Code After:
package api
import (
"bytes"
"encoding/json"
"net/http"
"net/http/httptest"
"testing"
"github.com/chromium/hstspreload.appspot.com/database"
)
func TestCheckConnection(t *testing.T) {
ms := database.MockState{}
a := API{database.Mock{State: &ms}}
if err := a.CheckConnection(); err != nil {
t.Errorf("%s", err)
}
ms.FailCalls = true
if err := a.CheckConnection(); err == nil {
t.Error("connection should fail")
}
}
func TestStatus(t *testing.T) {
ms := database.MockState{}
a := API{database.Mock{State: &ms}}
w := httptest.NewRecorder()
r, err := http.NewRequest("GET", "?domain=garron.net", nil)
if err != nil {
t.Fatal(err)
}
b := &bytes.Buffer{}
w.Body = b
a.Status(w, r)
s := database.DomainState{}
if err := json.Unmarshal(w.Body.Bytes(), &s); err != nil {
t.Fatal(err)
}
if s.Name != "garron.net" {
t.Errorf("Wrong name: %s", s.Name)
}
if s.Status != database.StatusUnknown {
t.Errorf("Wrong status: %s", s.Status)
}
}
| package api
import (
+ "bytes"
+ "encoding/json"
+ "net/http"
+ "net/http/httptest"
"testing"
"github.com/chromium/hstspreload.appspot.com/database"
)
func TestCheckConnection(t *testing.T) {
ms := database.MockState{}
a := API{database.Mock{State: &ms}}
if err := a.CheckConnection(); err != nil {
t.Errorf("%s", err)
}
ms.FailCalls = true
if err := a.CheckConnection(); err == nil {
- t.Errorf("connection should fail")
? -
+ t.Error("connection should fail")
}
}
+
+ func TestStatus(t *testing.T) {
+ ms := database.MockState{}
+ a := API{database.Mock{State: &ms}}
+
+ w := httptest.NewRecorder()
+
+ r, err := http.NewRequest("GET", "?domain=garron.net", nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ b := &bytes.Buffer{}
+ w.Body = b
+
+ a.Status(w, r)
+
+ s := database.DomainState{}
+ if err := json.Unmarshal(w.Body.Bytes(), &s); err != nil {
+ t.Fatal(err)
+ }
+
+ if s.Name != "garron.net" {
+ t.Errorf("Wrong name: %s", s.Name)
+ }
+ if s.Status != database.StatusUnknown {
+ t.Errorf("Wrong status: %s", s.Status)
+ }
+
+ } | 36 | 1.8 | 35 | 1 |
ada4bb463b09917fe0749e1e32025654e5879a18 | .travis.yml | .travis.yml | sudo: required
language: go
go:
- "1.10.x"
- 1.x
- tip
matrix:
allow_failures:
- go: tip
env:
- GO111MODULE=on
addons:
ssh_known_hosts: github.com
apt:
update: true
packages:
- docker-ce
services:
- docker
before_install:
- sudo sysctl -w vm.max_map_count=262144
# - docker run -d --rm -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch:6.3.2 elasticsearch -Enetwork.host=_local_,_site_ -Enetwork.publish_host=_local_
- docker-compose pull
- docker-compose up -d
- sleep 15
- go get -u github.com/fortytw2/leaktest
- go get . ./config ./aws ./trace/...
install: true # ignore the go get -t -v ./...
script:
- go test -race -v . ./config ./aws ./trace/...
| sudo: required
language: go
go:
- "1.10.x"
- 1.x
- tip
matrix:
allow_failures:
- go: tip
env:
- GO111MODULE=on
addons:
ssh_known_hosts: github.com
apt:
update: true
packages:
- docker-ce
services:
- docker
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" && ! $(which nc) ]] ; then sudo apt-get install -y netcat ; fi
- sudo sysctl -w vm.max_map_count=262144
# - docker run -d --rm -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch:6.3.2 elasticsearch -Enetwork.host=_local_,_site_ -Enetwork.publish_host=_local_
- docker-compose pull
- docker-compose up -d
- go get -u github.com/fortytw2/leaktest
- go get . ./config ./aws ./trace/...
- while ! nc -z localhost 9200; do sleep 1; done
- while ! nc -z localhost 9210; do sleep 1; done
install: true # ignore the go get -t -v ./...
script:
- go test -race -v . ./config ./aws ./trace/...
| Optimize Travis waiting for ES | ci: Optimize Travis waiting for ES
| YAML | mit | guilherme-santos/elastic,olivere/elastic,olivere/elastic,guilherme-santos/elastic | yaml | ## Code Before:
sudo: required
language: go
go:
- "1.10.x"
- 1.x
- tip
matrix:
allow_failures:
- go: tip
env:
- GO111MODULE=on
addons:
ssh_known_hosts: github.com
apt:
update: true
packages:
- docker-ce
services:
- docker
before_install:
- sudo sysctl -w vm.max_map_count=262144
# - docker run -d --rm -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch:6.3.2 elasticsearch -Enetwork.host=_local_,_site_ -Enetwork.publish_host=_local_
- docker-compose pull
- docker-compose up -d
- sleep 15
- go get -u github.com/fortytw2/leaktest
- go get . ./config ./aws ./trace/...
install: true # ignore the go get -t -v ./...
script:
- go test -race -v . ./config ./aws ./trace/...
## Instruction:
ci: Optimize Travis waiting for ES
## Code After:
sudo: required
language: go
go:
- "1.10.x"
- 1.x
- tip
matrix:
allow_failures:
- go: tip
env:
- GO111MODULE=on
addons:
ssh_known_hosts: github.com
apt:
update: true
packages:
- docker-ce
services:
- docker
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" && ! $(which nc) ]] ; then sudo apt-get install -y netcat ; fi
- sudo sysctl -w vm.max_map_count=262144
# - docker run -d --rm -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch:6.3.2 elasticsearch -Enetwork.host=_local_,_site_ -Enetwork.publish_host=_local_
- docker-compose pull
- docker-compose up -d
- go get -u github.com/fortytw2/leaktest
- go get . ./config ./aws ./trace/...
- while ! nc -z localhost 9200; do sleep 1; done
- while ! nc -z localhost 9210; do sleep 1; done
install: true # ignore the go get -t -v ./...
script:
- go test -race -v . ./config ./aws ./trace/...
| sudo: required
language: go
go:
- "1.10.x"
- 1.x
- tip
matrix:
allow_failures:
- go: tip
env:
- GO111MODULE=on
addons:
ssh_known_hosts: github.com
apt:
update: true
packages:
- docker-ce
services:
- docker
before_install:
+ - if [[ "$TRAVIS_OS_NAME" == "linux" && ! $(which nc) ]] ; then sudo apt-get install -y netcat ; fi
- sudo sysctl -w vm.max_map_count=262144
# - docker run -d --rm -p 9200:9200 -e "http.host=0.0.0.0" -e "transport.host=127.0.0.1" -e "bootstrap.memory_lock=true" -e "ES_JAVA_OPTS=-Xms1g -Xmx1g" docker.elastic.co/elasticsearch/elasticsearch:6.3.2 elasticsearch -Enetwork.host=_local_,_site_ -Enetwork.publish_host=_local_
- docker-compose pull
- docker-compose up -d
- - sleep 15
- go get -u github.com/fortytw2/leaktest
- go get . ./config ./aws ./trace/...
+ - while ! nc -z localhost 9200; do sleep 1; done
+ - while ! nc -z localhost 9210; do sleep 1; done
install: true # ignore the go get -t -v ./...
script:
- go test -race -v . ./config ./aws ./trace/... | 4 | 0.133333 | 3 | 1 |
4a63168155599c4a97ec76a24f054d68394c6361 | lib/tasks/go.rake | lib/tasks/go.rake | desc "Run the exercise specs"
task :go => "spec:exercises"
| desc "Run the exercise specs"
RSpec::Core::RakeTask.new(:go => "spec:prepare") do |t|
t.pattern = "./exercises/**/*_spec.rb"
t.rspec_opts = "--fail-fast --format documentation"
end | Make Rspec fail on first error (--fail-fast) so as to not overwhelm gym members | Make Rspec fail on first error (--fail-fast) so as to not overwhelm gym members
| Ruby | mit | eliotsykes/rails-activerecord-aerobics,eliotsykes/rails-activerecord-aerobics | ruby | ## Code Before:
desc "Run the exercise specs"
task :go => "spec:exercises"
## Instruction:
Make Rspec fail on first error (--fail-fast) so as to not overwhelm gym members
## Code After:
desc "Run the exercise specs"
RSpec::Core::RakeTask.new(:go => "spec:prepare") do |t|
t.pattern = "./exercises/**/*_spec.rb"
t.rspec_opts = "--fail-fast --format documentation"
end | desc "Run the exercise specs"
- task :go => "spec:exercises"
+ RSpec::Core::RakeTask.new(:go => "spec:prepare") do |t|
+ t.pattern = "./exercises/**/*_spec.rb"
+ t.rspec_opts = "--fail-fast --format documentation"
+ end | 5 | 2.5 | 4 | 1 |
715db68e01b0aa8fd12857b5c3aec9f70f5e488f | app/views/students/index.html.erb | app/views/students/index.html.erb | <div class="container">
<h1>Students overview</h1><br /><br />
<div class="row-fluid">
<div class="span8">
<ul>
<% @students.each do |student| %>
<li>
<div>
<p><%= link_to student.full_name, student_path(student) %></p>
<p><%= link_to student.group.name, group_path(student.group.id) %></p>
</div>
</li>
<% end %>
</ul>
</div>
<div class="sidebar span4">
<p>Not on this list? Register now!</p>
<%= link_to "register", new_student_path, :class => 'btn btn-primary' %>
</div>
</div>
</div> | <div class="container">
<h1>Students overview</h1><br /><br />
<div class="row-fluid">
<div class="span8">
<ul>
<% @students.each do |student| %>
<li>
<div>
<p><%= link_to student.full_name, student_path(student) %></p>
<p><%= link_to student.group.name, group_path(student.group.id) if student.group %></p>
</div>
</li>
<% end %>
</ul>
</div>
<div class="sidebar span4">
<p>Not on this list? Register now!</p>
<%= link_to "register", new_student_path, :class => 'btn btn-primary' %>
</div>
</div>
</div> | Add conditions for student index | Add conditions for student index
Before there was an error if you wanted to go to the students index site if there weren't any groups yet. | HTML+ERB | agpl-3.0 | dondonz/rorganize.it,dondonz/rorganize.it,dondonz/rorganize.it,rubycorns/rorganize.it,rubycorns/rorganize.it,rubycorns/rorganize.it,dondonz/rorganize.it,rubycorns/rorganize.it | html+erb | ## Code Before:
<div class="container">
<h1>Students overview</h1><br /><br />
<div class="row-fluid">
<div class="span8">
<ul>
<% @students.each do |student| %>
<li>
<div>
<p><%= link_to student.full_name, student_path(student) %></p>
<p><%= link_to student.group.name, group_path(student.group.id) %></p>
</div>
</li>
<% end %>
</ul>
</div>
<div class="sidebar span4">
<p>Not on this list? Register now!</p>
<%= link_to "register", new_student_path, :class => 'btn btn-primary' %>
</div>
</div>
</div>
## Instruction:
Add conditions for student index
Before there was an error if you wanted to go to the students index site if there weren't any groups yet.
## Code After:
<div class="container">
<h1>Students overview</h1><br /><br />
<div class="row-fluid">
<div class="span8">
<ul>
<% @students.each do |student| %>
<li>
<div>
<p><%= link_to student.full_name, student_path(student) %></p>
<p><%= link_to student.group.name, group_path(student.group.id) if student.group %></p>
</div>
</li>
<% end %>
</ul>
</div>
<div class="sidebar span4">
<p>Not on this list? Register now!</p>
<%= link_to "register", new_student_path, :class => 'btn btn-primary' %>
</div>
</div>
</div> | <div class="container">
<h1>Students overview</h1><br /><br />
<div class="row-fluid">
<div class="span8">
<ul>
<% @students.each do |student| %>
<li>
<div>
<p><%= link_to student.full_name, student_path(student) %></p>
- <p><%= link_to student.group.name, group_path(student.group.id) %></p>
+ <p><%= link_to student.group.name, group_path(student.group.id) if student.group %></p>
? +++++++++++++++++
</div>
</li>
<% end %>
</ul>
</div>
<div class="sidebar span4">
<p>Not on this list? Register now!</p>
<%= link_to "register", new_student_path, :class => 'btn btn-primary' %>
</div>
</div>
</div> | 2 | 0.095238 | 1 | 1 |
c2da929ad40ba264745ec9c1a3002e50280dec3f | plasmoid/contents/ui/helpers/SingleShot.qml | plasmoid/contents/ui/helpers/SingleShot.qml | import QtQuick 2.0
Item {
Component {
id: compCaller
Timer {}
}
function queueCall() {
if (!arguments)
return
// first param fn, then just run it with args if any
if (typeof arguments[0] === 'function') {
var fn = arguments[0]
var delay = 0
if (arguments.length > 1)
var copyargs = [].splice.call(arguments,1)
}
// NOP
else if (arguments.length < 2)
return
// first arg delay, second fn, run with args if any
else {
delay = arguments[0]
fn = arguments[1]
if (arguments.length > 2)
copyargs = [].splice.call(arguments,2)
}
var caller = compCaller.createObject(null, { interval: delay, running: true })
caller.triggered.connect(function()
{
fn.apply(null, copyargs || [])
caller.destroy()
})
}
}
| import QtQuick 2.0
Item {
Component {
id: compCaller
Timer {}
}
function queueCall() {
if (!arguments)
return
const len = arguments.length
// check first param fn, run it with args if any
if (typeof arguments[0] === 'function') {
var delay = 0
var fn = arguments[0]
var copyargs = len > 1
? [].splice.call(arguments,1)
: []
// first arg delay, second fn, run with args if any
} else if (len >= 2) {
delay = arguments[0]
fn = arguments[1]
copyargs = len > 2
? [].splice.call(arguments,2)
: []
// NOP
} else {
console.warn('Invalid arg list: ' + arguments)
return
}
var caller = compCaller.createObject(null, {interval: delay, running: true})
caller.triggered.connect(() => {
fn.apply(null, copyargs)
caller.destroy()
})
}
}
| Clean up; add warning for invalid call args | Clean up; add warning for invalid call args
| QML | mit | noee/mcwsplasmoid | qml | ## Code Before:
import QtQuick 2.0
Item {
Component {
id: compCaller
Timer {}
}
function queueCall() {
if (!arguments)
return
// first param fn, then just run it with args if any
if (typeof arguments[0] === 'function') {
var fn = arguments[0]
var delay = 0
if (arguments.length > 1)
var copyargs = [].splice.call(arguments,1)
}
// NOP
else if (arguments.length < 2)
return
// first arg delay, second fn, run with args if any
else {
delay = arguments[0]
fn = arguments[1]
if (arguments.length > 2)
copyargs = [].splice.call(arguments,2)
}
var caller = compCaller.createObject(null, { interval: delay, running: true })
caller.triggered.connect(function()
{
fn.apply(null, copyargs || [])
caller.destroy()
})
}
}
## Instruction:
Clean up; add warning for invalid call args
## Code After:
import QtQuick 2.0
Item {
Component {
id: compCaller
Timer {}
}
function queueCall() {
if (!arguments)
return
const len = arguments.length
// check first param fn, run it with args if any
if (typeof arguments[0] === 'function') {
var delay = 0
var fn = arguments[0]
var copyargs = len > 1
? [].splice.call(arguments,1)
: []
// first arg delay, second fn, run with args if any
} else if (len >= 2) {
delay = arguments[0]
fn = arguments[1]
copyargs = len > 2
? [].splice.call(arguments,2)
: []
// NOP
} else {
console.warn('Invalid arg list: ' + arguments)
return
}
var caller = compCaller.createObject(null, {interval: delay, running: true})
caller.triggered.connect(() => {
fn.apply(null, copyargs)
caller.destroy()
})
}
}
| import QtQuick 2.0
Item {
Component {
id: compCaller
Timer {}
}
function queueCall() {
if (!arguments)
return
+ const len = arguments.length
+
- // first param fn, then just run it with args if any
? ----------
+ // check first param fn, run it with args if any
? ++++++
if (typeof arguments[0] === 'function') {
+ var delay = 0
var fn = arguments[0]
+ var copyargs = len > 1
- var delay = 0
- if (arguments.length > 1)
- var copyargs = [].splice.call(arguments,1)
? --- -------- ^
+ ? [].splice.call(arguments,1)
? ^^^^^^^^^^^
+ : []
+
- }
- // NOP
- else if (arguments.length < 2)
- return
// first arg delay, second fn, run with args if any
- else {
+ } else if (len >= 2) {
delay = arguments[0]
fn = arguments[1]
- if (arguments.length > 2)
+ copyargs = len > 2
- copyargs = [].splice.call(arguments,2)
? -------- ^
+ ? [].splice.call(arguments,2)
? ^^^^^^^
+ : []
+
+ // NOP
+ } else {
+ console.warn('Invalid arg list: ' + arguments)
+ return
}
- var caller = compCaller.createObject(null, { interval: delay, running: true })
? - -
+ var caller = compCaller.createObject(null, {interval: delay, running: true})
- caller.triggered.connect(function()
? --------
+ caller.triggered.connect(() => {
? +++++
- {
- fn.apply(null, copyargs || [])
? ------
+ fn.apply(null, copyargs)
caller.destroy()
})
}
} | 35 | 0.897436 | 20 | 15 |
df4197475e175e4885699a6ec561541c13e49f75 | client/ide/fs/fsfolder.coffee | client/ide/fs/fsfolder.coffee | class FSFolder extends FSFile
fetchContents:(callback, dontWatch=yes)->
{ treeController } = @getOptions()
@emit "fs.job.started"
@vmController.run
method : 'fs.readDirectory'
vmName : @vmName
withArgs :
onChange : if dontWatch then null else (change)=>
FSHelper.folderOnChange @vmName, @path, change, treeController
path : FSHelper.plainPath @path
, (err, response)=>
if not err and response?.files
files = FSHelper.parseWatcher @vmName, @path, response.files, treeController
@registerWatcher response
@emit "fs.job.finished", err, files
else
@emit "fs.job.finished", err
callback? err, files
save:(callback)->
@emit "fs.save.started"
@vmController.run
vmName : @vmName
method : 'fs.createDirectory'
withArgs :
path : FSHelper.plainPath @path
, (err, res)=>
if err then warn err
@emit "fs.save.finished", err, res
callback? err, res
saveAs:(callback)->
log 'Not implemented yet.'
callback? null
remove:(callback)->
@off 'fs.delete.finished'
@on 'fs.delete.finished', =>
return unless finder = KD.getSingleton 'finderController'
finder.stopWatching @path
super callback, yes
registerWatcher:(response)->
{@stopWatching} = response
finder = KD.getSingleton 'finderController'
return unless finder
finder.registerWatcher @path, @stopWatching if @stopWatching | class FSFolder extends FSFile
fetchContents:(callback, dontWatch=yes)->
{ treeController } = @getOptions()
@emit "fs.job.started"
@vmController.run
method : 'fs.readDirectory'
vmName : @vmName
withArgs :
onChange : if dontWatch then null else (change)=>
FSHelper.folderOnChange @vmName, @path, change, treeController
path : FSHelper.plainPath @path
, (err, response)=>
if not err and response?.files
files = FSHelper.parseWatcher @vmName, @path, response.files, treeController
@registerWatcher response
@emit "fs.job.finished", err, files
else
@emit "fs.job.finished", err
callback? err, files
save:(callback)->
@emit "fs.save.started"
@vmController.run
vmName : @vmName
method : 'fs.createDirectory'
withArgs :
path : FSHelper.plainPath @path
, (err, res)=>
if err then warn err
@emit "fs.save.finished", err, res
callback? err, res
saveAs:(callback)->
log 'Not implemented yet.'
callback? null
remove:(callback)->
@off 'fs.delete.finished'
@on 'fs.delete.finished', =>
finder = @treeController.delegate
finder?.stopWatching @path
super callback, yes
registerWatcher:(response)->
{@stopWatching} = response
finder = @treeController.delegate
finder?.registerWatcher @path, @stopWatching if @stopWatching | Use treeController's delegate as FinderController since there is no more FinderController singleton | FSFolder: Use treeController's delegate as FinderController since there is no more FinderController singleton
| CoffeeScript | agpl-3.0 | acbodine/koding,koding/koding,mertaytore/koding,kwagdy/koding-1,jack89129/koding,cihangir/koding,szkl/koding,mertaytore/koding,mertaytore/koding,usirin/koding,jack89129/koding,rjeczalik/koding,usirin/koding,koding/koding,andrewjcasal/koding,jack89129/koding,rjeczalik/koding,drewsetski/koding,alex-ionochkin/koding,gokmen/koding,drewsetski/koding,cihangir/koding,sinan/koding,szkl/koding,sinan/koding,sinan/koding,jack89129/koding,gokmen/koding,usirin/koding,acbodine/koding,cihangir/koding,szkl/koding,koding/koding,mertaytore/koding,andrewjcasal/koding,cihangir/koding,andrewjcasal/koding,koding/koding,jack89129/koding,kwagdy/koding-1,gokmen/koding,mertaytore/koding,cihangir/koding,rjeczalik/koding,acbodine/koding,drewsetski/koding,andrewjcasal/koding,kwagdy/koding-1,acbodine/koding,mertaytore/koding,drewsetski/koding,sinan/koding,cihangir/koding,sinan/koding,usirin/koding,jack89129/koding,gokmen/koding,usirin/koding,alex-ionochkin/koding,acbodine/koding,koding/koding,alex-ionochkin/koding,rjeczalik/koding,kwagdy/koding-1,andrewjcasal/koding,koding/koding,alex-ionochkin/koding,andrewjcasal/koding,gokmen/koding,sinan/koding,usirin/koding,gokmen/koding,drewsetski/koding,mertaytore/koding,kwagdy/koding-1,mertaytore/koding,gokmen/koding,kwagdy/koding-1,rjeczalik/koding,alex-ionochkin/koding,jack89129/koding,szkl/koding,acbodine/koding,kwagdy/koding-1,drewsetski/koding,acbodine/koding,rjeczalik/koding,alex-ionochkin/koding,koding/koding,andrewjcasal/koding,szkl/koding,cihangir/koding,sinan/koding,usirin/koding,acbodine/koding,cihangir/koding,usirin/koding,rjeczalik/koding,koding/koding,gokmen/koding,rjeczalik/koding,szkl/koding,szkl/koding,drewsetski/koding,szkl/koding,alex-ionochkin/koding,kwagdy/koding-1,sinan/koding,andrewjcasal/koding,alex-ionochkin/koding,jack89129/koding,drewsetski/koding | coffeescript | ## Code Before:
class FSFolder extends FSFile
fetchContents:(callback, dontWatch=yes)->
{ treeController } = @getOptions()
@emit "fs.job.started"
@vmController.run
method : 'fs.readDirectory'
vmName : @vmName
withArgs :
onChange : if dontWatch then null else (change)=>
FSHelper.folderOnChange @vmName, @path, change, treeController
path : FSHelper.plainPath @path
, (err, response)=>
if not err and response?.files
files = FSHelper.parseWatcher @vmName, @path, response.files, treeController
@registerWatcher response
@emit "fs.job.finished", err, files
else
@emit "fs.job.finished", err
callback? err, files
save:(callback)->
@emit "fs.save.started"
@vmController.run
vmName : @vmName
method : 'fs.createDirectory'
withArgs :
path : FSHelper.plainPath @path
, (err, res)=>
if err then warn err
@emit "fs.save.finished", err, res
callback? err, res
saveAs:(callback)->
log 'Not implemented yet.'
callback? null
remove:(callback)->
@off 'fs.delete.finished'
@on 'fs.delete.finished', =>
return unless finder = KD.getSingleton 'finderController'
finder.stopWatching @path
super callback, yes
registerWatcher:(response)->
{@stopWatching} = response
finder = KD.getSingleton 'finderController'
return unless finder
finder.registerWatcher @path, @stopWatching if @stopWatching
## Instruction:
FSFolder: Use treeController's delegate as FinderController since there is no more FinderController singleton
## Code After:
class FSFolder extends FSFile
fetchContents:(callback, dontWatch=yes)->
{ treeController } = @getOptions()
@emit "fs.job.started"
@vmController.run
method : 'fs.readDirectory'
vmName : @vmName
withArgs :
onChange : if dontWatch then null else (change)=>
FSHelper.folderOnChange @vmName, @path, change, treeController
path : FSHelper.plainPath @path
, (err, response)=>
if not err and response?.files
files = FSHelper.parseWatcher @vmName, @path, response.files, treeController
@registerWatcher response
@emit "fs.job.finished", err, files
else
@emit "fs.job.finished", err
callback? err, files
save:(callback)->
@emit "fs.save.started"
@vmController.run
vmName : @vmName
method : 'fs.createDirectory'
withArgs :
path : FSHelper.plainPath @path
, (err, res)=>
if err then warn err
@emit "fs.save.finished", err, res
callback? err, res
saveAs:(callback)->
log 'Not implemented yet.'
callback? null
remove:(callback)->
@off 'fs.delete.finished'
@on 'fs.delete.finished', =>
finder = @treeController.delegate
finder?.stopWatching @path
super callback, yes
registerWatcher:(response)->
{@stopWatching} = response
finder = @treeController.delegate
finder?.registerWatcher @path, @stopWatching if @stopWatching | class FSFolder extends FSFile
fetchContents:(callback, dontWatch=yes)->
{ treeController } = @getOptions()
@emit "fs.job.started"
@vmController.run
method : 'fs.readDirectory'
vmName : @vmName
withArgs :
onChange : if dontWatch then null else (change)=>
FSHelper.folderOnChange @vmName, @path, change, treeController
path : FSHelper.plainPath @path
, (err, response)=>
if not err and response?.files
files = FSHelper.parseWatcher @vmName, @path, response.files, treeController
@registerWatcher response
@emit "fs.job.finished", err, files
else
@emit "fs.job.finished", err
callback? err, files
save:(callback)->
@emit "fs.save.started"
@vmController.run
vmName : @vmName
method : 'fs.createDirectory'
withArgs :
path : FSHelper.plainPath @path
, (err, res)=>
if err then warn err
@emit "fs.save.finished", err, res
callback? err, res
saveAs:(callback)->
log 'Not implemented yet.'
callback? null
remove:(callback)->
@off 'fs.delete.finished'
@on 'fs.delete.finished', =>
- return unless finder = KD.getSingleton 'finderController'
+ finder = @treeController.delegate
- finder.stopWatching @path
+ finder?.stopWatching @path
? +
super callback, yes
registerWatcher:(response)->
{@stopWatching} = response
+ finder = @treeController.delegate
- finder = KD.getSingleton 'finderController'
- return unless finder
- finder.registerWatcher @path, @stopWatching if @stopWatching
+ finder?.registerWatcher @path, @stopWatching if @stopWatching
? +
| 9 | 0.169811 | 4 | 5 |
8379e1299f01057c069747db8d641a6fbf9755fd | server/controllers/list.controller.js | server/controllers/list.controller.js | 'use strict';
var db = require('../config/neo4j').db;
var List = require('../models/List.model');
exports.show = function(req, res) {
List.show(req.params.id, function(err, data) {
if (err) {
return handleError(res, err);
}
res.status(200).json(data);
})
}
// Use this to handle errors
var handleError = function(res, err) {
return res.status(500).send(err);
};
| 'use strict';
var db = require('../config/neo4j').db;
var List = require('../models/List.model');
exports.show = function(req, res) {
List.show(req.params.id, function(err, data) {
if (err) {
return handleError(res, err);
}
res.status(200).json({itemArray: data});
})
}
// Use this to handle errors
var handleError = function(res, err) {
return res.status(500).send(err);
};
| Refactor result data from list API route | Refactor result data from list API route
| JavaScript | mit | Plateful/plateful-mobile,Plateful/plateful-mobile | javascript | ## Code Before:
'use strict';
var db = require('../config/neo4j').db;
var List = require('../models/List.model');
exports.show = function(req, res) {
List.show(req.params.id, function(err, data) {
if (err) {
return handleError(res, err);
}
res.status(200).json(data);
})
}
// Use this to handle errors
var handleError = function(res, err) {
return res.status(500).send(err);
};
## Instruction:
Refactor result data from list API route
## Code After:
'use strict';
var db = require('../config/neo4j').db;
var List = require('../models/List.model');
exports.show = function(req, res) {
List.show(req.params.id, function(err, data) {
if (err) {
return handleError(res, err);
}
res.status(200).json({itemArray: data});
})
}
// Use this to handle errors
var handleError = function(res, err) {
return res.status(500).send(err);
};
| 'use strict';
var db = require('../config/neo4j').db;
var List = require('../models/List.model');
exports.show = function(req, res) {
List.show(req.params.id, function(err, data) {
if (err) {
return handleError(res, err);
}
- res.status(200).json(data);
+ res.status(200).json({itemArray: data});
? ++++++++++++ +
})
}
// Use this to handle errors
var handleError = function(res, err) {
return res.status(500).send(err);
}; | 2 | 0.111111 | 1 | 1 |
ddeabd76c4277c35d1e583d1a2034ba2c047d128 | spacy/__init__.py | spacy/__init__.py | import pathlib
from .util import set_lang_class, get_lang_class
from . import en
from . import de
from . import zh
try:
basestring
except NameError:
basestring = str
set_lang_class(en.English.lang, en.English)
set_lang_class(de.German.lang, de.German)
set_lang_class(zh.Chinese.lang, zh.Chinese)
def load(name, **overrides):
target_name, target_version = util.split_data_name(name)
path = overrides.get('path', util.get_data_path())
path = util.match_best_version(target_name, target_version, path)
if isinstance(overrides.get('vectors'), basestring):
vectors = util.match_best_version(overrides.get('vectors'), None, path)
cls = get_lang_class(target_name)
return cls(path=path, **overrides)
| import pathlib
from .util import set_lang_class, get_lang_class
from . import en
from . import de
from . import zh
try:
basestring
except NameError:
basestring = str
set_lang_class(en.English.lang, en.English)
set_lang_class(de.German.lang, de.German)
set_lang_class(zh.Chinese.lang, zh.Chinese)
def load(name, **overrides):
target_name, target_version = util.split_data_name(name)
path = overrides.get('path', util.get_data_path())
path = util.match_best_version(target_name, target_version, path)
if isinstance(overrides.get('vectors'), basestring):
vectors_path = util.match_best_version(overrides.get('vectors'), None, path)
overrides['vectors'] = lambda nlp: nlp.vocab.load_vectors_from_bin_loc(
vectors_path / 'vocab' / 'vec.bin')
cls = get_lang_class(target_name)
return cls(path=path, **overrides)
| Fix mistake loading GloVe vectors. GloVe vectors now loaded by default if present, as promised. | Fix mistake loading GloVe vectors. GloVe vectors now loaded by default if present, as promised.
| Python | mit | spacy-io/spaCy,raphael0202/spaCy,raphael0202/spaCy,explosion/spaCy,Gregory-Howard/spaCy,spacy-io/spaCy,oroszgy/spaCy.hu,honnibal/spaCy,banglakit/spaCy,recognai/spaCy,raphael0202/spaCy,oroszgy/spaCy.hu,spacy-io/spaCy,oroszgy/spaCy.hu,spacy-io/spaCy,banglakit/spaCy,explosion/spaCy,Gregory-Howard/spaCy,recognai/spaCy,banglakit/spaCy,explosion/spaCy,raphael0202/spaCy,raphael0202/spaCy,aikramer2/spaCy,oroszgy/spaCy.hu,aikramer2/spaCy,explosion/spaCy,honnibal/spaCy,honnibal/spaCy,Gregory-Howard/spaCy,oroszgy/spaCy.hu,recognai/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,explosion/spaCy,aikramer2/spaCy,Gregory-Howard/spaCy,aikramer2/spaCy,spacy-io/spaCy,explosion/spaCy,oroszgy/spaCy.hu,Gregory-Howard/spaCy,aikramer2/spaCy,recognai/spaCy,banglakit/spaCy,Gregory-Howard/spaCy,recognai/spaCy,aikramer2/spaCy,banglakit/spaCy,banglakit/spaCy,raphael0202/spaCy | python | ## Code Before:
import pathlib
from .util import set_lang_class, get_lang_class
from . import en
from . import de
from . import zh
try:
basestring
except NameError:
basestring = str
set_lang_class(en.English.lang, en.English)
set_lang_class(de.German.lang, de.German)
set_lang_class(zh.Chinese.lang, zh.Chinese)
def load(name, **overrides):
target_name, target_version = util.split_data_name(name)
path = overrides.get('path', util.get_data_path())
path = util.match_best_version(target_name, target_version, path)
if isinstance(overrides.get('vectors'), basestring):
vectors = util.match_best_version(overrides.get('vectors'), None, path)
cls = get_lang_class(target_name)
return cls(path=path, **overrides)
## Instruction:
Fix mistake loading GloVe vectors. GloVe vectors now loaded by default if present, as promised.
## Code After:
import pathlib
from .util import set_lang_class, get_lang_class
from . import en
from . import de
from . import zh
try:
basestring
except NameError:
basestring = str
set_lang_class(en.English.lang, en.English)
set_lang_class(de.German.lang, de.German)
set_lang_class(zh.Chinese.lang, zh.Chinese)
def load(name, **overrides):
target_name, target_version = util.split_data_name(name)
path = overrides.get('path', util.get_data_path())
path = util.match_best_version(target_name, target_version, path)
if isinstance(overrides.get('vectors'), basestring):
vectors_path = util.match_best_version(overrides.get('vectors'), None, path)
overrides['vectors'] = lambda nlp: nlp.vocab.load_vectors_from_bin_loc(
vectors_path / 'vocab' / 'vec.bin')
cls = get_lang_class(target_name)
return cls(path=path, **overrides)
| import pathlib
from .util import set_lang_class, get_lang_class
from . import en
from . import de
from . import zh
try:
basestring
except NameError:
basestring = str
set_lang_class(en.English.lang, en.English)
set_lang_class(de.German.lang, de.German)
set_lang_class(zh.Chinese.lang, zh.Chinese)
def load(name, **overrides):
target_name, target_version = util.split_data_name(name)
path = overrides.get('path', util.get_data_path())
path = util.match_best_version(target_name, target_version, path)
if isinstance(overrides.get('vectors'), basestring):
- vectors = util.match_best_version(overrides.get('vectors'), None, path)
+ vectors_path = util.match_best_version(overrides.get('vectors'), None, path)
? +++++
+ overrides['vectors'] = lambda nlp: nlp.vocab.load_vectors_from_bin_loc(
+ vectors_path / 'vocab' / 'vec.bin')
cls = get_lang_class(target_name)
return cls(path=path, **overrides) | 4 | 0.129032 | 3 | 1 |
b545ebcd2b604bf293bfbbb1af5a9ab2ba6965c7 | wayback3/wayback3.py | wayback3/wayback3.py |
import datetime
import requests
FORMAT_STRING = "%Y%m%d%H%M%S" # Looks like "20130919044612"
AVAILABILITY_URL = "http://archive.org/wayback/available?url=%s"
def availability(url):
response = requests.get(AVAILABILITY_URL % (url))
print(response)
print(response.text)
response_j = response.json()
if response_j.get('archived_snapshots') == {}:
return None
else:
closest = response_j.get('archived_snapshots').get('closest')
avail = closest.get('available')
status = int(closest.get('status'))
timestamp = closest.get('timestamp')
timestamp = datetime.datetime.strptime(timestamp, FORMAT_STRING)
url = closest.get('url')
return {'verbatim': closest, 'url': url, 'timestamp': timestamp}
|
import datetime
import requests
FORMAT_STRING = "%Y%m%d%H%M%S" # Looks like "20130919044612"
AVAILABILITY_URL = "http://archive.org/wayback/available?url=%s"
WAYBACK_URL_ROOT = "http://web.archive.org"
def availability(url):
response = requests.get(AVAILABILITY_URL % (url))
print(response)
print(response.text)
response_j = response.json()
if response_j.get('archived_snapshots') == {}:
return None
else:
closest = response_j.get('archived_snapshots').get('closest')
avail = closest.get('available')
status = int(closest.get('status'))
timestamp = closest.get('timestamp')
timestamp = datetime.datetime.strptime(timestamp, FORMAT_STRING)
url = closest.get('url')
return {'verbatim': closest, 'url': url, 'timestamp': timestamp}
| Add a constant for WB root URL | Add a constant for WB root URL
| Python | agpl-3.0 | OpenSSR/openssr-parser,OpenSSR/openssr-parser | python | ## Code Before:
import datetime
import requests
FORMAT_STRING = "%Y%m%d%H%M%S" # Looks like "20130919044612"
AVAILABILITY_URL = "http://archive.org/wayback/available?url=%s"
def availability(url):
response = requests.get(AVAILABILITY_URL % (url))
print(response)
print(response.text)
response_j = response.json()
if response_j.get('archived_snapshots') == {}:
return None
else:
closest = response_j.get('archived_snapshots').get('closest')
avail = closest.get('available')
status = int(closest.get('status'))
timestamp = closest.get('timestamp')
timestamp = datetime.datetime.strptime(timestamp, FORMAT_STRING)
url = closest.get('url')
return {'verbatim': closest, 'url': url, 'timestamp': timestamp}
## Instruction:
Add a constant for WB root URL
## Code After:
import datetime
import requests
FORMAT_STRING = "%Y%m%d%H%M%S" # Looks like "20130919044612"
AVAILABILITY_URL = "http://archive.org/wayback/available?url=%s"
WAYBACK_URL_ROOT = "http://web.archive.org"
def availability(url):
response = requests.get(AVAILABILITY_URL % (url))
print(response)
print(response.text)
response_j = response.json()
if response_j.get('archived_snapshots') == {}:
return None
else:
closest = response_j.get('archived_snapshots').get('closest')
avail = closest.get('available')
status = int(closest.get('status'))
timestamp = closest.get('timestamp')
timestamp = datetime.datetime.strptime(timestamp, FORMAT_STRING)
url = closest.get('url')
return {'verbatim': closest, 'url': url, 'timestamp': timestamp}
|
import datetime
import requests
FORMAT_STRING = "%Y%m%d%H%M%S" # Looks like "20130919044612"
AVAILABILITY_URL = "http://archive.org/wayback/available?url=%s"
+ WAYBACK_URL_ROOT = "http://web.archive.org"
def availability(url):
response = requests.get(AVAILABILITY_URL % (url))
print(response)
print(response.text)
response_j = response.json()
if response_j.get('archived_snapshots') == {}:
return None
else:
closest = response_j.get('archived_snapshots').get('closest')
avail = closest.get('available')
status = int(closest.get('status'))
timestamp = closest.get('timestamp')
timestamp = datetime.datetime.strptime(timestamp, FORMAT_STRING)
url = closest.get('url')
return {'verbatim': closest, 'url': url, 'timestamp': timestamp} | 1 | 0.043478 | 1 | 0 |
d22b54e3032f4efb2b6b06e79e25e7b7d38235a5 | README.md | README.md |
In order to install Spryker Demoshop on your machine, you can follow the instructions described in the link below:
* [Installation - http://spryker.github.io/getting-started/installation/guide/](http://spryker.github.io/getting-started/installation/guide/)
If you encounter any issues during or after installation, you can first check our Troubleshooting article:
* [Troubleshooting - http://spryker.github.io/help/troubleshooting/](http://spryker.github.io/help/troubleshooting/)
| [](https://github.com/spryker/demoshop/)
In order to install Spryker Demoshop on your machine, you can follow the instructions described in the link below:
* [Installation - http://spryker.github.io/getting-started/installation/guide/](http://spryker.github.io/getting-started/installation/guide/)
If you encounter any issues during or after installation, you can first check our Troubleshooting article:
* [Troubleshooting - http://spryker.github.io/help/troubleshooting/](http://spryker.github.io/help/troubleshooting/)
| Add first (license) badge to readme for clarification | Add first (license) badge to readme for clarification | Markdown | mit | spryker/demoshop,spryker/demoshop,spryker/demoshop,spryker/demoshop | markdown | ## Code Before:
In order to install Spryker Demoshop on your machine, you can follow the instructions described in the link below:
* [Installation - http://spryker.github.io/getting-started/installation/guide/](http://spryker.github.io/getting-started/installation/guide/)
If you encounter any issues during or after installation, you can first check our Troubleshooting article:
* [Troubleshooting - http://spryker.github.io/help/troubleshooting/](http://spryker.github.io/help/troubleshooting/)
## Instruction:
Add first (license) badge to readme for clarification
## Code After:
[](https://github.com/spryker/demoshop/)
In order to install Spryker Demoshop on your machine, you can follow the instructions described in the link below:
* [Installation - http://spryker.github.io/getting-started/installation/guide/](http://spryker.github.io/getting-started/installation/guide/)
If you encounter any issues during or after installation, you can first check our Troubleshooting article:
* [Troubleshooting - http://spryker.github.io/help/troubleshooting/](http://spryker.github.io/help/troubleshooting/)
| + [](https://github.com/spryker/demoshop/)
In order to install Spryker Demoshop on your machine, you can follow the instructions described in the link below:
* [Installation - http://spryker.github.io/getting-started/installation/guide/](http://spryker.github.io/getting-started/installation/guide/)
If you encounter any issues during or after installation, you can first check our Troubleshooting article:
* [Troubleshooting - http://spryker.github.io/help/troubleshooting/](http://spryker.github.io/help/troubleshooting/) | 1 | 0.111111 | 1 | 0 |
4f6257d9ffb5302ffb515a9b16247f0159fa5410 | scripts/jenkins-slave.sh | scripts/jenkins-slave.sh | set -x
set -e
add-apt-repository cloud-archive:liberty
apt-get -qq -y update
apt-get -qq -y install openjdk-7-jdk rake ruby-puppetlabs-spec-helper puppet-lint git bundler python-dev libssl-dev libxml2-dev libxslt-dev python-tox python-pip build-essential libmysqlclient-dev libfreetype6-dev libpng12-dev git-buildpackage debhelper dupload libffi-dev npm nodejs libpq-dev unzip qemu pkg-config libvirt-dev libsqlite3-dev libldap2-dev libsasl2-dev
apt-get -qq -y install dh-systemd openstack-pkg-tools python-sphinx python3-setuptools libcurl3 python-ceilometerclient python-cinderclient python-designateclient python-glanceclient python-heatclient python-keystoneclient python-muranoclient python-neutronclient python-novaclient python-openstackclient python-swiftclient
apt-get -qq -y install python-hivemind python-hivemind-contrib
apt-get -qq -y autoremove
apt-get -qq -y autoclean
apt-get -qq -y clean
# Install packer
wget https://releases.hashicorp.com/packer/0.8.6/packer_0.8.6_linux_amd64.zip -O /tmp/packer_0.8.6_linux_amd64.zip
unzip /tmp/packer_0.8.6_linux_amd64.zip -d /usr/local/bin/
| set -x
set -e
add-apt-repository cloud-archive:liberty
apt-get -qq -y update
apt-get -qq -y install openjdk-7-jdk rake ruby-puppetlabs-spec-helper puppet-lint git bundler python-dev libssl-dev libxml2-dev libxslt-dev python-tox python-pip build-essential libmysqlclient-dev libfreetype6-dev libpng12-dev git-buildpackage debhelper dupload libffi-dev npm nodejs libpq-dev unzip qemu pkg-config libvirt-dev libsqlite3-dev libldap2-dev libsasl2-dev
apt-get -qq -y install dh-systemd openstack-pkg-tools python-sphinx python3-setuptools libcurl3 python-ceilometerclient python-cinderclient python-designateclient python-glanceclient python-heatclient python-keystoneclient python-muranoclient python-neutronclient python-novaclient python-openstackclient python-swiftclient
apt-get -qq -y autoremove
apt-get -qq -y autoclean
apt-get -qq -y clean
# Install packer
wget https://releases.hashicorp.com/packer/0.8.6/packer_0.8.6_linux_amd64.zip -O /tmp/packer_0.8.6_linux_amd64.zip
unzip /tmp/packer_0.8.6_linux_amd64.zip -d /usr/local/bin/
| Remove hivemind install from jenkins buildslave for now | Remove hivemind install from jenkins buildslave for now
Change-Id: Id9b8447ebb5f213a9b59a32d13e522b417393514
| Shell | apache-2.0 | NeCTAR-RC/nectar-images,NeCTAR-RC/nectar-images | shell | ## Code Before:
set -x
set -e
add-apt-repository cloud-archive:liberty
apt-get -qq -y update
apt-get -qq -y install openjdk-7-jdk rake ruby-puppetlabs-spec-helper puppet-lint git bundler python-dev libssl-dev libxml2-dev libxslt-dev python-tox python-pip build-essential libmysqlclient-dev libfreetype6-dev libpng12-dev git-buildpackage debhelper dupload libffi-dev npm nodejs libpq-dev unzip qemu pkg-config libvirt-dev libsqlite3-dev libldap2-dev libsasl2-dev
apt-get -qq -y install dh-systemd openstack-pkg-tools python-sphinx python3-setuptools libcurl3 python-ceilometerclient python-cinderclient python-designateclient python-glanceclient python-heatclient python-keystoneclient python-muranoclient python-neutronclient python-novaclient python-openstackclient python-swiftclient
apt-get -qq -y install python-hivemind python-hivemind-contrib
apt-get -qq -y autoremove
apt-get -qq -y autoclean
apt-get -qq -y clean
# Install packer
wget https://releases.hashicorp.com/packer/0.8.6/packer_0.8.6_linux_amd64.zip -O /tmp/packer_0.8.6_linux_amd64.zip
unzip /tmp/packer_0.8.6_linux_amd64.zip -d /usr/local/bin/
## Instruction:
Remove hivemind install from jenkins buildslave for now
Change-Id: Id9b8447ebb5f213a9b59a32d13e522b417393514
## Code After:
set -x
set -e
add-apt-repository cloud-archive:liberty
apt-get -qq -y update
apt-get -qq -y install openjdk-7-jdk rake ruby-puppetlabs-spec-helper puppet-lint git bundler python-dev libssl-dev libxml2-dev libxslt-dev python-tox python-pip build-essential libmysqlclient-dev libfreetype6-dev libpng12-dev git-buildpackage debhelper dupload libffi-dev npm nodejs libpq-dev unzip qemu pkg-config libvirt-dev libsqlite3-dev libldap2-dev libsasl2-dev
apt-get -qq -y install dh-systemd openstack-pkg-tools python-sphinx python3-setuptools libcurl3 python-ceilometerclient python-cinderclient python-designateclient python-glanceclient python-heatclient python-keystoneclient python-muranoclient python-neutronclient python-novaclient python-openstackclient python-swiftclient
apt-get -qq -y autoremove
apt-get -qq -y autoclean
apt-get -qq -y clean
# Install packer
wget https://releases.hashicorp.com/packer/0.8.6/packer_0.8.6_linux_amd64.zip -O /tmp/packer_0.8.6_linux_amd64.zip
unzip /tmp/packer_0.8.6_linux_amd64.zip -d /usr/local/bin/
| set -x
set -e
add-apt-repository cloud-archive:liberty
apt-get -qq -y update
apt-get -qq -y install openjdk-7-jdk rake ruby-puppetlabs-spec-helper puppet-lint git bundler python-dev libssl-dev libxml2-dev libxslt-dev python-tox python-pip build-essential libmysqlclient-dev libfreetype6-dev libpng12-dev git-buildpackage debhelper dupload libffi-dev npm nodejs libpq-dev unzip qemu pkg-config libvirt-dev libsqlite3-dev libldap2-dev libsasl2-dev
apt-get -qq -y install dh-systemd openstack-pkg-tools python-sphinx python3-setuptools libcurl3 python-ceilometerclient python-cinderclient python-designateclient python-glanceclient python-heatclient python-keystoneclient python-muranoclient python-neutronclient python-novaclient python-openstackclient python-swiftclient
- apt-get -qq -y install python-hivemind python-hivemind-contrib
apt-get -qq -y autoremove
apt-get -qq -y autoclean
apt-get -qq -y clean
# Install packer
wget https://releases.hashicorp.com/packer/0.8.6/packer_0.8.6_linux_amd64.zip -O /tmp/packer_0.8.6_linux_amd64.zip
unzip /tmp/packer_0.8.6_linux_amd64.zip -d /usr/local/bin/ | 1 | 0.058824 | 0 | 1 |
a255eca94c3aa462ad62f7a42f34438452d2cabc | Emacs/emacs-custom.el | Emacs/emacs-custom.el | (custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(apropos-sort-by-scores t)
'(backup-directory-alist `((".*" \, temporary-file-directory)))
'(fido-mode t)
'(global-display-line-numbers-mode t)
'(ido-create-new-buffer 'always)
'(ido-enable-flex-matching t)
'(ido-everywhere t)
'(ido-mode 'both nil (ido))
'(indent-tabs-mode nil)
'(org-log-done 'time)
'(org-log-into-drawer "LOGBOOK")
'(package-archives
'(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
'(package-selected-packages
'(paredit sml-mode ycmd solarized-theme rust-mode rainbow-delimiters markdown-mode magit company cmake-mode))
'(standard-indent 4)
'(tab-always-indent 'complete))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
| (custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(apropos-sort-by-scores t)
'(backup-directory-alist `((".*" \, temporary-file-directory)))
'(fido-mode t)
'(global-display-line-numbers-mode t)
'(ido-create-new-buffer 'always)
'(ido-enable-flex-matching t)
'(ido-everywhere t)
'(ido-mode 'both nil (ido))
'(indent-tabs-mode nil)
'(org-log-done 'time)
'(org-log-into-drawer "LOGBOOK")
'(package-archives
'(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
'(package-selected-packages
'(paredit sml-mode ycmd solarized-theme rust-mode rainbow-delimiters markdown-mode magit company cmake-mode))
'(standard-indent 4)
'(tab-always-indent 'complete)
'(tab-width 4))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
| Set default tab-width to 4 in Emacs | Set default tab-width to 4 in Emacs
| Emacs Lisp | mit | Gosin/Vim4Gosin | emacs-lisp | ## Code Before:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(apropos-sort-by-scores t)
'(backup-directory-alist `((".*" \, temporary-file-directory)))
'(fido-mode t)
'(global-display-line-numbers-mode t)
'(ido-create-new-buffer 'always)
'(ido-enable-flex-matching t)
'(ido-everywhere t)
'(ido-mode 'both nil (ido))
'(indent-tabs-mode nil)
'(org-log-done 'time)
'(org-log-into-drawer "LOGBOOK")
'(package-archives
'(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
'(package-selected-packages
'(paredit sml-mode ycmd solarized-theme rust-mode rainbow-delimiters markdown-mode magit company cmake-mode))
'(standard-indent 4)
'(tab-always-indent 'complete))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
## Instruction:
Set default tab-width to 4 in Emacs
## Code After:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(apropos-sort-by-scores t)
'(backup-directory-alist `((".*" \, temporary-file-directory)))
'(fido-mode t)
'(global-display-line-numbers-mode t)
'(ido-create-new-buffer 'always)
'(ido-enable-flex-matching t)
'(ido-everywhere t)
'(ido-mode 'both nil (ido))
'(indent-tabs-mode nil)
'(org-log-done 'time)
'(org-log-into-drawer "LOGBOOK")
'(package-archives
'(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
'(package-selected-packages
'(paredit sml-mode ycmd solarized-theme rust-mode rainbow-delimiters markdown-mode magit company cmake-mode))
'(standard-indent 4)
'(tab-always-indent 'complete)
'(tab-width 4))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
| (custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(apropos-sort-by-scores t)
'(backup-directory-alist `((".*" \, temporary-file-directory)))
'(fido-mode t)
'(global-display-line-numbers-mode t)
'(ido-create-new-buffer 'always)
'(ido-enable-flex-matching t)
'(ido-everywhere t)
'(ido-mode 'both nil (ido))
'(indent-tabs-mode nil)
'(org-log-done 'time)
'(org-log-into-drawer "LOGBOOK")
'(package-archives
'(("gnu" . "https://elpa.gnu.org/packages/")
("melpa" . "https://melpa.org/packages/")))
'(package-selected-packages
'(paredit sml-mode ycmd solarized-theme rust-mode rainbow-delimiters markdown-mode magit company cmake-mode))
'(standard-indent 4)
- '(tab-always-indent 'complete))
? -
+ '(tab-always-indent 'complete)
+ '(tab-width 4))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
) | 3 | 0.103448 | 2 | 1 |
feb133bc280e69fc9544be16c6952f7c4dbf86cd | ui/app/styles/components/error-container.scss | ui/app/styles/components/error-container.scss | .error-container {
width: 100%;
height: 100%;
padding-top: 25vh;
display: flex;
justify-content: center;
background: $grey-lighter;
.error-message {
max-width: 600px;
.title,
.subtitle {
text-align: center;
}
}
.error-stack-trace {
border: 1px solid $grey-light;
border-radius: $radius;
}
}
| .error-container {
width: 100%;
height: 100%;
padding-top: 25vh;
display: flex;
flex-direction: column;
justify-content: start;
align-items: center;
background: $grey-lighter;
.error-message {
max-width: 600px;
.title,
.subtitle {
text-align: center;
}
}
.error-stack-trace {
border: 1px solid $grey-light;
border-radius: $radius;
}
.error-links {
padding-top: 15px;
margin-top: 15px;
border-top: 1px solid $grey-light;
width: 600px;
text-align: center;
}
}
| Add support for link in error containers | Add support for link in error containers
| SCSS | mpl-2.0 | burdandrei/nomad,nak3/nomad,nak3/nomad,nak3/nomad,dvusboy/nomad,dvusboy/nomad,hashicorp/nomad,hashicorp/nomad,burdandrei/nomad,nak3/nomad,dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,nak3/nomad,dvusboy/nomad,burdandrei/nomad,nak3/nomad,burdandrei/nomad,burdandrei/nomad,burdandrei/nomad,hashicorp/nomad,nak3/nomad,hashicorp/nomad,dvusboy/nomad,hashicorp/nomad,dvusboy/nomad,hashicorp/nomad | scss | ## Code Before:
.error-container {
width: 100%;
height: 100%;
padding-top: 25vh;
display: flex;
justify-content: center;
background: $grey-lighter;
.error-message {
max-width: 600px;
.title,
.subtitle {
text-align: center;
}
}
.error-stack-trace {
border: 1px solid $grey-light;
border-radius: $radius;
}
}
## Instruction:
Add support for link in error containers
## Code After:
.error-container {
width: 100%;
height: 100%;
padding-top: 25vh;
display: flex;
flex-direction: column;
justify-content: start;
align-items: center;
background: $grey-lighter;
.error-message {
max-width: 600px;
.title,
.subtitle {
text-align: center;
}
}
.error-stack-trace {
border: 1px solid $grey-light;
border-radius: $radius;
}
.error-links {
padding-top: 15px;
margin-top: 15px;
border-top: 1px solid $grey-light;
width: 600px;
text-align: center;
}
}
| .error-container {
width: 100%;
height: 100%;
padding-top: 25vh;
display: flex;
+ flex-direction: column;
- justify-content: center;
? ^^^ ^
+ justify-content: start;
? ^ ^ +
+ align-items: center;
background: $grey-lighter;
.error-message {
max-width: 600px;
.title,
.subtitle {
text-align: center;
}
}
.error-stack-trace {
border: 1px solid $grey-light;
border-radius: $radius;
}
+
+ .error-links {
+ padding-top: 15px;
+ margin-top: 15px;
+ border-top: 1px solid $grey-light;
+ width: 600px;
+ text-align: center;
+ }
} | 12 | 0.545455 | 11 | 1 |
8433fe04ad1230329de2c209a8625cd4b36b63f8 | src/sentry/api/serializers/models/grouptagvalue.py | src/sentry/api/serializers/models/grouptagvalue.py | from __future__ import absolute_import
from sentry.api.serializers import Serializer, register
from sentry.models import GroupTagValue
@register(GroupTagValue)
class GroupTagValueSerializer(Serializer):
def serialize(self, obj, attrs, user):
d = {
'key': obj.key,
'value': obj.value,
'count': obj.times_seen,
'lastSeen': obj.last_seen,
'firstSeen': obj.first_seen,
}
return d
| from __future__ import absolute_import
from sentry.api.serializers import Serializer, register
from sentry.models import GroupTagValue, TagValue
@register(GroupTagValue)
class GroupTagValueSerializer(Serializer):
def get_attrs(self, item_list, user):
assert len(set(i.key for i in item_list)) < 2
tagvalues = dict(
(t.value, t)
for t in TagValue.objects.filter(
project=item_list[0].project,
key=item_list[0].key,
value__in=[i.value for i in item_list]
)
)
result = {}
for item in item_list:
result[item] = {
'name': tagvalues[item.value].get_label(),
}
return result
def serialize(self, obj, attrs, user):
d = {
'name': attrs['name'],
'key': obj.key,
'value': obj.value,
'count': obj.times_seen,
'lastSeen': obj.last_seen,
'firstSeen': obj.first_seen,
}
return d
| Implement labels on group tag values | Implement labels on group tag values
| Python | bsd-3-clause | gencer/sentry,drcapulet/sentry,vperron/sentry,pauloschilling/sentry,kevinlondon/sentry,ifduyue/sentry,zenefits/sentry,JamesMura/sentry,jean/sentry,fotinakis/sentry,gencer/sentry,ngonzalvez/sentry,gg7/sentry,mvaled/sentry,JTCunning/sentry,alexm92/sentry,hongliang5623/sentry,Kryz/sentry,JackDanger/sentry,gg7/sentry,TedaLIEz/sentry,imankulov/sentry,vperron/sentry,imankulov/sentry,felixbuenemann/sentry,mvaled/sentry,Natim/sentry,BayanGroup/sentry,wong2/sentry,ewdurbin/sentry,wujuguang/sentry,jean/sentry,beeftornado/sentry,JTCunning/sentry,beeftornado/sentry,pauloschilling/sentry,ifduyue/sentry,BuildingLink/sentry,Natim/sentry,gencer/sentry,mitsuhiko/sentry,alexm92/sentry,songyi199111/sentry,kevinlondon/sentry,JackDanger/sentry,kevinastone/sentry,jean/sentry,beeftornado/sentry,fuziontech/sentry,kevinlondon/sentry,looker/sentry,JackDanger/sentry,mitsuhiko/sentry,fotinakis/sentry,1tush/sentry,boneyao/sentry,JamesMura/sentry,mvaled/sentry,korealerts1/sentry,zenefits/sentry,BuildingLink/sentry,BuildingLink/sentry,felixbuenemann/sentry,JamesMura/sentry,korealerts1/sentry,ifduyue/sentry,daevaorn/sentry,ngonzalvez/sentry,TedaLIEz/sentry,fotinakis/sentry,JTCunning/sentry,daevaorn/sentry,boneyao/sentry,zenefits/sentry,TedaLIEz/sentry,nicholasserra/sentry,jean/sentry,drcapulet/sentry,songyi199111/sentry,mvaled/sentry,BuildingLink/sentry,kevinastone/sentry,alexm92/sentry,BayanGroup/sentry,daevaorn/sentry,BuildingLink/sentry,gencer/sentry,drcapulet/sentry,wong2/sentry,looker/sentry,nicholasserra/sentry,JamesMura/sentry,kevinastone/sentry,wujuguang/sentry,fotinakis/sentry,jean/sentry,boneyao/sentry,fuziontech/sentry,imankulov/sentry,daevaorn/sentry,mvaled/sentry,vperron/sentry,gencer/sentry,looker/sentry,wong2/sentry,Natim/sentry,1tush/sentry,korealerts1/sentry,zenefits/sentry,zenefits/sentry,nicholasserra/sentry,ewdurbin/sentry,looker/sentry,Kryz/sentry,Kryz/sentry,mvaled/sentry,felixbuenemann/sentry,gg7/sentry,ifduyue/sentry,hongliang5623/sentry,looker/sentry,pauloschilling/sentry,ewdurbin/sentry,fuziontech/sentry,songyi199111/sentry,JamesMura/sentry,BayanGroup/sentry,1tush/sentry,hongliang5623/sentry,ngonzalvez/sentry,ifduyue/sentry,wujuguang/sentry | python | ## Code Before:
from __future__ import absolute_import
from sentry.api.serializers import Serializer, register
from sentry.models import GroupTagValue
@register(GroupTagValue)
class GroupTagValueSerializer(Serializer):
def serialize(self, obj, attrs, user):
d = {
'key': obj.key,
'value': obj.value,
'count': obj.times_seen,
'lastSeen': obj.last_seen,
'firstSeen': obj.first_seen,
}
return d
## Instruction:
Implement labels on group tag values
## Code After:
from __future__ import absolute_import
from sentry.api.serializers import Serializer, register
from sentry.models import GroupTagValue, TagValue
@register(GroupTagValue)
class GroupTagValueSerializer(Serializer):
def get_attrs(self, item_list, user):
assert len(set(i.key for i in item_list)) < 2
tagvalues = dict(
(t.value, t)
for t in TagValue.objects.filter(
project=item_list[0].project,
key=item_list[0].key,
value__in=[i.value for i in item_list]
)
)
result = {}
for item in item_list:
result[item] = {
'name': tagvalues[item.value].get_label(),
}
return result
def serialize(self, obj, attrs, user):
d = {
'name': attrs['name'],
'key': obj.key,
'value': obj.value,
'count': obj.times_seen,
'lastSeen': obj.last_seen,
'firstSeen': obj.first_seen,
}
return d
| from __future__ import absolute_import
from sentry.api.serializers import Serializer, register
- from sentry.models import GroupTagValue
+ from sentry.models import GroupTagValue, TagValue
? ++++++++++
@register(GroupTagValue)
class GroupTagValueSerializer(Serializer):
+ def get_attrs(self, item_list, user):
+ assert len(set(i.key for i in item_list)) < 2
+
+ tagvalues = dict(
+ (t.value, t)
+ for t in TagValue.objects.filter(
+ project=item_list[0].project,
+ key=item_list[0].key,
+ value__in=[i.value for i in item_list]
+ )
+ )
+
+ result = {}
+ for item in item_list:
+ result[item] = {
+ 'name': tagvalues[item.value].get_label(),
+ }
+ return result
+
def serialize(self, obj, attrs, user):
d = {
+ 'name': attrs['name'],
'key': obj.key,
'value': obj.value,
'count': obj.times_seen,
'lastSeen': obj.last_seen,
'firstSeen': obj.first_seen,
}
return d | 22 | 1.294118 | 21 | 1 |
0551b298d023da21b5ee8c2b0765439a28d4d3d1 | definitions/logs.json | definitions/logs.json | {
"logs": [{
"id": "current",
"categories": [
{"name":"agent"},
{"name":"apache-error"},
{"name":"auth"},
{"name":"dmesg"},
{"name":"dpkg"},
{"name":"kern"},
{"name":"libvirt"},
{"name":"libvirtshutdown"},
{"name":"monit"},
{"name":"monit_startup"},
{"name":"nova-api"},
{"name":"nova-api-metadata"},
{"name":"nova-api-metadata-upstart"},
{"name":"nova-boot-publisher"},
{"name":"nova-boot-publisher-upstart"},
{"name":"nova-cert"},
{"name":"nova-compute"},
{"name":"nova-compute-upstart"},
{"name":"nova-consoleauth"},
{"name":"nova-manage"},
{"name":"nova-proc-stats-upstart"},
{"name":"nova-scheduler"},
{"name":"ovsdb-server"},
{"name":"ovs-vswitchd"},
{"name":"openvsswitch-agent"},
{"name":"redis"},
{"name":"rocksteady"},
{"name":"sam"},
{"name":"scheduler"},
{"name":"statsd"},
{"name":"startup"},
{"name":"syslog"},
{"name":"trust-agent"},
{"name":"trust-server"}
]
}]
}
| {
"logs": [{
"id": "current",
"categories": [
{"name":"action"},
{"name":"agent"},
{"name":"apache-error"},
{"name":"auth"},
{"name":"dmesg"},
{"name":"dpkg"},
{"name":"kern"},
{"name":"libvirt"},
{"name":"libvirtshutdown"},
{"name":"monit"},
{"name":"monit_startup"},
{"name":"nova-api"},
{"name":"nova-api-metadata"},
{"name":"nova-api-metadata-upstart"},
{"name":"nova-boot-publisher"},
{"name":"nova-boot-publisher-upstart"},
{"name":"nova-cert"},
{"name":"nova-compute"},
{"name":"nova-compute-upstart"},
{"name":"nova-consoleauth"},
{"name":"nova-manage"},
{"name":"nova-proc-stats-upstart"},
{"name":"nova-scheduler"},
{"name":"ovsdb-server"},
{"name":"ovs-vswitchd"},
{"name":"openvsswitch-agent"},
{"name":"redis"},
{"name":"rocksteady"},
{"name":"sam"},
{"name":"scheduler"},
{"name":"statsd"},
{"name":"startup"},
{"name":"syslog"},
{"name":"trust-agent"},
{"name":"trust-server"}
]
}]
}
| Fix for next step in EPSD100235988, "1.0.0.887 - event log tracking who did what when to what and what was affected - CB event log as an example". | Fix for next step in EPSD100235988, "1.0.0.887 - event log tracking who did what when to what and what was affected - CB event log as an example".
This change adds a log category called actions. Any sam type log that contains
the string "ACTION: " at the beginning of the log message is changed from the
sam category to the action category. I also parse the log message and remove
the "ACTION: " string from the beginning of the message. Additionally, I have
added an "action" category in the GUI advanced selections, but this will not
show up until Nathan or Alex do another GUI build.
To verify that this is working, first ensure you have had some recent actions.
They should be shown in the dashboard area that was labeled events, but should
be soon changed to actions. Then go to the logs tab and search of logs with
the category equal to action. You can used the advanced category tab for this,
or my not so user friendly alternative described below.
If the action category has not yet been added to the advanced log searching,
you can still do it. Just select a log and click on the magnifying glass next
to the category. This will add a filter based upon that category. You can then
go to the filtering section and edit the filter. Click edit on the filter you
created for the category and edit the query to say action instead of whatevr
category you selected in the log.
| JSON | apache-2.0 | vine77/saa-ui,vine77/saa-ui,vine77/saa-ui | json | ## Code Before:
{
"logs": [{
"id": "current",
"categories": [
{"name":"agent"},
{"name":"apache-error"},
{"name":"auth"},
{"name":"dmesg"},
{"name":"dpkg"},
{"name":"kern"},
{"name":"libvirt"},
{"name":"libvirtshutdown"},
{"name":"monit"},
{"name":"monit_startup"},
{"name":"nova-api"},
{"name":"nova-api-metadata"},
{"name":"nova-api-metadata-upstart"},
{"name":"nova-boot-publisher"},
{"name":"nova-boot-publisher-upstart"},
{"name":"nova-cert"},
{"name":"nova-compute"},
{"name":"nova-compute-upstart"},
{"name":"nova-consoleauth"},
{"name":"nova-manage"},
{"name":"nova-proc-stats-upstart"},
{"name":"nova-scheduler"},
{"name":"ovsdb-server"},
{"name":"ovs-vswitchd"},
{"name":"openvsswitch-agent"},
{"name":"redis"},
{"name":"rocksteady"},
{"name":"sam"},
{"name":"scheduler"},
{"name":"statsd"},
{"name":"startup"},
{"name":"syslog"},
{"name":"trust-agent"},
{"name":"trust-server"}
]
}]
}
## Instruction:
Fix for next step in EPSD100235988, "1.0.0.887 - event log tracking who did what when to what and what was affected - CB event log as an example".
This change adds a log category called actions. Any sam type log that contains
the string "ACTION: " at the beginning of the log message is changed from the
sam category to the action category. I also parse the log message and remove
the "ACTION: " string from the beginning of the message. Additionally, I have
added an "action" category in the GUI advanced selections, but this will not
show up until Nathan or Alex do another GUI build.
To verify that this is working, first ensure you have had some recent actions.
They should be shown in the dashboard area that was labeled events, but should
be soon changed to actions. Then go to the logs tab and search of logs with
the category equal to action. You can used the advanced category tab for this,
or my not so user friendly alternative described below.
If the action category has not yet been added to the advanced log searching,
you can still do it. Just select a log and click on the magnifying glass next
to the category. This will add a filter based upon that category. You can then
go to the filtering section and edit the filter. Click edit on the filter you
created for the category and edit the query to say action instead of whatevr
category you selected in the log.
## Code After:
{
"logs": [{
"id": "current",
"categories": [
{"name":"action"},
{"name":"agent"},
{"name":"apache-error"},
{"name":"auth"},
{"name":"dmesg"},
{"name":"dpkg"},
{"name":"kern"},
{"name":"libvirt"},
{"name":"libvirtshutdown"},
{"name":"monit"},
{"name":"monit_startup"},
{"name":"nova-api"},
{"name":"nova-api-metadata"},
{"name":"nova-api-metadata-upstart"},
{"name":"nova-boot-publisher"},
{"name":"nova-boot-publisher-upstart"},
{"name":"nova-cert"},
{"name":"nova-compute"},
{"name":"nova-compute-upstart"},
{"name":"nova-consoleauth"},
{"name":"nova-manage"},
{"name":"nova-proc-stats-upstart"},
{"name":"nova-scheduler"},
{"name":"ovsdb-server"},
{"name":"ovs-vswitchd"},
{"name":"openvsswitch-agent"},
{"name":"redis"},
{"name":"rocksteady"},
{"name":"sam"},
{"name":"scheduler"},
{"name":"statsd"},
{"name":"startup"},
{"name":"syslog"},
{"name":"trust-agent"},
{"name":"trust-server"}
]
}]
}
| {
"logs": [{
"id": "current",
"categories": [
+ {"name":"action"},
{"name":"agent"},
{"name":"apache-error"},
{"name":"auth"},
{"name":"dmesg"},
{"name":"dpkg"},
{"name":"kern"},
{"name":"libvirt"},
{"name":"libvirtshutdown"},
{"name":"monit"},
{"name":"monit_startup"},
{"name":"nova-api"},
{"name":"nova-api-metadata"},
{"name":"nova-api-metadata-upstart"},
{"name":"nova-boot-publisher"},
{"name":"nova-boot-publisher-upstart"},
{"name":"nova-cert"},
{"name":"nova-compute"},
{"name":"nova-compute-upstart"},
{"name":"nova-consoleauth"},
{"name":"nova-manage"},
{"name":"nova-proc-stats-upstart"},
{"name":"nova-scheduler"},
{"name":"ovsdb-server"},
{"name":"ovs-vswitchd"},
{"name":"openvsswitch-agent"},
{"name":"redis"},
{"name":"rocksteady"},
{"name":"sam"},
{"name":"scheduler"},
{"name":"statsd"},
{"name":"startup"},
{"name":"syslog"},
{"name":"trust-agent"},
{"name":"trust-server"}
]
}]
} | 1 | 0.02439 | 1 | 0 |
e237dac5c933032cf34b6ba82ff232e42b2e363c | code/api/deploy.sh | code/api/deploy.sh |
apt-get -y -qq update; apt-get -y -qq upgrade
apt-get -y -qq install python-pip git nginx
echo "source /root/api_env.rc" >> /root/.profile
echo "source /root/db_env.rc" >> /root/.profile
echo "source /root/os_env.rc" >> /root/.profile
source /root/.profile
git clone https://github.com/everett-toews/app-on-openstack.git /root/app-on-openstack
pip install virtualenv
virtualenv /root/api-venv
source /root/api-venv/bin/activate
pip install -r /root/app-on-openstack/code/api/requirements.txt
cd /root/app-on-openstack/code/api; gunicorn manage:app -b localhost:8000 &
/etc/init.d/nginx start
rm /etc/nginx/sites-enabled/default
cp /root/app-on-openstack/code/api/api.nginx /etc/nginx/sites-available/api
ln -s /etc/nginx/sites-available/api /etc/nginx/sites-enabled/api
/etc/init.d/nginx restart
|
apt-get -y -qq update; apt-get -y -qq upgrade
apt-get -y -qq install python-dev python-pip git nginx
echo "source /root/api_env.rc" >> /root/.profile
echo "source /root/db_env.rc" >> /root/.profile
echo "source /root/os_env.rc" >> /root/.profile
source /root/.profile
git clone https://github.com/everett-toews/app-on-openstack.git /root/app-on-openstack
pip install virtualenv
virtualenv /root/api-venv
source /root/api-venv/bin/activate
pip install -r /root/app-on-openstack/code/api/requirements.txt
cd /root/app-on-openstack/code/api; gunicorn manage:app -b localhost:8000 &
/etc/init.d/nginx start
rm /etc/nginx/sites-enabled/default
cp /root/app-on-openstack/code/api/api.nginx /etc/nginx/sites-available/api
ln -s /etc/nginx/sites-available/api /etc/nginx/sites-enabled/api
/etc/init.d/nginx restart
| Add python-dev package for the sdk | Add python-dev package for the sdk
| Shell | mit | eglute/app-on-openstack,everett-toews/app-on-openstack,eglute/app-on-openstack,everett-toews/app-on-openstack,eglute/app-on-openstack,danabauer/app-on-openstack,everett-toews/app-on-openstack,danabauer/app-on-openstack,eglute/app-on-openstack,everett-toews/app-on-openstack,danabauer/app-on-openstack,danabauer/app-on-openstack | shell | ## Code Before:
apt-get -y -qq update; apt-get -y -qq upgrade
apt-get -y -qq install python-pip git nginx
echo "source /root/api_env.rc" >> /root/.profile
echo "source /root/db_env.rc" >> /root/.profile
echo "source /root/os_env.rc" >> /root/.profile
source /root/.profile
git clone https://github.com/everett-toews/app-on-openstack.git /root/app-on-openstack
pip install virtualenv
virtualenv /root/api-venv
source /root/api-venv/bin/activate
pip install -r /root/app-on-openstack/code/api/requirements.txt
cd /root/app-on-openstack/code/api; gunicorn manage:app -b localhost:8000 &
/etc/init.d/nginx start
rm /etc/nginx/sites-enabled/default
cp /root/app-on-openstack/code/api/api.nginx /etc/nginx/sites-available/api
ln -s /etc/nginx/sites-available/api /etc/nginx/sites-enabled/api
/etc/init.d/nginx restart
## Instruction:
Add python-dev package for the sdk
## Code After:
apt-get -y -qq update; apt-get -y -qq upgrade
apt-get -y -qq install python-dev python-pip git nginx
echo "source /root/api_env.rc" >> /root/.profile
echo "source /root/db_env.rc" >> /root/.profile
echo "source /root/os_env.rc" >> /root/.profile
source /root/.profile
git clone https://github.com/everett-toews/app-on-openstack.git /root/app-on-openstack
pip install virtualenv
virtualenv /root/api-venv
source /root/api-venv/bin/activate
pip install -r /root/app-on-openstack/code/api/requirements.txt
cd /root/app-on-openstack/code/api; gunicorn manage:app -b localhost:8000 &
/etc/init.d/nginx start
rm /etc/nginx/sites-enabled/default
cp /root/app-on-openstack/code/api/api.nginx /etc/nginx/sites-available/api
ln -s /etc/nginx/sites-available/api /etc/nginx/sites-enabled/api
/etc/init.d/nginx restart
|
apt-get -y -qq update; apt-get -y -qq upgrade
- apt-get -y -qq install python-pip git nginx
+ apt-get -y -qq install python-dev python-pip git nginx
? +++++++++++
echo "source /root/api_env.rc" >> /root/.profile
echo "source /root/db_env.rc" >> /root/.profile
echo "source /root/os_env.rc" >> /root/.profile
source /root/.profile
git clone https://github.com/everett-toews/app-on-openstack.git /root/app-on-openstack
pip install virtualenv
virtualenv /root/api-venv
source /root/api-venv/bin/activate
pip install -r /root/app-on-openstack/code/api/requirements.txt
cd /root/app-on-openstack/code/api; gunicorn manage:app -b localhost:8000 &
/etc/init.d/nginx start
rm /etc/nginx/sites-enabled/default
cp /root/app-on-openstack/code/api/api.nginx /etc/nginx/sites-available/api
ln -s /etc/nginx/sites-available/api /etc/nginx/sites-enabled/api
/etc/init.d/nginx restart | 2 | 0.095238 | 1 | 1 |
d97976df190ba41f2cddb8fd7394770f616d8b78 | script/ci/install.sh | script/ci/install.sh | set -e
if [ -n "${WINDIR}" ]; then
# Give preference to all MSYS64 binaries. This solves issues with mkdir and
# other commands not working properly.
export PATH="/usr/bin:${PATH}"
export PYTHON="/c/Python27/python"
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
# MacOS still needs zeromq and yarn installed.
brew update && brew install yarn
if [ -n "${ZMQ_SHARED}" ]; then
brew install zeromq
fi
fi
echo "Installing dependencies..."
if [ -n "${ALPINE_CHROOT}" ]; then
sudo script/ci/alpine-chroot-install.sh -b v3.8 -p 'nodejs-dev yarn build-base git curl python2' -k 'CI TRAVIS_.* ZMQ_.* NODE_.* npm_.*'
fi
if [ -n "${ZMQ_SHARED}" ]; then
export npm_config_zmq_shared=true
fi
export npm_config_build_from_source=true
if [ -n "${ALPINE_CHROOT}" ]; then
/alpine/enter-chroot yarn global add node-gyp
/alpine/enter-chroot yarn install
else
yarn install
fi
| set -e
if [ -n "${WINDIR}" ]; then
# Give preference to all MSYS64 binaries. This solves issues with mkdir and
# other commands not working properly.
export PATH="/usr/bin:${PATH}"
export PYTHON="/c/Python27/python"
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
# MacOS still needs a few things to be installed.
brew update && brew install yarn coreutils
alias timeout=gtimeout
if [ -n "${ZMQ_SHARED}" ]; then
brew install zeromq
fi
fi
echo "Installing dependencies..."
if [ -n "${ALPINE_CHROOT}" ]; then
sudo script/ci/alpine-chroot-install.sh -b v3.8 -p 'nodejs-dev yarn build-base git curl python2' -k 'CI TRAVIS_.* ZMQ_.* NODE_.* npm_.*'
fi
if [ -n "${ZMQ_SHARED}" ]; then
export npm_config_zmq_shared=true
fi
export npm_config_build_from_source=true
if [ -n "${ALPINE_CHROOT}" ]; then
/alpine/enter-chroot yarn global add node-gyp
/alpine/enter-chroot yarn install
else
yarn install
fi
| Use timeout on Mac OS. | Use timeout on Mac OS.
| Shell | mit | rolftimmermans/zeromq-ng,rolftimmermans/zeromq-ng | shell | ## Code Before:
set -e
if [ -n "${WINDIR}" ]; then
# Give preference to all MSYS64 binaries. This solves issues with mkdir and
# other commands not working properly.
export PATH="/usr/bin:${PATH}"
export PYTHON="/c/Python27/python"
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
# MacOS still needs zeromq and yarn installed.
brew update && brew install yarn
if [ -n "${ZMQ_SHARED}" ]; then
brew install zeromq
fi
fi
echo "Installing dependencies..."
if [ -n "${ALPINE_CHROOT}" ]; then
sudo script/ci/alpine-chroot-install.sh -b v3.8 -p 'nodejs-dev yarn build-base git curl python2' -k 'CI TRAVIS_.* ZMQ_.* NODE_.* npm_.*'
fi
if [ -n "${ZMQ_SHARED}" ]; then
export npm_config_zmq_shared=true
fi
export npm_config_build_from_source=true
if [ -n "${ALPINE_CHROOT}" ]; then
/alpine/enter-chroot yarn global add node-gyp
/alpine/enter-chroot yarn install
else
yarn install
fi
## Instruction:
Use timeout on Mac OS.
## Code After:
set -e
if [ -n "${WINDIR}" ]; then
# Give preference to all MSYS64 binaries. This solves issues with mkdir and
# other commands not working properly.
export PATH="/usr/bin:${PATH}"
export PYTHON="/c/Python27/python"
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
# MacOS still needs a few things to be installed.
brew update && brew install yarn coreutils
alias timeout=gtimeout
if [ -n "${ZMQ_SHARED}" ]; then
brew install zeromq
fi
fi
echo "Installing dependencies..."
if [ -n "${ALPINE_CHROOT}" ]; then
sudo script/ci/alpine-chroot-install.sh -b v3.8 -p 'nodejs-dev yarn build-base git curl python2' -k 'CI TRAVIS_.* ZMQ_.* NODE_.* npm_.*'
fi
if [ -n "${ZMQ_SHARED}" ]; then
export npm_config_zmq_shared=true
fi
export npm_config_build_from_source=true
if [ -n "${ALPINE_CHROOT}" ]; then
/alpine/enter-chroot yarn global add node-gyp
/alpine/enter-chroot yarn install
else
yarn install
fi
| set -e
if [ -n "${WINDIR}" ]; then
# Give preference to all MSYS64 binaries. This solves issues with mkdir and
# other commands not working properly.
export PATH="/usr/bin:${PATH}"
export PYTHON="/c/Python27/python"
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
- # MacOS still needs zeromq and yarn installed.
+ # MacOS still needs a few things to be installed.
- brew update && brew install yarn
+ brew update && brew install yarn coreutils
? ++++++++++
+ alias timeout=gtimeout
if [ -n "${ZMQ_SHARED}" ]; then
brew install zeromq
fi
fi
echo "Installing dependencies..."
if [ -n "${ALPINE_CHROOT}" ]; then
sudo script/ci/alpine-chroot-install.sh -b v3.8 -p 'nodejs-dev yarn build-base git curl python2' -k 'CI TRAVIS_.* ZMQ_.* NODE_.* npm_.*'
fi
if [ -n "${ZMQ_SHARED}" ]; then
export npm_config_zmq_shared=true
fi
export npm_config_build_from_source=true
if [ -n "${ALPINE_CHROOT}" ]; then
/alpine/enter-chroot yarn global add node-gyp
/alpine/enter-chroot yarn install
else
yarn install
fi | 5 | 0.147059 | 3 | 2 |
0715d32435410d4d88f9e781591b05a73a5692a8 | gradle.properties | gradle.properties | kotlinVersion=1.4.30
kotlinLanguageLevel=1.4
jvmTarget=1.8
shadowJarVersion=5.2.0
kotlinxSerializationVersion=1.0.1
ktlintVersion=9.4.1
junitVersion=5.6.2
slf4jVersion=1.7.30
khttpVersion=1.0.0
baseVersion=0.8.3
projectRepoUrl=https://github.com/Kotlin/kotlin-jupyter
bintray_user_org=ileasile
bintray_repo=kotlin-datascience-ileasile
| kotlinVersion=1.4.30
kotlinLanguageLevel=1.4
jvmTarget=1.8
shadowJarVersion=5.2.0
kotlinxSerializationVersion=1.0.1
ktlintVersion=9.4.1
junitVersion=5.6.2
slf4jVersion=1.7.30
khttpVersion=1.0.0
baseVersion=0.8.3
projectRepoUrl=https://github.com/Kotlin/kotlin-jupyter
bintray_user_org=ileasile
bintray_repo=kotlin-datascience-ileasile
# Workaround for https://github.com/Kotlin/dokka/issues/1405
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m -Xmx2048m
| Add workaround for dokka issue | Add workaround for dokka issue
| INI | apache-2.0 | ligee/kotlin-jupyter | ini | ## Code Before:
kotlinVersion=1.4.30
kotlinLanguageLevel=1.4
jvmTarget=1.8
shadowJarVersion=5.2.0
kotlinxSerializationVersion=1.0.1
ktlintVersion=9.4.1
junitVersion=5.6.2
slf4jVersion=1.7.30
khttpVersion=1.0.0
baseVersion=0.8.3
projectRepoUrl=https://github.com/Kotlin/kotlin-jupyter
bintray_user_org=ileasile
bintray_repo=kotlin-datascience-ileasile
## Instruction:
Add workaround for dokka issue
## Code After:
kotlinVersion=1.4.30
kotlinLanguageLevel=1.4
jvmTarget=1.8
shadowJarVersion=5.2.0
kotlinxSerializationVersion=1.0.1
ktlintVersion=9.4.1
junitVersion=5.6.2
slf4jVersion=1.7.30
khttpVersion=1.0.0
baseVersion=0.8.3
projectRepoUrl=https://github.com/Kotlin/kotlin-jupyter
bintray_user_org=ileasile
bintray_repo=kotlin-datascience-ileasile
# Workaround for https://github.com/Kotlin/dokka/issues/1405
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m -Xmx2048m
| kotlinVersion=1.4.30
kotlinLanguageLevel=1.4
jvmTarget=1.8
shadowJarVersion=5.2.0
kotlinxSerializationVersion=1.0.1
ktlintVersion=9.4.1
junitVersion=5.6.2
slf4jVersion=1.7.30
khttpVersion=1.0.0
baseVersion=0.8.3
projectRepoUrl=https://github.com/Kotlin/kotlin-jupyter
bintray_user_org=ileasile
bintray_repo=kotlin-datascience-ileasile
+
+ # Workaround for https://github.com/Kotlin/dokka/issues/1405
+ org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m -Xmx2048m | 3 | 0.176471 | 3 | 0 |
59dba9ca4fce496bcd7cd220af37a3ff3f27dfc0 | .github/workflows/ci-pipeline.yml | .github/workflows/ci-pipeline.yml | name: user-registration-application-pipeline
on: [push]
jobs:
pipeline:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: setup java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Install application
run: ./mvnw -pl user-registration-application -am install
- name: German Acceptance Tests JBehave
run: |
cd user-registration-acceptancetest-jbehave
./mvnw integration-test
- name: English Acceptance Tests JBehave
run: |
cd user-registration-acceptancetest-jbehave-english
./mvnw integration-test
- name: Acceptance Tests Selenium
run: |
cd user-registration-acceptancetest-selenium
./mvnw test
- name: Capacity Tests
run: |
cd user-registration-capacitytest-gatling
./mvnw test
- name: Build Docker Image for Java
run: |
cd docker
docker build -t java java && docker build -t user-registration user-registration
- name: Build Docker Image for User Registration
run: |
cd docker
docker build -t user-registration user-registration
- name: Integration Test
run: |
cd user-registration-integrationtest
image=user-registration docker-compose run test-client | name: user-registration-application-pipeline
on: [push]
jobs:
pipeline:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: setup java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Install application
run: ./mvnw -pl user-registration-application -am install
- name: German Acceptance Tests JBehave
run: |
cd user-registration-acceptancetest-jbehave
./mvnw integration-test
- name: English Acceptance Tests JBehave
run: |
cd user-registration-acceptancetest-jbehave-english
./mvnw integration-test
- name: Acceptance Tests Selenium
run: |
cd user-registration-acceptancetest-selenium
./mvnw test
- name: Capacity Tests
run: |
cd user-registration-capacitytest-gatling
./mvnw test
- name: Build Docker Image for Java
run: |
cd docker
docker build -t java java && docker build -t user-registration user-registration
- name: Build Docker Image for User Registration
run: |
cd docker
docker build -t user-registration user-registration
- name: Integration Test
run: |
cd user-registration-integrationtest
image=user-registration docker-compose run test-client | Fix YAML syntax for CI build | Fix YAML syntax for CI build
| YAML | apache-2.0 | ewolff/user-registration-V2,ewolff/user-registration-V2,ewolff/user-registration-V2,ewolff/user-registration-V2,ewolff/user-registration-V2 | yaml | ## Code Before:
name: user-registration-application-pipeline
on: [push]
jobs:
pipeline:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: setup java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Install application
run: ./mvnw -pl user-registration-application -am install
- name: German Acceptance Tests JBehave
run: |
cd user-registration-acceptancetest-jbehave
./mvnw integration-test
- name: English Acceptance Tests JBehave
run: |
cd user-registration-acceptancetest-jbehave-english
./mvnw integration-test
- name: Acceptance Tests Selenium
run: |
cd user-registration-acceptancetest-selenium
./mvnw test
- name: Capacity Tests
run: |
cd user-registration-capacitytest-gatling
./mvnw test
- name: Build Docker Image for Java
run: |
cd docker
docker build -t java java && docker build -t user-registration user-registration
- name: Build Docker Image for User Registration
run: |
cd docker
docker build -t user-registration user-registration
- name: Integration Test
run: |
cd user-registration-integrationtest
image=user-registration docker-compose run test-client
## Instruction:
Fix YAML syntax for CI build
## Code After:
name: user-registration-application-pipeline
on: [push]
jobs:
pipeline:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: setup java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Install application
run: ./mvnw -pl user-registration-application -am install
- name: German Acceptance Tests JBehave
run: |
cd user-registration-acceptancetest-jbehave
./mvnw integration-test
- name: English Acceptance Tests JBehave
run: |
cd user-registration-acceptancetest-jbehave-english
./mvnw integration-test
- name: Acceptance Tests Selenium
run: |
cd user-registration-acceptancetest-selenium
./mvnw test
- name: Capacity Tests
run: |
cd user-registration-capacitytest-gatling
./mvnw test
- name: Build Docker Image for Java
run: |
cd docker
docker build -t java java && docker build -t user-registration user-registration
- name: Build Docker Image for User Registration
run: |
cd docker
docker build -t user-registration user-registration
- name: Integration Test
run: |
cd user-registration-integrationtest
image=user-registration docker-compose run test-client | name: user-registration-application-pipeline
on: [push]
jobs:
pipeline:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: setup java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Install application
run: ./mvnw -pl user-registration-application -am install
- name: German Acceptance Tests JBehave
run: |
cd user-registration-acceptancetest-jbehave
./mvnw integration-test
- name: English Acceptance Tests JBehave
run: |
cd user-registration-acceptancetest-jbehave-english
./mvnw integration-test
- name: Acceptance Tests Selenium
run: |
cd user-registration-acceptancetest-selenium
./mvnw test
- name: Capacity Tests
run: |
cd user-registration-capacitytest-gatling
./mvnw test
- name: Build Docker Image for Java
run: |
cd docker
- docker build -t java java && docker build -t user-registration user-registration
? ^
+ docker build -t java java && docker build -t user-registration user-registration
? ^^^^^^^^
- name: Build Docker Image for User Registration
run: |
cd docker
- docker build -t user-registration user-registration
? ^
+ docker build -t user-registration user-registration
? ^^^^^^^^
- name: Integration Test
run: |
cd user-registration-integrationtest
image=user-registration docker-compose run test-client | 4 | 0.074074 | 2 | 2 |
6894bd3cfc010c371478e7ae9e5e0b3ba108e165 | plugins/configuration/configurationtype/configuration_registrar.py | plugins/configuration/configurationtype/configuration_registrar.py |
import luna.plugins
_configurations = {}
"""
The configuration classes that have been registered here so far, keyed by their
identities.
"""
def register(identity, metadata):
"""
Registers a new configuration plug-in to track configuration with.
This expects the metadata to already be verified as configuration's
metadata.
:param identity: The identity of the plug-in to register.
:param metadata: The metadata of a configuration plug-in.
"""
if identity in _configurations:
luna.plugins.api("logger").warning("Configuration {configuration} is already registered.", configuration=identity)
return
_configurations[identity] = metadata["configuration"]["class"]
def unregister(identity):
raise Exception("Not implemented yet.")
def validate_metadata(metadata):
raise Exception("Not implemented yet.") |
import luna.plugins
_configurations = {}
"""
The configuration classes that have been registered here so far, keyed by their
identities.
"""
def register(identity, metadata):
"""
Registers a new configuration plug-in to track configuration with.
This expects the metadata to already be verified as configuration's
metadata.
:param identity: The identity of the plug-in to register.
:param metadata: The metadata of a configuration plug-in.
"""
if identity in _configurations:
luna.plugins.api("logger").warning("Configuration {configuration} is already registered.", configuration=identity)
return
_configurations[identity] = metadata["configuration"]["class"]
def unregister(identity):
"""
Undoes the registration of a configuration plug-in.
The configuration plug-in will no longer keep track of any configuration.
Existing configuration will be stored persistently.
:param identity: The identity of the plug-in to unregister.
"""
if identity not in _configurations:
luna.plugins.api("logger").warning("Configuration {configuration} is not registered, so I can't unregister it.", configuration=identity)
return
del _configurations[identity] #The actual unregistration.
def validate_metadata(metadata):
raise Exception("Not implemented yet.") | Implement unregistration of configuration plug-ins | Implement unregistration of configuration plug-ins
Perhaps we should not give a warning, but instead an exception, when registering or unregistering fails?
| Python | cc0-1.0 | Ghostkeeper/Luna | python | ## Code Before:
import luna.plugins
_configurations = {}
"""
The configuration classes that have been registered here so far, keyed by their
identities.
"""
def register(identity, metadata):
"""
Registers a new configuration plug-in to track configuration with.
This expects the metadata to already be verified as configuration's
metadata.
:param identity: The identity of the plug-in to register.
:param metadata: The metadata of a configuration plug-in.
"""
if identity in _configurations:
luna.plugins.api("logger").warning("Configuration {configuration} is already registered.", configuration=identity)
return
_configurations[identity] = metadata["configuration"]["class"]
def unregister(identity):
raise Exception("Not implemented yet.")
def validate_metadata(metadata):
raise Exception("Not implemented yet.")
## Instruction:
Implement unregistration of configuration plug-ins
Perhaps we should not give a warning, but instead an exception, when registering or unregistering fails?
## Code After:
import luna.plugins
_configurations = {}
"""
The configuration classes that have been registered here so far, keyed by their
identities.
"""
def register(identity, metadata):
"""
Registers a new configuration plug-in to track configuration with.
This expects the metadata to already be verified as configuration's
metadata.
:param identity: The identity of the plug-in to register.
:param metadata: The metadata of a configuration plug-in.
"""
if identity in _configurations:
luna.plugins.api("logger").warning("Configuration {configuration} is already registered.", configuration=identity)
return
_configurations[identity] = metadata["configuration"]["class"]
def unregister(identity):
"""
Undoes the registration of a configuration plug-in.
The configuration plug-in will no longer keep track of any configuration.
Existing configuration will be stored persistently.
:param identity: The identity of the plug-in to unregister.
"""
if identity not in _configurations:
luna.plugins.api("logger").warning("Configuration {configuration} is not registered, so I can't unregister it.", configuration=identity)
return
del _configurations[identity] #The actual unregistration.
def validate_metadata(metadata):
raise Exception("Not implemented yet.") |
import luna.plugins
_configurations = {}
"""
The configuration classes that have been registered here so far, keyed by their
identities.
"""
def register(identity, metadata):
"""
Registers a new configuration plug-in to track configuration with.
This expects the metadata to already be verified as configuration's
metadata.
:param identity: The identity of the plug-in to register.
:param metadata: The metadata of a configuration plug-in.
"""
if identity in _configurations:
luna.plugins.api("logger").warning("Configuration {configuration} is already registered.", configuration=identity)
return
_configurations[identity] = metadata["configuration"]["class"]
def unregister(identity):
- raise Exception("Not implemented yet.")
+ """
+ Undoes the registration of a configuration plug-in.
+
+ The configuration plug-in will no longer keep track of any configuration.
+ Existing configuration will be stored persistently.
+
+ :param identity: The identity of the plug-in to unregister.
+ """
+ if identity not in _configurations:
+ luna.plugins.api("logger").warning("Configuration {configuration} is not registered, so I can't unregister it.", configuration=identity)
+ return
+ del _configurations[identity] #The actual unregistration.
def validate_metadata(metadata):
raise Exception("Not implemented yet.") | 13 | 0.448276 | 12 | 1 |
efa90202a0586f15575af11ef299b122de413b30 | duralex/AddGitHubIssueVisitor.py | duralex/AddGitHubIssueVisitor.py |
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
from github import Github
class AddGitHubIssueVisitor(AbstractVisitor):
def __init__(self, args):
self.github = Github(args.github_token)
self.repo = self.github.get_repo(args.github_repository)
self.issues = list(self.repo.get_issues())
self.current_issue = -1
super(AddGitHubIssueVisitor, self).__init__()
def visit_edit_node(self, node, post):
if post:
return
if 'commitMessage' not in node:
node['commitMessage'] = '(#' + str(self.current_issue) + ')'
else:
node['commitMessage'] = node['commitMessage'] + ' (#' + str(self.current_issue) + ')'
def visit_node(self, node):
if 'type' in node and node['type'] == 'article':
title = 'Article ' + str(node['order'])
body = node['content']
found = False
for issue in self.issues:
if issue.title == title:
found = True
node['githubIssue'] = issue.html_url
self.current_issue = issue.number
if issue.body != body:
issue.edit(title=title, body=body)
if not found:
issue = self.repo.create_issue(title=title, body=body)
self.current_issue = issue.number
super(AddGitHubIssueVisitor, self).visit_node(node)
|
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
from github import Github
class AddGitHubIssueVisitor(AbstractVisitor):
def __init__(self, args):
self.github = Github(args.github_token)
self.repo = self.github.get_repo(args.github_repository)
self.issues = list(self.repo.get_issues())
self.current_issue = -1
super(AddGitHubIssueVisitor, self).__init__()
def visit_edit_node(self, node, post):
if post:
return
if 'commitMessage' not in node:
node['commitMessage'] = '(#' + str(self.current_issue) + ')'
else:
node['commitMessage'] = node['commitMessage'] + '\nGitHub: #' + str(self.current_issue)
def visit_node(self, node):
if 'type' in node and node['type'] == 'article':
title = 'Article ' + str(node['order'])
body = node['content']
found = False
for issue in self.issues:
if issue.title == title:
found = True
node['githubIssue'] = issue.html_url
self.current_issue = issue.number
if issue.body != body:
issue.edit(title=title, body=body)
if not found:
issue = self.repo.create_issue(title=title, body=body)
self.current_issue = issue.number
super(AddGitHubIssueVisitor, self).visit_node(node)
| Add the GitHub issue number as a new line in the commitMessage field. | Add the GitHub issue number as a new line in the commitMessage field.
| Python | mit | Legilibre/duralex | python | ## Code Before:
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
from github import Github
class AddGitHubIssueVisitor(AbstractVisitor):
def __init__(self, args):
self.github = Github(args.github_token)
self.repo = self.github.get_repo(args.github_repository)
self.issues = list(self.repo.get_issues())
self.current_issue = -1
super(AddGitHubIssueVisitor, self).__init__()
def visit_edit_node(self, node, post):
if post:
return
if 'commitMessage' not in node:
node['commitMessage'] = '(#' + str(self.current_issue) + ')'
else:
node['commitMessage'] = node['commitMessage'] + ' (#' + str(self.current_issue) + ')'
def visit_node(self, node):
if 'type' in node and node['type'] == 'article':
title = 'Article ' + str(node['order'])
body = node['content']
found = False
for issue in self.issues:
if issue.title == title:
found = True
node['githubIssue'] = issue.html_url
self.current_issue = issue.number
if issue.body != body:
issue.edit(title=title, body=body)
if not found:
issue = self.repo.create_issue(title=title, body=body)
self.current_issue = issue.number
super(AddGitHubIssueVisitor, self).visit_node(node)
## Instruction:
Add the GitHub issue number as a new line in the commitMessage field.
## Code After:
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
from github import Github
class AddGitHubIssueVisitor(AbstractVisitor):
def __init__(self, args):
self.github = Github(args.github_token)
self.repo = self.github.get_repo(args.github_repository)
self.issues = list(self.repo.get_issues())
self.current_issue = -1
super(AddGitHubIssueVisitor, self).__init__()
def visit_edit_node(self, node, post):
if post:
return
if 'commitMessage' not in node:
node['commitMessage'] = '(#' + str(self.current_issue) + ')'
else:
node['commitMessage'] = node['commitMessage'] + '\nGitHub: #' + str(self.current_issue)
def visit_node(self, node):
if 'type' in node and node['type'] == 'article':
title = 'Article ' + str(node['order'])
body = node['content']
found = False
for issue in self.issues:
if issue.title == title:
found = True
node['githubIssue'] = issue.html_url
self.current_issue = issue.number
if issue.body != body:
issue.edit(title=title, body=body)
if not found:
issue = self.repo.create_issue(title=title, body=body)
self.current_issue = issue.number
super(AddGitHubIssueVisitor, self).visit_node(node)
|
from AbstractVisitor import AbstractVisitor
from duralex.alinea_parser import *
from github import Github
class AddGitHubIssueVisitor(AbstractVisitor):
def __init__(self, args):
self.github = Github(args.github_token)
self.repo = self.github.get_repo(args.github_repository)
self.issues = list(self.repo.get_issues())
self.current_issue = -1
super(AddGitHubIssueVisitor, self).__init__()
def visit_edit_node(self, node, post):
if post:
return
if 'commitMessage' not in node:
node['commitMessage'] = '(#' + str(self.current_issue) + ')'
else:
- node['commitMessage'] = node['commitMessage'] + ' (#' + str(self.current_issue) + ')'
? - ------
+ node['commitMessage'] = node['commitMessage'] + '\nGitHub: #' + str(self.current_issue)
? +++++++++
def visit_node(self, node):
if 'type' in node and node['type'] == 'article':
title = 'Article ' + str(node['order'])
body = node['content']
found = False
for issue in self.issues:
if issue.title == title:
found = True
node['githubIssue'] = issue.html_url
self.current_issue = issue.number
if issue.body != body:
issue.edit(title=title, body=body)
if not found:
issue = self.repo.create_issue(title=title, body=body)
self.current_issue = issue.number
super(AddGitHubIssueVisitor, self).visit_node(node) | 2 | 0.046512 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.