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
9be1bb5da7f5145d5bea23165d7d7ce55446ef41
lib/beer_list.rb
lib/beer_list.rb
require 'mechanize' require 'json' module BeerList require 'beer_list/scraper' require 'beer_list/establishments' class << self def scraper @scraper ||= Scraper.new end end end
require 'mechanize' require 'json' module BeerList require 'beer_list/scraper' require 'beer_list/establishments' class << self def scraper @scraper ||= Scraper.new end def method_missing(method, *args, &block) est = method.to_s.split('_').map(&:capitalize).join klass = ['BeerList', 'Establishments', est].compact.inject(Object){ |o, name| o.const_get(name) } scraper.beer_list klass.new end end end
Call the establishment directly on BeerList
Call the establishment directly on BeerList Example: BeerList.muddy_waters => "{\"BeerList::Establishments::MuddyWaters\":[\"\",\"Surly  Bend...
Ruby
mit
DanOlson/beer_list
ruby
## Code Before: require 'mechanize' require 'json' module BeerList require 'beer_list/scraper' require 'beer_list/establishments' class << self def scraper @scraper ||= Scraper.new end end end ## Instruction: Call the establishment directly on BeerList Example: BeerList.muddy_waters => "{\"BeerList::Establishments::MuddyWaters\":[\"\",\"Surly  Bend... ## Code After: require 'mechanize' require 'json' module BeerList require 'beer_list/scraper' require 'beer_list/establishments' class << self def scraper @scraper ||= Scraper.new end def method_missing(method, *args, &block) est = method.to_s.split('_').map(&:capitalize).join klass = ['BeerList', 'Establishments', est].compact.inject(Object){ |o, name| o.const_get(name) } scraper.beer_list klass.new end end end
require 'mechanize' require 'json' module BeerList require 'beer_list/scraper' require 'beer_list/establishments' class << self def scraper @scraper ||= Scraper.new end + + def method_missing(method, *args, &block) + est = method.to_s.split('_').map(&:capitalize).join + klass = ['BeerList', 'Establishments', est].compact.inject(Object){ |o, name| o.const_get(name) } + scraper.beer_list klass.new + end end end
6
0.428571
6
0
c30e59c955a3f9592e7deaa5df6fbabf015bb95a
packages/hm/hmatrix-glpk.yaml
packages/hm/hmatrix-glpk.yaml
homepage: https://github.com/albertoruiz/hmatrix changelog-type: '' hash: 06fab6ffa2169af9654e1d703ba92922c45d9682f15b84116547f11f839ebe7e test-bench-deps: {} maintainer: Alberto Ruiz <aruiz@um.es> synopsis: Linear Programming based on GLPK changelog: '' basic-deps: base: <5 containers: -any hmatrix: ! '>=0.17' all-versions: - '0.1.0' - '0.2.0' - '0.2.1' - '0.2.2' - '0.3.0' - '0.3.1' - '0.4.0' - '0.4.0.1' - '0.4.0.2' - '0.4.1.0' - '0.5.0.0' - '0.6.0.0' author: Alberto Ruiz latest: '0.6.0.0' description-type: haddock description: Simple interface to linear programming functions provided by GLPK. license-name: GPL
homepage: https://github.com/albertoruiz/hmatrix changelog-type: '' hash: cf46c54bc3878bd207674ad88c3389083809f4df862df68ee64c6708dc517a52 test-bench-deps: {} maintainer: Alberto Ruiz <aruiz@um.es> synopsis: Linear Programming based on GLPK changelog: '' basic-deps: base: <5 containers: -any hmatrix: ! '>=0.17' all-versions: - '0.1.0' - '0.2.0' - '0.2.1' - '0.2.2' - '0.3.0' - '0.3.1' - '0.4.0' - '0.4.0.1' - '0.4.0.2' - '0.4.1.0' - '0.5.0.0' - '0.6.0.0' - '0.19.0.0' author: Alberto Ruiz latest: '0.19.0.0' description-type: haddock description: Simple interface to linear programming functions provided by GLPK. license-name: GPL-3
Update from Hackage at 2018-04-22T12:10:37Z
Update from Hackage at 2018-04-22T12:10:37Z
YAML
mit
commercialhaskell/all-cabal-metadata
yaml
## Code Before: homepage: https://github.com/albertoruiz/hmatrix changelog-type: '' hash: 06fab6ffa2169af9654e1d703ba92922c45d9682f15b84116547f11f839ebe7e test-bench-deps: {} maintainer: Alberto Ruiz <aruiz@um.es> synopsis: Linear Programming based on GLPK changelog: '' basic-deps: base: <5 containers: -any hmatrix: ! '>=0.17' all-versions: - '0.1.0' - '0.2.0' - '0.2.1' - '0.2.2' - '0.3.0' - '0.3.1' - '0.4.0' - '0.4.0.1' - '0.4.0.2' - '0.4.1.0' - '0.5.0.0' - '0.6.0.0' author: Alberto Ruiz latest: '0.6.0.0' description-type: haddock description: Simple interface to linear programming functions provided by GLPK. license-name: GPL ## Instruction: Update from Hackage at 2018-04-22T12:10:37Z ## Code After: homepage: https://github.com/albertoruiz/hmatrix changelog-type: '' hash: cf46c54bc3878bd207674ad88c3389083809f4df862df68ee64c6708dc517a52 test-bench-deps: {} maintainer: Alberto Ruiz <aruiz@um.es> synopsis: Linear Programming based on GLPK changelog: '' basic-deps: base: <5 containers: -any hmatrix: ! '>=0.17' all-versions: - '0.1.0' - '0.2.0' - '0.2.1' - '0.2.2' - '0.3.0' - '0.3.1' - '0.4.0' - '0.4.0.1' - '0.4.0.2' - '0.4.1.0' - '0.5.0.0' - '0.6.0.0' - '0.19.0.0' author: Alberto Ruiz latest: '0.19.0.0' description-type: haddock description: Simple interface to linear programming functions provided by GLPK. license-name: GPL-3
homepage: https://github.com/albertoruiz/hmatrix changelog-type: '' - hash: 06fab6ffa2169af9654e1d703ba92922c45d9682f15b84116547f11f839ebe7e + hash: cf46c54bc3878bd207674ad88c3389083809f4df862df68ee64c6708dc517a52 test-bench-deps: {} maintainer: Alberto Ruiz <aruiz@um.es> synopsis: Linear Programming based on GLPK changelog: '' basic-deps: base: <5 containers: -any hmatrix: ! '>=0.17' all-versions: - '0.1.0' - '0.2.0' - '0.2.1' - '0.2.2' - '0.3.0' - '0.3.1' - '0.4.0' - '0.4.0.1' - '0.4.0.2' - '0.4.1.0' - '0.5.0.0' - '0.6.0.0' + - '0.19.0.0' author: Alberto Ruiz - latest: '0.6.0.0' ? ^ + latest: '0.19.0.0' ? ^^ description-type: haddock description: Simple interface to linear programming functions provided by GLPK. - license-name: GPL + license-name: GPL-3 ? ++
7
0.241379
4
3
e767234e380233866d22d653a8f795a5fc987c1c
app/locale/en/base_email_update_help.txt
app/locale/en/base_email_update_help.txt
To update a facility via email, you can either draft a new email or reply to an update you received with changed information. Each facility must start with a line in the following format: update General Hospital Here, "example.org/123" is the unique key of "General Hospital". The key of the facility "example.org/123" is not strictly required if the title is supplied. Each line that follows must start with the name of an attribute, followed by a space, and then the new value for that attribute. A complete list of attribute names is included below. For example, to update the number of total and available beds for a facility, type: update General Hospital Total beds 500 Available beds 79 An update email for two facilities might look like the following: update General Hospital Total beds 37 Available beds 10 Contact name John Smith update Public Hospital Reachable by road yes {% include help_file %}
To update a facility via email, you can either draft a new email or reply to an update you received with changed information. Each facility must start with a line in the following format: update General Hospital Here, General Hospital is the title of the facility to be updated. Each line that follows the initial update line must start with the name of an attribute, followed by a space, and then the new value for that attribute. A complete list of attribute names is included below. For example, to update the number of total and available beds for a facility, type: update General Hospital Total beds 500 Available beds 79 An update email for two facilities might look like the following: update General Hospital Total beds 37 Available beds 10 Contact name John Smith update Public Hospital Reachable by road yes {% include help_file %}
Change to language in email response text.
Change to language in email response text.
Text
apache-2.0
Princessgladys/googleresourcefinder,Princessgladys/googleresourcefinder,Princessgladys/googleresourcefinder
text
## Code Before: To update a facility via email, you can either draft a new email or reply to an update you received with changed information. Each facility must start with a line in the following format: update General Hospital Here, "example.org/123" is the unique key of "General Hospital". The key of the facility "example.org/123" is not strictly required if the title is supplied. Each line that follows must start with the name of an attribute, followed by a space, and then the new value for that attribute. A complete list of attribute names is included below. For example, to update the number of total and available beds for a facility, type: update General Hospital Total beds 500 Available beds 79 An update email for two facilities might look like the following: update General Hospital Total beds 37 Available beds 10 Contact name John Smith update Public Hospital Reachable by road yes {% include help_file %} ## Instruction: Change to language in email response text. ## Code After: To update a facility via email, you can either draft a new email or reply to an update you received with changed information. Each facility must start with a line in the following format: update General Hospital Here, General Hospital is the title of the facility to be updated. Each line that follows the initial update line must start with the name of an attribute, followed by a space, and then the new value for that attribute. A complete list of attribute names is included below. For example, to update the number of total and available beds for a facility, type: update General Hospital Total beds 500 Available beds 79 An update email for two facilities might look like the following: update General Hospital Total beds 37 Available beds 10 Contact name John Smith update Public Hospital Reachable by road yes {% include help_file %}
To update a facility via email, you can either draft a new email or reply to an update you received with changed information. Each facility must start with a line in the following format: update General Hospital - Here, "example.org/123" is the unique key of "General Hospital". The key of the facility "example.org/123" is not strictly required if the title is supplied. Each line that follows must start with the name of an attribute, followed by a space, and then the new value for that attribute. A complete list of attribute names is included below. For example, to update the number of total and available beds for a facility, type: + Here, General Hospital is the title of the facility to be updated. Each line that follows the initial update line must start with the name of an attribute, followed by a space, and then the new value for that attribute. A complete list of attribute names is included below. For example, to update the number of total and available beds for a facility, type: update General Hospital Total beds 500 Available beds 79 An update email for two facilities might look like the following: update General Hospital Total beds 37 Available beds 10 Contact name John Smith update Public Hospital Reachable by road yes {% include help_file %}
2
0.086957
1
1
98fe683f3a67d95435642002a181cc4959ff7e81
files/copy.go
files/copy.go
package files import ( "io" "os" "path/filepath" ) // Copy copies a file to a given destination. It makes sur parent folders are // created on the way. Use `-` to copy to stdout. func Copy(src, dst string) error { if dst != "-" { if err := MkdirAll(filepath.Dir(dst)); err != nil { return err } } in, err := os.Open(src) if err != nil { return err } defer in.Close() var out io.Writer if dst != "-" { destOut, err := os.Create(dst) if err != nil { return err } defer destOut.Close() out = destOut } else { out = os.Stdout } _, err = io.Copy(out, in) return err } func CopyFrom(dst string, mode os.FileMode, reader io.Reader) error { if err := MkdirAll(filepath.Dir(dst)); err != nil { return err } file, err := os.OpenFile(dst, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, mode) if err != nil { return err } defer file.Close() _, err = io.Copy(file, reader) return err }
package files import ( "io" "os" "path/filepath" ) // Copy copies a file to a given destination. It makes sur parent folders are // created on the way. Use `-` to copy to stdout. func Copy(src, dst string) error { in, err := os.Open(src) if err != nil { return err } defer in.Close() return CopyFrom(dst, 0666, in) } func CopyFrom(dst string, mode os.FileMode, reader io.Reader) error { var out io.Writer if dst == "-" { out = os.Stdout } else { if err := MkdirAll(filepath.Dir(dst)); err != nil { return err } file, err := os.OpenFile(dst, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, mode) if err != nil { return err } defer file.Close() out = file } _, err := io.Copy(out, reader) return err }
Support output to stdout for any action
Support output to stdout for any action Signed-off-by: David Gageot <aa743a0aaec8f7d7a1f01442503957f4d7a2d634@gageot.net>
Go
apache-2.0
dgageot/getme
go
## Code Before: package files import ( "io" "os" "path/filepath" ) // Copy copies a file to a given destination. It makes sur parent folders are // created on the way. Use `-` to copy to stdout. func Copy(src, dst string) error { if dst != "-" { if err := MkdirAll(filepath.Dir(dst)); err != nil { return err } } in, err := os.Open(src) if err != nil { return err } defer in.Close() var out io.Writer if dst != "-" { destOut, err := os.Create(dst) if err != nil { return err } defer destOut.Close() out = destOut } else { out = os.Stdout } _, err = io.Copy(out, in) return err } func CopyFrom(dst string, mode os.FileMode, reader io.Reader) error { if err := MkdirAll(filepath.Dir(dst)); err != nil { return err } file, err := os.OpenFile(dst, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, mode) if err != nil { return err } defer file.Close() _, err = io.Copy(file, reader) return err } ## Instruction: Support output to stdout for any action Signed-off-by: David Gageot <aa743a0aaec8f7d7a1f01442503957f4d7a2d634@gageot.net> ## Code After: package files import ( "io" "os" "path/filepath" ) // Copy copies a file to a given destination. It makes sur parent folders are // created on the way. Use `-` to copy to stdout. func Copy(src, dst string) error { in, err := os.Open(src) if err != nil { return err } defer in.Close() return CopyFrom(dst, 0666, in) } func CopyFrom(dst string, mode os.FileMode, reader io.Reader) error { var out io.Writer if dst == "-" { out = os.Stdout } else { if err := MkdirAll(filepath.Dir(dst)); err != nil { return err } file, err := os.OpenFile(dst, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, mode) if err != nil { return err } defer file.Close() out = file } _, err := io.Copy(out, reader) return err }
package files import ( "io" "os" "path/filepath" ) // Copy copies a file to a given destination. It makes sur parent folders are // created on the way. Use `-` to copy to stdout. func Copy(src, dst string) error { - if dst != "-" { - if err := MkdirAll(filepath.Dir(dst)); err != nil { - return err - } - } - in, err := os.Open(src) if err != nil { return err } defer in.Close() + return CopyFrom(dst, 0666, in) + } + + func CopyFrom(dst string, mode os.FileMode, reader io.Reader) error { var out io.Writer - if dst != "-" { ? ^ + if dst == "-" { ? ^ - destOut, err := os.Create(dst) + out = os.Stdout + } else { + if err := MkdirAll(filepath.Dir(dst)); err != nil { + return err + } + + file, err := os.OpenFile(dst, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, mode) if err != nil { return err } - defer destOut.Close() ? ^ ----- + defer file.Close() ? ^^^ + out = file - out = destOut - } else { - out = os.Stdout } - _, err = io.Copy(out, in) ? ^^ + _, err := io.Copy(out, reader) ? + ^^^^^^ return err } - - func CopyFrom(dst string, mode os.FileMode, reader io.Reader) error { - if err := MkdirAll(filepath.Dir(dst)); err != nil { - return err - } - - file, err := os.OpenFile(dst, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, mode) - if err != nil { - return err - } - defer file.Close() - - _, err = io.Copy(file, reader) - return err - }
43
0.796296
15
28
ef9ced08df3f370eef685aaf41e2931332a7fd32
serial-gson/src/test/resources/META-INF/ejb-jar-EventSerializerGsonTest.xml
serial-gson/src/test/resources/META-INF/ejb-jar-EventSerializerGsonTest.xml
<?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" version="3.1"> <enterprise-beans> <session> <ejb-name>EventSerializer</ejb-name> <ejb-class>org.jeeventstore.serialization.gson.EventSerializerGson</ejb-class> <session-type>Singleton</session-type> </session> </enterprise-beans> </ejb-jar>
<?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" version="3.1"> <enterprise-beans> <session> <ejb-name>EventSerializer</ejb-name> <business-local>org.jeeventstore.core.serialization.EventSerializer</business-local> <ejb-class>org.jeeventstore.serialization.gson.EventSerializerGson</ejb-class> <session-type>Singleton</session-type> <init-on-startup>true</init-on-startup> </session> </enterprise-beans> </ejb-jar>
Change ejb-jar.xml to work with glassfish
Change ejb-jar.xml to work with glassfish
XML
mit
JEEventStore/JEEventStore,JEEventStore/JEEventStore
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" version="3.1"> <enterprise-beans> <session> <ejb-name>EventSerializer</ejb-name> <ejb-class>org.jeeventstore.serialization.gson.EventSerializerGson</ejb-class> <session-type>Singleton</session-type> </session> </enterprise-beans> </ejb-jar> ## Instruction: Change ejb-jar.xml to work with glassfish ## Code After: <?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" version="3.1"> <enterprise-beans> <session> <ejb-name>EventSerializer</ejb-name> <business-local>org.jeeventstore.core.serialization.EventSerializer</business-local> <ejb-class>org.jeeventstore.serialization.gson.EventSerializerGson</ejb-class> <session-type>Singleton</session-type> <init-on-startup>true</init-on-startup> </session> </enterprise-beans> </ejb-jar>
<?xml version="1.0" encoding="UTF-8"?> <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" version="3.1"> <enterprise-beans> <session> <ejb-name>EventSerializer</ejb-name> + <business-local>org.jeeventstore.core.serialization.EventSerializer</business-local> <ejb-class>org.jeeventstore.serialization.gson.EventSerializerGson</ejb-class> <session-type>Singleton</session-type> + <init-on-startup>true</init-on-startup> </session> </enterprise-beans> </ejb-jar>
2
0.111111
2
0
d72cbe4232bc70c2b2f00c0aedc5301887568db6
config/jobs/kubernetes/sig-arch/conformance-gate.yaml
config/jobs/kubernetes/sig-arch/conformance-gate.yaml
periodics: - interval: 3h name: apisnoop-conformance-gate annotations: testgrid-dashboards: sig-arch-conformance testgrid-tab-name: apisnoop-conformance-gate test-grid-alert-email: kubernetes-sig-arch-conformance-test-failures@googlegroups.com testgrid-num-failures-to-alert: '1' description: 'Uses APISnoop to check that new GA endpoints are conformance tested in latest e2e test run' decorate: true spec: containers: - name: apisnoop-gate image: gcr.io/k8s-staging-apisnoop/snoopdb:v20200923-v2020.09.23-1-gb3afc41 args: - postgres
periodics: - interval: 3h name: apisnoop-conformance-gate annotations: testgrid-dashboards: sig-arch-conformance testgrid-tab-name: apisnoop-conformance-gate test-grid-alert-email: kubernetes-sig-arch-conformance-test-failures@googlegroups.com testgrid-num-failures-to-alert: '1' description: 'Uses APISnoop to check that new GA endpoints are conformance tested in latest e2e test run' decorate: true spec: containers: - name: apisnoop-gate image: gcr.io/k8s-staging-apisnoop/snoopdb:v20200923-v2020.09.23-1-gb3afc41 command: - /usr/local/bin/docker-entrypoint.sh - postgres
Use command: instead of args: for apisnoop-gate entrypoint + arg
Use command: instead of args: for apisnoop-gate entrypoint + arg
YAML
apache-2.0
brahmaroutu/test-infra,michelle192837/test-infra,dims/test-infra,monopole/test-infra,pwittrock/test-infra,brahmaroutu/test-infra,monopole/test-infra,dims/test-infra,michelle192837/test-infra,fejta/test-infra,pwittrock/test-infra,jessfraz/test-infra,BenTheElder/test-infra,brahmaroutu/test-infra,BenTheElder/test-infra,kubernetes/test-infra,fejta/test-infra,fejta/test-infra,pwittrock/test-infra,dims/test-infra,BenTheElder/test-infra,cblecker/test-infra,fejta/test-infra,cjwagner/test-infra,cjwagner/test-infra,kubernetes/test-infra,kubernetes/test-infra,monopole/test-infra,BenTheElder/test-infra,cblecker/test-infra,jessfraz/test-infra,cblecker/test-infra,brahmaroutu/test-infra,brahmaroutu/test-infra,monopole/test-infra,brahmaroutu/test-infra,dims/test-infra,dims/test-infra,monopole/test-infra,michelle192837/test-infra,kubernetes/test-infra,jessfraz/test-infra,michelle192837/test-infra,cblecker/test-infra,jessfraz/test-infra,cjwagner/test-infra,fejta/test-infra,jessfraz/test-infra,cjwagner/test-infra,cjwagner/test-infra,fejta/test-infra,michelle192837/test-infra,pwittrock/test-infra,pwittrock/test-infra,cblecker/test-infra,BenTheElder/test-infra,jessfraz/test-infra,cjwagner/test-infra,kubernetes/test-infra,BenTheElder/test-infra,dims/test-infra,monopole/test-infra,michelle192837/test-infra,kubernetes/test-infra,cblecker/test-infra
yaml
## Code Before: periodics: - interval: 3h name: apisnoop-conformance-gate annotations: testgrid-dashboards: sig-arch-conformance testgrid-tab-name: apisnoop-conformance-gate test-grid-alert-email: kubernetes-sig-arch-conformance-test-failures@googlegroups.com testgrid-num-failures-to-alert: '1' description: 'Uses APISnoop to check that new GA endpoints are conformance tested in latest e2e test run' decorate: true spec: containers: - name: apisnoop-gate image: gcr.io/k8s-staging-apisnoop/snoopdb:v20200923-v2020.09.23-1-gb3afc41 args: - postgres ## Instruction: Use command: instead of args: for apisnoop-gate entrypoint + arg ## Code After: periodics: - interval: 3h name: apisnoop-conformance-gate annotations: testgrid-dashboards: sig-arch-conformance testgrid-tab-name: apisnoop-conformance-gate test-grid-alert-email: kubernetes-sig-arch-conformance-test-failures@googlegroups.com testgrid-num-failures-to-alert: '1' description: 'Uses APISnoop to check that new GA endpoints are conformance tested in latest e2e test run' decorate: true spec: containers: - name: apisnoop-gate image: gcr.io/k8s-staging-apisnoop/snoopdb:v20200923-v2020.09.23-1-gb3afc41 command: - /usr/local/bin/docker-entrypoint.sh - postgres
periodics: - interval: 3h name: apisnoop-conformance-gate annotations: testgrid-dashboards: sig-arch-conformance testgrid-tab-name: apisnoop-conformance-gate test-grid-alert-email: kubernetes-sig-arch-conformance-test-failures@googlegroups.com testgrid-num-failures-to-alert: '1' description: 'Uses APISnoop to check that new GA endpoints are conformance tested in latest e2e test run' decorate: true spec: containers: - name: apisnoop-gate image: gcr.io/k8s-staging-apisnoop/snoopdb:v20200923-v2020.09.23-1-gb3afc41 - args: + command: + - /usr/local/bin/docker-entrypoint.sh - postgres
3
0.1875
2
1
467b5716d03b64dfe37c66769576ce9fe1d7fa62
tests/matcher_argument_run_tests.c
tests/matcher_argument_run_tests.c
// // Created by Jake Kinsella on 6/19/17. // #include <assert.h> #include "../src/matcher/matcher.h" int main(int argc, const char* argv[]) { return 0; }
// // Created by Jake Kinsella on 6/19/17. // #include <assert.h> #include "../src/matcher/matcher.h" #include "../src/registers.h" void dst_run(uint8_t *dst_register); void src_run(const uint8_t src_register); void rp_run(RegisterPair *dst_register_pair); void dst_src_run(uint8_t *dst_register, const uint8_t src_register); int value_register1 = 0; int value_register2 = 0; int main(int argc, const char* argv[]) { return 0; } void dst_run(uint8_t *dst_register) { value_register1 = *dst_register; } void src_run(const uint8_t src_register) { value_register1 = src_register; } void rp_run(RegisterPair *dst_register_pair) { value_register1 = combine_bytes(*dst_register_pair->register1, *dst_register_pair->register2); } void dst_src_run(uint8_t *dst_register, const uint8_t src_register) { value_register1 = *dst_register; value_register2 = src_register; }
Create dummy functions for future matcher tests
Create dummy functions for future matcher tests
C
mit
TheLocust3/Intel-8080-Emulator,TheLocust3/Intel-8080-Emulator
c
## Code Before: // // Created by Jake Kinsella on 6/19/17. // #include <assert.h> #include "../src/matcher/matcher.h" int main(int argc, const char* argv[]) { return 0; } ## Instruction: Create dummy functions for future matcher tests ## Code After: // // Created by Jake Kinsella on 6/19/17. // #include <assert.h> #include "../src/matcher/matcher.h" #include "../src/registers.h" void dst_run(uint8_t *dst_register); void src_run(const uint8_t src_register); void rp_run(RegisterPair *dst_register_pair); void dst_src_run(uint8_t *dst_register, const uint8_t src_register); int value_register1 = 0; int value_register2 = 0; int main(int argc, const char* argv[]) { return 0; } void dst_run(uint8_t *dst_register) { value_register1 = *dst_register; } void src_run(const uint8_t src_register) { value_register1 = src_register; } void rp_run(RegisterPair *dst_register_pair) { value_register1 = combine_bytes(*dst_register_pair->register1, *dst_register_pair->register2); } void dst_src_run(uint8_t *dst_register, const uint8_t src_register) { value_register1 = *dst_register; value_register2 = src_register; }
// // Created by Jake Kinsella on 6/19/17. // #include <assert.h> #include "../src/matcher/matcher.h" + #include "../src/registers.h" + + void dst_run(uint8_t *dst_register); + void src_run(const uint8_t src_register); + void rp_run(RegisterPair *dst_register_pair); + void dst_src_run(uint8_t *dst_register, const uint8_t src_register); + + int value_register1 = 0; + int value_register2 = 0; int main(int argc, const char* argv[]) { return 0; } + + void dst_run(uint8_t *dst_register) + { + value_register1 = *dst_register; + } + + void src_run(const uint8_t src_register) + { + value_register1 = src_register; + } + + void rp_run(RegisterPair *dst_register_pair) + { + value_register1 = combine_bytes(*dst_register_pair->register1, *dst_register_pair->register2); + } + + void dst_src_run(uint8_t *dst_register, const uint8_t src_register) + { + value_register1 = *dst_register; + value_register2 = src_register; + }
30
2.5
30
0
b9b8dcd2cf38a121661f446ea68c668f176453de
test/RCBTest.cpp
test/RCBTest.cpp
int main() { std::cout << rang::fg::blue << "\nShould be blue"; std::ofstream out("out.txt"); std::streambuf *coutbuf = std::cout.rdbuf(); std::cout.rdbuf(out.rdbuf()); std::string word = "not blue"; std::cout << "START " << rang::fg::blue << word << " END"; std::cout.rdbuf(coutbuf); std::cout << "\nShould again be blue" << rang::style::reset << std::endl; return 0; }
std::string RCB(std::string input) { std::ofstream out("out.txt"); std::streambuf *coutbuf = std::cout.rdbuf(); std::cout.rdbuf(out.rdbuf()); std::cout << rang::fg::blue << input << rang::style::reset; std::cout.rdbuf(coutbuf); out.close(); std::ifstream in("out.txt"); std::string output; std::getline(in,output); return output; } TEST_CASE("Redirected cout buffer", "RCB") { REQUIRE(RCB("HelloWorld") == "HelloWorld"); }
Add a simple write-then-read test
Add a simple write-then-read test
C++
unlicense
agauniyal/rang,agauniyal/rang
c++
## Code Before: int main() { std::cout << rang::fg::blue << "\nShould be blue"; std::ofstream out("out.txt"); std::streambuf *coutbuf = std::cout.rdbuf(); std::cout.rdbuf(out.rdbuf()); std::string word = "not blue"; std::cout << "START " << rang::fg::blue << word << " END"; std::cout.rdbuf(coutbuf); std::cout << "\nShould again be blue" << rang::style::reset << std::endl; return 0; } ## Instruction: Add a simple write-then-read test ## Code After: std::string RCB(std::string input) { std::ofstream out("out.txt"); std::streambuf *coutbuf = std::cout.rdbuf(); std::cout.rdbuf(out.rdbuf()); std::cout << rang::fg::blue << input << rang::style::reset; std::cout.rdbuf(coutbuf); out.close(); std::ifstream in("out.txt"); std::string output; std::getline(in,output); return output; } TEST_CASE("Redirected cout buffer", "RCB") { REQUIRE(RCB("HelloWorld") == "HelloWorld"); }
- int main() + std::string RCB(std::string input) { - std::cout << rang::fg::blue << "\nShould be blue"; std::ofstream out("out.txt"); std::streambuf *coutbuf = std::cout.rdbuf(); std::cout.rdbuf(out.rdbuf()); + std::cout << rang::fg::blue << input << rang::style::reset; - std::string word = "not blue"; - std::cout << "START " << rang::fg::blue << word << " END"; std::cout.rdbuf(coutbuf); - std::cout << "\nShould again be blue" << rang::style::reset << std::endl; - return 0; + out.close(); + + std::ifstream in("out.txt"); + std::string output; + std::getline(in,output); + return output; + } + + TEST_CASE("Redirected cout buffer", "RCB") + { + REQUIRE(RCB("HelloWorld") == "HelloWorld"); + } +
21
1.4
15
6
b5f5d878137d0e5af063a1751f069a9395f02485
menus/language-idris.cson
menus/language-idris.cson
'menu': [ { 'label': 'Packages' 'submenu': [ 'label': 'Idris' 'submenu': [ { 'label': 'Typecheck' 'command': 'language-idris:typecheck' } ] ] } ] 'context-menu': 'atom-text-editor[data-grammar~=\"idris\"]': [ { 'label': 'Idris' 'submenu': [ { 'label': 'Typecheck' 'command': 'language-idris:typecheck' } { 'label': 'Type search' 'command': 'language-idris:type-of' } { 'label': 'Docs for' 'command': 'language-idris:docs-for' } ] } ]
'menu': [ { 'label': 'Packages' 'submenu': [ 'label': 'Idris' 'submenu': [ { 'label': 'Typecheck' 'command': 'language-idris:typecheck' } { 'label': 'Open REPL' 'command': 'language-idris:open-repl' } { 'label': 'Apropos' 'command': 'language-idris:apropos' } { 'label': 'Holes' 'command': 'language-idris:holes' } { 'label': 'Stop Compiler' 'command': 'language-idris:stop-compiler' } ] ] } ] 'context-menu': 'atom-text-editor[data-grammar~=\"idris\"]': [ { 'label': 'Idris' 'submenu': [ { 'label': 'Typecheck' 'command': 'language-idris:typecheck' } { 'label': 'Type search' 'command': 'language-idris:type-of' } { 'label': 'Docs for' 'command': 'language-idris:docs-for' } ] } ]
Add additional entries to the Idris main menu
Add additional entries to the Idris main menu In particular: Apropos, Open REPL, Show Holes and Stop Compiler All these are commands which are not specific to a particular location in the idris file being edited.
CoffeeScript
mit
idris-hackers/atom-language-idris
coffeescript
## Code Before: 'menu': [ { 'label': 'Packages' 'submenu': [ 'label': 'Idris' 'submenu': [ { 'label': 'Typecheck' 'command': 'language-idris:typecheck' } ] ] } ] 'context-menu': 'atom-text-editor[data-grammar~=\"idris\"]': [ { 'label': 'Idris' 'submenu': [ { 'label': 'Typecheck' 'command': 'language-idris:typecheck' } { 'label': 'Type search' 'command': 'language-idris:type-of' } { 'label': 'Docs for' 'command': 'language-idris:docs-for' } ] } ] ## Instruction: Add additional entries to the Idris main menu In particular: Apropos, Open REPL, Show Holes and Stop Compiler All these are commands which are not specific to a particular location in the idris file being edited. ## Code After: 'menu': [ { 'label': 'Packages' 'submenu': [ 'label': 'Idris' 'submenu': [ { 'label': 'Typecheck' 'command': 'language-idris:typecheck' } { 'label': 'Open REPL' 'command': 'language-idris:open-repl' } { 'label': 'Apropos' 'command': 'language-idris:apropos' } { 'label': 'Holes' 'command': 'language-idris:holes' } { 'label': 'Stop Compiler' 'command': 'language-idris:stop-compiler' } ] ] } ] 'context-menu': 'atom-text-editor[data-grammar~=\"idris\"]': [ { 'label': 'Idris' 'submenu': [ { 'label': 'Typecheck' 'command': 'language-idris:typecheck' } { 'label': 'Type search' 'command': 'language-idris:type-of' } { 'label': 'Docs for' 'command': 'language-idris:docs-for' } ] } ]
'menu': [ { 'label': 'Packages' 'submenu': [ 'label': 'Idris' 'submenu': [ { 'label': 'Typecheck' 'command': 'language-idris:typecheck' + } + { + 'label': 'Open REPL' + 'command': 'language-idris:open-repl' + } + { + 'label': 'Apropos' + 'command': 'language-idris:apropos' + } + { + 'label': 'Holes' + 'command': 'language-idris:holes' + } + { + 'label': 'Stop Compiler' + 'command': 'language-idris:stop-compiler' } ] ] } ] 'context-menu': 'atom-text-editor[data-grammar~=\"idris\"]': [ { 'label': 'Idris' 'submenu': [ { 'label': 'Typecheck' 'command': 'language-idris:typecheck' } { 'label': 'Type search' 'command': 'language-idris:type-of' } { 'label': 'Docs for' 'command': 'language-idris:docs-for' } ] } ]
16
0.432432
16
0
0f1416cfd7e406300486b3b96b27ff8c6dabb4ac
lib/will_paginate/deprecation.rb
lib/will_paginate/deprecation.rb
module WillPaginate::Deprecation class << self def warn(message, stack = caller) offending_line = origin_of_call(stack) full_message = "DEPRECATION WARNING: #{message} (called from #{offending_line})" logger = rails_logger || Kernel logger.warn full_message end private def rails_logger defined?(Rails.logger) && Rails.logger end def origin_of_call(stack) lib_root = File.expand_path('../../..', __FILE__) stack.find { |line| line.index(lib_root) != 0 } || stack.first end end class Hash < ::Hash def initialize(values = {}) super() update values @deprecated = {} end def []=(key, value) check_deprecated(key, value) super end def deprecate_key(*keys) message = block_given? ? Proc.new : keys.pop Array(keys).each { |key| @deprecated[key] = message } end def merge(another) to_hash.update(another) end def to_hash ::Hash.new.update(self) end private def check_deprecated(key, value) if msg = @deprecated[key] and (!msg.respond_to?(:call) or (msg = msg.call(key, value))) WillPaginate::Deprecation.warn(msg) end end end end
module WillPaginate::Deprecation class << self def warn(message, stack = caller) offending_line = origin_of_call(stack) full_message = "DEPRECATION WARNING: #{message} (called from #{offending_line})" logger = rails_logger || Kernel logger.warn full_message end private def rails_logger defined?(Rails.logger) && Rails.logger end def origin_of_call(stack) lib_root = File.expand_path('../../..', __FILE__) stack.find { |line| line.index(lib_root) != 0 } || stack.first end end class Hash < ::Hash def initialize(values = {}) super() update values @deprecated = {} end def []=(key, value) check_deprecated(key, value) super end def deprecate_key(*keys, &block) message = block_given? ? block : keys.pop Array(keys).each { |key| @deprecated[key] = message } end def merge(another) to_hash.update(another) end def to_hash ::Hash.new.update(self) end private def check_deprecated(key, value) if msg = @deprecated[key] and (!msg.respond_to?(:call) or (msg = msg.call(key, value))) WillPaginate::Deprecation.warn(msg) end end end end
Fix warnings on Ruby 2.7
Fix warnings on Ruby 2.7 Ruby 2.7 emits warnings when using `Proc.new` with no block. This commit just converts the code to use `&block` to avoid the warning.
Ruby
mit
mislav/will_paginate,mislav/will_paginate
ruby
## Code Before: module WillPaginate::Deprecation class << self def warn(message, stack = caller) offending_line = origin_of_call(stack) full_message = "DEPRECATION WARNING: #{message} (called from #{offending_line})" logger = rails_logger || Kernel logger.warn full_message end private def rails_logger defined?(Rails.logger) && Rails.logger end def origin_of_call(stack) lib_root = File.expand_path('../../..', __FILE__) stack.find { |line| line.index(lib_root) != 0 } || stack.first end end class Hash < ::Hash def initialize(values = {}) super() update values @deprecated = {} end def []=(key, value) check_deprecated(key, value) super end def deprecate_key(*keys) message = block_given? ? Proc.new : keys.pop Array(keys).each { |key| @deprecated[key] = message } end def merge(another) to_hash.update(another) end def to_hash ::Hash.new.update(self) end private def check_deprecated(key, value) if msg = @deprecated[key] and (!msg.respond_to?(:call) or (msg = msg.call(key, value))) WillPaginate::Deprecation.warn(msg) end end end end ## Instruction: Fix warnings on Ruby 2.7 Ruby 2.7 emits warnings when using `Proc.new` with no block. This commit just converts the code to use `&block` to avoid the warning. ## Code After: module WillPaginate::Deprecation class << self def warn(message, stack = caller) offending_line = origin_of_call(stack) full_message = "DEPRECATION WARNING: #{message} (called from #{offending_line})" logger = rails_logger || Kernel logger.warn full_message end private def rails_logger defined?(Rails.logger) && Rails.logger end def origin_of_call(stack) lib_root = File.expand_path('../../..', __FILE__) stack.find { |line| line.index(lib_root) != 0 } || stack.first end end class Hash < ::Hash def initialize(values = {}) super() update values @deprecated = {} end def []=(key, value) check_deprecated(key, value) super end def deprecate_key(*keys, &block) message = block_given? ? block : keys.pop Array(keys).each { |key| @deprecated[key] = message } end def merge(another) to_hash.update(another) end def to_hash ::Hash.new.update(self) end private def check_deprecated(key, value) if msg = @deprecated[key] and (!msg.respond_to?(:call) or (msg = msg.call(key, value))) WillPaginate::Deprecation.warn(msg) end end end end
module WillPaginate::Deprecation class << self def warn(message, stack = caller) offending_line = origin_of_call(stack) full_message = "DEPRECATION WARNING: #{message} (called from #{offending_line})" logger = rails_logger || Kernel logger.warn full_message end private def rails_logger defined?(Rails.logger) && Rails.logger end def origin_of_call(stack) lib_root = File.expand_path('../../..', __FILE__) stack.find { |line| line.index(lib_root) != 0 } || stack.first end end class Hash < ::Hash def initialize(values = {}) super() update values @deprecated = {} end def []=(key, value) check_deprecated(key, value) super end - def deprecate_key(*keys) + def deprecate_key(*keys, &block) ? ++++++++ - message = block_given? ? Proc.new : keys.pop ? ^^ ^^^^ + message = block_given? ? block : keys.pop ? ^^ ^ Array(keys).each { |key| @deprecated[key] = message } end def merge(another) to_hash.update(another) end def to_hash ::Hash.new.update(self) end private def check_deprecated(key, value) if msg = @deprecated[key] and (!msg.respond_to?(:call) or (msg = msg.call(key, value))) WillPaginate::Deprecation.warn(msg) end end end end
4
0.072727
2
2
9dc85fee93564a47264b15642b83ca9e03a5ec11
deploy/README.md
deploy/README.md
$ git clone https://github.com/cicakhq/potato.git $ cd potato $ cp potato.cfg.template potato.cfg Edit and setup `potato.cfg` with your private keys. With [Vagrant](http://vagrantup.com) correctly installed, the process should be as simple as running: $ pip install ansible $ vagrant box add ddacunha/CentOS-7.2 # boxes exists for VMWare and Virtualbox $ cd deploy $ vagrant up This will create and provision the Virtual Machine defined in `Vagrantfile`. The list of recipes to execute is defined in `./deploy/development.yml`. To re-provision an existing vagrant instance, execute: $ vagrant provision The `/potato/` folder will be mounted with the root of the git repository. There is a script to forward the various ports from the vagrant instance to the localhost interface of Mac OS X, there is a script: $ ./bin/vagrant-forward.sh _(more to come)_
**Deployment using Ansible has not been updated to match changes in the build of Potato (such as the removal of Gulp)** **It will probably not work, we recommend instead using the Docker containers packaged deployment** # Setup Vagrant VM for front end Development $ git clone https://github.com/cicakhq/potato.git $ cd potato $ cp potato.cfg.template potato.cfg Edit and setup `potato.cfg` with your private keys. With [Vagrant](http://vagrantup.com) correctly installed, the process should be as simple as running: $ pip install ansible $ vagrant box add ddacunha/CentOS-7.2 # boxes exists for VMWare and Virtualbox $ cd deploy $ vagrant up This will create and provision the Virtual Machine defined in `Vagrantfile`. The list of recipes to execute is defined in `./deploy/development.yml`. To re-provision an existing vagrant instance, execute: $ vagrant provision The `/potato/` folder will be mounted with the root of the git repository. There is a script to forward the various ports from the vagrant instance to the localhost interface of Mac OS X, there is a script: $ ./bin/vagrant-forward.sh _(more to come)_
Add warning: deploy is broken
Add warning: deploy is broken
Markdown
apache-2.0
cicakhq/potato,cicakhq/potato,cicakhq/potato,cicakhq/potato,cicakhq/potato
markdown
## Code Before: $ git clone https://github.com/cicakhq/potato.git $ cd potato $ cp potato.cfg.template potato.cfg Edit and setup `potato.cfg` with your private keys. With [Vagrant](http://vagrantup.com) correctly installed, the process should be as simple as running: $ pip install ansible $ vagrant box add ddacunha/CentOS-7.2 # boxes exists for VMWare and Virtualbox $ cd deploy $ vagrant up This will create and provision the Virtual Machine defined in `Vagrantfile`. The list of recipes to execute is defined in `./deploy/development.yml`. To re-provision an existing vagrant instance, execute: $ vagrant provision The `/potato/` folder will be mounted with the root of the git repository. There is a script to forward the various ports from the vagrant instance to the localhost interface of Mac OS X, there is a script: $ ./bin/vagrant-forward.sh _(more to come)_ ## Instruction: Add warning: deploy is broken ## Code After: **Deployment using Ansible has not been updated to match changes in the build of Potato (such as the removal of Gulp)** **It will probably not work, we recommend instead using the Docker containers packaged deployment** # Setup Vagrant VM for front end Development $ git clone https://github.com/cicakhq/potato.git $ cd potato $ cp potato.cfg.template potato.cfg Edit and setup `potato.cfg` with your private keys. With [Vagrant](http://vagrantup.com) correctly installed, the process should be as simple as running: $ pip install ansible $ vagrant box add ddacunha/CentOS-7.2 # boxes exists for VMWare and Virtualbox $ cd deploy $ vagrant up This will create and provision the Virtual Machine defined in `Vagrantfile`. The list of recipes to execute is defined in `./deploy/development.yml`. To re-provision an existing vagrant instance, execute: $ vagrant provision The `/potato/` folder will be mounted with the root of the git repository. There is a script to forward the various ports from the vagrant instance to the localhost interface of Mac OS X, there is a script: $ ./bin/vagrant-forward.sh _(more to come)_
+ **Deployment using Ansible has not been updated to match changes in the + build of Potato (such as the removal of Gulp)** + + **It will probably not work, we recommend instead using the Docker containers + packaged deployment** + + # Setup Vagrant VM for front end Development $ git clone https://github.com/cicakhq/potato.git $ cd potato $ cp potato.cfg.template potato.cfg Edit and setup `potato.cfg` with your private keys. With [Vagrant](http://vagrantup.com) correctly installed, the process should be as simple as running: $ pip install ansible $ vagrant box add ddacunha/CentOS-7.2 # boxes exists for VMWare and Virtualbox $ cd deploy $ vagrant up This will create and provision the Virtual Machine defined in `Vagrantfile`. The list of recipes to execute is defined in `./deploy/development.yml`. To re-provision an existing vagrant instance, execute: $ vagrant provision The `/potato/` folder will be mounted with the root of the git repository. There is a script to forward the various ports from the vagrant instance to the localhost interface of Mac OS X, there is a script: $ ./bin/vagrant-forward.sh _(more to come)_
7
0.233333
7
0
6d0977a38f2ae23d6c9839d3a597991bafab77b6
_config.yml
_config.yml
markdown: redcarpet pygments: true # Permalinks permalink: pretty # Setup title: Yan Qi tagline: ' Brave New World ' description: 'A personal website' url: http://yan-qi.github.io baseurl: '/' paginate: 5 # Custom vars version: 1.0.0 pages_list: About: '/about' Feed: '/atom.xml'
markdown: redcarpet pygments: true # Permalinks permalink: pretty # Setup title: Yan Qi tagline: ' Brave New World ' description: 'Brave New World' url: http://yan-qi.github.io baseurl: '/' paginate: 5 # Custom vars version: 1.0.0 pages_list: About: '/about' Feed: '/atom.xml'
Change the title of sidebar
Change the title of sidebar
YAML
mit
yan-qi/yan-qi.github.io
yaml
## Code Before: markdown: redcarpet pygments: true # Permalinks permalink: pretty # Setup title: Yan Qi tagline: ' Brave New World ' description: 'A personal website' url: http://yan-qi.github.io baseurl: '/' paginate: 5 # Custom vars version: 1.0.0 pages_list: About: '/about' Feed: '/atom.xml' ## Instruction: Change the title of sidebar ## Code After: markdown: redcarpet pygments: true # Permalinks permalink: pretty # Setup title: Yan Qi tagline: ' Brave New World ' description: 'Brave New World' url: http://yan-qi.github.io baseurl: '/' paginate: 5 # Custom vars version: 1.0.0 pages_list: About: '/about' Feed: '/atom.xml'
markdown: redcarpet pygments: true # Permalinks permalink: pretty # Setup title: Yan Qi tagline: ' Brave New World ' - description: 'A personal website' + description: 'Brave New World' url: http://yan-qi.github.io baseurl: '/' paginate: 5 # Custom vars version: 1.0.0 pages_list: About: '/about' Feed: '/atom.xml'
2
0.1
1
1
7963d8727228f0151f8bc4b8bc22d6d767fd48ea
.travis.yml
.travis.yml
language: python python: - "3.6" cache: pip install: - pip install --upgrade pip setuptools - pip install . script: - python setup.py test
language: python python: - "3.6" cache: pip install: - pip install --upgrade pip setuptools - pip install coveralls - pip install . script: - python setup.py test after_success: - coveralls
Add coveralls coverage report from Travis CI Add coveralls installation so it works
Add coveralls coverage report from Travis CI Add coveralls installation so it works
YAML
mit
NedYork/viper
yaml
## Code Before: language: python python: - "3.6" cache: pip install: - pip install --upgrade pip setuptools - pip install . script: - python setup.py test ## Instruction: Add coveralls coverage report from Travis CI Add coveralls installation so it works ## Code After: language: python python: - "3.6" cache: pip install: - pip install --upgrade pip setuptools - pip install coveralls - pip install . script: - python setup.py test after_success: - coveralls
language: python python: - "3.6" cache: pip install: - pip install --upgrade pip setuptools + - pip install coveralls - pip install . script: - python setup.py test + + after_success: + - coveralls
4
0.307692
4
0
be243f9c1bdce84922a33ccd113bc6c1f6ab9ad4
.forestry/front_matter/templates/variados.yml
.forestry/front_matter/templates/variados.yml
--- label: Variados hide_body: false fields: - name: layout label: Layout type: text hidden: false default: post - name: title label: Title type: text hidden: false default: title - name: date label: Date type: datetime hidden: false default: 2019-03-15 00:00:00 -0300 - name: img label: Img type: file hidden: false default: "/variados.png" - name: comments label: Comments type: boolean hidden: false default: true - name: tags label: Tags type: tag_list hidden: false default: ''
--- label: Variados hide_body: false fields: - name: layout label: Layout type: text hidden: false default: post - name: title label: Title type: text hidden: false default: title - name: date label: Date type: datetime hidden: false default: 2019-03-15 00:00:00 -0300 - name: img label: Img type: file hidden: false default: "/variados.png" - name: comments label: Comments type: boolean hidden: false default: true - name: tags label: Tags type: tag_list hidden: false default: '' pages: - _posts/diferenciando-json-loads-de-json-load-e-uma-pitade-de-bigquery.md
Update from Forestry.io Jessica Temporal updated _drafts/diferenciando-json-loads-de-json-load-e-uma-pitade-de-bigquery.md
Update from Forestry.io Jessica Temporal updated _drafts/diferenciando-json-loads-de-json-load-e-uma-pitade-de-bigquery.md
YAML
mit
jtemporal/jtemporal.github.io,jtemporal/jtemporal.github.io
yaml
## Code Before: --- label: Variados hide_body: false fields: - name: layout label: Layout type: text hidden: false default: post - name: title label: Title type: text hidden: false default: title - name: date label: Date type: datetime hidden: false default: 2019-03-15 00:00:00 -0300 - name: img label: Img type: file hidden: false default: "/variados.png" - name: comments label: Comments type: boolean hidden: false default: true - name: tags label: Tags type: tag_list hidden: false default: '' ## Instruction: Update from Forestry.io Jessica Temporal updated _drafts/diferenciando-json-loads-de-json-load-e-uma-pitade-de-bigquery.md ## Code After: --- label: Variados hide_body: false fields: - name: layout label: Layout type: text hidden: false default: post - name: title label: Title type: text hidden: false default: title - name: date label: Date type: datetime hidden: false default: 2019-03-15 00:00:00 -0300 - name: img label: Img type: file hidden: false default: "/variados.png" - name: comments label: Comments type: boolean hidden: false default: true - name: tags label: Tags type: tag_list hidden: false default: '' pages: - _posts/diferenciando-json-loads-de-json-load-e-uma-pitade-de-bigquery.md
--- label: Variados hide_body: false fields: - name: layout label: Layout type: text hidden: false default: post - name: title label: Title type: text hidden: false default: title - name: date label: Date type: datetime hidden: false default: 2019-03-15 00:00:00 -0300 - name: img label: Img type: file hidden: false default: "/variados.png" - name: comments label: Comments type: boolean hidden: false default: true - name: tags label: Tags type: tag_list hidden: false default: '' + pages: + - _posts/diferenciando-json-loads-de-json-load-e-uma-pitade-de-bigquery.md
2
0.058824
2
0
f0237f1bf73fbbd5a284a80582ccef7b4ec31b3d
ExternalClientUi/src/main/java/Controller.java
ExternalClientUi/src/main/java/Controller.java
import converters.JsonConverter; import datamodel.Request; import httpserver.RequestSender; import httpserver.WebServer; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; public class Controller { public TextField response; private WebServer ws = new WebServer(); public TextField command; @FXML public TextArea results; public void runCommand(ActionEvent actionEvent) { results.setText(""); response.setText(""); ws.setResults(results); Thread th = new Thread() { @Override public void run() { String commandString = command.getText(); Request request = new Request(); request.setClientId("13"); request.setCommand(commandString); request.setResponseAddress("http://localhost:8008/jobFinished"); request.setProcessors(new String[] {"processors.XmlToJsonConverter","processors.TlsFilter"}); request.setAdapter("adapters.EventHubAdapter"); String requestJsonString = JsonConverter.objectToJsonString(request); String requestResponse = RequestSender.sendRequest("http://localhost:8000/job", request); Platform.runLater(new Runnable() { @Override public void run() { response.setText(requestResponse); } }); } }; th.start(); } }
import converters.JsonConverter; import datamodel.Request; import httpserver.RequestSender; import httpserver.WebServer; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; public class Controller { public TextField response; private WebServer ws = new WebServer(); public TextField command; @FXML public TextArea results; @FXML public void initialize(){ ws.setResults(results); } public void runCommand(ActionEvent actionEvent) { results.setText(""); response.setText(""); Thread th = new Thread() { @Override public void run() { String commandString = command.getText(); Request request = new Request(); request.setClientId("13"); request.setCommand(commandString); request.setResponseAddress("http://localhost:8008/jobFinished"); request.setProcessors(new String[] {"processors.XmlToJsonConverter","processors.TlsFilter"}); request.setAdapter("adapters.EventHubAdapter"); String requestJsonString = JsonConverter.objectToJsonString(request); String requestResponse = RequestSender.sendRequest("http://localhost:8000/job", request); Platform.runLater(new Runnable() { @Override public void run() { response.setText(requestResponse); } }); } }; th.start(); } }
Initialize set results before button action. The UI client can be used for receiving messages only.
Initialize set results before button action. The UI client can be used for receiving messages only.
Java
apache-2.0
IrimieBogdan/DistributedMonitoring,IrimieBogdan/DistributedMonitoring,IrimieBogdan/DistributedMonitoring
java
## Code Before: import converters.JsonConverter; import datamodel.Request; import httpserver.RequestSender; import httpserver.WebServer; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; public class Controller { public TextField response; private WebServer ws = new WebServer(); public TextField command; @FXML public TextArea results; public void runCommand(ActionEvent actionEvent) { results.setText(""); response.setText(""); ws.setResults(results); Thread th = new Thread() { @Override public void run() { String commandString = command.getText(); Request request = new Request(); request.setClientId("13"); request.setCommand(commandString); request.setResponseAddress("http://localhost:8008/jobFinished"); request.setProcessors(new String[] {"processors.XmlToJsonConverter","processors.TlsFilter"}); request.setAdapter("adapters.EventHubAdapter"); String requestJsonString = JsonConverter.objectToJsonString(request); String requestResponse = RequestSender.sendRequest("http://localhost:8000/job", request); Platform.runLater(new Runnable() { @Override public void run() { response.setText(requestResponse); } }); } }; th.start(); } } ## Instruction: Initialize set results before button action. The UI client can be used for receiving messages only. ## Code After: import converters.JsonConverter; import datamodel.Request; import httpserver.RequestSender; import httpserver.WebServer; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; public class Controller { public TextField response; private WebServer ws = new WebServer(); public TextField command; @FXML public TextArea results; @FXML public void initialize(){ ws.setResults(results); } public void runCommand(ActionEvent actionEvent) { results.setText(""); response.setText(""); Thread th = new Thread() { @Override public void run() { String commandString = command.getText(); Request request = new Request(); request.setClientId("13"); request.setCommand(commandString); request.setResponseAddress("http://localhost:8008/jobFinished"); request.setProcessors(new String[] {"processors.XmlToJsonConverter","processors.TlsFilter"}); request.setAdapter("adapters.EventHubAdapter"); String requestJsonString = JsonConverter.objectToJsonString(request); String requestResponse = RequestSender.sendRequest("http://localhost:8000/job", request); Platform.runLater(new Runnable() { @Override public void run() { response.setText(requestResponse); } }); } }; th.start(); } }
import converters.JsonConverter; import datamodel.Request; import httpserver.RequestSender; import httpserver.WebServer; import javafx.application.Platform; import javafx.event.ActionEvent; import javafx.fxml.FXML; import javafx.scene.control.TextArea; import javafx.scene.control.TextField; public class Controller { public TextField response; private WebServer ws = new WebServer(); public TextField command; @FXML public TextArea results; + @FXML + public void initialize(){ + ws.setResults(results); + } + + public void runCommand(ActionEvent actionEvent) { results.setText(""); response.setText(""); - ws.setResults(results); Thread th = new Thread() { @Override public void run() { String commandString = command.getText(); Request request = new Request(); request.setClientId("13"); request.setCommand(commandString); request.setResponseAddress("http://localhost:8008/jobFinished"); request.setProcessors(new String[] {"processors.XmlToJsonConverter","processors.TlsFilter"}); request.setAdapter("adapters.EventHubAdapter"); String requestJsonString = JsonConverter.objectToJsonString(request); String requestResponse = RequestSender.sendRequest("http://localhost:8000/job", request); Platform.runLater(new Runnable() { @Override public void run() { response.setText(requestResponse); } }); } }; th.start(); } }
7
0.145833
6
1
f06e3b79b85c59c16ed1d5f958909434c73b5c6b
app/controllers/registrations_controller.rb
app/controllers/registrations_controller.rb
class RegistrationsController < Devise::RegistrationsController def create @user = User.new(params[:user]) if @user.save NewUserMailer.new_user_email(@user).deliver if @user.active_for_authentication? sign_in("user", @user) respond_with @user, :location => after_sign_up_path_for(@user) else expire_session_data_after_sign_in! respond_with @user, :location => after_inactive_sign_up_path_for(@user) end else clean_up_passwords @user $user=@user redirect_to new_user_registration_path(:registration => false) #redirect_to :back end end def new @alert = params[:registration] super end def update super end end
class RegistrationsController < Devise::RegistrationsController def create @user = User.new(params[:user]) client=Client.new() client.user=@user address=Address.new() address.user= @user client.address = address @user.client = client if @user.save NewUserMailer.new_user_email(@user).deliver if @user.active_for_authentication? sign_in("user", @user) respond_with @user, :location => after_sign_up_path_for(@user) else expire_session_data_after_sign_in! respond_with @user, :location => after_inactive_sign_up_path_for(@user) end else clean_up_passwords @user $user=@user redirect_to new_user_registration_path(:registration => false) #redirect_to :back end end def new @alert = params[:registration] super end def update super end end
Create client in front registration?
Create client in front registration?
Ruby
apache-2.0
kevstessens/dealhunter,kevstessens/dealhunter
ruby
## Code Before: class RegistrationsController < Devise::RegistrationsController def create @user = User.new(params[:user]) if @user.save NewUserMailer.new_user_email(@user).deliver if @user.active_for_authentication? sign_in("user", @user) respond_with @user, :location => after_sign_up_path_for(@user) else expire_session_data_after_sign_in! respond_with @user, :location => after_inactive_sign_up_path_for(@user) end else clean_up_passwords @user $user=@user redirect_to new_user_registration_path(:registration => false) #redirect_to :back end end def new @alert = params[:registration] super end def update super end end ## Instruction: Create client in front registration? ## Code After: class RegistrationsController < Devise::RegistrationsController def create @user = User.new(params[:user]) client=Client.new() client.user=@user address=Address.new() address.user= @user client.address = address @user.client = client if @user.save NewUserMailer.new_user_email(@user).deliver if @user.active_for_authentication? sign_in("user", @user) respond_with @user, :location => after_sign_up_path_for(@user) else expire_session_data_after_sign_in! respond_with @user, :location => after_inactive_sign_up_path_for(@user) end else clean_up_passwords @user $user=@user redirect_to new_user_registration_path(:registration => false) #redirect_to :back end end def new @alert = params[:registration] super end def update super end end
class RegistrationsController < Devise::RegistrationsController def create @user = User.new(params[:user]) + + client=Client.new() + client.user=@user + address=Address.new() + address.user= @user + client.address = address + @user.client = client + if @user.save NewUserMailer.new_user_email(@user).deliver if @user.active_for_authentication? sign_in("user", @user) respond_with @user, :location => after_sign_up_path_for(@user) else expire_session_data_after_sign_in! respond_with @user, :location => after_inactive_sign_up_path_for(@user) end else clean_up_passwords @user $user=@user redirect_to new_user_registration_path(:registration => false) #redirect_to :back end end def new @alert = params[:registration] super end def update super end end
8
0.25
8
0
161f6cd73096c11a6701659e617d0c5d32f1048c
docs/configuring_django.rst
docs/configuring_django.rst
Configuring Django settings =========================== There are a couple of different ways Django settings can be provided for the tests. The environment variable ``DJANGO_SETTINGS_MODULE`` --------------------------------------------------- Running the tests with DJANGO_SETTINGS_MODULE defined will find the Django settings the same way Django does by default. Example:: $ export DJANGO_SETTINGS_MODULE=test_settings $ py.test or:: $ DJANGO_SETTINGS_MODULE=test_settings py.test Command line option ``--ds=SETTINGS`` ------------------------------------- Example:: $ py.test --ds=test_settings pytest.ini settings ------------------- Example contents of pytest.ini:: [pytest] DJANGO_SETTINGS_MODULE = test_settings Using ``django.conf.settings.configure()`` ------------------------------------------ Django settings can be set up by calling ``django.conf.settings.configure()``. This can be done from your project's ``conftest.py`` file:: from django.conf import settings def pytest_configure(): settings.configure(DATABASES=...)
Configuring Django settings =========================== There are a couple of different ways Django settings can be provided for the tests. The environment variable ``DJANGO_SETTINGS_MODULE`` --------------------------------------------------- Running the tests with DJANGO_SETTINGS_MODULE defined will find the Django settings the same way Django does by default. Example:: $ export DJANGO_SETTINGS_MODULE=test_settings $ py.test or:: $ DJANGO_SETTINGS_MODULE=test_settings py.test Command line option ``--ds=SETTINGS`` ------------------------------------- Example:: $ py.test --ds=test_settings pytest.ini settings ------------------- Example contents of pytest.ini:: [pytest] DJANGO_SETTINGS_MODULE = test_settings Using django-configurations --------------------------- There is support for using `django-configurations <https://pypi.python.org/pypi/django-configurations/>`_. To do so configure the settings class using an environment variable, the --dc flag, or pytest.ini DJANGO_CONFIGURATION. Environment Variable:: $ export DJANGO_CONFIGURATION=MySettings $ py.test Command Line Option:: $ py.test --dc=MySettings INI File Contents:: [pytest] DJANGO_CONFIGURATION=MySettings Using ``django.conf.settings.configure()`` ------------------------------------------ Django settings can be set up by calling ``django.conf.settings.configure()``. This can be done from your project's ``conftest.py`` file:: from django.conf import settings def pytest_configure(): settings.configure(DATABASES=...)
Document that pytest-django can use django-configurations
Document that pytest-django can use django-configurations
reStructuredText
bsd-3-clause
pelme/pytest-django,davidszotten/pytest-django,aptivate/pytest-django,bforchhammer/pytest-django,felixonmars/pytest-django,pombredanne/pytest_django,thedrow/pytest-django,RonnyPfannschmidt/pytest_django,reincubate/pytest-django,ojake/pytest-django,tomviner/pytest-django,hoh/pytest-django,ktosiek/pytest-django
restructuredtext
## Code Before: Configuring Django settings =========================== There are a couple of different ways Django settings can be provided for the tests. The environment variable ``DJANGO_SETTINGS_MODULE`` --------------------------------------------------- Running the tests with DJANGO_SETTINGS_MODULE defined will find the Django settings the same way Django does by default. Example:: $ export DJANGO_SETTINGS_MODULE=test_settings $ py.test or:: $ DJANGO_SETTINGS_MODULE=test_settings py.test Command line option ``--ds=SETTINGS`` ------------------------------------- Example:: $ py.test --ds=test_settings pytest.ini settings ------------------- Example contents of pytest.ini:: [pytest] DJANGO_SETTINGS_MODULE = test_settings Using ``django.conf.settings.configure()`` ------------------------------------------ Django settings can be set up by calling ``django.conf.settings.configure()``. This can be done from your project's ``conftest.py`` file:: from django.conf import settings def pytest_configure(): settings.configure(DATABASES=...) ## Instruction: Document that pytest-django can use django-configurations ## Code After: Configuring Django settings =========================== There are a couple of different ways Django settings can be provided for the tests. The environment variable ``DJANGO_SETTINGS_MODULE`` --------------------------------------------------- Running the tests with DJANGO_SETTINGS_MODULE defined will find the Django settings the same way Django does by default. Example:: $ export DJANGO_SETTINGS_MODULE=test_settings $ py.test or:: $ DJANGO_SETTINGS_MODULE=test_settings py.test Command line option ``--ds=SETTINGS`` ------------------------------------- Example:: $ py.test --ds=test_settings pytest.ini settings ------------------- Example contents of pytest.ini:: [pytest] DJANGO_SETTINGS_MODULE = test_settings Using django-configurations --------------------------- There is support for using `django-configurations <https://pypi.python.org/pypi/django-configurations/>`_. To do so configure the settings class using an environment variable, the --dc flag, or pytest.ini DJANGO_CONFIGURATION. Environment Variable:: $ export DJANGO_CONFIGURATION=MySettings $ py.test Command Line Option:: $ py.test --dc=MySettings INI File Contents:: [pytest] DJANGO_CONFIGURATION=MySettings Using ``django.conf.settings.configure()`` ------------------------------------------ Django settings can be set up by calling ``django.conf.settings.configure()``. This can be done from your project's ``conftest.py`` file:: from django.conf import settings def pytest_configure(): settings.configure(DATABASES=...)
Configuring Django settings =========================== There are a couple of different ways Django settings can be provided for the tests. The environment variable ``DJANGO_SETTINGS_MODULE`` --------------------------------------------------- Running the tests with DJANGO_SETTINGS_MODULE defined will find the Django settings the same way Django does by default. Example:: $ export DJANGO_SETTINGS_MODULE=test_settings $ py.test or:: $ DJANGO_SETTINGS_MODULE=test_settings py.test Command line option ``--ds=SETTINGS`` ------------------------------------- Example:: $ py.test --ds=test_settings pytest.ini settings ------------------- Example contents of pytest.ini:: [pytest] DJANGO_SETTINGS_MODULE = test_settings + + Using django-configurations + --------------------------- + + There is support for using `django-configurations <https://pypi.python.org/pypi/django-configurations/>`_. + + To do so configure the settings class using an environment variable, the --dc + flag, or pytest.ini DJANGO_CONFIGURATION. + + Environment Variable:: + + $ export DJANGO_CONFIGURATION=MySettings + $ py.test + + Command Line Option:: + + $ py.test --dc=MySettings + + + INI File Contents:: + + [pytest] + DJANGO_CONFIGURATION=MySettings + Using ``django.conf.settings.configure()`` ------------------------------------------ Django settings can be set up by calling ``django.conf.settings.configure()``. This can be done from your project's ``conftest.py`` file:: from django.conf import settings def pytest_configure(): settings.configure(DATABASES=...)
24
0.48
24
0
bb9aec2f770f27577d8572e5c018b6e9660da181
week-04.md
week-04.md
--- topic: "SVG icons" desc: "Look at how to use SVG symbols to create SVG sprite sheets for better performance and reusable systems." clr: "1, 2, 3, 4" video_tutorials: - title: "Advanced SVG" url: advanced-svg videos: true notes: "Only watch from “Icons” to “Icon sprite sheets”" - title: "SVG cheat sheet" url: svg-cheat-sheet highlight: true slides: - title: "SVG icons" url: svg-icons tasks: - type: blank - title: "Using SVG icons" url: using-svg-icons type: lesson - title: "SVG icons sets" url: "https://github.com/acgd-webdev-4/svg-icon-sets" disabled: true - title: "Dog rescue redesign UX" url: "https://github.com/acgd-webdev-4/dog-rescue-redesign-ux" graded-as: dog-rescue-redesign-ux submit: online due: "Before class week 5" ---
--- topic: "SVG icons" desc: "Look at how to use SVG symbols to create SVG sprite sheets for better performance and reusable systems." clr: "1, 2, 3, 4" video_tutorials: - title: "Advanced SVG" url: advanced-svg videos: true notes: "Only watch from “Icons” to “Icon sprite sheets”" - title: "SVG cheat sheet" url: svg-cheat-sheet highlight: true slides: - title: "SVG icons" url: svg-icons tasks: - type: blank - title: "Using SVG icons" url: using-svg-icons type: lesson - title: "SVG icons sets" url: "https://github.com/acgd-webdev-4/svg-icon-sets" - title: "Dog rescue redesign UX" url: "https://github.com/acgd-webdev-4/dog-rescue-redesign-ux" graded-as: dog-rescue-redesign-ux submit: online due: "Before class week 5" ---
Add the SVG icon sets link
Add the SVG icon sets link
Markdown
unlicense
acgd-webdev-3/syllabus
markdown
## Code Before: --- topic: "SVG icons" desc: "Look at how to use SVG symbols to create SVG sprite sheets for better performance and reusable systems." clr: "1, 2, 3, 4" video_tutorials: - title: "Advanced SVG" url: advanced-svg videos: true notes: "Only watch from “Icons” to “Icon sprite sheets”" - title: "SVG cheat sheet" url: svg-cheat-sheet highlight: true slides: - title: "SVG icons" url: svg-icons tasks: - type: blank - title: "Using SVG icons" url: using-svg-icons type: lesson - title: "SVG icons sets" url: "https://github.com/acgd-webdev-4/svg-icon-sets" disabled: true - title: "Dog rescue redesign UX" url: "https://github.com/acgd-webdev-4/dog-rescue-redesign-ux" graded-as: dog-rescue-redesign-ux submit: online due: "Before class week 5" --- ## Instruction: Add the SVG icon sets link ## Code After: --- topic: "SVG icons" desc: "Look at how to use SVG symbols to create SVG sprite sheets for better performance and reusable systems." clr: "1, 2, 3, 4" video_tutorials: - title: "Advanced SVG" url: advanced-svg videos: true notes: "Only watch from “Icons” to “Icon sprite sheets”" - title: "SVG cheat sheet" url: svg-cheat-sheet highlight: true slides: - title: "SVG icons" url: svg-icons tasks: - type: blank - title: "Using SVG icons" url: using-svg-icons type: lesson - title: "SVG icons sets" url: "https://github.com/acgd-webdev-4/svg-icon-sets" - title: "Dog rescue redesign UX" url: "https://github.com/acgd-webdev-4/dog-rescue-redesign-ux" graded-as: dog-rescue-redesign-ux submit: online due: "Before class week 5" ---
--- topic: "SVG icons" desc: "Look at how to use SVG symbols to create SVG sprite sheets for better performance and reusable systems." clr: "1, 2, 3, 4" video_tutorials: - title: "Advanced SVG" url: advanced-svg videos: true notes: "Only watch from “Icons” to “Icon sprite sheets”" - title: "SVG cheat sheet" url: svg-cheat-sheet highlight: true slides: - title: "SVG icons" url: svg-icons tasks: - type: blank - title: "Using SVG icons" url: using-svg-icons type: lesson - title: "SVG icons sets" url: "https://github.com/acgd-webdev-4/svg-icon-sets" - disabled: true - title: "Dog rescue redesign UX" url: "https://github.com/acgd-webdev-4/dog-rescue-redesign-ux" graded-as: dog-rescue-redesign-ux submit: online due: "Before class week 5" ---
1
0.03125
0
1
7a9d76686ce05f3615c43438630a232db1a15eed
tests/unit/test.config.php
tests/unit/test.config.php
<?php $env = getenv('APPLICATION_ENV') ? : "local"; return array( 'modules' => array( 'DoctrineModule', 'DoctrineORMModule', 'ProophEventStoreModule', 'Application', 'Accounting', 'TaskManagement', 'ZendOAuth2', 'User', 'Kanbanize' ), 'module_listener_options' => array( 'module_paths' => array( __DIR__.'/../../src/module', __DIR__.'/../../src/vendor', ), 'config_glob_paths' => array( __DIR__.'/../../src/config/autoload/{,*.}{'.$env.',global}.php', ), ) );
<?php $env = getenv('APPLICATION_ENV') ? : "local"; return array( 'modules' => array( 'DoctrineModule', 'DoctrineORMModule', 'ProophEventStoreModule', 'Application', 'Accounting', 'TaskManagement', 'ZendOAuth2', 'User', ), 'module_listener_options' => array( 'module_paths' => array( __DIR__.'/../../src/module', __DIR__.'/../../src/vendor', ), 'config_glob_paths' => array( __DIR__.'/../../src/config/autoload/{,*.}{'.$env.',global}.php', ), ) );
Fix unit test Kanbanize module loading
Fix unit test Kanbanize module loading
PHP
bsd-3-clause
cocoonprojects/ora,cocoonprojects/ora
php
## Code Before: <?php $env = getenv('APPLICATION_ENV') ? : "local"; return array( 'modules' => array( 'DoctrineModule', 'DoctrineORMModule', 'ProophEventStoreModule', 'Application', 'Accounting', 'TaskManagement', 'ZendOAuth2', 'User', 'Kanbanize' ), 'module_listener_options' => array( 'module_paths' => array( __DIR__.'/../../src/module', __DIR__.'/../../src/vendor', ), 'config_glob_paths' => array( __DIR__.'/../../src/config/autoload/{,*.}{'.$env.',global}.php', ), ) ); ## Instruction: Fix unit test Kanbanize module loading ## Code After: <?php $env = getenv('APPLICATION_ENV') ? : "local"; return array( 'modules' => array( 'DoctrineModule', 'DoctrineORMModule', 'ProophEventStoreModule', 'Application', 'Accounting', 'TaskManagement', 'ZendOAuth2', 'User', ), 'module_listener_options' => array( 'module_paths' => array( __DIR__.'/../../src/module', __DIR__.'/../../src/vendor', ), 'config_glob_paths' => array( __DIR__.'/../../src/config/autoload/{,*.}{'.$env.',global}.php', ), ) );
<?php $env = getenv('APPLICATION_ENV') ? : "local"; return array( 'modules' => array( 'DoctrineModule', 'DoctrineORMModule', 'ProophEventStoreModule', 'Application', 'Accounting', 'TaskManagement', 'ZendOAuth2', 'User', - 'Kanbanize' ), 'module_listener_options' => array( 'module_paths' => array( __DIR__.'/../../src/module', __DIR__.'/../../src/vendor', ), 'config_glob_paths' => array( __DIR__.'/../../src/config/autoload/{,*.}{'.$env.',global}.php', ), ) );
1
0.038462
0
1
bcf1c1565b39c34a7faf00aecdf24f53352a9c9f
src/modules/kdenlive/filter_wave.yml
src/modules/kdenlive/filter_wave.yml
schema_version: 0.1 type: filter identifier: wave title: Wave version: 1 copyright: Leny Grisel, Jean-Baptiste Mardelle creator: Leny Grisel, Jean-Baptiste Mardelle license: LGPLv2.1 language: en tags: - Video
schema_version: 0.2 type: filter identifier: wave title: Wave version: 2 copyright: Leny Grisel, Jean-Baptiste Mardelle creator: Leny Grisel, Jean-Baptiste Mardelle license: LGPLv2.1 language: en tags: - Video parameters: - identifier: start title: Amplitude argument: yes type: float description: > If an end amplitude is provided, then this is the starting amplitude, and amplitude is interpolated over the duration of the filter from start to end amplitude. If the keyframable property "wave" is provided, then this is ignored, and "wave" is used instead. This parameter also affects the pulsation period and the phase length. mutable: yes default: 10 minimum: 1 - identifier: end title: End amplitude type: float mutable: yes minimum: 1 - identifier: wave title: Amplitude type: float description: If this value is set, values for properties "start" and "end" are ignored. mutable: yes minimum: 1 - identifier: speed title: Speed type: integer mutable: yes default: 5 - identifier: deformX title: Deform horizontally? type: boolean mutable: yes default: 1 - identifier: deformY title: Deform vertically? type: boolean mutable: yes default: 1
Improve service metadata/documentation for wave filter.
Improve service metadata/documentation for wave filter.
YAML
lgpl-2.1
siddharudh/mlt,wideioltd/mlt,xzhavilla/mlt,j-b-m/mlt,mltframework/mlt,siddharudh/mlt,j-b-m/mlt,j-b-m/mlt,siddharudh/mlt,xzhavilla/mlt,zzhhui/mlt,siddharudh/mlt,mltframework/mlt,j-b-m/mlt,anba8005/mlt,anba8005/mlt,zzhhui/mlt,mltframework/mlt,mltframework/mlt,siddharudh/mlt,wideioltd/mlt,anba8005/mlt,j-b-m/mlt,anba8005/mlt,anba8005/mlt,wideioltd/mlt,zzhhui/mlt,zzhhui/mlt,xzhavilla/mlt,wideioltd/mlt,anba8005/mlt,anba8005/mlt,xzhavilla/mlt,anba8005/mlt,anba8005/mlt,xzhavilla/mlt,wideioltd/mlt,mltframework/mlt,siddharudh/mlt,wideioltd/mlt,siddharudh/mlt,wideioltd/mlt,xzhavilla/mlt,mltframework/mlt,mltframework/mlt,zzhhui/mlt,wideioltd/mlt,j-b-m/mlt,siddharudh/mlt,zzhhui/mlt,wideioltd/mlt,mltframework/mlt,j-b-m/mlt,xzhavilla/mlt,mltframework/mlt,siddharudh/mlt,xzhavilla/mlt,xzhavilla/mlt,zzhhui/mlt,zzhhui/mlt,mltframework/mlt,zzhhui/mlt,j-b-m/mlt,j-b-m/mlt,j-b-m/mlt
yaml
## Code Before: schema_version: 0.1 type: filter identifier: wave title: Wave version: 1 copyright: Leny Grisel, Jean-Baptiste Mardelle creator: Leny Grisel, Jean-Baptiste Mardelle license: LGPLv2.1 language: en tags: - Video ## Instruction: Improve service metadata/documentation for wave filter. ## Code After: schema_version: 0.2 type: filter identifier: wave title: Wave version: 2 copyright: Leny Grisel, Jean-Baptiste Mardelle creator: Leny Grisel, Jean-Baptiste Mardelle license: LGPLv2.1 language: en tags: - Video parameters: - identifier: start title: Amplitude argument: yes type: float description: > If an end amplitude is provided, then this is the starting amplitude, and amplitude is interpolated over the duration of the filter from start to end amplitude. If the keyframable property "wave" is provided, then this is ignored, and "wave" is used instead. This parameter also affects the pulsation period and the phase length. mutable: yes default: 10 minimum: 1 - identifier: end title: End amplitude type: float mutable: yes minimum: 1 - identifier: wave title: Amplitude type: float description: If this value is set, values for properties "start" and "end" are ignored. mutable: yes minimum: 1 - identifier: speed title: Speed type: integer mutable: yes default: 5 - identifier: deformX title: Deform horizontally? type: boolean mutable: yes default: 1 - identifier: deformY title: Deform vertically? type: boolean mutable: yes default: 1
- schema_version: 0.1 ? ^ + schema_version: 0.2 ? ^ type: filter identifier: wave title: Wave - version: 1 ? ^ + version: 2 ? ^ copyright: Leny Grisel, Jean-Baptiste Mardelle creator: Leny Grisel, Jean-Baptiste Mardelle license: LGPLv2.1 language: en tags: - Video + parameters: + - identifier: start + title: Amplitude + argument: yes + type: float + description: > + If an end amplitude is provided, then this is the starting amplitude, and + amplitude is interpolated over the duration of the filter from start + to end amplitude. + If the keyframable property "wave" is provided, then this is ignored, and + "wave" is used instead. + This parameter also affects the pulsation period and the phase length. + mutable: yes + default: 10 + minimum: 1 + + - identifier: end + title: End amplitude + type: float + mutable: yes + minimum: 1 + + - identifier: wave + title: Amplitude + type: float + description: + If this value is set, values for properties "start" and "end" are ignored. + mutable: yes + minimum: 1 + + - identifier: speed + title: Speed + type: integer + mutable: yes + default: 5 + + - identifier: deformX + title: Deform horizontally? + type: boolean + mutable: yes + default: 1 + + - identifier: deformY + title: Deform vertically? + type: boolean + mutable: yes + default: 1
51
4.636364
49
2
5d034797ff00c8b012b0e52eda1f49dc9480f6f4
app/models/Entity/Session.php
app/models/Entity/Session.php
<?php namespace Entity; use \Doctrine\Common\Collections\ArrayCollection; /** * @Table(name="sessions", indexes={ * @index(name="cleanup_idx", columns={"expires"}) * }) * @Entity */ class Session extends \DF\Doctrine\Entity { public function __construct() { $this->last_modified = time(); $this->user_agent = $_SERVER['HTTP_USER_AGENT']; } /** * @Column(name="id", type="string", length=128) * @Id */ protected $id; /** @Column(name="user_agent", type="string", length=255) */ protected $user_agent; /** @Column(name="expires", type="integer") */ protected $expires; public function setLifetime($lifetime) { $this->expires = time()+$lifetime; } /** @Column(name="last_modified", type="integer") */ protected $last_modified; /** @Column(name="data", type="text", nullable=true) */ protected $data; /* * Validate session. * @return boolean */ public function isValid() { if ($this->expires < time()) return false; $current_ua = $_SERVER['HTTP_USER_AGENT']; if (strcmp($this->user_agent, $current_ua) !== 0) return false; return true; } }
<?php namespace Entity; use \Doctrine\Common\Collections\ArrayCollection; /** * @Table(name="sessions", indexes={ * @index(name="cleanup_idx", columns={"expires"}) * }) * @Entity */ class Session extends \DF\Doctrine\Entity { public function __construct() { $this->last_modified = time(); $this->user_agent = $_SERVER['HTTP_USER_AGENT']; if (empty($this->user_agent)) $this->user_agent = 'none'; } /** * @Column(name="id", type="string", length=128) * @Id */ protected $id; /** @Column(name="user_agent", type="string", length=255, nullable=true) */ protected $user_agent; /** @Column(name="expires", type="integer") */ protected $expires; public function setLifetime($lifetime) { $this->expires = time()+$lifetime; } /** @Column(name="last_modified", type="integer") */ protected $last_modified; /** @Column(name="data", type="text", nullable=true) */ protected $data; /* * Validate session. * @return boolean */ public function isValid() { if ($this->expires < time()) return false; $current_ua = $_SERVER['HTTP_USER_AGENT']; if (empty($current_ua)) $current_ua = 'none'; if (strcmp($this->user_agent, $current_ua) !== 0) return false; return true; } }
Allow for null user agents in sessions.
Allow for null user agents in sessions.
PHP
apache-2.0
SlvrEagle23/AzuraCast,Poniverse/Ponyville-Live,Poniverse/PVLive,Poniverse/Ponyville-Live,SlvrEagle23/AzuraCast,SlvrEagle23/AzuraCast,Poniverse/PVLive,SlvrEagle23/AzuraCast,AzuraCast/AzuraCast,Poniverse/PVLive,Poniverse/PVLive,SlvrEagle23/AzuraCast,AzuraCast/AzuraCast,AzuraCast/AzuraCast,Poniverse/Ponyville-Live,Poniverse/Ponyville-Live,AzuraCast/AzuraCast,Poniverse/PVLive,Poniverse/Ponyville-Live
php
## Code Before: <?php namespace Entity; use \Doctrine\Common\Collections\ArrayCollection; /** * @Table(name="sessions", indexes={ * @index(name="cleanup_idx", columns={"expires"}) * }) * @Entity */ class Session extends \DF\Doctrine\Entity { public function __construct() { $this->last_modified = time(); $this->user_agent = $_SERVER['HTTP_USER_AGENT']; } /** * @Column(name="id", type="string", length=128) * @Id */ protected $id; /** @Column(name="user_agent", type="string", length=255) */ protected $user_agent; /** @Column(name="expires", type="integer") */ protected $expires; public function setLifetime($lifetime) { $this->expires = time()+$lifetime; } /** @Column(name="last_modified", type="integer") */ protected $last_modified; /** @Column(name="data", type="text", nullable=true) */ protected $data; /* * Validate session. * @return boolean */ public function isValid() { if ($this->expires < time()) return false; $current_ua = $_SERVER['HTTP_USER_AGENT']; if (strcmp($this->user_agent, $current_ua) !== 0) return false; return true; } } ## Instruction: Allow for null user agents in sessions. ## Code After: <?php namespace Entity; use \Doctrine\Common\Collections\ArrayCollection; /** * @Table(name="sessions", indexes={ * @index(name="cleanup_idx", columns={"expires"}) * }) * @Entity */ class Session extends \DF\Doctrine\Entity { public function __construct() { $this->last_modified = time(); $this->user_agent = $_SERVER['HTTP_USER_AGENT']; if (empty($this->user_agent)) $this->user_agent = 'none'; } /** * @Column(name="id", type="string", length=128) * @Id */ protected $id; /** @Column(name="user_agent", type="string", length=255, nullable=true) */ protected $user_agent; /** @Column(name="expires", type="integer") */ protected $expires; public function setLifetime($lifetime) { $this->expires = time()+$lifetime; } /** @Column(name="last_modified", type="integer") */ protected $last_modified; /** @Column(name="data", type="text", nullable=true) */ protected $data; /* * Validate session. * @return boolean */ public function isValid() { if ($this->expires < time()) return false; $current_ua = $_SERVER['HTTP_USER_AGENT']; if (empty($current_ua)) $current_ua = 'none'; if (strcmp($this->user_agent, $current_ua) !== 0) return false; return true; } }
<?php namespace Entity; use \Doctrine\Common\Collections\ArrayCollection; /** * @Table(name="sessions", indexes={ * @index(name="cleanup_idx", columns={"expires"}) * }) * @Entity */ class Session extends \DF\Doctrine\Entity { public function __construct() { $this->last_modified = time(); $this->user_agent = $_SERVER['HTTP_USER_AGENT']; + + if (empty($this->user_agent)) + $this->user_agent = 'none'; } /** * @Column(name="id", type="string", length=128) * @Id */ protected $id; - /** @Column(name="user_agent", type="string", length=255) */ + /** @Column(name="user_agent", type="string", length=255, nullable=true) */ ? +++++++++++++++ protected $user_agent; /** @Column(name="expires", type="integer") */ protected $expires; public function setLifetime($lifetime) { $this->expires = time()+$lifetime; } /** @Column(name="last_modified", type="integer") */ protected $last_modified; /** @Column(name="data", type="text", nullable=true) */ protected $data; /* * Validate session. * @return boolean */ public function isValid() { if ($this->expires < time()) return false; $current_ua = $_SERVER['HTTP_USER_AGENT']; + if (empty($current_ua)) + $current_ua = 'none'; + if (strcmp($this->user_agent, $current_ua) !== 0) return false; return true; } }
8
0.137931
7
1
bc8ca819c1be345fc555cda9d1996f9293aa3aba
tests/callback__threading.js
tests/callback__threading.js
const gi = require('../lib/') const GLib = gi.require('GLib', '2.0') const Gio = gi.require('Gio', '2.0') const common = require('./__common__.js') gi.startLoop() common.describe('callback should be called from another thread', async () => { await new Promise((resolve, reject) => { const timeout = setTimeout(() => { reject('timeout') }, 1000) const task = new Gio.Task(null) task.runInThread(() => { clearTimeout(timeout) resolve() }) }) })
const gi = require('../lib/') const Gst = gi.require('Gst') const common = require('./__common__.js') gi.startLoop() Gst.init() common.describe('callback should be called from another thread', async () => { return await new Promise((resolve, reject) => { const pipeline = new Gst.Pipeline() const webrtcbin = Gst.ElementFactory.make('webrtcbin') if (!pipeline || !webrtcbin) { throw new Error('Could not create all elements.') } pipeline.add(webrtcbin) pipeline.setState(Gst.State.PLAYING) const timeout = setTimeout(() => { reject() }, 500) const s = Gst.Structure.newEmpty('structure') const p = Gst.Promise.newWithChangeFunc(() => { resolve() clearTimeout(timeout) }) webrtcbin.emit('create-offer', s, p) }) })
Implement another test for callback from another thread
Implement another test for callback from another thread
JavaScript
mit
romgrk/node-gtk,romgrk/node-gtk,romgrk/node-gtk,romgrk/node-gtk,romgrk/node-gtk
javascript
## Code Before: const gi = require('../lib/') const GLib = gi.require('GLib', '2.0') const Gio = gi.require('Gio', '2.0') const common = require('./__common__.js') gi.startLoop() common.describe('callback should be called from another thread', async () => { await new Promise((resolve, reject) => { const timeout = setTimeout(() => { reject('timeout') }, 1000) const task = new Gio.Task(null) task.runInThread(() => { clearTimeout(timeout) resolve() }) }) }) ## Instruction: Implement another test for callback from another thread ## Code After: const gi = require('../lib/') const Gst = gi.require('Gst') const common = require('./__common__.js') gi.startLoop() Gst.init() common.describe('callback should be called from another thread', async () => { return await new Promise((resolve, reject) => { const pipeline = new Gst.Pipeline() const webrtcbin = Gst.ElementFactory.make('webrtcbin') if (!pipeline || !webrtcbin) { throw new Error('Could not create all elements.') } pipeline.add(webrtcbin) pipeline.setState(Gst.State.PLAYING) const timeout = setTimeout(() => { reject() }, 500) const s = Gst.Structure.newEmpty('structure') const p = Gst.Promise.newWithChangeFunc(() => { resolve() clearTimeout(timeout) }) webrtcbin.emit('create-offer', s, p) }) })
const gi = require('../lib/') - const GLib = gi.require('GLib', '2.0') - const Gio = gi.require('Gio', '2.0') ? ^^ ^^^^^^^^^ + const Gst = gi.require('Gst') ? ^^ ^^ const common = require('./__common__.js') - gi.startLoop() + Gst.init() common.describe('callback should be called from another thread', async () => { - await new Promise((resolve, reject) => { + return await new Promise((resolve, reject) => { ? +++++++ + const pipeline = new Gst.Pipeline() + const webrtcbin = Gst.ElementFactory.make('webrtcbin') + + if (!pipeline || !webrtcbin) { + throw new Error('Could not create all elements.') + } + pipeline.add(webrtcbin) + + pipeline.setState(Gst.State.PLAYING) + const timeout = setTimeout(() => { - reject('timeout') ? --------- + reject() - }, 1000) ? ^^ + }, 500) ? ^ - const task = new Gio.Task(null) - task.runInThread(() => { + const s = Gst.Structure.newEmpty('structure') + const p = Gst.Promise.newWithChangeFunc(() => { + resolve() clearTimeout(timeout) - resolve() }) + webrtcbin.emit('create-offer', s, p) }) })
28
1.473684
19
9
140dc4f38e3302a8478a721cbeb9176029689b38
Functions/template-python/lambda_function.py
Functions/template-python/lambda_function.py
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads def lambda_handler(event, context): print('LOG RequestId: {}\tResponse:\n\n{}'.format( context.aws_request_id, None )) return None # Comment or remove everything below before deploying to Lambda. def local_testing(): import context with open('event.json', 'r') as f: event = loads(f.read()) print("Event:\n\n{}\n\nFunction Output:\n".format( dumps( event, indent=4 ) )) lambda_handler(event, context) local_testing()
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = True verbose = True class CWLogs(object): def __init__(self, context): self.context = context def event(self, message, event_prefix='LOG'): print('{} RequestId: {}\t{}'.format( event_prefix, self.context.aws_request_id, message )) def lambda_handler(event, context): log = CWLogs(context) if verbose is True: log.event('Event: {}'.format(dumps(event))) log.event('Hello World!') return None def local_test(): import context with open('event.json', 'r') as f: event = loads(f.read()) print('\nFunction Log:\n') lambda_handler(event, context) if testing_locally is True: local_test()
Rewrite custom log format to a class, add verbosity, and vars for options.
Rewrite custom log format to a class, add verbosity, and vars for options.
Python
apache-2.0
andrewdefilippis/aws-lambda
python
## Code Before: """Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads def lambda_handler(event, context): print('LOG RequestId: {}\tResponse:\n\n{}'.format( context.aws_request_id, None )) return None # Comment or remove everything below before deploying to Lambda. def local_testing(): import context with open('event.json', 'r') as f: event = loads(f.read()) print("Event:\n\n{}\n\nFunction Output:\n".format( dumps( event, indent=4 ) )) lambda_handler(event, context) local_testing() ## Instruction: Rewrite custom log format to a class, add verbosity, and vars for options. ## Code After: """Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads # Disable 'testing_locally' when deploying to AWS Lambda testing_locally = True verbose = True class CWLogs(object): def __init__(self, context): self.context = context def event(self, message, event_prefix='LOG'): print('{} RequestId: {}\t{}'.format( event_prefix, self.context.aws_request_id, message )) def lambda_handler(event, context): log = CWLogs(context) if verbose is True: log.event('Event: {}'.format(dumps(event))) log.event('Hello World!') return None def local_test(): import context with open('event.json', 'r') as f: event = loads(f.read()) print('\nFunction Log:\n') lambda_handler(event, context) if testing_locally is True: local_test()
"""Created By: Andrew Ryan DeFilippis""" print('Lambda cold-start...') from json import dumps, loads + # Disable 'testing_locally' when deploying to AWS Lambda + testing_locally = True + verbose = True + + + class CWLogs(object): + def __init__(self, context): + self.context = context + + def event(self, message, event_prefix='LOG'): + print('{} RequestId: {}\t{}'.format( + event_prefix, + self.context.aws_request_id, + message + )) + + def lambda_handler(event, context): - print('LOG RequestId: {}\tResponse:\n\n{}'.format( - context.aws_request_id, - None - )) + log = CWLogs(context) + + if verbose is True: + log.event('Event: {}'.format(dumps(event))) + + log.event('Hello World!') return None - # Comment or remove everything below before deploying to Lambda. - def local_testing(): ? --- + def local_test(): import context with open('event.json', 'r') as f: event = loads(f.read()) + print('\nFunction Log:\n') - print("Event:\n\n{}\n\nFunction Output:\n".format( - dumps( - event, - indent=4 - ) - )) lambda_handler(event, context) - + if testing_locally is True: - local_testing() ? --- + local_test() ? ++++
41
1.205882
27
14
fdbdf874d30bfcd31c77fbb84873315e558e75b8
content/post/just-21.md
content/post/just-21.md
--- title: Just 21 date: 2014-12-12 author: Derme cover: img/posts/just21_promo_graphic.png description: Just 21 is for everyone who wants to play cards and loves twenty-one. Easy to play, just hit or stand! --- Completely free with no ads, no micro-transactions, and no waiting for energy to recharge. Just 21 is a premium app so you can keep playing without interruption. **FEATURES:** - Free - Zero in-app purchases - Ad-free - Lots of fun stats Thank you for your support! Let us know what you think: **DOWNLOAD:**
--- title: Just 21 date: 2014-12-12 author: Derme cover: img/posts/just21_promo_graphic.png description: Just 21 is for everyone who wants to play cards and loves twenty-one. Easy to play, just hit or stand! --- Completely free with no ads, no micro-transactions, and no waiting for energy to recharge. Just 21 is a premium app so you can keep playing without interruption. ## FEATURES: - Free - Zero in-app purchases - Ad-free - Lots of fun stats Thank you for your support! Let us know what you think: ## DOWNLOAD: [![Download on Google Play](img/posts/en_google_download.png)](https://play.google.com/store/apps/details?id=org.frostcube.just21)
Fix download link for Just 21
Fix download link for Just 21
Markdown
mit
frostcube/frostcube.github.io,frostcube/frostcube.github.io,frostcube/frostcube.github.io
markdown
## Code Before: --- title: Just 21 date: 2014-12-12 author: Derme cover: img/posts/just21_promo_graphic.png description: Just 21 is for everyone who wants to play cards and loves twenty-one. Easy to play, just hit or stand! --- Completely free with no ads, no micro-transactions, and no waiting for energy to recharge. Just 21 is a premium app so you can keep playing without interruption. **FEATURES:** - Free - Zero in-app purchases - Ad-free - Lots of fun stats Thank you for your support! Let us know what you think: **DOWNLOAD:** ## Instruction: Fix download link for Just 21 ## Code After: --- title: Just 21 date: 2014-12-12 author: Derme cover: img/posts/just21_promo_graphic.png description: Just 21 is for everyone who wants to play cards and loves twenty-one. Easy to play, just hit or stand! --- Completely free with no ads, no micro-transactions, and no waiting for energy to recharge. Just 21 is a premium app so you can keep playing without interruption. ## FEATURES: - Free - Zero in-app purchases - Ad-free - Lots of fun stats Thank you for your support! Let us know what you think: ## DOWNLOAD: [![Download on Google Play](img/posts/en_google_download.png)](https://play.google.com/store/apps/details?id=org.frostcube.just21)
--- title: Just 21 date: 2014-12-12 author: Derme cover: img/posts/just21_promo_graphic.png description: Just 21 is for everyone who wants to play cards and loves twenty-one. Easy to play, just hit or stand! --- Completely free with no ads, no micro-transactions, and no waiting for energy to recharge. Just 21 is a premium app so you can keep playing without interruption. - **FEATURES:** + ## FEATURES: - Free - Zero in-app purchases - Ad-free - Lots of fun stats Thank you for your support! Let us know what you think: - **DOWNLOAD:** + ## DOWNLOAD: + [![Download on Google Play](img/posts/en_google_download.png)](https://play.google.com/store/apps/details?id=org.frostcube.just21)
5
0.25
3
2
614a58bd2845374df1daa8383a6c18c4ee4e0c4d
docs/sponsors.rst
docs/sponsors.rst
======== Sponsors ======== Packages ======== Sponsor packages describe the details of the various sponsor packages available. The ``order`` field controls the order in which packages are listed on the sponsor packages page. Sponsors ======== This is used to add details of the sponsors. The description can be formatted using markdown syntax. Images can be uploaded and used in the description using the files field. Files ===== Additional files, such as images, can be uploaded so they can be referenced. These files are placed in ``MEDIA_ROOT/sponsors_files`` by default. This location needs to be writeable by the webserver for uploads to work.
======== Sponsors ======== Packages ======== Sponsor packages describe the details of the various sponsor packages available. The ``order`` field controls the order in which packages are listed on the sponsor packages page. Sponsors ======== This is used to add details of the sponsors. The description can be formatted using markdown syntax. Images can be uploaded and used in the description using the files field. Files ===== Additional files, such as images, can be uploaded so they can be referenced. These files are placed in ``MEDIA_ROOT/sponsors_files`` by default. This location needs to be writeable by the webserver for uploads to work. Using files in templates ------------------------ Uploaded files can be associated with a sponsor and a name in the admin interface which can be used with the ``ponsor_tagged_image`` templatetag in the templates. The default wafer sponsor templates expect each sponsor to have an image labelled ``main_logo`` for use in the sponsor list. Wafer also provides an example template block for adding sponsors as a footer to pages. This expects images labelled ``footer_logo``.
Add some documentation about tagged sponsor images
Add some documentation about tagged sponsor images
reStructuredText
isc
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
restructuredtext
## Code Before: ======== Sponsors ======== Packages ======== Sponsor packages describe the details of the various sponsor packages available. The ``order`` field controls the order in which packages are listed on the sponsor packages page. Sponsors ======== This is used to add details of the sponsors. The description can be formatted using markdown syntax. Images can be uploaded and used in the description using the files field. Files ===== Additional files, such as images, can be uploaded so they can be referenced. These files are placed in ``MEDIA_ROOT/sponsors_files`` by default. This location needs to be writeable by the webserver for uploads to work. ## Instruction: Add some documentation about tagged sponsor images ## Code After: ======== Sponsors ======== Packages ======== Sponsor packages describe the details of the various sponsor packages available. The ``order`` field controls the order in which packages are listed on the sponsor packages page. Sponsors ======== This is used to add details of the sponsors. The description can be formatted using markdown syntax. Images can be uploaded and used in the description using the files field. Files ===== Additional files, such as images, can be uploaded so they can be referenced. These files are placed in ``MEDIA_ROOT/sponsors_files`` by default. This location needs to be writeable by the webserver for uploads to work. Using files in templates ------------------------ Uploaded files can be associated with a sponsor and a name in the admin interface which can be used with the ``ponsor_tagged_image`` templatetag in the templates. The default wafer sponsor templates expect each sponsor to have an image labelled ``main_logo`` for use in the sponsor list. Wafer also provides an example template block for adding sponsors as a footer to pages. This expects images labelled ``footer_logo``.
======== Sponsors ======== Packages ======== Sponsor packages describe the details of the various sponsor packages available. The ``order`` field controls the order in which packages are listed on the sponsor packages page. Sponsors ======== This is used to add details of the sponsors. The description can be formatted using markdown syntax. Images can be uploaded and used in the description using the files field. Files ===== Additional files, such as images, can be uploaded so they can be referenced. These files are placed in ``MEDIA_ROOT/sponsors_files`` by default. This location needs to be writeable by the webserver for uploads to work. + + Using files in templates + ------------------------ + + Uploaded files can be associated with a sponsor and a name in the admin + interface which can be used with the ``ponsor_tagged_image`` templatetag + in the templates. + + The default wafer sponsor templates expect each sponsor to have an image + labelled ``main_logo`` for use in the sponsor list. + + Wafer also provides an example template block for adding sponsors as a + footer to pages. This expects images labelled ``footer_logo``.
13
0.448276
13
0
9697fbb0378d40bd87c59b097e92a2e7bc6cd4ca
app/views/accounts/_booking_list.html.haml
app/views/accounts/_booking_list.html.haml
%table#booking_list.list.booking_list = render :partial => 'accounts/booking_list_header' - @saldo = @account.saldo(@bookings.first, false) - for @booking in @bookings - @saldo -= @booking.amount if @booking.debit_account == @account - @saldo += @booking.amount if @booking.credit_account == @account = render :partial => 'accounts/booking_item' = render :partial => 'accounts/booking_list_footer' unless @bookings.empty?
%table#booking_list.list.booking_list = render :partial => 'accounts/booking_list_header' - @saldo = @account.saldo(@bookings.first, false) - for @booking in @bookings - amount = @booking.amount - amount = -(amount) if @account.is_liability_account? - @saldo -= amount if @booking.debit_account == @account - @saldo += amount if @booking.credit_account == @account = render :partial => 'accounts/booking_item' = render :partial => 'accounts/booking_list_footer' unless @bookings.empty?
Fix saldo in liability account views.
Fix saldo in liability account views.
Haml
agpl-3.0
gaapt/bookyt,gaapt/bookyt,wtag/bookyt,gaapt/bookyt,huerlisi/bookyt,silvermind/bookyt,xuewenfei/bookyt,hauledev/bookyt,wtag/bookyt,xuewenfei/bookyt,silvermind/bookyt,huerlisi/bookyt,hauledev/bookyt,wtag/bookyt,hauledev/bookyt,silvermind/bookyt,hauledev/bookyt,gaapt/bookyt,xuewenfei/bookyt,silvermind/bookyt,huerlisi/bookyt
haml
## Code Before: %table#booking_list.list.booking_list = render :partial => 'accounts/booking_list_header' - @saldo = @account.saldo(@bookings.first, false) - for @booking in @bookings - @saldo -= @booking.amount if @booking.debit_account == @account - @saldo += @booking.amount if @booking.credit_account == @account = render :partial => 'accounts/booking_item' = render :partial => 'accounts/booking_list_footer' unless @bookings.empty? ## Instruction: Fix saldo in liability account views. ## Code After: %table#booking_list.list.booking_list = render :partial => 'accounts/booking_list_header' - @saldo = @account.saldo(@bookings.first, false) - for @booking in @bookings - amount = @booking.amount - amount = -(amount) if @account.is_liability_account? - @saldo -= amount if @booking.debit_account == @account - @saldo += amount if @booking.credit_account == @account = render :partial => 'accounts/booking_item' = render :partial => 'accounts/booking_list_footer' unless @bookings.empty?
%table#booking_list.list.booking_list = render :partial => 'accounts/booking_list_header' - @saldo = @account.saldo(@bookings.first, false) - for @booking in @bookings + - amount = @booking.amount + - amount = -(amount) if @account.is_liability_account? - - @saldo -= @booking.amount if @booking.debit_account == @account ? --------- + - @saldo -= amount if @booking.debit_account == @account - - @saldo += @booking.amount if @booking.credit_account == @account ? --------- + - @saldo += amount if @booking.credit_account == @account = render :partial => 'accounts/booking_item' = render :partial => 'accounts/booking_list_footer' unless @bookings.empty?
6
0.75
4
2
1c9ca004a34d0b6ab49722485cc933ac18ec9e4e
db/migrate/20200114203042_add_missing_platform_info.rb
db/migrate/20200114203042_add_missing_platform_info.rb
class AddMissingPlatformInfo < ActiveRecord::Migration def up runs = Run.joins(:sequence_run).where('runs.platform_id IS NULL AND sequence_runs.platform_id IS NOT NULL').pluck(:id) puts "Found #{runs.count} runs with missing platform info" runs.each do |run_id| run = Run.find(run_id) run.update_platform_info(run.sequence_run.attributes) end end def down end end
class AddMissingPlatformInfo < ActiveRecord::Migration def up runs = Run.joins(:sequence_run).where('runs.platform_id IS NULL AND sequence_runs.platform_id IS NOT NULL').pluck(:id) puts "Found #{runs.count} runs with missing platform info" runs.each do |run_id| run = Run.find(run_id) run.update_platform_info(run.sequence_run.attributes) # Sending run to firestore # check that the local environment has # ENV["REPORT_SERVICE_SELF_URL"] # ENV["REPORT_SERVICE_URL"] # ENV["REPORT_SERVICE_TOKEN"] sender = ReportService::RunSender.new(run, { send_all_answers: true }) result = sender.send if !result || !result["success"] puts "Failed to send Sequence Run: #{run.id}" end end end def down end end
Update migration, send data to firestore
Update migration, send data to firestore [#170193041]
Ruby
mit
concord-consortium/lara,concord-consortium/lara,concord-consortium/lara,concord-consortium/lara,concord-consortium/lara
ruby
## Code Before: class AddMissingPlatformInfo < ActiveRecord::Migration def up runs = Run.joins(:sequence_run).where('runs.platform_id IS NULL AND sequence_runs.platform_id IS NOT NULL').pluck(:id) puts "Found #{runs.count} runs with missing platform info" runs.each do |run_id| run = Run.find(run_id) run.update_platform_info(run.sequence_run.attributes) end end def down end end ## Instruction: Update migration, send data to firestore [#170193041] ## Code After: class AddMissingPlatformInfo < ActiveRecord::Migration def up runs = Run.joins(:sequence_run).where('runs.platform_id IS NULL AND sequence_runs.platform_id IS NOT NULL').pluck(:id) puts "Found #{runs.count} runs with missing platform info" runs.each do |run_id| run = Run.find(run_id) run.update_platform_info(run.sequence_run.attributes) # Sending run to firestore # check that the local environment has # ENV["REPORT_SERVICE_SELF_URL"] # ENV["REPORT_SERVICE_URL"] # ENV["REPORT_SERVICE_TOKEN"] sender = ReportService::RunSender.new(run, { send_all_answers: true }) result = sender.send if !result || !result["success"] puts "Failed to send Sequence Run: #{run.id}" end end end def down end end
class AddMissingPlatformInfo < ActiveRecord::Migration def up runs = Run.joins(:sequence_run).where('runs.platform_id IS NULL AND sequence_runs.platform_id IS NOT NULL').pluck(:id) puts "Found #{runs.count} runs with missing platform info" runs.each do |run_id| run = Run.find(run_id) run.update_platform_info(run.sequence_run.attributes) + # Sending run to firestore + # check that the local environment has + # ENV["REPORT_SERVICE_SELF_URL"] + # ENV["REPORT_SERVICE_URL"] + # ENV["REPORT_SERVICE_TOKEN"] + sender = ReportService::RunSender.new(run, { send_all_answers: true }) + result = sender.send + if !result || !result["success"] + puts "Failed to send Sequence Run: #{run.id}" + end end end def down end end
10
0.769231
10
0
f196a936366070e0814c9664dcc1a7ccfeebc912
.circleci/config.yml
.circleci/config.yml
version: 2 jobs: run_tests: docker: - image: circleci/node:10 working_directory: ~/repo steps: - checkout - run: sudo git clone https://github.com/sstephenson/bats.git ~/bats - run: pushd ~/bats && sudo bash install.sh /usr/local && popd - run: ln -s ~/repo ~/$CIRCLE_PROJECT_REPONAME # Download and cache dependencies - restore_cache: keys: - v1-dependencies-{{ checksum "package.json" }} # fallback to using the latest cache if no exact match is found - v1-dependencies- - run: npm install - save_cache: paths: - node_modules key: v1-dependencies-{{ checksum "package.json" }} - run: npm run commitlint-since-last-mr - run: npm test workflows: version: 2 test: jobs: - run_tests
version: 2 jobs: run_tests: docker: - image: circleci/node:10 working_directory: ~/repo steps: - checkout - run: sudo git clone https://github.com/sstephenson/bats.git ~/bats - run: pushd ~/bats && sudo bash install.sh /usr/local && popd - run: ln -s ~/repo ~/$CIRCLE_PROJECT_REPONAME # Download and cache dependencies - restore_cache: keys: - v1-dependencies-{{ checksum "package.json" }} # fallback to using the latest cache if no exact match is found - v1-dependencies- - run: npm install - save_cache: paths: - node_modules key: v1-dependencies-{{ checksum "package.json" }} - run: npm run commitlint-since-last-mr - run: npm test docker_build: working_directory: /app docker: - image: docker:18 steps: - checkout - setup_remote_docker: docker_layer_caching: true - run: name: Build image command: docker build -t artilleryio/artillery:$CIRCLE_TAG . - run: name: Test image command: docker run --rm -it artilleryio/artillery:$CIRCLE_TAG quick -d 20 -c 10 -n 20 https://artillery.io/ - run: name: Publish image command: | docker login -u $DOCKER_USER -p $DOCKER_PASS docker push artilleryio/artillery:$CIRCLE_TAG workflows: version: 2 test: jobs: - run_tests docker: jobs: - docker_build: requires: - run_tests filters: tags: only: /v[0-9]+(\.[0-9])+(-[a-zA-Z0-9]+)*$/ branches: only: master
Build Docker images on version-tagged commits on master
ci: Build Docker images on version-tagged commits on master
YAML
mpl-2.0
shoreditch-ops/artillery,shoreditch-ops/artillery,shoreditch-ops/artillery
yaml
## Code Before: version: 2 jobs: run_tests: docker: - image: circleci/node:10 working_directory: ~/repo steps: - checkout - run: sudo git clone https://github.com/sstephenson/bats.git ~/bats - run: pushd ~/bats && sudo bash install.sh /usr/local && popd - run: ln -s ~/repo ~/$CIRCLE_PROJECT_REPONAME # Download and cache dependencies - restore_cache: keys: - v1-dependencies-{{ checksum "package.json" }} # fallback to using the latest cache if no exact match is found - v1-dependencies- - run: npm install - save_cache: paths: - node_modules key: v1-dependencies-{{ checksum "package.json" }} - run: npm run commitlint-since-last-mr - run: npm test workflows: version: 2 test: jobs: - run_tests ## Instruction: ci: Build Docker images on version-tagged commits on master ## Code After: version: 2 jobs: run_tests: docker: - image: circleci/node:10 working_directory: ~/repo steps: - checkout - run: sudo git clone https://github.com/sstephenson/bats.git ~/bats - run: pushd ~/bats && sudo bash install.sh /usr/local && popd - run: ln -s ~/repo ~/$CIRCLE_PROJECT_REPONAME # Download and cache dependencies - restore_cache: keys: - v1-dependencies-{{ checksum "package.json" }} # fallback to using the latest cache if no exact match is found - v1-dependencies- - run: npm install - save_cache: paths: - node_modules key: v1-dependencies-{{ checksum "package.json" }} - run: npm run commitlint-since-last-mr - run: npm test docker_build: working_directory: /app docker: - image: docker:18 steps: - checkout - setup_remote_docker: docker_layer_caching: true - run: name: Build image command: docker build -t artilleryio/artillery:$CIRCLE_TAG . - run: name: Test image command: docker run --rm -it artilleryio/artillery:$CIRCLE_TAG quick -d 20 -c 10 -n 20 https://artillery.io/ - run: name: Publish image command: | docker login -u $DOCKER_USER -p $DOCKER_PASS docker push artilleryio/artillery:$CIRCLE_TAG workflows: version: 2 test: jobs: - run_tests docker: jobs: - docker_build: requires: - run_tests filters: tags: only: /v[0-9]+(\.[0-9])+(-[a-zA-Z0-9]+)*$/ branches: only: master
version: 2 jobs: run_tests: docker: - image: circleci/node:10 working_directory: ~/repo steps: - checkout - run: sudo git clone https://github.com/sstephenson/bats.git ~/bats - run: pushd ~/bats && sudo bash install.sh /usr/local && popd - run: ln -s ~/repo ~/$CIRCLE_PROJECT_REPONAME # Download and cache dependencies - restore_cache: keys: - v1-dependencies-{{ checksum "package.json" }} # fallback to using the latest cache if no exact match is found - v1-dependencies- - run: npm install - save_cache: paths: - node_modules key: v1-dependencies-{{ checksum "package.json" }} - run: npm run commitlint-since-last-mr - run: npm test + docker_build: + working_directory: /app + docker: + - image: docker:18 + steps: + - checkout + - setup_remote_docker: + docker_layer_caching: true + - run: + name: Build image + command: docker build -t artilleryio/artillery:$CIRCLE_TAG . + - run: + name: Test image + command: docker run --rm -it artilleryio/artillery:$CIRCLE_TAG quick -d 20 -c 10 -n 20 https://artillery.io/ + - run: + name: Publish image + command: | + docker login -u $DOCKER_USER -p $DOCKER_PASS + docker push artilleryio/artillery:$CIRCLE_TAG workflows: version: 2 test: jobs: - run_tests + docker: + jobs: + - docker_build: + requires: + - run_tests + filters: + tags: + only: /v[0-9]+(\.[0-9])+(-[a-zA-Z0-9]+)*$/ + branches: + only: master
29
0.763158
29
0
f6188126e10a9d77643cb567723c53bd3002c8cc
library.properties
library.properties
name=Ultrasonic version=1.0.1 author=Erick Simões <erick.simoes@live.com> maintainer=Erick Simões <erick.simoes@live.com> sentence=Minimalist library for ultrasound module HC-SR04 to Arduino paragraph=Work with the ultrasonic module HC-SR04 is fairly simple, but can be even more practical if you abstract the control of some features. This library aims to resource efficiency and to simplify access to data. category=Sensors url=https://github.com/ErickSimoes/Ultrasonic architectures=* includes=Ultrasonic.h
name=Ultrasonic version=2.0.0 author=Erick Simões <erick.simoes@live.com> maintainer=Erick Simões <erick.simoes@live.com> sentence=Minimalist library for ultrasound module to Arduino paragraph=Work with ultrasound module in a simple and light way. Compatible with the modules HC-SR04, Ping))) and Seeed Studio sensor. This library aims to resource efficiency and to simplify access to data. category=Sensors url=https://github.com/ErickSimoes/Ultrasonic architectures=* includes=Ultrasonic.h
Update version number to 2.0.0
docs: Update version number to 2.0.0 Resolves: #38
INI
mit
ErickSimoes/Ultrasonic
ini
## Code Before: name=Ultrasonic version=1.0.1 author=Erick Simões <erick.simoes@live.com> maintainer=Erick Simões <erick.simoes@live.com> sentence=Minimalist library for ultrasound module HC-SR04 to Arduino paragraph=Work with the ultrasonic module HC-SR04 is fairly simple, but can be even more practical if you abstract the control of some features. This library aims to resource efficiency and to simplify access to data. category=Sensors url=https://github.com/ErickSimoes/Ultrasonic architectures=* includes=Ultrasonic.h ## Instruction: docs: Update version number to 2.0.0 Resolves: #38 ## Code After: name=Ultrasonic version=2.0.0 author=Erick Simões <erick.simoes@live.com> maintainer=Erick Simões <erick.simoes@live.com> sentence=Minimalist library for ultrasound module to Arduino paragraph=Work with ultrasound module in a simple and light way. Compatible with the modules HC-SR04, Ping))) and Seeed Studio sensor. This library aims to resource efficiency and to simplify access to data. category=Sensors url=https://github.com/ErickSimoes/Ultrasonic architectures=* includes=Ultrasonic.h
name=Ultrasonic - version=1.0.1 ? ^ ^ + version=2.0.0 ? ^ ^ author=Erick Simões <erick.simoes@live.com> maintainer=Erick Simões <erick.simoes@live.com> - sentence=Minimalist library for ultrasound module HC-SR04 to Arduino ? -------- + sentence=Minimalist library for ultrasound module to Arduino - paragraph=Work with the ultrasonic module HC-SR04 is fairly simple, but can be even more practical if you abstract the control of some features. This library aims to resource efficiency and to simplify access to data. + paragraph=Work with ultrasound module in a simple and light way. Compatible with the modules HC-SR04, Ping))) and Seeed Studio sensor. This library aims to resource efficiency and to simplify access to data. category=Sensors url=https://github.com/ErickSimoes/Ultrasonic architectures=* includes=Ultrasonic.h
6
0.6
3
3
d834c1a26e7b5a6df8f11b99a9297caf48eb4bf8
packages/lesswrong/components/users/LoginPopup.jsx
packages/lesswrong/components/users/LoginPopup.jsx
import { Components, registerComponent } from 'meteor/vulcan:core'; import React, { PureComponent } from 'react'; import Dialog from '@material-ui/core/Dialog'; // Makes its child a link (wrapping it in an <a> tag) which opens a login // dialog. class LoginPopup extends PureComponent { constructor() { super(); this.state = { isOpen: false } } render() { const { onClose, classes } = this.props; return ( <Dialog title="Log In" modal={false} open={true} onClose={this.props.onClose} > <Components.WrappedLoginForm/> </Dialog> ); } } registerComponent('LoginPopup', LoginPopup);
import { Components, registerComponent } from 'meteor/vulcan:core'; import React, { PureComponent } from 'react'; import Dialog from '@material-ui/core/Dialog'; // Makes its child a link (wrapping it in an <a> tag) which opens a login // dialog. class LoginPopup extends PureComponent { constructor() { super(); this.state = { isOpen: false } } render() { const { onClose, classes } = this.props; return ( <Dialog open={true} onClose={this.props.onClose} > <Components.WrappedLoginForm/> </Dialog> ); } } registerComponent('LoginPopup', LoginPopup);
Remove unused props from Dialog
Remove unused props from Dialog
JSX
mit
Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2
jsx
## Code Before: import { Components, registerComponent } from 'meteor/vulcan:core'; import React, { PureComponent } from 'react'; import Dialog from '@material-ui/core/Dialog'; // Makes its child a link (wrapping it in an <a> tag) which opens a login // dialog. class LoginPopup extends PureComponent { constructor() { super(); this.state = { isOpen: false } } render() { const { onClose, classes } = this.props; return ( <Dialog title="Log In" modal={false} open={true} onClose={this.props.onClose} > <Components.WrappedLoginForm/> </Dialog> ); } } registerComponent('LoginPopup', LoginPopup); ## Instruction: Remove unused props from Dialog ## Code After: import { Components, registerComponent } from 'meteor/vulcan:core'; import React, { PureComponent } from 'react'; import Dialog from '@material-ui/core/Dialog'; // Makes its child a link (wrapping it in an <a> tag) which opens a login // dialog. class LoginPopup extends PureComponent { constructor() { super(); this.state = { isOpen: false } } render() { const { onClose, classes } = this.props; return ( <Dialog open={true} onClose={this.props.onClose} > <Components.WrappedLoginForm/> </Dialog> ); } } registerComponent('LoginPopup', LoginPopup);
import { Components, registerComponent } from 'meteor/vulcan:core'; import React, { PureComponent } from 'react'; import Dialog from '@material-ui/core/Dialog'; // Makes its child a link (wrapping it in an <a> tag) which opens a login // dialog. class LoginPopup extends PureComponent { constructor() { super(); this.state = { isOpen: false } } render() { const { onClose, classes } = this.props; return ( <Dialog - title="Log In" - modal={false} open={true} onClose={this.props.onClose} > <Components.WrappedLoginForm/> </Dialog> ); } } registerComponent('LoginPopup', LoginPopup);
2
0.064516
0
2
d84851cabd4f97fee98744341c0117290546b260
app/views/users/_user.html.erb
app/views/users/_user.html.erb
<% semantic_form_for @user do |f| %> <% f.inputs do %> <%= f.error_messages %> <%= f.input :username %> <%= f.input :password %> <%= f.input :password_confirmation %> <%= f.input :roles, :as => :check_boxes, :collection => Role.all %> <%= f.input :backup_server, :hint => 'This user is used by this backup server for API connections. You should also set the role to agent', :include_blank => true %> <% if Role.find_by_name('user').users.include? @user %> <h1>Woet</h1> <% end %> <% end %> <button type='submit'>Save</button> <% end %>
<% semantic_form_for @user do |f| %> <% f.inputs do %> <%= f.error_messages %> <%= f.input :username %> <%= f.input :password %> <%= f.input :password_confirmation %> <%= f.input :roles, :as => :check_boxes, :collection => Role.all %> <%= f.input :backup_server, :hint => 'This user is used by this backup server for API connections. You should also set the role to agent', :include_blank => true %> <% if Role.find_by_name('user').users.include? @user %> <p>Sorry, mass server assignment is not ready yet :-(</p> <% end %> <% end %> <button type='submit'>Save</button> <% end %>
Add a note about mass server assignment, something for the future
Add a note about mass server assignment, something for the future
HTML+ERB
isc
driehuis/retcon-web,Wijnand/retcon-web,driehuis/retcon-web,driehuis/retcon-web,Wijnand/retcon-web,driehuis/retcon-web
html+erb
## Code Before: <% semantic_form_for @user do |f| %> <% f.inputs do %> <%= f.error_messages %> <%= f.input :username %> <%= f.input :password %> <%= f.input :password_confirmation %> <%= f.input :roles, :as => :check_boxes, :collection => Role.all %> <%= f.input :backup_server, :hint => 'This user is used by this backup server for API connections. You should also set the role to agent', :include_blank => true %> <% if Role.find_by_name('user').users.include? @user %> <h1>Woet</h1> <% end %> <% end %> <button type='submit'>Save</button> <% end %> ## Instruction: Add a note about mass server assignment, something for the future ## Code After: <% semantic_form_for @user do |f| %> <% f.inputs do %> <%= f.error_messages %> <%= f.input :username %> <%= f.input :password %> <%= f.input :password_confirmation %> <%= f.input :roles, :as => :check_boxes, :collection => Role.all %> <%= f.input :backup_server, :hint => 'This user is used by this backup server for API connections. You should also set the role to agent', :include_blank => true %> <% if Role.find_by_name('user').users.include? @user %> <p>Sorry, mass server assignment is not ready yet :-(</p> <% end %> <% end %> <button type='submit'>Save</button> <% end %>
<% semantic_form_for @user do |f| %> <% f.inputs do %> <%= f.error_messages %> <%= f.input :username %> <%= f.input :password %> <%= f.input :password_confirmation %> <%= f.input :roles, :as => :check_boxes, :collection => Role.all %> <%= f.input :backup_server, :hint => 'This user is used by this backup server for API connections. You should also set the role to agent', :include_blank => true %> <% if Role.find_by_name('user').users.include? @user %> - <h1>Woet</h1> + <p>Sorry, mass server assignment is not ready yet :-(</p> <% end %> <% end %> <button type='submit'>Save</button> <% end %>
2
0.133333
1
1
fa9f749cf01284cf643dc30775f967728381ec90
application/config.ru
application/config.ru
ENV.delete("https_proxy") if ENV.has_key?("https_proxy") && ENV["https_proxy"].empty? require ::File.expand_path('../app', __FILE__) unless R8::Config[:log][:mode] == 'off' rotating_logger = Logger.new("log/#{ENV['RACK_ENV']}.log", 'weekly', 5) Ramaze::Log.loggers = [rotating_logger] Ramaze::Log.level = Logger.const_get(R8::Config[:log][:level].upcase) end Ramaze.options.mode = :live Ramaze.start(:root => __DIR__, :started => true) run Ramaze
ENV.delete("https_proxy") if ENV.has_key?("https_proxy") && ENV["https_proxy"].empty? ENV.delete("http_proxy") if ENV.has_key?("http_proxy") && ENV["http_proxy"].empty? require ::File.expand_path('../app', __FILE__) unless R8::Config[:log][:mode] == 'off' rotating_logger = Logger.new("log/#{ENV['RACK_ENV']}.log", 'weekly', 5) Ramaze::Log.loggers = [rotating_logger] Ramaze::Log.level = Logger.const_get(R8::Config[:log][:level].upcase) end Ramaze.options.mode = :live Ramaze.start(:root => __DIR__, :started => true) run Ramaze
Delete http_proxy env variable if empty string
Delete http_proxy env variable if empty string
Ruby
apache-2.0
dtk/dtk-server,dtk/dtk-server,dtk/dtk-server,dtk/dtk-server,dtk/dtk-server
ruby
## Code Before: ENV.delete("https_proxy") if ENV.has_key?("https_proxy") && ENV["https_proxy"].empty? require ::File.expand_path('../app', __FILE__) unless R8::Config[:log][:mode] == 'off' rotating_logger = Logger.new("log/#{ENV['RACK_ENV']}.log", 'weekly', 5) Ramaze::Log.loggers = [rotating_logger] Ramaze::Log.level = Logger.const_get(R8::Config[:log][:level].upcase) end Ramaze.options.mode = :live Ramaze.start(:root => __DIR__, :started => true) run Ramaze ## Instruction: Delete http_proxy env variable if empty string ## Code After: ENV.delete("https_proxy") if ENV.has_key?("https_proxy") && ENV["https_proxy"].empty? ENV.delete("http_proxy") if ENV.has_key?("http_proxy") && ENV["http_proxy"].empty? require ::File.expand_path('../app', __FILE__) unless R8::Config[:log][:mode] == 'off' rotating_logger = Logger.new("log/#{ENV['RACK_ENV']}.log", 'weekly', 5) Ramaze::Log.loggers = [rotating_logger] Ramaze::Log.level = Logger.const_get(R8::Config[:log][:level].upcase) end Ramaze.options.mode = :live Ramaze.start(:root => __DIR__, :started => true) run Ramaze
ENV.delete("https_proxy") if ENV.has_key?("https_proxy") && ENV["https_proxy"].empty? + ENV.delete("http_proxy") if ENV.has_key?("http_proxy") && ENV["http_proxy"].empty? require ::File.expand_path('../app', __FILE__) unless R8::Config[:log][:mode] == 'off' rotating_logger = Logger.new("log/#{ENV['RACK_ENV']}.log", 'weekly', 5) Ramaze::Log.loggers = [rotating_logger] Ramaze::Log.level = Logger.const_get(R8::Config[:log][:level].upcase) end Ramaze.options.mode = :live Ramaze.start(:root => __DIR__, :started => true) run Ramaze
1
0.076923
1
0
ffff7cb543b8b12b8c4d0f5c10dd0e8fa7bfb335
CHANGELOG.md
CHANGELOG.md
* Typeo in the CLI help ## 0.2.0 2017-10-31 ### Added * You can now see the version with --version * You can now use pre defined profiles. ## 0.1.0 2017-10-13 ### Fixed * Always remove filters before we try to set them.
* Always return Promises from start() and stop(), even in case of errors. * Typo in the CLI help ## 0.2.0 2017-10-31 ### Added * You can now see the version with --version * You can now use pre defined profiles. ## 0.1.0 2017-10-13 ### Fixed * Always remove filters before we try to set them.
Update changelog with Promise return fix.
Update changelog with Promise return fix.
Markdown
mit
sitespeedio/throttle,sitespeedio/throttle
markdown
## Code Before: * Typeo in the CLI help ## 0.2.0 2017-10-31 ### Added * You can now see the version with --version * You can now use pre defined profiles. ## 0.1.0 2017-10-13 ### Fixed * Always remove filters before we try to set them. ## Instruction: Update changelog with Promise return fix. ## Code After: * Always return Promises from start() and stop(), even in case of errors. * Typo in the CLI help ## 0.2.0 2017-10-31 ### Added * You can now see the version with --version * You can now use pre defined profiles. ## 0.1.0 2017-10-13 ### Fixed * Always remove filters before we try to set them.
+ * Always return Promises from start() and stop(), even in case of errors. - * Typeo in the CLI help ? - + * Typo in the CLI help ## 0.2.0 2017-10-31 ### Added * You can now see the version with --version * You can now use pre defined profiles. ## 0.1.0 2017-10-13 ### Fixed * Always remove filters before we try to set them.
3
0.25
2
1
435a683bd10fdde82483843d3ac1dec8e3b47675
spec/whiteout_spec.rb
spec/whiteout_spec.rb
require "whiteout" describe Whiteout do it "cleans trailing spaces" do Whiteout.clean("foo \n").should eql("foo\n") end it "cleans trailing tabs" do Whiteout.clean("bar\t\t\n").should eql("bar\n") end it "leaves non-trailing whitespace in tact" do baz = "\t\tbaz baz\n" Whiteout.clean(baz).should eql(baz) end it "can handle a more complex case" do input = "int foo() \t\n{\n // Returns 42 \n\treturn 42;\n} \n" output = "int foo()\n{\n // Returns 42\n\treturn 42;\n}\n" Whiteout.clean(input).should eql(output) end end
require "whiteout" describe Whiteout do it "cleans trailing spaces" do Whiteout.clean("foo \n").should eql("foo\n") end it "cleans trailing tabs" do Whiteout.clean("bar\t\t\n").should eql("bar\n") end it "leaves non-trailing whitespace intact" do baz = "\t\tbaz baz\n" Whiteout.clean(baz).should eql(baz) end it "leaves consecutive newlines intact" do baz = "foo\n\nbar\b" Whiteout.clean(baz).should eql(baz) end it "can handle a more complex case" do input = "int foo() \t\n{\n // Returns 42 \n\treturn 42;\n} \n" output = "int foo()\n{\n // Returns 42\n\treturn 42;\n}\n" Whiteout.clean(input).should eql(output) end end
Add key test we're failing
Add key test we're failing
Ruby
mit
camdez/whiteout
ruby
## Code Before: require "whiteout" describe Whiteout do it "cleans trailing spaces" do Whiteout.clean("foo \n").should eql("foo\n") end it "cleans trailing tabs" do Whiteout.clean("bar\t\t\n").should eql("bar\n") end it "leaves non-trailing whitespace in tact" do baz = "\t\tbaz baz\n" Whiteout.clean(baz).should eql(baz) end it "can handle a more complex case" do input = "int foo() \t\n{\n // Returns 42 \n\treturn 42;\n} \n" output = "int foo()\n{\n // Returns 42\n\treturn 42;\n}\n" Whiteout.clean(input).should eql(output) end end ## Instruction: Add key test we're failing ## Code After: require "whiteout" describe Whiteout do it "cleans trailing spaces" do Whiteout.clean("foo \n").should eql("foo\n") end it "cleans trailing tabs" do Whiteout.clean("bar\t\t\n").should eql("bar\n") end it "leaves non-trailing whitespace intact" do baz = "\t\tbaz baz\n" Whiteout.clean(baz).should eql(baz) end it "leaves consecutive newlines intact" do baz = "foo\n\nbar\b" Whiteout.clean(baz).should eql(baz) end it "can handle a more complex case" do input = "int foo() \t\n{\n // Returns 42 \n\treturn 42;\n} \n" output = "int foo()\n{\n // Returns 42\n\treturn 42;\n}\n" Whiteout.clean(input).should eql(output) end end
require "whiteout" describe Whiteout do it "cleans trailing spaces" do Whiteout.clean("foo \n").should eql("foo\n") end it "cleans trailing tabs" do Whiteout.clean("bar\t\t\n").should eql("bar\n") end - it "leaves non-trailing whitespace in tact" do ? - + it "leaves non-trailing whitespace intact" do baz = "\t\tbaz baz\n" + Whiteout.clean(baz).should eql(baz) + end + + it "leaves consecutive newlines intact" do + baz = "foo\n\nbar\b" Whiteout.clean(baz).should eql(baz) end it "can handle a more complex case" do input = "int foo() \t\n{\n // Returns 42 \n\treturn 42;\n} \n" output = "int foo()\n{\n // Returns 42\n\treturn 42;\n}\n" Whiteout.clean(input).should eql(output) end end
7
0.318182
6
1
56d450def118813b51e16fa225c6905b4ee746ce
shippable.yml
shippable.yml
--- language: python python: 3.6 jobs: - name: Build on Windows type: runSh runtime: nodePool: custom__x86_64__WindowsServer_2016 steps: - TASK: name: Windows EXE file runtime: options: imageName: microsoft/windowsservercore imageTag: 10.0.14393.1884 script: - python3 --version - python3 -m pip install PyInstaller wxPython - python3 setup.py clean bundle - dir dist
--- language: python python: 3.6 resources: - name: pythonturtle_repo type: gitRepo integration: github pointer: sourceName: cool-RR/PythonTurtle jobs: - name: Windows build type: runSh allowPublicAccess: true runtime: nodePool: dyn_win16 steps: - IN: pythonturtle_repo - TASK: name: Windows EXE file script: - systeminfo - Get-Process - pushd $(shipctl get_resource_state "pythonturtle_repo") - python3 --version - python3 -m pip install PyInstaller wxPython - python3 setup.py clean bundle - dir dist
Use CI config provided by Shippable support
Use CI config provided by Shippable support
YAML
mit
bittner/PythonTurtle,cool-RR/PythonTurtle
yaml
## Code Before: --- language: python python: 3.6 jobs: - name: Build on Windows type: runSh runtime: nodePool: custom__x86_64__WindowsServer_2016 steps: - TASK: name: Windows EXE file runtime: options: imageName: microsoft/windowsservercore imageTag: 10.0.14393.1884 script: - python3 --version - python3 -m pip install PyInstaller wxPython - python3 setup.py clean bundle - dir dist ## Instruction: Use CI config provided by Shippable support ## Code After: --- language: python python: 3.6 resources: - name: pythonturtle_repo type: gitRepo integration: github pointer: sourceName: cool-RR/PythonTurtle jobs: - name: Windows build type: runSh allowPublicAccess: true runtime: nodePool: dyn_win16 steps: - IN: pythonturtle_repo - TASK: name: Windows EXE file script: - systeminfo - Get-Process - pushd $(shipctl get_resource_state "pythonturtle_repo") - python3 --version - python3 -m pip install PyInstaller wxPython - python3 setup.py clean bundle - dir dist
--- language: python python: 3.6 + resources: + - name: pythonturtle_repo + type: gitRepo + integration: github + pointer: + sourceName: cool-RR/PythonTurtle + jobs: - - name: Build on Windows + - name: Windows build type: runSh + allowPublicAccess: true runtime: - nodePool: custom__x86_64__WindowsServer_2016 + nodePool: dyn_win16 steps: + - IN: pythonturtle_repo - TASK: name: Windows EXE file - runtime: - options: - imageName: microsoft/windowsservercore - imageTag: 10.0.14393.1884 script: + - systeminfo + - Get-Process + - pushd $(shipctl get_resource_state "pythonturtle_repo") - python3 --version - python3 -m pip install PyInstaller wxPython - python3 setup.py clean bundle - dir dist
20
0.952381
14
6
f82cbbea6cf716ff59a97d20dde36ca87ec30736
.travis.yml
.travis.yml
language: python os: - linux python: - "2.7" - "3.5" - "3.6" matrix: include: - python: "2.7" install: CC=clang python setup.py install - python: "3.6" install: CC=clang python setup.py install # Unfortunately there is currently no way to have these tested on Trusty. # This is hack to work around that: # https://docs.travis-ci.com/user/languages/python/#development-releases-support - python: "3.7" dist: xenial sudo: true - python: "3.7-dev" dist: xenial sudo: true - python: "3.8-dev" dist: xenial sudo: true - python: "nightly" dist: xenial sudo: true allow_failures: before_install: - pip install coveralls install: - python setup.py install # command to run tests script: - coverage run --source=iteration_utilities setup.py test after_success: - coveralls
language: python os: - linux python: - "2.7" - "3.5" - "3.6" matrix: include: - python: "2.7" install: CC=clang python setup.py install - python: "3.7" install: CC=clang python setup.py install dist: xenial sudo: true # Unfortunately there is currently no way to have these tested on Trusty. # This is hack to work around that: # https://docs.travis-ci.com/user/languages/python/#development-releases-support - python: "3.7" dist: xenial sudo: true - python: "3.7-dev" dist: xenial sudo: true - python: "3.8-dev" dist: xenial sudo: true - python: "nightly" dist: xenial sudo: true allow_failures: before_install: - pip install coveralls install: - python setup.py install # command to run tests script: - coverage run --source=iteration_utilities setup.py test after_success: - coveralls
Test Clang on Python 3.7
Test Clang on Python 3.7
YAML
apache-2.0
MSeifert04/iteration_utilities,MSeifert04/iteration_utilities,MSeifert04/iteration_utilities,MSeifert04/iteration_utilities
yaml
## Code Before: language: python os: - linux python: - "2.7" - "3.5" - "3.6" matrix: include: - python: "2.7" install: CC=clang python setup.py install - python: "3.6" install: CC=clang python setup.py install # Unfortunately there is currently no way to have these tested on Trusty. # This is hack to work around that: # https://docs.travis-ci.com/user/languages/python/#development-releases-support - python: "3.7" dist: xenial sudo: true - python: "3.7-dev" dist: xenial sudo: true - python: "3.8-dev" dist: xenial sudo: true - python: "nightly" dist: xenial sudo: true allow_failures: before_install: - pip install coveralls install: - python setup.py install # command to run tests script: - coverage run --source=iteration_utilities setup.py test after_success: - coveralls ## Instruction: Test Clang on Python 3.7 ## Code After: language: python os: - linux python: - "2.7" - "3.5" - "3.6" matrix: include: - python: "2.7" install: CC=clang python setup.py install - python: "3.7" install: CC=clang python setup.py install dist: xenial sudo: true # Unfortunately there is currently no way to have these tested on Trusty. # This is hack to work around that: # https://docs.travis-ci.com/user/languages/python/#development-releases-support - python: "3.7" dist: xenial sudo: true - python: "3.7-dev" dist: xenial sudo: true - python: "3.8-dev" dist: xenial sudo: true - python: "nightly" dist: xenial sudo: true allow_failures: before_install: - pip install coveralls install: - python setup.py install # command to run tests script: - coverage run --source=iteration_utilities setup.py test after_success: - coveralls
language: python os: - linux python: - "2.7" - "3.5" - "3.6" matrix: include: - python: "2.7" install: CC=clang python setup.py install - - python: "3.6" ? ^ + - python: "3.7" ? ^ install: CC=clang python setup.py install + dist: xenial + sudo: true # Unfortunately there is currently no way to have these tested on Trusty. # This is hack to work around that: # https://docs.travis-ci.com/user/languages/python/#development-releases-support - python: "3.7" dist: xenial sudo: true - python: "3.7-dev" dist: xenial sudo: true - python: "3.8-dev" dist: xenial sudo: true - python: "nightly" dist: xenial sudo: true allow_failures: before_install: - pip install coveralls install: - python setup.py install # command to run tests script: - coverage run --source=iteration_utilities setup.py test after_success: - coveralls
4
0.086957
3
1
ac4c46cf46c6f27bdc26cbbd4a2d37989cc2d0ed
src/ActiveRules.js
src/ActiveRules.js
'use strict' const { Fact, Rule, Operator, Engine } = require('json-rules-engine') class ActiveRules { constructor () { this.Fact = Fact this.Rule = Rule this.Operator = Operator this.Engine = Engine } } module.exports = ActiveRules
'use strict' const { Fact, Rule, Operator, Engine } = require('json-rules-engine') const djv = require('djv'); class ActiveRules { constructor () { this.Fact = Fact this.Rule = Rule this.Operator = Operator this.Engine = Engine this.Validator = djv; } } module.exports = ActiveRules
Add JSON Validator based on djv
Add JSON Validator based on djv
JavaScript
mit
bwinkers/ActiveRules-Server
javascript
## Code Before: 'use strict' const { Fact, Rule, Operator, Engine } = require('json-rules-engine') class ActiveRules { constructor () { this.Fact = Fact this.Rule = Rule this.Operator = Operator this.Engine = Engine } } module.exports = ActiveRules ## Instruction: Add JSON Validator based on djv ## Code After: 'use strict' const { Fact, Rule, Operator, Engine } = require('json-rules-engine') const djv = require('djv'); class ActiveRules { constructor () { this.Fact = Fact this.Rule = Rule this.Operator = Operator this.Engine = Engine this.Validator = djv; } } module.exports = ActiveRules
'use strict' const { Fact, Rule, Operator, Engine } = require('json-rules-engine') + + const djv = require('djv'); class ActiveRules { constructor () { this.Fact = Fact this.Rule = Rule this.Operator = Operator this.Engine = Engine + this.Validator = djv; } } module.exports = ActiveRules
3
0.214286
3
0
d44336db5e03df252e7fbb9e1546e2f5cd25b6a2
locale/en.yaml
locale/en.yaml
dashboard: > Twitter Mining - Suport Vector Machine and Term Frequency–Inverse Document Frequency ==================================================================================== The process is divided into three steps to the tweets mining process: (h) Type “h” and hit the Enter key to see the more help. (c) 1ª step: Collect tweets from Twitter (t) 2ª step: Training some tweets (p) 3ª step: Predication others tweets (x) for exit training: > How would you rate this tweet? (1) Positive, (2) Negative, (3) Neutral or (4) Unknown help: > Available commands tweets metrics ~> you see metrics of all tweets. tweets ~> you see all tweets collected. tweets trained ~> you see all tweets trained tweets trained positive ~> you see all tweets trained with evaluation positive tweets trained negative ~> you see all tweets trained with evaluation negative tweets trained neutral ~> you see all tweets trained with evaluation neutral tweets trained unknown ~> you see all tweets trained with evaluation unknown tweet: > @{username}: {tweet} Date: {date} tweet_trained: > @{username}: {tweet} Evaluation: {evaluation} metrics: > Quantity of tweets: {total} Quantity of tweets trained: {trained} Quantity of tweets available to predict: {predict} error: arg_not_found: > Argument for search tweets no found! For collect tweets with word python, type: c python success: collected: "Successfully collected Tweets"
dashboard: > Twitter Mining - Suport Vector Machine and Term Frequency–Inverse Document Frequency ==================================================================================== The process is divided into three steps to the tweets mining process: (h) Type “h” and hit the Enter key to see the more help. (c) 1ª step: Collect tweets from Twitter (t) 2ª step: Training some tweets (p) 3ª step: Predication others tweets (x) for exit training: > How would you rate this tweet? (1) Positive, (2) Negative, (3) Neutral or (4) Unknown help: > Available commands tweets metrics ~> you see metrics of all tweets. tweets ~> you see all tweets collected. tweets trained ~> you see all tweets trained tweets trained positive ~> you see all tweets trained with evaluation positive tweets trained negative ~> you see all tweets trained with evaluation negative tweets trained neutral ~> you see all tweets trained with evaluation neutral tweets trained unknown ~> you see all tweets trained with evaluation unknown tweet: > @{username}: {tweet} Date: {date} tweet_trained: > @{username}: {tweet} Evaluation: {evaluation} metrics: > Quantity of tweets: {total} Quantity of tweets trained: {trained} Quantity of tweets available to predict: {predict} error: arg_not_found: > Argument for search tweets no found! Example for collect tweets with word python, type: c python success: collected: "Successfully collected Tweets"
Fix tab space of yaml
Fix tab space of yaml
YAML
mit
fernandopso/twitter-svm-tfidf.py,fernandopso/mining-svm-tfidf
yaml
## Code Before: dashboard: > Twitter Mining - Suport Vector Machine and Term Frequency–Inverse Document Frequency ==================================================================================== The process is divided into three steps to the tweets mining process: (h) Type “h” and hit the Enter key to see the more help. (c) 1ª step: Collect tweets from Twitter (t) 2ª step: Training some tweets (p) 3ª step: Predication others tweets (x) for exit training: > How would you rate this tweet? (1) Positive, (2) Negative, (3) Neutral or (4) Unknown help: > Available commands tweets metrics ~> you see metrics of all tweets. tweets ~> you see all tweets collected. tweets trained ~> you see all tweets trained tweets trained positive ~> you see all tweets trained with evaluation positive tweets trained negative ~> you see all tweets trained with evaluation negative tweets trained neutral ~> you see all tweets trained with evaluation neutral tweets trained unknown ~> you see all tweets trained with evaluation unknown tweet: > @{username}: {tweet} Date: {date} tweet_trained: > @{username}: {tweet} Evaluation: {evaluation} metrics: > Quantity of tweets: {total} Quantity of tweets trained: {trained} Quantity of tweets available to predict: {predict} error: arg_not_found: > Argument for search tweets no found! For collect tweets with word python, type: c python success: collected: "Successfully collected Tweets" ## Instruction: Fix tab space of yaml ## Code After: dashboard: > Twitter Mining - Suport Vector Machine and Term Frequency–Inverse Document Frequency ==================================================================================== The process is divided into three steps to the tweets mining process: (h) Type “h” and hit the Enter key to see the more help. (c) 1ª step: Collect tweets from Twitter (t) 2ª step: Training some tweets (p) 3ª step: Predication others tweets (x) for exit training: > How would you rate this tweet? (1) Positive, (2) Negative, (3) Neutral or (4) Unknown help: > Available commands tweets metrics ~> you see metrics of all tweets. tweets ~> you see all tweets collected. tweets trained ~> you see all tweets trained tweets trained positive ~> you see all tweets trained with evaluation positive tweets trained negative ~> you see all tweets trained with evaluation negative tweets trained neutral ~> you see all tweets trained with evaluation neutral tweets trained unknown ~> you see all tweets trained with evaluation unknown tweet: > @{username}: {tweet} Date: {date} tweet_trained: > @{username}: {tweet} Evaluation: {evaluation} metrics: > Quantity of tweets: {total} Quantity of tweets trained: {trained} Quantity of tweets available to predict: {predict} error: arg_not_found: > Argument for search tweets no found! Example for collect tweets with word python, type: c python success: collected: "Successfully collected Tweets"
dashboard: > - Twitter Mining - Suport Vector Machine and Term Frequency–Inverse Document Frequency ? -- + Twitter Mining - Suport Vector Machine and Term Frequency–Inverse Document Frequency - ==================================================================================== ? -- + ==================================================================================== - The process is divided into three steps to the tweets mining process: ? -- + The process is divided into three steps to the tweets mining process: - (h) Type “h” and hit the Enter key to see the more help. ? -- + (h) Type “h” and hit the Enter key to see the more help. - (c) 1ª step: Collect tweets from Twitter ? -- + (c) 1ª step: Collect tweets from Twitter - (t) 2ª step: Training some tweets ? -- + (t) 2ª step: Training some tweets - (p) 3ª step: Predication others tweets ? -- + (p) 3ª step: Predication others tweets - (x) for exit ? -- + (x) for exit training: > - How would you rate this tweet? ? -- + How would you rate this tweet? - (1) Positive, (2) Negative, (3) Neutral or (4) Unknown ? -- + (1) Positive, (2) Negative, (3) Neutral or (4) Unknown help: > - Available commands ? -- + Available commands - tweets metrics ? -- + tweets metrics - ~> you see metrics of all tweets. ? -- + ~> you see metrics of all tweets. - tweets ? -- + tweets - ~> you see all tweets collected. ? -- + ~> you see all tweets collected. - tweets trained ? -- + tweets trained - ~> you see all tweets trained ? -- + ~> you see all tweets trained - tweets trained positive ? -- + tweets trained positive - ~> you see all tweets trained with evaluation positive ? -- + ~> you see all tweets trained with evaluation positive - tweets trained negative ? -- + tweets trained negative - ~> you see all tweets trained with evaluation negative ? -- + ~> you see all tweets trained with evaluation negative - tweets trained neutral ? -- + tweets trained neutral - ~> you see all tweets trained with evaluation neutral ? -- + ~> you see all tweets trained with evaluation neutral - tweets trained unknown ? -- + tweets trained unknown - ~> you see all tweets trained with evaluation unknown ? -- + ~> you see all tweets trained with evaluation unknown tweet: > - @{username}: {tweet} ? -- + @{username}: {tweet} - Date: {date} ? -- + Date: {date} tweet_trained: > - @{username}: {tweet} ? -- + @{username}: {tweet} - Evaluation: {evaluation} ? -- + Evaluation: {evaluation} metrics: > - Quantity of tweets: {total} ? -- + Quantity of tweets: {total} - Quantity of tweets trained: {trained} ? -- + Quantity of tweets trained: {trained} - Quantity of tweets available to predict: {predict} ? -- + Quantity of tweets available to predict: {predict} error: - arg_not_found: > ? -- + arg_not_found: > - - Argument for search tweets no found! ? ---- + Argument for search tweets no found! - For collect tweets with word python, type: c python ? ^^^^ + Example for collect tweets with word python, type: c python ? +++++++ ^ success: - collected: "Successfully collected Tweets" ? -- + collected: "Successfully collected Tweets"
73
0.9125
36
37
adcc739f86f2bb24dc0f2ebe0d7d6bba1501b81c
test/index.js
test/index.js
var vCard = require( '..' ) var fs = require( 'fs' ) var assert = require( 'assert' ) suite( 'vCard', function() { suite( 'Character Sets', function() { test( 'charset should not be part of value', function() { var data = fs.readFileSync( __dirname + '/data/xing.vcf' ) var card = new vCard( data ) assert.strictEqual( card.fn.indexOf( 'CHARSET' ), -1 ) }) }) suite( 'Photo URL', function() { test( 'URL parameters should not become object properties', function() { var data = fs.readFileSync( __dirname + '/data/xing.vcf' ) var card = new vCard( data ) assert.equal( card.photo.txtsize, null ) }) }) })
var vCard = require( '..' ) var fs = require( 'fs' ) var assert = require( 'assert' ) suite( 'vCard', function() { suite( 'Character Sets', function() { test( 'charset should not be part of value', function() { var data = fs.readFileSync( __dirname + '/data/xing.vcf' ) var card = new vCard( data ) assert.strictEqual( typeof card.fn, 'object' ) assert.strictEqual( card.fn.data.indexOf( 'CHARSET' ), -1 ) }) }) suite( 'Photo URL', function() { test( 'URL parameters should not become object properties', function() { var data = fs.readFileSync( __dirname + '/data/xing.vcf' ) var card = new vCard( data ) assert.equal( card.photo.txtsize, null ) }) }) })
Update test: Adjust assertions to removal of cardinality checks
Update test: Adjust assertions to removal of cardinality checks
JavaScript
mit
jhermsmeier/node-vcf
javascript
## Code Before: var vCard = require( '..' ) var fs = require( 'fs' ) var assert = require( 'assert' ) suite( 'vCard', function() { suite( 'Character Sets', function() { test( 'charset should not be part of value', function() { var data = fs.readFileSync( __dirname + '/data/xing.vcf' ) var card = new vCard( data ) assert.strictEqual( card.fn.indexOf( 'CHARSET' ), -1 ) }) }) suite( 'Photo URL', function() { test( 'URL parameters should not become object properties', function() { var data = fs.readFileSync( __dirname + '/data/xing.vcf' ) var card = new vCard( data ) assert.equal( card.photo.txtsize, null ) }) }) }) ## Instruction: Update test: Adjust assertions to removal of cardinality checks ## Code After: var vCard = require( '..' ) var fs = require( 'fs' ) var assert = require( 'assert' ) suite( 'vCard', function() { suite( 'Character Sets', function() { test( 'charset should not be part of value', function() { var data = fs.readFileSync( __dirname + '/data/xing.vcf' ) var card = new vCard( data ) assert.strictEqual( typeof card.fn, 'object' ) assert.strictEqual( card.fn.data.indexOf( 'CHARSET' ), -1 ) }) }) suite( 'Photo URL', function() { test( 'URL parameters should not become object properties', function() { var data = fs.readFileSync( __dirname + '/data/xing.vcf' ) var card = new vCard( data ) assert.equal( card.photo.txtsize, null ) }) }) })
var vCard = require( '..' ) var fs = require( 'fs' ) var assert = require( 'assert' ) suite( 'vCard', function() { suite( 'Character Sets', function() { test( 'charset should not be part of value', function() { var data = fs.readFileSync( __dirname + '/data/xing.vcf' ) var card = new vCard( data ) + assert.strictEqual( typeof card.fn, 'object' ) - assert.strictEqual( card.fn.indexOf( 'CHARSET' ), -1 ) + assert.strictEqual( card.fn.data.indexOf( 'CHARSET' ), -1 ) ? +++++ }) }) suite( 'Photo URL', function() { test( 'URL parameters should not become object properties', function() { var data = fs.readFileSync( __dirname + '/data/xing.vcf' ) var card = new vCard( data ) assert.equal( card.photo.txtsize, null ) }) }) })
3
0.111111
2
1
533ab1d6d95ea0e0a251390ed8ae0a4c923f999d
src/view.php
src/view.php
<?php define('CLEANHOME', '/opt/clean'); error_reporting(E_ALL); ini_set('display_errors', 1); if (!isset($_REQUEST['lib']) || !isset($_REQUEST['mod'])) { die('Add ?lib and ?mod.'); } $iclordcl = isset($_REQUEST['icl']) ? 'icl' : 'dcl'; $highlight = isset($_REQUEST['hl']) ? true : false; $lib = preg_replace('/[^\\w\\/\\-]/', '', $_REQUEST['lib']); $mod = str_replace('.', '/', $_REQUEST['mod']); $mod = preg_replace('/[^\\w\\/]/', '', $mod); $fname = CLEANHOME . '/lib/' . $lib . '/' . $mod . '.' . $iclordcl; $efname = escapeshellarg($fname); if ($highlight) { $out = []; exec('pygmentize -l clean -f html -O full -O linenos ' . $efname, $out); $out = array_filter($out, function($str) { return $str != '<h2></h2>'; }); echo implode("\n", $out); } else { header('Content-Type: text/plain'); echo file_get_contents($fname); }
<?php define('CLEANHOME', '/opt/clean'); error_reporting(E_ALL); ini_set('display_errors', 1); if (!isset($_REQUEST['lib']) || !isset($_REQUEST['mod'])) { die('Add ?lib and ?mod.'); } $iclordcl = isset($_REQUEST['icl']) ? 'icl' : 'dcl'; $highlight = isset($_REQUEST['hl']) ? true : false; $lib = preg_replace('/[^\\w\\/\\-]/', '', $_REQUEST['lib']); $mod = str_replace('.', '/', $_REQUEST['mod']); $mod = preg_replace('/[^\\w\\/]/', '', $mod); $fname = CLEANHOME . '/lib/' . $lib . '/' . $mod . '.' . $iclordcl; $efname = escapeshellarg($fname); if ($highlight) { $out = []; $code = -1; $cmd = 'pygmentize -v -l clean -f html -O full,linenos,encoding=iso8859'; exec("$cmd $efname", $out, $code); $out = array_filter($out, function($str) { return $str != '<h2></h2>'; }); echo implode("\n", $out); } else { header('Content-Type: text/plain'); echo file_get_contents($fname); }
Fix highlighting of modules by László (encoding)
Fix highlighting of modules by László (encoding)
PHP
mit
dopefishh/cloogle,clean-cloogle/cloogle,clean-cloogle/cloogle.org,clean-cloogle/cloogle,clean-cloogle/cloogle.org,clean-cloogle/cloogle,dopefishh/cloogle,clean-cloogle/cloogle.org,dopefishh/cloogle,dopefishh/cloogle,clean-cloogle/cloogle.org,clean-cloogle/cloogle,clean-cloogle/cloogle,dopefishh/cloogle
php
## Code Before: <?php define('CLEANHOME', '/opt/clean'); error_reporting(E_ALL); ini_set('display_errors', 1); if (!isset($_REQUEST['lib']) || !isset($_REQUEST['mod'])) { die('Add ?lib and ?mod.'); } $iclordcl = isset($_REQUEST['icl']) ? 'icl' : 'dcl'; $highlight = isset($_REQUEST['hl']) ? true : false; $lib = preg_replace('/[^\\w\\/\\-]/', '', $_REQUEST['lib']); $mod = str_replace('.', '/', $_REQUEST['mod']); $mod = preg_replace('/[^\\w\\/]/', '', $mod); $fname = CLEANHOME . '/lib/' . $lib . '/' . $mod . '.' . $iclordcl; $efname = escapeshellarg($fname); if ($highlight) { $out = []; exec('pygmentize -l clean -f html -O full -O linenos ' . $efname, $out); $out = array_filter($out, function($str) { return $str != '<h2></h2>'; }); echo implode("\n", $out); } else { header('Content-Type: text/plain'); echo file_get_contents($fname); } ## Instruction: Fix highlighting of modules by László (encoding) ## Code After: <?php define('CLEANHOME', '/opt/clean'); error_reporting(E_ALL); ini_set('display_errors', 1); if (!isset($_REQUEST['lib']) || !isset($_REQUEST['mod'])) { die('Add ?lib and ?mod.'); } $iclordcl = isset($_REQUEST['icl']) ? 'icl' : 'dcl'; $highlight = isset($_REQUEST['hl']) ? true : false; $lib = preg_replace('/[^\\w\\/\\-]/', '', $_REQUEST['lib']); $mod = str_replace('.', '/', $_REQUEST['mod']); $mod = preg_replace('/[^\\w\\/]/', '', $mod); $fname = CLEANHOME . '/lib/' . $lib . '/' . $mod . '.' . $iclordcl; $efname = escapeshellarg($fname); if ($highlight) { $out = []; $code = -1; $cmd = 'pygmentize -v -l clean -f html -O full,linenos,encoding=iso8859'; exec("$cmd $efname", $out, $code); $out = array_filter($out, function($str) { return $str != '<h2></h2>'; }); echo implode("\n", $out); } else { header('Content-Type: text/plain'); echo file_get_contents($fname); }
<?php define('CLEANHOME', '/opt/clean'); error_reporting(E_ALL); ini_set('display_errors', 1); if (!isset($_REQUEST['lib']) || !isset($_REQUEST['mod'])) { die('Add ?lib and ?mod.'); } $iclordcl = isset($_REQUEST['icl']) ? 'icl' : 'dcl'; $highlight = isset($_REQUEST['hl']) ? true : false; $lib = preg_replace('/[^\\w\\/\\-]/', '', $_REQUEST['lib']); $mod = str_replace('.', '/', $_REQUEST['mod']); $mod = preg_replace('/[^\\w\\/]/', '', $mod); $fname = CLEANHOME . '/lib/' . $lib . '/' . $mod . '.' . $iclordcl; $efname = escapeshellarg($fname); if ($highlight) { $out = []; - exec('pygmentize -l clean -f html -O full -O linenos ' . $efname, $out); + $code = -1; + $cmd = 'pygmentize -v -l clean -f html -O full,linenos,encoding=iso8859'; + exec("$cmd $efname", $out, $code); $out = array_filter($out, function($str) { return $str != '<h2></h2>'; }); echo implode("\n", $out); } else { header('Content-Type: text/plain'); echo file_get_contents($fname); }
4
0.137931
3
1
721007dca1a5c2557eed0b4267dc59ff237e1807
layout/default/micka_print.css
layout/default/micka_print.css
/* css file for printing */ #headBox, #leftBox, #menuBox, #naviBox, #loginBox {display: none} #dataBox {width: 100%; margin-left: 0px;} div.print {display: block} div.display {display:none}
/* css file for printing */ #headBox, #leftBox, #menuBox, #naviBox, #loginBox {display: none} #dataBox {width: 100%; margin-left: 0px;} div.print {display: block} div.display {display:none} .breadcrumb {display:none !important} a[href]:after { content: none }
Hide the links in print css and breadcrumb
Hide the links in print css and breadcrumb Hide the links in the CSS printing template, see https://i.imgur.com/zH8q1U0.png
CSS
bsd-3-clause
hsrs-cz/Micka,hsrs-cz/Micka,hsrs-cz/Micka
css
## Code Before: /* css file for printing */ #headBox, #leftBox, #menuBox, #naviBox, #loginBox {display: none} #dataBox {width: 100%; margin-left: 0px;} div.print {display: block} div.display {display:none} ## Instruction: Hide the links in print css and breadcrumb Hide the links in the CSS printing template, see https://i.imgur.com/zH8q1U0.png ## Code After: /* css file for printing */ #headBox, #leftBox, #menuBox, #naviBox, #loginBox {display: none} #dataBox {width: 100%; margin-left: 0px;} div.print {display: block} div.display {display:none} .breadcrumb {display:none !important} a[href]:after { content: none }
/* css file for printing */ #headBox, #leftBox, #menuBox, #naviBox, #loginBox {display: none} #dataBox {width: 100%; margin-left: 0px;} div.print {display: block} div.display {display:none} + + .breadcrumb {display:none !important} + + a[href]:after { content: none }
4
0.571429
4
0
eb4322eb0744d07cb10442ab16d50384aabe1478
cumulusci/core/tests/test_github.py
cumulusci/core/tests/test_github.py
import unittest from cumulusci.core.github import get_github_api class TestGithub(unittest.TestCase): def test_github_api_retries(self): gh = get_github_api('TestUser', 'TestPass') adapter = gh._session.get_adapter('http://') self.assertEqual(0.3, adapter.max_retries.backoff_factor) self.assertIn(502, adapter.max_retries.status_forcelist)
from http.client import HTTPMessage import io import unittest import mock from cumulusci.core.github import get_github_api class MockHttpResponse(mock.Mock): def __init__(self, status): super(MockHttpResponse, self).__init__() self.status = status self.strict = 0 self.version = 0 self.reason = None self.msg = HTTPMessage(io.BytesIO()) def read(self): return b'' def isclosed(self): return True class TestGithub(unittest.TestCase): @mock.patch('urllib3.connectionpool.HTTPConnectionPool._make_request') def test_github_api_retries(self, _make_request): gh = get_github_api('TestUser', 'TestPass') adapter = gh._session.get_adapter('http://') self.assertEqual(0.3, adapter.max_retries.backoff_factor) self.assertIn(502, adapter.max_retries.status_forcelist) _make_request.side_effect = [ MockHttpResponse(status=503), MockHttpResponse(status=200), ] gh.octocat('meow') self.assertEqual(_make_request.call_count, 2)
Test that github requests are actually retried
Test that github requests are actually retried
Python
bsd-3-clause
SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI
python
## Code Before: import unittest from cumulusci.core.github import get_github_api class TestGithub(unittest.TestCase): def test_github_api_retries(self): gh = get_github_api('TestUser', 'TestPass') adapter = gh._session.get_adapter('http://') self.assertEqual(0.3, adapter.max_retries.backoff_factor) self.assertIn(502, adapter.max_retries.status_forcelist) ## Instruction: Test that github requests are actually retried ## Code After: from http.client import HTTPMessage import io import unittest import mock from cumulusci.core.github import get_github_api class MockHttpResponse(mock.Mock): def __init__(self, status): super(MockHttpResponse, self).__init__() self.status = status self.strict = 0 self.version = 0 self.reason = None self.msg = HTTPMessage(io.BytesIO()) def read(self): return b'' def isclosed(self): return True class TestGithub(unittest.TestCase): @mock.patch('urllib3.connectionpool.HTTPConnectionPool._make_request') def test_github_api_retries(self, _make_request): gh = get_github_api('TestUser', 'TestPass') adapter = gh._session.get_adapter('http://') self.assertEqual(0.3, adapter.max_retries.backoff_factor) self.assertIn(502, adapter.max_retries.status_forcelist) _make_request.side_effect = [ MockHttpResponse(status=503), MockHttpResponse(status=200), ] gh.octocat('meow') self.assertEqual(_make_request.call_count, 2)
+ from http.client import HTTPMessage + import io import unittest + + import mock from cumulusci.core.github import get_github_api + class MockHttpResponse(mock.Mock): + + def __init__(self, status): + super(MockHttpResponse, self).__init__() + self.status = status + self.strict = 0 + self.version = 0 + self.reason = None + self.msg = HTTPMessage(io.BytesIO()) + + def read(self): + return b'' + + def isclosed(self): + return True + + class TestGithub(unittest.TestCase): + @mock.patch('urllib3.connectionpool.HTTPConnectionPool._make_request') - def test_github_api_retries(self): + def test_github_api_retries(self, _make_request): ? +++++++++++++++ gh = get_github_api('TestUser', 'TestPass') adapter = gh._session.get_adapter('http://') self.assertEqual(0.3, adapter.max_retries.backoff_factor) self.assertIn(502, adapter.max_retries.status_forcelist) + + _make_request.side_effect = [ + MockHttpResponse(status=503), + MockHttpResponse(status=200), + ] + + gh.octocat('meow') + self.assertEqual(_make_request.call_count, 2)
32
2.461538
31
1
d9b1ebc833c89768012f88b572ef475661b16111
app/assets/stylesheets/messages.css.scss
app/assets/stylesheets/messages.css.scss
div { font-family: 'Open Sans', sans-serif; /*text-transform: form: uppercase;*/ /*font-weight: 700;*/ } div.wrapper { width: 500px; margin: 0 auto; padding-bottom: 20px; } h1.title { text-transform: uppercase; position: static; display: block; font-weight: 800; letter-spacing: 3px; text-decoration: none; text-align: center; font-size: 46px; color: #333; margin-top: 50px; } div#new-message { text-transform: uppercase; letter-spacing: 1px; min-height: 52px !important; border-bottom: 1px solid #eee; padding: 10px 0; margin-bottom: 20px; border-bottom: 1px dashed #ccc; } div.message { /*font-family: 'Lato', sans-serif;*/ /*font-size: 22px;*/ /*color: #333332;*/ /*background: #fff;*/ /*line-height: 1.45;*/ /*font-weight: 400;*/ }
div { font-family: 'Open Sans', sans-serif; /*text-transform: form: uppercase;*/ /*font-weight: 700;*/ } div.wrapper { width: 500px; margin: 0 auto; padding-bottom: 20px; } h1.title { text-transform: uppercase; position: static; display: block; font-weight: 800; letter-spacing: 3px; text-decoration: none; text-align: center; font-size: 46px; color: #333; margin-top: 50px; } div#new-message { text-transform: uppercase; letter-spacing: 1px; min-height: 52px !important; border-bottom: 1px solid #eee; padding: 10px 0; margin-bottom: 20px; border-bottom: 1px dashed #ccc; } div.message { /*font-family: 'Lato', sans-serif;*/ /*font-size: 22px;*/ /*color: #333332;*/ /*background: #fff;*/ /*line-height: 1.45;*/ /*font-weight: 400;*/ white-space: pre-wrap; /* CSS3 */ white-space: -moz-pre-wrap; /* Firefox */ white-space: -pre-wrap; /* Opera <7 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* IE */ }
Add word wrapping in message div
Add word wrapping in message div
SCSS
mit
loganhasson/furtively,loganhasson/furtively
scss
## Code Before: div { font-family: 'Open Sans', sans-serif; /*text-transform: form: uppercase;*/ /*font-weight: 700;*/ } div.wrapper { width: 500px; margin: 0 auto; padding-bottom: 20px; } h1.title { text-transform: uppercase; position: static; display: block; font-weight: 800; letter-spacing: 3px; text-decoration: none; text-align: center; font-size: 46px; color: #333; margin-top: 50px; } div#new-message { text-transform: uppercase; letter-spacing: 1px; min-height: 52px !important; border-bottom: 1px solid #eee; padding: 10px 0; margin-bottom: 20px; border-bottom: 1px dashed #ccc; } div.message { /*font-family: 'Lato', sans-serif;*/ /*font-size: 22px;*/ /*color: #333332;*/ /*background: #fff;*/ /*line-height: 1.45;*/ /*font-weight: 400;*/ } ## Instruction: Add word wrapping in message div ## Code After: div { font-family: 'Open Sans', sans-serif; /*text-transform: form: uppercase;*/ /*font-weight: 700;*/ } div.wrapper { width: 500px; margin: 0 auto; padding-bottom: 20px; } h1.title { text-transform: uppercase; position: static; display: block; font-weight: 800; letter-spacing: 3px; text-decoration: none; text-align: center; font-size: 46px; color: #333; margin-top: 50px; } div#new-message { text-transform: uppercase; letter-spacing: 1px; min-height: 52px !important; border-bottom: 1px solid #eee; padding: 10px 0; margin-bottom: 20px; border-bottom: 1px dashed #ccc; } div.message { /*font-family: 'Lato', sans-serif;*/ /*font-size: 22px;*/ /*color: #333332;*/ /*background: #fff;*/ /*line-height: 1.45;*/ /*font-weight: 400;*/ white-space: pre-wrap; /* CSS3 */ white-space: -moz-pre-wrap; /* Firefox */ white-space: -pre-wrap; /* Opera <7 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* IE */ }
div { font-family: 'Open Sans', sans-serif; /*text-transform: form: uppercase;*/ /*font-weight: 700;*/ } div.wrapper { width: 500px; margin: 0 auto; padding-bottom: 20px; } h1.title { text-transform: uppercase; position: static; display: block; font-weight: 800; letter-spacing: 3px; text-decoration: none; text-align: center; font-size: 46px; color: #333; margin-top: 50px; } div#new-message { text-transform: uppercase; letter-spacing: 1px; min-height: 52px !important; border-bottom: 1px solid #eee; padding: 10px 0; margin-bottom: 20px; border-bottom: 1px dashed #ccc; } div.message { /*font-family: 'Lato', sans-serif;*/ /*font-size: 22px;*/ /*color: #333332;*/ /*background: #fff;*/ /*line-height: 1.45;*/ /*font-weight: 400;*/ + white-space: pre-wrap; /* CSS3 */ + white-space: -moz-pre-wrap; /* Firefox */ + white-space: -pre-wrap; /* Opera <7 */ + white-space: -o-pre-wrap; /* Opera 7 */ + word-wrap: break-word; /* IE */ }
5
0.116279
5
0
7fa455e8220fffbec376038e3a665bbfc284d7d3
example/script.js
example/script.js
angular.module('progressButtonDemo', ['progressButton']) .controller('ProgressButtonsCtrl', function($scope, $interval) { $scope.buttons = [ { value: 0.0 }, { value: 0.0 }, { value: 0.0 } ] $scope.simulateProgress = function(buttonIndex, seconds, callback) { if($scope.buttons[buttonIndex].simulating) return $scope.buttons[buttonIndex].simulating = true $scope.buttons[buttonIndex].value = 0.2 var interval = $interval(function() { $scope.buttons[buttonIndex].value += 0.2 if($scope.buttons[buttonIndex].value >= 1.0) { $interval.cancel(interval) if(typeof callback === 'function') callback() } }, (seconds / 5) * 1000) } $scope.generate = function(button) { button.progressTimed(3, function() { $scope.generate = function() { alert('Showing how a callback works!'); } }) } }) .controller('ProgressControlCtrl', function($scope, $timeout) { $scope.controlButton = {} $timeout(function() { $scope.increment = function(value) { $scope.controlButton.progressIncrement(value) } $scope.setTo = function(value) { $scope.controlButton.progressSet(value) } $scope.finish = function() { $scope.controlButton.progressFinish() } }) })
angular.module('progressButtonDemo', ['progressButton']) .controller('ProgressButtonsCtrl', function($scope, $interval) { $scope.buttons = [ { value: 0.0 }, { value: 0.0 }, { value: 0.0 } ] $scope.simulateProgress = function(buttonIndex, seconds, callback) { if($scope.buttons[buttonIndex].simulating) return $scope.buttons[buttonIndex].simulating = true $scope.buttons[buttonIndex].value = 0.2 var interval = $interval(function() { $scope.buttons[buttonIndex].value += 0.2 if($scope.buttons[buttonIndex].value >= 1.0) { $interval.cancel(interval) if(typeof callback === 'function') callback() } }, (seconds / 5) * 1000) } $scope.generate = function(button) { button.progressTimed(3, function() { $scope.generate = function() { alert('Showing how a callback works!'); } }) } }) .controller('ProgressControlCtrl', function($scope) { })
Remove old control button code
Remove old control button code
JavaScript
bsd-2-clause
SonicHedgehog/angular-progress-button,SonicHedgehog/angular-progress-button
javascript
## Code Before: angular.module('progressButtonDemo', ['progressButton']) .controller('ProgressButtonsCtrl', function($scope, $interval) { $scope.buttons = [ { value: 0.0 }, { value: 0.0 }, { value: 0.0 } ] $scope.simulateProgress = function(buttonIndex, seconds, callback) { if($scope.buttons[buttonIndex].simulating) return $scope.buttons[buttonIndex].simulating = true $scope.buttons[buttonIndex].value = 0.2 var interval = $interval(function() { $scope.buttons[buttonIndex].value += 0.2 if($scope.buttons[buttonIndex].value >= 1.0) { $interval.cancel(interval) if(typeof callback === 'function') callback() } }, (seconds / 5) * 1000) } $scope.generate = function(button) { button.progressTimed(3, function() { $scope.generate = function() { alert('Showing how a callback works!'); } }) } }) .controller('ProgressControlCtrl', function($scope, $timeout) { $scope.controlButton = {} $timeout(function() { $scope.increment = function(value) { $scope.controlButton.progressIncrement(value) } $scope.setTo = function(value) { $scope.controlButton.progressSet(value) } $scope.finish = function() { $scope.controlButton.progressFinish() } }) }) ## Instruction: Remove old control button code ## Code After: angular.module('progressButtonDemo', ['progressButton']) .controller('ProgressButtonsCtrl', function($scope, $interval) { $scope.buttons = [ { value: 0.0 }, { value: 0.0 }, { value: 0.0 } ] $scope.simulateProgress = function(buttonIndex, seconds, callback) { if($scope.buttons[buttonIndex].simulating) return $scope.buttons[buttonIndex].simulating = true $scope.buttons[buttonIndex].value = 0.2 var interval = $interval(function() { $scope.buttons[buttonIndex].value += 0.2 if($scope.buttons[buttonIndex].value >= 1.0) { $interval.cancel(interval) if(typeof callback === 'function') callback() } }, (seconds / 5) * 1000) } $scope.generate = function(button) { button.progressTimed(3, function() { $scope.generate = function() { alert('Showing how a callback works!'); } }) } }) .controller('ProgressControlCtrl', function($scope) { })
angular.module('progressButtonDemo', ['progressButton']) .controller('ProgressButtonsCtrl', function($scope, $interval) { $scope.buttons = [ { value: 0.0 }, { value: 0.0 }, { value: 0.0 } ] $scope.simulateProgress = function(buttonIndex, seconds, callback) { if($scope.buttons[buttonIndex].simulating) return $scope.buttons[buttonIndex].simulating = true $scope.buttons[buttonIndex].value = 0.2 var interval = $interval(function() { $scope.buttons[buttonIndex].value += 0.2 if($scope.buttons[buttonIndex].value >= 1.0) { $interval.cancel(interval) if(typeof callback === 'function') callback() } }, (seconds / 5) * 1000) } $scope.generate = function(button) { button.progressTimed(3, function() { $scope.generate = function() { alert('Showing how a callback works!'); } }) } }) - .controller('ProgressControlCtrl', function($scope, $timeout) { ? ---------- + .controller('ProgressControlCtrl', function($scope) { - $scope.controlButton = {} - - $timeout(function() { - $scope.increment = function(value) { - $scope.controlButton.progressIncrement(value) - } - - $scope.setTo = function(value) { - $scope.controlButton.progressSet(value) - } - - $scope.finish = function() { - $scope.controlButton.progressFinish() - } - }) })
17
0.34
1
16
7eca45767c0f5c2baaad96f44c3682be2bfa55f7
bin/sign_and_align_keys.sh
bin/sign_and_align_keys.sh
PROJECT=$1 VERSION=$2 if [[ $# -eq 0 ]]; then echo "No arguments supplied" exit 1 fi # Sign and release the L+ version # Make sure the highest supported version has the biggest version code npx cordova build android --release -- --minSdkVersion=22 cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../config_files/production.keystore ./platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk androidproductionkey ~/Library/Android/sdk/build-tools/30.0.1/zipalign -v 4 platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk $1-build-$2.apk
PROJECT=$1 VERSION=$2 if [[ $# -eq 0 ]]; then echo "No arguments supplied" exit 1 fi # Sign and release the L+ version # Make sure the highest supported version has the biggest version code npx cordova build android --release -- --minSdkVersion=22 # cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.aab platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore ../config_files/production.keystore ./platforms/android/app/build/outputs/bundle/release/app-release.aab androidproductionkey cp platforms/android/app/build/outputs/bundle/release/app-release.aab $1-build-$2.aab # ~/Library/Android/sdk/build-tools/30.0.1/zipalign -v 4 platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk $1-build-$2.apk
Change the build script to work with aab
Change the build script to work with aab Instead of the old apk. This is consistent with requirements that all new apps must be built using aab https://github.com/e-mission/e-mission-docs/issues/680#issuecomment-947017212
Shell
bsd-3-clause
shankari/e-mission-phone,shankari/e-mission-phone,e-mission/e-mission-phone,e-mission/e-mission-phone,e-mission/e-mission-phone,shankari/e-mission-phone,e-mission/e-mission-phone,shankari/e-mission-phone
shell
## Code Before: PROJECT=$1 VERSION=$2 if [[ $# -eq 0 ]]; then echo "No arguments supplied" exit 1 fi # Sign and release the L+ version # Make sure the highest supported version has the biggest version code npx cordova build android --release -- --minSdkVersion=22 cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../config_files/production.keystore ./platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk androidproductionkey ~/Library/Android/sdk/build-tools/30.0.1/zipalign -v 4 platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk $1-build-$2.apk ## Instruction: Change the build script to work with aab Instead of the old apk. This is consistent with requirements that all new apps must be built using aab https://github.com/e-mission/e-mission-docs/issues/680#issuecomment-947017212 ## Code After: PROJECT=$1 VERSION=$2 if [[ $# -eq 0 ]]; then echo "No arguments supplied" exit 1 fi # Sign and release the L+ version # Make sure the highest supported version has the biggest version code npx cordova build android --release -- --minSdkVersion=22 # cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.aab platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore ../config_files/production.keystore ./platforms/android/app/build/outputs/bundle/release/app-release.aab androidproductionkey cp platforms/android/app/build/outputs/bundle/release/app-release.aab $1-build-$2.aab # ~/Library/Android/sdk/build-tools/30.0.1/zipalign -v 4 platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk $1-build-$2.apk
PROJECT=$1 VERSION=$2 if [[ $# -eq 0 ]]; then echo "No arguments supplied" exit 1 fi # Sign and release the L+ version # Make sure the highest supported version has the biggest version code npx cordova build android --release -- --minSdkVersion=22 - cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk ? ^^ + # cp platforms/android/app/build/outputs/apk/release/app-release-unsigned.aab platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk ? ++ ^^ - jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../config_files/production.keystore ./platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk androidproductionkey ? ^ ^ ^^ ----------------- ^^ + jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore ../config_files/production.keystore ./platforms/android/app/build/outputs/bundle/release/app-release.aab androidproductionkey ? ^^^ ^^^^ +++++++++++ ^^ ^^ + cp platforms/android/app/build/outputs/bundle/release/app-release.aab $1-build-$2.aab - ~/Library/Android/sdk/build-tools/30.0.1/zipalign -v 4 platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk $1-build-$2.apk + # ~/Library/Android/sdk/build-tools/30.0.1/zipalign -v 4 platforms/android/app/build/outputs/apk/app-release-signed-unaligned.apk $1-build-$2.apk ? ++
7
0.466667
4
3
f012395e51d3406a20b83f6d1f919415c0e994f0
src/ImgixServiceProvider.php
src/ImgixServiceProvider.php
<?php namespace Nasyrov\Laravel\Imgix; use Illuminate\Support\ServiceProvider; use Imgix\ShardStrategy; use Imgix\UrlBuilder; class ImgixServiceProvider extends ServiceProvider { const ALIAS = 'imgix'; /** * Bootstrap any application services. */ public function boot() { $configFile = dirname(__DIR__) . '/config/imgix.php'; $this->mergeConfigFrom($configFile, static::ALIAS); $this->publishes([ $configFile => config_path('imgix.php'), ], 'imgix'); } /** * Register any application services. */ public function register() { $this->app->singleton(UrlBuilder::class, function () { return new UrlBuilder( config('imgix.domains', []), config('imgix.useHttps', false), config('imgix.signKey', ''), config('imgix.shardStrategy', ShardStrategy::CRC), config('imgix.includeLibraryParam', true) ); }); $this->app->singleton(Imgix::class, function ($app) { return new Imgix($app[UrlBuilder::class]); }); $this->app->alias(Imgix::class, static::ALIAS); } }
<?php namespace Nasyrov\Laravel\Imgix; use Illuminate\Support\ServiceProvider; use Imgix\ShardStrategy; use Imgix\UrlBuilder; class ImgixServiceProvider extends ServiceProvider { const ALIAS = 'imgix'; /** * Bootstrap any application services. */ public function boot() { $configFile = dirname(__DIR__) . '/config/imgix.php'; $this->mergeConfigFrom($configFile, static::ALIAS); $this->publishes([ $configFile => config_path('imgix.php'), ], static::ALIAS); } /** * Register any application services. */ public function register() { $this->app->singleton(UrlBuilder::class, function () { return new UrlBuilder( config('imgix.domains'), config('imgix.useHttps', false), config('imgix.signKey', ''), config('imgix.shardStrategy', ShardStrategy::CRC), config('imgix.includeLibraryParam', true) ); }); $this->app->singleton(Imgix::class, function ($app) { return new Imgix($app[UrlBuilder::class]); }); $this->app->alias(Imgix::class, static::ALIAS); } }
Remove default value for domain configuration
Remove default value for domain configuration
PHP
mit
nasyrov/laravel-imgix
php
## Code Before: <?php namespace Nasyrov\Laravel\Imgix; use Illuminate\Support\ServiceProvider; use Imgix\ShardStrategy; use Imgix\UrlBuilder; class ImgixServiceProvider extends ServiceProvider { const ALIAS = 'imgix'; /** * Bootstrap any application services. */ public function boot() { $configFile = dirname(__DIR__) . '/config/imgix.php'; $this->mergeConfigFrom($configFile, static::ALIAS); $this->publishes([ $configFile => config_path('imgix.php'), ], 'imgix'); } /** * Register any application services. */ public function register() { $this->app->singleton(UrlBuilder::class, function () { return new UrlBuilder( config('imgix.domains', []), config('imgix.useHttps', false), config('imgix.signKey', ''), config('imgix.shardStrategy', ShardStrategy::CRC), config('imgix.includeLibraryParam', true) ); }); $this->app->singleton(Imgix::class, function ($app) { return new Imgix($app[UrlBuilder::class]); }); $this->app->alias(Imgix::class, static::ALIAS); } } ## Instruction: Remove default value for domain configuration ## Code After: <?php namespace Nasyrov\Laravel\Imgix; use Illuminate\Support\ServiceProvider; use Imgix\ShardStrategy; use Imgix\UrlBuilder; class ImgixServiceProvider extends ServiceProvider { const ALIAS = 'imgix'; /** * Bootstrap any application services. */ public function boot() { $configFile = dirname(__DIR__) . '/config/imgix.php'; $this->mergeConfigFrom($configFile, static::ALIAS); $this->publishes([ $configFile => config_path('imgix.php'), ], static::ALIAS); } /** * Register any application services. */ public function register() { $this->app->singleton(UrlBuilder::class, function () { return new UrlBuilder( config('imgix.domains'), config('imgix.useHttps', false), config('imgix.signKey', ''), config('imgix.shardStrategy', ShardStrategy::CRC), config('imgix.includeLibraryParam', true) ); }); $this->app->singleton(Imgix::class, function ($app) { return new Imgix($app[UrlBuilder::class]); }); $this->app->alias(Imgix::class, static::ALIAS); } }
<?php namespace Nasyrov\Laravel\Imgix; use Illuminate\Support\ServiceProvider; use Imgix\ShardStrategy; use Imgix\UrlBuilder; class ImgixServiceProvider extends ServiceProvider { const ALIAS = 'imgix'; /** * Bootstrap any application services. */ public function boot() { $configFile = dirname(__DIR__) . '/config/imgix.php'; $this->mergeConfigFrom($configFile, static::ALIAS); $this->publishes([ $configFile => config_path('imgix.php'), - ], 'imgix'); + ], static::ALIAS); } /** * Register any application services. */ public function register() { $this->app->singleton(UrlBuilder::class, function () { return new UrlBuilder( - config('imgix.domains', []), ? ---- + config('imgix.domains'), config('imgix.useHttps', false), config('imgix.signKey', ''), config('imgix.shardStrategy', ShardStrategy::CRC), config('imgix.includeLibraryParam', true) ); }); $this->app->singleton(Imgix::class, function ($app) { return new Imgix($app[UrlBuilder::class]); }); $this->app->alias(Imgix::class, static::ALIAS); } }
4
0.083333
2
2
b87cdc21595c7d90efdc75e3df985baf895881ce
app/views/public_activity/coursewareable_membership/_create.html.haml
app/views/public_activity/coursewareable_membership/_create.html.haml
%span.timestamp = activity.created_at.to_s(:pretty) %p{ :class => activity.key.parameterize } - classroom_link = link_to(_('classroom'), root_url(:subdomain => activity.recipient.slug)) - if activity.trackable and activity.trackable.user == p[:current_user] - name = _('you') - else - name = activity.trackable.user.name - if activity.owner == p[:current_user] = _('You added %s to %s members.' % [name, classroom_link]) - else = _('%s added %s to %s members.' % [activity.owner.name, name, classroom_link]) %hr
%span.timestamp = activity.created_at.to_s(:pretty) %p{ :class => activity.key.parameterize } - classroom_link = link_to(_('classroom'), root_url(:subdomain => activity.recipient.slug)) - if activity.trackable and activity.trackable.user == p[:current_user] - name = _('you') - else - name = activity.parameters[:user_name] - if activity.owner == p[:current_user] = _('You added %s to %s members.' % [name, classroom_link]) - else = _('%s added %s to %s members.' % [activity.owner.name, name, classroom_link]) %hr
Use cached parameter instead of calling the deleted object.
Use cached parameter instead of calling the deleted object.
Haml
mit
Courseware/coursewa.re,Courseware/coursewa.re
haml
## Code Before: %span.timestamp = activity.created_at.to_s(:pretty) %p{ :class => activity.key.parameterize } - classroom_link = link_to(_('classroom'), root_url(:subdomain => activity.recipient.slug)) - if activity.trackable and activity.trackable.user == p[:current_user] - name = _('you') - else - name = activity.trackable.user.name - if activity.owner == p[:current_user] = _('You added %s to %s members.' % [name, classroom_link]) - else = _('%s added %s to %s members.' % [activity.owner.name, name, classroom_link]) %hr ## Instruction: Use cached parameter instead of calling the deleted object. ## Code After: %span.timestamp = activity.created_at.to_s(:pretty) %p{ :class => activity.key.parameterize } - classroom_link = link_to(_('classroom'), root_url(:subdomain => activity.recipient.slug)) - if activity.trackable and activity.trackable.user == p[:current_user] - name = _('you') - else - name = activity.parameters[:user_name] - if activity.owner == p[:current_user] = _('You added %s to %s members.' % [name, classroom_link]) - else = _('%s added %s to %s members.' % [activity.owner.name, name, classroom_link]) %hr
%span.timestamp = activity.created_at.to_s(:pretty) %p{ :class => activity.key.parameterize } - classroom_link = link_to(_('classroom'), root_url(:subdomain => activity.recipient.slug)) - if activity.trackable and activity.trackable.user == p[:current_user] - name = _('you') - else - - name = activity.trackable.user.name ? ^ ^^^^^ ^ ^ + - name = activity.parameters[:user_name] ? ^^ ^ ^^^^^^ ^ + - if activity.owner == p[:current_user] = _('You added %s to %s members.' % [name, classroom_link]) - else = _('%s added %s to %s members.' % [activity.owner.name, name, classroom_link]) %hr
2
0.117647
1
1
f22a68298fa0196e0607b3c269eef81967d7c2fa
launcher/electron/app/backend-runner.js
launcher/electron/app/backend-runner.js
module.exports = (function() { var path = require('path'); // var java_home = path.resolve(__dirname + '/../jre/Contents/Home'); // var java_home = path.resolve(__dirname + '/../jre'); var ReadLine = require('readline'); var spawn = require('child_process').spawn; var events = require('events'); var os = require('os'); return { startNew: function() { var url; var hash; var eventEmitter = new events.EventEmitter(); var osName = os.type(); if (osName.startsWith('Windows')){ backend = spawn(path.resolve(__dirname + '/../dist/beaker.command.bat'), ['--open-browser', 'false']); } else { backend = spawn(path.resolve(__dirname + '/../dist/beaker.command'), ['--open-browser', 'false']); } // process.env['JAVA_HOME'] = java_home; // backend = spawn(path.resolve(__dirname + '/../dist/beaker.command'), ['--open-browser', 'false']); var rl = ReadLine.createInterface({ input: backend.stdout }); rl.on('line', function(line) { console.log(line); // Pipe backend's stdout to electron's stdout if (line.startsWith('Beaker hash')){ backend.hash = line.split(' ')[2]; } else if (line.startsWith('Beaker listening on')){ backend.url = line.split(' ')[3]; backend.local = true; eventEmitter.emit('ready', backend); } }); return eventEmitter; } } })();
module.exports = (function() { var path = require('path'); var ReadLine = require('readline'); var spawn = require('child_process').spawn; var events = require('events'); var os = require('os'); return { startNew: function() { var url; var hash; var eventEmitter = new events.EventEmitter(); var osName = os.type(); if (osName.startsWith('Windows')){ process.env['JAVA_HOME'] = path.resolve(__dirname + '/../jre'); backend = spawn(path.resolve(__dirname + '/../dist/beaker.command.bat'), ['--open-browser', 'false']); } else if (osName.startsWith('Darwin')) { process.env['JAVA_HOME'] = path.resolve(__dirname + '/../jre/Contents/Home'); backend = spawn(path.resolve(__dirname + '/../dist/beaker.command'), ['--open-browser', 'false']); } var rl = ReadLine.createInterface({ input: backend.stdout }); rl.on('line', function(line) { console.log(line); // Pipe backend's stdout to electron's stdout if (line.startsWith('Beaker hash')){ backend.hash = line.split(' ')[2]; } else if (line.startsWith('Beaker listening on')){ backend.url = line.split(' ')[3]; backend.local = true; eventEmitter.emit('ready', backend); } }); return eventEmitter; } } })();
Set java_home correctly for each OS
Set java_home correctly for each OS
JavaScript
apache-2.0
sirinath/beaker-notebook,codeaudit/beaker-notebook,ScottPJones/beaker-notebook,codeaudit/beaker-notebook,Chasego/beaker-notebook,Chasego/beaker-notebook,vital-ai/beaker-notebook,brosander/beaker-notebook,gef756/beaker-notebook,vital-ai/beaker-notebook,Chasego/beaker-notebook,codeaudit/beaker-notebook,Chasego/beaker-notebook,ScottPJones/beaker-notebook,gef756/beaker-notebook,gef756/beaker-notebook,brosander/beaker-notebook,Chasego/beaker-notebook,maxyeg/beaker-notebook,ScottPJones/beaker-notebook,bradparks/beaker-notebook,maxyeg/beaker-notebook,Chasego/beaker-notebook,ScottPJones/beaker-notebook,mattyb149/beaker-notebook,brosander/beaker-notebook,Chasego/beaker-notebook,sirinath/beaker-notebook,mattyb149/beaker-notebook,maxyeg/beaker-notebook,maxyeg/beaker-notebook,brosander/beaker-notebook,vital-ai/beaker-notebook,bradparks/beaker-notebook,bradparks/beaker-notebook,gef756/beaker-notebook,sirinath/beaker-notebook,bradparks/beaker-notebook,codeaudit/beaker-notebook,brosander/beaker-notebook,maxyeg/beaker-notebook,brosander/beaker-notebook,mattyb149/beaker-notebook,mattyb149/beaker-notebook,mattyb149/beaker-notebook,gef756/beaker-notebook,sirinath/beaker-notebook,bradparks/beaker-notebook,sirinath/beaker-notebook,ScottPJones/beaker-notebook,bradparks/beaker-notebook,mattyb149/beaker-notebook,codeaudit/beaker-notebook,codeaudit/beaker-notebook,vital-ai/beaker-notebook,gef756/beaker-notebook,gef756/beaker-notebook,sirinath/beaker-notebook,brosander/beaker-notebook,bradparks/beaker-notebook,sirinath/beaker-notebook,vital-ai/beaker-notebook,vital-ai/beaker-notebook,vital-ai/beaker-notebook,maxyeg/beaker-notebook,mattyb149/beaker-notebook
javascript
## Code Before: module.exports = (function() { var path = require('path'); // var java_home = path.resolve(__dirname + '/../jre/Contents/Home'); // var java_home = path.resolve(__dirname + '/../jre'); var ReadLine = require('readline'); var spawn = require('child_process').spawn; var events = require('events'); var os = require('os'); return { startNew: function() { var url; var hash; var eventEmitter = new events.EventEmitter(); var osName = os.type(); if (osName.startsWith('Windows')){ backend = spawn(path.resolve(__dirname + '/../dist/beaker.command.bat'), ['--open-browser', 'false']); } else { backend = spawn(path.resolve(__dirname + '/../dist/beaker.command'), ['--open-browser', 'false']); } // process.env['JAVA_HOME'] = java_home; // backend = spawn(path.resolve(__dirname + '/../dist/beaker.command'), ['--open-browser', 'false']); var rl = ReadLine.createInterface({ input: backend.stdout }); rl.on('line', function(line) { console.log(line); // Pipe backend's stdout to electron's stdout if (line.startsWith('Beaker hash')){ backend.hash = line.split(' ')[2]; } else if (line.startsWith('Beaker listening on')){ backend.url = line.split(' ')[3]; backend.local = true; eventEmitter.emit('ready', backend); } }); return eventEmitter; } } })(); ## Instruction: Set java_home correctly for each OS ## Code After: module.exports = (function() { var path = require('path'); var ReadLine = require('readline'); var spawn = require('child_process').spawn; var events = require('events'); var os = require('os'); return { startNew: function() { var url; var hash; var eventEmitter = new events.EventEmitter(); var osName = os.type(); if (osName.startsWith('Windows')){ process.env['JAVA_HOME'] = path.resolve(__dirname + '/../jre'); backend = spawn(path.resolve(__dirname + '/../dist/beaker.command.bat'), ['--open-browser', 'false']); } else if (osName.startsWith('Darwin')) { process.env['JAVA_HOME'] = path.resolve(__dirname + '/../jre/Contents/Home'); backend = spawn(path.resolve(__dirname + '/../dist/beaker.command'), ['--open-browser', 'false']); } var rl = ReadLine.createInterface({ input: backend.stdout }); rl.on('line', function(line) { console.log(line); // Pipe backend's stdout to electron's stdout if (line.startsWith('Beaker hash')){ backend.hash = line.split(' ')[2]; } else if (line.startsWith('Beaker listening on')){ backend.url = line.split(' ')[3]; backend.local = true; eventEmitter.emit('ready', backend); } }); return eventEmitter; } } })();
module.exports = (function() { var path = require('path'); - // var java_home = path.resolve(__dirname + '/../jre/Contents/Home'); - // var java_home = path.resolve(__dirname + '/../jre'); var ReadLine = require('readline'); var spawn = require('child_process').spawn; var events = require('events'); var os = require('os'); return { startNew: function() { var url; var hash; var eventEmitter = new events.EventEmitter(); var osName = os.type(); if (osName.startsWith('Windows')){ + process.env['JAVA_HOME'] = path.resolve(__dirname + '/../jre'); backend = spawn(path.resolve(__dirname + '/../dist/beaker.command.bat'), ['--open-browser', 'false']); - } else { + } else if (osName.startsWith('Darwin')) { + process.env['JAVA_HOME'] = path.resolve(__dirname + '/../jre/Contents/Home'); backend = spawn(path.resolve(__dirname + '/../dist/beaker.command'), ['--open-browser', 'false']); } - // process.env['JAVA_HOME'] = java_home; - // backend = spawn(path.resolve(__dirname + '/../dist/beaker.command'), ['--open-browser', 'false']); var rl = ReadLine.createInterface({ input: backend.stdout }); rl.on('line', function(line) { console.log(line); // Pipe backend's stdout to electron's stdout if (line.startsWith('Beaker hash')){ backend.hash = line.split(' ')[2]; } else if (line.startsWith('Beaker listening on')){ backend.url = line.split(' ')[3]; backend.local = true; eventEmitter.emit('ready', backend); } }); return eventEmitter; } } })();
8
0.181818
3
5
a8adae0e0b205835f2aa248fd26c54767836b834
resources/css/src/component/_off-canvas.scss
resources/css/src/component/_off-canvas.scss
.off-canvas { .off-canvas-logo { @include xy-gutters($gutters: $grid-margin-gutters, $gutter-type: margin); height: rem-calc(30); margin-top: 1rem; margin-bottom: 1rem; } .off-canvas-core-nav, .off-canvas-account-nav { li { a { padding: 1rem; border-top: 1px solid $medium-gray; &.button { font-size: inherit; } } ul { a { border-top: 1px dashed $medium-gray; } } } } .off-canvas-custom-nav { > ul { @include menu-base; @include menu-direction($dir: vertical); li { a { padding: 1rem; border-top: 1px solid $medium-gray; } } } } }
.off-canvas { .off-canvas-logo { @include xy-gutters($gutters: $grid-margin-gutters, $gutter-type: margin); height: rem-calc(30); margin-top: 1rem; margin-bottom: 1rem; } .off-canvas-core-nav, .off-canvas-account-nav { li { a { padding: 1rem; border-top: 1px solid $medium-gray; &.button { font-size: inherit; } } ul { a { border-top: 1px dashed $medium-gray; } } } } .off-canvas-account-nav { border-bottom: 1px solid $medium-gray; } .off-canvas-custom-nav { > ul { @include menu-base; @include menu-direction($dir: vertical); li { a { padding: 1rem; border-top: 1px solid $medium-gray; } } } } }
Fix styling of off-canvas menu
Fix styling of off-canvas menu
SCSS
mit
lemonstand/lscloud-theme-bones,lemonstand/lscloud-theme-bones
scss
## Code Before: .off-canvas { .off-canvas-logo { @include xy-gutters($gutters: $grid-margin-gutters, $gutter-type: margin); height: rem-calc(30); margin-top: 1rem; margin-bottom: 1rem; } .off-canvas-core-nav, .off-canvas-account-nav { li { a { padding: 1rem; border-top: 1px solid $medium-gray; &.button { font-size: inherit; } } ul { a { border-top: 1px dashed $medium-gray; } } } } .off-canvas-custom-nav { > ul { @include menu-base; @include menu-direction($dir: vertical); li { a { padding: 1rem; border-top: 1px solid $medium-gray; } } } } } ## Instruction: Fix styling of off-canvas menu ## Code After: .off-canvas { .off-canvas-logo { @include xy-gutters($gutters: $grid-margin-gutters, $gutter-type: margin); height: rem-calc(30); margin-top: 1rem; margin-bottom: 1rem; } .off-canvas-core-nav, .off-canvas-account-nav { li { a { padding: 1rem; border-top: 1px solid $medium-gray; &.button { font-size: inherit; } } ul { a { border-top: 1px dashed $medium-gray; } } } } .off-canvas-account-nav { border-bottom: 1px solid $medium-gray; } .off-canvas-custom-nav { > ul { @include menu-base; @include menu-direction($dir: vertical); li { a { padding: 1rem; border-top: 1px solid $medium-gray; } } } } }
.off-canvas { .off-canvas-logo { @include xy-gutters($gutters: $grid-margin-gutters, $gutter-type: margin); height: rem-calc(30); margin-top: 1rem; margin-bottom: 1rem; } .off-canvas-core-nav, .off-canvas-account-nav { li { a { padding: 1rem; border-top: 1px solid $medium-gray; &.button { font-size: inherit; } } ul { a { border-top: 1px dashed $medium-gray; } } } } + .off-canvas-account-nav { + border-bottom: 1px solid $medium-gray; + } + .off-canvas-custom-nav { > ul { @include menu-base; @include menu-direction($dir: vertical); li { a { padding: 1rem; border-top: 1px solid $medium-gray; } } } } }
4
0.095238
4
0
34ba50041491e714b1a044c474830ebcf331ef93
lib/faraday/parse.rb
lib/faraday/parse.rb
module Faraday class Response::Parse < Response::Middleware begin require 'multi_json' require 'multi_xml' rescue LoadError, NameError => error self.load_error = error end def self.register_on_complete(env) env[:response].on_complete do |response| response[:body] = begin case response[:response_headers]['content-type'] when /application\/json/ parse_json(response[:body]) when /application\/xml/ parse_xml(response[:body]) else '' end end end end def initialize(app) super @parser = nil end private def self.parse_json(response_body) case response_body when '' nil when 'true' true when 'false' false else ::MultiJson.decode(response_body) end end def self.parse_xml(response_body) ::MultiXml.parse(response_body) end end end
module Faraday class Response::Parse < Response::Middleware begin require 'multi_json' require 'multi_xml' rescue LoadError, NameError => error self.load_error = error end def self.register_on_complete(env) env[:response].on_complete do |response| response[:body] = begin case response[:response_headers].values_at('content-type', 'Content-Type').first when /application\/json/ parse_json(response[:body]) when /application\/xml/ parse_xml(response[:body]) else '' end end end end def initialize(app) super @parser = nil end private def self.parse_json(response_body) case response_body when '' nil when 'true' true when 'false' false else ::MultiJson.decode(response_body) end end def self.parse_xml(response_body) ::MultiXml.parse(response_body) end end end
Allow capitalized content-type response header
Allow capitalized content-type response header
Ruby
mit
ShaneWilton/faraday_middleware,pferdefleisch/faraday_middleware,austinrfnd/faraday_middleware,austinrfnd/faraday_middleware,h4ck3rm1k3/faraday_middleware,lostisland/faraday_middleware,pferdefleisch/faraday_middleware,h4ck3rm1k3/faraday_middleware,lostisland/faraday_middleware,ShaneWilton/faraday_middleware,tinfoil/faraday_middleware,tinfoil/faraday_middleware
ruby
## Code Before: module Faraday class Response::Parse < Response::Middleware begin require 'multi_json' require 'multi_xml' rescue LoadError, NameError => error self.load_error = error end def self.register_on_complete(env) env[:response].on_complete do |response| response[:body] = begin case response[:response_headers]['content-type'] when /application\/json/ parse_json(response[:body]) when /application\/xml/ parse_xml(response[:body]) else '' end end end end def initialize(app) super @parser = nil end private def self.parse_json(response_body) case response_body when '' nil when 'true' true when 'false' false else ::MultiJson.decode(response_body) end end def self.parse_xml(response_body) ::MultiXml.parse(response_body) end end end ## Instruction: Allow capitalized content-type response header ## Code After: module Faraday class Response::Parse < Response::Middleware begin require 'multi_json' require 'multi_xml' rescue LoadError, NameError => error self.load_error = error end def self.register_on_complete(env) env[:response].on_complete do |response| response[:body] = begin case response[:response_headers].values_at('content-type', 'Content-Type').first when /application\/json/ parse_json(response[:body]) when /application\/xml/ parse_xml(response[:body]) else '' end end end end def initialize(app) super @parser = nil end private def self.parse_json(response_body) case response_body when '' nil when 'true' true when 'false' false else ::MultiJson.decode(response_body) end end def self.parse_xml(response_body) ::MultiXml.parse(response_body) end end end
module Faraday class Response::Parse < Response::Middleware begin require 'multi_json' require 'multi_xml' rescue LoadError, NameError => error self.load_error = error end def self.register_on_complete(env) env[:response].on_complete do |response| response[:body] = begin - case response[:response_headers]['content-type'] ? ^ ^ + case response[:response_headers].values_at('content-type', 'Content-Type').first ? ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ when /application\/json/ parse_json(response[:body]) when /application\/xml/ parse_xml(response[:body]) else '' end end end end def initialize(app) super @parser = nil end private def self.parse_json(response_body) case response_body when '' nil when 'true' true when 'false' false else ::MultiJson.decode(response_body) end end def self.parse_xml(response_body) ::MultiXml.parse(response_body) end end end
2
0.040816
1
1
be5ff5772deaa4520234ef0d08a05aca5a2c892b
tests/integration.sh
tests/integration.sh
errors=0 error_handler () { (( errors++ )) } trap error_handler ERR # Run a Stencila Docker container which provides all external language contexts docker run --detach --publish 2100:2000 stencila/alpha sleep 5 # Configured using Docker container as only peer STENCILA_PEERS=http://localhost:2100 node tools/runner.js tests/documents/external-language-cells.html # Configured using peer dicovery STENCILA_DISCOVER=30 node tools/runner.js tests/documents/external-language-cells.html # Exit with number of errors exit $errors
errors=0 error_handler () { (( errors++ )) } trap error_handler ERR # Run a Stencila Docker container which provides a Node Host (as have in Desktop) docker run --detach --publish 2000:2000 stencila/iota # Run a Stencila Docker container which provides several language Hosts docker run --detach --publish 2100:2000 stencila/alpha sleep 5 # Configured using one of the containers as only peer STENCILA_PEERS=http://localhost:2100 node tools/runner.js tests/documents/external-language-cells.html # Configured using peer dicovery (this is current configuration for Desktop) STENCILA_DISCOVER=30 node tools/runner.js tests/documents/external-language-cells.html # Exit with number of errors exit $errors
Make tests more like Desktop setup (multiple peers)
Make tests more like Desktop setup (multiple peers)
Shell
apache-2.0
stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila,stencila/stencila
shell
## Code Before: errors=0 error_handler () { (( errors++ )) } trap error_handler ERR # Run a Stencila Docker container which provides all external language contexts docker run --detach --publish 2100:2000 stencila/alpha sleep 5 # Configured using Docker container as only peer STENCILA_PEERS=http://localhost:2100 node tools/runner.js tests/documents/external-language-cells.html # Configured using peer dicovery STENCILA_DISCOVER=30 node tools/runner.js tests/documents/external-language-cells.html # Exit with number of errors exit $errors ## Instruction: Make tests more like Desktop setup (multiple peers) ## Code After: errors=0 error_handler () { (( errors++ )) } trap error_handler ERR # Run a Stencila Docker container which provides a Node Host (as have in Desktop) docker run --detach --publish 2000:2000 stencila/iota # Run a Stencila Docker container which provides several language Hosts docker run --detach --publish 2100:2000 stencila/alpha sleep 5 # Configured using one of the containers as only peer STENCILA_PEERS=http://localhost:2100 node tools/runner.js tests/documents/external-language-cells.html # Configured using peer dicovery (this is current configuration for Desktop) STENCILA_DISCOVER=30 node tools/runner.js tests/documents/external-language-cells.html # Exit with number of errors exit $errors
errors=0 error_handler () { (( errors++ )) } trap error_handler ERR + # Run a Stencila Docker container which provides a Node Host (as have in Desktop) + docker run --detach --publish 2000:2000 stencila/iota - # Run a Stencila Docker container which provides all external language contexts ? ^^^^ ^^ - ^ ^^^^ + # Run a Stencila Docker container which provides several language Hosts ? ^ ^ ^ ^ docker run --detach --publish 2100:2000 stencila/alpha + sleep 5 - # Configured using Docker container as only peer ? - ^^ ^ + # Configured using one of the containers as only peer ? ^ ^^^^^^^ + STENCILA_PEERS=http://localhost:2100 node tools/runner.js tests/documents/external-language-cells.html - # Configured using peer dicovery + # Configured using peer dicovery (this is current configuration for Desktop) STENCILA_DISCOVER=30 node tools/runner.js tests/documents/external-language-cells.html # Exit with number of errors exit $errors
9
0.45
6
3
808c6ab29d5f4d17822d7f9819390af1e4521439
_pages/tutorials/googlesites/index.md
_pages/tutorials/googlesites/index.md
--- layout: default title: Google Sites --- This page will contain the tips and tricks I am picking up in building this site. See below for miscellany; see the left bar for more involved write-ups. - As of when I created this site, Google Sites did not support LaTeX, nor did it have any plans to do so. [Workaround](http://www.codecogs.com/latex/eqneditor.php)! - The slideshow on my home page was based on [this tutorial](http://www.steegle.com/websites/google-sites-howtos/docs-presentation-slider-gadget).
--- layout: default title: Google Sites --- This page will contain the tips and tricks I am picking up in building this site. See below for miscellany; see the left bar for more involved write-ups. - As of when I created this site, Google Sites did not support LaTeX, nor did it have any plans to do so. [Workaround](http://www.codecogs.com/latex/eqneditor.php)! - The slideshow on my home page was based on [this tutorial](http://www.steegle.com/websites/google-sites-howtos/docs-presentation-slider-gadget). I have since converted my google site to Jekyll using the instructions from - http://candland.net/2016/02/16/migrate-google-sites-to-jekyll.html Note that I: - Leveraged https://github.com/olbat/docker-debian-ruby-nokogiri and replaced reverse_markdown with docker run -i <image tag> reverse_markdown - Had to install ack (http://beyondgrep.com/install/) and tidy (via apt) - Was still left with a decent amount of cleanup to do
Add quick notes on Jekyll conversion
Add quick notes on Jekyll conversion
Markdown
mit
taylor-peterson/taylor-peterson.github.io,taylor-peterson/taylor-peterson.github.io
markdown
## Code Before: --- layout: default title: Google Sites --- This page will contain the tips and tricks I am picking up in building this site. See below for miscellany; see the left bar for more involved write-ups. - As of when I created this site, Google Sites did not support LaTeX, nor did it have any plans to do so. [Workaround](http://www.codecogs.com/latex/eqneditor.php)! - The slideshow on my home page was based on [this tutorial](http://www.steegle.com/websites/google-sites-howtos/docs-presentation-slider-gadget). ## Instruction: Add quick notes on Jekyll conversion ## Code After: --- layout: default title: Google Sites --- This page will contain the tips and tricks I am picking up in building this site. See below for miscellany; see the left bar for more involved write-ups. - As of when I created this site, Google Sites did not support LaTeX, nor did it have any plans to do so. [Workaround](http://www.codecogs.com/latex/eqneditor.php)! - The slideshow on my home page was based on [this tutorial](http://www.steegle.com/websites/google-sites-howtos/docs-presentation-slider-gadget). I have since converted my google site to Jekyll using the instructions from - http://candland.net/2016/02/16/migrate-google-sites-to-jekyll.html Note that I: - Leveraged https://github.com/olbat/docker-debian-ruby-nokogiri and replaced reverse_markdown with docker run -i <image tag> reverse_markdown - Had to install ack (http://beyondgrep.com/install/) and tidy (via apt) - Was still left with a decent amount of cleanup to do
--- layout: default title: Google Sites --- - This page will contain the tips and tricks I am picking up in building this site. See below for miscellany; see the left bar for more involved write-ups. + This page will contain the tips and tricks I am picking up in building this + site. See below for miscellany; see the left bar for more involved write-ups. - - As of when I created this site, Google Sites did not support LaTeX, nor did it have any plans to do so. [Workaround](http://www.codecogs.com/latex/eqneditor.php)! + - As of when I created this site, Google Sites did not support LaTeX, nor did + it have any plans to do so. + [Workaround](http://www.codecogs.com/latex/eqneditor.php)! + - The slideshow on my home page was based on [this - - The slideshow on my home page was based on [this tutorial](http://www.steegle.com/websites/google-sites-howtos/docs-presentation-slider-gadget). ? --------------------------------------------------- + tutorial](http://www.steegle.com/websites/google-sites-howtos/docs-presentation-slider-gadget). + + I have since converted my google site to Jekyll using the instructions from + - http://candland.net/2016/02/16/migrate-google-sites-to-jekyll.html + + Note that I: + - Leveraged https://github.com/olbat/docker-debian-ruby-nokogiri and replaced + reverse_markdown with docker run -i <image tag> reverse_markdown + - Had to install ack (http://beyondgrep.com/install/) and tidy (via apt) + - Was still left with a decent amount of cleanup to do
19
2.111111
16
3
429751a12dc91cdfaac87936cb922c5e8187528f
source/css/sensuapp.scss
source/css/sensuapp.scss
// Twitter Bootstrap @import "bootstrap"; @import "octicons/octicons"; @import "//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"; @import "index"; .note { display: block; background-color: #d5e9f6; margin: 14px 0; padding: 14px; border-radius: 4px; } .ubuntu { color: #DD4814; } .ubuntu > i { padding-right: 7px; } .centos { color: #204C8D; } .centos > i { padding-right: 7px; }
// Twitter Bootstrap @import "bootstrap"; @import "octicons/octicons"; @import "//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"; @import "index"; pre { border: none !important; } .note { display: block; background-color: #d5e9f6; margin: 14px 0; padding: 14px; border-radius: 4px; } .ubuntu { color: #DD4814; } .ubuntu > i { padding-right: 7px; } .centos { color: #204C8D; } .centos > i { padding-right: 7px; }
Remove borders from code blocks
Remove borders from code blocks
SCSS
mit
mahata/sensu-docs,mahata/sensu-docs,opinionlab/sensu-docs,jaimegago/sensu-docs,18672222629/sensu-docs,danf22/sensu-docs,18672222629/sensu-docs,edholland/sensu-docs,danf22/sensu-docs,danf22/sensu-docs,opinionlab/sensu-docs,edholland/sensu-docs,jaimegago/sensu-docs,palourde/sensu-docs,yonglehou/sensu-docs,portertech/sensu-docs,dpetzel/sensu-docs,dpetzel/sensu-docs,dpetzel/sensu-docs,yonglehou/sensu-docs,solarkennedy/sensu-docs,solarkennedy/sensu-docs,jaimegago/sensu-docs,mahata/sensu-docs,18672222629/sensu-docs,yonglehou/sensu-docs,portertech/sensu-docs,yonglehou/sensu-docs,opinionlab/sensu-docs,opinionlab/sensu-docs,palourde/sensu-docs,portertech/sensu-docs,18672222629/sensu-docs,solarkennedy/sensu-docs,mahata/sensu-docs,danf22/sensu-docs,edholland/sensu-docs,dpetzel/sensu-docs,edholland/sensu-docs,solarkennedy/sensu-docs,jaimegago/sensu-docs,portertech/sensu-docs
scss
## Code Before: // Twitter Bootstrap @import "bootstrap"; @import "octicons/octicons"; @import "//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"; @import "index"; .note { display: block; background-color: #d5e9f6; margin: 14px 0; padding: 14px; border-radius: 4px; } .ubuntu { color: #DD4814; } .ubuntu > i { padding-right: 7px; } .centos { color: #204C8D; } .centos > i { padding-right: 7px; } ## Instruction: Remove borders from code blocks ## Code After: // Twitter Bootstrap @import "bootstrap"; @import "octicons/octicons"; @import "//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"; @import "index"; pre { border: none !important; } .note { display: block; background-color: #d5e9f6; margin: 14px 0; padding: 14px; border-radius: 4px; } .ubuntu { color: #DD4814; } .ubuntu > i { padding-right: 7px; } .centos { color: #204C8D; } .centos > i { padding-right: 7px; }
// Twitter Bootstrap @import "bootstrap"; @import "octicons/octicons"; @import "//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css"; @import "index"; + + pre { + border: none !important; + } .note { display: block; background-color: #d5e9f6; margin: 14px 0; padding: 14px; border-radius: 4px; } .ubuntu { color: #DD4814; } .ubuntu > i { padding-right: 7px; } .centos { color: #204C8D; } .centos > i { padding-right: 7px; }
4
0.137931
4
0
c3367f4262298341cc12b0192ef9a72544136723
examples/Cargo.toml
examples/Cargo.toml
[package] name = "av-examples" description = "Multimedia examples" version = "0.0.1" authors = ["Luca Barbato <lu_zero@gentoo.org>"] license = "MIT" repository = "https://github.com/rust-av/rust-av" edition = "2018" [dev_dependencies] av-codec = { path = "../codec" } av-data = { path = "../data" } av-format = { path = "../format" } clap = "2.33.1" matroska = { version = "0.1.0", git = "https://github.com/rust-av/matroska" } av-vorbis = { git = "https://github.com/rust-av/av-vorbis" } libopus = { version = "0.1.0", git = "https://github.com/rust-av/opus-rs", features = ["codec-trait"] } libvpx = { version = "0.1.0", git = "https://github.com/rust-av/vpx-rs", features = ["codec-trait"] }
[package] name = "av-examples" description = "Multimedia examples" version = "0.0.1" authors = ["Luca Barbato <lu_zero@gentoo.org>"] license = "MIT" repository = "https://github.com/rust-av/rust-av" edition = "2018" [dev_dependencies] av-codec = "0.2.0" av-data = "0.2.1" av-format = "0.2.1" clap = "2.33.1" matroska = { version = "0.1.0", git = "https://github.com/rust-av/matroska" } av-vorbis = { git = "https://github.com/rust-av/av-vorbis" } libopus = { version = "0.1.0", git = "https://github.com/rust-av/opus-rs", features = ["codec-trait"] } libvpx = { version = "0.1.0", git = "https://github.com/rust-av/vpx-rs", features = ["codec-trait"] }
Use upstream dependencies for examples
Use upstream dependencies for examples This removes the cyclic dependency problem that causes builds of rust-av to fail when bumping a breaking version change.
TOML
mit
rust-av/rust-av
toml
## Code Before: [package] name = "av-examples" description = "Multimedia examples" version = "0.0.1" authors = ["Luca Barbato <lu_zero@gentoo.org>"] license = "MIT" repository = "https://github.com/rust-av/rust-av" edition = "2018" [dev_dependencies] av-codec = { path = "../codec" } av-data = { path = "../data" } av-format = { path = "../format" } clap = "2.33.1" matroska = { version = "0.1.0", git = "https://github.com/rust-av/matroska" } av-vorbis = { git = "https://github.com/rust-av/av-vorbis" } libopus = { version = "0.1.0", git = "https://github.com/rust-av/opus-rs", features = ["codec-trait"] } libvpx = { version = "0.1.0", git = "https://github.com/rust-av/vpx-rs", features = ["codec-trait"] } ## Instruction: Use upstream dependencies for examples This removes the cyclic dependency problem that causes builds of rust-av to fail when bumping a breaking version change. ## Code After: [package] name = "av-examples" description = "Multimedia examples" version = "0.0.1" authors = ["Luca Barbato <lu_zero@gentoo.org>"] license = "MIT" repository = "https://github.com/rust-av/rust-av" edition = "2018" [dev_dependencies] av-codec = "0.2.0" av-data = "0.2.1" av-format = "0.2.1" clap = "2.33.1" matroska = { version = "0.1.0", git = "https://github.com/rust-av/matroska" } av-vorbis = { git = "https://github.com/rust-av/av-vorbis" } libopus = { version = "0.1.0", git = "https://github.com/rust-av/opus-rs", features = ["codec-trait"] } libvpx = { version = "0.1.0", git = "https://github.com/rust-av/vpx-rs", features = ["codec-trait"] }
[package] name = "av-examples" description = "Multimedia examples" version = "0.0.1" authors = ["Luca Barbato <lu_zero@gentoo.org>"] license = "MIT" repository = "https://github.com/rust-av/rust-av" edition = "2018" [dev_dependencies] - av-codec = { path = "../codec" } - av-data = { path = "../data" } - av-format = { path = "../format" } + av-codec = "0.2.0" + av-data = "0.2.1" + av-format = "0.2.1" clap = "2.33.1" matroska = { version = "0.1.0", git = "https://github.com/rust-av/matroska" } av-vorbis = { git = "https://github.com/rust-av/av-vorbis" } libopus = { version = "0.1.0", git = "https://github.com/rust-av/opus-rs", features = ["codec-trait"] } libvpx = { version = "0.1.0", git = "https://github.com/rust-av/vpx-rs", features = ["codec-trait"] }
6
0.333333
3
3
082dd34f8c9090f8bcb48b460e8ccc0e80aa205c
setup.py
setup.py
from distutils.core import setup requirements = [] with open('requirements.txt', 'r') as f: for line in f: requirements.append(str(line.strip())) setup( name='pp_api', version='0.1dev', packages=['pp_api', 'pp_api.server_data'], license='MIT', requires=requirements )
from distutils.core import setup setup( name='pp_api', version='0.1dev', packages=['pp_api', 'pp_api.server_data'], license='MIT', requires=open('requirements.txt', 'r').read().split() )
Revert "Fixed reading of requirements from the file"
Revert "Fixed reading of requirements from the file" This reverts commit 29be75d
Python
mit
artreven/pp_api
python
## Code Before: from distutils.core import setup requirements = [] with open('requirements.txt', 'r') as f: for line in f: requirements.append(str(line.strip())) setup( name='pp_api', version='0.1dev', packages=['pp_api', 'pp_api.server_data'], license='MIT', requires=requirements ) ## Instruction: Revert "Fixed reading of requirements from the file" This reverts commit 29be75d ## Code After: from distutils.core import setup setup( name='pp_api', version='0.1dev', packages=['pp_api', 'pp_api.server_data'], license='MIT', requires=open('requirements.txt', 'r').read().split() )
from distutils.core import setup - - requirements = [] - - with open('requirements.txt', 'r') as f: - for line in f: - requirements.append(str(line.strip())) setup( name='pp_api', version='0.1dev', packages=['pp_api', 'pp_api.server_data'], license='MIT', - requires=requirements + requires=open('requirements.txt', 'r').read().split() )
8
0.533333
1
7
a0836b1744e92b5b54f5e839a07461be65b003cc
both/router/routes.js
both/router/routes.js
/*****************************************************************************/ /* Client and Server Routes */ /*****************************************************************************/ Router.configure({ layoutTemplate: 'MasterLayout', loadingTemplate: 'Loading', notFoundTemplate: 'NotFound' }); /* * Example: * Router.route('/', {name: 'home'}); */ Router.route('/', { name: 'marketing' }); Router.route('/pages', { name: 'pages.index' }); Router.route('/pages/new', { name: 'pages.new' }); Router.route('/pages/:_id', { name: 'pages.show' }); Router.route('/settings', { name: 'settings.index' }); Router.onBeforeAction('dataNotFound');
/*****************************************************************************/ /* Client and Server Routes */ /*****************************************************************************/ Router.configure({ layoutTemplate: 'MasterLayout', loadingTemplate: 'Loading', notFoundTemplate: 'NotFound' }); Router.route('/', { name: 'marketing' }); Router.route('/pages', { name: 'pages.index' }); Router.route('/pages/new', { name: 'pages.new' }); Router.route('/pages/:_id', { name: 'pages.show' }); Router.route('/settings', { name: 'settings.index' }); Router.onBeforeAction('dataNotFound');
Remove example route. Clean up noise
Remove example route. Clean up noise
JavaScript
mit
bojicas/letterhead,bojicas/letterhead
javascript
## Code Before: /*****************************************************************************/ /* Client and Server Routes */ /*****************************************************************************/ Router.configure({ layoutTemplate: 'MasterLayout', loadingTemplate: 'Loading', notFoundTemplate: 'NotFound' }); /* * Example: * Router.route('/', {name: 'home'}); */ Router.route('/', { name: 'marketing' }); Router.route('/pages', { name: 'pages.index' }); Router.route('/pages/new', { name: 'pages.new' }); Router.route('/pages/:_id', { name: 'pages.show' }); Router.route('/settings', { name: 'settings.index' }); Router.onBeforeAction('dataNotFound'); ## Instruction: Remove example route. Clean up noise ## Code After: /*****************************************************************************/ /* Client and Server Routes */ /*****************************************************************************/ Router.configure({ layoutTemplate: 'MasterLayout', loadingTemplate: 'Loading', notFoundTemplate: 'NotFound' }); Router.route('/', { name: 'marketing' }); Router.route('/pages', { name: 'pages.index' }); Router.route('/pages/new', { name: 'pages.new' }); Router.route('/pages/:_id', { name: 'pages.show' }); Router.route('/settings', { name: 'settings.index' }); Router.onBeforeAction('dataNotFound');
/*****************************************************************************/ /* Client and Server Routes */ /*****************************************************************************/ Router.configure({ layoutTemplate: 'MasterLayout', loadingTemplate: 'Loading', notFoundTemplate: 'NotFound' }); - - /* - * Example: - * Router.route('/', {name: 'home'}); - */ Router.route('/', { name: 'marketing' }); Router.route('/pages', { name: 'pages.index' }); Router.route('/pages/new', { name: 'pages.new' }); Router.route('/pages/:_id', { name: 'pages.show' }); Router.route('/settings', { name: 'settings.index' }); Router.onBeforeAction('dataNotFound');
5
0.142857
0
5
487ea6045029c1fb2a21583da0b656ab3ea91e05
lib/oembed/response/photo.rb
lib/oembed/response/photo.rb
module OEmbed class Response # A Response used for representing static photos. class Photo < self # Returns an <img> tag pointing at the appropraite URL. def html "<img src='" + self.url + "' />" end private # See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3] def must_override %w{ url width height } + super end end end end
module OEmbed class Response # A Response used for representing static photos. class Photo < self # Returns an <img> tag pointing at the appropraite URL. def html "<img src='#{self.url}' alt='#{self.title}' />" end private # See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3] def must_override %w{ url width height } + super end end end end
Add the alt attribute on img with the title.
Add the alt attribute on img with the title. Signed-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@stormz.me>
Ruby
mit
judofyr/ruby-oembed,metavida/ruby-oembed,ruby-oembed/ruby-oembed,javan/ruby-oembed
ruby
## Code Before: module OEmbed class Response # A Response used for representing static photos. class Photo < self # Returns an <img> tag pointing at the appropraite URL. def html "<img src='" + self.url + "' />" end private # See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3] def must_override %w{ url width height } + super end end end end ## Instruction: Add the alt attribute on img with the title. Signed-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@stormz.me> ## Code After: module OEmbed class Response # A Response used for representing static photos. class Photo < self # Returns an <img> tag pointing at the appropraite URL. def html "<img src='#{self.url}' alt='#{self.title}' />" end private # See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3] def must_override %w{ url width height } + super end end end end
module OEmbed class Response # A Response used for representing static photos. class Photo < self # Returns an <img> tag pointing at the appropraite URL. def html - "<img src='" + self.url + "' />" + "<img src='#{self.url}' alt='#{self.title}' />" end private # See {section 2.3.4.1 of the oEmbed spec}[http://oembed.com/#section2.3] def must_override %w{ url width height } + super end end end end
2
0.095238
1
1
ae65aa843a2da11f4a237ce52de3b034826c40e8
setup.py
setup.py
VERSION = "0.5.1" from setuptools import setup, find_packages classifiers = [ 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'Natural Language :: English', 'Topic :: Scientific/Engineering', 'Topic :: Text Processing :: Linguistic' ] GITHUB_URL = 'http://github.com/LuminosoInsight/luminoso-api-client-python' setup( name="luminoso-api", version=VERSION, maintainer='Luminoso Technologies, Inc.', maintainer_email='info@luminoso.com', url=GITHUB_URL, download_url='%s/tarball/v%s' % (GITHUB_URL, VERSION), platforms=["any"], description="Python client library for communicating with the Luminoso REST API", classifiers=classifiers, packages=find_packages(), install_requires=[ 'requests >= 1.2.1, < 3.0', 'ftfy >= 3.3, < 5', ], entry_points={ 'console_scripts': [ 'lumi-upload = luminoso_api.upload:main', 'lumi-json-stream = luminoso_api.json_stream:main', ]}, )
VERSION = "0.5.1" from setuptools import setup, find_packages classifiers = [ 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'Natural Language :: English', 'Topic :: Scientific/Engineering', 'Topic :: Text Processing :: Linguistic' ] GITHUB_URL = 'http://github.com/LuminosoInsight/luminoso-api-client-python' setup( name="luminoso-api", version=VERSION, maintainer='Luminoso Technologies, Inc.', maintainer_email='info@luminoso.com', url=GITHUB_URL, download_url='%s/tarball/v%s' % (GITHUB_URL, VERSION), platforms=["any"], description="Python client library for communicating with the Luminoso REST API", classifiers=classifiers, packages=find_packages(exclude=('tests',)), install_requires=[ 'requests >= 1.2.1, < 3.0', 'ftfy >= 3.3, < 5', ], entry_points={ 'console_scripts': [ 'lumi-upload = luminoso_api.upload:main', 'lumi-json-stream = luminoso_api.json_stream:main', ]}, )
Exclude the tests directory when finding packages (for consistency and future-proofing).
Exclude the tests directory when finding packages (for consistency and future-proofing).
Python
mit
LuminosoInsight/luminoso-api-client-python
python
## Code Before: VERSION = "0.5.1" from setuptools import setup, find_packages classifiers = [ 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'Natural Language :: English', 'Topic :: Scientific/Engineering', 'Topic :: Text Processing :: Linguistic' ] GITHUB_URL = 'http://github.com/LuminosoInsight/luminoso-api-client-python' setup( name="luminoso-api", version=VERSION, maintainer='Luminoso Technologies, Inc.', maintainer_email='info@luminoso.com', url=GITHUB_URL, download_url='%s/tarball/v%s' % (GITHUB_URL, VERSION), platforms=["any"], description="Python client library for communicating with the Luminoso REST API", classifiers=classifiers, packages=find_packages(), install_requires=[ 'requests >= 1.2.1, < 3.0', 'ftfy >= 3.3, < 5', ], entry_points={ 'console_scripts': [ 'lumi-upload = luminoso_api.upload:main', 'lumi-json-stream = luminoso_api.json_stream:main', ]}, ) ## Instruction: Exclude the tests directory when finding packages (for consistency and future-proofing). ## Code After: VERSION = "0.5.1" from setuptools import setup, find_packages classifiers = [ 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'Natural Language :: English', 'Topic :: Scientific/Engineering', 'Topic :: Text Processing :: Linguistic' ] GITHUB_URL = 'http://github.com/LuminosoInsight/luminoso-api-client-python' setup( name="luminoso-api", version=VERSION, maintainer='Luminoso Technologies, Inc.', maintainer_email='info@luminoso.com', url=GITHUB_URL, download_url='%s/tarball/v%s' % (GITHUB_URL, VERSION), platforms=["any"], description="Python client library for communicating with the Luminoso REST API", classifiers=classifiers, packages=find_packages(exclude=('tests',)), install_requires=[ 'requests >= 1.2.1, < 3.0', 'ftfy >= 3.3, < 5', ], entry_points={ 'console_scripts': [ 'lumi-upload = luminoso_api.upload:main', 'lumi-json-stream = luminoso_api.json_stream:main', ]}, )
VERSION = "0.5.1" from setuptools import setup, find_packages classifiers = [ 'Intended Audience :: Developers', 'Intended Audience :: Science/Research', 'Natural Language :: English', 'Topic :: Scientific/Engineering', 'Topic :: Text Processing :: Linguistic' ] GITHUB_URL = 'http://github.com/LuminosoInsight/luminoso-api-client-python' setup( name="luminoso-api", version=VERSION, maintainer='Luminoso Technologies, Inc.', maintainer_email='info@luminoso.com', url=GITHUB_URL, download_url='%s/tarball/v%s' % (GITHUB_URL, VERSION), platforms=["any"], description="Python client library for communicating with the Luminoso REST API", classifiers=classifiers, - packages=find_packages(), + packages=find_packages(exclude=('tests',)), ? ++++++++++++++++++ install_requires=[ 'requests >= 1.2.1, < 3.0', 'ftfy >= 3.3, < 5', ], entry_points={ 'console_scripts': [ 'lumi-upload = luminoso_api.upload:main', 'lumi-json-stream = luminoso_api.json_stream:main', ]}, )
2
0.057143
1
1
6c30e96cae58f0c61f78ae7386f9640daf18e0dd
app/src/main/java/com/samourai/wallet/bip47/SendNotifTxFactory.java
app/src/main/java/com/samourai/wallet/bip47/SendNotifTxFactory.java
package com.samourai.wallet.bip47; import com.samourai.wallet.SamouraiWallet; import java.math.BigInteger; public class SendNotifTxFactory { public static final BigInteger _bNotifTxValue = SamouraiWallet.bDust; public static final BigInteger _bSWFee = SamouraiWallet.bFee; // public static final BigInteger _bSWCeilingFee = BigInteger.valueOf(50000L); public static final String SAMOURAI_NOTIF_TX_FEE_ADDRESS = "bc1qncfysagz0072a894kvzyxqwpvj5ckfj5kctmtk"; public static final String TESTNET_SAMOURAI_NOTIF_TX_FEE_ADDRESS = "tb1qh287jqsh6mkpqmd8euumyfam00fkr78qhrdnde"; // public static final double _dSWFeeUSD = 0.5; private SendNotifTxFactory () { ; } }
package com.samourai.wallet.bip47; import android.util.Log; import com.samourai.wallet.SamouraiWallet; import java.math.BigInteger; public class SendNotifTxFactory { public static final BigInteger _bNotifTxValue = SamouraiWallet.bDust; public static final BigInteger _bSWFee = SamouraiWallet.bFee; // public static final BigInteger _bSWCeilingFee = BigInteger.valueOf(50000L); static SendNotifTxFactory _instance = null; public String SAMOURAI_NOTIF_TX_FEE_ADDRESS = "bc1qncfysagz0072a894kvzyxqwpvj5ckfj5kctmtk"; public String TESTNET_SAMOURAI_NOTIF_TX_FEE_ADDRESS = "tb1qh287jqsh6mkpqmd8euumyfam00fkr78qhrdnde"; // public static final double _dSWFeeUSD = 0.5; private SendNotifTxFactory() { } public static SendNotifTxFactory getInstance() { if (_instance == null) { _instance = new SendNotifTxFactory(); } return _instance; } public void setAddress(String address) { if(SamouraiWallet.getInstance().isTestNet()){ TESTNET_SAMOURAI_NOTIF_TX_FEE_ADDRESS = address; }else { SAMOURAI_NOTIF_TX_FEE_ADDRESS = address; } Log.i("TAG","address BIP47 ".concat(address)); } }
Allow BIP47 custom fee address option
Allow BIP47 custom fee address option
Java
unlicense
Samourai-Wallet/samourai-wallet-android
java
## Code Before: package com.samourai.wallet.bip47; import com.samourai.wallet.SamouraiWallet; import java.math.BigInteger; public class SendNotifTxFactory { public static final BigInteger _bNotifTxValue = SamouraiWallet.bDust; public static final BigInteger _bSWFee = SamouraiWallet.bFee; // public static final BigInteger _bSWCeilingFee = BigInteger.valueOf(50000L); public static final String SAMOURAI_NOTIF_TX_FEE_ADDRESS = "bc1qncfysagz0072a894kvzyxqwpvj5ckfj5kctmtk"; public static final String TESTNET_SAMOURAI_NOTIF_TX_FEE_ADDRESS = "tb1qh287jqsh6mkpqmd8euumyfam00fkr78qhrdnde"; // public static final double _dSWFeeUSD = 0.5; private SendNotifTxFactory () { ; } } ## Instruction: Allow BIP47 custom fee address option ## Code After: package com.samourai.wallet.bip47; import android.util.Log; import com.samourai.wallet.SamouraiWallet; import java.math.BigInteger; public class SendNotifTxFactory { public static final BigInteger _bNotifTxValue = SamouraiWallet.bDust; public static final BigInteger _bSWFee = SamouraiWallet.bFee; // public static final BigInteger _bSWCeilingFee = BigInteger.valueOf(50000L); static SendNotifTxFactory _instance = null; public String SAMOURAI_NOTIF_TX_FEE_ADDRESS = "bc1qncfysagz0072a894kvzyxqwpvj5ckfj5kctmtk"; public String TESTNET_SAMOURAI_NOTIF_TX_FEE_ADDRESS = "tb1qh287jqsh6mkpqmd8euumyfam00fkr78qhrdnde"; // public static final double _dSWFeeUSD = 0.5; private SendNotifTxFactory() { } public static SendNotifTxFactory getInstance() { if (_instance == null) { _instance = new SendNotifTxFactory(); } return _instance; } public void setAddress(String address) { if(SamouraiWallet.getInstance().isTestNet()){ TESTNET_SAMOURAI_NOTIF_TX_FEE_ADDRESS = address; }else { SAMOURAI_NOTIF_TX_FEE_ADDRESS = address; } Log.i("TAG","address BIP47 ".concat(address)); } }
package com.samourai.wallet.bip47; + + import android.util.Log; import com.samourai.wallet.SamouraiWallet; import java.math.BigInteger; - public class SendNotifTxFactory { ? ^ + public class SendNotifTxFactory { ? ^ public static final BigInteger _bNotifTxValue = SamouraiWallet.bDust; public static final BigInteger _bSWFee = SamouraiWallet.bFee; // public static final BigInteger _bSWCeilingFee = BigInteger.valueOf(50000L); + static SendNotifTxFactory _instance = null; + - public static final String SAMOURAI_NOTIF_TX_FEE_ADDRESS = "bc1qncfysagz0072a894kvzyxqwpvj5ckfj5kctmtk"; ? ------------- + public String SAMOURAI_NOTIF_TX_FEE_ADDRESS = "bc1qncfysagz0072a894kvzyxqwpvj5ckfj5kctmtk"; - public static final String TESTNET_SAMOURAI_NOTIF_TX_FEE_ADDRESS = "tb1qh287jqsh6mkpqmd8euumyfam00fkr78qhrdnde"; ? ------------- + public String TESTNET_SAMOURAI_NOTIF_TX_FEE_ADDRESS = "tb1qh287jqsh6mkpqmd8euumyfam00fkr78qhrdnde"; // public static final double _dSWFeeUSD = 0.5; - private SendNotifTxFactory () { ; } ? - ---- + private SendNotifTxFactory() { + } + + public static SendNotifTxFactory getInstance() { + if (_instance == null) { + _instance = new SendNotifTxFactory(); + } + return _instance; + } + + public void setAddress(String address) { + if(SamouraiWallet.getInstance().isTestNet()){ + TESTNET_SAMOURAI_NOTIF_TX_FEE_ADDRESS = address; + }else { + SAMOURAI_NOTIF_TX_FEE_ADDRESS = address; + } + Log.i("TAG","address BIP47 ".concat(address)); + } }
29
1.45
25
4
f17427da3b58abf8ec3b39c4c95d3158ad2701b1
src/Data/LLVM.hs
src/Data/LLVM.hs
{-# LANGUAGE OverloadedStrings #-} -- | This is the top-level LLVM IR module. It provides functions to -- construct the IR from a bitcode file and some basic methods to -- inspect it. -- -- This module re-exports all of the types used in the IR for -- convenience. module Data.LLVM ( -- * Constructing the IR parseLLVMBitcodeFile, defaultParserOptions, ParserOptions(..), PositionPrecision(..), -- * Inspect the IR findMain, module Data.LLVM.Types ) where import Data.List ( find ) import Data.LLVM.Private.Parser.Options import Data.LLVM.Private.Parser.Unmarshal import Data.LLVM.Types -- | Find the function named 'main' in the 'Module', if any. findMain :: Module -> Maybe Function findMain = find isMain . moduleDefinedFunctions where mainName = makeGlobalIdentifier "main" isMain f = functionName f == mainName
{-# LANGUAGE OverloadedStrings #-} -- | This is the top-level LLVM IR module. It provides functions to -- construct the IR from a bitcode file and some basic methods to -- inspect it. -- -- This module re-exports all of the types used in the IR for -- convenience. module Data.LLVM ( -- * Constructing the IR parseLLVMBitcodeFile, defaultParserOptions, ParserOptions(..), PositionPrecision(..), -- * Inspect the IR findFunctionByName, findMain, module Data.LLVM.Types ) where import qualified Data.ByteString.Char8 as BS import Data.List ( find ) import Data.LLVM.Private.Parser.Options import Data.LLVM.Private.Parser.Unmarshal import Data.LLVM.Types -- | Find a function in the Module by its name. findFunctionByName :: Module -> String -> Maybe Function findFunctionByName m s = find isFunc $ moduleDefinedFunctions m where funcIdent = makeGlobalIdentifier (BS.pack s) isFunc f = functionName f == funcIdent -- | Find the function named 'main' in the 'Module', if any. findMain :: Module -> Maybe Function findMain m = findFunctionByName m "main"
Add a function to find Functions in Modules by their name. This generalizes findMain
Add a function to find Functions in Modules by their name. This generalizes findMain
Haskell
bsd-3-clause
wangxiayang/llvm-analysis,travitch/llvm-analysis,wangxiayang/llvm-analysis,travitch/llvm-analysis
haskell
## Code Before: {-# LANGUAGE OverloadedStrings #-} -- | This is the top-level LLVM IR module. It provides functions to -- construct the IR from a bitcode file and some basic methods to -- inspect it. -- -- This module re-exports all of the types used in the IR for -- convenience. module Data.LLVM ( -- * Constructing the IR parseLLVMBitcodeFile, defaultParserOptions, ParserOptions(..), PositionPrecision(..), -- * Inspect the IR findMain, module Data.LLVM.Types ) where import Data.List ( find ) import Data.LLVM.Private.Parser.Options import Data.LLVM.Private.Parser.Unmarshal import Data.LLVM.Types -- | Find the function named 'main' in the 'Module', if any. findMain :: Module -> Maybe Function findMain = find isMain . moduleDefinedFunctions where mainName = makeGlobalIdentifier "main" isMain f = functionName f == mainName ## Instruction: Add a function to find Functions in Modules by their name. This generalizes findMain ## Code After: {-# LANGUAGE OverloadedStrings #-} -- | This is the top-level LLVM IR module. It provides functions to -- construct the IR from a bitcode file and some basic methods to -- inspect it. -- -- This module re-exports all of the types used in the IR for -- convenience. module Data.LLVM ( -- * Constructing the IR parseLLVMBitcodeFile, defaultParserOptions, ParserOptions(..), PositionPrecision(..), -- * Inspect the IR findFunctionByName, findMain, module Data.LLVM.Types ) where import qualified Data.ByteString.Char8 as BS import Data.List ( find ) import Data.LLVM.Private.Parser.Options import Data.LLVM.Private.Parser.Unmarshal import Data.LLVM.Types -- | Find a function in the Module by its name. findFunctionByName :: Module -> String -> Maybe Function findFunctionByName m s = find isFunc $ moduleDefinedFunctions m where funcIdent = makeGlobalIdentifier (BS.pack s) isFunc f = functionName f == funcIdent -- | Find the function named 'main' in the 'Module', if any. findMain :: Module -> Maybe Function findMain m = findFunctionByName m "main"
{-# LANGUAGE OverloadedStrings #-} -- | This is the top-level LLVM IR module. It provides functions to -- construct the IR from a bitcode file and some basic methods to -- inspect it. -- -- This module re-exports all of the types used in the IR for -- convenience. module Data.LLVM ( -- * Constructing the IR parseLLVMBitcodeFile, defaultParserOptions, ParserOptions(..), PositionPrecision(..), -- * Inspect the IR + findFunctionByName, findMain, module Data.LLVM.Types ) where + import qualified Data.ByteString.Char8 as BS import Data.List ( find ) import Data.LLVM.Private.Parser.Options import Data.LLVM.Private.Parser.Unmarshal import Data.LLVM.Types + -- | Find a function in the Module by its name. + findFunctionByName :: Module -> String -> Maybe Function + findFunctionByName m s = find isFunc $ moduleDefinedFunctions m + where + funcIdent = makeGlobalIdentifier (BS.pack s) + isFunc f = functionName f == funcIdent + -- | Find the function named 'main' in the 'Module', if any. findMain :: Module -> Maybe Function + findMain m = findFunctionByName m "main" - findMain = find isMain . moduleDefinedFunctions - where - mainName = makeGlobalIdentifier "main" - isMain f = functionName f == mainName
14
0.466667
10
4
f6f7d86a992fb2ee484f3de143030769aca9aee7
src/elements/list-item.html
src/elements/list-item.html
<ion-item> <div style="position:relative; padding:8px"> <h2>{{data.text}}</h2> <p>{{data.subtext}}</p> <div class="backgroundprogressbar" [ngStyle]="{'width':data.percent+'%'}"></div> </div> </ion-item>
<ion-item-sliding> <ion-item> <div style="position:relative; padding:8px"> <h2>{{data.text}}</h2> <p>{{data.subtext}}</p> <div class="backgroundprogressbar" [ngStyle]="{'width':data.percent+'%'}"></div> </div> </ion-item> <ion-item-options side="right"> <button ion-button color="primary"> <ion-icon name="bulb"></ion-icon> Toggle enable </button> <button ion-button color="primary"> <ion-icon name="send"></ion-icon> Transfer </button> </ion-item-options> </ion-item-sliding>
Add list item action buttons
Add list item action buttons
HTML
apache-2.0
sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile
html
## Code Before: <ion-item> <div style="position:relative; padding:8px"> <h2>{{data.text}}</h2> <p>{{data.subtext}}</p> <div class="backgroundprogressbar" [ngStyle]="{'width':data.percent+'%'}"></div> </div> </ion-item> ## Instruction: Add list item action buttons ## Code After: <ion-item-sliding> <ion-item> <div style="position:relative; padding:8px"> <h2>{{data.text}}</h2> <p>{{data.subtext}}</p> <div class="backgroundprogressbar" [ngStyle]="{'width':data.percent+'%'}"></div> </div> </ion-item> <ion-item-options side="right"> <button ion-button color="primary"> <ion-icon name="bulb"></ion-icon> Toggle enable </button> <button ion-button color="primary"> <ion-icon name="send"></ion-icon> Transfer </button> </ion-item-options> </ion-item-sliding>
+ <ion-item-sliding> - <ion-item> + <ion-item> ? ++ - <div style="position:relative; padding:8px"> + <div style="position:relative; padding:8px"> ? ++ - <h2>{{data.text}}</h2> + <h2>{{data.text}}</h2> ? ++ - <p>{{data.subtext}}</p> + <p>{{data.subtext}}</p> ? ++ - <div class="backgroundprogressbar" [ngStyle]="{'width':data.percent+'%'}"></div> + <div class="backgroundprogressbar" [ngStyle]="{'width':data.percent+'%'}"></div> ? ++ - </div> + </div> ? ++ - </ion-item> + </ion-item> ? ++ + <ion-item-options side="right"> + <button ion-button color="primary"> + <ion-icon name="bulb"></ion-icon> + Toggle enable + </button> + <button ion-button color="primary"> + <ion-icon name="send"></ion-icon> + Transfer + </button> + </ion-item-options> + </ion-item-sliding>
26
3.714286
19
7
b4ee1720064c9ab91d95b045d934576fbc11f761
docs/SUMMARY.md
docs/SUMMARY.md
* [docs](/docs) * [about](/about) * [async](/async) * [cli](/cli) * [contact](/contact) * [defining blocks](/defining-blocks) * [docs](/docs) * [language](/language) * [partial flashing](/partial-flashing) * [simshim](/simshim) * [source embedding](/source-embedding) * [staticpkg](/staticpkg) * [target creation](/target-creation) * [translate](/translate) * [writing docs](/writing-docs)
* [About MakeCode](/about) * [Contact Us](/contact) * [Technical Docs](/docs) * [JS Editor Features](/js/editor) * [Programming Language](/language) * [Async Functions](/async) * [Partial Flashing](/partial-flashing) * [Source Embedding](/source-embedding) * [Updating Blockly Version](/develop/blocklyupgrade) * [Creating Targets](/target-creation) * [Defining Blocks](/defining-blocks) * [Auto-generation of .d.ts](/simshim) * [Static File Drops](/staticpkg) * [Simulator](/targets/simulator) * [Theming Editor](/targets/theming) * [Writing Docs](/writing-docs) * [Translations](/translate) * [Command Line Interface](/cli) * [build](/cli/build) * [bump](/cli/bump) * [cherrypick](/cli/cherrypick) * [deploy](/cli/deploy) * [electron](/cli/electron) * [login](/cli/login) * [staticpkg](/cli/staticpkg) * [update](/cli/update)
Bring a bit more structure in summary
Bring a bit more structure in summary
Markdown
mit
Microsoft/pxt,switch-education/pxt,playi/pxt,switchinnovations/pxt,playi/pxt,switchinnovations/pxt,Microsoft/pxt,Microsoft/pxt,Microsoft/pxt,Microsoft/pxt,playi/pxt,switch-education/pxt,switch-education/pxt,switchinnovations/pxt,switchinnovations/pxt,switch-education/pxt,switch-education/pxt,playi/pxt
markdown
## Code Before: * [docs](/docs) * [about](/about) * [async](/async) * [cli](/cli) * [contact](/contact) * [defining blocks](/defining-blocks) * [docs](/docs) * [language](/language) * [partial flashing](/partial-flashing) * [simshim](/simshim) * [source embedding](/source-embedding) * [staticpkg](/staticpkg) * [target creation](/target-creation) * [translate](/translate) * [writing docs](/writing-docs) ## Instruction: Bring a bit more structure in summary ## Code After: * [About MakeCode](/about) * [Contact Us](/contact) * [Technical Docs](/docs) * [JS Editor Features](/js/editor) * [Programming Language](/language) * [Async Functions](/async) * [Partial Flashing](/partial-flashing) * [Source Embedding](/source-embedding) * [Updating Blockly Version](/develop/blocklyupgrade) * [Creating Targets](/target-creation) * [Defining Blocks](/defining-blocks) * [Auto-generation of .d.ts](/simshim) * [Static File Drops](/staticpkg) * [Simulator](/targets/simulator) * [Theming Editor](/targets/theming) * [Writing Docs](/writing-docs) * [Translations](/translate) * [Command Line Interface](/cli) * [build](/cli/build) * [bump](/cli/bump) * [cherrypick](/cli/cherrypick) * [deploy](/cli/deploy) * [electron](/cli/electron) * [login](/cli/login) * [staticpkg](/cli/staticpkg) * [update](/cli/update)
+ * [About MakeCode](/about) - * [docs](/docs) - * [about](/about) - * [async](/async) - * [cli](/cli) - * [contact](/contact) ? ---- ^ + * [Contact Us](/contact) ? ^ +++ - * [defining blocks](/defining-blocks) - * [docs](/docs) + * [Technical Docs](/docs) + * [JS Editor Features](/js/editor) - * [language](/language) ? ^ + * [Programming Language](/language) ? ^^^^^^^^^^^^^ + * [Async Functions](/async) - * [partial flashing](/partial-flashing) ? ^ ^ + * [Partial Flashing](/partial-flashing) ? ^ ^ - * [simshim](/simshim) - * [source embedding](/source-embedding) ? ^ ^ + * [Source Embedding](/source-embedding) ? ^ ^ + * [Updating Blockly Version](/develop/blocklyupgrade) + * [Creating Targets](/target-creation) + * [Defining Blocks](/defining-blocks) + * [Auto-generation of .d.ts](/simshim) + * [Static File Drops](/staticpkg) + * [Simulator](/targets/simulator) + * [Theming Editor](/targets/theming) + * [Writing Docs](/writing-docs) + * [Translations](/translate) + * [Command Line Interface](/cli) + * [build](/cli/build) + * [bump](/cli/bump) + * [cherrypick](/cli/cherrypick) + * [deploy](/cli/deploy) + * [electron](/cli/electron) + * [login](/cli/login) - * [staticpkg](/staticpkg) + * [staticpkg](/cli/staticpkg) ? ++++ + * [update](/cli/update) - * [target creation](/target-creation) - * [translate](/translate) - * [writing docs](/writing-docs)
41
2.5625
26
15
caacfb2d9ab043c3a9bbf7ba907aa5dcd6ced33d
demo/index.html
demo/index.html
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" /> <title>vaadin-icons Examples</title> <script src="../../webcomponentsjs/webcomponents-lite.js"></script> <link rel="import" href="../../polymer/polymer.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-component-demo.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-component-demo.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-demo-snippet.html"> <link rel="import" href="../../vaadin-text-field/vaadin-text-field.html"> <script src="../../vaadin-demo-helpers/vaadin-demo-ready-event-emitter.js"></script> <script src="./icons-demo.js"></script> <link rel="import" href="../vaadin-icons.html"> <link rel="import" href="../../iron-meta/iron-meta.html"> <style> body { font-family: sans-serif; } </style> </head> <body> <vaadin-component-demo config-src="demos.json"></vaadin-component-demo> </body> </html>
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" /> <title>vaadin-icons Examples</title> <script src="../../webcomponentsjs/webcomponents-lite.js"></script> <link rel="import" href="../../polymer/polymer.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-component-demo.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-demo-snippet.html"> <link rel="import" href="../../vaadin-text-field/vaadin-text-field.html"> <script src="../../vaadin-demo-helpers/vaadin-demo-ready-event-emitter.js"></script> <script src="./icons-demo.js"></script> <link rel="import" href="../vaadin-icons.html"> <link rel="import" href="../../iron-meta/iron-meta.html"> <custom-style> <style include="vaadin-component-demo-shared-styles"></style> </custom-style> </head> <body> <vaadin-component-demo config-src="demos.json"></vaadin-component-demo> </body> </html>
Align with skeleton: remove duplicate import, update styles
Align with skeleton: remove duplicate import, update styles
HTML
apache-2.0
vaadin/vaadin-icons,vaadin/vaadin-icons,vaadin/vaadin-icons
html
## Code Before: <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" /> <title>vaadin-icons Examples</title> <script src="../../webcomponentsjs/webcomponents-lite.js"></script> <link rel="import" href="../../polymer/polymer.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-component-demo.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-component-demo.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-demo-snippet.html"> <link rel="import" href="../../vaadin-text-field/vaadin-text-field.html"> <script src="../../vaadin-demo-helpers/vaadin-demo-ready-event-emitter.js"></script> <script src="./icons-demo.js"></script> <link rel="import" href="../vaadin-icons.html"> <link rel="import" href="../../iron-meta/iron-meta.html"> <style> body { font-family: sans-serif; } </style> </head> <body> <vaadin-component-demo config-src="demos.json"></vaadin-component-demo> </body> </html> ## Instruction: Align with skeleton: remove duplicate import, update styles ## Code After: <!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" /> <title>vaadin-icons Examples</title> <script src="../../webcomponentsjs/webcomponents-lite.js"></script> <link rel="import" href="../../polymer/polymer.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-component-demo.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-demo-snippet.html"> <link rel="import" href="../../vaadin-text-field/vaadin-text-field.html"> <script src="../../vaadin-demo-helpers/vaadin-demo-ready-event-emitter.js"></script> <script src="./icons-demo.js"></script> <link rel="import" href="../vaadin-icons.html"> <link rel="import" href="../../iron-meta/iron-meta.html"> <custom-style> <style include="vaadin-component-demo-shared-styles"></style> </custom-style> </head> <body> <vaadin-component-demo config-src="demos.json"></vaadin-component-demo> </body> </html>
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1" /> <title>vaadin-icons Examples</title> <script src="../../webcomponentsjs/webcomponents-lite.js"></script> <link rel="import" href="../../polymer/polymer.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-component-demo.html"> - <link rel="import" href="../../vaadin-demo-helpers/vaadin-component-demo.html"> <link rel="import" href="../../vaadin-demo-helpers/vaadin-demo-snippet.html"> <link rel="import" href="../../vaadin-text-field/vaadin-text-field.html"> <script src="../../vaadin-demo-helpers/vaadin-demo-ready-event-emitter.js"></script> <script src="./icons-demo.js"></script> <link rel="import" href="../vaadin-icons.html"> <link rel="import" href="../../iron-meta/iron-meta.html"> + <custom-style> + <style include="vaadin-component-demo-shared-styles"></style> + </custom-style> - <style> - body { - font-family: sans-serif; - } - </style> </head> <body> <vaadin-component-demo config-src="demos.json"></vaadin-component-demo> </body> </html>
9
0.290323
3
6
7a2493a6398a9a9777a9d5489cf5e15765b38ed0
app/assets/javascripts/observe.js
app/assets/javascripts/observe.js
$(document).ready(function(){ $('.observable').on('change', function(evt) { var $field = $(evt.target); var url = $field.data('url'); var target = $field.data('target'); $.get(url, $field.serialize(), function(data) { $(target).html(data); }); }); });
$(document).ready(function(){ var timer = 0; var handle_field_change = function(evt) { var $field = $(evt.target); var url = $field.data('url'); var target = $field.data('target'); $.get(url, $field.serialize(), function(data) { $(target).html(data); }); }; var delay_callback = function(callback) { clearTimeout(timer); timer = setTimeout(callback, 200); } $('.observable').on('keyup keydown paste', function(evt) { delay_callback(function() { handle_field_change(evt) }); }); });
Make live search respond more directly
Make live search respond more directly
JavaScript
mit
drakontia/publify,drakontia/publify,SF-WDI-LABS/publify_debugging_lab,Juuro/publify,Juuro/publify,publify/publify,publify/publify,whithajess/publify,Juuro/publify,publify/publify,SF-WDI-LABS/publify_debugging_lab,SF-WDI-LABS/publify_debugging_lab,whithajess/publify,whithajess/publify
javascript
## Code Before: $(document).ready(function(){ $('.observable').on('change', function(evt) { var $field = $(evt.target); var url = $field.data('url'); var target = $field.data('target'); $.get(url, $field.serialize(), function(data) { $(target).html(data); }); }); }); ## Instruction: Make live search respond more directly ## Code After: $(document).ready(function(){ var timer = 0; var handle_field_change = function(evt) { var $field = $(evt.target); var url = $field.data('url'); var target = $field.data('target'); $.get(url, $field.serialize(), function(data) { $(target).html(data); }); }; var delay_callback = function(callback) { clearTimeout(timer); timer = setTimeout(callback, 200); } $('.observable').on('keyup keydown paste', function(evt) { delay_callback(function() { handle_field_change(evt) }); }); });
$(document).ready(function(){ - $('.observable').on('change', - function(evt) { + var timer = 0; + + var handle_field_change = function(evt) { - var $field = $(evt.target); ? ---- + var $field = $(evt.target); - var url = $field.data('url'); ? ---- + var url = $field.data('url'); - var target = $field.data('target'); ? ---- + var target = $field.data('target'); - $.get(url, $field.serialize(), ? ---- + $.get(url, $field.serialize(), - function(data) { ? ---- + function(data) { - $(target).html(data); ? ---- + $(target).html(data); - }); - }); + }); ? ++ + }; + + var delay_callback = function(callback) { + clearTimeout(timer); + timer = setTimeout(callback, 200); + } + + $('.observable').on('keyup keydown paste', function(evt) { + delay_callback(function() { handle_field_change(evt) }); + }); });
30
2.5
20
10
c2ccdda577e152c9f75fdc9b01bddc6c11cedf32
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
class GroupsController < ApplicationController def index @groups = Group.all end def new @group = Group.new end def edit @group = Group.find(params[:id]) end def update group = Group.find(params[:id]) group.update_attributes(group_params) flash[:notice] = 'Group updated with success.' redirect_to groups_path end def create Group.create(group_params) flash[:notice] = 'Group created with success.' redirect_to groups_path end def destroy group = Group.find(params[:id]) respond_to do |format| if group.destroy format.json { render json: { group: group, message: 'Group deleted with success.' }, status: :created, location: group } end end end private def group_params params.require(:group).permit(:name) end end
class GroupsController < ApplicationController def index @groups = Group.all end def new @group = Group.new end def edit @group = Group.find(params[:id]) end def update group = Group.find(params[:id]) group.update_attributes(group_params) flash[:notice] = 'Group updated with success.' redirect_to groups_path end def create Group.create(group_params) flash[:notice] = 'Group created with success.' redirect_to groups_path end def destroy @group = Group.find(params[:id]) respond_to do |format| if destroy_group_tasks && @group.destroy format.json { render json: { group: @group, message: 'Group deleted with success.' }, status: :created, location: @group } end end end private def destroy_group_tasks Task.where(group: @group).each{ |task| task.destroy } end def group_params params.require(:group).permit(:name) end end
Destroy tasks when group is deleted
Destroy tasks when group is deleted
Ruby
mit
eduardoschneiders/tasktracker,eduardoschneiders/tasktracker,eduardoschneiders/tasktracker
ruby
## Code Before: class GroupsController < ApplicationController def index @groups = Group.all end def new @group = Group.new end def edit @group = Group.find(params[:id]) end def update group = Group.find(params[:id]) group.update_attributes(group_params) flash[:notice] = 'Group updated with success.' redirect_to groups_path end def create Group.create(group_params) flash[:notice] = 'Group created with success.' redirect_to groups_path end def destroy group = Group.find(params[:id]) respond_to do |format| if group.destroy format.json { render json: { group: group, message: 'Group deleted with success.' }, status: :created, location: group } end end end private def group_params params.require(:group).permit(:name) end end ## Instruction: Destroy tasks when group is deleted ## Code After: class GroupsController < ApplicationController def index @groups = Group.all end def new @group = Group.new end def edit @group = Group.find(params[:id]) end def update group = Group.find(params[:id]) group.update_attributes(group_params) flash[:notice] = 'Group updated with success.' redirect_to groups_path end def create Group.create(group_params) flash[:notice] = 'Group created with success.' redirect_to groups_path end def destroy @group = Group.find(params[:id]) respond_to do |format| if destroy_group_tasks && @group.destroy format.json { render json: { group: @group, message: 'Group deleted with success.' }, status: :created, location: @group } end end end private def destroy_group_tasks Task.where(group: @group).each{ |task| task.destroy } end def group_params params.require(:group).permit(:name) end end
class GroupsController < ApplicationController def index @groups = Group.all end def new @group = Group.new end def edit @group = Group.find(params[:id]) end def update group = Group.find(params[:id]) group.update_attributes(group_params) flash[:notice] = 'Group updated with success.' redirect_to groups_path end def create Group.create(group_params) flash[:notice] = 'Group created with success.' redirect_to groups_path end def destroy - group = Group.find(params[:id]) + @group = Group.find(params[:id]) ? + respond_to do |format| - if group.destroy + if destroy_group_tasks && @group.destroy - format.json { render json: { group: group, message: 'Group deleted with success.' }, status: :created, location: group } + format.json { render json: { group: @group, message: 'Group deleted with success.' }, status: :created, location: @group } ? + + end end end private + def destroy_group_tasks + Task.where(group: @group).each{ |task| task.destroy } + end + def group_params params.require(:group).permit(:name) end end
10
0.243902
7
3
55ea4976705ec539510220fb3c43490df685b4a0
ISSUE_TEMPLATE.md
ISSUE_TEMPLATE.md
<!-- Ride Issue --> ### Did you connect to an already running interpreter or start the interpreter from RIDE? <!-- Connect to already running/Start an interpreter --> ### How do you reproduce the issue? <!-- instructions to reproduce --> ### Paste the contents of Help → About (Shift+F1) <!-- Paste Here -->
<!-- Ride Issue --> ### Did you connect to an already running interpreter or start the interpreter from RIDE? <!-- Connect to already running/Start an interpreter --> ### How do you reproduce the issue? <!-- instructions to reproduce --> ### Paste the contents of Help → About (Shift+F1) ``` (Paste here) ```
Put the contents of Help->About in a code block
Put the contents of Help->About in a code block Prevents github's markdown from kicking in and swallowing characters like angle brackets.
Markdown
mit
Dyalog/ride,Dyalog/ride,Dyalog/ride,Dyalog/ride
markdown
## Code Before: <!-- Ride Issue --> ### Did you connect to an already running interpreter or start the interpreter from RIDE? <!-- Connect to already running/Start an interpreter --> ### How do you reproduce the issue? <!-- instructions to reproduce --> ### Paste the contents of Help → About (Shift+F1) <!-- Paste Here --> ## Instruction: Put the contents of Help->About in a code block Prevents github's markdown from kicking in and swallowing characters like angle brackets. ## Code After: <!-- Ride Issue --> ### Did you connect to an already running interpreter or start the interpreter from RIDE? <!-- Connect to already running/Start an interpreter --> ### How do you reproduce the issue? <!-- instructions to reproduce --> ### Paste the contents of Help → About (Shift+F1) ``` (Paste here) ```
<!-- Ride Issue --> ### Did you connect to an already running interpreter or start the interpreter from RIDE? <!-- Connect to already running/Start an interpreter --> ### How do you reproduce the issue? <!-- instructions to reproduce --> ### Paste the contents of Help → About (Shift+F1) - <!-- Paste Here --> - + ``` + (Paste here) + ```
5
0.454545
3
2
236e209482a4bf6440962cb86062cc4d9d475c44
README.md
README.md
**Jeff** mixes in client behaviour for [Amazon Web Services (AWS)][aws]. ![jeff][jeff] ## Usage Build a hypothetical client. ```ruby class Client include Jeff end ``` Set AWS endpoint and credentials. ```ruby client = Client.new client.endpoint = 'http://example.com/path' client.key = 'key' client.secret = 'secret' ``` Hit the endpoint. ```ruby client.get query: { 'Foo' => 'Bar' } ``` Oh là là. [aws]: http://aws.amazon.com/ [excon]: https://github.com/geemus/excon [jeff]: http://f.cl.ly/items/0a3R3J0k1R2f423k1q2l/jeff.jpg [sign]: http://docs.amazonwebservices.com/general/latest/gr/signature-version-2.html [travis]: http://travis-ci.org/#!/papercavalier/jeff
**Jeff** mixes in [authentication][sign] for [Amazon Web Services (AWS)][aws]. ![jeff][jeff] ## Usage Build a hypothetical client. ```ruby class Client include Jeff end ``` Set AWS endpoint and credentials. ```ruby client = Client.new client.endpoint = 'http://example.com/path' client.key = 'key' client.secret = 'secret' ``` Hit the endpoint. ```ruby client.get query: { 'Foo' => 'Bar' } ``` Oh là là. [aws]: http://aws.amazon.com/ [jeff]: http://f.cl.ly/items/0a3R3J0k1R2f423k1q2l/jeff.jpg [sign]: http://docs.amazonwebservices.com/general/latest/gr/signature-version-2.html
Bring back link to signature docs
Bring back link to signature docs
Markdown
mit
hakanensari/jeff,mamatafu/jeff
markdown
## Code Before: **Jeff** mixes in client behaviour for [Amazon Web Services (AWS)][aws]. ![jeff][jeff] ## Usage Build a hypothetical client. ```ruby class Client include Jeff end ``` Set AWS endpoint and credentials. ```ruby client = Client.new client.endpoint = 'http://example.com/path' client.key = 'key' client.secret = 'secret' ``` Hit the endpoint. ```ruby client.get query: { 'Foo' => 'Bar' } ``` Oh là là. [aws]: http://aws.amazon.com/ [excon]: https://github.com/geemus/excon [jeff]: http://f.cl.ly/items/0a3R3J0k1R2f423k1q2l/jeff.jpg [sign]: http://docs.amazonwebservices.com/general/latest/gr/signature-version-2.html [travis]: http://travis-ci.org/#!/papercavalier/jeff ## Instruction: Bring back link to signature docs ## Code After: **Jeff** mixes in [authentication][sign] for [Amazon Web Services (AWS)][aws]. ![jeff][jeff] ## Usage Build a hypothetical client. ```ruby class Client include Jeff end ``` Set AWS endpoint and credentials. ```ruby client = Client.new client.endpoint = 'http://example.com/path' client.key = 'key' client.secret = 'secret' ``` Hit the endpoint. ```ruby client.get query: { 'Foo' => 'Bar' } ``` Oh là là. [aws]: http://aws.amazon.com/ [jeff]: http://f.cl.ly/items/0a3R3J0k1R2f423k1q2l/jeff.jpg [sign]: http://docs.amazonwebservices.com/general/latest/gr/signature-version-2.html
- **Jeff** mixes in client behaviour for [Amazon Web Services (AWS)][aws]. ? ^^^ ^^^^ ^ ^^ + **Jeff** mixes in [authentication][sign] for [Amazon Web Services (AWS)][aws]. ? ^^^^^ ^^ ^ ^^^^^^^^ ![jeff][jeff] ## Usage Build a hypothetical client. ```ruby class Client include Jeff end ``` Set AWS endpoint and credentials. ```ruby client = Client.new client.endpoint = 'http://example.com/path' client.key = 'key' client.secret = 'secret' ``` Hit the endpoint. ```ruby client.get query: { 'Foo' => 'Bar' } ``` Oh là là. - [aws]: http://aws.amazon.com/ ? -- + [aws]: http://aws.amazon.com/ - [excon]: https://github.com/geemus/excon - [jeff]: http://f.cl.ly/items/0a3R3J0k1R2f423k1q2l/jeff.jpg ? -- + [jeff]: http://f.cl.ly/items/0a3R3J0k1R2f423k1q2l/jeff.jpg - [sign]: http://docs.amazonwebservices.com/general/latest/gr/signature-version-2.html ? -- + [sign]: http://docs.amazonwebservices.com/general/latest/gr/signature-version-2.html - [travis]: http://travis-ci.org/#!/papercavalier/jeff
10
0.27027
4
6
62937cc83bc322cade5043bec27262df761bba65
docs/_includes/footer.html
docs/_includes/footer.html
<script src="{{ "/assets/js/prism.js" | prepend: site.baseurl }}"></script> <div class="footer"> <div class="container text-center"> <a href="http://sinonjs.org/" target="blank"><img class="grow" src="{{ "/assets/images/logo.png" | prepend: site.baseurl }}" alt="Sinon.JS"></a> <p><a target="blank" class="join-btn" href="https://stackoverflow.com/questions/tagged/sinon">Join the discussion on Stack Overflow!</a></p> <p>Copyright 2010 - 2018, the Sinon.JS committers.</p> <p>Released under the <a href="https://opensource.org/licenses/BSD-3-Clause">BSD license</a>.</p> </div> </div>
<script src="{{ "/assets/js/prism.js" | prepend: site.baseurl }}"></script> <div class="footer"> <div class="container text-center"> <a href="http://sinonjs.org/" target="blank"><img class="grow" src="{{ "/assets/images/logo.png" | prepend: site.baseurl }}" alt="Sinon.JS"></a> <p><a target="blank" class="join-btn" href="https://stackoverflow.com/questions/tagged/sinon">Join the discussion on Stack Overflow!</a></p> <p>All copyright is reserved the Sinon committers.</p> <p>Released under the <a href="https://opensource.org/licenses/BSD-3-Clause">BSD license</a>.</p> </div> </div>
Remove year from copyright statement
Remove year from copyright statement See extended discussion in #2015
HTML
bsd-3-clause
cjohansen/Sinon.JS,cjohansen/Sinon.JS,mroderick/Sinon.JS,mroderick/Sinon.JS,fatso83/Sinon.JS,fatso83/Sinon.JS,mroderick/Sinon.JS,fatso83/Sinon.JS,cjohansen/Sinon.JS
html
## Code Before: <script src="{{ "/assets/js/prism.js" | prepend: site.baseurl }}"></script> <div class="footer"> <div class="container text-center"> <a href="http://sinonjs.org/" target="blank"><img class="grow" src="{{ "/assets/images/logo.png" | prepend: site.baseurl }}" alt="Sinon.JS"></a> <p><a target="blank" class="join-btn" href="https://stackoverflow.com/questions/tagged/sinon">Join the discussion on Stack Overflow!</a></p> <p>Copyright 2010 - 2018, the Sinon.JS committers.</p> <p>Released under the <a href="https://opensource.org/licenses/BSD-3-Clause">BSD license</a>.</p> </div> </div> ## Instruction: Remove year from copyright statement See extended discussion in #2015 ## Code After: <script src="{{ "/assets/js/prism.js" | prepend: site.baseurl }}"></script> <div class="footer"> <div class="container text-center"> <a href="http://sinonjs.org/" target="blank"><img class="grow" src="{{ "/assets/images/logo.png" | prepend: site.baseurl }}" alt="Sinon.JS"></a> <p><a target="blank" class="join-btn" href="https://stackoverflow.com/questions/tagged/sinon">Join the discussion on Stack Overflow!</a></p> <p>All copyright is reserved the Sinon committers.</p> <p>Released under the <a href="https://opensource.org/licenses/BSD-3-Clause">BSD license</a>.</p> </div> </div>
<script src="{{ "/assets/js/prism.js" | prepend: site.baseurl }}"></script> <div class="footer"> <div class="container text-center"> <a href="http://sinonjs.org/" target="blank"><img class="grow" src="{{ "/assets/images/logo.png" | prepend: site.baseurl }}" alt="Sinon.JS"></a> <p><a target="blank" class="join-btn" href="https://stackoverflow.com/questions/tagged/sinon">Join the discussion on Stack Overflow!</a></p> - <p>Copyright 2010 - 2018, the Sinon.JS committers.</p> + <p>All copyright is reserved the Sinon committers.</p> <p>Released under the <a href="https://opensource.org/licenses/BSD-3-Clause">BSD license</a>.</p> </div> </div>
2
0.2
1
1
3c7827b60071b13aea2313c20ca9f14c10453fc6
.travis.yml
.travis.yml
language: ruby rvm: - "2.1.0" env: - "TEST_DB=rehttp_test TEST_DB_USER=postgres" before_script: - "psql -c 'create database rehttp_test;' -U postgres" script: "bundle exec rspec spec" before_install: "script/cibuild"
language: ruby rvm: - "2.1.0" env: - "TEST_DB=rehttp_test TEST_DB_USER=postgres" before_script: - "psql -c 'create database rehttp_test;' -U postgres" script: "bundle exec rake db:migrate db:test:prepare spec" before_install: "script/cibuild"
Add in rake db tasks
Add in rake db tasks
YAML
mit
rehttp/rehttp,rehttp/rehttp,rehttp/rehttp
yaml
## Code Before: language: ruby rvm: - "2.1.0" env: - "TEST_DB=rehttp_test TEST_DB_USER=postgres" before_script: - "psql -c 'create database rehttp_test;' -U postgres" script: "bundle exec rspec spec" before_install: "script/cibuild" ## Instruction: Add in rake db tasks ## Code After: language: ruby rvm: - "2.1.0" env: - "TEST_DB=rehttp_test TEST_DB_USER=postgres" before_script: - "psql -c 'create database rehttp_test;' -U postgres" script: "bundle exec rake db:migrate db:test:prepare spec" before_install: "script/cibuild"
language: ruby rvm: - "2.1.0" env: - "TEST_DB=rehttp_test TEST_DB_USER=postgres" before_script: - "psql -c 'create database rehttp_test;' -U postgres" - script: "bundle exec rspec spec" + script: "bundle exec rake db:migrate db:test:prepare spec" before_install: "script/cibuild"
2
0.222222
1
1
6c6be957d8047f4fc67057d4a57842fcd56c40b5
assets/extra.js
assets/extra.js
$( window ).load(function() { var togglePanel = function(panelId, link){ var panel = $(panelId); panel.toggle(); if(panel.is(":visible")){ $(link).html('<span class="glyphicon glyphicon-circle-arrow-up">Hide</span>'); }else{ $(link).html('<span class="glyphicon glyphicon-circle-arrow-down">Show</span>'); } }; $('#togglePanel').click(function(){ togglePanel('#input_panel', this); }); $('#toggleLegend').click(function(){ togglePanel('#zone_legend', this); }); $('#toggleMapLegend').click(function(){ togglePanel('#map_legend', this); }); var initMap = function(){ if($(map).data('leaflet-map')){ // lMap is the leaflet map object see http://leafletjs.com/reference.html var lMap = $(map).data('leaflet-map'); L.control.scale().addTo(lMap); } else { setTimeout(initMap, 100); } }; initMap(); $("#printBtn").click(function(){ $('#map').print(); }); });
$( window ).load(function() { var togglePanel = function(panelId, link){ var panel = $(panelId); panel.toggle(); if(panel.is(":visible")){ $(link).html('<span class="glyphicon glyphicon-circle-arrow-up">Hide</span>'); }else{ $(link).html('<span class="glyphicon glyphicon-circle-arrow-down">Show</span>'); } }; $('#togglePanel').click(function(){ togglePanel('#input_panel', this); }); $('#toggleLegend').click(function(){ togglePanel('#zone_legend', this); }); $('#toggleMapLegend').click(function(){ togglePanel('#map_legend', this); }); $('select').addClass("form-control"); var initMap = function(){ if($(map).data('leaflet-map')){ // lMap is the leaflet map object see http://leafletjs.com/reference.html var lMap = $(map).data('leaflet-map'); L.control.scale().addTo(lMap); } else { setTimeout(initMap, 100); } }; initMap(); $("#printBtn").click(function(){ $('#map').print(); }); });
Add missing class to select
Add missing class to select
JavaScript
agpl-3.0
npct/pct-shiny,npct/pct-shiny,npct/pct-shiny,npct/pct-shiny,npct/pct-shiny,npct/pct-shiny
javascript
## Code Before: $( window ).load(function() { var togglePanel = function(panelId, link){ var panel = $(panelId); panel.toggle(); if(panel.is(":visible")){ $(link).html('<span class="glyphicon glyphicon-circle-arrow-up">Hide</span>'); }else{ $(link).html('<span class="glyphicon glyphicon-circle-arrow-down">Show</span>'); } }; $('#togglePanel').click(function(){ togglePanel('#input_panel', this); }); $('#toggleLegend').click(function(){ togglePanel('#zone_legend', this); }); $('#toggleMapLegend').click(function(){ togglePanel('#map_legend', this); }); var initMap = function(){ if($(map).data('leaflet-map')){ // lMap is the leaflet map object see http://leafletjs.com/reference.html var lMap = $(map).data('leaflet-map'); L.control.scale().addTo(lMap); } else { setTimeout(initMap, 100); } }; initMap(); $("#printBtn").click(function(){ $('#map').print(); }); }); ## Instruction: Add missing class to select ## Code After: $( window ).load(function() { var togglePanel = function(panelId, link){ var panel = $(panelId); panel.toggle(); if(panel.is(":visible")){ $(link).html('<span class="glyphicon glyphicon-circle-arrow-up">Hide</span>'); }else{ $(link).html('<span class="glyphicon glyphicon-circle-arrow-down">Show</span>'); } }; $('#togglePanel').click(function(){ togglePanel('#input_panel', this); }); $('#toggleLegend').click(function(){ togglePanel('#zone_legend', this); }); $('#toggleMapLegend').click(function(){ togglePanel('#map_legend', this); }); $('select').addClass("form-control"); var initMap = function(){ if($(map).data('leaflet-map')){ // lMap is the leaflet map object see http://leafletjs.com/reference.html var lMap = $(map).data('leaflet-map'); L.control.scale().addTo(lMap); } else { setTimeout(initMap, 100); } }; initMap(); $("#printBtn").click(function(){ $('#map').print(); }); });
$( window ).load(function() { var togglePanel = function(panelId, link){ var panel = $(panelId); panel.toggle(); if(panel.is(":visible")){ $(link).html('<span class="glyphicon glyphicon-circle-arrow-up">Hide</span>'); }else{ $(link).html('<span class="glyphicon glyphicon-circle-arrow-down">Show</span>'); } }; $('#togglePanel').click(function(){ togglePanel('#input_panel', this); }); $('#toggleLegend').click(function(){ togglePanel('#zone_legend', this); }); $('#toggleMapLegend').click(function(){ togglePanel('#map_legend', this); }); - + $('select').addClass("form-control"); var initMap = function(){ if($(map).data('leaflet-map')){ // lMap is the leaflet map object see http://leafletjs.com/reference.html var lMap = $(map).data('leaflet-map'); L.control.scale().addTo(lMap); } else { setTimeout(initMap, 100); } }; initMap(); $("#printBtn").click(function(){ $('#map').print(); }); });
2
0.066667
1
1
8991eb9beb25b353478bf800143529bf908086c3
src/app/productBrowse/README.md
src/app/productBrowse/README.md
The Product Browse component renders a paginated list of all visible products. ``` productBrowse/ |- js/ | |- productBrowse.config.js | |- productBrowse.controller.js | |- productBrowse.service.js | |- productBrowseMobileCategory.modal.controller.js | |- productBrowseProductView.controller.js |- templates/ | |- mobileCategory.modal.html | |- productBrowse.html | |- productView.html |- tests/ | |- productBrowse.spec.js ``` ___ ## productView.html The Product View template contains the html for the Product List, including Product List filters and pagination. ## productBrowse.html The Product Browse template contains the html for a Category Tree as well as the ui-view that pulls in the Product View. ## mobileCategory.modal.html On smaller viewports, the Category Tree left nav is hidden, and replaced with a modal. ## card.product.html Each product is represented within a Product Card. The Product Card template can be found at [common/templates/card.product.html](../common/templates/card.product.html). ## Styling Styling for the Product Browse and Product Card components is located in the following files: `styles/components/_catalog-card.less` `styles/components/_product-browse.less` `styles/layout/_catalog-grid.less`
The Product Browse component renders a paginated list of all visible products. ``` productBrowse/ |- js/ | |- productBrowse.config.js | |- productBrowse.controller.js | |- productBrowse.service.js | |- productBrowseMobileCategory.modal.controller.js | |- productBrowseProductView.controller.js |- templates/ | |- mobileCategory.modal.html | |- productBrowse.html | |- productView.html |- tests/ | |- productBrowse.spec.js ``` ___ ## productView.html The Product View template contains the html for the Product List, including Product List filters and pagination. ## productBrowse.html The Product Browse template contains the html for a Category Tree as well as the ui-view that pulls in the Product View. ## mobileCategory.modal.html On smaller viewports, the Category Tree left nav is hidden, and replaced with a modal. ## card.product.html Each product is represented within a Product Card. The Product Card template can be found at [common/templates/card.product.html](../common/templates/card.product.html). ## Styling Styling for the Product Browse and Product Card components is located in the following files: `styles/components/_catalog-card.less` `styles/components/_product-browse.less` `styles/layout/_catalog-grid.less` Flexbox is used on the Product List to set equal heights on the Product Cards. This creates a layout, and will also prevent float issues caused by the lack of a clearing element between rows.
Add flexbox details to readme
Add flexbox details to readme OC-2057
Markdown
mit
spencerwalker/angular-buyer,Four51/demo_buyer,ordercloud-api/angular-buyer,Four51SteveDavis/JohnsonBros,crhistianr/angular-buyer,spencerwalker/angular-buyer,Four51/demo_buyer,ordercloud-api/angular-buyer,crhistianr/angular-buyer,Four51SteveDavis/JohnsonBros
markdown
## Code Before: The Product Browse component renders a paginated list of all visible products. ``` productBrowse/ |- js/ | |- productBrowse.config.js | |- productBrowse.controller.js | |- productBrowse.service.js | |- productBrowseMobileCategory.modal.controller.js | |- productBrowseProductView.controller.js |- templates/ | |- mobileCategory.modal.html | |- productBrowse.html | |- productView.html |- tests/ | |- productBrowse.spec.js ``` ___ ## productView.html The Product View template contains the html for the Product List, including Product List filters and pagination. ## productBrowse.html The Product Browse template contains the html for a Category Tree as well as the ui-view that pulls in the Product View. ## mobileCategory.modal.html On smaller viewports, the Category Tree left nav is hidden, and replaced with a modal. ## card.product.html Each product is represented within a Product Card. The Product Card template can be found at [common/templates/card.product.html](../common/templates/card.product.html). ## Styling Styling for the Product Browse and Product Card components is located in the following files: `styles/components/_catalog-card.less` `styles/components/_product-browse.less` `styles/layout/_catalog-grid.less` ## Instruction: Add flexbox details to readme OC-2057 ## Code After: The Product Browse component renders a paginated list of all visible products. ``` productBrowse/ |- js/ | |- productBrowse.config.js | |- productBrowse.controller.js | |- productBrowse.service.js | |- productBrowseMobileCategory.modal.controller.js | |- productBrowseProductView.controller.js |- templates/ | |- mobileCategory.modal.html | |- productBrowse.html | |- productView.html |- tests/ | |- productBrowse.spec.js ``` ___ ## productView.html The Product View template contains the html for the Product List, including Product List filters and pagination. ## productBrowse.html The Product Browse template contains the html for a Category Tree as well as the ui-view that pulls in the Product View. ## mobileCategory.modal.html On smaller viewports, the Category Tree left nav is hidden, and replaced with a modal. ## card.product.html Each product is represented within a Product Card. The Product Card template can be found at [common/templates/card.product.html](../common/templates/card.product.html). ## Styling Styling for the Product Browse and Product Card components is located in the following files: `styles/components/_catalog-card.less` `styles/components/_product-browse.less` `styles/layout/_catalog-grid.less` Flexbox is used on the Product List to set equal heights on the Product Cards. This creates a layout, and will also prevent float issues caused by the lack of a clearing element between rows.
The Product Browse component renders a paginated list of all visible products. ``` productBrowse/ |- js/ | |- productBrowse.config.js | |- productBrowse.controller.js | |- productBrowse.service.js | |- productBrowseMobileCategory.modal.controller.js | |- productBrowseProductView.controller.js |- templates/ | |- mobileCategory.modal.html | |- productBrowse.html | |- productView.html |- tests/ | |- productBrowse.spec.js ``` ___ ## productView.html The Product View template contains the html for the Product List, including Product List filters and pagination. ## productBrowse.html The Product Browse template contains the html for a Category Tree as well as the ui-view that pulls in the Product View. ## mobileCategory.modal.html On smaller viewports, the Category Tree left nav is hidden, and replaced with a modal. ## card.product.html Each product is represented within a Product Card. The Product Card template can be found at [common/templates/card.product.html](../common/templates/card.product.html). ## Styling Styling for the Product Browse and Product Card components is located in the following files: `styles/components/_catalog-card.less` `styles/components/_product-browse.less` `styles/layout/_catalog-grid.less` + + Flexbox is used on the Product List to set equal heights on the Product Cards. This creates a layout, and will also prevent float issues caused by the lack of a clearing element between rows.
2
0.064516
2
0
43135538ac08a6a64ae8da935e188224999a1a16
indy_node/server/validator_info_tool.py
indy_node/server/validator_info_tool.py
import importlib from indy_node.__metadata__ import __version__ as node_pgk_version from plenum.server.validator_info_tool import none_on_fail, \ ValidatorNodeInfoTool as PlenumValidatorNodeInfoTool class ValidatorNodeInfoTool(PlenumValidatorNodeInfoTool): @property def info(self): info = super().info info['metrics']['transaction-count'].update( config=self.__config_ledger_size ) info.update( software={ 'indy-node': self.__node_pkg_version, 'sovrin': self.__sovrin_pkg_version, } ) return info @property @none_on_fail def __config_ledger_size(self): return self._node.configLedger.size @property @none_on_fail def __node_pkg_version(self): return node_pgk_version @property @none_on_fail def __sovrin_pkg_version(self): return importlib.import_module('sovrin').__version__
import importlib from indy_node.__metadata__ import __version__ as node_pgk_version from plenum.server.validator_info_tool import none_on_fail, \ ValidatorNodeInfoTool as PlenumValidatorNodeInfoTool class ValidatorNodeInfoTool(PlenumValidatorNodeInfoTool): @property def info(self): info = super().info if 'Node_info' in info: if 'Metrics' in info['Node_info']: info['Node_info']['Metrics']['transaction-count'].update( config=self.__config_ledger_size ) if 'Software' in info: info['Software'].update( { 'indy-node': self.__node_pkg_version, 'sovrin': self.__sovrin_pkg_version, } ) return info @property @none_on_fail def __config_ledger_size(self): return self._node.configLedger.size @property @none_on_fail def __node_pkg_version(self): return node_pgk_version @property @none_on_fail def __sovrin_pkg_version(self): return importlib.import_module('sovrin').__version__
Add new dict format into node validator-info
[INDY-1175] Add new dict format into node validator-info Signed-off-by: Andrew Nikitin <3988702a677b83abef1980fca266e406bb150845@dsr-corporation.com>
Python
apache-2.0
spivachuk/sovrin-node,spivachuk/sovrin-node,spivachuk/sovrin-node,spivachuk/sovrin-node
python
## Code Before: import importlib from indy_node.__metadata__ import __version__ as node_pgk_version from plenum.server.validator_info_tool import none_on_fail, \ ValidatorNodeInfoTool as PlenumValidatorNodeInfoTool class ValidatorNodeInfoTool(PlenumValidatorNodeInfoTool): @property def info(self): info = super().info info['metrics']['transaction-count'].update( config=self.__config_ledger_size ) info.update( software={ 'indy-node': self.__node_pkg_version, 'sovrin': self.__sovrin_pkg_version, } ) return info @property @none_on_fail def __config_ledger_size(self): return self._node.configLedger.size @property @none_on_fail def __node_pkg_version(self): return node_pgk_version @property @none_on_fail def __sovrin_pkg_version(self): return importlib.import_module('sovrin').__version__ ## Instruction: [INDY-1175] Add new dict format into node validator-info Signed-off-by: Andrew Nikitin <3988702a677b83abef1980fca266e406bb150845@dsr-corporation.com> ## Code After: import importlib from indy_node.__metadata__ import __version__ as node_pgk_version from plenum.server.validator_info_tool import none_on_fail, \ ValidatorNodeInfoTool as PlenumValidatorNodeInfoTool class ValidatorNodeInfoTool(PlenumValidatorNodeInfoTool): @property def info(self): info = super().info if 'Node_info' in info: if 'Metrics' in info['Node_info']: info['Node_info']['Metrics']['transaction-count'].update( config=self.__config_ledger_size ) if 'Software' in info: info['Software'].update( { 'indy-node': self.__node_pkg_version, 'sovrin': self.__sovrin_pkg_version, } ) return info @property @none_on_fail def __config_ledger_size(self): return self._node.configLedger.size @property @none_on_fail def __node_pkg_version(self): return node_pgk_version @property @none_on_fail def __sovrin_pkg_version(self): return importlib.import_module('sovrin').__version__
import importlib from indy_node.__metadata__ import __version__ as node_pgk_version from plenum.server.validator_info_tool import none_on_fail, \ ValidatorNodeInfoTool as PlenumValidatorNodeInfoTool class ValidatorNodeInfoTool(PlenumValidatorNodeInfoTool): @property def info(self): info = super().info + if 'Node_info' in info: + if 'Metrics' in info['Node_info']: - info['metrics']['transaction-count'].update( ? ^ + info['Node_info']['Metrics']['transaction-count'].update( ? ++++++++ ^^^^^^^^^^^^^^ - config=self.__config_ledger_size + config=self.__config_ledger_size ? ++++++++ - ) - info.update( - software={ + ) + if 'Software' in info: + info['Software'].update( + { - 'indy-node': self.__node_pkg_version, + 'indy-node': self.__node_pkg_version, ? ++++ - 'sovrin': self.__sovrin_pkg_version, + 'sovrin': self.__sovrin_pkg_version, ? ++++ + } - } ? ^ + ) ? ^ - ) return info @property @none_on_fail def __config_ledger_size(self): return self._node.configLedger.size @property @none_on_fail def __node_pkg_version(self): return node_pgk_version @property @none_on_fail def __sovrin_pkg_version(self): return importlib.import_module('sovrin').__version__
21
0.567568
12
9
7abfba2834aace95777de3c56869fe0bae501fdc
zsh/aliases.zsh
zsh/aliases.zsh
if [[ "$os" = "$linux_str" ]]; then alias ls='ls --color=auto' alias dir='dir --color=auto' # Pacman aliases alias pacman=run_pacman # ssh aliases alias usshfs='fusermount -u $HOME/Remote' # set monitor brighness alias sb=set_brightness alias sbr=set_brightness_rel # get current brightness alias gb=get_brightness alias no=notify elif [[ "$os" = "$osx_str" ]]; then alias ls='ls -G' # ssh aliases alias usshfs='umount $HOME/Remote' fi alias gcssh='gcloud compute ssh' # Some useful tmux alias alias t='tmux new-session -s' # Create new session, should pass name alias ta='tmux a -t' # Attach to a session alias tn='tmux new-session -t' # Attach to a session, independent control alias tl='tmux ls' alias tk='tmux kill-session -t' alias nv=nvim alias grep='grep --color=always' # Protect me from myself alias rm='echo "No."; false' # trash-cli alias tm=trash-put # man aliases alias man=run_man # Compression aliases alias tarx='tar -xvf' alias targz='tar -zxvf' alias tarbz2= 'tar -jxvf' # Aliases for stack managed executables alias sghc='stack ghc' alias srunghc='stack runghc'
if [[ "$os" = "$linux_str" ]]; then alias ls='ls --color=auto' alias dir='dir --color=auto' # Pacman aliases alias pacman=run_pacman # ssh aliases alias usshfs='fusermount -u $HOME/Remote' # set monitor brighness alias sb=set_brightness alias sbr=set_brightness_rel # get current brightness alias gb=get_brightness alias no=notify elif [[ "$os" = "$osx_str" ]]; then alias ls='ls -G' # ssh aliases alias usshfs='umount $HOME/Remote' fi alias gcssh='TERM=xterm-256color gcloud compute ssh' # Some useful tmux alias alias t='tmux new-session -s' # Create new session, should pass name alias ta='tmux a -t' # Attach to a session alias tn='tmux new-session -t' # Attach to a session, independent control alias tl='tmux ls' alias tk='tmux kill-session -t' alias nv=nvim alias grep='grep --color=always' # Protect me from myself alias rm='echo "No."; false' # trash-cli alias tm=trash-put # man aliases alias man=run_man # Compression aliases alias tarx='tar -xvf' alias targz='tar -zxvf' alias tarbz2= 'tar -jxvf' # Aliases for stack managed executables alias sghc='stack ghc' alias srunghc='stack runghc'
Set TERM when using gcloud compute ssh
Set TERM when using gcloud compute ssh
Shell
mit
SCSmithr/dotfiles
shell
## Code Before: if [[ "$os" = "$linux_str" ]]; then alias ls='ls --color=auto' alias dir='dir --color=auto' # Pacman aliases alias pacman=run_pacman # ssh aliases alias usshfs='fusermount -u $HOME/Remote' # set monitor brighness alias sb=set_brightness alias sbr=set_brightness_rel # get current brightness alias gb=get_brightness alias no=notify elif [[ "$os" = "$osx_str" ]]; then alias ls='ls -G' # ssh aliases alias usshfs='umount $HOME/Remote' fi alias gcssh='gcloud compute ssh' # Some useful tmux alias alias t='tmux new-session -s' # Create new session, should pass name alias ta='tmux a -t' # Attach to a session alias tn='tmux new-session -t' # Attach to a session, independent control alias tl='tmux ls' alias tk='tmux kill-session -t' alias nv=nvim alias grep='grep --color=always' # Protect me from myself alias rm='echo "No."; false' # trash-cli alias tm=trash-put # man aliases alias man=run_man # Compression aliases alias tarx='tar -xvf' alias targz='tar -zxvf' alias tarbz2= 'tar -jxvf' # Aliases for stack managed executables alias sghc='stack ghc' alias srunghc='stack runghc' ## Instruction: Set TERM when using gcloud compute ssh ## Code After: if [[ "$os" = "$linux_str" ]]; then alias ls='ls --color=auto' alias dir='dir --color=auto' # Pacman aliases alias pacman=run_pacman # ssh aliases alias usshfs='fusermount -u $HOME/Remote' # set monitor brighness alias sb=set_brightness alias sbr=set_brightness_rel # get current brightness alias gb=get_brightness alias no=notify elif [[ "$os" = "$osx_str" ]]; then alias ls='ls -G' # ssh aliases alias usshfs='umount $HOME/Remote' fi alias gcssh='TERM=xterm-256color gcloud compute ssh' # Some useful tmux alias alias t='tmux new-session -s' # Create new session, should pass name alias ta='tmux a -t' # Attach to a session alias tn='tmux new-session -t' # Attach to a session, independent control alias tl='tmux ls' alias tk='tmux kill-session -t' alias nv=nvim alias grep='grep --color=always' # Protect me from myself alias rm='echo "No."; false' # trash-cli alias tm=trash-put # man aliases alias man=run_man # Compression aliases alias tarx='tar -xvf' alias targz='tar -zxvf' alias tarbz2= 'tar -jxvf' # Aliases for stack managed executables alias sghc='stack ghc' alias srunghc='stack runghc'
if [[ "$os" = "$linux_str" ]]; then alias ls='ls --color=auto' alias dir='dir --color=auto' # Pacman aliases alias pacman=run_pacman # ssh aliases alias usshfs='fusermount -u $HOME/Remote' # set monitor brighness alias sb=set_brightness alias sbr=set_brightness_rel # get current brightness alias gb=get_brightness alias no=notify elif [[ "$os" = "$osx_str" ]]; then alias ls='ls -G' # ssh aliases alias usshfs='umount $HOME/Remote' fi - alias gcssh='gcloud compute ssh' + alias gcssh='TERM=xterm-256color gcloud compute ssh' ? ++++++++++++++++++++ # Some useful tmux alias alias t='tmux new-session -s' # Create new session, should pass name alias ta='tmux a -t' # Attach to a session alias tn='tmux new-session -t' # Attach to a session, independent control alias tl='tmux ls' alias tk='tmux kill-session -t' alias nv=nvim alias grep='grep --color=always' # Protect me from myself alias rm='echo "No."; false' # trash-cli alias tm=trash-put # man aliases alias man=run_man # Compression aliases alias tarx='tar -xvf' alias targz='tar -zxvf' alias tarbz2= 'tar -jxvf' # Aliases for stack managed executables alias sghc='stack ghc' alias srunghc='stack runghc'
2
0.037736
1
1
c1b87836082eeb2414243a6e2b9d903ad0119233
lib/cli.rb
lib/cli.rb
require "colorize" require "rambo/document_generator" module Rambo class CLI def initialize(raml_file=nil, opts={}, stdout=STDOUT, stderr=STDERR) @stdout = stdout @stderr = stderr @file = raml_file @options = opts validate! end def run! print_logo begin Rambo::DocumentGenerator.generate!(file, options) stdout.puts("Generating contract tests...") sleep 0.4 stdout.puts("Done!".green) rescue NoMethodError => e stderr.puts("Error: #{e.message}".red) stderr.puts "\t#{e.backtrace.join("\n\t")}" end end def validate! exit_for_missing_file unless file exit_for_invalid_file_format unless file.match(/\.raml$/) end private attr_accessor :file, :stdout, :stderr, :generator, :options def print_logo stdout.puts logo.colorize(color: String.colors.sample) sleep 0.4 end def exit_for_missing_file stdout.puts "USAGE: rambo [FILE]" exit 1 end def exit_for_invalid_file_format stdout.puts "Unsupported file format. Please choose a RAML file." exit 1 end def logo File.read(File.expand_path("../../../assets/logo.txt", __FILE__)) end end end
require "colorize" require "rambo" module Rambo class CLI def initialize(raml_file=nil, opts={}, stdout=STDOUT, stderr=STDERR) @stdout = stdout @stderr = stderr @file = raml_file @options = opts validate! end def run! print_logo begin Rambo.generate_contract_tests!(file, options) stdout.puts("Generating contract tests...") sleep 0.4 stdout.puts("Done!".green) rescue NoMethodError => e stderr.puts("Error: #{e.message}".red) stderr.puts "\t#{e.backtrace.join("\n\t")}" end end def validate! exit_for_missing_file unless file exit_for_invalid_file_format unless file.match(/\.raml$/) end private attr_accessor :file, :stdout, :stderr, :generator, :options def print_logo stdout.puts logo.colorize(color: String.colors.sample) sleep 0.4 end def exit_for_missing_file stdout.puts "USAGE: rambo [FILE]" exit 1 end def exit_for_invalid_file_format stdout.puts "Unsupported file format. Please choose a RAML file." exit 1 end def logo File.read(File.expand_path("../../assets/logo.txt", __FILE__)) end end end
Use Rambo module as sole entry point to app
Use Rambo module as sole entry point to app
Ruby
mit
danascheider/rambo,danascheider/rambo
ruby
## Code Before: require "colorize" require "rambo/document_generator" module Rambo class CLI def initialize(raml_file=nil, opts={}, stdout=STDOUT, stderr=STDERR) @stdout = stdout @stderr = stderr @file = raml_file @options = opts validate! end def run! print_logo begin Rambo::DocumentGenerator.generate!(file, options) stdout.puts("Generating contract tests...") sleep 0.4 stdout.puts("Done!".green) rescue NoMethodError => e stderr.puts("Error: #{e.message}".red) stderr.puts "\t#{e.backtrace.join("\n\t")}" end end def validate! exit_for_missing_file unless file exit_for_invalid_file_format unless file.match(/\.raml$/) end private attr_accessor :file, :stdout, :stderr, :generator, :options def print_logo stdout.puts logo.colorize(color: String.colors.sample) sleep 0.4 end def exit_for_missing_file stdout.puts "USAGE: rambo [FILE]" exit 1 end def exit_for_invalid_file_format stdout.puts "Unsupported file format. Please choose a RAML file." exit 1 end def logo File.read(File.expand_path("../../../assets/logo.txt", __FILE__)) end end end ## Instruction: Use Rambo module as sole entry point to app ## Code After: require "colorize" require "rambo" module Rambo class CLI def initialize(raml_file=nil, opts={}, stdout=STDOUT, stderr=STDERR) @stdout = stdout @stderr = stderr @file = raml_file @options = opts validate! end def run! print_logo begin Rambo.generate_contract_tests!(file, options) stdout.puts("Generating contract tests...") sleep 0.4 stdout.puts("Done!".green) rescue NoMethodError => e stderr.puts("Error: #{e.message}".red) stderr.puts "\t#{e.backtrace.join("\n\t")}" end end def validate! exit_for_missing_file unless file exit_for_invalid_file_format unless file.match(/\.raml$/) end private attr_accessor :file, :stdout, :stderr, :generator, :options def print_logo stdout.puts logo.colorize(color: String.colors.sample) sleep 0.4 end def exit_for_missing_file stdout.puts "USAGE: rambo [FILE]" exit 1 end def exit_for_invalid_file_format stdout.puts "Unsupported file format. Please choose a RAML file." exit 1 end def logo File.read(File.expand_path("../../assets/logo.txt", __FILE__)) end end end
require "colorize" - require "rambo/document_generator" + require "rambo" module Rambo class CLI def initialize(raml_file=nil, opts={}, stdout=STDOUT, stderr=STDERR) @stdout = stdout @stderr = stderr @file = raml_file @options = opts validate! end def run! print_logo begin - Rambo::DocumentGenerator.generate!(file, options) + Rambo.generate_contract_tests!(file, options) stdout.puts("Generating contract tests...") sleep 0.4 stdout.puts("Done!".green) rescue NoMethodError => e stderr.puts("Error: #{e.message}".red) stderr.puts "\t#{e.backtrace.join("\n\t")}" end end def validate! exit_for_missing_file unless file exit_for_invalid_file_format unless file.match(/\.raml$/) end private attr_accessor :file, :stdout, :stderr, :generator, :options def print_logo stdout.puts logo.colorize(color: String.colors.sample) sleep 0.4 end def exit_for_missing_file stdout.puts "USAGE: rambo [FILE]" exit 1 end def exit_for_invalid_file_format stdout.puts "Unsupported file format. Please choose a RAML file." exit 1 end def logo - File.read(File.expand_path("../../../assets/logo.txt", __FILE__)) ? --- + File.read(File.expand_path("../../assets/logo.txt", __FILE__)) end end end
6
0.101695
3
3
79803b05a3d271d38b8778f7678de5289bca7093
_posts/2017-02-28-week-2-appearances.md
_posts/2017-02-28-week-2-appearances.md
--- layout: post title: "Week 2: Appearances" date: 2017-02-28 00:00:00 -0500 categories: week --- This week we will dive into CSS, looking at how to grab the different elements of our HTML and change their appearance. Also we will go over some the details of dealing with layout in CSS and the quirks of each layout. Also we will introduce our first project which will focus exclusively on CSS and some approaches other artists have used in transforming text into new works.
--- layout: post title: "Week 2: Style" date: 2017-02-28 00:00:00 -0500 categories: week --- This week we will dive into CSS, looking at how to grab the different elements of our HTML and change their appearance. Also we will go over some the details of dealing with layout in CSS and the quirks of each layout. Also we will introduce our first project which will focus exclusively on CSS and some approaches other artists have used in transforming text into new works.
Change week 2 title to style
Change week 2 title to style
Markdown
mit
Web-Projects-Course/web-projects-course.github.io,Web-Projects-Course/web-projects-course.github.io
markdown
## Code Before: --- layout: post title: "Week 2: Appearances" date: 2017-02-28 00:00:00 -0500 categories: week --- This week we will dive into CSS, looking at how to grab the different elements of our HTML and change their appearance. Also we will go over some the details of dealing with layout in CSS and the quirks of each layout. Also we will introduce our first project which will focus exclusively on CSS and some approaches other artists have used in transforming text into new works. ## Instruction: Change week 2 title to style ## Code After: --- layout: post title: "Week 2: Style" date: 2017-02-28 00:00:00 -0500 categories: week --- This week we will dive into CSS, looking at how to grab the different elements of our HTML and change their appearance. Also we will go over some the details of dealing with layout in CSS and the quirks of each layout. Also we will introduce our first project which will focus exclusively on CSS and some approaches other artists have used in transforming text into new works.
--- layout: post - title: "Week 2: Appearances" + title: "Week 2: Style" date: 2017-02-28 00:00:00 -0500 categories: week --- This week we will dive into CSS, looking at how to grab the different elements of our HTML and change their appearance. Also we will go over some the details of dealing with layout in CSS and the quirks of each layout. Also we will introduce our first project which will focus exclusively on CSS and some approaches other artists have used in transforming text into new works.
2
0.2
1
1
dd71b841587a989ef1a4c8baab640dea68ca50f8
src/scripts/content/gitlab.js
src/scripts/content/gitlab.js
/*jslint indent: 2, unparam: true*/ /*global $: false, document: false, togglbutton: false*/ 'use strict'; togglbutton.render('.issue .detail-page-description .title:not(.toggl)', {observe: true}, function (elem) { var link, description, titleElem = $(".issue .detail-page-description .title"), projectElem = $('.title').firstChild; description = titleElem.textContent; description = description.trim(); link = togglbutton.createTimerLink({ className: 'gitlab', description: description, projectName: projectElem.textContent.split(' / ').pop() }); $('.issue .detail-page-description h2.title').appendChild(link); });
/*jslint indent: 2, unparam: true*/ /*global $: false, document: false, togglbutton: false*/ 'use strict'; togglbutton.render('.issue .detail-page-description .title:not(.toggl)', {observe: true}, function (elem) { var link, description, numElem = $(".identifier"), titleElem = $(".issue .detail-page-description .title"), projectElem = $('.title').firstChild; description = titleElem.textContent; description = description.trim(); if (numElem !== null) { description = "#" + numElem.innerText.split("#").pop() + " " + description; } link = togglbutton.createTimerLink({ className: 'gitlab', description: description, projectName: projectElem.textContent.split(' / ').pop().split(' · ')[0] }); $('.issue .detail-page-description h2.title').appendChild(link); });
Include issue number in description, remove " · Issues" from projectName
Gitlab: Include issue number in description, remove " · Issues" from projectName
JavaScript
bsd-3-clause
kretel/toggl-button,bitbull-team/toggl-button,eatskolnikov/toggl-button,bitbull-team/toggl-button,glensc/toggl-button,kretel/toggl-button,andreimoldo/toggl-button,andreimoldo/toggl-button,topdown/toggl-button,glensc/toggl-button,glensc/toggl-button,eatskolnikov/toggl-button,topdown/toggl-button
javascript
## Code Before: /*jslint indent: 2, unparam: true*/ /*global $: false, document: false, togglbutton: false*/ 'use strict'; togglbutton.render('.issue .detail-page-description .title:not(.toggl)', {observe: true}, function (elem) { var link, description, titleElem = $(".issue .detail-page-description .title"), projectElem = $('.title').firstChild; description = titleElem.textContent; description = description.trim(); link = togglbutton.createTimerLink({ className: 'gitlab', description: description, projectName: projectElem.textContent.split(' / ').pop() }); $('.issue .detail-page-description h2.title').appendChild(link); }); ## Instruction: Gitlab: Include issue number in description, remove " · Issues" from projectName ## Code After: /*jslint indent: 2, unparam: true*/ /*global $: false, document: false, togglbutton: false*/ 'use strict'; togglbutton.render('.issue .detail-page-description .title:not(.toggl)', {observe: true}, function (elem) { var link, description, numElem = $(".identifier"), titleElem = $(".issue .detail-page-description .title"), projectElem = $('.title').firstChild; description = titleElem.textContent; description = description.trim(); if (numElem !== null) { description = "#" + numElem.innerText.split("#").pop() + " " + description; } link = togglbutton.createTimerLink({ className: 'gitlab', description: description, projectName: projectElem.textContent.split(' / ').pop().split(' · ')[0] }); $('.issue .detail-page-description h2.title').appendChild(link); });
/*jslint indent: 2, unparam: true*/ /*global $: false, document: false, togglbutton: false*/ 'use strict'; togglbutton.render('.issue .detail-page-description .title:not(.toggl)', {observe: true}, function (elem) { var link, description, + numElem = $(".identifier"), titleElem = $(".issue .detail-page-description .title"), projectElem = $('.title').firstChild; description = titleElem.textContent; description = description.trim(); - + + if (numElem !== null) { + description = "#" + numElem.innerText.split("#").pop() + " " + description; + } link = togglbutton.createTimerLink({ className: 'gitlab', description: description, - projectName: projectElem.textContent.split(' / ').pop() + projectName: projectElem.textContent.split(' / ').pop().split(' · ')[0] ? ++++++++++++++++ }); $('.issue .detail-page-description h2.title').appendChild(link); });
8
0.4
6
2
3a2d8b76605421079d9a865e0741c7ac40a1e167
app/controllers/user_controller.rb
app/controllers/user_controller.rb
class UserController < ApplicationController def all_users User.all end def all users_locations = {} users_transactions = {} all_users.each do |user| users_locations[user.name] = user.locations users_transactions[user.name] = user.transactions end render :json => {locations: users_locations, transactions: users_transactions} end end
class UserController < ApplicationController def all_users User.all end def all users_locations = {} users_transactions = {} all_users.each do |user| users_locations[user.name] = user.locations users_transactions[user.name] = user.transactions end render :json => {locations: users_locations, transactions: users_transactions} end def get_earning_transactions_and_locations_on_date date = params[:date] transactions = get_transactions_on_date(date, "earning") locations = get_locations_on_date(date) render :json => {transactions: transactions, locations: locations} end private def get_transactions_on_date(date, type) transactions = {} date = parse_date(date) all_users.each do |user| transactions[user.name] = user.transactions .where("created_at = ? AND transaction_type = ?", date, type) end transactions end def get_locations_on_date(date) locations = {} date = parse_date(date) all_users.each do |user| locations[user.name] = user.locations.where("created_at = ?", date) end locations end def parse_date(date) Time.parse(date).utc.beginning_of_day end end
Add controller to get transactions and locations for times of earning; Also add private helper methods directly into the controller instead of helpers file for ease of review
Add controller to get transactions and locations for times of earning; Also add private helper methods directly into the controller instead of helpers file for ease of review
Ruby
mit
jeremymcintyre/transaction-mappr,jeremymcintyre/transaction-mappr,jeremymcintyre/transaction-mappr
ruby
## Code Before: class UserController < ApplicationController def all_users User.all end def all users_locations = {} users_transactions = {} all_users.each do |user| users_locations[user.name] = user.locations users_transactions[user.name] = user.transactions end render :json => {locations: users_locations, transactions: users_transactions} end end ## Instruction: Add controller to get transactions and locations for times of earning; Also add private helper methods directly into the controller instead of helpers file for ease of review ## Code After: class UserController < ApplicationController def all_users User.all end def all users_locations = {} users_transactions = {} all_users.each do |user| users_locations[user.name] = user.locations users_transactions[user.name] = user.transactions end render :json => {locations: users_locations, transactions: users_transactions} end def get_earning_transactions_and_locations_on_date date = params[:date] transactions = get_transactions_on_date(date, "earning") locations = get_locations_on_date(date) render :json => {transactions: transactions, locations: locations} end private def get_transactions_on_date(date, type) transactions = {} date = parse_date(date) all_users.each do |user| transactions[user.name] = user.transactions .where("created_at = ? AND transaction_type = ?", date, type) end transactions end def get_locations_on_date(date) locations = {} date = parse_date(date) all_users.each do |user| locations[user.name] = user.locations.where("created_at = ?", date) end locations end def parse_date(date) Time.parse(date).utc.beginning_of_day end end
class UserController < ApplicationController def all_users User.all end def all users_locations = {} users_transactions = {} all_users.each do |user| users_locations[user.name] = user.locations users_transactions[user.name] = user.transactions end render :json => {locations: users_locations, transactions: users_transactions} end + + def get_earning_transactions_and_locations_on_date + date = params[:date] + transactions = get_transactions_on_date(date, "earning") + locations = get_locations_on_date(date) + render :json => {transactions: transactions, locations: locations} + end + + private + + def get_transactions_on_date(date, type) + transactions = {} + date = parse_date(date) + + all_users.each do |user| + transactions[user.name] = + user.transactions + .where("created_at = ? AND transaction_type = ?", + date, type) + end + transactions + end + + def get_locations_on_date(date) + locations = {} + date = parse_date(date) + + all_users.each do |user| + locations[user.name] = user.locations.where("created_at = ?", date) + end + locations + end + + def parse_date(date) + Time.parse(date).utc.beginning_of_day + end + end
37
2.466667
37
0
2757ab9ebaba347019468e3362abb4deee324140
ios/RCTOneSignal/RCTOneSignalEventEmitter.h
ios/RCTOneSignal/RCTOneSignalEventEmitter.h
typedef NS_ENUM(NSInteger, OSNotificationEventTypes) { NotificationReceived, NotificationOpened, IdsAvailable, EmailSubscriptionChanged }; #define OSNotificationEventTypesArray @[@"OneSignal-remoteNotificationReceived",@"OneSignal-remoteNotificationOpened",@"OneSignal-idsAvailable",@"OneSignal-emailSubscription"] #define OSEventString(enum) [OSNotificationEventTypesArray objectAtIndex:enum] @interface RCTOneSignalEventEmitter : RCTEventEmitter <RCTBridgeModule> + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body; + (BOOL)hasSetBridge; @end
typedef NS_ENUM(NSInteger, OSNotificationEventTypes) { NotificationReceived, NotificationOpened, IdsAvailable, EmailSubscriptionChanged, InAppMessageClicked }; #define OSNotificationEventTypesArray @[@"OneSignal-remoteNotificationReceived",@"OneSignal-remoteNotificationOpened",@"OneSignal-idsAvailable",@"OneSignal-emailSubscription",@"OneSignal-inAppMessageClicked"] #define OSEventString(enum) [OSNotificationEventTypesArray objectAtIndex:enum] @interface RCTOneSignalEventEmitter : RCTEventEmitter <RCTBridgeModule> + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body; + (BOOL)hasSetBridge; @end
Add InAppMessage event to iOS
Add InAppMessage event to iOS
C
mit
geektimecoil/react-native-onesignal,geektimecoil/react-native-onesignal,geektimecoil/react-native-onesignal
c
## Code Before: typedef NS_ENUM(NSInteger, OSNotificationEventTypes) { NotificationReceived, NotificationOpened, IdsAvailable, EmailSubscriptionChanged }; #define OSNotificationEventTypesArray @[@"OneSignal-remoteNotificationReceived",@"OneSignal-remoteNotificationOpened",@"OneSignal-idsAvailable",@"OneSignal-emailSubscription"] #define OSEventString(enum) [OSNotificationEventTypesArray objectAtIndex:enum] @interface RCTOneSignalEventEmitter : RCTEventEmitter <RCTBridgeModule> + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body; + (BOOL)hasSetBridge; @end ## Instruction: Add InAppMessage event to iOS ## Code After: typedef NS_ENUM(NSInteger, OSNotificationEventTypes) { NotificationReceived, NotificationOpened, IdsAvailable, EmailSubscriptionChanged, InAppMessageClicked }; #define OSNotificationEventTypesArray @[@"OneSignal-remoteNotificationReceived",@"OneSignal-remoteNotificationOpened",@"OneSignal-idsAvailable",@"OneSignal-emailSubscription",@"OneSignal-inAppMessageClicked"] #define OSEventString(enum) [OSNotificationEventTypesArray objectAtIndex:enum] @interface RCTOneSignalEventEmitter : RCTEventEmitter <RCTBridgeModule> + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body; + (BOOL)hasSetBridge; @end
typedef NS_ENUM(NSInteger, OSNotificationEventTypes) { NotificationReceived, NotificationOpened, IdsAvailable, - EmailSubscriptionChanged + EmailSubscriptionChanged, ? + + InAppMessageClicked }; - #define OSNotificationEventTypesArray @[@"OneSignal-remoteNotificationReceived",@"OneSignal-remoteNotificationOpened",@"OneSignal-idsAvailable",@"OneSignal-emailSubscription"] + #define OSNotificationEventTypesArray @[@"OneSignal-remoteNotificationReceived",@"OneSignal-remoteNotificationOpened",@"OneSignal-idsAvailable",@"OneSignal-emailSubscription",@"OneSignal-inAppMessageClicked"] ? +++++++++++++++++++++++++++++++++ #define OSEventString(enum) [OSNotificationEventTypesArray objectAtIndex:enum] - @interface RCTOneSignalEventEmitter : RCTEventEmitter <RCTBridgeModule> + (void)sendEventWithName:(NSString *)name withBody:(NSDictionary *)body; + (BOOL)hasSetBridge; @end
6
0.333333
3
3
1a149064f53560e72c3ff763683011e29e67604c
www/js/keyManager.js
www/js/keyManager.js
function displayKeys() { // Retrieve all keyPairs var sql = "select K.name from key K"; dbRetrieve(sql, [], function(res) { // Populate key list var html = '<hr>'; for (var i = 0; i < res.rows.length; ++i) { var keyName = res.rows.item(i).name; html += '<span onclick="showPubKey($(this).text());">' + keyName + '</span><br/><hr>'; } // Update GUI document.getElementById("key_list").innerHTML = html; }); } function showPubKey(keyName) { // Retrieve all keyPairs var sql = "select K.keyPair from key K where K.name = ?"; dbRetrieve(sql, [keyName.toString()], function(res) { if (res.rows.length === 1) { // Extract public key and create qr-code var key = buf2hex(cryptoJS.publicKey(hex2buf(res.rows.item(0).keyPair))); alert(key); cordova.plugins.barcodeScanner.encode(cordova.plugins.barcodeScanner.Encode.TEXT_TYPE, key, function (success) { alert('succes'); alert("Encode succes: " + success); }, function (fail) { alert('fail'); alert("Encoding failed: " + fail); } ); } }); }
function displayKeys() { // Retrieve all keyPairs var sql = "select K.name from key K"; dbRetrieve(sql, [], function(res) { // Populate key list var html = '<hr>'; for (var i = 0; i < 1; ++i) { var keyName = res.rows.item(i).name; html += '<button onclick="showPubKey(this.innerHTML);">' + keyName + '</button>'; } // Update GUI document.getElementById("key_list").innerHTML = html; }); } function showPubKey(keyName) { // Retrieve all keyPairs var sql = "select K.keyPair from key K where K.name = ?"; dbRetrieve(sql, [keyName.toString()], function(res) { if (res.rows.length === 1) { // Extract public key and create qr-code var key = buf2hex(cryptoJS.publicKey(hex2buf(res.rows.item(0).keyPair))); alert(key); cordova.plugins.barcodeScanner.encode(cordova.plugins.barcodeScanner.Encode.TEXT_TYPE, key, function (success) { alert('succes'); alert("Encode succes: " + success); }, function (fail) { alert('fail'); alert("Encoding failed: " + fail); } ); } }); }
Print key on click (try 5 - button)
Print key on click (try 5 - button)
JavaScript
agpl-3.0
lromerio/cothority-mobile,lromerio/cothority-mobile
javascript
## Code Before: function displayKeys() { // Retrieve all keyPairs var sql = "select K.name from key K"; dbRetrieve(sql, [], function(res) { // Populate key list var html = '<hr>'; for (var i = 0; i < res.rows.length; ++i) { var keyName = res.rows.item(i).name; html += '<span onclick="showPubKey($(this).text());">' + keyName + '</span><br/><hr>'; } // Update GUI document.getElementById("key_list").innerHTML = html; }); } function showPubKey(keyName) { // Retrieve all keyPairs var sql = "select K.keyPair from key K where K.name = ?"; dbRetrieve(sql, [keyName.toString()], function(res) { if (res.rows.length === 1) { // Extract public key and create qr-code var key = buf2hex(cryptoJS.publicKey(hex2buf(res.rows.item(0).keyPair))); alert(key); cordova.plugins.barcodeScanner.encode(cordova.plugins.barcodeScanner.Encode.TEXT_TYPE, key, function (success) { alert('succes'); alert("Encode succes: " + success); }, function (fail) { alert('fail'); alert("Encoding failed: " + fail); } ); } }); } ## Instruction: Print key on click (try 5 - button) ## Code After: function displayKeys() { // Retrieve all keyPairs var sql = "select K.name from key K"; dbRetrieve(sql, [], function(res) { // Populate key list var html = '<hr>'; for (var i = 0; i < 1; ++i) { var keyName = res.rows.item(i).name; html += '<button onclick="showPubKey(this.innerHTML);">' + keyName + '</button>'; } // Update GUI document.getElementById("key_list").innerHTML = html; }); } function showPubKey(keyName) { // Retrieve all keyPairs var sql = "select K.keyPair from key K where K.name = ?"; dbRetrieve(sql, [keyName.toString()], function(res) { if (res.rows.length === 1) { // Extract public key and create qr-code var key = buf2hex(cryptoJS.publicKey(hex2buf(res.rows.item(0).keyPair))); alert(key); cordova.plugins.barcodeScanner.encode(cordova.plugins.barcodeScanner.Encode.TEXT_TYPE, key, function (success) { alert('succes'); alert("Encode succes: " + success); }, function (fail) { alert('fail'); alert("Encoding failed: " + fail); } ); } }); }
function displayKeys() { // Retrieve all keyPairs var sql = "select K.name from key K"; dbRetrieve(sql, [], function(res) { // Populate key list var html = '<hr>'; - for (var i = 0; i < res.rows.length; ++i) { ? ^^^^^^^^^^^^^^^ + for (var i = 0; i < 1; ++i) { ? ^ var keyName = res.rows.item(i).name; - html += '<span onclick="showPubKey($(this).text());">' + keyName + '</span><br/><hr>'; ? ^^^ -- - ^ ^^^^ ^^^ --------- + html += '<button onclick="showPubKey(this.innerHTML);">' + keyName + '</button>'; ? ^^^^^ ^^^ ^^^^^ ^^^^^ } // Update GUI document.getElementById("key_list").innerHTML = html; }); } function showPubKey(keyName) { // Retrieve all keyPairs var sql = "select K.keyPair from key K where K.name = ?"; dbRetrieve(sql, [keyName.toString()], function(res) { if (res.rows.length === 1) { // Extract public key and create qr-code var key = buf2hex(cryptoJS.publicKey(hex2buf(res.rows.item(0).keyPair))); alert(key); cordova.plugins.barcodeScanner.encode(cordova.plugins.barcodeScanner.Encode.TEXT_TYPE, key, function (success) { alert('succes'); alert("Encode succes: " + success); }, function (fail) { alert('fail'); alert("Encoding failed: " + fail); } ); } }); }
4
0.086957
2
2
fa1ed734a1d019a527c61d468615bc46b495b420
src/main/java/net/openright/infrastructure/rest/JsonGetController.java
src/main/java/net/openright/infrastructure/rest/JsonGetController.java
package net.openright.infrastructure.rest; import java.io.IOException; import java.io.Writer; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class JsonGetController implements GetController { private static final Logger log = LoggerFactory.getLogger(JsonGetController.class); private JsonController jsonController; public JsonGetController(JsonController jsonController) { this.jsonController = jsonController; } @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String[] parts = req.getPathInfo().split("\\/"); try { JSONObject json = parts.length > 2 ? jsonController.getJSON(parts[2]) : jsonController.listJSON(req); log.info("JSON response: {}", json); sendResponse(resp, json); } catch (RequestException e) { log.warn("Invalid request {}: {}", req.getRequestURL(), e.toString()); resp.sendError(e.getStatusCode(), e.toString()); } } private void sendResponse(HttpServletResponse resp, JSONObject response) throws IOException { resp.setHeader("Expires", "-1"); if (response == null) { resp.setStatus(204); return; } resp.setContentType("application/json"); try (Writer writer = resp.getWriter()) { writer.write(response.toString()); } } }
package net.openright.infrastructure.rest; import java.io.IOException; import java.io.Writer; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class JsonGetController implements GetController { private static final Logger log = LoggerFactory.getLogger(JsonGetController.class); private JsonController jsonController; public JsonGetController(JsonController jsonController) { this.jsonController = jsonController; } @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String[] parts = req.getPathInfo().split("\\/"); try { JSONObject json = parts.length > 2 ? jsonController.getJSON(parts[2]) : jsonController.listJSON(req); log.info("JSON response: {}", json.toString()); sendResponse(resp, json); } catch (RequestException e) { log.warn("Invalid request {}: {}", req.getRequestURL(), e.toString()); resp.sendError(e.getStatusCode(), e.toString()); } } private void sendResponse(HttpServletResponse resp, JSONObject response) throws IOException { resp.setHeader("Expires", "-1"); if (response == null) { resp.setStatus(204); return; } resp.setContentType("application/json"); try (Writer writer = resp.getWriter()) { writer.write(response.toString()); } } }
Use json.toString instead of json when printing object.
Use json.toString instead of json when printing object.
Java
mit
olillevik/my-server-seed,olillevik/my-server-seed,steria/openright-simple-server-seed,jhannes/openright-conferencer,steria/openright-simple-server-seed,jhannes/openright-conferencer,steria/openright-simple-server-seed,jhannes/openright-conferencer,olillevik/my-server-seed
java
## Code Before: package net.openright.infrastructure.rest; import java.io.IOException; import java.io.Writer; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class JsonGetController implements GetController { private static final Logger log = LoggerFactory.getLogger(JsonGetController.class); private JsonController jsonController; public JsonGetController(JsonController jsonController) { this.jsonController = jsonController; } @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String[] parts = req.getPathInfo().split("\\/"); try { JSONObject json = parts.length > 2 ? jsonController.getJSON(parts[2]) : jsonController.listJSON(req); log.info("JSON response: {}", json); sendResponse(resp, json); } catch (RequestException e) { log.warn("Invalid request {}: {}", req.getRequestURL(), e.toString()); resp.sendError(e.getStatusCode(), e.toString()); } } private void sendResponse(HttpServletResponse resp, JSONObject response) throws IOException { resp.setHeader("Expires", "-1"); if (response == null) { resp.setStatus(204); return; } resp.setContentType("application/json"); try (Writer writer = resp.getWriter()) { writer.write(response.toString()); } } } ## Instruction: Use json.toString instead of json when printing object. ## Code After: package net.openright.infrastructure.rest; import java.io.IOException; import java.io.Writer; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class JsonGetController implements GetController { private static final Logger log = LoggerFactory.getLogger(JsonGetController.class); private JsonController jsonController; public JsonGetController(JsonController jsonController) { this.jsonController = jsonController; } @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String[] parts = req.getPathInfo().split("\\/"); try { JSONObject json = parts.length > 2 ? jsonController.getJSON(parts[2]) : jsonController.listJSON(req); log.info("JSON response: {}", json.toString()); sendResponse(resp, json); } catch (RequestException e) { log.warn("Invalid request {}: {}", req.getRequestURL(), e.toString()); resp.sendError(e.getStatusCode(), e.toString()); } } private void sendResponse(HttpServletResponse resp, JSONObject response) throws IOException { resp.setHeader("Expires", "-1"); if (response == null) { resp.setStatus(204); return; } resp.setContentType("application/json"); try (Writer writer = resp.getWriter()) { writer.write(response.toString()); } } }
package net.openright.infrastructure.rest; import java.io.IOException; import java.io.Writer; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class JsonGetController implements GetController { private static final Logger log = LoggerFactory.getLogger(JsonGetController.class); private JsonController jsonController; public JsonGetController(JsonController jsonController) { this.jsonController = jsonController; } @Override public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException { String[] parts = req.getPathInfo().split("\\/"); try { JSONObject json = parts.length > 2 ? jsonController.getJSON(parts[2]) : jsonController.listJSON(req); - log.info("JSON response: {}", json); + log.info("JSON response: {}", json.toString()); ? +++++++++++ sendResponse(resp, json); } catch (RequestException e) { log.warn("Invalid request {}: {}", req.getRequestURL(), e.toString()); resp.sendError(e.getStatusCode(), e.toString()); } } private void sendResponse(HttpServletResponse resp, JSONObject response) throws IOException { resp.setHeader("Expires", "-1"); if (response == null) { resp.setStatus(204); return; } resp.setContentType("application/json"); try (Writer writer = resp.getWriter()) { writer.write(response.toString()); } } }
2
0.04
1
1
f9f07ea9461029b2bacd3b6bcb43810ea96eb4c1
templates/list_reports.html
templates/list_reports.html
{% extends "base.t.html" %} {% block content scoped %} <div> <table class="reports"> {% set odd_even = cycle(['odd', 'even']).next %} <thead> <tr> <th>Id</th> <th>Product</th> <th>Version</th> </tr> </thead> {% for report in reports %} <tr class="{{ odd_even() }}"> <td>{{report.id}}</td> <td> <!--a href="{ { url_for('view_report', id=task.id) }}"-->{{ report.product }}<!--/a--> </td> <td> <!--a href="{ { url_for('view_report', id=task.id) }}"-->{{ report.version }}<!--/a--> </td> </tr> {% endfor %} </table> </div> {% endblock %}
{% extends "base.t.html" %} {% block content scoped %} <div> <table class="reports"> {% set odd_even = cycle(['odd', 'even']).next %} <thead> <tr> <th>Id</th> <th>Product</th> <th>Version</th> </tr> </thead> {% for report in reports %} <tr class="{{ odd_even() }}"> <td>{{report.id}}</td> <td> <a href="{{ url_for('show_report', id=report.id) }}">{{ report.product }}</a> </td> <td> <a href="{{ url_for('show_report', id=report.id) }}">{{ report.version }}<!/a> </td> </tr> {% endfor %} </table> </div> {% endblock %}
Add links to the individual reports.
Add links to the individual reports.
HTML
agpl-3.0
izrik/aeneas,izrik/aeneas
html
## Code Before: {% extends "base.t.html" %} {% block content scoped %} <div> <table class="reports"> {% set odd_even = cycle(['odd', 'even']).next %} <thead> <tr> <th>Id</th> <th>Product</th> <th>Version</th> </tr> </thead> {% for report in reports %} <tr class="{{ odd_even() }}"> <td>{{report.id}}</td> <td> <!--a href="{ { url_for('view_report', id=task.id) }}"-->{{ report.product }}<!--/a--> </td> <td> <!--a href="{ { url_for('view_report', id=task.id) }}"-->{{ report.version }}<!--/a--> </td> </tr> {% endfor %} </table> </div> {% endblock %} ## Instruction: Add links to the individual reports. ## Code After: {% extends "base.t.html" %} {% block content scoped %} <div> <table class="reports"> {% set odd_even = cycle(['odd', 'even']).next %} <thead> <tr> <th>Id</th> <th>Product</th> <th>Version</th> </tr> </thead> {% for report in reports %} <tr class="{{ odd_even() }}"> <td>{{report.id}}</td> <td> <a href="{{ url_for('show_report', id=report.id) }}">{{ report.product }}</a> </td> <td> <a href="{{ url_for('show_report', id=report.id) }}">{{ report.version }}<!/a> </td> </tr> {% endfor %} </table> </div> {% endblock %}
{% extends "base.t.html" %} {% block content scoped %} <div> <table class="reports"> {% set odd_even = cycle(['odd', 'even']).next %} <thead> <tr> <th>Id</th> <th>Product</th> <th>Version</th> </tr> </thead> {% for report in reports %} <tr class="{{ odd_even() }}"> <td>{{report.id}}</td> <td> - <!--a href="{ { url_for('view_report', id=task.id) }}"-->{{ report.product }}<!--/a--> ? --- - ^^^ --- -- --- -- + <a href="{{ url_for('show_report', id=report.id) }}">{{ report.product }}</a> ? ^^^ +++++ </td> <td> - <!--a href="{ { url_for('view_report', id=task.id) }}"-->{{ report.version }}<!--/a--> ? --- - ^^^ --- -- -- -- + <a href="{{ url_for('show_report', id=report.id) }}">{{ report.version }}<!/a> ? ^^^ +++++ </td> </tr> {% endfor %} </table> </div> {% endblock %}
4
0.153846
2
2
f296767438766a99c2132fc65048aa80d6f4fbab
.travis.yml
.travis.yml
language: groovy groovy: - 2.4.5 jdk: - oraclejdk7 script: ./gradlew clean build branches: except: - gh-pages notifications: email: false
language: groovy groovy: - 2.4.5 jdk: - oraclejdk8 - oraclejdk7 script: ./gradlew clean build branches: except: - gh-pages notifications: email: false
Test again JDK 7 + 8
Test again JDK 7 + 8
YAML
apache-2.0
thomaspaulmann/Documentor
yaml
## Code Before: language: groovy groovy: - 2.4.5 jdk: - oraclejdk7 script: ./gradlew clean build branches: except: - gh-pages notifications: email: false ## Instruction: Test again JDK 7 + 8 ## Code After: language: groovy groovy: - 2.4.5 jdk: - oraclejdk8 - oraclejdk7 script: ./gradlew clean build branches: except: - gh-pages notifications: email: false
language: groovy groovy: - 2.4.5 jdk: + - oraclejdk8 - oraclejdk7 script: ./gradlew clean build branches: except: - gh-pages notifications: email: false
1
0.0625
1
0
c5bf3f9c4cdc48a41a9b7534f546403984b5b2ec
README.md
README.md
landsat_ingestor ================ Scripts and other artifacts for landsat data ingestion into Amazon public hosting. Mailing list for discussion is at http://lists.osgeo.org/cgi-bin/mailman/listinfo/landsat-pds
landsat_ingestor ================ Scripts and other artifacts for landsat data ingestion into Amazon public hosting. Mailing list for discussion is at http://lists.osgeo.org/cgi-bin/mailman/listinfo/landsat-pds Jed's Javascript L8 browser: https://s3-us-west-2.amazonaws.com/landsat-pds/index.html Static HTML L8 traversal: https://s3-us-west-2.amazonaws.com/landsat-pds/L8/index.html Full Scene List: https://s3-us-west-2.amazonaws.com/landsat-pds/scene_list.gz
Add links into s3 bucket for browsing.
Add links into s3 bucket for browsing.
Markdown
apache-2.0
landsat-pds/landsat_ingestor,landsat-pds/landsat_ingestor,landsat-pds/landsat_ingestor
markdown
## Code Before: landsat_ingestor ================ Scripts and other artifacts for landsat data ingestion into Amazon public hosting. Mailing list for discussion is at http://lists.osgeo.org/cgi-bin/mailman/listinfo/landsat-pds ## Instruction: Add links into s3 bucket for browsing. ## Code After: landsat_ingestor ================ Scripts and other artifacts for landsat data ingestion into Amazon public hosting. Mailing list for discussion is at http://lists.osgeo.org/cgi-bin/mailman/listinfo/landsat-pds Jed's Javascript L8 browser: https://s3-us-west-2.amazonaws.com/landsat-pds/index.html Static HTML L8 traversal: https://s3-us-west-2.amazonaws.com/landsat-pds/L8/index.html Full Scene List: https://s3-us-west-2.amazonaws.com/landsat-pds/scene_list.gz
landsat_ingestor ================ Scripts and other artifacts for landsat data ingestion into Amazon public hosting. Mailing list for discussion is at http://lists.osgeo.org/cgi-bin/mailman/listinfo/landsat-pds + Jed's Javascript L8 browser: https://s3-us-west-2.amazonaws.com/landsat-pds/index.html + Static HTML L8 traversal: https://s3-us-west-2.amazonaws.com/landsat-pds/L8/index.html + + Full Scene List: https://s3-us-west-2.amazonaws.com/landsat-pds/scene_list.gz + +
6
0.75
6
0
0dd8d821b063885f650008cfb89b0f497e8cc69a
.travis.yml
.travis.yml
dist: xenial sudo: required language: python python: - 3.5 - 3.6 - 3.7 - nightly install: - pip install -r requirements.txt - pip install codecov - wget https://github.com/kr/beanstalkd/archive/v1.10.tar.gz - tar -xzvf v1.10.tar.gz - pushd beanstalkd-1.10 && make && sudo make install && popd script: make test after_success: codecov
dist: xenial sudo: required language: python python: - 3.5 - 3.6 - 3.7 - nightly env: global: - BEANSTALKD_VERSION=1.11 install: - pip install -r requirements.txt - pip install codecov - wget https://github.com/beanstalkd/beanstalkd/archive/v${BEANSTALKD_VERSION}.tar.gz - tar -xzvf v${BEANSTALKD_VERSION}.tar.gz - pushd beanstalkd-${BEANSTALKD_VERSION} && make && sudo make install && popd script: make test after_success: codecov
Use beanstalkd 1.11 on CI
Use beanstalkd 1.11 on CI
YAML
mit
mayhewj/greenstalk
yaml
## Code Before: dist: xenial sudo: required language: python python: - 3.5 - 3.6 - 3.7 - nightly install: - pip install -r requirements.txt - pip install codecov - wget https://github.com/kr/beanstalkd/archive/v1.10.tar.gz - tar -xzvf v1.10.tar.gz - pushd beanstalkd-1.10 && make && sudo make install && popd script: make test after_success: codecov ## Instruction: Use beanstalkd 1.11 on CI ## Code After: dist: xenial sudo: required language: python python: - 3.5 - 3.6 - 3.7 - nightly env: global: - BEANSTALKD_VERSION=1.11 install: - pip install -r requirements.txt - pip install codecov - wget https://github.com/beanstalkd/beanstalkd/archive/v${BEANSTALKD_VERSION}.tar.gz - tar -xzvf v${BEANSTALKD_VERSION}.tar.gz - pushd beanstalkd-${BEANSTALKD_VERSION} && make && sudo make install && popd script: make test after_success: codecov
dist: xenial sudo: required language: python python: - 3.5 - 3.6 - 3.7 - nightly + env: + global: + - BEANSTALKD_VERSION=1.11 install: - pip install -r requirements.txt - pip install codecov - - wget https://github.com/kr/beanstalkd/archive/v1.10.tar.gz ? ^ ^^^^ + - wget https://github.com/beanstalkd/beanstalkd/archive/v${BEANSTALKD_VERSION}.tar.gz ? ++++++++ ^ ^^^^^^^^^^^^^^^^^^^^^ - - tar -xzvf v1.10.tar.gz + - tar -xzvf v${BEANSTALKD_VERSION}.tar.gz - - pushd beanstalkd-1.10 && make && sudo make install && popd ? ^^^^ + - pushd beanstalkd-${BEANSTALKD_VERSION} && make && sudo make install && popd ? ^^^^^^^^^^^^^^^^^^^^^ script: make test after_success: codecov
9
0.5625
6
3
952c13db50da3858e6de7af755a873f30edf74c3
ipjogli.go
ipjogli.go
package ipjogli import ( "fmt" "net/http" ) func init() { http.HandleFunc("/", handler) } func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.RemoteAddr+"\n") }
package ipjogli import ( "fmt" "net" "net/http" ) func init() { http.HandleFunc("/", handler) } func handler(w http.ResponseWriter, r *http.Request) { addr, _, err := net.SplitHostPort(r.RemoteAddr) if err != nil { w.WriteHeader(http.StatusInternalServerError) return } fmt.Fprintf(w, addr+"\n") }
Split IP and port from RemoteAddr
Split IP and port from RemoteAddr Request.RemoteAddr should be an IP:port. GAE must be doing some magic to only provide the IP to the app instance as it never contained the port. This adds it in anyway so that local (non-GAE) apps return the correct thing.
Go
bsd-2-clause
jamesog/ip.jog.li
go
## Code Before: package ipjogli import ( "fmt" "net/http" ) func init() { http.HandleFunc("/", handler) } func handler(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, r.RemoteAddr+"\n") } ## Instruction: Split IP and port from RemoteAddr Request.RemoteAddr should be an IP:port. GAE must be doing some magic to only provide the IP to the app instance as it never contained the port. This adds it in anyway so that local (non-GAE) apps return the correct thing. ## Code After: package ipjogli import ( "fmt" "net" "net/http" ) func init() { http.HandleFunc("/", handler) } func handler(w http.ResponseWriter, r *http.Request) { addr, _, err := net.SplitHostPort(r.RemoteAddr) if err != nil { w.WriteHeader(http.StatusInternalServerError) return } fmt.Fprintf(w, addr+"\n") }
package ipjogli import ( "fmt" + "net" "net/http" ) func init() { http.HandleFunc("/", handler) } func handler(w http.ResponseWriter, r *http.Request) { + addr, _, err := net.SplitHostPort(r.RemoteAddr) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + return + } - fmt.Fprintf(w, r.RemoteAddr+"\n") ? ^^^^^^^^^ + fmt.Fprintf(w, addr+"\n") ? ^ }
8
0.571429
7
1
bd100fa4f29d3528ba66988d39b1d8d06e0b4e8a
setup_new_box.sh
setup_new_box.sh
apt-get update apt-get -y install vim-gnome git zsh keepass2 xdotool ruby ruby-dev curl openssh-server curl -L http://install.ohmyz.sh | sh git clone https://github.com/nathanalderson/dotfiles.git dotfiles/setup.sh echo Other things to do... echo * Download and install dropbox (https://www.dropbox.com/install?os=lnx) echo * Set a global keyboard shortcut for keepass (look under Menu > Preferences > System Settings > Keyboard > ...) echo * Download and install chrome (https://www.google.com/intl/en/chrome/browser/?hl=en&brand=CHFX&utm_campaign=en&utm_source=en-oa-na-us-bk-bng&utm_medium=oa)
apt-get update apt-get install vim-gnome apt-get install git apt-get install zsh apt-get install keepass2 apt-get install xdotool apt-get install ruby ruby-dev apt-get install curl apt-get install openssh-server curl -L http://install.ohmyz.sh | sh git clone https://github.com/nathanalderson/dotfiles.git dotfiles/setup.sh echo Other things to do... echo "* Download and install dropbox (https://www.dropbox.com/install?os=lnx)" echo "* Set a global keyboard shortcut for keepass (look under Menu > Preferences > System Settings > Keyboard > ...)" echo "* Download and install chrome (https://www.google.com/intl/en/chrome/browser/?hl=en&brand=CHFX&utm_campaign=en&utm_source=en-oa-na-us-bk-bng&utm_medium=oa)"
Add quotes to echo commands to avoid syntax error on parens
Add quotes to echo commands to avoid syntax error on parens
Shell
mit
nathanalderson/dotfiles,nathanalderson/dotfiles,nathanalderson/dotfiles
shell
## Code Before: apt-get update apt-get -y install vim-gnome git zsh keepass2 xdotool ruby ruby-dev curl openssh-server curl -L http://install.ohmyz.sh | sh git clone https://github.com/nathanalderson/dotfiles.git dotfiles/setup.sh echo Other things to do... echo * Download and install dropbox (https://www.dropbox.com/install?os=lnx) echo * Set a global keyboard shortcut for keepass (look under Menu > Preferences > System Settings > Keyboard > ...) echo * Download and install chrome (https://www.google.com/intl/en/chrome/browser/?hl=en&brand=CHFX&utm_campaign=en&utm_source=en-oa-na-us-bk-bng&utm_medium=oa) ## Instruction: Add quotes to echo commands to avoid syntax error on parens ## Code After: apt-get update apt-get install vim-gnome apt-get install git apt-get install zsh apt-get install keepass2 apt-get install xdotool apt-get install ruby ruby-dev apt-get install curl apt-get install openssh-server curl -L http://install.ohmyz.sh | sh git clone https://github.com/nathanalderson/dotfiles.git dotfiles/setup.sh echo Other things to do... echo "* Download and install dropbox (https://www.dropbox.com/install?os=lnx)" echo "* Set a global keyboard shortcut for keepass (look under Menu > Preferences > System Settings > Keyboard > ...)" echo "* Download and install chrome (https://www.google.com/intl/en/chrome/browser/?hl=en&brand=CHFX&utm_campaign=en&utm_source=en-oa-na-us-bk-bng&utm_medium=oa)"
apt-get update - apt-get -y install vim-gnome git zsh keepass2 xdotool ruby ruby-dev curl openssh-server + apt-get install vim-gnome + apt-get install git + apt-get install zsh + apt-get install keepass2 + apt-get install xdotool + apt-get install ruby ruby-dev + apt-get install curl + apt-get install openssh-server curl -L http://install.ohmyz.sh | sh git clone https://github.com/nathanalderson/dotfiles.git dotfiles/setup.sh echo Other things to do... - echo * Download and install dropbox (https://www.dropbox.com/install?os=lnx) + echo "* Download and install dropbox (https://www.dropbox.com/install?os=lnx)" ? + + - echo * Set a global keyboard shortcut for keepass (look under Menu > Preferences > System Settings > Keyboard > ...) + echo "* Set a global keyboard shortcut for keepass (look under Menu > Preferences > System Settings > Keyboard > ...)" ? + + - echo * Download and install chrome (https://www.google.com/intl/en/chrome/browser/?hl=en&brand=CHFX&utm_campaign=en&utm_source=en-oa-na-us-bk-bng&utm_medium=oa) + echo "* Download and install chrome (https://www.google.com/intl/en/chrome/browser/?hl=en&brand=CHFX&utm_campaign=en&utm_source=en-oa-na-us-bk-bng&utm_medium=oa)" ? + +
15
1.25
11
4
19ec6960df31a10794cd26dd242915308c07fe30
client-src/js/ui/game/items/Bomb.jsx
client-src/js/ui/game/items/Bomb.jsx
var React = require('react'); var ItemsActions = require('../../../app/game/ItemsActions'); var PlayerActions = require('../../../app/game/PlayerActions'); var Bomb = React.createClass({ propTypes: { item: React.PropTypes.object.isRequired }, gameOver: function(){ ItemsActions.revealAllItems(); PlayerActions.gameOver(); }, flagItem: function(event){ event.preventDefault(); event.stopPropagation(); event.returnValue = false; if(!this.props.item.isRevealed && ItemsStore.getFlags().length < ItemsStore.getOptions().totalBombs){ ItemsActions.toggleFlag(this.props.item); } }, render: function() { var item = this.props.item; var revealedClass = item.isRevealed? ' revealed' : ''; var icon = item.isRevealed? (<i className="fa fa-bomb"/>) : (<i className="fa fa-bomb"/>); return ( <td className={'item bomb' + revealedClass} onContextMenu={this.flagItem} onClick={this.gameOver}>{icon}</td> ); } }); module.exports = Bomb;
var React = require('react'); var ItemsActions = require('../../../app/game/ItemsActions'); var PlayerActions = require('../../../app/game/PlayerActions'); var ItemsStore = require('../../../app/game/ItemsStore'); var Bomb = React.createClass({ propTypes: { item: React.PropTypes.object.isRequired }, gameOver: function(){ ItemsActions.revealAllItems(); PlayerActions.gameOver(); }, flagItem: function(event){ event.preventDefault(); event.stopPropagation(); event.returnValue = false; if(!this.props.item.isRevealed && ItemsStore.getFlags().length < ItemsStore.getOptions().totalBombs){ ItemsActions.toggleFlag(this.props.item); } }, render: function() { var item = this.props.item; var revealedClass = item.isRevealed? ' bomb revealed' : ''; var icon = item.isRevealed? (<i className="fa fa-bomb"/>) : null; return ( <td className={'item ' + revealedClass} onContextMenu={this.flagItem} onClick={this.gameOver}>{icon}</td> ); } }); module.exports = Bomb;
Fix right clicking on bomb - Hide bombs
Fix right clicking on bomb - Hide bombs
JSX
mit
EnzoMartin/Minesweeper-React,EnzoMartin/Minesweeper-React
jsx
## Code Before: var React = require('react'); var ItemsActions = require('../../../app/game/ItemsActions'); var PlayerActions = require('../../../app/game/PlayerActions'); var Bomb = React.createClass({ propTypes: { item: React.PropTypes.object.isRequired }, gameOver: function(){ ItemsActions.revealAllItems(); PlayerActions.gameOver(); }, flagItem: function(event){ event.preventDefault(); event.stopPropagation(); event.returnValue = false; if(!this.props.item.isRevealed && ItemsStore.getFlags().length < ItemsStore.getOptions().totalBombs){ ItemsActions.toggleFlag(this.props.item); } }, render: function() { var item = this.props.item; var revealedClass = item.isRevealed? ' revealed' : ''; var icon = item.isRevealed? (<i className="fa fa-bomb"/>) : (<i className="fa fa-bomb"/>); return ( <td className={'item bomb' + revealedClass} onContextMenu={this.flagItem} onClick={this.gameOver}>{icon}</td> ); } }); module.exports = Bomb; ## Instruction: Fix right clicking on bomb - Hide bombs ## Code After: var React = require('react'); var ItemsActions = require('../../../app/game/ItemsActions'); var PlayerActions = require('../../../app/game/PlayerActions'); var ItemsStore = require('../../../app/game/ItemsStore'); var Bomb = React.createClass({ propTypes: { item: React.PropTypes.object.isRequired }, gameOver: function(){ ItemsActions.revealAllItems(); PlayerActions.gameOver(); }, flagItem: function(event){ event.preventDefault(); event.stopPropagation(); event.returnValue = false; if(!this.props.item.isRevealed && ItemsStore.getFlags().length < ItemsStore.getOptions().totalBombs){ ItemsActions.toggleFlag(this.props.item); } }, render: function() { var item = this.props.item; var revealedClass = item.isRevealed? ' bomb revealed' : ''; var icon = item.isRevealed? (<i className="fa fa-bomb"/>) : null; return ( <td className={'item ' + revealedClass} onContextMenu={this.flagItem} onClick={this.gameOver}>{icon}</td> ); } }); module.exports = Bomb;
var React = require('react'); var ItemsActions = require('../../../app/game/ItemsActions'); var PlayerActions = require('../../../app/game/PlayerActions'); + var ItemsStore = require('../../../app/game/ItemsStore'); var Bomb = React.createClass({ propTypes: { item: React.PropTypes.object.isRequired }, gameOver: function(){ ItemsActions.revealAllItems(); PlayerActions.gameOver(); }, flagItem: function(event){ event.preventDefault(); event.stopPropagation(); event.returnValue = false; if(!this.props.item.isRevealed && ItemsStore.getFlags().length < ItemsStore.getOptions().totalBombs){ ItemsActions.toggleFlag(this.props.item); } }, render: function() { var item = this.props.item; - var revealedClass = item.isRevealed? ' revealed' : ''; + var revealedClass = item.isRevealed? ' bomb revealed' : ''; ? +++++ - var icon = item.isRevealed? (<i className="fa fa-bomb"/>) : (<i className="fa fa-bomb"/>); ? ^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^ + var icon = item.isRevealed? (<i className="fa fa-bomb"/>) : null; ? ^^ ^ return ( - <td className={'item bomb' + revealedClass} onContextMenu={this.flagItem} onClick={this.gameOver}>{icon}</td> ? ---- + <td className={'item ' + revealedClass} onContextMenu={this.flagItem} onClick={this.gameOver}>{icon}</td> ); } }); module.exports = Bomb;
7
0.21875
4
3
681a0294b31f5e38a9eee84088f8b05b6a9da36b
assassins/users/templates/registration/login.html
assassins/users/templates/registration/login.html
{% extends "base.html" %} {% block content %} <div align="center" style="position:relative;margin-top:100px"> {% if form.errors %} <p>Your username and password didn't match. Please try again.</p> {% endif %} <form method="post" action="{% url 'login' %}"> {% csrf_token %} <table style="border-collapse:separate;border-spacing:5px 10px"> <tr> <td>{{ form.username.label_tag }}</td> <td>{{ form.username }}</td> </tr> <tr> <td>{{ form.password.label_tag }}</td> <td>{{ form.password }}</td> </tr> <tr> <td></td> <td><input style="width:100%" type="submit" class="btn btn-primary" value="login" /></td> </tr> </table> <input type="hidden" name="next" value="{{ next }}" /> </form> </div> {% endblock content %}
{% extends "base.html" %} {% block content %} <div align="center" style="position:relative;margin-top:100px"> {% if form.errors %} <p>Your username and password didn't match. Please try again.</p> {% endif %} <form method="post" action="{% url 'login' %}"> {% csrf_token %} <table style="border-collapse:separate;border-spacing:5px 10px"> <tr> <td>{{ form.username.label_tag }}</td> <td>{{ form.username}}</td> </tr> <tr> <td>{{ form.password.label_tag }}</td> <td>{{ form.password }}</td> </tr> <tr> <td></td> <td><input style="width:100%" type="submit" class="btn btn-primary" value="login" /></td> </tr> </table> <input type="hidden" name="next" value="{{ next }}" /> </form> </div> <script> $(function () { $('input#id_username').focus(); }); </script> {% endblock content %}
Add autofocus to username input
Add autofocus to username input
HTML
mit
Squa256/assassins,Squa256/assassins,Squa256/assassins,bobandbetty/assassins,bobandbetty/assassins,bobandbetty/assassins
html
## Code Before: {% extends "base.html" %} {% block content %} <div align="center" style="position:relative;margin-top:100px"> {% if form.errors %} <p>Your username and password didn't match. Please try again.</p> {% endif %} <form method="post" action="{% url 'login' %}"> {% csrf_token %} <table style="border-collapse:separate;border-spacing:5px 10px"> <tr> <td>{{ form.username.label_tag }}</td> <td>{{ form.username }}</td> </tr> <tr> <td>{{ form.password.label_tag }}</td> <td>{{ form.password }}</td> </tr> <tr> <td></td> <td><input style="width:100%" type="submit" class="btn btn-primary" value="login" /></td> </tr> </table> <input type="hidden" name="next" value="{{ next }}" /> </form> </div> {% endblock content %} ## Instruction: Add autofocus to username input ## Code After: {% extends "base.html" %} {% block content %} <div align="center" style="position:relative;margin-top:100px"> {% if form.errors %} <p>Your username and password didn't match. Please try again.</p> {% endif %} <form method="post" action="{% url 'login' %}"> {% csrf_token %} <table style="border-collapse:separate;border-spacing:5px 10px"> <tr> <td>{{ form.username.label_tag }}</td> <td>{{ form.username}}</td> </tr> <tr> <td>{{ form.password.label_tag }}</td> <td>{{ form.password }}</td> </tr> <tr> <td></td> <td><input style="width:100%" type="submit" class="btn btn-primary" value="login" /></td> </tr> </table> <input type="hidden" name="next" value="{{ next }}" /> </form> </div> <script> $(function () { $('input#id_username').focus(); }); </script> {% endblock content %}
{% extends "base.html" %} {% block content %} <div align="center" style="position:relative;margin-top:100px"> {% if form.errors %} <p>Your username and password didn't match. Please try again.</p> {% endif %} <form method="post" action="{% url 'login' %}"> {% csrf_token %} <table style="border-collapse:separate;border-spacing:5px 10px"> <tr> <td>{{ form.username.label_tag }}</td> - <td>{{ form.username }}</td> ? - + <td>{{ form.username}}</td> </tr> <tr> <td>{{ form.password.label_tag }}</td> <td>{{ form.password }}</td> </tr> <tr> <td></td> <td><input style="width:100%" type="submit" class="btn btn-primary" value="login" /></td> </tr> </table> <input type="hidden" name="next" value="{{ next }}" /> </form> </div> + + <script> + $(function () { + $('input#id_username').focus(); + }); + </script> {% endblock content %}
8
0.275862
7
1
2c4c527e6bb63f7db7a1c2d32f71b76fad65f92a
src/core/tests/test_callexplorer.py
src/core/tests/test_callexplorer.py
import unittest2 from core.callexplorer import * class CallExplorerTest(unittest2.TestCase): def _assert_histories(self, glob_string, histories): explorer = CallExplorer() self.assertEqual(sorted(map(lambda history: history.calls_string(), explorer.history_glob(glob_string))), sorted(histories)) def test_history_glob(self): self._assert_histories("", []) self._assert_histories(" ", []) self._assert_histories("P", ["P"]) self._assert_histories(" P ", ["P"]) self._assert_histories("P 1C", ["P 1C"]) self._assert_histories("* 1C", ["P 1C"]) self._assert_histories("1C * 1H", ["1C 1D 1H", "1C X 1H", "1C P 1H"]) if __name__ == '__main__': unittest2.main()
import unittest2 from core.callexplorer import * class CallExplorerTest(unittest2.TestCase): def _assert_histories(self, glob_string, histories): explorer = CallExplorer() self.assertEqual(sorted(map(lambda history: history.calls_string(), explorer.history_glob(glob_string))), sorted(histories)) def test_history_glob(self): self._assert_histories("", []) self._assert_histories(" ", []) self._assert_histories("P", ["P"]) self._assert_histories(" P ", ["P"]) self._assert_histories("P 1C", ["P 1C"]) self._assert_histories("* 1C", ["P 1C"]) self._assert_histories("1C * 1H", ["1C 1D 1H", "1C X 1H", "1C P 1H"]) self._assert_histories("* 1C * 1D", ["P 1C X 1D", "P 1C P 1D"]) if __name__ == '__main__': unittest2.main()
Add another test for CallExplorer.history_glob
Add another test for CallExplorer.history_glob
Python
bsd-3-clause
abortz/saycbridge,eseidel/saycbridge,eseidel/saycbridge,abortz/saycbridge,abortz/saycbridge,eseidel/saycbridge,abortz/saycbridge,abortz/saycbridge
python
## Code Before: import unittest2 from core.callexplorer import * class CallExplorerTest(unittest2.TestCase): def _assert_histories(self, glob_string, histories): explorer = CallExplorer() self.assertEqual(sorted(map(lambda history: history.calls_string(), explorer.history_glob(glob_string))), sorted(histories)) def test_history_glob(self): self._assert_histories("", []) self._assert_histories(" ", []) self._assert_histories("P", ["P"]) self._assert_histories(" P ", ["P"]) self._assert_histories("P 1C", ["P 1C"]) self._assert_histories("* 1C", ["P 1C"]) self._assert_histories("1C * 1H", ["1C 1D 1H", "1C X 1H", "1C P 1H"]) if __name__ == '__main__': unittest2.main() ## Instruction: Add another test for CallExplorer.history_glob ## Code After: import unittest2 from core.callexplorer import * class CallExplorerTest(unittest2.TestCase): def _assert_histories(self, glob_string, histories): explorer = CallExplorer() self.assertEqual(sorted(map(lambda history: history.calls_string(), explorer.history_glob(glob_string))), sorted(histories)) def test_history_glob(self): self._assert_histories("", []) self._assert_histories(" ", []) self._assert_histories("P", ["P"]) self._assert_histories(" P ", ["P"]) self._assert_histories("P 1C", ["P 1C"]) self._assert_histories("* 1C", ["P 1C"]) self._assert_histories("1C * 1H", ["1C 1D 1H", "1C X 1H", "1C P 1H"]) self._assert_histories("* 1C * 1D", ["P 1C X 1D", "P 1C P 1D"]) if __name__ == '__main__': unittest2.main()
import unittest2 from core.callexplorer import * class CallExplorerTest(unittest2.TestCase): def _assert_histories(self, glob_string, histories): explorer = CallExplorer() self.assertEqual(sorted(map(lambda history: history.calls_string(), explorer.history_glob(glob_string))), sorted(histories)) def test_history_glob(self): self._assert_histories("", []) self._assert_histories(" ", []) self._assert_histories("P", ["P"]) self._assert_histories(" P ", ["P"]) self._assert_histories("P 1C", ["P 1C"]) self._assert_histories("* 1C", ["P 1C"]) self._assert_histories("1C * 1H", ["1C 1D 1H", "1C X 1H", "1C P 1H"]) + self._assert_histories("* 1C * 1D", ["P 1C X 1D", "P 1C P 1D"]) if __name__ == '__main__': unittest2.main()
1
0.045455
1
0
2d3bed49297413657af89769f846c7a4c8f1161b
config/routes.rb
config/routes.rb
Rails.application.routes.draw do # BACKEND devise_for :admin_users, ActiveAdmin::Devise.config ActiveAdmin.routes(self) # FRONTEND root to: "dashboards#show" resource :dashboard, only: :show resources :projects, only: [:create] do collection { get :random } end get ':username/:repo' => "projects#show", as: :project end
Rails.application.routes.draw do # BACKEND devise_for :admin_users, ActiveAdmin::Devise.config ActiveAdmin.routes(self) # FRONTEND root to: "dashboards#show" resource :dashboard, only: :show resources :projects, only: [:create] do collection { get :random } end get ':username/:repo' => "projects#show", as: :project, constraints: { repo: /[^\/]*/ } end
Update project url for dot names.
Update project url for dot names.
Ruby
mit
jesus-sayar/contributors_mapping,jesus-sayar/contributors_mapping
ruby
## Code Before: Rails.application.routes.draw do # BACKEND devise_for :admin_users, ActiveAdmin::Devise.config ActiveAdmin.routes(self) # FRONTEND root to: "dashboards#show" resource :dashboard, only: :show resources :projects, only: [:create] do collection { get :random } end get ':username/:repo' => "projects#show", as: :project end ## Instruction: Update project url for dot names. ## Code After: Rails.application.routes.draw do # BACKEND devise_for :admin_users, ActiveAdmin::Devise.config ActiveAdmin.routes(self) # FRONTEND root to: "dashboards#show" resource :dashboard, only: :show resources :projects, only: [:create] do collection { get :random } end get ':username/:repo' => "projects#show", as: :project, constraints: { repo: /[^\/]*/ } end
Rails.application.routes.draw do # BACKEND devise_for :admin_users, ActiveAdmin::Devise.config ActiveAdmin.routes(self) # FRONTEND root to: "dashboards#show" resource :dashboard, only: :show resources :projects, only: [:create] do collection { get :random } end - get ':username/:repo' => "projects#show", as: :project + get ':username/:repo' => "projects#show", as: :project, constraints: { repo: /[^\/]*/ } ? +++++++++++++++++++++++++++++++++ end
2
0.153846
1
1
24073bb083874e70f4c6368a0da3b79160fd61d8
composer.json
composer.json
{ "name": "someline/someline-image", "description": "Someline Image is a helper service to handle uploaded images and store images without duplicates.", "keywords": [ "image", "service", "someline-image", "starter-framework", "someline-starter", "laravel" ], "homepage": "https://github.com/someline/someline-image", "license": "MIT", "authors": [ { "name": "Libern Lin", "email": "libernlin@gmail.com", "homepage": "https://www.someline.com/" } ], "require": { "php": ">=5.3.0", "laravel/framework": "5.2.*|5.3.*|5.4.*", "intervention/image": "^2.3", "intervention/imagecache": "~2.1" }, "require-dev": { "phpunit/phpunit": "4.*" }, "autoload": { "files": [ "src/Someline/Image/Foundation/helpers.php" ], "psr-4": { "Someline\\Image\\": "src/Someline/Image" } }, "autoload-dev": { "psr-4": { "Someline\\Image\\Test\\": "tests" } }, "extra": { "branch-alias": { "dev-master": "1.0-dev" } } }
{ "name": "someline/someline-image", "description": "Someline Image is a helper service to handle uploaded images and store images without duplicates.", "keywords": [ "image", "service", "someline-image", "starter-framework", "someline-starter", "laravel" ], "homepage": "https://github.com/someline/someline-image", "license": "MIT", "authors": [ { "name": "Libern Lin", "email": "libernlin@gmail.com", "homepage": "https://www.someline.com/" } ], "require": { "php": ">=5.3.0", "laravel/framework": "5.2.*|5.3.*|5.4.*|5.5.*", "intervention/image": "^2.3", "intervention/imagecache": "~2.1" }, "require-dev": { "phpunit/phpunit": "4.*" }, "autoload": { "files": [ "src/Someline/Image/Foundation/helpers.php" ], "psr-4": { "Someline\\Image\\": "src/Someline/Image" } }, "autoload-dev": { "psr-4": { "Someline\\Image\\Test\\": "tests" } }, "extra": { "branch-alias": { "dev-master": "1.0-dev" }, "laravel": { "providers": [ "Someline\\Image\\SomelineImageServiceProvider" ] } } }
Upgrade to support Laravel 5.5.*
Upgrade to support Laravel 5.5.*
JSON
mit
someline/someline-image
json
## Code Before: { "name": "someline/someline-image", "description": "Someline Image is a helper service to handle uploaded images and store images without duplicates.", "keywords": [ "image", "service", "someline-image", "starter-framework", "someline-starter", "laravel" ], "homepage": "https://github.com/someline/someline-image", "license": "MIT", "authors": [ { "name": "Libern Lin", "email": "libernlin@gmail.com", "homepage": "https://www.someline.com/" } ], "require": { "php": ">=5.3.0", "laravel/framework": "5.2.*|5.3.*|5.4.*", "intervention/image": "^2.3", "intervention/imagecache": "~2.1" }, "require-dev": { "phpunit/phpunit": "4.*" }, "autoload": { "files": [ "src/Someline/Image/Foundation/helpers.php" ], "psr-4": { "Someline\\Image\\": "src/Someline/Image" } }, "autoload-dev": { "psr-4": { "Someline\\Image\\Test\\": "tests" } }, "extra": { "branch-alias": { "dev-master": "1.0-dev" } } } ## Instruction: Upgrade to support Laravel 5.5.* ## Code After: { "name": "someline/someline-image", "description": "Someline Image is a helper service to handle uploaded images and store images without duplicates.", "keywords": [ "image", "service", "someline-image", "starter-framework", "someline-starter", "laravel" ], "homepage": "https://github.com/someline/someline-image", "license": "MIT", "authors": [ { "name": "Libern Lin", "email": "libernlin@gmail.com", "homepage": "https://www.someline.com/" } ], "require": { "php": ">=5.3.0", "laravel/framework": "5.2.*|5.3.*|5.4.*|5.5.*", "intervention/image": "^2.3", "intervention/imagecache": "~2.1" }, "require-dev": { "phpunit/phpunit": "4.*" }, "autoload": { "files": [ "src/Someline/Image/Foundation/helpers.php" ], "psr-4": { "Someline\\Image\\": "src/Someline/Image" } }, "autoload-dev": { "psr-4": { "Someline\\Image\\Test\\": "tests" } }, "extra": { "branch-alias": { "dev-master": "1.0-dev" }, "laravel": { "providers": [ "Someline\\Image\\SomelineImageServiceProvider" ] } } }
{ "name": "someline/someline-image", "description": "Someline Image is a helper service to handle uploaded images and store images without duplicates.", "keywords": [ "image", "service", "someline-image", "starter-framework", "someline-starter", "laravel" ], "homepage": "https://github.com/someline/someline-image", "license": "MIT", "authors": [ { "name": "Libern Lin", "email": "libernlin@gmail.com", "homepage": "https://www.someline.com/" } ], "require": { "php": ">=5.3.0", - "laravel/framework": "5.2.*|5.3.*|5.4.*", + "laravel/framework": "5.2.*|5.3.*|5.4.*|5.5.*", ? ++++++ "intervention/image": "^2.3", "intervention/imagecache": "~2.1" }, "require-dev": { "phpunit/phpunit": "4.*" }, "autoload": { "files": [ "src/Someline/Image/Foundation/helpers.php" ], "psr-4": { "Someline\\Image\\": "src/Someline/Image" } }, "autoload-dev": { "psr-4": { "Someline\\Image\\Test\\": "tests" } }, "extra": { "branch-alias": { "dev-master": "1.0-dev" + }, + "laravel": { + "providers": [ + "Someline\\Image\\SomelineImageServiceProvider" + ] } } }
7
0.145833
6
1
f01881dc7821be3c1c76239678d459cc4919233a
README.md
README.md
[PostCSS] plugin for writing Australian Stylesheets. [PostCSS]: https://github.com/postcss/postcss [ci-img]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets.svg [ci]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets ## Australian syntax ```css .foo { border: yeah-nah; box-sizing: fair-dinkum; colour: true-blue !bloody-oath; visibility: rack-off; } ``` ## CSS output ```css .foo { border: none; box-sizing: border-box; color: #0581C1 !important; visibility: hidden; } ``` ## Usage ```js postcss([ require('postcss-australian-stylesheets') ]) ``` See [PostCSS] docs for examples for your environment. ## Thanks to Inspiration from [Canadian Stylesheets](https://github.com/chancancode/postcss-canadian-stylesheets) and chats with [@darylljann](https://twitter.com/darylljann)
[PostCSS] plugin for writing Australian Stylesheets. [PostCSS]: https://github.com/postcss/postcss [ci-img]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets.svg [ci]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets ## Australian syntax ```css .foo { border-colour: vb-green; background-colour: vegemite; box-sizing: fair-dinkum; colour: true-blue !bloody-oath; display: yeah-nah; text-align: centre; text-indent: woop-woop; visibility: rack-off; } ``` ## CSS output ```css .foo { border-color: #2D8249; background-color: #461B00; box-sizing: border-box; color: #0581C1 !important; display: none; text-align: center; text-indent: -9999px; visibility: hidden; } ``` ## Usage ```js postcss([ require('postcss-australian-stylesheets') ]) ``` See [PostCSS] docs for examples for your environment. ## Thanks to Inspiration from [Canadian Stylesheets](https://github.com/chancancode/postcss-canadian-stylesheets) and chats with [@darylljann](https://twitter.com/darylljann)
Update readme following recent additions
Update readme following recent additions
Markdown
mit
dp-lewis/postcss-australian-stylesheets,lcpriest/postcss-singlish-stylesheets
markdown
## Code Before: [PostCSS] plugin for writing Australian Stylesheets. [PostCSS]: https://github.com/postcss/postcss [ci-img]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets.svg [ci]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets ## Australian syntax ```css .foo { border: yeah-nah; box-sizing: fair-dinkum; colour: true-blue !bloody-oath; visibility: rack-off; } ``` ## CSS output ```css .foo { border: none; box-sizing: border-box; color: #0581C1 !important; visibility: hidden; } ``` ## Usage ```js postcss([ require('postcss-australian-stylesheets') ]) ``` See [PostCSS] docs for examples for your environment. ## Thanks to Inspiration from [Canadian Stylesheets](https://github.com/chancancode/postcss-canadian-stylesheets) and chats with [@darylljann](https://twitter.com/darylljann) ## Instruction: Update readme following recent additions ## Code After: [PostCSS] plugin for writing Australian Stylesheets. [PostCSS]: https://github.com/postcss/postcss [ci-img]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets.svg [ci]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets ## Australian syntax ```css .foo { border-colour: vb-green; background-colour: vegemite; box-sizing: fair-dinkum; colour: true-blue !bloody-oath; display: yeah-nah; text-align: centre; text-indent: woop-woop; visibility: rack-off; } ``` ## CSS output ```css .foo { border-color: #2D8249; background-color: #461B00; box-sizing: border-box; color: #0581C1 !important; display: none; text-align: center; text-indent: -9999px; visibility: hidden; } ``` ## Usage ```js postcss([ require('postcss-australian-stylesheets') ]) ``` See [PostCSS] docs for examples for your environment. ## Thanks to Inspiration from [Canadian Stylesheets](https://github.com/chancancode/postcss-canadian-stylesheets) and chats with [@darylljann](https://twitter.com/darylljann)
[PostCSS] plugin for writing Australian Stylesheets. [PostCSS]: https://github.com/postcss/postcss [ci-img]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets.svg [ci]: https://travis-ci.org/dp-lewis/postcss-australian-stylesheets ## Australian syntax ```css .foo { - border: yeah-nah; + border-colour: vb-green; + background-colour: vegemite; box-sizing: fair-dinkum; colour: true-blue !bloody-oath; + display: yeah-nah; + text-align: centre; + text-indent: woop-woop; visibility: rack-off; } ``` ## CSS output ```css .foo { - border: none; + border-color: #2D8249; + background-color: #461B00; box-sizing: border-box; color: #0581C1 !important; + display: none; + text-align: center; + text-indent: -9999px; visibility: hidden; } ``` ## Usage ```js postcss([ require('postcss-australian-stylesheets') ]) ``` See [PostCSS] docs for examples for your environment. ## Thanks to Inspiration from [Canadian Stylesheets](https://github.com/chancancode/postcss-canadian-stylesheets) and chats with [@darylljann](https://twitter.com/darylljann)
12
0.315789
10
2
9a1e3655ed034a7494d6c203a00650c779346951
.travis.yml
.travis.yml
git: depth: 150 language: go go: - 1.12.x - tip matrix: allow_failures: - go: tip sudo: required services: - docker cache: directories: - "${HOME}/google-cloud-sdk/" before_install: # libseccomp in trusty is not new enough, need backports version. - sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' > /etc/apt/sources.list.d/backports.list" - sudo apt-get update # Enable ipv6 for dualstack integration test. - sudo sysctl net.ipv6.conf.all.disable_ipv6=0 install: - sudo apt-get install btrfs-tools - sudo apt-get install libseccomp2/trusty-backports - sudo apt-get install libseccomp-dev/trusty-backports - sudo apt-get install socat before_script: - export PATH=$HOME/gopath/bin:$PATH script: - make .install.gitvalidation - make .gitvalidation - make install.deps - make containerd - sudo PATH=$PATH GOPATH=$GOPATH make install-containerd - make test - make test-integration - make test-cri after_script: # Abuse travis to preserve the log. - cat /tmp/test-integration/containerd.log - cat /tmp/test-cri/containerd.log
git: depth: 150 language: go go: - 1.12.x - tip matrix: allow_failures: - go: tip sudo: required services: - docker cache: directories: - "${HOME}/google-cloud-sdk/" before_install: - sudo apt-get update # Enable ipv6 for dualstack integration test. - sudo sysctl net.ipv6.conf.all.disable_ipv6=0 install: - sudo apt-get install btrfs-tools - sudo apt-get install libseccomp2 - sudo apt-get install libseccomp-dev - sudo apt-get install socat before_script: - export PATH=$HOME/gopath/bin:$PATH script: - make .install.gitvalidation - make .gitvalidation - make install.deps - make containerd - sudo PATH=$PATH GOPATH=$GOPATH make install-containerd - make test - make test-integration - make test-cri after_script: # Abuse travis to preserve the log. - cat /tmp/test-integration/containerd.log - cat /tmp/test-cri/containerd.log
Update based on default xenial distro.
Update based on default xenial distro. Signed-off-by: Lantao Liu <e12a959b3f33bba53f1a03da59760f37bd7265d7@google.com>
YAML
apache-2.0
containerd/containerd,dmcgowan/containerd,vdemeester/containerd,dmcgowan/containerd,vdemeester/containerd,containerd/containerd,mikebrow/containerd,mikebrow/containerd,estesp/containerd,estesp/containerd,thaJeztah/containerd,thaJeztah/containerd
yaml
## Code Before: git: depth: 150 language: go go: - 1.12.x - tip matrix: allow_failures: - go: tip sudo: required services: - docker cache: directories: - "${HOME}/google-cloud-sdk/" before_install: # libseccomp in trusty is not new enough, need backports version. - sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' > /etc/apt/sources.list.d/backports.list" - sudo apt-get update # Enable ipv6 for dualstack integration test. - sudo sysctl net.ipv6.conf.all.disable_ipv6=0 install: - sudo apt-get install btrfs-tools - sudo apt-get install libseccomp2/trusty-backports - sudo apt-get install libseccomp-dev/trusty-backports - sudo apt-get install socat before_script: - export PATH=$HOME/gopath/bin:$PATH script: - make .install.gitvalidation - make .gitvalidation - make install.deps - make containerd - sudo PATH=$PATH GOPATH=$GOPATH make install-containerd - make test - make test-integration - make test-cri after_script: # Abuse travis to preserve the log. - cat /tmp/test-integration/containerd.log - cat /tmp/test-cri/containerd.log ## Instruction: Update based on default xenial distro. Signed-off-by: Lantao Liu <e12a959b3f33bba53f1a03da59760f37bd7265d7@google.com> ## Code After: git: depth: 150 language: go go: - 1.12.x - tip matrix: allow_failures: - go: tip sudo: required services: - docker cache: directories: - "${HOME}/google-cloud-sdk/" before_install: - sudo apt-get update # Enable ipv6 for dualstack integration test. - sudo sysctl net.ipv6.conf.all.disable_ipv6=0 install: - sudo apt-get install btrfs-tools - sudo apt-get install libseccomp2 - sudo apt-get install libseccomp-dev - sudo apt-get install socat before_script: - export PATH=$HOME/gopath/bin:$PATH script: - make .install.gitvalidation - make .gitvalidation - make install.deps - make containerd - sudo PATH=$PATH GOPATH=$GOPATH make install-containerd - make test - make test-integration - make test-cri after_script: # Abuse travis to preserve the log. - cat /tmp/test-integration/containerd.log - cat /tmp/test-cri/containerd.log
git: depth: 150 language: go go: - 1.12.x - tip matrix: allow_failures: - go: tip sudo: required services: - docker cache: directories: - "${HOME}/google-cloud-sdk/" before_install: - # libseccomp in trusty is not new enough, need backports version. - - sudo sh -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' > /etc/apt/sources.list.d/backports.list" - sudo apt-get update # Enable ipv6 for dualstack integration test. - sudo sysctl net.ipv6.conf.all.disable_ipv6=0 install: - sudo apt-get install btrfs-tools - - sudo apt-get install libseccomp2/trusty-backports ? ----------------- + - sudo apt-get install libseccomp2 - - sudo apt-get install libseccomp-dev/trusty-backports ? ----------------- + - sudo apt-get install libseccomp-dev - sudo apt-get install socat before_script: - export PATH=$HOME/gopath/bin:$PATH script: - make .install.gitvalidation - make .gitvalidation - make install.deps - make containerd - sudo PATH=$PATH GOPATH=$GOPATH make install-containerd - make test - make test-integration - make test-cri after_script: # Abuse travis to preserve the log. - cat /tmp/test-integration/containerd.log - cat /tmp/test-cri/containerd.log
6
0.117647
2
4
a1791d28799ce4c01062e491e92e5294353a121e
.github/workflows/build.yml
.github/workflows/build.yml
name: CI on: [push] jobs: build: runs-on: ubuntu-latest name: Python ${{ matrix.version }} strategy: matrix: version: [2.7, 3.6, 3.8] steps: - name: Checkout uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.version }} - name: Install Dependencies run: | python -m pip install --upgrade pip pip install pytest mock pytest-cov python setup.py install pytest --cov=./ --cov-report=xml - name: Run Tests run: python -m pytest -v - name: upload coverage to Codecov uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} name: codecov-umbrella verbose: true
name: CI on: [push] jobs: build: runs-on: ubuntu-latest name: Python ${{ matrix.version }} strategy: matrix: version: [2.7, 3.6, 3.8] steps: - name: Checkout uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.version }} - name: Install Dependencies run: | python -m pip install --upgrade pip pip install pytest mock pytest-cov python setup.py install pytest --cov=./ --cov-report=xml - name: Run Tests run: python -m pytest -v - name: upload coverage to Codecov uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} name: codecov-umbrella
Remove verbose: true flag to reduce how much we need to scroll
Remove verbose: true flag to reduce how much we need to scroll
YAML
mit
Shopify/shopify_python_api
yaml
## Code Before: name: CI on: [push] jobs: build: runs-on: ubuntu-latest name: Python ${{ matrix.version }} strategy: matrix: version: [2.7, 3.6, 3.8] steps: - name: Checkout uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.version }} - name: Install Dependencies run: | python -m pip install --upgrade pip pip install pytest mock pytest-cov python setup.py install pytest --cov=./ --cov-report=xml - name: Run Tests run: python -m pytest -v - name: upload coverage to Codecov uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} name: codecov-umbrella verbose: true ## Instruction: Remove verbose: true flag to reduce how much we need to scroll ## Code After: name: CI on: [push] jobs: build: runs-on: ubuntu-latest name: Python ${{ matrix.version }} strategy: matrix: version: [2.7, 3.6, 3.8] steps: - name: Checkout uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.version }} - name: Install Dependencies run: | python -m pip install --upgrade pip pip install pytest mock pytest-cov python setup.py install pytest --cov=./ --cov-report=xml - name: Run Tests run: python -m pytest -v - name: upload coverage to Codecov uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} name: codecov-umbrella
name: CI on: [push] jobs: build: runs-on: ubuntu-latest name: Python ${{ matrix.version }} strategy: matrix: version: [2.7, 3.6, 3.8] steps: - name: Checkout uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.version }} - name: Install Dependencies run: | python -m pip install --upgrade pip pip install pytest mock pytest-cov python setup.py install pytest --cov=./ --cov-report=xml - name: Run Tests run: python -m pytest -v - name: upload coverage to Codecov uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} name: codecov-umbrella - verbose: true
1
0.032258
0
1
9f17cba78265d41017eeb0558ac6238f497552d4
metadata/eu.pretix.pretixprint.yml
metadata/eu.pretix.pretixprint.yml
Categories: - Multimedia License: GPL-3.0-only AuthorName: Raphael Michel AuthorEmail: support@pretix.eu WebSite: https://pretix.eu/ SourceCode: https://github.com/pretix/pretixprint-android IssueTracker: https://github.com/pretix/pretixprint-android/issues AutoName: pretixPRINT Description: Android app that drives the printers used by other pretix applications. This contains all print logic, but no application logic. It is called by other applications using system broadcasts. RepoType: git Repo: https://github.com/pretix/pretixprint-android Builds: - versionName: 1.3.0 versionCode: 8 commit: 1.3.0 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.3.3 versionCode: 11 commit: 1.3.3 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.5.0 versionCode: 13 commit: 1.5.0 subdir: pretixprint/app submodules: true gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.5.0 CurrentVersionCode: 13
Categories: - Multimedia License: GPL-3.0-only AuthorName: Raphael Michel AuthorEmail: support@pretix.eu WebSite: https://pretix.eu/ SourceCode: https://github.com/pretix/pretixprint-android IssueTracker: https://github.com/pretix/pretixprint-android/issues AutoName: pretixPRINT Description: Android app that drives the printers used by other pretix applications. This contains all print logic, but no application logic. It is called by other applications using system broadcasts. RepoType: git Repo: https://github.com/pretix/pretixprint-android Builds: - versionName: 1.3.0 versionCode: 8 commit: 1.3.0 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.3.3 versionCode: 11 commit: 1.3.3 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.5.0 versionCode: 13 commit: 1.5.0 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.5.1 versionCode: 14 commit: 1.5.1 subdir: pretixprint/app submodules: true gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.5.1 CurrentVersionCode: 14
Update pretixPRINT to 1.5.1 (14)
Update pretixPRINT to 1.5.1 (14)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - Multimedia License: GPL-3.0-only AuthorName: Raphael Michel AuthorEmail: support@pretix.eu WebSite: https://pretix.eu/ SourceCode: https://github.com/pretix/pretixprint-android IssueTracker: https://github.com/pretix/pretixprint-android/issues AutoName: pretixPRINT Description: Android app that drives the printers used by other pretix applications. This contains all print logic, but no application logic. It is called by other applications using system broadcasts. RepoType: git Repo: https://github.com/pretix/pretixprint-android Builds: - versionName: 1.3.0 versionCode: 8 commit: 1.3.0 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.3.3 versionCode: 11 commit: 1.3.3 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.5.0 versionCode: 13 commit: 1.5.0 subdir: pretixprint/app submodules: true gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.5.0 CurrentVersionCode: 13 ## Instruction: Update pretixPRINT to 1.5.1 (14) ## Code After: Categories: - Multimedia License: GPL-3.0-only AuthorName: Raphael Michel AuthorEmail: support@pretix.eu WebSite: https://pretix.eu/ SourceCode: https://github.com/pretix/pretixprint-android IssueTracker: https://github.com/pretix/pretixprint-android/issues AutoName: pretixPRINT Description: Android app that drives the printers used by other pretix applications. This contains all print logic, but no application logic. It is called by other applications using system broadcasts. RepoType: git Repo: https://github.com/pretix/pretixprint-android Builds: - versionName: 1.3.0 versionCode: 8 commit: 1.3.0 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.3.3 versionCode: 11 commit: 1.3.3 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.5.0 versionCode: 13 commit: 1.5.0 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.5.1 versionCode: 14 commit: 1.5.1 subdir: pretixprint/app submodules: true gradle: - yes AutoUpdateMode: Version %v UpdateCheckMode: Tags CurrentVersion: 1.5.1 CurrentVersionCode: 14
Categories: - Multimedia License: GPL-3.0-only AuthorName: Raphael Michel AuthorEmail: support@pretix.eu WebSite: https://pretix.eu/ SourceCode: https://github.com/pretix/pretixprint-android IssueTracker: https://github.com/pretix/pretixprint-android/issues AutoName: pretixPRINT Description: Android app that drives the printers used by other pretix applications. This contains all print logic, but no application logic. It is called by other applications using system broadcasts. RepoType: git Repo: https://github.com/pretix/pretixprint-android Builds: - versionName: 1.3.0 versionCode: 8 commit: 1.3.0 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.3.3 versionCode: 11 commit: 1.3.3 subdir: pretixprint/app submodules: true gradle: - yes - versionName: 1.5.0 versionCode: 13 commit: 1.5.0 subdir: pretixprint/app submodules: true gradle: - yes + - versionName: 1.5.1 + versionCode: 14 + commit: 1.5.1 + subdir: pretixprint/app + submodules: true + gradle: + - yes + AutoUpdateMode: Version %v UpdateCheckMode: Tags - CurrentVersion: 1.5.0 ? ^ + CurrentVersion: 1.5.1 ? ^ - CurrentVersionCode: 13 ? ^ + CurrentVersionCode: 14 ? ^
12
0.26087
10
2
cf977171e7aada22d19abc291b3c379eb74bcb65
.github/pull_request_template.md
.github/pull_request_template.md
⚠️ This repo is Continuously Deployed: make sure you [follow the guidance](https://docs.publishing.service.gov.uk/manual/development-pipeline.html#merge-your-own-pull-request) ⚠️
⚠️ This repo is Continuously Deployed: make sure you [follow the guidance](https://docs.publishing.service.gov.uk/manual/development-pipeline.html#merge-your-own-pull-request) ⚠️ Follow [these steps](https://guides.rubyonrails.org/upgrading_ruby_on_rails.html) if you are doing a major Rails upgrade.
Add instructions for upgrading Rails
Add instructions for upgrading Rails
Markdown
mit
alphagov/service-manual-publisher,alphagov/service-manual-publisher,alphagov/service-manual-publisher
markdown
## Code Before: ⚠️ This repo is Continuously Deployed: make sure you [follow the guidance](https://docs.publishing.service.gov.uk/manual/development-pipeline.html#merge-your-own-pull-request) ⚠️ ## Instruction: Add instructions for upgrading Rails ## Code After: ⚠️ This repo is Continuously Deployed: make sure you [follow the guidance](https://docs.publishing.service.gov.uk/manual/development-pipeline.html#merge-your-own-pull-request) ⚠️ Follow [these steps](https://guides.rubyonrails.org/upgrading_ruby_on_rails.html) if you are doing a major Rails upgrade.
⚠️ This repo is Continuously Deployed: make sure you [follow the guidance](https://docs.publishing.service.gov.uk/manual/development-pipeline.html#merge-your-own-pull-request) ⚠️ + + Follow [these steps](https://guides.rubyonrails.org/upgrading_ruby_on_rails.html) if you are doing a major Rails upgrade.
2
2
2
0
9fd827df81a400df1577c3405a646e26a1b17c51
src/exampleApp.js
src/exampleApp.js
"use strict"; // For conditions of distribution and use, see copyright notice in LICENSE /* * @author Tapani Jamsa * @author Erno Kuusela * @author Toni Alatalo * Date: 2013 */ var app = new Application(); app.host = "localhost"; // IP to the Tundra server app.port = 2345; // and port to the server app.start(); // app.viewer.useCubes = true; // Use wireframe cube material for all objects app.connect(app.host, app.port);
"use strict"; // For conditions of distribution and use, see copyright notice in LICENSE /* * @author Tapani Jamsa * @author Erno Kuusela * @author Toni Alatalo * Date: 2013 */ var app = new Application(); var host = "localhost"; // IP to the Tundra server var port = 2345; // and port to the server app.start(); // app.viewer.useCubes = true; // Use wireframe cube material for all objects app.connect(host, port);
Make host and port standard variables
Make host and port standard variables
JavaScript
apache-2.0
playsign/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra,AlphaStaxLLC/WebTundra,playsign/WebTundra,AlphaStaxLLC/WebTundra,realXtend/WebTundra
javascript
## Code Before: "use strict"; // For conditions of distribution and use, see copyright notice in LICENSE /* * @author Tapani Jamsa * @author Erno Kuusela * @author Toni Alatalo * Date: 2013 */ var app = new Application(); app.host = "localhost"; // IP to the Tundra server app.port = 2345; // and port to the server app.start(); // app.viewer.useCubes = true; // Use wireframe cube material for all objects app.connect(app.host, app.port); ## Instruction: Make host and port standard variables ## Code After: "use strict"; // For conditions of distribution and use, see copyright notice in LICENSE /* * @author Tapani Jamsa * @author Erno Kuusela * @author Toni Alatalo * Date: 2013 */ var app = new Application(); var host = "localhost"; // IP to the Tundra server var port = 2345; // and port to the server app.start(); // app.viewer.useCubes = true; // Use wireframe cube material for all objects app.connect(host, port);
"use strict"; // For conditions of distribution and use, see copyright notice in LICENSE /* * @author Tapani Jamsa * @author Erno Kuusela * @author Toni Alatalo * Date: 2013 */ var app = new Application(); - app.host = "localhost"; // IP to the Tundra server ? ^^^ + var host = "localhost"; // IP to the Tundra server ? + ^^ - app.port = 2345; // and port to the server ? ^^^ + var port = 2345; // and port to the server ? + ^^ app.start(); // app.viewer.useCubes = true; // Use wireframe cube material for all objects - app.connect(app.host, app.port); ? ---- ---- + app.connect(host, port);
6
0.3
3
3
6b5d809f06e2ea382f66ad906abc76d5d11efa3e
Casks/vivaldi-snapshot.rb
Casks/vivaldi-snapshot.rb
cask :v1 => 'vivaldi-snapshot' do version '1.0.156.2' sha256 '5bf824d69cc78746c0644b4b257e79adc49a4960ff690b3f7a09bca7f1c0d3a9' url "https://vivaldi.com/download/download.php?f=Vivaldi.#{version}.dmg" name 'Vivaldi' homepage 'https://vivaldi.com' license :gratis app 'Vivaldi.app' end
cask :v1 => 'vivaldi-snapshot' do version '1.0.167.2' sha256 'ded8ebb78e7f49bfdc56ed4444782dc90ec0d51965c672076f5c8e5109515608' url "https://vivaldi.com/download/download.php?f=Vivaldi.#{version}.dmg" name 'Vivaldi' homepage 'https://vivaldi.com' license :gratis app 'Vivaldi.app' end
Upgrade Vivaldi.app to v1.0.167.2 (Snapshot)
Upgrade Vivaldi.app to v1.0.167.2 (Snapshot)
Ruby
bsd-2-clause
cprecioso/homebrew-versions,zerrot/homebrew-versions,1zaman/homebrew-versions,mauricerkelly/homebrew-versions,zorosteven/homebrew-versions,hubwub/homebrew-versions,a-x-/homebrew-versions,danielbayley/homebrew-versions,404NetworkError/homebrew-versions,alebcay/homebrew-versions,toonetown/homebrew-cask-versions,hubwub/homebrew-versions,yurikoles/homebrew-versions,geggo98/homebrew-versions,wickedsp1d3r/homebrew-versions,Ngrd/homebrew-versions,yurikoles/homebrew-versions,pkq/homebrew-versions,lantrix/homebrew-versions,hugoboos/homebrew-versions,coeligena/homebrew-verscustomized,mauricerkelly/homebrew-versions,bey2lah/homebrew-versions,pkq/homebrew-versions,Felerius/homebrew-versions,bondezbond/homebrew-versions,bondezbond/homebrew-versions,peterjosling/homebrew-versions,RJHsiao/homebrew-versions,404NetworkError/homebrew-versions,githubutilities/homebrew-versions,delphinus35/homebrew-versions,caskroom/homebrew-versions,lantrix/homebrew-versions,danielbayley/homebrew-versions,toonetown/homebrew-cask-versions,caskroom/homebrew-versions,gcds/homebrew-versions,ddinchev/homebrew-versions,mahori/homebrew-cask-versions,Ngrd/homebrew-versions,cprecioso/homebrew-versions,peterjosling/homebrew-versions,mahori/homebrew-versions,victorpopkov/homebrew-versions,RJHsiao/homebrew-versions,hugoboos/homebrew-versions,digital-wonderland/homebrew-versions,rogeriopradoj/homebrew-versions,stigkj/homebrew-caskroom-versions,bey2lah/homebrew-versions,wickedsp1d3r/homebrew-versions,rogeriopradoj/homebrew-versions,FinalDes/homebrew-versions,pinut/homebrew-versions,FinalDes/homebrew-versions,stigkj/homebrew-caskroom-versions,victorpopkov/homebrew-versions
ruby
## Code Before: cask :v1 => 'vivaldi-snapshot' do version '1.0.156.2' sha256 '5bf824d69cc78746c0644b4b257e79adc49a4960ff690b3f7a09bca7f1c0d3a9' url "https://vivaldi.com/download/download.php?f=Vivaldi.#{version}.dmg" name 'Vivaldi' homepage 'https://vivaldi.com' license :gratis app 'Vivaldi.app' end ## Instruction: Upgrade Vivaldi.app to v1.0.167.2 (Snapshot) ## Code After: cask :v1 => 'vivaldi-snapshot' do version '1.0.167.2' sha256 'ded8ebb78e7f49bfdc56ed4444782dc90ec0d51965c672076f5c8e5109515608' url "https://vivaldi.com/download/download.php?f=Vivaldi.#{version}.dmg" name 'Vivaldi' homepage 'https://vivaldi.com' license :gratis app 'Vivaldi.app' end
cask :v1 => 'vivaldi-snapshot' do - version '1.0.156.2' ? - + version '1.0.167.2' ? + - sha256 '5bf824d69cc78746c0644b4b257e79adc49a4960ff690b3f7a09bca7f1c0d3a9' + sha256 'ded8ebb78e7f49bfdc56ed4444782dc90ec0d51965c672076f5c8e5109515608' url "https://vivaldi.com/download/download.php?f=Vivaldi.#{version}.dmg" name 'Vivaldi' homepage 'https://vivaldi.com' license :gratis app 'Vivaldi.app' end
4
0.363636
2
2
5040a70fa7c9754513ce9743ca1550c4282d3d09
app/controllers/members_controller.rb
app/controllers/members_controller.rb
class MembersController < ApplicationController before_action :set_member, only: :show before_action :redirect_without_member, only: :show def index @members = member_scope.page(params[:page]).per( 40 ) end def show @posts = @member.posts.current.not_research.includes(topic: :forum).order(created_at: :desc) @research_topics = @member.research_topics.approved.includes(:user, topic: [:forum, :posts]).order(created_at: :desc) @events = (@posts + @research_topics).sort_by(&:created_at).reverse! end # GET /search.json?q=QUERY def search render json: member_scope.where("users.forum_name ~* ?", "(\\m#{params[:q].to_s.gsub(/[^a-zA-Z0-9]/, '')})").limit(10).pluck(:forum_name) end private def set_member @member = User.current.find_by_forum_name(params[:forum_name]) end def redirect_without_member empty_response_or_root_path(members_path) unless @member end def member_scope User.current.where("users.id IN (SELECT posts.user_id FROM posts WHERE posts.status IN (?) and posts.deleted = ?)", ['pending_review', 'approved'], false).where.not(forum_name: [nil, '']).order("LOWER(forum_name)") end end
class MembersController < ApplicationController before_action :set_member, only: :show before_action :redirect_without_member, only: :show def index @members = member_scope.page(params[:page]).per( 40 ) end def show @posts = @member.posts.current.not_research.includes(topic: :forum).order(created_at: :desc) @research_topics = @member.research_topics.approved.includes(:user, topic: [:forum, :posts]).order(created_at: :desc) @events = (@posts + @research_topics).sort_by(&:created_at).reverse! end # GET /search.json?q=QUERY def search render json: member_scope.where("users.forum_name ~* ?", "(\\m#{params[:q].to_s.gsub(/[^a-zA-Z0-9]/, '')})").limit(10).pluck(:forum_name) end private def set_member @member = User.current.where("LOWER(users.forum_name) = ?", params[:forum_name].to_s.downcase).first end def redirect_without_member empty_response_or_root_path(members_path) unless @member end def member_scope User.current.where("users.id IN (SELECT posts.user_id FROM posts WHERE posts.status IN (?) and posts.deleted = ?)", ['pending_review', 'approved'], false).where.not(forum_name: [nil, '']).order("LOWER(forum_name)") end end
Allow members to be found case insensitively
Allow members to be found case insensitively
Ruby
mit
myapnea/www.myapnea.org,myapnea/www.myapnea.org,myapnea/www.myapnea.org
ruby
## Code Before: class MembersController < ApplicationController before_action :set_member, only: :show before_action :redirect_without_member, only: :show def index @members = member_scope.page(params[:page]).per( 40 ) end def show @posts = @member.posts.current.not_research.includes(topic: :forum).order(created_at: :desc) @research_topics = @member.research_topics.approved.includes(:user, topic: [:forum, :posts]).order(created_at: :desc) @events = (@posts + @research_topics).sort_by(&:created_at).reverse! end # GET /search.json?q=QUERY def search render json: member_scope.where("users.forum_name ~* ?", "(\\m#{params[:q].to_s.gsub(/[^a-zA-Z0-9]/, '')})").limit(10).pluck(:forum_name) end private def set_member @member = User.current.find_by_forum_name(params[:forum_name]) end def redirect_without_member empty_response_or_root_path(members_path) unless @member end def member_scope User.current.where("users.id IN (SELECT posts.user_id FROM posts WHERE posts.status IN (?) and posts.deleted = ?)", ['pending_review', 'approved'], false).where.not(forum_name: [nil, '']).order("LOWER(forum_name)") end end ## Instruction: Allow members to be found case insensitively ## Code After: class MembersController < ApplicationController before_action :set_member, only: :show before_action :redirect_without_member, only: :show def index @members = member_scope.page(params[:page]).per( 40 ) end def show @posts = @member.posts.current.not_research.includes(topic: :forum).order(created_at: :desc) @research_topics = @member.research_topics.approved.includes(:user, topic: [:forum, :posts]).order(created_at: :desc) @events = (@posts + @research_topics).sort_by(&:created_at).reverse! end # GET /search.json?q=QUERY def search render json: member_scope.where("users.forum_name ~* ?", "(\\m#{params[:q].to_s.gsub(/[^a-zA-Z0-9]/, '')})").limit(10).pluck(:forum_name) end private def set_member @member = User.current.where("LOWER(users.forum_name) = ?", params[:forum_name].to_s.downcase).first end def redirect_without_member empty_response_or_root_path(members_path) unless @member end def member_scope User.current.where("users.id IN (SELECT posts.user_id FROM posts WHERE posts.status IN (?) and posts.deleted = ?)", ['pending_review', 'approved'], false).where.not(forum_name: [nil, '']).order("LOWER(forum_name)") end end
class MembersController < ApplicationController before_action :set_member, only: :show before_action :redirect_without_member, only: :show def index @members = member_scope.page(params[:page]).per( 40 ) end def show @posts = @member.posts.current.not_research.includes(topic: :forum).order(created_at: :desc) @research_topics = @member.research_topics.approved.includes(:user, topic: [:forum, :posts]).order(created_at: :desc) @events = (@posts + @research_topics).sort_by(&:created_at).reverse! end # GET /search.json?q=QUERY def search render json: member_scope.where("users.forum_name ~* ?", "(\\m#{params[:q].to_s.gsub(/[^a-zA-Z0-9]/, '')})").limit(10).pluck(:forum_name) end private def set_member - @member = User.current.find_by_forum_name(params[:forum_name]) + @member = User.current.where("LOWER(users.forum_name) = ?", params[:forum_name].to_s.downcase).first end def redirect_without_member empty_response_or_root_path(members_path) unless @member end def member_scope User.current.where("users.id IN (SELECT posts.user_id FROM posts WHERE posts.status IN (?) and posts.deleted = ?)", ['pending_review', 'approved'], false).where.not(forum_name: [nil, '']).order("LOWER(forum_name)") end end
2
0.058824
1
1
8d72caec7b47a2e373ce8057a04ef18139572135
examples/rails_log/file_output.rb
examples/rails_log/file_output.rb
require 'tempfile' require 'csv' class FileOutput < Rodimus::Step def before_run_set_output @outgoing = CSV.open('/tmp/connection_logging.csv', 'w') end def finalize puts "\nData written to #{outgoing.path}\n\n" end def process_row(row) JSON.parse(row).values end end
require 'tempfile' require 'csv' class FileOutput < Rodimus::Step def before_run_set_output @outgoing = CSV.open('/tmp/connection_logging.csv', 'w') end def after_run_log_path puts "\nData written to #{outgoing.path}\n\n" end def process_row(row) JSON.parse(row).values end end
Use after_run hook in rails log example during output.
Use after_run hook in rails log example during output.
Ruby
mit
nevern02/rodimus
ruby
## Code Before: require 'tempfile' require 'csv' class FileOutput < Rodimus::Step def before_run_set_output @outgoing = CSV.open('/tmp/connection_logging.csv', 'w') end def finalize puts "\nData written to #{outgoing.path}\n\n" end def process_row(row) JSON.parse(row).values end end ## Instruction: Use after_run hook in rails log example during output. ## Code After: require 'tempfile' require 'csv' class FileOutput < Rodimus::Step def before_run_set_output @outgoing = CSV.open('/tmp/connection_logging.csv', 'w') end def after_run_log_path puts "\nData written to #{outgoing.path}\n\n" end def process_row(row) JSON.parse(row).values end end
require 'tempfile' require 'csv' class FileOutput < Rodimus::Step def before_run_set_output @outgoing = CSV.open('/tmp/connection_logging.csv', 'w') end - def finalize + def after_run_log_path puts "\nData written to #{outgoing.path}\n\n" end def process_row(row) JSON.parse(row).values end end
2
0.125
1
1