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
85d2c012bfaeeb04fa8dd31cd05a04a8dc43c14e
tests/grammar_term-nonterm_test/NonterminalsInvalidTest.py
tests/grammar_term-nonterm_test/NonterminalsInvalidTest.py
from unittest import TestCase, main from grammpy.RawGrammar import RawGrammar class NonterminalsInvalidTest(TestCase): pass if __name__ == '__main__': main()
from unittest import TestCase, main from grammpy.RawGrammar import RawGrammar as Grammar from grammpy import Nonterminal from grammpy.exceptions import NotNonterminalException class TempClass(Nonterminal): pass class NonterminalsInvalidTest(TestCase): def test_invalidAddNumber(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.add_nonterm(0) def test_invalidAddString(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.add_nonterm("string") def test_invalidAddAfterCorrectAdd(self): gr = Grammar() gr.add_nonterm(TempClass) with self.assertRaises(NotNonterminalException): gr.add_nonterm("asdf") def test_invalidAddInArray(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.add_nonterm([TempClass, "asdf"]) def test_invalidHaveNumber(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.have_nonterm(0) def test_invalidHaveString(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.have_nonterm("string") def test_invalidHaveAfterCorrectAdd(self): gr = Grammar() gr.add_nonterm(TempClass) with self.assertRaises(NotNonterminalException): gr.have_nonterm("asdf") def test_invalidHaveInArray(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.have_nonterm([TempClass, "asdf"]) if __name__ == '__main__': main()
Add tests that have and get of nonterms raise exceptions
Add tests that have and get of nonterms raise exceptions
Python
mit
PatrikValkovic/grammpy
python
## Code Before: from unittest import TestCase, main from grammpy.RawGrammar import RawGrammar class NonterminalsInvalidTest(TestCase): pass if __name__ == '__main__': main() ## Instruction: Add tests that have and get of nonterms raise exceptions ## Code After: from unittest import TestCase, main from grammpy.RawGrammar import RawGrammar as Grammar from grammpy import Nonterminal from grammpy.exceptions import NotNonterminalException class TempClass(Nonterminal): pass class NonterminalsInvalidTest(TestCase): def test_invalidAddNumber(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.add_nonterm(0) def test_invalidAddString(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.add_nonterm("string") def test_invalidAddAfterCorrectAdd(self): gr = Grammar() gr.add_nonterm(TempClass) with self.assertRaises(NotNonterminalException): gr.add_nonterm("asdf") def test_invalidAddInArray(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.add_nonterm([TempClass, "asdf"]) def test_invalidHaveNumber(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.have_nonterm(0) def test_invalidHaveString(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.have_nonterm("string") def test_invalidHaveAfterCorrectAdd(self): gr = Grammar() gr.add_nonterm(TempClass) with self.assertRaises(NotNonterminalException): gr.have_nonterm("asdf") def test_invalidHaveInArray(self): gr = Grammar() with self.assertRaises(NotNonterminalException): gr.have_nonterm([TempClass, "asdf"]) if __name__ == '__main__': main()
from unittest import TestCase, main - from grammpy.RawGrammar import RawGrammar + from grammpy.RawGrammar import RawGrammar as Grammar ? +++++++++++ + from grammpy import Nonterminal + from grammpy.exceptions import NotNonterminalException + + + class TempClass(Nonterminal): + pass class NonterminalsInvalidTest(TestCase): - pass + def test_invalidAddNumber(self): + gr = Grammar() + with self.assertRaises(NotNonterminalException): + gr.add_nonterm(0) + def test_invalidAddString(self): + gr = Grammar() + with self.assertRaises(NotNonterminalException): + gr.add_nonterm("string") + def test_invalidAddAfterCorrectAdd(self): + gr = Grammar() + gr.add_nonterm(TempClass) + with self.assertRaises(NotNonterminalException): + gr.add_nonterm("asdf") + + def test_invalidAddInArray(self): + gr = Grammar() + with self.assertRaises(NotNonterminalException): + gr.add_nonterm([TempClass, "asdf"]) + + def test_invalidHaveNumber(self): + gr = Grammar() + with self.assertRaises(NotNonterminalException): + gr.have_nonterm(0) + + def test_invalidHaveString(self): + gr = Grammar() + with self.assertRaises(NotNonterminalException): + gr.have_nonterm("string") + + def test_invalidHaveAfterCorrectAdd(self): + gr = Grammar() + gr.add_nonterm(TempClass) + with self.assertRaises(NotNonterminalException): + gr.have_nonterm("asdf") + + def test_invalidHaveInArray(self): + gr = Grammar() + with self.assertRaises(NotNonterminalException): + gr.have_nonterm([TempClass, "asdf"]) if __name__ == '__main__': main()
48
4
46
2
a343bf01fda78e578c042857c0b40f3bbd503e43
README.md
README.md
App for CR Galaticos Master League Championship
App for CR Galaticos Master League Championship This app has the proporse of organize and show results of the championship
Update readme [testing github bug]
Update readme [testing github bug]
Markdown
mit
thiag7/master_league_v2,raphaabrasil/galaticos_league,raphaabrasil/galaticos_league,raphaabrasil/galaticos_league,thiag7/master_league_v2,thiag7/master_league_v2,thiag7/master_league_v2,raphaabrasil/galaticos_league
markdown
## Code Before: App for CR Galaticos Master League Championship ## Instruction: Update readme [testing github bug] ## Code After: App for CR Galaticos Master League Championship This app has the proporse of organize and show results of the championship
App for CR Galaticos Master League Championship + + This app has the proporse of organize and show results of the championship
2
2
2
0
d546a43e803203f6d8bc949902a37452a0bfe361
.github/workflows/ci.yml
.github/workflows/ci.yml
name: CI on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v2 - name: Run a one-line script run: echo Hello, world!
name: CI on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: "3.6" - name: Run a one-line script run: python -c 'print("Hello, world!")'
Print message through configured Python
Print message through configured Python
YAML
apache-2.0
svunit/svunit,svunit/svunit,svunit/svunit
yaml
## Code Before: name: CI on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v2 - name: Run a one-line script run: echo Hello, world! ## Instruction: Print message through configured Python ## Code After: name: CI on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: "3.6" - name: Run a one-line script run: python -c 'print("Hello, world!")'
name: CI on: [push, pull_request] jobs: build: runs-on: ubuntu-latest steps: - name: Check out repository code uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.6" + - name: Run a one-line script - run: echo Hello, world! + run: python -c 'print("Hello, world!")'
7
0.5
6
1
8d8418cf7ad8c386070ffb915957de680e9039d1
.github/workflows/pr_tests.yml
.github/workflows/pr_tests.yml
name: CI on: [push] env: IS_GITHUB: "true" jobs: phpunit: strategy: fail-fast: false matrix: php_version: ["8.0", "8.1", "latest"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Start Redis on Default Port uses: supercharge/redis-github-action@1.4.0 with: redis-port: 6379 # - name: Start 2nd Redis Server on 6380 # uses: supercharge/redis-github-action@1.4.0 # with: # redis-port: 6380 # These are the versions of the *actions*, not the libraries. - name: Install PHP Packages uses: php-actions/composer@v5 - name: Run Tests uses: php-actions/phpunit@v3 with: php_version: ${{ matrix.php_version }}
name: CI on: [push, pull_request] env: IS_GITHUB: "true" jobs: phpunit: strategy: fail-fast: false matrix: php_version: ["8.0", "8.1", "latest"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Start Redis on Default Port uses: supercharge/redis-github-action@1.4.0 with: redis-port: 6379 # - name: Start 2nd Redis Server on 6380 # uses: supercharge/redis-github-action@1.4.0 # with: # redis-port: 6380 # These are the versions of the *actions*, not the libraries. - name: Install PHP Packages uses: php-actions/composer@v5 - name: Run Tests uses: php-actions/phpunit@v3 with: php_version: ${{ matrix.php_version }}
Make the tests run in pull requests
Make the tests run in pull requests
YAML
bsd-3-clause
tedious/Stash,tedious/Stash
yaml
## Code Before: name: CI on: [push] env: IS_GITHUB: "true" jobs: phpunit: strategy: fail-fast: false matrix: php_version: ["8.0", "8.1", "latest"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Start Redis on Default Port uses: supercharge/redis-github-action@1.4.0 with: redis-port: 6379 # - name: Start 2nd Redis Server on 6380 # uses: supercharge/redis-github-action@1.4.0 # with: # redis-port: 6380 # These are the versions of the *actions*, not the libraries. - name: Install PHP Packages uses: php-actions/composer@v5 - name: Run Tests uses: php-actions/phpunit@v3 with: php_version: ${{ matrix.php_version }} ## Instruction: Make the tests run in pull requests ## Code After: name: CI on: [push, pull_request] env: IS_GITHUB: "true" jobs: phpunit: strategy: fail-fast: false matrix: php_version: ["8.0", "8.1", "latest"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Start Redis on Default Port uses: supercharge/redis-github-action@1.4.0 with: redis-port: 6379 # - name: Start 2nd Redis Server on 6380 # uses: supercharge/redis-github-action@1.4.0 # with: # redis-port: 6380 # These are the versions of the *actions*, not the libraries. - name: Install PHP Packages uses: php-actions/composer@v5 - name: Run Tests uses: php-actions/phpunit@v3 with: php_version: ${{ matrix.php_version }}
name: CI - on: [push] + on: [push, pull_request] env: IS_GITHUB: "true" jobs: phpunit: strategy: fail-fast: false matrix: php_version: ["8.0", "8.1", "latest"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Start Redis on Default Port uses: supercharge/redis-github-action@1.4.0 with: redis-port: 6379 # - name: Start 2nd Redis Server on 6380 # uses: supercharge/redis-github-action@1.4.0 # with: # redis-port: 6380 # These are the versions of the *actions*, not the libraries. - name: Install PHP Packages uses: php-actions/composer@v5 - name: Run Tests uses: php-actions/phpunit@v3 with: php_version: ${{ matrix.php_version }}
2
0.055556
1
1
1c81183bae0feba671f3dd1b88bd93bf90108490
defaults/main.yml
defaults/main.yml
--- letsencrypt_install_directory: /usr/local/src letsencrypt_cert_domain: "{{ ansible_fqdn }}" letsencrypt_agree_tos: false letsencrypt_agree_eula: false
--- letsencrypt_install_directory: /usr/local/src/letsencrypt letsencrypt_cert_domain: "{{ ansible_fqdn }}" letsencrypt_agree_tos: false letsencrypt_agree_eula: false
Move install location to /usr/local/src/letsencrypt
Move install location to /usr/local/src/letsencrypt
YAML
agpl-3.0
Tradenomiliitto/tradenomiitti,Tradenomiliitto/tradenomiitti,Tradenomiliitto/tradenomiitti
yaml
## Code Before: --- letsencrypt_install_directory: /usr/local/src letsencrypt_cert_domain: "{{ ansible_fqdn }}" letsencrypt_agree_tos: false letsencrypt_agree_eula: false ## Instruction: Move install location to /usr/local/src/letsencrypt ## Code After: --- letsencrypt_install_directory: /usr/local/src/letsencrypt letsencrypt_cert_domain: "{{ ansible_fqdn }}" letsencrypt_agree_tos: false letsencrypt_agree_eula: false
--- - letsencrypt_install_directory: /usr/local/src + letsencrypt_install_directory: /usr/local/src/letsencrypt ? ++++++++++++ letsencrypt_cert_domain: "{{ ansible_fqdn }}" letsencrypt_agree_tos: false letsencrypt_agree_eula: false
2
0.4
1
1
4fe2a1a21fdd09c454f17b225328851a9b92afc1
.travis.yml
.travis.yml
rvm: - 1.9.3 - 1.9.2 script: bundle exec strainer test
rvm: - 1.9.3 - 1.9.2 env: - CHEF_VERSION='~> 10.0' - CHEF_VERSION='~> 11.0' script: bundle exec strainer test
Test against a version matrix
Test against a version matrix
YAML
apache-2.0
customink-webops/hostsfile
yaml
## Code Before: rvm: - 1.9.3 - 1.9.2 script: bundle exec strainer test ## Instruction: Test against a version matrix ## Code After: rvm: - 1.9.3 - 1.9.2 env: - CHEF_VERSION='~> 10.0' - CHEF_VERSION='~> 11.0' script: bundle exec strainer test
rvm: - 1.9.3 - 1.9.2 + env: + - CHEF_VERSION='~> 10.0' + - CHEF_VERSION='~> 11.0' script: bundle exec strainer test
3
0.75
3
0
c8950f616f4b956413a1254eb745c984260eb686
_no/dep/cop.md
_no/dep/cop.md
--- layout: relation title: 'cop' shortdef: 'copula' --- A copula is the relation between the complement of a copular verb and the copular verb *være* "to be". The copula is treated as a dependent of the lexical verb. ~~~ sdparse Det er ovnsbakt piggvar \n It is ovenbaked turbot cop(piggvar, er) ~~~ This analysis entails that in copula clauses, the main predicate is not verbal, but rather an adjectival or even nominal (as in the above example). Note that there are occurrences of *være* "to be" which do not give rise to a copula analysis, such as in cleft constructions (see [expl](expl)). <!-- Interlanguage links updated Čt lis 12 09:43:20 CET 2020 -->
--- layout: relation title: 'cop' shortdef: 'copula' udver: '2' --- A copula is the relation between a non-verbal predicate and the copular verb *være* "to be". ~~~ sdparse Det er ovnsbakt piggvar \n It is ovenbaked turbot cop(piggvar, er) ~~~ Note that there are occurrences of *være* "to be" which do not give rise to a copula analysis, such as in cleft constructions (see [expl](expl)). <!-- Interlanguage links updated Čt lis 12 09:43:20 CET 2020 -->
Add UD 2 flag, update text
Add UD 2 flag, update text
Markdown
apache-2.0
UniversalDependencies/docs,UniversalDependencies/docs,UniversalDependencies/docs,UniversalDependencies/docs,UniversalDependencies/docs,UniversalDependencies/docs
markdown
## Code Before: --- layout: relation title: 'cop' shortdef: 'copula' --- A copula is the relation between the complement of a copular verb and the copular verb *være* "to be". The copula is treated as a dependent of the lexical verb. ~~~ sdparse Det er ovnsbakt piggvar \n It is ovenbaked turbot cop(piggvar, er) ~~~ This analysis entails that in copula clauses, the main predicate is not verbal, but rather an adjectival or even nominal (as in the above example). Note that there are occurrences of *være* "to be" which do not give rise to a copula analysis, such as in cleft constructions (see [expl](expl)). <!-- Interlanguage links updated Čt lis 12 09:43:20 CET 2020 --> ## Instruction: Add UD 2 flag, update text ## Code After: --- layout: relation title: 'cop' shortdef: 'copula' udver: '2' --- A copula is the relation between a non-verbal predicate and the copular verb *være* "to be". ~~~ sdparse Det er ovnsbakt piggvar \n It is ovenbaked turbot cop(piggvar, er) ~~~ Note that there are occurrences of *være* "to be" which do not give rise to a copula analysis, such as in cleft constructions (see [expl](expl)). <!-- Interlanguage links updated Čt lis 12 09:43:20 CET 2020 -->
--- layout: relation title: 'cop' shortdef: 'copula' + udver: '2' --- - A copula is the relation between the complement of a copular verb and the copular verb *være* "to be". The copula is treated as a dependent of the lexical verb. + A copula is the relation between a non-verbal predicate and the copular verb *være* "to be". ~~~ sdparse Det er ovnsbakt piggvar \n It is ovenbaked turbot cop(piggvar, er) ~~~ - This analysis entails that in copula clauses, the main predicate is not verbal, but rather an adjectival or even nominal (as in the above example). - Note that there are occurrences of *være* "to be" which do not give rise to a copula analysis, such as in cleft constructions (see [expl](expl)). <!-- Interlanguage links updated Čt lis 12 09:43:20 CET 2020 -->
5
0.277778
2
3
01a7cb13ce067c28a47c977322c47e2a4bd4db77
.travis.yml
.travis.yml
language: php php: - 7.0 - 7.1 - nightly before_script: - ./build.sh build - ls modules/*.php | xargs -n 1 php -l script: php -l build/index.php
language: php php: - 7.1 - 7.2 - 7.3 - nightly before_script: - ./build.sh build - ls modules/*.php | xargs -n 1 php -l script: php -l build/index.php
Update PHP versions in Travis CI config
Update PHP versions in Travis CI config
YAML
mpl-2.0
sbrl/Pepperminty-Wiki,sbrl/Pepperminty-Wiki
yaml
## Code Before: language: php php: - 7.0 - 7.1 - nightly before_script: - ./build.sh build - ls modules/*.php | xargs -n 1 php -l script: php -l build/index.php ## Instruction: Update PHP versions in Travis CI config ## Code After: language: php php: - 7.1 - 7.2 - 7.3 - nightly before_script: - ./build.sh build - ls modules/*.php | xargs -n 1 php -l script: php -l build/index.php
language: php php: - - 7.0 - 7.1 + - 7.2 + - 7.3 - nightly before_script: - ./build.sh build - ls modules/*.php | xargs -n 1 php -l script: php -l build/index.php
3
0.25
2
1
7f7612c614dbdc3780fc4de542bed847ddfa61ef
README.md
README.md
Shogi Postmortem
spm === Shogi replay and postmortem client for Unix Requirements ------------ * USI engines * Kifu License ------- This software is released under the MIT License, see *LICENSE*
Add some features and license.
Add some features and license.
Markdown
mit
koji-hirono/spm,koji-hirono/spm,koji-hirono/spm
markdown
## Code Before: Shogi Postmortem ## Instruction: Add some features and license. ## Code After: spm === Shogi replay and postmortem client for Unix Requirements ------------ * USI engines * Kifu License ------- This software is released under the MIT License, see *LICENSE*
- Shogi Postmortem + spm + === + + Shogi replay and postmortem client for Unix + + Requirements + ------------ + * USI engines + * Kifu + + License + ------- + This software is released under the MIT License, see *LICENSE*
14
14
13
1
6ed2a79a08290be280f55ef0d6f4157a524fce3f
addressbook-web-tests/src/test/java/ru/vitali/pft/addressbook/tests/TestBase.java
addressbook-web-tests/src/test/java/ru/vitali/pft/addressbook/tests/TestBase.java
package ru.vitali.pft.addressbook.tests; import org.openqa.selenium.remote.BrowserType; import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterSuite; import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeSuite; import ru.vitali.pft.addressbook.appmanager.ApplicationManager; public class TestBase { protected static final ApplicationManager app = new ApplicationManager(BrowserType.CHROME); @BeforeSuite public void setUp() throws Exception { app.init(); } @AfterSuite public void tearDown() { app.stop(); } }
package ru.vitali.pft.addressbook.tests; import org.openqa.selenium.remote.BrowserType; import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterSuite; import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeSuite; import ru.vitali.pft.addressbook.appmanager.ApplicationManager; public class TestBase { protected static final ApplicationManager app = new ApplicationManager(System.getProperty("browser", BrowserType.CHROME)); @BeforeSuite public void setUp() throws Exception { app.init(); } @AfterSuite public void tearDown() { app.stop(); } }
Configure browser type from IDE
Configure browser type from IDE * Go to Edit configurations of a test class and pass browser type to VM options, i.e.: VM options: -ea -Dbrowser=firefox * If nothing passed to VM options, then default browser is used - the second param in System.getProperty()
Java
apache-2.0
vlucenco/java_learn,vlucenco/java_learn
java
## Code Before: package ru.vitali.pft.addressbook.tests; import org.openqa.selenium.remote.BrowserType; import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterSuite; import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeSuite; import ru.vitali.pft.addressbook.appmanager.ApplicationManager; public class TestBase { protected static final ApplicationManager app = new ApplicationManager(BrowserType.CHROME); @BeforeSuite public void setUp() throws Exception { app.init(); } @AfterSuite public void tearDown() { app.stop(); } } ## Instruction: Configure browser type from IDE * Go to Edit configurations of a test class and pass browser type to VM options, i.e.: VM options: -ea -Dbrowser=firefox * If nothing passed to VM options, then default browser is used - the second param in System.getProperty() ## Code After: package ru.vitali.pft.addressbook.tests; import org.openqa.selenium.remote.BrowserType; import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterSuite; import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeSuite; import ru.vitali.pft.addressbook.appmanager.ApplicationManager; public class TestBase { protected static final ApplicationManager app = new ApplicationManager(System.getProperty("browser", BrowserType.CHROME)); @BeforeSuite public void setUp() throws Exception { app.init(); } @AfterSuite public void tearDown() { app.stop(); } }
package ru.vitali.pft.addressbook.tests; import org.openqa.selenium.remote.BrowserType; import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterSuite; import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeSuite; import ru.vitali.pft.addressbook.appmanager.ApplicationManager; public class TestBase { - protected static final ApplicationManager app = new ApplicationManager(BrowserType.CHROME); + protected static final ApplicationManager app + = new ApplicationManager(System.getProperty("browser", BrowserType.CHROME)); @BeforeSuite public void setUp() throws Exception { app.init(); } @AfterSuite public void tearDown() { app.stop(); } }
3
0.130435
2
1
8e5dd464bccd98607746ff60ba414fe8dc7fdc89
metadata/com.rtbishop.look4sat.yml
metadata/com.rtbishop.look4sat.yml
Categories: - Science & Education License: GPL-2.0-only AuthorName: Arty Bishop AuthorEmail: bishop.arty@gmail.com SourceCode: https://github.com/rt-bishop/Look4Sat IssueTracker: https://github.com/rt-bishop/Look4Sat/issues Changelog: https://github.com/rt-bishop/Look4Sat/releases AutoName: Look4Sat RepoType: git Repo: https://github.com/rt-bishop/Look4Sat Builds: - versionName: 1.4.5 versionCode: 15 commit: v1.4.5 subdir: app gradle: - yes - versionName: 1.4.6 versionCode: 16 commit: v1.4.6 subdir: app gradle: - yes AutoUpdateMode: Version v%v UpdateCheckMode: Tags CurrentVersion: 1.4.6 CurrentVersionCode: 16
Categories: - Science & Education License: GPL-2.0-only AuthorName: Arty Bishop AuthorEmail: bishop.arty@gmail.com SourceCode: https://github.com/rt-bishop/Look4Sat IssueTracker: https://github.com/rt-bishop/Look4Sat/issues Changelog: https://github.com/rt-bishop/Look4Sat/releases AutoName: Look4Sat RepoType: git Repo: https://github.com/rt-bishop/Look4Sat Builds: - versionName: 1.4.5 versionCode: 15 commit: v1.4.5 subdir: app gradle: - yes - versionName: 1.4.6 versionCode: 16 commit: v1.4.6 subdir: app gradle: - yes - versionName: 1.4.8 versionCode: 18 commit: v1.4.8 subdir: app gradle: - yes AutoUpdateMode: Version v%v UpdateCheckMode: Tags CurrentVersion: 1.4.8 CurrentVersionCode: 18
Update Look4Sat to 1.4.8 (18)
Update Look4Sat to 1.4.8 (18)
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata
yaml
## Code Before: Categories: - Science & Education License: GPL-2.0-only AuthorName: Arty Bishop AuthorEmail: bishop.arty@gmail.com SourceCode: https://github.com/rt-bishop/Look4Sat IssueTracker: https://github.com/rt-bishop/Look4Sat/issues Changelog: https://github.com/rt-bishop/Look4Sat/releases AutoName: Look4Sat RepoType: git Repo: https://github.com/rt-bishop/Look4Sat Builds: - versionName: 1.4.5 versionCode: 15 commit: v1.4.5 subdir: app gradle: - yes - versionName: 1.4.6 versionCode: 16 commit: v1.4.6 subdir: app gradle: - yes AutoUpdateMode: Version v%v UpdateCheckMode: Tags CurrentVersion: 1.4.6 CurrentVersionCode: 16 ## Instruction: Update Look4Sat to 1.4.8 (18) ## Code After: Categories: - Science & Education License: GPL-2.0-only AuthorName: Arty Bishop AuthorEmail: bishop.arty@gmail.com SourceCode: https://github.com/rt-bishop/Look4Sat IssueTracker: https://github.com/rt-bishop/Look4Sat/issues Changelog: https://github.com/rt-bishop/Look4Sat/releases AutoName: Look4Sat RepoType: git Repo: https://github.com/rt-bishop/Look4Sat Builds: - versionName: 1.4.5 versionCode: 15 commit: v1.4.5 subdir: app gradle: - yes - versionName: 1.4.6 versionCode: 16 commit: v1.4.6 subdir: app gradle: - yes - versionName: 1.4.8 versionCode: 18 commit: v1.4.8 subdir: app gradle: - yes AutoUpdateMode: Version v%v UpdateCheckMode: Tags CurrentVersion: 1.4.8 CurrentVersionCode: 18
Categories: - Science & Education License: GPL-2.0-only AuthorName: Arty Bishop AuthorEmail: bishop.arty@gmail.com SourceCode: https://github.com/rt-bishop/Look4Sat IssueTracker: https://github.com/rt-bishop/Look4Sat/issues Changelog: https://github.com/rt-bishop/Look4Sat/releases AutoName: Look4Sat RepoType: git Repo: https://github.com/rt-bishop/Look4Sat Builds: - versionName: 1.4.5 versionCode: 15 commit: v1.4.5 subdir: app gradle: - yes - versionName: 1.4.6 versionCode: 16 commit: v1.4.6 subdir: app gradle: - yes + - versionName: 1.4.8 + versionCode: 18 + commit: v1.4.8 + subdir: app + gradle: + - yes + AutoUpdateMode: Version v%v UpdateCheckMode: Tags - CurrentVersion: 1.4.6 ? ^ + CurrentVersion: 1.4.8 ? ^ - CurrentVersionCode: 16 ? ^ + CurrentVersionCode: 18 ? ^
11
0.333333
9
2
8734bf9d679646e4c01758698fce66dac62e4ca3
lib/xmlbuilder.js
lib/xmlbuilder.js
module.exports = require('xmlbuilder'); module.exports.XMLFragment = require('xmlbuilder/lib/XMLFragment'); module.exports.XMLFragment.prototype.addFragment = function(fragment) { fragment.parent = this; this.children.push(fragment); return this; }; // This is a workaround for the problem that text() does not work when empty string is given. // https://github.com/oozcitak/xmlbuilder-js/pull/19 var originalToString = module.exports.XMLFragment.prototype.toString; module.exports.XMLFragment.prototype.toString = function() { var string = originalToString.apply(this, arguments); return string.replace(/<\/>/g, ''); };
module.exports = require('xmlbuilder'); module.exports.XMLFragment = require('xmlbuilder/lib/XMLFragment'); module.exports.XMLFragment.prototype.addFragment = function(fragments) { if (fragments) { if (!Array.isArray(fragments)) fragments = [fragments]; fragments.forEach(function(fragment) { fragment.parent = this; this.children.push(fragment); }, this); } return this; }; // This is a workaround for the problem that text() does not work when empty string is given. // https://github.com/oozcitak/xmlbuilder-js/pull/19 var originalToString = module.exports.XMLFragment.prototype.toString; module.exports.XMLFragment.prototype.toString = function() { var string = originalToString.apply(this, arguments); return string.replace(/<\/>/g, ''); };
Support null and array for addFragment()
Support null and array for addFragment()
JavaScript
mit
groonga/gcs,groonga/gcs
javascript
## Code Before: module.exports = require('xmlbuilder'); module.exports.XMLFragment = require('xmlbuilder/lib/XMLFragment'); module.exports.XMLFragment.prototype.addFragment = function(fragment) { fragment.parent = this; this.children.push(fragment); return this; }; // This is a workaround for the problem that text() does not work when empty string is given. // https://github.com/oozcitak/xmlbuilder-js/pull/19 var originalToString = module.exports.XMLFragment.prototype.toString; module.exports.XMLFragment.prototype.toString = function() { var string = originalToString.apply(this, arguments); return string.replace(/<\/>/g, ''); }; ## Instruction: Support null and array for addFragment() ## Code After: module.exports = require('xmlbuilder'); module.exports.XMLFragment = require('xmlbuilder/lib/XMLFragment'); module.exports.XMLFragment.prototype.addFragment = function(fragments) { if (fragments) { if (!Array.isArray(fragments)) fragments = [fragments]; fragments.forEach(function(fragment) { fragment.parent = this; this.children.push(fragment); }, this); } return this; }; // This is a workaround for the problem that text() does not work when empty string is given. // https://github.com/oozcitak/xmlbuilder-js/pull/19 var originalToString = module.exports.XMLFragment.prototype.toString; module.exports.XMLFragment.prototype.toString = function() { var string = originalToString.apply(this, arguments); return string.replace(/<\/>/g, ''); };
module.exports = require('xmlbuilder'); module.exports.XMLFragment = require('xmlbuilder/lib/XMLFragment'); - module.exports.XMLFragment.prototype.addFragment = function(fragment) { + module.exports.XMLFragment.prototype.addFragment = function(fragments) { ? + + if (fragments) { + if (!Array.isArray(fragments)) + fragments = [fragments]; + fragments.forEach(function(fragment) { - fragment.parent = this; + fragment.parent = this; ? ++++ - this.children.push(fragment); + this.children.push(fragment); ? ++++ + }, this); + } return this; }; // This is a workaround for the problem that text() does not work when empty string is given. // https://github.com/oozcitak/xmlbuilder-js/pull/19 var originalToString = module.exports.XMLFragment.prototype.toString; module.exports.XMLFragment.prototype.toString = function() { var string = originalToString.apply(this, arguments); return string.replace(/<\/>/g, ''); };
12
0.75
9
3
97ace78721861b907f38fca8f9fd614ff53090d8
src/tick.js
src/tick.js
import yargs from 'yargs' import log from './commands/tick-log' import list from './commands/tick-list' import rm from './commands/tick-rm' let master = yargs .usage('tick <command>') .command('log', 'log a tick') .command('list', 'list your ticks') .help('h') .alias('h', 'help') .demand(1, 'you must provide a valid command') let argv = master.argv let command = argv._[0] if (command === 'log') { log(master.reset()) } if (command === 'list') { list(master.reset()) } if (command === 'rm') { rm(master.reset()) }
import yargs from 'yargs' import log from './commands/tick-log' import list from './commands/tick-list' import rm from './commands/tick-rm' let master = yargs .usage('tick <command>') .command('log', 'log a tick') .command('list', 'list your ticks') .command('rm', 'delete a tick') .help('h') .alias('h', 'help') .demand(1, 'you must provide a valid command') let argv = master.argv let command = argv._[0] if (command === 'log') { log(master.reset()) } if (command === 'list') { list(master.reset()) } if (command === 'rm') { rm(master.reset()) }
Add help for the rm command
Add help for the rm command
JavaScript
agpl-3.0
tickbin/tickbin,chadfawcett/tickbin,jonotron/tickbin
javascript
## Code Before: import yargs from 'yargs' import log from './commands/tick-log' import list from './commands/tick-list' import rm from './commands/tick-rm' let master = yargs .usage('tick <command>') .command('log', 'log a tick') .command('list', 'list your ticks') .help('h') .alias('h', 'help') .demand(1, 'you must provide a valid command') let argv = master.argv let command = argv._[0] if (command === 'log') { log(master.reset()) } if (command === 'list') { list(master.reset()) } if (command === 'rm') { rm(master.reset()) } ## Instruction: Add help for the rm command ## Code After: import yargs from 'yargs' import log from './commands/tick-log' import list from './commands/tick-list' import rm from './commands/tick-rm' let master = yargs .usage('tick <command>') .command('log', 'log a tick') .command('list', 'list your ticks') .command('rm', 'delete a tick') .help('h') .alias('h', 'help') .demand(1, 'you must provide a valid command') let argv = master.argv let command = argv._[0] if (command === 'log') { log(master.reset()) } if (command === 'list') { list(master.reset()) } if (command === 'rm') { rm(master.reset()) }
import yargs from 'yargs' import log from './commands/tick-log' import list from './commands/tick-list' import rm from './commands/tick-rm' let master = yargs .usage('tick <command>') .command('log', 'log a tick') .command('list', 'list your ticks') + .command('rm', 'delete a tick') .help('h') .alias('h', 'help') .demand(1, 'you must provide a valid command') let argv = master.argv let command = argv._[0] if (command === 'log') { log(master.reset()) } if (command === 'list') { list(master.reset()) } if (command === 'rm') { rm(master.reset()) }
1
0.035714
1
0
638dda46a63f1c98f674febe170df55fe36cea5e
tests/test_timestepping.py
tests/test_timestepping.py
import numpy as np from sympy import Eq import pytest from devito.interfaces import TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, time_dim=6, save=True) def test_forward(a, nt=5): a.data[0, :] = 1. eqn = Eq(a.forward, a + 1.) StencilKernel(eqn, dle=None, dse=None)() for i in range(nt): assert np.allclose(a.data[i, :], 1. + i, rtol=1.e-12)
import numpy as np from sympy import Eq import pytest from devito.interfaces import Backward, Forward, TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, time_dim=6, save=True) @pytest.fixture def b(shape=(11, 11)): """Backward time data object, unrolled (save=True)""" return TimeData(name='b', shape=shape, time_order=1, time_dim=6, save=True) def test_forward(a, nt=5): a.data[0, :] = 1. eqn = Eq(a.forward, a + 1.) StencilKernel(eqn, dle=None, dse=None)() for i in range(nt): assert np.allclose(a.data[i, :], 1. + i, rtol=1.e-12) def test_backward(b, nt=5): b.data[nt, :] = 6. eqn = Eq(b.backward, b - 1.) StencilKernel(eqn, dle=None, dse=None, time_axis=Backward)(time=nt) for i in range(nt + 1): assert np.allclose(b.data[i, :], 1. + i, rtol=1.e-12)
Add explicit test for reverse timestepping
TimeData: Add explicit test for reverse timestepping
Python
mit
opesci/devito,opesci/devito
python
## Code Before: import numpy as np from sympy import Eq import pytest from devito.interfaces import TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, time_dim=6, save=True) def test_forward(a, nt=5): a.data[0, :] = 1. eqn = Eq(a.forward, a + 1.) StencilKernel(eqn, dle=None, dse=None)() for i in range(nt): assert np.allclose(a.data[i, :], 1. + i, rtol=1.e-12) ## Instruction: TimeData: Add explicit test for reverse timestepping ## Code After: import numpy as np from sympy import Eq import pytest from devito.interfaces import Backward, Forward, TimeData from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, time_dim=6, save=True) @pytest.fixture def b(shape=(11, 11)): """Backward time data object, unrolled (save=True)""" return TimeData(name='b', shape=shape, time_order=1, time_dim=6, save=True) def test_forward(a, nt=5): a.data[0, :] = 1. eqn = Eq(a.forward, a + 1.) StencilKernel(eqn, dle=None, dse=None)() for i in range(nt): assert np.allclose(a.data[i, :], 1. + i, rtol=1.e-12) def test_backward(b, nt=5): b.data[nt, :] = 6. eqn = Eq(b.backward, b - 1.) StencilKernel(eqn, dle=None, dse=None, time_axis=Backward)(time=nt) for i in range(nt + 1): assert np.allclose(b.data[i, :], 1. + i, rtol=1.e-12)
import numpy as np from sympy import Eq import pytest - from devito.interfaces import TimeData + from devito.interfaces import Backward, Forward, TimeData ? +++++++++++++++++++ from devito.stencilkernel import StencilKernel @pytest.fixture def a(shape=(11, 11)): """Forward time data object, unrolled (save=True)""" return TimeData(name='a', shape=shape, time_order=1, time_dim=6, save=True) + @pytest.fixture + def b(shape=(11, 11)): + """Backward time data object, unrolled (save=True)""" + return TimeData(name='b', shape=shape, time_order=1, + time_dim=6, save=True) + + def test_forward(a, nt=5): a.data[0, :] = 1. eqn = Eq(a.forward, a + 1.) StencilKernel(eqn, dle=None, dse=None)() for i in range(nt): assert np.allclose(a.data[i, :], 1. + i, rtol=1.e-12) + + + def test_backward(b, nt=5): + b.data[nt, :] = 6. + eqn = Eq(b.backward, b - 1.) + StencilKernel(eqn, dle=None, dse=None, time_axis=Backward)(time=nt) + for i in range(nt + 1): + assert np.allclose(b.data[i, :], 1. + i, rtol=1.e-12)
17
0.772727
16
1
8cb3fc7f5b13238deff8cc1172a3e86d6b2e1bfa
README.md
README.md
https://fedorahosted.org/fedoracommunity/wiki/Development Note: Some more dependencies to be installed:- $ sudo dnf install python-webhelpers fedmsg pygobject3 $ pip install gearbox ### Hacking with Vagrant We have a simple vagrant setup for hacking on the fedora-packages app. First, install Ansible, Vagrant, the vagrant-sshfs plugin, and the vagrant-libvirt plugin from the official Fedora repos: $ sudo dnf install ansible vagrant vagrant-libvirt vagrant-sshfs Now, from within main directory (the one with the Vagrantfile in it) of your git checkout of fedora-pacakges, run the vagrant up command to provision your dev environment: $ vagrant up When this command is completed (it may take a while) you will be able to ssh into your dev VM with vagrant ssh and then run the c ommand to start the fedora-packages server: $ vagrant ssh [vagrant@localhost ~]$ pushd /vagrant/; gearbox serve; Once that is running, simply go to http://localhost:8080/ in your browser on your host to see your running fedora-packages test instance.
fedora-packages allows to search for packages in Fedora. ## Documentation Would be nice to have a bit more documentation. ### Hacking with Vagrant We have a simple vagrant setup for hacking on the fedora-packages app. First, install Ansible, Vagrant, the vagrant-sshfs plugin, and the vagrant-libvirt plugin from the official Fedora repos: $ sudo dnf install ansible vagrant vagrant-libvirt vagrant-sshfs Now, from within main directory (the one with the Vagrantfile in it) of your git checkout of fedora-pacakges, run the vagrant up command to provision your dev environment: $ vagrant up When this command is completed (it may take a while) you will be able to ssh into your dev VM with vagrant ssh and then run the c ommand to start the fedora-packages server: $ vagrant ssh [vagrant@localhost ~]$ pushd /vagrant/; gearbox serve; Once that is running, simply go to http://localhost:8080/ in your browser on your host to see your running fedora-packages test instance.
Remove fedorahosted link from Readme and only keep Vagrant setup for now
Remove fedorahosted link from Readme and only keep Vagrant setup for now Signed-off-by: Clement Verna <42821abe07dd2b40ac4015e34f880ddb708f32d6@tutanota.com>
Markdown
agpl-3.0
fedora-infra/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages,fedora-infra/fedora-packages
markdown
## Code Before: https://fedorahosted.org/fedoracommunity/wiki/Development Note: Some more dependencies to be installed:- $ sudo dnf install python-webhelpers fedmsg pygobject3 $ pip install gearbox ### Hacking with Vagrant We have a simple vagrant setup for hacking on the fedora-packages app. First, install Ansible, Vagrant, the vagrant-sshfs plugin, and the vagrant-libvirt plugin from the official Fedora repos: $ sudo dnf install ansible vagrant vagrant-libvirt vagrant-sshfs Now, from within main directory (the one with the Vagrantfile in it) of your git checkout of fedora-pacakges, run the vagrant up command to provision your dev environment: $ vagrant up When this command is completed (it may take a while) you will be able to ssh into your dev VM with vagrant ssh and then run the c ommand to start the fedora-packages server: $ vagrant ssh [vagrant@localhost ~]$ pushd /vagrant/; gearbox serve; Once that is running, simply go to http://localhost:8080/ in your browser on your host to see your running fedora-packages test instance. ## Instruction: Remove fedorahosted link from Readme and only keep Vagrant setup for now Signed-off-by: Clement Verna <42821abe07dd2b40ac4015e34f880ddb708f32d6@tutanota.com> ## Code After: fedora-packages allows to search for packages in Fedora. ## Documentation Would be nice to have a bit more documentation. ### Hacking with Vagrant We have a simple vagrant setup for hacking on the fedora-packages app. First, install Ansible, Vagrant, the vagrant-sshfs plugin, and the vagrant-libvirt plugin from the official Fedora repos: $ sudo dnf install ansible vagrant vagrant-libvirt vagrant-sshfs Now, from within main directory (the one with the Vagrantfile in it) of your git checkout of fedora-pacakges, run the vagrant up command to provision your dev environment: $ vagrant up When this command is completed (it may take a while) you will be able to ssh into your dev VM with vagrant ssh and then run the c ommand to start the fedora-packages server: $ vagrant ssh [vagrant@localhost ~]$ pushd /vagrant/; gearbox serve; Once that is running, simply go to http://localhost:8080/ in your browser on your host to see your running fedora-packages test instance.
- https://fedorahosted.org/fedoracommunity/wiki/Development - Note: Some more dependencies to be installed:- + fedora-packages allows to search for packages in Fedora. + ## Documentation + Would be nice to have a bit more documentation. - $ sudo dnf install python-webhelpers fedmsg pygobject3 - - $ pip install gearbox ### Hacking with Vagrant We have a simple vagrant setup for hacking on the fedora-packages app. First, install Ansible, Vagrant, the vagrant-sshfs plugin, and the vagrant-libvirt plugin from the official Fedora repos: $ sudo dnf install ansible vagrant vagrant-libvirt vagrant-sshfs Now, from within main directory (the one with the Vagrantfile in it) of your git checkout of fedora-pacakges, run the vagrant up command to provision your dev environment: $ vagrant up When this command is completed (it may take a while) you will be able to ssh into your dev VM with vagrant ssh and then run the c ommand to start the fedora-packages server: $ vagrant ssh [vagrant@localhost ~]$ pushd /vagrant/; gearbox serve; Once that is running, simply go to http://localhost:8080/ in your browser on your host to see your running fedora-packages test instance.
8
0.25
3
5
e58336ff0a85aadd94ff7b0440fa6082892f5574
.travis.yml
.travis.yml
language: java sudo: false jdk: - oraclejdk8 cache: directories: - $HOME/.m2
language: java sudo: false jdk: - oraclejdk8 env: - CASSANDRA_VERSION=3.0.3 - CASSANDRA_VERSION=3.2.1 - CASSANDRA_VERSION=3.3 install: mvn install -DskipTests=true -Dcassandra.version=$CASSANDRA_VERSION script: mvn test -Dcassandra.version=$CASSANDRA_VERSION cache: directories: - $HOME/.m2
Test against multiple cassandra versions.
Test against multiple cassandra versions.
YAML
apache-2.0
tolbertam/sstable-tools
yaml
## Code Before: language: java sudo: false jdk: - oraclejdk8 cache: directories: - $HOME/.m2 ## Instruction: Test against multiple cassandra versions. ## Code After: language: java sudo: false jdk: - oraclejdk8 env: - CASSANDRA_VERSION=3.0.3 - CASSANDRA_VERSION=3.2.1 - CASSANDRA_VERSION=3.3 install: mvn install -DskipTests=true -Dcassandra.version=$CASSANDRA_VERSION script: mvn test -Dcassandra.version=$CASSANDRA_VERSION cache: directories: - $HOME/.m2
language: java sudo: false jdk: - oraclejdk8 + env: + - CASSANDRA_VERSION=3.0.3 + - CASSANDRA_VERSION=3.2.1 + - CASSANDRA_VERSION=3.3 + install: mvn install -DskipTests=true -Dcassandra.version=$CASSANDRA_VERSION + script: mvn test -Dcassandra.version=$CASSANDRA_VERSION cache: directories: - $HOME/.m2
6
0.857143
6
0
5d17fe6dc3714cffe951b90be20ca011c32ee220
mobile/src/main/java/uk/co/czcz/speedreader/MainActivity.java
mobile/src/main/java/uk/co/czcz/speedreader/MainActivity.java
package uk.co.czcz.speedreader; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (getSupportFragmentManager().findFragmentById(R.id.fragment_container) == null) { // Initial run of this activity, so lets display a fragment getSupportFragmentManager().beginTransaction().add(new SpeedReadingFragment(), SpeedReadingFragment.TAG).commit(); } } }
package uk.co.czcz.speedreader; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (getSupportFragmentManager().findFragmentById(R.id.fragment_container) == null) { displayInitialSpeedReadingFragment(); } } private void displayInitialSpeedReadingFragment() { getSupportFragmentManager().beginTransaction().add(new SpeedReadingFragment(), SpeedReadingFragment.TAG).commit(); } }
Refactor to make it obvious what's going on.
Refactor to make it obvious what's going on.
Java
apache-2.0
ElFeesho/SpeedReader
java
## Code Before: package uk.co.czcz.speedreader; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (getSupportFragmentManager().findFragmentById(R.id.fragment_container) == null) { // Initial run of this activity, so lets display a fragment getSupportFragmentManager().beginTransaction().add(new SpeedReadingFragment(), SpeedReadingFragment.TAG).commit(); } } } ## Instruction: Refactor to make it obvious what's going on. ## Code After: package uk.co.czcz.speedreader; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (getSupportFragmentManager().findFragmentById(R.id.fragment_container) == null) { displayInitialSpeedReadingFragment(); } } private void displayInitialSpeedReadingFragment() { getSupportFragmentManager().beginTransaction().add(new SpeedReadingFragment(), SpeedReadingFragment.TAG).commit(); } }
package uk.co.czcz.speedreader; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); if (getSupportFragmentManager().findFragmentById(R.id.fragment_container) == null) { + displayInitialSpeedReadingFragment(); - // Initial run of this activity, so lets display a fragment - getSupportFragmentManager().beginTransaction().add(new SpeedReadingFragment(), SpeedReadingFragment.TAG).commit(); } } + + private void displayInitialSpeedReadingFragment() { + getSupportFragmentManager().beginTransaction().add(new SpeedReadingFragment(), SpeedReadingFragment.TAG).commit(); + } }
7
0.368421
5
2
669325d6ca93f81c4635d7d3d57120d8e23e5251
organizations/backends/forms.py
organizations/backends/forms.py
from django import forms from django.contrib.auth.models import User class InvitationRegistrationForm(forms.ModelForm): first_name = forms.CharField(max_length=30) last_name = forms.CharField(max_length=30) password = forms.CharField(max_length=30, widget=forms.PasswordInput) password_confirm = forms.CharField(max_length=30, widget=forms.PasswordInput) class Meta: model = User
from django import forms from django.contrib.auth.models import User class InvitationRegistrationForm(forms.ModelForm): first_name = forms.CharField(max_length=30) last_name = forms.CharField(max_length=30) password = forms.CharField(max_length=30, widget=forms.PasswordInput) password_confirm = forms.CharField(max_length=30, widget=forms.PasswordInput) def __init__(self, *args, **kwargs): super(InvitationRegistrationForm, self).__init__(*args, **kwargs) self.initial['username'] = '' class Meta: model = User exclude = ('is_staff', 'is_superuser', 'is_active', 'last_login', 'date_joined', 'groups', 'user_permissions')
Hide all unnecessary user info
Hide all unnecessary user info Excludes all User fields save for useranme, first/last name, email, and password. Also clears the username of its default data.
Python
bsd-2-clause
aptivate/django-organizations,arteria/django-ar-organizations,GauthamGoli/django-organizations,aptivate/django-organizations,DESHRAJ/django-organizations,DESHRAJ/django-organizations,GauthamGoli/django-organizations,st8st8/django-organizations,bennylope/django-organizations,arteria/django-ar-organizations,aptivate/django-organizations,st8st8/django-organizations,bennylope/django-organizations
python
## Code Before: from django import forms from django.contrib.auth.models import User class InvitationRegistrationForm(forms.ModelForm): first_name = forms.CharField(max_length=30) last_name = forms.CharField(max_length=30) password = forms.CharField(max_length=30, widget=forms.PasswordInput) password_confirm = forms.CharField(max_length=30, widget=forms.PasswordInput) class Meta: model = User ## Instruction: Hide all unnecessary user info Excludes all User fields save for useranme, first/last name, email, and password. Also clears the username of its default data. ## Code After: from django import forms from django.contrib.auth.models import User class InvitationRegistrationForm(forms.ModelForm): first_name = forms.CharField(max_length=30) last_name = forms.CharField(max_length=30) password = forms.CharField(max_length=30, widget=forms.PasswordInput) password_confirm = forms.CharField(max_length=30, widget=forms.PasswordInput) def __init__(self, *args, **kwargs): super(InvitationRegistrationForm, self).__init__(*args, **kwargs) self.initial['username'] = '' class Meta: model = User exclude = ('is_staff', 'is_superuser', 'is_active', 'last_login', 'date_joined', 'groups', 'user_permissions')
from django import forms from django.contrib.auth.models import User class InvitationRegistrationForm(forms.ModelForm): first_name = forms.CharField(max_length=30) last_name = forms.CharField(max_length=30) password = forms.CharField(max_length=30, widget=forms.PasswordInput) password_confirm = forms.CharField(max_length=30, widget=forms.PasswordInput) + def __init__(self, *args, **kwargs): + super(InvitationRegistrationForm, self).__init__(*args, **kwargs) + self.initial['username'] = '' + class Meta: model = User + exclude = ('is_staff', 'is_superuser', 'is_active', 'last_login', + 'date_joined', 'groups', 'user_permissions')
6
0.428571
6
0
a6702e839eec2b4d6d75f4126ed975456e9795dc
contacts/middleware.py
contacts/middleware.py
import logging from django.http import Http404 from gargoyle import gargoyle from contacts.models import Book sentry = logging.getLogger('sentry') class ContactBookMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): if hasattr(request, 'user'): if request.user.is_authenticated(): books = Book.objects.filter_for_user(request.user) request.current_book = None if gargoyle.is_active('multi_book', request): request.books = books request.current_book = books[0] if 'book' in view_kwargs: current_book = request.books.filter(id=view_kwargs['book']) if current_book: request.current_book = current_book else: return Http404 else: if books: request.current_book = books[0] else: request.current_book = None sentry.error("No book found for user", exc_info=True, extra={"user": user} ) if ( gargoyle.is_active('enable_payments', request) and request.current_book ): request.can_invite = ( request.current_book.plan and not request.current_book.plan.startswith('basic') ) else: request.can_invite = True
import logging from django.http import Http404 from gargoyle import gargoyle from contacts.models import Book sentry = logging.getLogger('sentry') class ContactBookMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): # CONTRACT: At the end of this, if the user is authenticate, # request.current_book _must_ be populated with a valid book, and # request.books _must_ be a list of Books with length greater than 1. if hasattr(request, 'user'): if request.user.is_authenticated(): request.books = Book.objects.filter_for_user(request.user) request.current_book = None if request.books: if 'book' in view_kwargs: current_book = request.books.filter(id=view_kwargs['book']) if current_book: request.current_book = current_book else: return Http404 else: request.current_book = request.books[0] else: sentry.error("No book found for user", exc_info=True, extra={"user": user} ) request.current_book = Book.objects.create_for_user(request.user) request.books = Book.objects.filter_for_user(request.user) if ( gargoyle.is_active('enable_payments', request) and request.current_book ): request.can_invite = ( request.current_book.plan and not request.current_book.plan.startswith('basic') ) else: request.can_invite = True
Update ContactBook Middleware to obey contract
Update ContactBook Middleware to obey contract
Python
mit
phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts,phildini/logtacts
python
## Code Before: import logging from django.http import Http404 from gargoyle import gargoyle from contacts.models import Book sentry = logging.getLogger('sentry') class ContactBookMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): if hasattr(request, 'user'): if request.user.is_authenticated(): books = Book.objects.filter_for_user(request.user) request.current_book = None if gargoyle.is_active('multi_book', request): request.books = books request.current_book = books[0] if 'book' in view_kwargs: current_book = request.books.filter(id=view_kwargs['book']) if current_book: request.current_book = current_book else: return Http404 else: if books: request.current_book = books[0] else: request.current_book = None sentry.error("No book found for user", exc_info=True, extra={"user": user} ) if ( gargoyle.is_active('enable_payments', request) and request.current_book ): request.can_invite = ( request.current_book.plan and not request.current_book.plan.startswith('basic') ) else: request.can_invite = True ## Instruction: Update ContactBook Middleware to obey contract ## Code After: import logging from django.http import Http404 from gargoyle import gargoyle from contacts.models import Book sentry = logging.getLogger('sentry') class ContactBookMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): # CONTRACT: At the end of this, if the user is authenticate, # request.current_book _must_ be populated with a valid book, and # request.books _must_ be a list of Books with length greater than 1. if hasattr(request, 'user'): if request.user.is_authenticated(): request.books = Book.objects.filter_for_user(request.user) request.current_book = None if request.books: if 'book' in view_kwargs: current_book = request.books.filter(id=view_kwargs['book']) if current_book: request.current_book = current_book else: return Http404 else: request.current_book = request.books[0] else: sentry.error("No book found for user", exc_info=True, extra={"user": user} ) request.current_book = Book.objects.create_for_user(request.user) request.books = Book.objects.filter_for_user(request.user) if ( gargoyle.is_active('enable_payments', request) and request.current_book ): request.can_invite = ( request.current_book.plan and not request.current_book.plan.startswith('basic') ) else: request.can_invite = True
import logging from django.http import Http404 from gargoyle import gargoyle from contacts.models import Book sentry = logging.getLogger('sentry') class ContactBookMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): - + # CONTRACT: At the end of this, if the user is authenticate, + # request.current_book _must_ be populated with a valid book, and + # request.books _must_ be a list of Books with length greater than 1. if hasattr(request, 'user'): if request.user.is_authenticated(): - books = Book.objects.filter_for_user(request.user) + request.books = Book.objects.filter_for_user(request.user) ? ++++++++ request.current_book = None - if gargoyle.is_active('multi_book', request): - request.books = books ? ^^^ ^^^^^^^^ + if request.books: ? ^^ ^ - request.current_book = books[0] if 'book' in view_kwargs: current_book = request.books.filter(id=view_kwargs['book']) if current_book: request.current_book = current_book else: return Http404 + else: + request.current_book = request.books[0] else: - if books: - request.current_book = books[0] - else: - request.current_book = None - sentry.error("No book found for user", exc_info=True, ? ---- + sentry.error("No book found for user", exc_info=True, - extra={"user": user} ? ---- + extra={"user": user} - ) ? ---- + ) + request.current_book = Book.objects.create_for_user(request.user) + request.books = Book.objects.filter_for_user(request.user) + if ( gargoyle.is_active('enable_payments', request) and request.current_book ): request.can_invite = ( request.current_book.plan and not request.current_book.plan.startswith('basic') ) else: request.can_invite = True
25
0.595238
13
12
c8a90ef782cb587efe63c8c0bd82be4a0589ab41
crowdin.yml
crowdin.yml
commit_message: '[ci skip]' files: - source: /docs/**/*.* ignore: - '*.sh' - '*.js' - '*.css' translation: /translations/%two_letters_code%/%original_path%/%original_file_name% - source: /mkdocs.yml translation: /translations/%two_letters_code%/%original_path%/%original_file_name% type: txt - source: /docs_exported ignore: - '*.js' - '*.css' - '*.sh' - /**/mkdocs.yml translation: >- /translations_exported/%two_letters_code%/%original_path%/%original_file_name% - source: /docs_exported/**/mkdocs.yml translation: >- /translations_exported/%two_letters_code%/%original_path%/%original_file_name%
commit_message: '[ci skip]' files: - source: /docs/**/*.* ignore: - '*.sh' - '*.js' - '*.css' translation: /translations/%two_letters_code%/%original_path%/%original_file_name% - source: /mkdocs.yml translation: /translations/%two_letters_code%/%original_path%/%original_file_name% type: txt - source: /docs_exported ignore: - '*.js' - '*.css' - '*.sh' - /**/mkdocs.yml translation: >- /translations_exported/%two_letters_code%/%original_path%/%original_file_name% - source: /docs_exported/**/mkdocs.yml translation: >- /translations_exported/%two_letters_code%/%original_path%/%original_file_name% type: txt
Make mkdocs files text again
Make mkdocs files text again Because that's not possible in the gui
YAML
mit
jaredlll08/CraftTweaker-Documentation,jaredlll08/CraftTweaker-Documentation
yaml
## Code Before: commit_message: '[ci skip]' files: - source: /docs/**/*.* ignore: - '*.sh' - '*.js' - '*.css' translation: /translations/%two_letters_code%/%original_path%/%original_file_name% - source: /mkdocs.yml translation: /translations/%two_letters_code%/%original_path%/%original_file_name% type: txt - source: /docs_exported ignore: - '*.js' - '*.css' - '*.sh' - /**/mkdocs.yml translation: >- /translations_exported/%two_letters_code%/%original_path%/%original_file_name% - source: /docs_exported/**/mkdocs.yml translation: >- /translations_exported/%two_letters_code%/%original_path%/%original_file_name% ## Instruction: Make mkdocs files text again Because that's not possible in the gui ## Code After: commit_message: '[ci skip]' files: - source: /docs/**/*.* ignore: - '*.sh' - '*.js' - '*.css' translation: /translations/%two_letters_code%/%original_path%/%original_file_name% - source: /mkdocs.yml translation: /translations/%two_letters_code%/%original_path%/%original_file_name% type: txt - source: /docs_exported ignore: - '*.js' - '*.css' - '*.sh' - /**/mkdocs.yml translation: >- /translations_exported/%two_letters_code%/%original_path%/%original_file_name% - source: /docs_exported/**/mkdocs.yml translation: >- /translations_exported/%two_letters_code%/%original_path%/%original_file_name% type: txt
commit_message: '[ci skip]' files: - source: /docs/**/*.* ignore: - '*.sh' - '*.js' - '*.css' translation: /translations/%two_letters_code%/%original_path%/%original_file_name% - source: /mkdocs.yml translation: /translations/%two_letters_code%/%original_path%/%original_file_name% type: txt - source: /docs_exported ignore: - '*.js' - '*.css' - '*.sh' - /**/mkdocs.yml translation: >- /translations_exported/%two_letters_code%/%original_path%/%original_file_name% - source: /docs_exported/**/mkdocs.yml translation: >- /translations_exported/%two_letters_code%/%original_path%/%original_file_name% + type: txt
1
0.045455
1
0
6edca9d46cd07c038f789401f4d5f96ec0fdaa35
tests/test-recipes/metadata/jinja2/meta.yaml
tests/test-recipes/metadata/jinja2/meta.yaml
package: name: conda-build-test-jinja2-in-recipe version: 1.0 build: number: 0 requirements: build: - jinja2 test: commands: - echo
package: name: conda-build-test-jinja2-in-recipe version: 1.0 build: number: 0 requirements: build: - jinja2 - python test: commands: - echo
Include python in the build dependencies of the jinja2 recipe
Include python in the build dependencies of the jinja2 recipe
YAML
bsd-3-clause
sandhujasmine/conda-build,rmcgibbo/conda-build,dan-blanchard/conda-build,mwcraig/conda-build,frol/conda-build,sandhujasmine/conda-build,mwcraig/conda-build,frol/conda-build,dan-blanchard/conda-build,ilastik/conda-build,sandhujasmine/conda-build,mwcraig/conda-build,frol/conda-build,rmcgibbo/conda-build,rmcgibbo/conda-build,dan-blanchard/conda-build,ilastik/conda-build,ilastik/conda-build
yaml
## Code Before: package: name: conda-build-test-jinja2-in-recipe version: 1.0 build: number: 0 requirements: build: - jinja2 test: commands: - echo ## Instruction: Include python in the build dependencies of the jinja2 recipe ## Code After: package: name: conda-build-test-jinja2-in-recipe version: 1.0 build: number: 0 requirements: build: - jinja2 - python test: commands: - echo
package: name: conda-build-test-jinja2-in-recipe version: 1.0 build: number: 0 requirements: build: - jinja2 + - python test: commands: - echo
1
0.071429
1
0
cdb9f920d345f699a06839ca9821937057c6b423
README.md
README.md
A tool to discover Steam clients on your network and find out what they are playing. ### Features * Discovers steam clients on your LAN using the In Home Streaming discovery protocol * Looks up Steam API to see what they're playing * Optionally stores data in DB (postgres) for later analysis * Optionally pipes data to a redis pub/sub queue * Live graph of what people are playing (requires redis pub/sub queue) ### Roadmap * Make library to abstract this listening - expose just "we saw a client, here's details!" * Add more configuration options, eg, immediately anonymise data (don't record steam ID) ### Installation ``` npm install cp config.example.json config.json # Make sure to insert your own Steam API key and postgres connection info in here! editor config.json # Connect to your postgres DB, create a user and database, and run the dbinit.sql script node app.js ``` ### Live updating graph The `visualiser` directory contains another small app that provides a web page with a live updating graph of which games people are playing.
A tool to discover Steam clients on your network and find out what they are playing. ### Features * Discovers steam clients on your LAN using the In Home Streaming discovery protocol * Looks up Steam API to see what they're playing * Optionally stores data in DB (postgres) for later analysis * Optionally pipes data to a redis pub/sub queue * Live graph of what people are playing (requires redis pub/sub queue) ### How it works Steam Home Broadcast uses a UDP discovery mechanism to find other steam clients. We use this for the first step to find out which Steam IDs are present on the LAN. Then, we query the Steam API to find out what each Steam ID is doing. The API returns the user's display name and the current game. Hey presto, we have our data! There are two caveats here - 1) If a user does not have steam home broadcast enabled, we will not know that they exist 2) If a user has their Steam profile set to private, we will be able to see what their display name is, but not if they're online or which game they're playing ### Roadmap * Make library to abstract this listening - expose just "we saw a client, here's details!" * Add more configuration options, eg, immediately anonymise data (don't record steam ID) ### Installation ``` npm install cp config.example.json config.json # Make sure to insert your own Steam API key and postgres connection info in here! # Get your Steam API key from http://steamcommunity.com/dev/apikey editor config.json # Connect to your postgres DB, create a user and database, and run the dbinit.sql script node app.js ``` In this configuration, data is saved to a postgres database for later analysis. Using the `config.json` file, you can disable postgres if you don't want to save the data. You can also enable Redis to enable the usage of the live updating graph (see next section) ### Live updating graph The `visualiser` directory contains another small app that provides a web page with a live updating graph of which games people are playing.
Update readme to be more useful
Update readme to be more useful
Markdown
mit
OpenSourceLAN/steam-discover,sirsquidness/steam-discover,OpenSourceLAN/steam-discover,OpenSourceLAN/steam-discover
markdown
## Code Before: A tool to discover Steam clients on your network and find out what they are playing. ### Features * Discovers steam clients on your LAN using the In Home Streaming discovery protocol * Looks up Steam API to see what they're playing * Optionally stores data in DB (postgres) for later analysis * Optionally pipes data to a redis pub/sub queue * Live graph of what people are playing (requires redis pub/sub queue) ### Roadmap * Make library to abstract this listening - expose just "we saw a client, here's details!" * Add more configuration options, eg, immediately anonymise data (don't record steam ID) ### Installation ``` npm install cp config.example.json config.json # Make sure to insert your own Steam API key and postgres connection info in here! editor config.json # Connect to your postgres DB, create a user and database, and run the dbinit.sql script node app.js ``` ### Live updating graph The `visualiser` directory contains another small app that provides a web page with a live updating graph of which games people are playing. ## Instruction: Update readme to be more useful ## Code After: A tool to discover Steam clients on your network and find out what they are playing. ### Features * Discovers steam clients on your LAN using the In Home Streaming discovery protocol * Looks up Steam API to see what they're playing * Optionally stores data in DB (postgres) for later analysis * Optionally pipes data to a redis pub/sub queue * Live graph of what people are playing (requires redis pub/sub queue) ### How it works Steam Home Broadcast uses a UDP discovery mechanism to find other steam clients. We use this for the first step to find out which Steam IDs are present on the LAN. Then, we query the Steam API to find out what each Steam ID is doing. The API returns the user's display name and the current game. Hey presto, we have our data! There are two caveats here - 1) If a user does not have steam home broadcast enabled, we will not know that they exist 2) If a user has their Steam profile set to private, we will be able to see what their display name is, but not if they're online or which game they're playing ### Roadmap * Make library to abstract this listening - expose just "we saw a client, here's details!" * Add more configuration options, eg, immediately anonymise data (don't record steam ID) ### Installation ``` npm install cp config.example.json config.json # Make sure to insert your own Steam API key and postgres connection info in here! # Get your Steam API key from http://steamcommunity.com/dev/apikey editor config.json # Connect to your postgres DB, create a user and database, and run the dbinit.sql script node app.js ``` In this configuration, data is saved to a postgres database for later analysis. Using the `config.json` file, you can disable postgres if you don't want to save the data. You can also enable Redis to enable the usage of the live updating graph (see next section) ### Live updating graph The `visualiser` directory contains another small app that provides a web page with a live updating graph of which games people are playing.
A tool to discover Steam clients on your network and find out what they are playing. ### Features * Discovers steam clients on your LAN using the In Home Streaming discovery protocol * Looks up Steam API to see what they're playing * Optionally stores data in DB (postgres) for later analysis * Optionally pipes data to a redis pub/sub queue * Live graph of what people are playing (requires redis pub/sub queue) + + ### How it works + + Steam Home Broadcast uses a UDP discovery mechanism to find other steam clients. + We use this for the first step to find out which Steam IDs are present on + the LAN. + + Then, we query the Steam API to find out what each Steam ID is doing. + The API returns the user's display name and the current game. Hey presto, + we have our data! + + There are two caveats here - + + 1) If a user does not have steam home broadcast enabled, we will not know that they exist + 2) If a user has their Steam profile set to private, we will be able to see what their display name is, but not if they're online or which game they're playing + ### Roadmap * Make library to abstract this listening - expose just "we saw a client, here's details!" * Add more configuration options, eg, immediately anonymise data (don't record steam ID) ### Installation ``` npm install cp config.example.json config.json # Make sure to insert your own Steam API key and postgres connection info in here! + # Get your Steam API key from http://steamcommunity.com/dev/apikey editor config.json # Connect to your postgres DB, create a user and database, and run the dbinit.sql script node app.js ``` + In this configuration, data is saved to a postgres database for later analysis. + + Using the `config.json` file, you can disable postgres if you don't want + to save the data. You can also enable Redis to enable the usage of the + live updating graph (see next section) + ### Live updating graph The `visualiser` directory contains another small app that provides a web page with a live updating graph of which games people are playing.
23
0.657143
23
0
58520ead854ed676b32dafc18b1766a61af6947b
metadata/free.rm.skytube.oss.txt
metadata/free.rm.skytube.oss.txt
AntiFeatures:NonFreeNet Categories:Multimedia,Internet License:GPLv3 Web Site:https://ram-on.github.io/SkyTube Source Code:https://github.com/ram-on/SkyTube Issue Tracker:https://github.com/ram-on/SkyTube/issues Changelog:https://github.com/ram-on/SkyTube/releases Auto Name:SkyTube Summary:A simple and feature-rich YouTube player Description: SkyTube is a YouTube player that allows you to: * explore Trending and Most Popular videos, * browse YouTube channels, * play YouTube videos, * view video comments, * search videos, music and channels * channel subscription ... all at the tip of your fingers. More features will be added in the near future. . Repo Type:git Repo:https://github.com/ram-on/SkyTube Build:1.0 OSS,1 commit=v1.0 subdir=app gradle=oss Build:2.0,2 commit=v2.0 subdir=app gradle=oss Maintainer Notes: * Current versions include app/libs/*.jar. Remove them. * No AUM applies, since version != tag. . Auto Update Mode:Version v%v Update Check Mode:Tags Current Version:2.0 Current Version Code:2
AntiFeatures:NonFreeNet Categories:Multimedia,Internet License:GPLv3 Web Site:https://ram-on.github.io/SkyTube Source Code:https://github.com/ram-on/SkyTube Issue Tracker:https://github.com/ram-on/SkyTube/issues Changelog:https://github.com/ram-on/SkyTube/blob/HEAD/CHANGELOG Auto Name:SkyTube Summary:A simple and feature-rich YouTube player Description: SkyTube is a YouTube player that allows you to: * explore Trending and Most Popular videos, * browse YouTube channels, * play YouTube videos, * view video comments, * search videos, music and channels * channel subscription ... all at the tip of your fingers. More features will be added in the near future. . Repo Type:git Repo:https://github.com/ram-on/SkyTube Build:1.0 OSS,1 commit=v1.0 subdir=app gradle=oss Build:2.0,2 commit=v2.0 subdir=app gradle=oss Build:2.1,3 commit=v2.1 subdir=app gradle=oss rm=app/libs/*.jar Maintainer Notes: * Current versions include app/libs/*.jar. Remove them. . Auto Update Mode:Version v%v Update Check Mode:Tags Current Version:2.1 Current Version Code:3
Update SkyTube to 2.1 (3)
Update SkyTube to 2.1 (3)
Text
agpl-3.0
f-droid/fdroid-data,f-droid/fdroiddata,f-droid/fdroiddata
text
## Code Before: AntiFeatures:NonFreeNet Categories:Multimedia,Internet License:GPLv3 Web Site:https://ram-on.github.io/SkyTube Source Code:https://github.com/ram-on/SkyTube Issue Tracker:https://github.com/ram-on/SkyTube/issues Changelog:https://github.com/ram-on/SkyTube/releases Auto Name:SkyTube Summary:A simple and feature-rich YouTube player Description: SkyTube is a YouTube player that allows you to: * explore Trending and Most Popular videos, * browse YouTube channels, * play YouTube videos, * view video comments, * search videos, music and channels * channel subscription ... all at the tip of your fingers. More features will be added in the near future. . Repo Type:git Repo:https://github.com/ram-on/SkyTube Build:1.0 OSS,1 commit=v1.0 subdir=app gradle=oss Build:2.0,2 commit=v2.0 subdir=app gradle=oss Maintainer Notes: * Current versions include app/libs/*.jar. Remove them. * No AUM applies, since version != tag. . Auto Update Mode:Version v%v Update Check Mode:Tags Current Version:2.0 Current Version Code:2 ## Instruction: Update SkyTube to 2.1 (3) ## Code After: AntiFeatures:NonFreeNet Categories:Multimedia,Internet License:GPLv3 Web Site:https://ram-on.github.io/SkyTube Source Code:https://github.com/ram-on/SkyTube Issue Tracker:https://github.com/ram-on/SkyTube/issues Changelog:https://github.com/ram-on/SkyTube/blob/HEAD/CHANGELOG Auto Name:SkyTube Summary:A simple and feature-rich YouTube player Description: SkyTube is a YouTube player that allows you to: * explore Trending and Most Popular videos, * browse YouTube channels, * play YouTube videos, * view video comments, * search videos, music and channels * channel subscription ... all at the tip of your fingers. More features will be added in the near future. . Repo Type:git Repo:https://github.com/ram-on/SkyTube Build:1.0 OSS,1 commit=v1.0 subdir=app gradle=oss Build:2.0,2 commit=v2.0 subdir=app gradle=oss Build:2.1,3 commit=v2.1 subdir=app gradle=oss rm=app/libs/*.jar Maintainer Notes: * Current versions include app/libs/*.jar. Remove them. . Auto Update Mode:Version v%v Update Check Mode:Tags Current Version:2.1 Current Version Code:3
AntiFeatures:NonFreeNet Categories:Multimedia,Internet License:GPLv3 Web Site:https://ram-on.github.io/SkyTube Source Code:https://github.com/ram-on/SkyTube Issue Tracker:https://github.com/ram-on/SkyTube/issues - Changelog:https://github.com/ram-on/SkyTube/releases ? ^^ ^^^^^ + Changelog:https://github.com/ram-on/SkyTube/blob/HEAD/CHANGELOG ? ^ ^^^^^^^^^^^^^^^^^ Auto Name:SkyTube Summary:A simple and feature-rich YouTube player Description: SkyTube is a YouTube player that allows you to: * explore Trending and Most Popular videos, * browse YouTube channels, * play YouTube videos, * view video comments, * search videos, music and channels * channel subscription ... all at the tip of your fingers. More features will be added in the near future. . Repo Type:git Repo:https://github.com/ram-on/SkyTube Build:1.0 OSS,1 commit=v1.0 subdir=app gradle=oss Build:2.0,2 commit=v2.0 subdir=app gradle=oss + Build:2.1,3 + commit=v2.1 + subdir=app + gradle=oss + rm=app/libs/*.jar + Maintainer Notes: * Current versions include app/libs/*.jar. Remove them. - * No AUM applies, since version != tag. . Auto Update Mode:Version v%v Update Check Mode:Tags - Current Version:2.0 ? ^ + Current Version:2.1 ? ^ - Current Version Code:2 ? ^ + Current Version Code:3 ? ^
13
0.276596
9
4
4ac7162d70ad74eb5c24cdf822fac8504d58ec0c
src/Attr.php
src/Attr.php
<?php namespace Gt\Dom; use DOMNode; /** * Represents an attribute on an Element object. * * In most DOM methods, you will probably directly retrieve the attribute as a * string (e.g., Element::getAttribute()), but certain functions (e.g., * Element::getAttributeNode()) or means of iterating give Attr types. * * @property-read Element $ownerElement * @property-read Element $parentNode * @property-read Node|Element|null $firstChild * @property-read Node|Element|null $lastChild * @property-read Node|Element|null $previousSibling * @property-read Node|Element|null $nextSibling * @property-read Document $ownerDocument * * @method Element appendChild(DOMNode $newnode) * @method Element cloneNode(bool $deep = false) * @method Element insertBefore(DOMNode $newnode, DOMNode $refnode = null) * @method Element removeChild(DOMNode $oldnode) * @method Element replaceChild(DOMNode $newnode, DOMNode $oldnode) */ class Attr extends \DOMAttr { public function remove():self { return $this->ownerElement->removeAttributeNode($this); } }
<?php namespace Gt\Dom; use DOMNode; /** * Represents an attribute on an Element object. * * In most DOM methods, you will probably directly retrieve the attribute as a * string (e.g., Element::getAttribute()), but certain functions (e.g., * Element::getAttributeNode()) or means of iterating give Attr types. * * @property-read Element $ownerElement * @property-read Element $parentNode * @property-read Node|Element|null $firstChild * @property-read Node|Element|null $lastChild * @property-read Node|Element|null $previousSibling * @property-read Node|Element|null $nextSibling * @property-read Document $ownerDocument * * @method Element appendChild(DOMNode $newnode) * @method Element cloneNode(bool $deep = false) * @method Element insertBefore(DOMNode $newnode, DOMNode $refnode = null) * @method Element removeChild(DOMNode $oldnode) * @method Element replaceChild(DOMNode $newnode, DOMNode $oldnode) */ class Attr extends \DOMAttr { public function remove():self { $this->ownerElement->removeAttributeNode($this); return $this; } }
Correct return type for removal of attribute
Correct return type for removal of attribute
PHP
mit
phpgt/dom
php
## Code Before: <?php namespace Gt\Dom; use DOMNode; /** * Represents an attribute on an Element object. * * In most DOM methods, you will probably directly retrieve the attribute as a * string (e.g., Element::getAttribute()), but certain functions (e.g., * Element::getAttributeNode()) or means of iterating give Attr types. * * @property-read Element $ownerElement * @property-read Element $parentNode * @property-read Node|Element|null $firstChild * @property-read Node|Element|null $lastChild * @property-read Node|Element|null $previousSibling * @property-read Node|Element|null $nextSibling * @property-read Document $ownerDocument * * @method Element appendChild(DOMNode $newnode) * @method Element cloneNode(bool $deep = false) * @method Element insertBefore(DOMNode $newnode, DOMNode $refnode = null) * @method Element removeChild(DOMNode $oldnode) * @method Element replaceChild(DOMNode $newnode, DOMNode $oldnode) */ class Attr extends \DOMAttr { public function remove():self { return $this->ownerElement->removeAttributeNode($this); } } ## Instruction: Correct return type for removal of attribute ## Code After: <?php namespace Gt\Dom; use DOMNode; /** * Represents an attribute on an Element object. * * In most DOM methods, you will probably directly retrieve the attribute as a * string (e.g., Element::getAttribute()), but certain functions (e.g., * Element::getAttributeNode()) or means of iterating give Attr types. * * @property-read Element $ownerElement * @property-read Element $parentNode * @property-read Node|Element|null $firstChild * @property-read Node|Element|null $lastChild * @property-read Node|Element|null $previousSibling * @property-read Node|Element|null $nextSibling * @property-read Document $ownerDocument * * @method Element appendChild(DOMNode $newnode) * @method Element cloneNode(bool $deep = false) * @method Element insertBefore(DOMNode $newnode, DOMNode $refnode = null) * @method Element removeChild(DOMNode $oldnode) * @method Element replaceChild(DOMNode $newnode, DOMNode $oldnode) */ class Attr extends \DOMAttr { public function remove():self { $this->ownerElement->removeAttributeNode($this); return $this; } }
<?php namespace Gt\Dom; use DOMNode; /** * Represents an attribute on an Element object. * * In most DOM methods, you will probably directly retrieve the attribute as a * string (e.g., Element::getAttribute()), but certain functions (e.g., * Element::getAttributeNode()) or means of iterating give Attr types. * * @property-read Element $ownerElement * @property-read Element $parentNode * @property-read Node|Element|null $firstChild * @property-read Node|Element|null $lastChild * @property-read Node|Element|null $previousSibling * @property-read Node|Element|null $nextSibling * @property-read Document $ownerDocument * * @method Element appendChild(DOMNode $newnode) * @method Element cloneNode(bool $deep = false) * @method Element insertBefore(DOMNode $newnode, DOMNode $refnode = null) * @method Element removeChild(DOMNode $oldnode) * @method Element replaceChild(DOMNode $newnode, DOMNode $oldnode) */ class Attr extends \DOMAttr { public function remove():self { - return $this->ownerElement->removeAttributeNode($this); ? ------- + $this->ownerElement->removeAttributeNode($this); + return $this; } }
3
0.096774
2
1
dd41ddd2917f64967f1a119c6e4d0a5674f6e2ed
src/ui/qclosabletabwidget.cpp
src/ui/qclosabletabwidget.cpp
QClosableTabWidget::QClosableTabWidget(QWidget *parent) : QTabWidget(parent) { tabBar()->installEventFilter(this); } bool QClosableTabWidget::eventFilter(QObject *o, QEvent *e) { if (o == tabBar() && e->type() == QEvent::MouseButtonPress) { QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(e); if (mouseEvent->button() == Qt::MiddleButton) { int index = tabBar()->tabAt(mouseEvent->pos()); widget(index)->deleteLater(); removeTab(index); return true; } } return QTabWidget::eventFilter(o, e); }
QClosableTabWidget::QClosableTabWidget(QWidget *parent) : QTabWidget(parent) { tabBar()->installEventFilter(this); } bool QClosableTabWidget::eventFilter(QObject *o, QEvent *e) { if (o == tabBar() && e->type() == QEvent::MouseButtonPress) { QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(e); if (mouseEvent->button() == Qt::MiddleButton) { int index = tabBar()->tabAt(mouseEvent->pos()); QWidget *w = widget(index); // Unclosable tabs have a maximum width of 16777214 (default: 16777215) if (w->maximumWidth() != 16777214) { w->deleteLater(); removeTab(index); return true; } } } return QTabWidget::eventFilter(o, e); }
Disable middle click close for unclosable tabs
Disable middle click close for unclosable tabs
C++
apache-2.0
YoukaiCat/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber,YoukaiCat/imgbrd-grabber,Bionus/imgbrd-grabber,Bionus/imgbrd-grabber
c++
## Code Before: QClosableTabWidget::QClosableTabWidget(QWidget *parent) : QTabWidget(parent) { tabBar()->installEventFilter(this); } bool QClosableTabWidget::eventFilter(QObject *o, QEvent *e) { if (o == tabBar() && e->type() == QEvent::MouseButtonPress) { QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(e); if (mouseEvent->button() == Qt::MiddleButton) { int index = tabBar()->tabAt(mouseEvent->pos()); widget(index)->deleteLater(); removeTab(index); return true; } } return QTabWidget::eventFilter(o, e); } ## Instruction: Disable middle click close for unclosable tabs ## Code After: QClosableTabWidget::QClosableTabWidget(QWidget *parent) : QTabWidget(parent) { tabBar()->installEventFilter(this); } bool QClosableTabWidget::eventFilter(QObject *o, QEvent *e) { if (o == tabBar() && e->type() == QEvent::MouseButtonPress) { QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(e); if (mouseEvent->button() == Qt::MiddleButton) { int index = tabBar()->tabAt(mouseEvent->pos()); QWidget *w = widget(index); // Unclosable tabs have a maximum width of 16777214 (default: 16777215) if (w->maximumWidth() != 16777214) { w->deleteLater(); removeTab(index); return true; } } } return QTabWidget::eventFilter(o, e); }
QClosableTabWidget::QClosableTabWidget(QWidget *parent) : QTabWidget(parent) { tabBar()->installEventFilter(this); } bool QClosableTabWidget::eventFilter(QObject *o, QEvent *e) { if (o == tabBar() && e->type() == QEvent::MouseButtonPress) { QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(e); if (mouseEvent->button() == Qt::MiddleButton) { int index = tabBar()->tabAt(mouseEvent->pos()); + QWidget *w = widget(index); + + // Unclosable tabs have a maximum width of 16777214 (default: 16777215) + if (w->maximumWidth() != 16777214) + { - widget(index)->deleteLater(); ? ------------ + w->deleteLater(); ? + - removeTab(index); + removeTab(index); ? + - return true; + return true; ? + + } } } return QTabWidget::eventFilter(o, e); }
12
0.5
9
3
d7070f4e55ba327ccce81de398d8a4ae66e38d06
blueprints/ember-cli-react/index.js
blueprints/ember-cli-react/index.js
/*jshint node:true*/ var pkg = require('../../package.json'); function getPeerDependencyVersion(packageJson, name) { var peerDependencies = packageJson.peerDependencies; return peerDependencies[name]; } module.exports = { description: 'Install ember-cli-react dependencies into your app.', normalizeEntityName: function() {}, // Install react into host app afterInstall: function() { const packages = [ { name: 'react', target: getPeerDependencyVersion(pkg, 'react'), }, { name: 'react-dom', target: getPeerDependencyVersion(pkg, 'react-dom'), }, ]; return this.addPackagesToProject(packages); }, };
/*jshint node:true*/ var pkg = require('../../package.json'); function getDependencyVersion(packageJson, name) { var dependencies = packageJson.dependencies; var devDependencies = packageJson.devDependencies; return dependencies[name] || devDependencies[name]; } function getPeerDependencyVersion(packageJson, name) { var peerDependencies = packageJson.peerDependencies; return peerDependencies[name]; } module.exports = { description: 'Install ember-cli-react dependencies into your app.', normalizeEntityName: function() {}, // Install react into host app afterInstall: function() { const packages = [ { name: 'ember-auto-import', target: getDependencyVersion(pkg, 'ember-auto-import'), }, { name: 'react', target: getPeerDependencyVersion(pkg, 'react'), }, { name: 'react-dom', target: getPeerDependencyVersion(pkg, 'react-dom'), }, ]; return this.addPackagesToProject(packages); }, };
Install `ember-auto-import` to Ember App during `ember install`
Install `ember-auto-import` to Ember App during `ember install`
JavaScript
mit
pswai/ember-cli-react,pswai/ember-cli-react
javascript
## Code Before: /*jshint node:true*/ var pkg = require('../../package.json'); function getPeerDependencyVersion(packageJson, name) { var peerDependencies = packageJson.peerDependencies; return peerDependencies[name]; } module.exports = { description: 'Install ember-cli-react dependencies into your app.', normalizeEntityName: function() {}, // Install react into host app afterInstall: function() { const packages = [ { name: 'react', target: getPeerDependencyVersion(pkg, 'react'), }, { name: 'react-dom', target: getPeerDependencyVersion(pkg, 'react-dom'), }, ]; return this.addPackagesToProject(packages); }, }; ## Instruction: Install `ember-auto-import` to Ember App during `ember install` ## Code After: /*jshint node:true*/ var pkg = require('../../package.json'); function getDependencyVersion(packageJson, name) { var dependencies = packageJson.dependencies; var devDependencies = packageJson.devDependencies; return dependencies[name] || devDependencies[name]; } function getPeerDependencyVersion(packageJson, name) { var peerDependencies = packageJson.peerDependencies; return peerDependencies[name]; } module.exports = { description: 'Install ember-cli-react dependencies into your app.', normalizeEntityName: function() {}, // Install react into host app afterInstall: function() { const packages = [ { name: 'ember-auto-import', target: getDependencyVersion(pkg, 'ember-auto-import'), }, { name: 'react', target: getPeerDependencyVersion(pkg, 'react'), }, { name: 'react-dom', target: getPeerDependencyVersion(pkg, 'react-dom'), }, ]; return this.addPackagesToProject(packages); }, };
/*jshint node:true*/ var pkg = require('../../package.json'); + + function getDependencyVersion(packageJson, name) { + var dependencies = packageJson.dependencies; + var devDependencies = packageJson.devDependencies; + + return dependencies[name] || devDependencies[name]; + } function getPeerDependencyVersion(packageJson, name) { var peerDependencies = packageJson.peerDependencies; return peerDependencies[name]; } module.exports = { description: 'Install ember-cli-react dependencies into your app.', normalizeEntityName: function() {}, // Install react into host app afterInstall: function() { const packages = [ { + name: 'ember-auto-import', + target: getDependencyVersion(pkg, 'ember-auto-import'), + }, + { name: 'react', target: getPeerDependencyVersion(pkg, 'react'), }, { name: 'react-dom', target: getPeerDependencyVersion(pkg, 'react-dom'), }, ]; return this.addPackagesToProject(packages); }, };
11
0.366667
11
0
94d70fb803d15423f7cb79b91c6d4d8d10d14925
molly/apps/feature_vote/templates/comments/posted.html
molly/apps/feature_vote/templates/comments/posted.html
{% extends "comments/base.html" %}{% load comments %} {% block title %}Comment submitted{% endblock %} {% block header %} <div id="bc-header"> <ol id="bc"> <li><a href="{% url home:index %}"> <img src="{{ MEDIA_URL }}png/logo.png" width="57" height="30" alt="Home"/> </a></li> <li><a href="{% url feature_vote:index %}" title="Feature suggestions"> <img src="{{ MEDIA_URL }}png/index-icons/feature_vote-bc.png" alt="Feature suggestions"/> </a></li> <li><a href="{% url feature_vote:feature-detail comment.content_object.id %}" title="{{ comment.content_object.title }}"> &hellip; </a></li> </ol> <div id="bc-title"> <h1>Add a comment</h1> </div> </div> {% endblock %} {% block content %} <div class="section"> <div class="header"> <h2>Comment submitted</h2> </div> <div class="section-content"> <p>Your comment has been submitted.</p> <p>You may wish to <a href="{% url feature_vote:feature-detail comment.content_object.id %}">go back whence you came</a>.</p> </div> </div> {% endblock %}
{% extends "comments/base.html" %}{% load comments %} {% block title %}Comment submitted{% endblock %} {% block header %} <div id="bc-header"> <ol id="bc"> <li><a href="{% url home:index %}"> <img src="{{ MEDIA_URL }}site/png/logo.png" width="57" height="30" alt="Home"/> </a></li> <li><a href="{% url feature_vote:index %}" title="Feature suggestions"> <img src="{{ MEDIA_URL }}site/png/index-icons/feature_vote-bc.png" alt="Feature suggestions"/> </a></li> <li><a href="{% url feature_vote:feature-detail comment.content_object.id %}" title="{{ comment.content_object.title }}"> &hellip; </a></li> </ol> <div id="bc-title"> <h1>Add a comment</h1> </div> </div> {% endblock %} {% block content %} <div class="section"> <div class="header"> <h2>Comment submitted</h2> </div> <div class="section-content"> <p>Your comment has been submitted.</p> <p>You may wish to <a href="{% url feature_vote:feature-detail comment.content_object.id %}">go back whence you came</a>.</p> </div> </div> {% endblock %}
Fix broken images in the breadcrumbs on the comment post result page
Fix broken images in the breadcrumbs on the comment post result page
HTML
apache-2.0
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
html
## Code Before: {% extends "comments/base.html" %}{% load comments %} {% block title %}Comment submitted{% endblock %} {% block header %} <div id="bc-header"> <ol id="bc"> <li><a href="{% url home:index %}"> <img src="{{ MEDIA_URL }}png/logo.png" width="57" height="30" alt="Home"/> </a></li> <li><a href="{% url feature_vote:index %}" title="Feature suggestions"> <img src="{{ MEDIA_URL }}png/index-icons/feature_vote-bc.png" alt="Feature suggestions"/> </a></li> <li><a href="{% url feature_vote:feature-detail comment.content_object.id %}" title="{{ comment.content_object.title }}"> &hellip; </a></li> </ol> <div id="bc-title"> <h1>Add a comment</h1> </div> </div> {% endblock %} {% block content %} <div class="section"> <div class="header"> <h2>Comment submitted</h2> </div> <div class="section-content"> <p>Your comment has been submitted.</p> <p>You may wish to <a href="{% url feature_vote:feature-detail comment.content_object.id %}">go back whence you came</a>.</p> </div> </div> {% endblock %} ## Instruction: Fix broken images in the breadcrumbs on the comment post result page ## Code After: {% extends "comments/base.html" %}{% load comments %} {% block title %}Comment submitted{% endblock %} {% block header %} <div id="bc-header"> <ol id="bc"> <li><a href="{% url home:index %}"> <img src="{{ MEDIA_URL }}site/png/logo.png" width="57" height="30" alt="Home"/> </a></li> <li><a href="{% url feature_vote:index %}" title="Feature suggestions"> <img src="{{ MEDIA_URL }}site/png/index-icons/feature_vote-bc.png" alt="Feature suggestions"/> </a></li> <li><a href="{% url feature_vote:feature-detail comment.content_object.id %}" title="{{ comment.content_object.title }}"> &hellip; </a></li> </ol> <div id="bc-title"> <h1>Add a comment</h1> </div> </div> {% endblock %} {% block content %} <div class="section"> <div class="header"> <h2>Comment submitted</h2> </div> <div class="section-content"> <p>Your comment has been submitted.</p> <p>You may wish to <a href="{% url feature_vote:feature-detail comment.content_object.id %}">go back whence you came</a>.</p> </div> </div> {% endblock %}
{% extends "comments/base.html" %}{% load comments %} {% block title %}Comment submitted{% endblock %} {% block header %} <div id="bc-header"> <ol id="bc"> <li><a href="{% url home:index %}"> - <img src="{{ MEDIA_URL }}png/logo.png" width="57" height="30" alt="Home"/> + <img src="{{ MEDIA_URL }}site/png/logo.png" width="57" height="30" alt="Home"/> ? +++++ </a></li> <li><a href="{% url feature_vote:index %}" title="Feature suggestions"> - <img src="{{ MEDIA_URL }}png/index-icons/feature_vote-bc.png" alt="Feature suggestions"/> + <img src="{{ MEDIA_URL }}site/png/index-icons/feature_vote-bc.png" alt="Feature suggestions"/> ? +++++ </a></li> <li><a href="{% url feature_vote:feature-detail comment.content_object.id %}" title="{{ comment.content_object.title }}"> &hellip; </a></li> </ol> <div id="bc-title"> <h1>Add a comment</h1> </div> </div> {% endblock %} {% block content %} <div class="section"> <div class="header"> <h2>Comment submitted</h2> </div> <div class="section-content"> <p>Your comment has been submitted.</p> <p>You may wish to <a href="{% url feature_vote:feature-detail comment.content_object.id %}">go back whence you came</a>.</p> </div> </div> {% endblock %}
4
0.105263
2
2
8479b188323d771303bbed6cfc074665db917ebf
README.org
README.org
* Library Information - Name :: Hybridizer - Version :: 0.1.0 - License :: BSD - URL :: https://github.com/janelia-experimental-technology/hybridizer - Author :: Peter Polidoro - Email :: peterpolidoro@gmail.com ** Description
* Library Information - Name :: Hybridizer - Version :: 0.1.0 - License :: BSD - URL :: https://github.com/janelia-experimental-technology/hybridizer - Author :: Peter Polidoro - Email :: peterpolidoro@gmail.com ** Description * Host Computer Control Software [[https://github.com/janelia-pypi/hybridizer_python.git]]
Add link to Python code
Add link to Python code
Org
bsd-3-clause
peterpolidoro/hybridizer
org
## Code Before: * Library Information - Name :: Hybridizer - Version :: 0.1.0 - License :: BSD - URL :: https://github.com/janelia-experimental-technology/hybridizer - Author :: Peter Polidoro - Email :: peterpolidoro@gmail.com ** Description ## Instruction: Add link to Python code ## Code After: * Library Information - Name :: Hybridizer - Version :: 0.1.0 - License :: BSD - URL :: https://github.com/janelia-experimental-technology/hybridizer - Author :: Peter Polidoro - Email :: peterpolidoro@gmail.com ** Description * Host Computer Control Software [[https://github.com/janelia-pypi/hybridizer_python.git]]
* Library Information - Name :: Hybridizer - Version :: 0.1.0 - License :: BSD - URL :: https://github.com/janelia-experimental-technology/hybridizer - Author :: Peter Polidoro - Email :: peterpolidoro@gmail.com ** Description + + * Host Computer Control Software + + [[https://github.com/janelia-pypi/hybridizer_python.git]]
4
0.4
4
0
56c1028ba68923f8947bfc76110a09a3e5b155ae
app/styles/industry-overview.scss
app/styles/industry-overview.scss
@import 'colors'; .societal-benefit, .industry-overview { text-align: center; margin-bottom: 2rem; } .industry-panel { background-color: $pale; border-radius: 5px; min-height: 100px; & .amount { font-size: 2em; font-weight: 400; margin: 0.5rem 0; } }
@import 'colors'; .societal-benefit, .industry-overview { text-align: center; margin-bottom: 2rem; } .industry-panel { background-color: $pale; @media screen and (min-width: 768px) { border-radius: 5px; min-height: 100px; } }
Add better responsiveness to industry overview
Add better responsiveness to industry overview
SCSS
mit
councilforeconed/competition-and-monopoly
scss
## Code Before: @import 'colors'; .societal-benefit, .industry-overview { text-align: center; margin-bottom: 2rem; } .industry-panel { background-color: $pale; border-radius: 5px; min-height: 100px; & .amount { font-size: 2em; font-weight: 400; margin: 0.5rem 0; } } ## Instruction: Add better responsiveness to industry overview ## Code After: @import 'colors'; .societal-benefit, .industry-overview { text-align: center; margin-bottom: 2rem; } .industry-panel { background-color: $pale; @media screen and (min-width: 768px) { border-radius: 5px; min-height: 100px; } }
@import 'colors'; .societal-benefit, .industry-overview { text-align: center; margin-bottom: 2rem; } .industry-panel { background-color: $pale; + @media screen and (min-width: 768px) { - border-radius: 5px; + border-radius: 5px; ? ++ - min-height: 100px; + min-height: 100px; ? ++ - & .amount { - font-size: 2em; - font-weight: 400; - margin: 0.5rem 0; } }
9
0.529412
3
6
b33654567ad3588ba51874ef109a9ee8efc0b0f0
tests/functional/firefox/test_hello.py
tests/functional/firefox/test_hello.py
import pytest from pages.firefox.hello import HelloPage @pytest.mark.smoke @pytest.mark.nondestructive def test_play_video(base_url, selenium): page = HelloPage(base_url, selenium).open() video = page.play_video() assert video.is_displayed video.close() @pytest.mark.skip_if_not_firefox @pytest.mark.smoke @pytest.mark.nondestructive def test_try_hello_button_is_displayed(base_url, selenium): page = HelloPage(base_url, selenium).open() assert page.is_try_hello_button_displayed assert not page.is_download_button_displayed @pytest.mark.skip_if_firefox @pytest.mark.smoke @pytest.mark.nondestructive def test_download_button_is_displayed(base_url, selenium): page = HelloPage(base_url, selenium).open() assert page.is_download_button_displayed assert not page.is_try_hello_button_displayed
import pytest from pages.firefox.hello import HelloPage @pytest.mark.smoke @pytest.mark.nondestructive def test_play_video(base_url, selenium): page = HelloPage(base_url, selenium).open() video = page.play_video() assert video.is_displayed video.close() @pytest.mark.skip_if_not_firefox @pytest.mark.smoke @pytest.mark.nondestructive def test_try_hello_button_is_displayed(base_url, selenium): page = HelloPage(base_url, selenium).open() assert page.is_try_hello_button_displayed @pytest.mark.skip_if_firefox @pytest.mark.smoke @pytest.mark.nondestructive def test_download_button_is_displayed(base_url, selenium): page = HelloPage(base_url, selenium).open() assert page.is_download_button_displayed assert not page.is_try_hello_button_displayed
Fix failing Firefox Hello test
Fix failing Firefox Hello test
Python
mpl-2.0
sgarrity/bedrock,TheJJ100100/bedrock,alexgibson/bedrock,schalkneethling/bedrock,TheJJ100100/bedrock,gerv/bedrock,mozilla/bedrock,flodolo/bedrock,kyoshino/bedrock,TheoChevalier/bedrock,mozilla/bedrock,sgarrity/bedrock,craigcook/bedrock,pascalchevrel/bedrock,alexgibson/bedrock,sylvestre/bedrock,Sancus/bedrock,ericawright/bedrock,TheJJ100100/bedrock,analytics-pros/mozilla-bedrock,flodolo/bedrock,glogiotatidis/bedrock,MichaelKohler/bedrock,mkmelin/bedrock,mozilla/bedrock,CSCI-462-01-2017/bedrock,jpetto/bedrock,alexgibson/bedrock,alexgibson/bedrock,flodolo/bedrock,sylvestre/bedrock,glogiotatidis/bedrock,schalkneethling/bedrock,hoosteeno/bedrock,jgmize/bedrock,Sancus/bedrock,jpetto/bedrock,schalkneethling/bedrock,hoosteeno/bedrock,mkmelin/bedrock,TheoChevalier/bedrock,gerv/bedrock,hoosteeno/bedrock,TheJJ100100/bedrock,analytics-pros/mozilla-bedrock,hoosteeno/bedrock,flodolo/bedrock,sgarrity/bedrock,mkmelin/bedrock,TheoChevalier/bedrock,pascalchevrel/bedrock,craigcook/bedrock,ericawright/bedrock,Sancus/bedrock,MichaelKohler/bedrock,jpetto/bedrock,schalkneethling/bedrock,mkmelin/bedrock,jpetto/bedrock,CSCI-462-01-2017/bedrock,sgarrity/bedrock,glogiotatidis/bedrock,mozilla/bedrock,Sancus/bedrock,jgmize/bedrock,pascalchevrel/bedrock,TheoChevalier/bedrock,craigcook/bedrock,MichaelKohler/bedrock,CSCI-462-01-2017/bedrock,craigcook/bedrock,kyoshino/bedrock,jgmize/bedrock,jgmize/bedrock,gerv/bedrock,sylvestre/bedrock,gerv/bedrock,CSCI-462-01-2017/bedrock,pascalchevrel/bedrock,ericawright/bedrock,kyoshino/bedrock,analytics-pros/mozilla-bedrock,ericawright/bedrock,analytics-pros/mozilla-bedrock,MichaelKohler/bedrock,kyoshino/bedrock,sylvestre/bedrock,glogiotatidis/bedrock
python
## Code Before: import pytest from pages.firefox.hello import HelloPage @pytest.mark.smoke @pytest.mark.nondestructive def test_play_video(base_url, selenium): page = HelloPage(base_url, selenium).open() video = page.play_video() assert video.is_displayed video.close() @pytest.mark.skip_if_not_firefox @pytest.mark.smoke @pytest.mark.nondestructive def test_try_hello_button_is_displayed(base_url, selenium): page = HelloPage(base_url, selenium).open() assert page.is_try_hello_button_displayed assert not page.is_download_button_displayed @pytest.mark.skip_if_firefox @pytest.mark.smoke @pytest.mark.nondestructive def test_download_button_is_displayed(base_url, selenium): page = HelloPage(base_url, selenium).open() assert page.is_download_button_displayed assert not page.is_try_hello_button_displayed ## Instruction: Fix failing Firefox Hello test ## Code After: import pytest from pages.firefox.hello import HelloPage @pytest.mark.smoke @pytest.mark.nondestructive def test_play_video(base_url, selenium): page = HelloPage(base_url, selenium).open() video = page.play_video() assert video.is_displayed video.close() @pytest.mark.skip_if_not_firefox @pytest.mark.smoke @pytest.mark.nondestructive def test_try_hello_button_is_displayed(base_url, selenium): page = HelloPage(base_url, selenium).open() assert page.is_try_hello_button_displayed @pytest.mark.skip_if_firefox @pytest.mark.smoke @pytest.mark.nondestructive def test_download_button_is_displayed(base_url, selenium): page = HelloPage(base_url, selenium).open() assert page.is_download_button_displayed assert not page.is_try_hello_button_displayed
import pytest from pages.firefox.hello import HelloPage @pytest.mark.smoke @pytest.mark.nondestructive def test_play_video(base_url, selenium): page = HelloPage(base_url, selenium).open() video = page.play_video() assert video.is_displayed video.close() @pytest.mark.skip_if_not_firefox @pytest.mark.smoke @pytest.mark.nondestructive def test_try_hello_button_is_displayed(base_url, selenium): page = HelloPage(base_url, selenium).open() assert page.is_try_hello_button_displayed - assert not page.is_download_button_displayed @pytest.mark.skip_if_firefox @pytest.mark.smoke @pytest.mark.nondestructive def test_download_button_is_displayed(base_url, selenium): page = HelloPage(base_url, selenium).open() assert page.is_download_button_displayed assert not page.is_try_hello_button_displayed
1
0.032258
0
1
612a2cbb648a691e597975414e62066595e61118
README.md
README.md
[Yeoman](http://yeoman.io) generator for [Capital Framework](http://cfpb.github.io/capital-framework/). ![generator-cf screenshot](https://raw.githubusercontent.com/cfpb/generator-cf/master/screenshot.gif) ## Installation Install Yeoman and the Capital Framework generator: ```bash npm install -g yo generator-cf ``` ## Usage Create a new project directory and `cd` to it: ```bash mkdir my-new-project && cd $_ ``` Run the Capital Framework generator: ```bash yo cf ``` Compile the assets: ```bash grunt ``` View the demo page: ```bash open ./dist/index.html ``` Build your project! ## Contributing To hack on this generator, fork this repo, clone it and use `npm link`: ```bash $ cd generator-cf $ npm link $ cd some-empty-directory-somewhere $ yo cf ``` Edit the source files and re-run `yo cf` to see the changes. ---- ## Open source licensing info 1. [TERMS](TERMS.md) 2. [LICENSE](LICENSE) 3. [CFPB Source Code Policy](https://github.com/cfpb/source-code-policy/)
[Yeoman](http://yeoman.io) generator for [Capital Framework](http://cfpb.github.io/capital-framework/). ![generator-cf screenshot](https://raw.githubusercontent.com/cfpb/generator-cf/master/screenshot.gif) ## Installation Install Yeoman and the Capital Framework generator: ```bash npm install -g yo generator-cf ``` ## Usage Create a new project directory and `cd` to it: ```bash mkdir my-new-project && cd $_ ``` Run the Capital Framework generator: ```bash yo cf ``` Compile the assets: ```bash grunt ``` View the demo page: ```bash open ./dist/index.html ``` Build your project! ## Contributing To hack on this generator, fork this repo, clone it and use `npm link`: ```bash $ cd generator-cf $ npm link $ cd some-empty-directory-somewhere $ yo cf ``` Edit the source files and re-run `yo cf` to see the changes. Please modify the current tests or write new tests if you add functionality to the generator. Tests can be executed by running `npm test` from the project's root. ---- ## Open source licensing info 1. [TERMS](TERMS.md) 2. [LICENSE](LICENSE) 3. [CFPB Source Code Policy](https://github.com/cfpb/source-code-policy/)
Add instructions on how to run tests
Add instructions on how to run tests
Markdown
cc0-1.0
mistergone/generator-cf,mistergone/generator-cf,Scotchester/generator-cf,mistergone/generator-cf,cfarm/generator-cf,cfarm/generator-cf,cfarm/generator-cf,contolini/generator-cf,contolini/generator-cf,Scotchester/generator-cf,contolini/generator-cf,Scotchester/generator-cf
markdown
## Code Before: [Yeoman](http://yeoman.io) generator for [Capital Framework](http://cfpb.github.io/capital-framework/). ![generator-cf screenshot](https://raw.githubusercontent.com/cfpb/generator-cf/master/screenshot.gif) ## Installation Install Yeoman and the Capital Framework generator: ```bash npm install -g yo generator-cf ``` ## Usage Create a new project directory and `cd` to it: ```bash mkdir my-new-project && cd $_ ``` Run the Capital Framework generator: ```bash yo cf ``` Compile the assets: ```bash grunt ``` View the demo page: ```bash open ./dist/index.html ``` Build your project! ## Contributing To hack on this generator, fork this repo, clone it and use `npm link`: ```bash $ cd generator-cf $ npm link $ cd some-empty-directory-somewhere $ yo cf ``` Edit the source files and re-run `yo cf` to see the changes. ---- ## Open source licensing info 1. [TERMS](TERMS.md) 2. [LICENSE](LICENSE) 3. [CFPB Source Code Policy](https://github.com/cfpb/source-code-policy/) ## Instruction: Add instructions on how to run tests ## Code After: [Yeoman](http://yeoman.io) generator for [Capital Framework](http://cfpb.github.io/capital-framework/). ![generator-cf screenshot](https://raw.githubusercontent.com/cfpb/generator-cf/master/screenshot.gif) ## Installation Install Yeoman and the Capital Framework generator: ```bash npm install -g yo generator-cf ``` ## Usage Create a new project directory and `cd` to it: ```bash mkdir my-new-project && cd $_ ``` Run the Capital Framework generator: ```bash yo cf ``` Compile the assets: ```bash grunt ``` View the demo page: ```bash open ./dist/index.html ``` Build your project! ## Contributing To hack on this generator, fork this repo, clone it and use `npm link`: ```bash $ cd generator-cf $ npm link $ cd some-empty-directory-somewhere $ yo cf ``` Edit the source files and re-run `yo cf` to see the changes. Please modify the current tests or write new tests if you add functionality to the generator. Tests can be executed by running `npm test` from the project's root. ---- ## Open source licensing info 1. [TERMS](TERMS.md) 2. [LICENSE](LICENSE) 3. [CFPB Source Code Policy](https://github.com/cfpb/source-code-policy/)
[Yeoman](http://yeoman.io) generator for [Capital Framework](http://cfpb.github.io/capital-framework/). ![generator-cf screenshot](https://raw.githubusercontent.com/cfpb/generator-cf/master/screenshot.gif) ## Installation Install Yeoman and the Capital Framework generator: ```bash npm install -g yo generator-cf ``` ## Usage Create a new project directory and `cd` to it: ```bash mkdir my-new-project && cd $_ ``` Run the Capital Framework generator: ```bash yo cf ``` Compile the assets: ```bash grunt ``` View the demo page: ```bash open ./dist/index.html ``` Build your project! ## Contributing To hack on this generator, fork this repo, clone it and use `npm link`: ```bash $ cd generator-cf $ npm link $ cd some-empty-directory-somewhere $ yo cf ``` Edit the source files and re-run `yo cf` to see the changes. + Please modify the current tests or write new tests if you add functionality to the generator. + Tests can be executed by running `npm test` from the project's root. ---- ## Open source licensing info 1. [TERMS](TERMS.md) 2. [LICENSE](LICENSE) 3. [CFPB Source Code Policy](https://github.com/cfpb/source-code-policy/)
2
0.035088
2
0
9a978e953fb5acc60eb4b98301274fee36489f8e
Test/UserAgentGenerationOperation.swift
Test/UserAgentGenerationOperation.swift
// // UserAgentGenerationOperation.swift // edX // // Created by Akiva Leffert on 12/10/15. // Copyright © 2015 edX. All rights reserved. // import XCTest @testable import edX class UserAgentGenerationOperationTests : XCTestCase { func testLoadBasic() { let queue = OperationQueue() let operation = UserAgentGenerationOperation() queue.addOperation(operation) waitForStream(operation.t_resultStream) { let agent = $0.value! // Random part of the standard user agent string, to make sure we got something XCTAssertTrue(agent.contains("KHTML, like Gecko")) } } func testOverride() { let userDefaults = OEXMockUserDefaults() let userDefaultsMock = userDefaults.installAsStandardUserDefaults() let expectation = self.expectation(description: "User agent overriden") UserAgentOverrideOperation.overrideUserAgent { expectation.fulfill() } waitForExpectations() let queue = OperationQueue() let operation = UserAgentGenerationOperation() queue.addOperation(operation) waitForStream(operation.t_resultStream) { let agent = $0.value! // Random part of the standard user agent string, to make sure we got something XCTAssertTrue(agent.contains(UserAgentGenerationOperation.appVersionDescriptor)) } userDefaultsMock.remove() } }
// // UserAgentGenerationOperation.swift // edX // // Created by Akiva Leffert on 12/10/15. // Copyright © 2015 edX. All rights reserved. // import XCTest @testable import edX class UserAgentGenerationOperationTests : XCTestCase { func testLoadBasic() { let queue = OperationQueue() let operation = UserAgentGenerationOperation() queue.addOperation(operation) waitForStream(operation.t_resultStream) { let agent = $0.value! // Random part of the standard user agent string, to make sure we got something XCTAssertTrue(agent.contains("KHTML, like Gecko")) } } func testOverride() { let userDefaults = OEXMockUserDefaults() let userDefaultsMock = userDefaults.installAsStandardUserDefaults() let expectation = self.expectation(description: "User agent overriden Test Commit") UserAgentOverrideOperation.overrideUserAgent { expectation.fulfill() } waitForExpectations() let queue = OperationQueue() let operation = UserAgentGenerationOperation() queue.addOperation(operation) waitForStream(operation.t_resultStream) { let agent = $0.value! // Random part of the standard user agent string, to make sure we got something XCTAssertTrue(agent.contains(UserAgentGenerationOperation.appVersionDescriptor)) } userDefaultsMock.remove() } }
Test Commit to Verify Xcode 10.3 changes on master
Test Commit to Verify Xcode 10.3 changes on master
Swift
apache-2.0
edx/edx-app-ios,edx/edx-app-ios,edx/edx-app-ios,edx/edx-app-ios,edx/edx-app-ios,edx/edx-app-ios,edx/edx-app-ios
swift
## Code Before: // // UserAgentGenerationOperation.swift // edX // // Created by Akiva Leffert on 12/10/15. // Copyright © 2015 edX. All rights reserved. // import XCTest @testable import edX class UserAgentGenerationOperationTests : XCTestCase { func testLoadBasic() { let queue = OperationQueue() let operation = UserAgentGenerationOperation() queue.addOperation(operation) waitForStream(operation.t_resultStream) { let agent = $0.value! // Random part of the standard user agent string, to make sure we got something XCTAssertTrue(agent.contains("KHTML, like Gecko")) } } func testOverride() { let userDefaults = OEXMockUserDefaults() let userDefaultsMock = userDefaults.installAsStandardUserDefaults() let expectation = self.expectation(description: "User agent overriden") UserAgentOverrideOperation.overrideUserAgent { expectation.fulfill() } waitForExpectations() let queue = OperationQueue() let operation = UserAgentGenerationOperation() queue.addOperation(operation) waitForStream(operation.t_resultStream) { let agent = $0.value! // Random part of the standard user agent string, to make sure we got something XCTAssertTrue(agent.contains(UserAgentGenerationOperation.appVersionDescriptor)) } userDefaultsMock.remove() } } ## Instruction: Test Commit to Verify Xcode 10.3 changes on master ## Code After: // // UserAgentGenerationOperation.swift // edX // // Created by Akiva Leffert on 12/10/15. // Copyright © 2015 edX. All rights reserved. // import XCTest @testable import edX class UserAgentGenerationOperationTests : XCTestCase { func testLoadBasic() { let queue = OperationQueue() let operation = UserAgentGenerationOperation() queue.addOperation(operation) waitForStream(operation.t_resultStream) { let agent = $0.value! // Random part of the standard user agent string, to make sure we got something XCTAssertTrue(agent.contains("KHTML, like Gecko")) } } func testOverride() { let userDefaults = OEXMockUserDefaults() let userDefaultsMock = userDefaults.installAsStandardUserDefaults() let expectation = self.expectation(description: "User agent overriden Test Commit") UserAgentOverrideOperation.overrideUserAgent { expectation.fulfill() } waitForExpectations() let queue = OperationQueue() let operation = UserAgentGenerationOperation() queue.addOperation(operation) waitForStream(operation.t_resultStream) { let agent = $0.value! // Random part of the standard user agent string, to make sure we got something XCTAssertTrue(agent.contains(UserAgentGenerationOperation.appVersionDescriptor)) } userDefaultsMock.remove() } }
// // UserAgentGenerationOperation.swift // edX // // Created by Akiva Leffert on 12/10/15. // Copyright © 2015 edX. All rights reserved. // import XCTest @testable import edX class UserAgentGenerationOperationTests : XCTestCase { func testLoadBasic() { let queue = OperationQueue() let operation = UserAgentGenerationOperation() queue.addOperation(operation) waitForStream(operation.t_resultStream) { let agent = $0.value! // Random part of the standard user agent string, to make sure we got something XCTAssertTrue(agent.contains("KHTML, like Gecko")) } } func testOverride() { let userDefaults = OEXMockUserDefaults() let userDefaultsMock = userDefaults.installAsStandardUserDefaults() - let expectation = self.expectation(description: "User agent overriden") + let expectation = self.expectation(description: "User agent overriden Test Commit") ? ++++++++++++ UserAgentOverrideOperation.overrideUserAgent { expectation.fulfill() } waitForExpectations() let queue = OperationQueue() let operation = UserAgentGenerationOperation() queue.addOperation(operation) waitForStream(operation.t_resultStream) { let agent = $0.value! // Random part of the standard user agent string, to make sure we got something XCTAssertTrue(agent.contains(UserAgentGenerationOperation.appVersionDescriptor)) } userDefaultsMock.remove() } }
2
0.045455
1
1
86be3db65b32f234ec60ead1b4e4c755b76b61a5
app/views/users/index.html.erb
app/views/users/index.html.erb
<div id="content-wrapper"> <div id="single-column-wrapper"> <div id="content"> <p id="notice"><%= notice %></p> <h1>Users</h1> <table> <thead> <tr> <th>First name</th> <th>Last name</th> <th>Email</th> <th colspan="3"></th> </tr> </thead> <tbody> <% @users.each do |user| %> <tr> <td><%= link_to user.first_name, profile_path(user) %></td> <td><%= link_to user.last_name, profile_path(user) %></td> <td><%= link_to user.email, profile_path(user) %></td> </tr> <% end %> </tbody> </table> <br> <% if can? :create, User %> <%= link_to 'New User', new_user_path %> <% end %> <br> <%= paginate @users %> </div> </div> </div>
<div id="content-wrapper"> <div id="single-column-wrapper"> <div id="content"> <p id="notice"><%= notice %></p> <h1>Users</h1> <table> <thead> <tr> <th>First name</th> <th>Last name</th> <th>Email</th> <th colspan="3"></th> </tr> </thead> <tbody> <% @users.each do |user| %> <tr> <td><%= link_to user.first_name, profile_path(user) %></td> <td><%= link_to user.last_name, profile_path(user) %></td> <td><%= link_to user.email, profile_path(user) %></td> </tr> <% end %> </tbody> </table> <br> <% if policy(@users).create? %> <%= link_to 'New User', new_user_path %> <% end %> <br> <%= paginate @users %> </div> </div> </div>
Update admin links to use pundit
Update admin links to use pundit
HTML+ERB
mit
CollegeSTAR/collegestar_org,CollegeSTAR/collegestar_org,CollegeSTAR/collegestar_org
html+erb
## Code Before: <div id="content-wrapper"> <div id="single-column-wrapper"> <div id="content"> <p id="notice"><%= notice %></p> <h1>Users</h1> <table> <thead> <tr> <th>First name</th> <th>Last name</th> <th>Email</th> <th colspan="3"></th> </tr> </thead> <tbody> <% @users.each do |user| %> <tr> <td><%= link_to user.first_name, profile_path(user) %></td> <td><%= link_to user.last_name, profile_path(user) %></td> <td><%= link_to user.email, profile_path(user) %></td> </tr> <% end %> </tbody> </table> <br> <% if can? :create, User %> <%= link_to 'New User', new_user_path %> <% end %> <br> <%= paginate @users %> </div> </div> </div> ## Instruction: Update admin links to use pundit ## Code After: <div id="content-wrapper"> <div id="single-column-wrapper"> <div id="content"> <p id="notice"><%= notice %></p> <h1>Users</h1> <table> <thead> <tr> <th>First name</th> <th>Last name</th> <th>Email</th> <th colspan="3"></th> </tr> </thead> <tbody> <% @users.each do |user| %> <tr> <td><%= link_to user.first_name, profile_path(user) %></td> <td><%= link_to user.last_name, profile_path(user) %></td> <td><%= link_to user.email, profile_path(user) %></td> </tr> <% end %> </tbody> </table> <br> <% if policy(@users).create? %> <%= link_to 'New User', new_user_path %> <% end %> <br> <%= paginate @users %> </div> </div> </div>
<div id="content-wrapper"> <div id="single-column-wrapper"> <div id="content"> <p id="notice"><%= notice %></p> <h1>Users</h1> <table> <thead> <tr> <th>First name</th> <th>Last name</th> <th>Email</th> <th colspan="3"></th> </tr> </thead> <tbody> <% @users.each do |user| %> <tr> <td><%= link_to user.first_name, profile_path(user) %></td> <td><%= link_to user.last_name, profile_path(user) %></td> <td><%= link_to user.email, profile_path(user) %></td> </tr> <% end %> </tbody> </table> <br> - <% if can? :create, User %> + <% if policy(@users).create? %> <%= link_to 'New User', new_user_path %> <% end %> <br> <%= paginate @users %> </div> </div> </div>
2
0.052632
1
1
273c8a79b9819a42fe8cc7ccb33f8e1bfdf954a5
README.md
README.md
A chai assertion plugin for working with urls Provides a number of assertion helpers for working with urls. ## Usage ```js const chai = require('chai'); chai.use(require('chai-url')); chai.expect('http://example.com/foo/bar').to.have.path('/foo/bar'); chai.expect('http://example.com/foo/bar').to.have.protocol('http'); ``` ## Available matchers * `path` * `pathname` * `port` * `hostname` * `protocol` * `auth` * `hash` In each case, the property is tested against the corresponding property from node's [url.parse](https://nodejs.org/api/url.html#url_url_strings_and_url_objects) method. ## Partial matching The `path`, `pathname`, `hostname`, `auth` and `hash` functions can also perform partial matching based on substrings by using a `contains` clause in the test statement. ```js expect('http://example.com/foo/bar').to.contain.path('/foo'); ``` ## Examples See the [tests for this module](./test/index.js) for further examples.
A chai assertion plugin for working with urls Provides a number of assertion helpers for working with urls. ## Usage ```js const chai = require('chai'); chai.use(require('chai-url')); chai.expect('http://example.com/foo/bar').to.have.path('/foo/bar'); chai.expect('http://example.com/foo/bar').to.have.protocol('http'); ``` ## Available matchers * `path` * `pathname` * `port` * `hostname` * `protocol` * `auth` * `hash` In each case, the property is tested against the corresponding property from node's [url.parse](https://nodejs.org/api/url.html#url_url_strings_and_url_objects) method. In the case of `hash` and `protocol` properties which may be prefixed/suffixed with `#` and `:` respectively these characters are optional and will match with or without their presence. ## Partial matching The `path`, `pathname`, `hostname`, `auth` and `hash` functions can also perform partial matching based on substrings by using a `contains` clause in the test statement. ```js expect('http://example.com/foo/bar').to.contain.path('/foo'); ``` ## Examples See the [tests for this module](./test/index.js) for further examples.
Add doc note about optional characters
Add doc note about optional characters
Markdown
mit
lennym/chai-url
markdown
## Code Before: A chai assertion plugin for working with urls Provides a number of assertion helpers for working with urls. ## Usage ```js const chai = require('chai'); chai.use(require('chai-url')); chai.expect('http://example.com/foo/bar').to.have.path('/foo/bar'); chai.expect('http://example.com/foo/bar').to.have.protocol('http'); ``` ## Available matchers * `path` * `pathname` * `port` * `hostname` * `protocol` * `auth` * `hash` In each case, the property is tested against the corresponding property from node's [url.parse](https://nodejs.org/api/url.html#url_url_strings_and_url_objects) method. ## Partial matching The `path`, `pathname`, `hostname`, `auth` and `hash` functions can also perform partial matching based on substrings by using a `contains` clause in the test statement. ```js expect('http://example.com/foo/bar').to.contain.path('/foo'); ``` ## Examples See the [tests for this module](./test/index.js) for further examples. ## Instruction: Add doc note about optional characters ## Code After: A chai assertion plugin for working with urls Provides a number of assertion helpers for working with urls. ## Usage ```js const chai = require('chai'); chai.use(require('chai-url')); chai.expect('http://example.com/foo/bar').to.have.path('/foo/bar'); chai.expect('http://example.com/foo/bar').to.have.protocol('http'); ``` ## Available matchers * `path` * `pathname` * `port` * `hostname` * `protocol` * `auth` * `hash` In each case, the property is tested against the corresponding property from node's [url.parse](https://nodejs.org/api/url.html#url_url_strings_and_url_objects) method. In the case of `hash` and `protocol` properties which may be prefixed/suffixed with `#` and `:` respectively these characters are optional and will match with or without their presence. ## Partial matching The `path`, `pathname`, `hostname`, `auth` and `hash` functions can also perform partial matching based on substrings by using a `contains` clause in the test statement. ```js expect('http://example.com/foo/bar').to.contain.path('/foo'); ``` ## Examples See the [tests for this module](./test/index.js) for further examples.
A chai assertion plugin for working with urls Provides a number of assertion helpers for working with urls. ## Usage ```js const chai = require('chai'); chai.use(require('chai-url')); chai.expect('http://example.com/foo/bar').to.have.path('/foo/bar'); chai.expect('http://example.com/foo/bar').to.have.protocol('http'); ``` ## Available matchers * `path` * `pathname` * `port` * `hostname` * `protocol` * `auth` * `hash` In each case, the property is tested against the corresponding property from node's [url.parse](https://nodejs.org/api/url.html#url_url_strings_and_url_objects) method. + In the case of `hash` and `protocol` properties which may be prefixed/suffixed with `#` and `:` respectively these characters are optional and will match with or without their presence. + ## Partial matching The `path`, `pathname`, `hostname`, `auth` and `hash` functions can also perform partial matching based on substrings by using a `contains` clause in the test statement. ```js expect('http://example.com/foo/bar').to.contain.path('/foo'); ``` ## Examples See the [tests for this module](./test/index.js) for further examples.
2
0.054054
2
0
b00054e8f188584e692873eca32a8c531e706653
templates/FormGenerator/macros/select.html.twig
templates/FormGenerator/macros/select.html.twig
{% macro generate(input) %} <select{% for type,value in input %} {{type}}="{{value}}"{% endfor %}> {% for option, label in input.options %}<option value="{{option}}" {% if (option == input.value) %}selected{% endif %}>{{translate(label)}}</option>{% endfor %} </select> {% endmacro %}
{% macro generate(input) %} <select{% for type,value in input %}{% if type != "options" %} {{type}}="{{value}}"{% endif %}{% endfor %}> {% for option, label in input.options %}<option value="{{option}}" {% if (option == input.value) %}selected{% endif %}>{{translate(label)}}</option>{% endfor %} </select> {% endmacro %}
Fix warning with select macro
Fix warning with select macro
Twig
mit
lcharette/UF_FormGenerator,lcharette/UF_FormGenerator,lcharette/UF_FormGenerator
twig
## Code Before: {% macro generate(input) %} <select{% for type,value in input %} {{type}}="{{value}}"{% endfor %}> {% for option, label in input.options %}<option value="{{option}}" {% if (option == input.value) %}selected{% endif %}>{{translate(label)}}</option>{% endfor %} </select> {% endmacro %} ## Instruction: Fix warning with select macro ## Code After: {% macro generate(input) %} <select{% for type,value in input %}{% if type != "options" %} {{type}}="{{value}}"{% endif %}{% endfor %}> {% for option, label in input.options %}<option value="{{option}}" {% if (option == input.value) %}selected{% endif %}>{{translate(label)}}</option>{% endfor %} </select> {% endmacro %}
{% macro generate(input) %} - <select{% for type,value in input %} {{type}}="{{value}}"{% endfor %}> + <select{% for type,value in input %}{% if type != "options" %} {{type}}="{{value}}"{% endif %}{% endfor %}> ? ++++++++++++++++++++++++++ +++++++++++ {% for option, label in input.options %}<option value="{{option}}" {% if (option == input.value) %}selected{% endif %}>{{translate(label)}}</option>{% endfor %} </select> {% endmacro %}
2
0.4
1
1
6cae7d78103153aa0220896913a9eec06753b7e0
brain/spec/spec_helper.rb
brain/spec/spec_helper.rb
ENV["AHN_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'adhearsion/rspec' require 'rspec/autorun' require 'webmock/rspec' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.mock_with :rspec config.filter_run :focus => true config.run_all_when_everything_filtered = true config.before { WebMock.disable_net_connect! } end ENV['ADAM_ROOT_DOMAIN'] = 'local.adamrabbit.com:3000' ENV['ADAM_INTERNAL_PASSWORD'] = 'foobar'
ENV["AHN_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'adhearsion/rspec' require 'rspec/autorun' require 'webmock/rspec' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.mock_with :rspec config.filter_run :focus => true config.run_all_when_everything_filtered = true config.before { WebMock.disable_net_connect! } end ENV['ADAM_MEMORY_URL'] = 'http://local.adamrabbit.com:3000' ENV['ADAM_ROOT_DOMAIN'] = 'local.adamrabbit.com:3000' ENV['ADAM_INTERNAL_PASSWORD'] = 'foobar'
Fix specs to use separate memory URL
[BRAIN] Fix specs to use separate memory URL
Ruby
agpl-3.0
mojolingo/Adam.Snark.Rabbit,mojolingo/Adam.Snark.Rabbit,mojolingo/Adam.Snark.Rabbit,mojolingo/Adam.Snark.Rabbit
ruby
## Code Before: ENV["AHN_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'adhearsion/rspec' require 'rspec/autorun' require 'webmock/rspec' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.mock_with :rspec config.filter_run :focus => true config.run_all_when_everything_filtered = true config.before { WebMock.disable_net_connect! } end ENV['ADAM_ROOT_DOMAIN'] = 'local.adamrabbit.com:3000' ENV['ADAM_INTERNAL_PASSWORD'] = 'foobar' ## Instruction: [BRAIN] Fix specs to use separate memory URL ## Code After: ENV["AHN_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'adhearsion/rspec' require 'rspec/autorun' require 'webmock/rspec' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.mock_with :rspec config.filter_run :focus => true config.run_all_when_everything_filtered = true config.before { WebMock.disable_net_connect! } end ENV['ADAM_MEMORY_URL'] = 'http://local.adamrabbit.com:3000' ENV['ADAM_ROOT_DOMAIN'] = 'local.adamrabbit.com:3000' ENV['ADAM_INTERNAL_PASSWORD'] = 'foobar'
ENV["AHN_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'adhearsion/rspec' require 'rspec/autorun' require 'webmock/rspec' # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| config.mock_with :rspec config.filter_run :focus => true config.run_all_when_everything_filtered = true config.before { WebMock.disable_net_connect! } end + ENV['ADAM_MEMORY_URL'] = 'http://local.adamrabbit.com:3000' ENV['ADAM_ROOT_DOMAIN'] = 'local.adamrabbit.com:3000' ENV['ADAM_INTERNAL_PASSWORD'] = 'foobar'
1
0.045455
1
0
9f53ae9aafd4ec54095811a97d99997419888068
roles/osxw.developer-nodejs/defaults/main.yml
roles/osxw.developer-nodejs/defaults/main.yml
--- brew_taps: [] brew_packages: - n npm_packages: - iron-node
--- brew_taps: [] brew_packages: - n npm_packages: [] gem_packages: []
Fix gem packages for node
Fix gem packages for node
YAML
mit
ansible-macos/macos-playbook,ansible-macos/macos-playbook,luishdez/osx-playbook
yaml
## Code Before: --- brew_taps: [] brew_packages: - n npm_packages: - iron-node ## Instruction: Fix gem packages for node ## Code After: --- brew_taps: [] brew_packages: - n npm_packages: [] gem_packages: []
--- brew_taps: [] brew_packages: - n - npm_packages: + npm_packages: [] ? +++ - - iron-node + gem_packages: []
4
0.666667
2
2
a6dd8aee6a3b6272372532a19fba3d830d40612a
neo/test/io/test_axonio.py
neo/test/io/test_axonio.py
try: import unittest2 as unittest except ImportError: import unittest from neo.io import AxonIO from neo.test.io.common_io_test import BaseTestIO class TestAxonIO(BaseTestIO, unittest.TestCase): files_to_test = ['File_axon_1.abf', 'File_axon_2.abf', 'File_axon_3.abf', 'File_axon_4.abf',] files_to_download = files_to_test ioclass = AxonIO if __name__ == "__main__": unittest.main()
try: import unittest2 as unittest except ImportError: import unittest from neo.io import AxonIO from neo.test.io.common_io_test import BaseTestIO class TestAxonIO(BaseTestIO, unittest.TestCase): files_to_test = ['File_axon_1.abf', 'File_axon_2.abf', 'File_axon_3.abf', 'File_axon_4.abf', 'File_axon_5.abf', 'File_axon_6.abf', ] files_to_download = files_to_test ioclass = AxonIO if __name__ == "__main__": unittest.main()
Test with file from Jackub
Test with file from Jackub git-svn-id: 0eea5547755d67006ec5687992a7464f0ad96b59@379 acbc63fc-6c75-0410-9d68-8fa99cba188a
Python
bsd-3-clause
SummitKwan/python-neo,mschmidt87/python-neo,rgerkin/python-neo,jakobj/python-neo,CINPLA/python-neo,apdavison/python-neo,theunissenlab/python-neo,samuelgarcia/python-neo,guangxingli/python-neo,mgr0dzicki/python-neo,JuliaSprenger/python-neo,NeuralEnsemble/python-neo,npyoung/python-neo,INM-6/python-neo,tclose/python-neo,tkf/neo,amchagas/python-neo,Blackfynn/python-neo
python
## Code Before: try: import unittest2 as unittest except ImportError: import unittest from neo.io import AxonIO from neo.test.io.common_io_test import BaseTestIO class TestAxonIO(BaseTestIO, unittest.TestCase): files_to_test = ['File_axon_1.abf', 'File_axon_2.abf', 'File_axon_3.abf', 'File_axon_4.abf',] files_to_download = files_to_test ioclass = AxonIO if __name__ == "__main__": unittest.main() ## Instruction: Test with file from Jackub git-svn-id: 0eea5547755d67006ec5687992a7464f0ad96b59@379 acbc63fc-6c75-0410-9d68-8fa99cba188a ## Code After: try: import unittest2 as unittest except ImportError: import unittest from neo.io import AxonIO from neo.test.io.common_io_test import BaseTestIO class TestAxonIO(BaseTestIO, unittest.TestCase): files_to_test = ['File_axon_1.abf', 'File_axon_2.abf', 'File_axon_3.abf', 'File_axon_4.abf', 'File_axon_5.abf', 'File_axon_6.abf', ] files_to_download = files_to_test ioclass = AxonIO if __name__ == "__main__": unittest.main()
try: import unittest2 as unittest except ImportError: import unittest from neo.io import AxonIO from neo.test.io.common_io_test import BaseTestIO class TestAxonIO(BaseTestIO, unittest.TestCase): files_to_test = ['File_axon_1.abf', 'File_axon_2.abf', 'File_axon_3.abf', - 'File_axon_4.abf',] ? - + 'File_axon_4.abf', + 'File_axon_5.abf', + 'File_axon_6.abf', + + + ] files_to_download = files_to_test ioclass = AxonIO if __name__ == "__main__": unittest.main()
7
0.333333
6
1
a0b7b2ffadfeeebdf213e73607ac69d9542d800e
nwb.config.js
nwb.config.js
const browsers = require('./test/browsers'); module.exports = { type: 'web-module', npm: { cjs: false, esModules: true, umd: true }, karma: process.argv.indexOf('--ci') === -1 ? { browsers: [require('karma-chrome-launcher')] } : { browsers: Object.keys(browsers), plugins: ['karma-sauce-launcher'], reporters: ['saucelabs'], extra: { sauceLabs: {}, customLaunchers: browsers, retryLimit: 3, autoWatch: false, concurrency: 4, browserDisconnectTimeout: 10000, browserDisconnectTolerance: 5, captureTimeout: 120000 } }, babel: { plugins: ['transform-react-jsx'] } };
const browsers = require('./test/browsers'); module.exports = { type: 'web-module', npm: { cjs: false, esModules: true, umd: { externals: { preact: 'preact' }, global: 'skate' } }, karma: process.argv.indexOf('--ci') === -1 ? { browsers: [require('karma-chrome-launcher')] } : { browsers: Object.keys(browsers), plugins: ['karma-sauce-launcher'], reporters: ['saucelabs'], extra: { sauceLabs: {}, customLaunchers: browsers, retryLimit: 3, autoWatch: false, concurrency: 4, browserDisconnectTimeout: 10000, browserDisconnectTolerance: 5, captureTimeout: 120000 } }, babel: { plugins: ['transform-react-jsx'] } };
Fix global name and add preact to the list of externals.
fix: Fix global name and add preact to the list of externals. #1150
JavaScript
mit
chrisdarroch/skatejs,skatejs/skatejs,skatejs/skatejs,chrisdarroch/skatejs,skatejs/skatejs
javascript
## Code Before: const browsers = require('./test/browsers'); module.exports = { type: 'web-module', npm: { cjs: false, esModules: true, umd: true }, karma: process.argv.indexOf('--ci') === -1 ? { browsers: [require('karma-chrome-launcher')] } : { browsers: Object.keys(browsers), plugins: ['karma-sauce-launcher'], reporters: ['saucelabs'], extra: { sauceLabs: {}, customLaunchers: browsers, retryLimit: 3, autoWatch: false, concurrency: 4, browserDisconnectTimeout: 10000, browserDisconnectTolerance: 5, captureTimeout: 120000 } }, babel: { plugins: ['transform-react-jsx'] } }; ## Instruction: fix: Fix global name and add preact to the list of externals. #1150 ## Code After: const browsers = require('./test/browsers'); module.exports = { type: 'web-module', npm: { cjs: false, esModules: true, umd: { externals: { preact: 'preact' }, global: 'skate' } }, karma: process.argv.indexOf('--ci') === -1 ? { browsers: [require('karma-chrome-launcher')] } : { browsers: Object.keys(browsers), plugins: ['karma-sauce-launcher'], reporters: ['saucelabs'], extra: { sauceLabs: {}, customLaunchers: browsers, retryLimit: 3, autoWatch: false, concurrency: 4, browserDisconnectTimeout: 10000, browserDisconnectTolerance: 5, captureTimeout: 120000 } }, babel: { plugins: ['transform-react-jsx'] } };
const browsers = require('./test/browsers'); module.exports = { type: 'web-module', npm: { cjs: false, esModules: true, - umd: true ? ^^^^ + umd: { ? ^ + externals: { preact: 'preact' }, + global: 'skate' + } }, karma: process.argv.indexOf('--ci') === -1 ? { browsers: [require('karma-chrome-launcher')] } : { browsers: Object.keys(browsers), plugins: ['karma-sauce-launcher'], reporters: ['saucelabs'], extra: { sauceLabs: {}, customLaunchers: browsers, retryLimit: 3, autoWatch: false, concurrency: 4, browserDisconnectTimeout: 10000, browserDisconnectTolerance: 5, captureTimeout: 120000 } }, babel: { plugins: ['transform-react-jsx'] } };
5
0.166667
4
1
bd0319584c0ff11ba8a4d6e6a9caaafce6eeab09
desktop/src/main/scala/org/talkingpuffin/ui/HtmlFormatter.scala
desktop/src/main/scala/org/talkingpuffin/ui/HtmlFormatter.scala
package org.talkingpuffin.ui import org.talkingpuffin.util.Loggable import twitter4j.User /** * Helps with creating HTML for display in the UI */ object HtmlFormatter extends Loggable { def createTweetHtml(text: String, replyTo: Option[Long], source: String, retweetingUser: Option[User]): String = { val arrowLinkToParent = LinkExtractor.getReplyToInfo(replyTo, text) match { case Some((user, id)) => "<a href='" + LinkExtractor.getStatusUrl(id, user) + "'>↑</a> " case None => "" } val r = LinkExtractor.createLinks(text).replaceAll("\n", "<br/>") htmlAround(arrowLinkToParent + fontAround(r, "190%") + fontAround(" from " + source + (if (retweetingUser.isDefined) ", RT by " + retweetingUser.get.getScreenName else ""), "80%")) } def fontAround(s: String, size: String) = "<font style='font-family: Georgia; font-size: " + size + "'>" + s + "</font>" def htmlAround(s: String) = "<html>" + s + "</html>" }
package org.talkingpuffin.ui import org.talkingpuffin.util.Loggable import org.talkingpuffin.Constants.RetweetSymbol import twitter4j.User /** * Helps with creating HTML for display in the UI */ object HtmlFormatter extends Loggable { def createTweetHtml(text: String, replyTo: Option[Long], source: String, retweetingUser: Option[User]): String = { val arrowLinkToParent = LinkExtractor.getReplyToInfo(replyTo, text) match { case Some((user, id)) => "<a href='" + LinkExtractor.getStatusUrl(id, user) + "'>↑</a> " case None => "" } val r = LinkExtractor.createLinks(text).replaceAll("\n", "<br/>") htmlAround(arrowLinkToParent + fontAround(r, "190%") + fontAround( (if (retweetingUser.isDefined) " " + RetweetSymbol + " " + retweetingUser.get.getScreenName else "") + " " + source, "80%")) } def fontAround(s: String, size: String) = "<font style='font-family: Georgia; font-size: " + size + "'>" + s + "</font>" def htmlAround(s: String) = "<html>" + s + "</html>" }
Use a symbol to mark retweets. Shorten display of source application (remove “from”).
Use a symbol to mark retweets. Shorten display of source application (remove “from”).
Scala
mit
dcbriccetti/talking-puffin,dcbriccetti/talking-puffin
scala
## Code Before: package org.talkingpuffin.ui import org.talkingpuffin.util.Loggable import twitter4j.User /** * Helps with creating HTML for display in the UI */ object HtmlFormatter extends Loggable { def createTweetHtml(text: String, replyTo: Option[Long], source: String, retweetingUser: Option[User]): String = { val arrowLinkToParent = LinkExtractor.getReplyToInfo(replyTo, text) match { case Some((user, id)) => "<a href='" + LinkExtractor.getStatusUrl(id, user) + "'>↑</a> " case None => "" } val r = LinkExtractor.createLinks(text).replaceAll("\n", "<br/>") htmlAround(arrowLinkToParent + fontAround(r, "190%") + fontAround(" from " + source + (if (retweetingUser.isDefined) ", RT by " + retweetingUser.get.getScreenName else ""), "80%")) } def fontAround(s: String, size: String) = "<font style='font-family: Georgia; font-size: " + size + "'>" + s + "</font>" def htmlAround(s: String) = "<html>" + s + "</html>" } ## Instruction: Use a symbol to mark retweets. Shorten display of source application (remove “from”). ## Code After: package org.talkingpuffin.ui import org.talkingpuffin.util.Loggable import org.talkingpuffin.Constants.RetweetSymbol import twitter4j.User /** * Helps with creating HTML for display in the UI */ object HtmlFormatter extends Loggable { def createTweetHtml(text: String, replyTo: Option[Long], source: String, retweetingUser: Option[User]): String = { val arrowLinkToParent = LinkExtractor.getReplyToInfo(replyTo, text) match { case Some((user, id)) => "<a href='" + LinkExtractor.getStatusUrl(id, user) + "'>↑</a> " case None => "" } val r = LinkExtractor.createLinks(text).replaceAll("\n", "<br/>") htmlAround(arrowLinkToParent + fontAround(r, "190%") + fontAround( (if (retweetingUser.isDefined) " " + RetweetSymbol + " " + retweetingUser.get.getScreenName else "") + " " + source, "80%")) } def fontAround(s: String, size: String) = "<font style='font-family: Georgia; font-size: " + size + "'>" + s + "</font>" def htmlAround(s: String) = "<html>" + s + "</html>" }
package org.talkingpuffin.ui import org.talkingpuffin.util.Loggable + import org.talkingpuffin.Constants.RetweetSymbol import twitter4j.User /** * Helps with creating HTML for display in the UI */ object HtmlFormatter extends Loggable { - def createTweetHtml(text: String, replyTo: Option[Long], source: String, + def createTweetHtml(text: String, replyTo: Option[Long], source: String, retweetingUser: Option[User]): String = { ? +++++++++++++++++++++++++++++++++++++++++ - retweetingUser: Option[User]): String = { val arrowLinkToParent = LinkExtractor.getReplyToInfo(replyTo, text) match { case Some((user, id)) => "<a href='" + LinkExtractor.getStatusUrl(id, user) + "'>↑</a> " case None => "" } val r = LinkExtractor.createLinks(text).replaceAll("\n", "<br/>") - htmlAround(arrowLinkToParent + fontAround(r, "190%") + + htmlAround(arrowLinkToParent + fontAround(r, "190%") + fontAround( ? +++++++++++ - fontAround(" from " + source + - (if (retweetingUser.isDefined) ", RT by " + retweetingUser.get.getScreenName else ""), "80%")) ? ^ ^ ^^ - ^^^^^^^ + (if (retweetingUser.isDefined) " " + RetweetSymbol + " " + retweetingUser.get.getScreenName else "") + ? ^^^^ ^^^^^^^^^^^^ ^^^ ^ + " " + source, "80%")) } def fontAround(s: String, size: String) = "<font style='font-family: Georgia; font-size: " + size + "'>" + s + "</font>" def htmlAround(s: String) = "<html>" + s + "</html>" }
10
0.322581
5
5
6b2b55dea9a84222fcd055770235019a23971ab6
.travis.yml
.travis.yml
sudo: required services: - docker language: java after_success: - mvn clean compile cobertura:cobertura coveralls:report install - if [ "$TRAVIS_BRANCH" == "master" ]; then docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; docker push sidlors/ajax4jsf-demo; fi jdk: - oraclejdk8
sudo: required services: - docker language: java after_success: - mvn clean compile install - if [ "$TRAVIS_BRANCH" == "master" ]; then docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; docker push sidlors/ajax4jsf-demo; fi jdk: - oraclejdk8
Remove coverall and cobertura configuration
Remove coverall and cobertura configuration
YAML
mit
sidlors/ajax4jsf,sidlors/ajax4jsf
yaml
## Code Before: sudo: required services: - docker language: java after_success: - mvn clean compile cobertura:cobertura coveralls:report install - if [ "$TRAVIS_BRANCH" == "master" ]; then docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; docker push sidlors/ajax4jsf-demo; fi jdk: - oraclejdk8 ## Instruction: Remove coverall and cobertura configuration ## Code After: sudo: required services: - docker language: java after_success: - mvn clean compile install - if [ "$TRAVIS_BRANCH" == "master" ]; then docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; docker push sidlors/ajax4jsf-demo; fi jdk: - oraclejdk8
sudo: required services: - docker language: java after_success: - - mvn clean compile cobertura:cobertura coveralls:report install + - mvn clean compile install - if [ "$TRAVIS_BRANCH" == "master" ]; then docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; docker push sidlors/ajax4jsf-demo; fi jdk: - oraclejdk8
2
0.166667
1
1
c3782d2d8af8ecf72f47fa3e2a882730a3b046d9
readme.md
readme.md
[![Build Status](https://travis-ci.org/bnolan/scene-server.svg?branch=master)](https://travis-ci.org/bnolan/scene-server) The scene server is a component of my opensource metaverse project. It loads scene files in .xml format and listens for clients on a websocket connection. Any connected client gets a streamed version of the world sent to them. You can write scripts in javascript using <script /> tags in your scenefile to provide interactivity to connected clients. Contact [bnolan@gmail.com](mailto:bnolan@gmail.com). --- ## Installation Prerequisites: make sure you have the latest version of Node and NPM installed. OS: Verified running on Windows 8 and Mac OS X. ### Running the scenevr server 1. Clone this repo: https://github.com/bnolan/scenevr.git 1. `cd scenevr` 1. `npm install` 1. `npm install -g coffee` 1. `coffee server.coffee scenes/hello.xml` Note: *you can replace hello.xml with any of the demo files* ### Running the scenevr-web client In a new console window, and in a new directory: 1. Clone the scenevr-web repo: https://github.com/bnolan/scenevr-web.git 1. `cd scenevr-web` 1. `npm install` 1. `npm start` You should now be able to open `localhost:9000` in your browser to see `scenes/hello.xml`.
[![Build Status](https://travis-ci.org/bnolan/scene-server.svg?branch=master)](https://travis-ci.org/bnolan/scene-server) The scene server loads scene files in .xml format and listens for clients on a websocket connection. Any connected client gets a streamed version of the world sent to them. You can write scripts in javascript using <script /> tags in your scenefile to provide interactivity to connected clients. Contact [bnolan@gmail.com](mailto:bnolan@gmail.com). --- ## Installation Prerequisites: make sure you have the latest version of Node and NPM installed. OS: Verified running on Windows 8 and Mac OS X. ### Running the scenevr server 1. Clone this repo: https://github.com/bnolan/scenevr.git 1. `cd scenevr` 1. `npm install` 1. `npm install -g coffee` 1. `coffee server.coffee scenes/hello.xml` Note: *you can replace hello.xml with any of the demo files* ### Running the scenevr-web client In a new console window, and in a new directory: 1. Clone the scenevr-web repo: https://github.com/bnolan/scenevr-web.git 1. `cd scenevr-web` 1. `npm install` 1. `npm start` You should now be able to open `localhost:9000` in your browser to see `scenes/hello.xml`.
Remove reference to the M-word. Rename to sceneVR.
Remove reference to the M-word. Rename to sceneVR.
Markdown
bsd-3-clause
scenevr/server,elekezem/server,Flet/scenevr,scenevr/server
markdown
## Code Before: [![Build Status](https://travis-ci.org/bnolan/scene-server.svg?branch=master)](https://travis-ci.org/bnolan/scene-server) The scene server is a component of my opensource metaverse project. It loads scene files in .xml format and listens for clients on a websocket connection. Any connected client gets a streamed version of the world sent to them. You can write scripts in javascript using <script /> tags in your scenefile to provide interactivity to connected clients. Contact [bnolan@gmail.com](mailto:bnolan@gmail.com). --- ## Installation Prerequisites: make sure you have the latest version of Node and NPM installed. OS: Verified running on Windows 8 and Mac OS X. ### Running the scenevr server 1. Clone this repo: https://github.com/bnolan/scenevr.git 1. `cd scenevr` 1. `npm install` 1. `npm install -g coffee` 1. `coffee server.coffee scenes/hello.xml` Note: *you can replace hello.xml with any of the demo files* ### Running the scenevr-web client In a new console window, and in a new directory: 1. Clone the scenevr-web repo: https://github.com/bnolan/scenevr-web.git 1. `cd scenevr-web` 1. `npm install` 1. `npm start` You should now be able to open `localhost:9000` in your browser to see `scenes/hello.xml`. ## Instruction: Remove reference to the M-word. Rename to sceneVR. ## Code After: [![Build Status](https://travis-ci.org/bnolan/scene-server.svg?branch=master)](https://travis-ci.org/bnolan/scene-server) The scene server loads scene files in .xml format and listens for clients on a websocket connection. Any connected client gets a streamed version of the world sent to them. You can write scripts in javascript using <script /> tags in your scenefile to provide interactivity to connected clients. Contact [bnolan@gmail.com](mailto:bnolan@gmail.com). --- ## Installation Prerequisites: make sure you have the latest version of Node and NPM installed. OS: Verified running on Windows 8 and Mac OS X. ### Running the scenevr server 1. Clone this repo: https://github.com/bnolan/scenevr.git 1. `cd scenevr` 1. `npm install` 1. `npm install -g coffee` 1. `coffee server.coffee scenes/hello.xml` Note: *you can replace hello.xml with any of the demo files* ### Running the scenevr-web client In a new console window, and in a new directory: 1. Clone the scenevr-web repo: https://github.com/bnolan/scenevr-web.git 1. `cd scenevr-web` 1. `npm install` 1. `npm start` You should now be able to open `localhost:9000` in your browser to see `scenes/hello.xml`.
[![Build Status](https://travis-ci.org/bnolan/scene-server.svg?branch=master)](https://travis-ci.org/bnolan/scene-server) - The scene server is a component of my opensource metaverse project. It loads scene files in .xml format and listens for clients on a websocket connection. Any connected client gets a streamed version of the world sent to them. You can write scripts in javascript using <script /> tags in your scenefile to provide interactivity to connected clients. ? ------------------------------------------------------ + The scene server loads scene files in .xml format and listens for clients on a websocket connection. Any connected client gets a streamed version of the world sent to them. You can write scripts in javascript using <script /> tags in your scenefile to provide interactivity to connected clients. Contact [bnolan@gmail.com](mailto:bnolan@gmail.com). --- ## Installation Prerequisites: make sure you have the latest version of Node and NPM installed. OS: Verified running on Windows 8 and Mac OS X. ### Running the scenevr server 1. Clone this repo: https://github.com/bnolan/scenevr.git 1. `cd scenevr` 1. `npm install` 1. `npm install -g coffee` 1. `coffee server.coffee scenes/hello.xml` Note: *you can replace hello.xml with any of the demo files* ### Running the scenevr-web client In a new console window, and in a new directory: 1. Clone the scenevr-web repo: https://github.com/bnolan/scenevr-web.git 1. `cd scenevr-web` 1. `npm install` 1. `npm start` You should now be able to open `localhost:9000` in your browser to see `scenes/hello.xml`.
2
0.060606
1
1
b79e38c5a6c208d875f1e8fbad85456623957ece
gradle/extensions/servlet/README.markdown
gradle/extensions/servlet/README.markdown
This sample demonstrate how to implement an OSGi Whiteboard Serlvet in Liferay 7 ## Usage 1. Set up Liferay Workspace. 2. Go to `${liferay_workspace_root}/modules` and clone this repository 3. Go to the root folder of this repository that you just cloned 4. Start up your Liferay bundle 5. Run `gradle deploy` and place the generated jar into `${liferay_home}/deploy` or if you have `blade` installed, run `blade deploy` 6. Sign in to Liferay as Administrator 7. Navigate to Control Panel -> Configuration -> Server Administration -> Log Levels -> Add Category 8. Configure `com.liferay.blade.samples.servlet.BladeServlet` and the log level to `INFO` 9. Access to `http://localhost:8080/o/blade/servlet` You'll see "Hello World" and info log on your console.
This sample demonstrates how to implement an OSGi Whiteboard Servlet in Liferay Portal. For more details on this sample, see the [Servlet](https://dev.liferay.com/develop/reference/-/knowledge_base/7-0/servlet) article on Liferay's Developer Network.
Add servlet readme reference on LDN
Add servlet readme reference on LDN
Markdown
apache-2.0
gamerson/liferay-blade-samples,gamerson/liferay-blade-samples,gamerson/liferay-blade-samples,gamerson/liferay-blade-samples,gamerson/liferay-blade-samples,gamerson/liferay-blade-samples
markdown
## Code Before: This sample demonstrate how to implement an OSGi Whiteboard Serlvet in Liferay 7 ## Usage 1. Set up Liferay Workspace. 2. Go to `${liferay_workspace_root}/modules` and clone this repository 3. Go to the root folder of this repository that you just cloned 4. Start up your Liferay bundle 5. Run `gradle deploy` and place the generated jar into `${liferay_home}/deploy` or if you have `blade` installed, run `blade deploy` 6. Sign in to Liferay as Administrator 7. Navigate to Control Panel -> Configuration -> Server Administration -> Log Levels -> Add Category 8. Configure `com.liferay.blade.samples.servlet.BladeServlet` and the log level to `INFO` 9. Access to `http://localhost:8080/o/blade/servlet` You'll see "Hello World" and info log on your console. ## Instruction: Add servlet readme reference on LDN ## Code After: This sample demonstrates how to implement an OSGi Whiteboard Servlet in Liferay Portal. For more details on this sample, see the [Servlet](https://dev.liferay.com/develop/reference/-/knowledge_base/7-0/servlet) article on Liferay's Developer Network.
- This sample demonstrate how to implement an OSGi Whiteboard Serlvet in Liferay 7 ? - -- + This sample demonstrates how to implement an OSGi Whiteboard Servlet in Liferay ? + + + Portal. + For more details on this sample, see the + [Servlet](https://dev.liferay.com/develop/reference/-/knowledge_base/7-0/servlet) + article on Liferay's Developer Network. - ## Usage - 1. Set up Liferay Workspace. - 2. Go to `${liferay_workspace_root}/modules` and clone this repository - 3. Go to the root folder of this repository that you just cloned - 4. Start up your Liferay bundle - 5. Run `gradle deploy` and place the generated jar into `${liferay_home}/deploy` or if you have `blade` installed, run `blade deploy` - 6. Sign in to Liferay as Administrator - 7. Navigate to Control Panel -> Configuration -> Server Administration -> Log Levels -> Add Category - 8. Configure `com.liferay.blade.samples.servlet.BladeServlet` and the log level to `INFO` - 9. Access to `http://localhost:8080/o/blade/servlet` You'll see "Hello World" and info log on your console.
16
1.230769
5
11
4e1ad6174a9188e4e2415b3584f163bdc5b0fa61
.travis.yml
.travis.yml
language: python cache: pip python: - "3.6" - "3.7-dev" install: - pipenv install script: - scripts/test # after_script: # - codecov
language: python cache: pip python: - "3.6" - "3.7-dev" install: - pip install flit - flit install script: - scripts/test # after_script: # - codecov
Install flit and install package with flit
:green_heart: Install flit and install package with flit
YAML
mit
tiangolo/fastapi,tiangolo/fastapi,tiangolo/fastapi
yaml
## Code Before: language: python cache: pip python: - "3.6" - "3.7-dev" install: - pipenv install script: - scripts/test # after_script: # - codecov ## Instruction: :green_heart: Install flit and install package with flit ## Code After: language: python cache: pip python: - "3.6" - "3.7-dev" install: - pip install flit - flit install script: - scripts/test # after_script: # - codecov
language: python cache: pip python: - "3.6" - "3.7-dev" install: - - pipenv install ? --- + - pip install flit ? +++++ + - flit install script: - scripts/test # after_script: # - codecov
3
0.1875
2
1
c080bad3641c317ae50b547ad41369ce682ecd8c
authentication/passport.js
authentication/passport.js
/** * Created by joeparrinello on 10/3/15. */ var passport = require('passport'); var FacebookTokenStrategy = require('passport-facebook-token'); var User = require('../models/user.js'); passport.use( new FacebookTokenStrategy({ clientID:process.env.FACEBOOK_CLIENT_ID, clientSecret:process.env.FACEBOOK_SECRET }, function(accessToken, refreshToken, profile, done) { User.findOneAndUpdate({facebookId: profile.id}, {$set: {facebookName: profile.name.givenName + " " +profile.name.familyName}},{upsert:true, new:true}, function (error, user) { if (user){ return done(error, user); } }); }) ); passport.serializeUser(function(user, done) { done(null, user); }); passport.deserializeUser(function(user, done) { done(null, user); }); module.exports = passport;
/** * Created by joeparrinello on 10/3/15. */ var passport = require('passport'); var FacebookTokenStrategy = require('passport-facebook-token'); var User = require('../models/user.js'); var AccessToken = require('../model/accesstoken.js'); passport.use( new FacebookTokenStrategy({ clientID:process.env.FACEBOOK_CLIENT_ID, clientSecret:process.env.FACEBOOK_SECRET }, function(accessToken, refreshToken, profile, done) { User.findOneAndUpdate({facebookId: profile.id}, {$set: {facebookName: profile.name.givenName + " " +profile.name.familyName}},{upsert:true, new:true}, function (error, user) { if (user){ AccessToken.findOneAndUpdate({accessToken: accessToken}, {$set: {facebookId: profile.id}},{upsert:true, new:true}, function (error, accessToken) { if (accessToken){ return done(error, user); } }); return done(error, user); } }); }) ); passport.serializeUser(function(user, done) { done(null, user); }); passport.deserializeUser(function(user, done) { done(null, user); }); module.exports = passport;
Fix Indent, an storing accessTokens
Fix Indent, an storing accessTokens
JavaScript
mit
HackRUIXFirstly/backend,HackRUIXFirstly/backend
javascript
## Code Before: /** * Created by joeparrinello on 10/3/15. */ var passport = require('passport'); var FacebookTokenStrategy = require('passport-facebook-token'); var User = require('../models/user.js'); passport.use( new FacebookTokenStrategy({ clientID:process.env.FACEBOOK_CLIENT_ID, clientSecret:process.env.FACEBOOK_SECRET }, function(accessToken, refreshToken, profile, done) { User.findOneAndUpdate({facebookId: profile.id}, {$set: {facebookName: profile.name.givenName + " " +profile.name.familyName}},{upsert:true, new:true}, function (error, user) { if (user){ return done(error, user); } }); }) ); passport.serializeUser(function(user, done) { done(null, user); }); passport.deserializeUser(function(user, done) { done(null, user); }); module.exports = passport; ## Instruction: Fix Indent, an storing accessTokens ## Code After: /** * Created by joeparrinello on 10/3/15. */ var passport = require('passport'); var FacebookTokenStrategy = require('passport-facebook-token'); var User = require('../models/user.js'); var AccessToken = require('../model/accesstoken.js'); passport.use( new FacebookTokenStrategy({ clientID:process.env.FACEBOOK_CLIENT_ID, clientSecret:process.env.FACEBOOK_SECRET }, function(accessToken, refreshToken, profile, done) { User.findOneAndUpdate({facebookId: profile.id}, {$set: {facebookName: profile.name.givenName + " " +profile.name.familyName}},{upsert:true, new:true}, function (error, user) { if (user){ AccessToken.findOneAndUpdate({accessToken: accessToken}, {$set: {facebookId: profile.id}},{upsert:true, new:true}, function (error, accessToken) { if (accessToken){ return done(error, user); } }); return done(error, user); } }); }) ); passport.serializeUser(function(user, done) { done(null, user); }); passport.deserializeUser(function(user, done) { done(null, user); }); module.exports = passport;
/** * Created by joeparrinello on 10/3/15. */ var passport = require('passport'); var FacebookTokenStrategy = require('passport-facebook-token'); var User = require('../models/user.js'); + var AccessToken = require('../model/accesstoken.js'); passport.use( - new FacebookTokenStrategy({ + new FacebookTokenStrategy({ ? ++ - clientID:process.env.FACEBOOK_CLIENT_ID, + clientID:process.env.FACEBOOK_CLIENT_ID, ? ++++++ - clientSecret:process.env.FACEBOOK_SECRET + clientSecret:process.env.FACEBOOK_SECRET ? ++++++ - }, + }, ? ++++ - function(accessToken, refreshToken, profile, done) { + function(accessToken, refreshToken, profile, done) { ? ++++ - User.findOneAndUpdate({facebookId: profile.id}, {$set: {facebookName: profile.name.givenName + " " +profile.name.familyName}},{upsert:true, new:true}, function (error, user) { + User.findOneAndUpdate({facebookId: profile.id}, {$set: {facebookName: profile.name.givenName + " " +profile.name.familyName}},{upsert:true, new:true}, function (error, user) { ? ++++++ - if (user){ + if (user){ ? ++++++++ + AccessToken.findOneAndUpdate({accessToken: accessToken}, {$set: {facebookId: profile.id}},{upsert:true, new:true}, function (error, accessToken) { + if (accessToken){ + return done(error, user); + } + }); - return done(error, user); + return done(error, user); ? ++++++++++ + } + }); - } + }) ? + - }); - }) ); passport.serializeUser(function(user, done) { - done(null, user); + done(null, user); ? ++ }); passport.deserializeUser(function(user, done) { - done(null, user); + done(null, user); ? ++ }); module.exports = passport;
32
0.941176
19
13
cfcfc63a1bfe6c4f725eab99ebbc6d6a818a2fee
README.rst
README.rst
================ nose-blacklist ================ nose-blacklist is a plugin for nose_ that provides a powerful way of skipping tests without requiring code changes. - Test cases are excluded by regex matching - Tests cases are matched by their fully-qualified names, including the module, class, and function/method names. - Tests to skip can be sourced from one or more files, or from cli arguments Quickstart ========== .. code-block:: shell $ pip install nose-blacklist $ nosetests --with-blacklist \ --blacklist=<pattern1> \ --blacklist=<pattern2> \ mytests/ Blacklist strings can be specified from one or more files. Blacklist files can be used in conjunction with the ``--blacklist`` arguments. .. code-block:: shell $ cat blacklist.txt test_thing # test_other_thing test_third_thing $ nosetests --with-blacklist \ --blacklist-file=blacklist.txt \ mytests/ The blacklist file should have a single pattern per line, as above. Any line starting with a ``#`` is commented and will be ignored. .. _nose: https://nose.readthedocs.org/en/latest/
================ nose-blacklist ================ .. image:: https://travis-ci.org/pglass/nose-blacklist.svg :target: https://travis-ci.org/pglass/nose-blacklist nose-blacklist is a plugin for nose_ that provides a powerful way of skipping tests without requiring code changes. - Test cases are excluded by regex matching - Tests cases are matched by their fully-qualified names, including the module, class, and function/method names. - Tests to skip can be sourced from one or more files, or from cli arguments Quickstart ========== .. code-block:: shell $ pip install nose-blacklist $ nosetests --with-blacklist \ --blacklist=<pattern1> \ --blacklist=<pattern2> \ mytests/ Blacklist strings can be specified from one or more files. Blacklist files can be used in conjunction with the ``--blacklist`` arguments. .. code-block:: shell $ cat blacklist.txt test_thing # test_other_thing test_third_thing $ nosetests --with-blacklist \ --blacklist-file=blacklist.txt \ mytests/ The blacklist file should have a single pattern per line, as above. Any line starting with a ``#`` is commented and will be ignored. .. _nose: https://nose.readthedocs.org/en/latest/
Add travis badge to the readme
Add travis badge to the readme
reStructuredText
mit
pglass/nose-blacklist
restructuredtext
## Code Before: ================ nose-blacklist ================ nose-blacklist is a plugin for nose_ that provides a powerful way of skipping tests without requiring code changes. - Test cases are excluded by regex matching - Tests cases are matched by their fully-qualified names, including the module, class, and function/method names. - Tests to skip can be sourced from one or more files, or from cli arguments Quickstart ========== .. code-block:: shell $ pip install nose-blacklist $ nosetests --with-blacklist \ --blacklist=<pattern1> \ --blacklist=<pattern2> \ mytests/ Blacklist strings can be specified from one or more files. Blacklist files can be used in conjunction with the ``--blacklist`` arguments. .. code-block:: shell $ cat blacklist.txt test_thing # test_other_thing test_third_thing $ nosetests --with-blacklist \ --blacklist-file=blacklist.txt \ mytests/ The blacklist file should have a single pattern per line, as above. Any line starting with a ``#`` is commented and will be ignored. .. _nose: https://nose.readthedocs.org/en/latest/ ## Instruction: Add travis badge to the readme ## Code After: ================ nose-blacklist ================ .. image:: https://travis-ci.org/pglass/nose-blacklist.svg :target: https://travis-ci.org/pglass/nose-blacklist nose-blacklist is a plugin for nose_ that provides a powerful way of skipping tests without requiring code changes. - Test cases are excluded by regex matching - Tests cases are matched by their fully-qualified names, including the module, class, and function/method names. - Tests to skip can be sourced from one or more files, or from cli arguments Quickstart ========== .. code-block:: shell $ pip install nose-blacklist $ nosetests --with-blacklist \ --blacklist=<pattern1> \ --blacklist=<pattern2> \ mytests/ Blacklist strings can be specified from one or more files. Blacklist files can be used in conjunction with the ``--blacklist`` arguments. .. code-block:: shell $ cat blacklist.txt test_thing # test_other_thing test_third_thing $ nosetests --with-blacklist \ --blacklist-file=blacklist.txt \ mytests/ The blacklist file should have a single pattern per line, as above. Any line starting with a ``#`` is commented and will be ignored. .. _nose: https://nose.readthedocs.org/en/latest/
================ nose-blacklist ================ + + .. image:: https://travis-ci.org/pglass/nose-blacklist.svg + :target: https://travis-ci.org/pglass/nose-blacklist nose-blacklist is a plugin for nose_ that provides a powerful way of skipping tests without requiring code changes. - Test cases are excluded by regex matching - Tests cases are matched by their fully-qualified names, including the module, class, and function/method names. - Tests to skip can be sourced from one or more files, or from cli arguments Quickstart ========== .. code-block:: shell $ pip install nose-blacklist $ nosetests --with-blacklist \ --blacklist=<pattern1> \ --blacklist=<pattern2> \ mytests/ Blacklist strings can be specified from one or more files. Blacklist files can be used in conjunction with the ``--blacklist`` arguments. .. code-block:: shell $ cat blacklist.txt test_thing # test_other_thing test_third_thing $ nosetests --with-blacklist \ --blacklist-file=blacklist.txt \ mytests/ The blacklist file should have a single pattern per line, as above. Any line starting with a ``#`` is commented and will be ignored. .. _nose: https://nose.readthedocs.org/en/latest/
3
0.068182
3
0
e6cf1066b9200d66cc7fe8536a1b3873af25c0c9
spec/features/missions_spec.rb
spec/features/missions_spec.rb
require 'rails_helper' RSpec.feature "Mission", type: :feature, js: true do scenario "renders Mission component" do visit "/" expect(page).to have_content "Less than 5% of cancer patients participate in clinical trials despite having a participant satisfaction rate of more than 90%." end end
require 'rails_helper' RSpec.feature "Mission", type: :feature do scenario "renders Mission component" do visit "/" expect(page).to have_content "Less than 5% of cancer patients participate in clinical trials despite having a participant satisfaction rate of more than 90%." end end
Remove js: true from Capybara test
Remove js: true from Capybara test
Ruby
mit
danmckeon/crconnect,danmckeon/crconnect,danmckeon/crconnect
ruby
## Code Before: require 'rails_helper' RSpec.feature "Mission", type: :feature, js: true do scenario "renders Mission component" do visit "/" expect(page).to have_content "Less than 5% of cancer patients participate in clinical trials despite having a participant satisfaction rate of more than 90%." end end ## Instruction: Remove js: true from Capybara test ## Code After: require 'rails_helper' RSpec.feature "Mission", type: :feature do scenario "renders Mission component" do visit "/" expect(page).to have_content "Less than 5% of cancer patients participate in clinical trials despite having a participant satisfaction rate of more than 90%." end end
require 'rails_helper' - RSpec.feature "Mission", type: :feature, js: true do ? ---------- + RSpec.feature "Mission", type: :feature do scenario "renders Mission component" do visit "/" expect(page).to have_content "Less than 5% of cancer patients participate in clinical trials despite having a participant satisfaction rate of more than 90%." end end
2
0.25
1
1
d73e3f58beca00cdbd61ad6c3d6da3a1152eaeb6
lib/smart_answer_flows/next-steps-for-your-business/next_steps_for_your_business.erb
lib/smart_answer_flows/next-steps-for-your-business/next_steps_for_your_business.erb
<%# ====================================================================== The landing page of the flow. ====================================================================== %> <% text_for :title do %> Check the next steps for your limited company <% end %> <% govspeak_for :body do %> If you’ve just registered your limited company, use this tool to find out: - rules you need to follow - things you need to get or register for - what help and financial support is available <% end %>
<%# ====================================================================== The landing page of the flow. ====================================================================== %> <% text_for :title do %> Check the next steps for your limited company <% end %> <% govspeak_for :body do %> If you’ve just registered your limited company, use this tool to find out: - things you need to apply or register for - rules you need to follow - what help and financial support is available The tool will not share your details or answers with anyone. <% end %>
Update start page for Next steps for your business
Update start page for Next steps for your business This updates the content on the start page.
HTML+ERB
mit
alphagov/smart-answers,alphagov/smart-answers,alphagov/smart-answers,alphagov/smart-answers
html+erb
## Code Before: <%# ====================================================================== The landing page of the flow. ====================================================================== %> <% text_for :title do %> Check the next steps for your limited company <% end %> <% govspeak_for :body do %> If you’ve just registered your limited company, use this tool to find out: - rules you need to follow - things you need to get or register for - what help and financial support is available <% end %> ## Instruction: Update start page for Next steps for your business This updates the content on the start page. ## Code After: <%# ====================================================================== The landing page of the flow. ====================================================================== %> <% text_for :title do %> Check the next steps for your limited company <% end %> <% govspeak_for :body do %> If you’ve just registered your limited company, use this tool to find out: - things you need to apply or register for - rules you need to follow - what help and financial support is available The tool will not share your details or answers with anyone. <% end %>
<%# ====================================================================== The landing page of the flow. ====================================================================== %> <% text_for :title do %> Check the next steps for your limited company <% end %> <% govspeak_for :body do %> If you’ve just registered your limited company, use this tool to find out: + - things you need to apply or register for - rules you need to follow - - things you need to get or register for - what help and financial support is available + + The tool will not share your details or answers with anyone. <% end %>
4
0.235294
3
1
879c89ecc6b954edb79ae995e8e6b0f565edd673
app/views/statistics/index.html.erb
app/views/statistics/index.html.erb
<p id="notice"><%= notice %></p> <h3>Statistics for <%= @smoke_detector.location %></h3> <table class="table"> <thead> <tr> <th>Posts scanned</th> <th>At</th> </tr> </thead> <tbody> <% @statistics.each do |statistic| %> <tr> <td><%= statistic.posts_scanned %></td> <td><%= time_ago_in_words statistic.created_at %></td> </tr> <% end %> </tbody> </table>
<p id="notice"><%= notice %></p> <h3>Statistics for <%= @smoke_detector.location %></h3> <%= line_chart @statistics.group_by_hour(:created_at, range: 3.days.ago.to_date..Time.now).sum(:posts_scanned) %> <table class="table"> <thead> <tr> <th>Posts scanned</th> <th>At</th> </tr> </thead> <tbody> <% @statistics.each do |statistic| %> <tr> <td><%= statistic.posts_scanned %></td> <td><%= time_ago_in_words statistic.created_at %></td> </tr> <% end %> </tbody> </table>
Add line chart to statistics page
Add line chart to statistics page
HTML+ERB
cc0-1.0
SulphurDioxide/metasmoke,Charcoal-SE/metasmoke,Charcoal-SE/metasmoke,Charcoal-SE/metasmoke,j-f1/forked-metasmoke,SulphurDioxide/metasmoke,angussidney/metasmoke,angussidney/metasmoke,angussidney/metasmoke,Charcoal-SE/metasmoke,SulphurDioxide/metasmoke,j-f1/forked-metasmoke,angussidney/metasmoke,j-f1/forked-metasmoke,j-f1/forked-metasmoke
html+erb
## Code Before: <p id="notice"><%= notice %></p> <h3>Statistics for <%= @smoke_detector.location %></h3> <table class="table"> <thead> <tr> <th>Posts scanned</th> <th>At</th> </tr> </thead> <tbody> <% @statistics.each do |statistic| %> <tr> <td><%= statistic.posts_scanned %></td> <td><%= time_ago_in_words statistic.created_at %></td> </tr> <% end %> </tbody> </table> ## Instruction: Add line chart to statistics page ## Code After: <p id="notice"><%= notice %></p> <h3>Statistics for <%= @smoke_detector.location %></h3> <%= line_chart @statistics.group_by_hour(:created_at, range: 3.days.ago.to_date..Time.now).sum(:posts_scanned) %> <table class="table"> <thead> <tr> <th>Posts scanned</th> <th>At</th> </tr> </thead> <tbody> <% @statistics.each do |statistic| %> <tr> <td><%= statistic.posts_scanned %></td> <td><%= time_ago_in_words statistic.created_at %></td> </tr> <% end %> </tbody> </table>
<p id="notice"><%= notice %></p> <h3>Statistics for <%= @smoke_detector.location %></h3> + + <%= line_chart @statistics.group_by_hour(:created_at, range: 3.days.ago.to_date..Time.now).sum(:posts_scanned) %> <table class="table"> <thead> <tr> <th>Posts scanned</th> <th>At</th> </tr> </thead> <tbody> <% @statistics.each do |statistic| %> <tr> <td><%= statistic.posts_scanned %></td> <td><%= time_ago_in_words statistic.created_at %></td> </tr> <% end %> </tbody> </table>
2
0.095238
2
0
10ad1a24a1d651009a169c0be9a5ba190650401f
app/view/twig/editcontent/fields/_markdown.twig
app/view/twig/editcontent/fields/_markdown.twig
{#=== OPTIONS ========================================================================================================#} {% set option = { class: ('form-control ' ~ field.class)|trim, height: field.height|default('300px'), label: field.label, required: field.required|default(false), errortext: field.error|default(''), info: field.info|default('info.markdown') } %} {#=== INIT ===========================================================================================================#} {% set attributes = { text: { class: option.class, data_errortext: option.errortext, id: key, name: name, required: option.required, style: (option.height) ? 'height: ' ~ option.height ~ ' !important;' : '', } } %} {#=== FIELDSET =======================================================================================================#} {% extends '_base/_fieldset.twig' %} {% block fieldset_type 'markdown' %} {% block fieldset_label_text labelkey %} {% block fieldset_label_info option.info %} {% block fieldset_label_class 'col-xs-12' %} {% block fieldset_label_for key %} {% block fieldset_controls %} <div class="col-xs-12"> <textarea{{ macro.attr(attributes.text) }} data-uk-htmleditor="{ markdown: true, height: '{{option.height}}'}">{{ context.content.get(contentkey)|default('') }}</textarea> </div> {% endblock fieldset_controls %}
{#=== OPTIONS ========================================================================================================#} {% set option = { class: ('form-control ' ~ field.class)|trim, height: field.height|default('300px'), label: field.label, required: field.required|default(false), errortext: field.error|default(''), info: field.info|default('info.markdown') } %} {#=== INIT ===========================================================================================================#} {% set ukkit_conf = { height: option.height, markdown: true, } %} {% set attributes = { text: { class: option.class, data_errortext: option.errortext, data_uk_htmleditor: ukkit_conf|json_encode, id: key, name: name, required: option.required, style: (option.height) ? 'height: ' ~ option.height ~ ' !important;' : '', } } %} {#=== FIELDSET =======================================================================================================#} {% extends '_base/_fieldset.twig' %} {% block fieldset_type 'markdown' %} {% block fieldset_label_text labelkey %} {% block fieldset_label_info option.info %} {% block fieldset_label_class 'col-xs-12' %} {% block fieldset_label_for key %} {% block fieldset_controls %} <div class="col-xs-12"> <textarea{{ macro.attr(attributes.text) }}>{{ context.content.get(contentkey)|default('') }}</textarea> </div> {% endblock fieldset_controls %}
Move data-uk-htmleditor data to attributes
Move data-uk-htmleditor data to attributes
Twig
mit
marcin-piela/bolt,nikgo/bolt,rarila/bolt,romulo1984/bolt,Eiskis/bolt-base,Eiskis/bolt-base,hannesl/bolt,nantunes/bolt,Eiskis/bolt-base,GawainLynch/bolt,GawainLynch/bolt,Intendit/bolt,joshuan/bolt,pygillier/bolt,tekjava/bolt,Raistlfiren/bolt,hugin2005/bolt,xeddmc/bolt,romulo1984/bolt,winiceo/bolt,one988/cm,joshuan/bolt,hannesl/bolt,kendoctor/bolt,bolt/bolt,electrolinux/bolt,pygillier/bolt,winiceo/bolt,one988/cm,codesman/bolt,Raistlfiren/bolt,romulo1984/bolt,xeddmc/bolt,lenvanessen/bolt,tekjava/bolt,electrolinux/bolt,electrolinux/bolt,richardhinkamp/bolt,bolt/bolt,hugin2005/bolt,codesman/bolt,Calinou/bolt,rossriley/bolt,kendoctor/bolt,Intendit/bolt,pygillier/bolt,one988/cm,rarila/bolt,Calinou/bolt,rarila/bolt,codesman/bolt,winiceo/bolt,cdowdy/bolt,xeddmc/bolt,rossriley/bolt,Calinou/bolt,Raistlfiren/bolt,richardhinkamp/bolt,Raistlfiren/bolt,winiceo/bolt,lenvanessen/bolt,tekjava/bolt,CarsonF/bolt,lenvanessen/bolt,hugin2005/bolt,codesman/bolt,bolt/bolt,hannesl/bolt,Calinou/bolt,Eiskis/bolt-base,HonzaMikula/masivnipostele,Intendit/bolt,cdowdy/bolt,cdowdy/bolt,electrolinux/bolt,CarsonF/bolt,richardhinkamp/bolt,one988/cm,tekjava/bolt,rarila/bolt,xeddmc/bolt,Intendit/bolt,nantunes/bolt,nikgo/bolt,nikgo/bolt,HonzaMikula/masivnipostele,nantunes/bolt,marcin-piela/bolt,marcin-piela/bolt,bolt/bolt,rossriley/bolt,CarsonF/bolt,romulo1984/bolt,lenvanessen/bolt,marcin-piela/bolt,cdowdy/bolt,GawainLynch/bolt,hannesl/bolt,GawainLynch/bolt,nantunes/bolt,HonzaMikula/masivnipostele,pygillier/bolt,kendoctor/bolt,rossriley/bolt,richardhinkamp/bolt,kendoctor/bolt,hugin2005/bolt,nikgo/bolt,joshuan/bolt,CarsonF/bolt,HonzaMikula/masivnipostele,joshuan/bolt
twig
## Code Before: {#=== OPTIONS ========================================================================================================#} {% set option = { class: ('form-control ' ~ field.class)|trim, height: field.height|default('300px'), label: field.label, required: field.required|default(false), errortext: field.error|default(''), info: field.info|default('info.markdown') } %} {#=== INIT ===========================================================================================================#} {% set attributes = { text: { class: option.class, data_errortext: option.errortext, id: key, name: name, required: option.required, style: (option.height) ? 'height: ' ~ option.height ~ ' !important;' : '', } } %} {#=== FIELDSET =======================================================================================================#} {% extends '_base/_fieldset.twig' %} {% block fieldset_type 'markdown' %} {% block fieldset_label_text labelkey %} {% block fieldset_label_info option.info %} {% block fieldset_label_class 'col-xs-12' %} {% block fieldset_label_for key %} {% block fieldset_controls %} <div class="col-xs-12"> <textarea{{ macro.attr(attributes.text) }} data-uk-htmleditor="{ markdown: true, height: '{{option.height}}'}">{{ context.content.get(contentkey)|default('') }}</textarea> </div> {% endblock fieldset_controls %} ## Instruction: Move data-uk-htmleditor data to attributes ## Code After: {#=== OPTIONS ========================================================================================================#} {% set option = { class: ('form-control ' ~ field.class)|trim, height: field.height|default('300px'), label: field.label, required: field.required|default(false), errortext: field.error|default(''), info: field.info|default('info.markdown') } %} {#=== INIT ===========================================================================================================#} {% set ukkit_conf = { height: option.height, markdown: true, } %} {% set attributes = { text: { class: option.class, data_errortext: option.errortext, data_uk_htmleditor: ukkit_conf|json_encode, id: key, name: name, required: option.required, style: (option.height) ? 'height: ' ~ option.height ~ ' !important;' : '', } } %} {#=== FIELDSET =======================================================================================================#} {% extends '_base/_fieldset.twig' %} {% block fieldset_type 'markdown' %} {% block fieldset_label_text labelkey %} {% block fieldset_label_info option.info %} {% block fieldset_label_class 'col-xs-12' %} {% block fieldset_label_for key %} {% block fieldset_controls %} <div class="col-xs-12"> <textarea{{ macro.attr(attributes.text) }}>{{ context.content.get(contentkey)|default('') }}</textarea> </div> {% endblock fieldset_controls %}
{#=== OPTIONS ========================================================================================================#} {% set option = { class: ('form-control ' ~ field.class)|trim, height: field.height|default('300px'), label: field.label, required: field.required|default(false), errortext: field.error|default(''), info: field.info|default('info.markdown') } %} {#=== INIT ===========================================================================================================#} + {% set ukkit_conf = { + height: option.height, + markdown: true, + } %} + {% set attributes = { text: { class: option.class, data_errortext: option.errortext, + data_uk_htmleditor: ukkit_conf|json_encode, id: key, name: name, required: option.required, style: (option.height) ? 'height: ' ~ option.height ~ ' !important;' : '', } } %} {#=== FIELDSET =======================================================================================================#} {% extends '_base/_fieldset.twig' %} {% block fieldset_type 'markdown' %} {% block fieldset_label_text labelkey %} {% block fieldset_label_info option.info %} {% block fieldset_label_class 'col-xs-12' %} {% block fieldset_label_for key %} {% block fieldset_controls %} <div class="col-xs-12"> - <textarea{{ macro.attr(attributes.text) }} data-uk-htmleditor="{ markdown: true, height: '{{option.height}}'}">{{ context.content.get(contentkey)|default('') }}</textarea> ? -------------------------------------------------------------------- + <textarea{{ macro.attr(attributes.text) }}>{{ context.content.get(contentkey)|default('') }}</textarea> </div> {% endblock fieldset_controls %}
8
0.2
7
1
e21b17fd277b9a2424ea2b3f727325d1df65c713
src/Illuminate/Mail/Transport/SesTransport.php
src/Illuminate/Mail/Transport/SesTransport.php
<?php namespace Illuminate\Mail\Transport; use Aws\Ses\SesClient; use Swift_Mime_SimpleMessage; class SesTransport extends Transport { /** * The Amazon SES instance. * * @var \Aws\Ses\SesClient */ protected $ses; /** * Create a new SES transport instance. * * @param \Aws\Ses\SesClient $ses * @return void */ public function __construct(SesClient $ses) { $this->ses = $ses; } /** * {@inheritdoc} */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $headers = $message->getHeaders(); $headers->addTextHeader('X-SES-Message-ID', $this->ses->sendRawEmail([ 'Source' => key($message->getSender() ?: $message->getFrom()), 'RawMessage' => [ 'Data' => $message->toString(), ], ])->get('MessageId')); $this->sendPerformed($message); return $this->numberOfRecipients($message); } }
<?php namespace Illuminate\Mail\Transport; use Aws\Ses\SesClient; use Swift_Mime_SimpleMessage; class SesTransport extends Transport { /** * The Amazon SES instance. * * @var \Aws\Ses\SesClient */ protected $ses; /** * Transmission options. * * @var array */ protected $options = []; /** * Create a new SES transport instance. * * @param \Aws\Ses\SesClient $ses * @param array $options * @return void */ public function __construct(SesClient $ses, $options = []) { $this->ses = $ses; $this->options = $options; } /** * {@inheritdoc} */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $result = $this->ses->sendRawEmail( array_merge( $this->options, [ 'Source' => key($message->getSender() ?: $message->getFrom()), 'RawMessage' => [ 'Data' => $message->toString(), ], ] ) ); $message->getHeaders()->addTextHeader('X-SES-Message-ID', $result->get('MessageId')); $this->sendPerformed($message); return $this->numberOfRecipients($message); } /** * Get the transmission options being used by the transport. * * @return array */ public function getOptions() { return $this->options; } /** * Set the transmission options being used by the transport. * * @param array $options * @return array */ public function setOptions(array $options) { return $this->options = $options; } }
Add options for SES’s sendRawEmail
Add options for SES’s sendRawEmail
PHP
mit
BePsvPT-Fork/framework,morrislaptop/framework,dwightwatson/framework,leo108/laravel_framework,driesvints/framework,cviebrock/framework,arturock/framework,mul14/laravel-framework,stevebauman/framework,laravel/framework,cybercog/framework,cviebrock/framework,samlev/framework,tjbp/framework,vlakoff/framework,barryvdh/framework,gms8994/framework,laravel/framework,bytestream/framework,vlakoff/framework,leo108/laravel_framework,rodrigopedra/framework,srmkliveforks/framework,srmkliveforks/framework,halaei/framework,morrislaptop/framework,barryvdh/framework,crynobone/framework,notebowl/laravel-framework,jerguslejko/framework,halaei/framework,cviebrock/framework,JamesForks/framework,lucasmichot/framework,cybercog/framework,barryvdh/framework,stevebauman/framework,rodrigopedra/framework,ChristopheB/framework,gms8994/framework,jerguslejko/framework,mul14/laravel-framework,jerguslejko/framework,bytestream/framework,jerguslejko/framework,BePsvPT-Fork/framework,tjbp/framework,tomschlick/framework,crynobone/framework,dwightwatson/framework,hafezdivandari/framework,gms8994/framework,JamesForks/framework,stidges/framework,tomschlick/framework,notebowl/laravel-framework,stidges/framework,halaei/framework,ChristopheB/framework,mul14/laravel-framework,mul14/laravel-framework,rodrigopedra/framework,lucasmichot/framework,arturock/framework,rodrigopedra/framework,hafezdivandari/framework,BePsvPT-Fork/framework,stidges/framework,arturock/framework,srmkliveforks/framework,cybercog/framework,JosephSilber/framework,stidges/framework,tomschlick/framework,srmkliveforks/framework,BePsvPT-Fork/framework,barryvdh/framework,driesvints/framework,gms8994/framework,ChristopheB/framework,cviebrock/framework,samlev/framework,vlakoff/framework,JosephSilber/framework,tjbp/framework
php
## Code Before: <?php namespace Illuminate\Mail\Transport; use Aws\Ses\SesClient; use Swift_Mime_SimpleMessage; class SesTransport extends Transport { /** * The Amazon SES instance. * * @var \Aws\Ses\SesClient */ protected $ses; /** * Create a new SES transport instance. * * @param \Aws\Ses\SesClient $ses * @return void */ public function __construct(SesClient $ses) { $this->ses = $ses; } /** * {@inheritdoc} */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $headers = $message->getHeaders(); $headers->addTextHeader('X-SES-Message-ID', $this->ses->sendRawEmail([ 'Source' => key($message->getSender() ?: $message->getFrom()), 'RawMessage' => [ 'Data' => $message->toString(), ], ])->get('MessageId')); $this->sendPerformed($message); return $this->numberOfRecipients($message); } } ## Instruction: Add options for SES’s sendRawEmail ## Code After: <?php namespace Illuminate\Mail\Transport; use Aws\Ses\SesClient; use Swift_Mime_SimpleMessage; class SesTransport extends Transport { /** * The Amazon SES instance. * * @var \Aws\Ses\SesClient */ protected $ses; /** * Transmission options. * * @var array */ protected $options = []; /** * Create a new SES transport instance. * * @param \Aws\Ses\SesClient $ses * @param array $options * @return void */ public function __construct(SesClient $ses, $options = []) { $this->ses = $ses; $this->options = $options; } /** * {@inheritdoc} */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); $result = $this->ses->sendRawEmail( array_merge( $this->options, [ 'Source' => key($message->getSender() ?: $message->getFrom()), 'RawMessage' => [ 'Data' => $message->toString(), ], ] ) ); $message->getHeaders()->addTextHeader('X-SES-Message-ID', $result->get('MessageId')); $this->sendPerformed($message); return $this->numberOfRecipients($message); } /** * Get the transmission options being used by the transport. * * @return array */ public function getOptions() { return $this->options; } /** * Set the transmission options being used by the transport. * * @param array $options * @return array */ public function setOptions(array $options) { return $this->options = $options; } }
<?php namespace Illuminate\Mail\Transport; use Aws\Ses\SesClient; use Swift_Mime_SimpleMessage; class SesTransport extends Transport { /** * The Amazon SES instance. * * @var \Aws\Ses\SesClient */ protected $ses; /** + * Transmission options. + * + * @var array + */ + protected $options = []; + + /** * Create a new SES transport instance. * * @param \Aws\Ses\SesClient $ses + * @param array $options * @return void */ - public function __construct(SesClient $ses) + public function __construct(SesClient $ses, $options = []) ? +++++++++++++++ { $this->ses = $ses; + $this->options = $options; } /** * {@inheritdoc} */ public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) { $this->beforeSendPerformed($message); - $headers = $message->getHeaders(); + $result = $this->ses->sendRawEmail( + array_merge( + $this->options, + [ + 'Source' => key($message->getSender() ?: $message->getFrom()), + 'RawMessage' => [ + 'Data' => $message->toString(), + ], + ] + ) + ); + $message->getHeaders()->addTextHeader('X-SES-Message-ID', $result->get('MessageId')); - $headers->addTextHeader('X-SES-Message-ID', $this->ses->sendRawEmail([ - 'Source' => key($message->getSender() ?: $message->getFrom()), - 'RawMessage' => [ - 'Data' => $message->toString(), - ], - ])->get('MessageId')); $this->sendPerformed($message); return $this->numberOfRecipients($message); } + + /** + * Get the transmission options being used by the transport. + * + * @return array + */ + public function getOptions() + { + return $this->options; + } + + /** + * Set the transmission options being used by the transport. + * + * @param array $options + * @return array + */ + public function setOptions(array $options) + { + return $this->options = $options; + } }
51
1.0625
43
8
222b924b230d8f1ca260c756a0708f7b63575bf8
src/InputTypes.hs
src/InputTypes.hs
{-# LANGUAGE OverloadedStrings #-} module InputTypes where import qualified Data.Aeson as A import Control.Applicative ((<$>), (<*>)) import Control.Monad (mzero, when) data Input = Input { iId :: Int , iUnits :: [Unit] , iWidth :: Int , iHeight :: Int , iFilled :: [Cell] , iSourceLength :: Int , iSourceSeeds :: [Int] } deriving Show data Cell = Cell { cX :: Int , cY :: Int } deriving (Show, Eq) data Unit = Unit { uMembers :: [Cell] , uPivot :: Cell } deriving Show instance A.FromJSON Input where parseJSON (A.Object v) = Input <$> v A..: "id" <*> v A..: "units" <*> v A..: "width" <*> v A..: "height" <*> v A..: "filled" <*> v A..: "sourceLength" <*> v A..: "sourceSeeds" parseJSON _ = mzero instance A.FromJSON Cell where parseJSON (A.Object v) = Cell <$> v A..: "x" <*> v A..: "y" parseJSON _ = mzero instance A.FromJSON Unit where parseJSON (A.Object v) = Unit <$> v A..: "members" <*> v A..: "pivot" parseJSON _ = mzero
{-# LANGUAGE OverloadedStrings #-} module InputTypes where import qualified Data.Aeson as A import Control.Applicative ((<$>), (<*>)) import Control.Monad (mzero, when) data Input = Input { iId :: Int , iUnits :: [Unit] , iWidth :: Int , iHeight :: Int , iFilled :: [Cell] , iSourceLength :: Int , iSourceSeeds :: [Int] } deriving Show data Cell = Cell { cX :: Int , cY :: Int } deriving (Show, Eq) data Unit = Unit { uMembers :: [Cell] , uPivot :: Cell } deriving Show instance A.FromJSON Input where parseJSON (A.Object v) = Input <$> v A..: "id" <*> v A..: "units" <*> v A..: "width" <*> v A..: "height" <*> v A..: "filled" <*> v A..: "sourceLength" <*> v A..: "sourceSeeds" parseJSON _ = mzero instance A.FromJSON Cell where parseJSON (A.Object v) = transformCoords <$> (Cell <$> v A..: "x" <*> v A..: "y") parseJSON _ = mzero instance A.FromJSON Unit where parseJSON (A.Object v) = Unit <$> v A..: "members" <*> v A..: "pivot" parseJSON _ = mzero transformCoords :: Cell -> Cell transformCoords c = c { cX = x', cY = y'} where x' = x - (y `div` 2) y' = y (x, y) = (cX c, cY c)
Add transformation to more pleasant coordinates system
Add transformation to more pleasant coordinates system
Haskell
bsd-3-clause
mietek/icfp-contest-2015,blax/icfp-contest-2015
haskell
## Code Before: {-# LANGUAGE OverloadedStrings #-} module InputTypes where import qualified Data.Aeson as A import Control.Applicative ((<$>), (<*>)) import Control.Monad (mzero, when) data Input = Input { iId :: Int , iUnits :: [Unit] , iWidth :: Int , iHeight :: Int , iFilled :: [Cell] , iSourceLength :: Int , iSourceSeeds :: [Int] } deriving Show data Cell = Cell { cX :: Int , cY :: Int } deriving (Show, Eq) data Unit = Unit { uMembers :: [Cell] , uPivot :: Cell } deriving Show instance A.FromJSON Input where parseJSON (A.Object v) = Input <$> v A..: "id" <*> v A..: "units" <*> v A..: "width" <*> v A..: "height" <*> v A..: "filled" <*> v A..: "sourceLength" <*> v A..: "sourceSeeds" parseJSON _ = mzero instance A.FromJSON Cell where parseJSON (A.Object v) = Cell <$> v A..: "x" <*> v A..: "y" parseJSON _ = mzero instance A.FromJSON Unit where parseJSON (A.Object v) = Unit <$> v A..: "members" <*> v A..: "pivot" parseJSON _ = mzero ## Instruction: Add transformation to more pleasant coordinates system ## Code After: {-# LANGUAGE OverloadedStrings #-} module InputTypes where import qualified Data.Aeson as A import Control.Applicative ((<$>), (<*>)) import Control.Monad (mzero, when) data Input = Input { iId :: Int , iUnits :: [Unit] , iWidth :: Int , iHeight :: Int , iFilled :: [Cell] , iSourceLength :: Int , iSourceSeeds :: [Int] } deriving Show data Cell = Cell { cX :: Int , cY :: Int } deriving (Show, Eq) data Unit = Unit { uMembers :: [Cell] , uPivot :: Cell } deriving Show instance A.FromJSON Input where parseJSON (A.Object v) = Input <$> v A..: "id" <*> v A..: "units" <*> v A..: "width" <*> v A..: "height" <*> v A..: "filled" <*> v A..: "sourceLength" <*> v A..: "sourceSeeds" parseJSON _ = mzero instance A.FromJSON Cell where parseJSON (A.Object v) = transformCoords <$> (Cell <$> v A..: "x" <*> v A..: "y") parseJSON _ = mzero instance A.FromJSON Unit where parseJSON (A.Object v) = Unit <$> v A..: "members" <*> v A..: "pivot" parseJSON _ = mzero transformCoords :: Cell -> Cell transformCoords c = c { cX = x', cY = y'} where x' = x - (y `div` 2) y' = y (x, y) = (cX c, cY c)
{-# LANGUAGE OverloadedStrings #-} module InputTypes where import qualified Data.Aeson as A import Control.Applicative ((<$>), (<*>)) import Control.Monad (mzero, when) data Input = Input { iId :: Int , iUnits :: [Unit] , iWidth :: Int , iHeight :: Int , iFilled :: [Cell] , iSourceLength :: Int , iSourceSeeds :: [Int] } deriving Show data Cell = Cell { cX :: Int , cY :: Int } deriving (Show, Eq) data Unit = Unit { uMembers :: [Cell] , uPivot :: Cell } deriving Show instance A.FromJSON Input where parseJSON (A.Object v) = Input <$> v A..: "id" <*> v A..: "units" <*> v A..: "width" <*> v A..: "height" <*> v A..: "filled" <*> v A..: "sourceLength" <*> v A..: "sourceSeeds" parseJSON _ = mzero instance A.FromJSON Cell where - parseJSON (A.Object v) = Cell <$> v A..: "x" <*> v A..: "y" + parseJSON (A.Object v) = transformCoords <$> (Cell <$> v A..: "x" <*> v A..: "y") ? +++++++++++++++++++++ + + parseJSON _ = mzero instance A.FromJSON Unit where parseJSON (A.Object v) = Unit <$> v A..: "members" <*> v A..: "pivot" parseJSON _ = mzero + + transformCoords :: Cell -> Cell + transformCoords c = c { cX = x', cY = y'} where + x' = x - (y `div` 2) + y' = y + (x, y) = (cX c, cY c)
9
0.209302
8
1
8e5c5d5c5b9832c9ed9bdebf74615b66557fda3f
templates/default/plugin.conf.erb
templates/default/plugin.conf.erb
LoadPlugin "<%= @name %>" <% if not @options.empty? %> <Plugin "<%= @name %>"> <% @options.each_pair do |key, value| if value.is_a? Array value.each do |subvalue| %> <%= collectd_key(key) %> <%= collectd_option(subvalue) %> <% end else %> <%= collectd_key(key) %> <%= collectd_option(value) %> <% end end %> </Plugin> <% end %>
LoadPlugin "<%= @type %>" <% if not @config.empty? %> <Plugin "<%= @type %>"> <% @config.each_pair do |key, value| if value.is_a? Array value.each do |subvalue| %> <%= collectd_key(key) %> <%= collectd_option(subvalue) %> <% end else %> <%= collectd_key(key) %> <%= collectd_option(value) %> <% end end %> </Plugin> <% end %>
Update the names of the variables to match those passed in
Update the names of the variables to match those passed in
HTML+ERB
apache-2.0
realityforge/chef-collectd
html+erb
## Code Before: LoadPlugin "<%= @name %>" <% if not @options.empty? %> <Plugin "<%= @name %>"> <% @options.each_pair do |key, value| if value.is_a? Array value.each do |subvalue| %> <%= collectd_key(key) %> <%= collectd_option(subvalue) %> <% end else %> <%= collectd_key(key) %> <%= collectd_option(value) %> <% end end %> </Plugin> <% end %> ## Instruction: Update the names of the variables to match those passed in ## Code After: LoadPlugin "<%= @type %>" <% if not @config.empty? %> <Plugin "<%= @type %>"> <% @config.each_pair do |key, value| if value.is_a? Array value.each do |subvalue| %> <%= collectd_key(key) %> <%= collectd_option(subvalue) %> <% end else %> <%= collectd_key(key) %> <%= collectd_option(value) %> <% end end %> </Plugin> <% end %>
- LoadPlugin "<%= @name %>" ? ^^^ + LoadPlugin "<%= @type %>" ? ^^^ - <% if not @options.empty? %> ? ^^^^ ^ + <% if not @config.empty? %> ? ^ ^^^ - <Plugin "<%= @name %>"> ? ^^^ + <Plugin "<%= @type %>"> ? ^^^ - <% @options.each_pair do |key, value| ? ^^^^ ^ + <% @config.each_pair do |key, value| ? ^ ^^^ if value.is_a? Array value.each do |subvalue| %> <%= collectd_key(key) %> <%= collectd_option(subvalue) %> <% end else %> <%= collectd_key(key) %> <%= collectd_option(value) %> <% end end %> </Plugin> <% end %>
8
0.615385
4
4
1ccdd852e5eba43111340df7c5fa33717f2ae61c
.github/workflows/ci.yml
.github/workflows/ci.yml
on: [push, pull_request] jobs: android-bin: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: bazel build -c opt :encoder_main --config=android_arm64 - run: bazel build -c opt :decoder_main --config=android_arm64 android-app: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Build Android app run: bazel build android_example:lyra_android_example --config=android_arm64 --copt=-DBENCHMARK
on: [push, pull_request] jobs: android-bin: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: bazel build -c opt :encoder_main --config=android_arm64 - run: bazel build -c opt :decoder_main --config=android_arm64 android-app: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Build Android app run: bazel build android_example:lyra_android_example --config=android_arm64 --copt=-DBENCHMARK - name: Upload Android APK as artifact uses: actions/upload-artifact@v2 if: github.repository_owner == 'google' with: path: bazel-bin/android_example/lyra_android_example.apk
Add step that uploads Android APK as artifact
CI: Add step that uploads Android APK as artifact
YAML
apache-2.0
google/lyra,google/lyra
yaml
## Code Before: on: [push, pull_request] jobs: android-bin: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: bazel build -c opt :encoder_main --config=android_arm64 - run: bazel build -c opt :decoder_main --config=android_arm64 android-app: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Build Android app run: bazel build android_example:lyra_android_example --config=android_arm64 --copt=-DBENCHMARK ## Instruction: CI: Add step that uploads Android APK as artifact ## Code After: on: [push, pull_request] jobs: android-bin: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: bazel build -c opt :encoder_main --config=android_arm64 - run: bazel build -c opt :decoder_main --config=android_arm64 android-app: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Build Android app run: bazel build android_example:lyra_android_example --config=android_arm64 --copt=-DBENCHMARK - name: Upload Android APK as artifact uses: actions/upload-artifact@v2 if: github.repository_owner == 'google' with: path: bazel-bin/android_example/lyra_android_example.apk
on: [push, pull_request] jobs: android-bin: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: bazel build -c opt :encoder_main --config=android_arm64 - run: bazel build -c opt :decoder_main --config=android_arm64 android-app: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Build Android app run: bazel build android_example:lyra_android_example --config=android_arm64 --copt=-DBENCHMARK + - name: Upload Android APK as artifact + uses: actions/upload-artifact@v2 + if: github.repository_owner == 'google' + with: + path: bazel-bin/android_example/lyra_android_example.apk
5
0.3125
5
0
575d23a829dfd0d4a6e48d95ad63c22f4564084a
scripts/travis/install-apt.sh
scripts/travis/install-apt.sh
set -e set -x sudo apt-get update sudo apt-get install -y --no-install-recommends \ build-essential \ cmake \ cython \ git \ gfortran \ graphviz \ libboost-filesystem-dev \ libboost-python-dev \ libboost-system-dev \ libboost-thread-dev \ libgflags-dev \ libgoogle-glog-dev \ libhdf5-serial-dev \ libleveldb-dev \ liblmdb-dev \ libopenblas-dev \ libopencv-dev \ libprotobuf-dev \ libsnappy-dev \ protobuf-compiler \ python-dev \ python-flask \ python-gevent \ python-gflags \ python-h5py \ python-mock \ python-nose \ python-numpy \ python-pil \ python-pip \ python-protobuf \ python-psutil \ python-requests \ python-scipy \ python-six \ python-skimage
set -e set -x sudo apt-get update sudo apt-get install -y --no-install-recommends \ build-essential \ cmake \ cython \ git \ gfortran \ graphviz \ libboost-filesystem-dev \ libboost-python-dev \ libboost-system-dev \ libboost-thread-dev \ libgflags-dev \ libgoogle-glog-dev \ libhdf5-serial-dev \ libleveldb-dev \ liblmdb-dev \ libopenblas-dev \ libopencv-dev \ libprotobuf-dev \ libsnappy-dev \ protobuf-compiler \ python-dev \ python-flask \ python-gevent \ python-gevent-websocket \ python-gflags \ python-h5py \ python-matplotlib \ python-mock \ python-nose \ python-numpy \ python-pil \ python-pip \ python-protobuf \ python-psutil \ python-requests \ python-scipy \ python-six \ python-skimage
Install a few more deb packages on TravisCI
Install a few more deb packages on TravisCI
Shell
bsd-3-clause
bygreencn/DIGITS,Deepomatic/DIGITS,ethantang95/DIGITS-GAN,TimZaman/DIGITS,ethantang95/DIGITS,ethantang95/DIGITS-GAN,ethantang95/DIGITS,ethantang95/DIGITS-GAN,ethantang95/DIGITS,ethantang95/DIGITS,Deepomatic/DIGITS,bygreencn/DIGITS,gheinrich/DIGITS-GAN,ethantang95/DIGITS-GAN,TimZaman/DIGITS,gheinrich/DIGITS-GAN,bygreencn/DIGITS,TimZaman/DIGITS,TimZaman/DIGITS,gheinrich/DIGITS-GAN,bygreencn/DIGITS,Deepomatic/DIGITS,gheinrich/DIGITS-GAN,Deepomatic/DIGITS
shell
## Code Before: set -e set -x sudo apt-get update sudo apt-get install -y --no-install-recommends \ build-essential \ cmake \ cython \ git \ gfortran \ graphviz \ libboost-filesystem-dev \ libboost-python-dev \ libboost-system-dev \ libboost-thread-dev \ libgflags-dev \ libgoogle-glog-dev \ libhdf5-serial-dev \ libleveldb-dev \ liblmdb-dev \ libopenblas-dev \ libopencv-dev \ libprotobuf-dev \ libsnappy-dev \ protobuf-compiler \ python-dev \ python-flask \ python-gevent \ python-gflags \ python-h5py \ python-mock \ python-nose \ python-numpy \ python-pil \ python-pip \ python-protobuf \ python-psutil \ python-requests \ python-scipy \ python-six \ python-skimage ## Instruction: Install a few more deb packages on TravisCI ## Code After: set -e set -x sudo apt-get update sudo apt-get install -y --no-install-recommends \ build-essential \ cmake \ cython \ git \ gfortran \ graphviz \ libboost-filesystem-dev \ libboost-python-dev \ libboost-system-dev \ libboost-thread-dev \ libgflags-dev \ libgoogle-glog-dev \ libhdf5-serial-dev \ libleveldb-dev \ liblmdb-dev \ libopenblas-dev \ libopencv-dev \ libprotobuf-dev \ libsnappy-dev \ protobuf-compiler \ python-dev \ python-flask \ python-gevent \ python-gevent-websocket \ python-gflags \ python-h5py \ python-matplotlib \ python-mock \ python-nose \ python-numpy \ python-pil \ python-pip \ python-protobuf \ python-psutil \ python-requests \ python-scipy \ python-six \ python-skimage
set -e set -x sudo apt-get update sudo apt-get install -y --no-install-recommends \ build-essential \ cmake \ cython \ git \ gfortran \ graphviz \ libboost-filesystem-dev \ libboost-python-dev \ libboost-system-dev \ libboost-thread-dev \ libgflags-dev \ libgoogle-glog-dev \ libhdf5-serial-dev \ libleveldb-dev \ liblmdb-dev \ libopenblas-dev \ libopencv-dev \ libprotobuf-dev \ libsnappy-dev \ protobuf-compiler \ python-dev \ python-flask \ python-gevent \ + python-gevent-websocket \ python-gflags \ python-h5py \ + python-matplotlib \ python-mock \ python-nose \ python-numpy \ python-pil \ python-pip \ python-protobuf \ python-psutil \ python-requests \ python-scipy \ python-six \ python-skimage
2
0.046512
2
0
88dd832b22b4927f9d571158c0429df0a50fd6d8
sigaltstack.c
sigaltstack.c
jmp_buf try; void handler(int sig) { static int i = 0; write(2, "stack overflow\n", 15); longjmp(try, ++i); _exit(1); } unsigned recurse(unsigned x) { return recurse(x)+1; } int main() { char* stack; stack = malloc(sizeof(stack) * SIGSTKSZ); stack_t ss = { .ss_size = SIGSTKSZ, .ss_sp = stack, }; struct sigaction sa = { .sa_handler = handler, .sa_flags = SA_ONSTACK }; sigaltstack(&ss, 0); sigfillset(&sa.sa_mask); sigaction(SIGSEGV, &sa, 0); if (setjmp(try) < 3) { recurse(0); } else { printf("caught exception!\n"); } return 0; }
jmp_buf try; void handler(int sig) { static int i = 0; printf("stack overflow %d\n", i); longjmp(try, ++i); assert(0); } unsigned recurse(unsigned x) { return recurse(x)+1; } int main() { char* stack; stack = malloc(sizeof(stack) * SIGSTKSZ); stack_t ss = { .ss_size = SIGSTKSZ, .ss_sp = stack, }; struct sigaction sa = { .sa_handler = handler, .sa_flags = SA_ONSTACK }; sigaltstack(&ss, 0); sigfillset(&sa.sa_mask); sigaction(SIGSEGV, &sa, 0); if (setjmp(try) < 3) { recurse(0); } else { printf("caught exception!\n"); } return 0; }
Add assert, more print info
Add assert, more print info
C
apache-2.0
danluu/setjmp-longjmp-ucontext-snippets,danluu/setjmp-longjmp-ucontext-snippets
c
## Code Before: jmp_buf try; void handler(int sig) { static int i = 0; write(2, "stack overflow\n", 15); longjmp(try, ++i); _exit(1); } unsigned recurse(unsigned x) { return recurse(x)+1; } int main() { char* stack; stack = malloc(sizeof(stack) * SIGSTKSZ); stack_t ss = { .ss_size = SIGSTKSZ, .ss_sp = stack, }; struct sigaction sa = { .sa_handler = handler, .sa_flags = SA_ONSTACK }; sigaltstack(&ss, 0); sigfillset(&sa.sa_mask); sigaction(SIGSEGV, &sa, 0); if (setjmp(try) < 3) { recurse(0); } else { printf("caught exception!\n"); } return 0; } ## Instruction: Add assert, more print info ## Code After: jmp_buf try; void handler(int sig) { static int i = 0; printf("stack overflow %d\n", i); longjmp(try, ++i); assert(0); } unsigned recurse(unsigned x) { return recurse(x)+1; } int main() { char* stack; stack = malloc(sizeof(stack) * SIGSTKSZ); stack_t ss = { .ss_size = SIGSTKSZ, .ss_sp = stack, }; struct sigaction sa = { .sa_handler = handler, .sa_flags = SA_ONSTACK }; sigaltstack(&ss, 0); sigfillset(&sa.sa_mask); sigaction(SIGSEGV, &sa, 0); if (setjmp(try) < 3) { recurse(0); } else { printf("caught exception!\n"); } return 0; }
jmp_buf try; void handler(int sig) { static int i = 0; - write(2, "stack overflow\n", 15); ? ^ ^ --- ^^ + printf("stack overflow %d\n", i); ? ^ + ^ +++ ^ longjmp(try, ++i); - _exit(1); + assert(0); } unsigned recurse(unsigned x) { return recurse(x)+1; } int main() { char* stack; stack = malloc(sizeof(stack) * SIGSTKSZ); stack_t ss = { .ss_size = SIGSTKSZ, .ss_sp = stack, }; struct sigaction sa = { .sa_handler = handler, .sa_flags = SA_ONSTACK }; sigaltstack(&ss, 0); sigfillset(&sa.sa_mask); sigaction(SIGSEGV, &sa, 0); + if (setjmp(try) < 3) { recurse(0); } else { printf("caught exception!\n"); } return 0; }
5
0.131579
3
2
f39a12cc8ae715d8a076a6ba46aee552096d9840
src/rogue/creature/Player.java
src/rogue/creature/Player.java
package rogue.creature; import java.util.Collection; import jade.fov.RayCaster; import jade.fov.ViewField; import jade.ui.Camera; import jade.ui.Terminal; import jade.util.datatype.ColoredChar; import jade.util.datatype.Coordinate; import jade.util.datatype.Direction; public class Player extends Creature implements Camera { private Terminal term; private ViewField fov; public Player(Terminal term) { super(ColoredChar.create('@')); this.term = term; fov = new RayCaster(); } @Override public void act() { try { char key; key = term.getKey(); switch(key) { case 'q': expire(); break; default: Direction dir = Direction.keyToDir(key); if(dir != null) move(dir); break; } } catch(InterruptedException e) { e.printStackTrace(); } } @Override public Collection<Coordinate> getViewField() { return fov.getViewField(world(), pos(), 5); } }
package rogue.creature; import java.util.Collection; import jade.fov.RayCaster; import jade.fov.ViewField; import jade.ui.Camera; import jade.ui.Terminal; import jade.util.datatype.ColoredChar; import jade.util.datatype.Coordinate; import jade.util.datatype.Direction; public class Player extends Creature implements Camera { private Terminal term; private ViewField fov; public Player(Terminal term) { super(ColoredChar.create('@')); this.term = term; fov = new RayCaster(); } @Override public void act() { try { char key; key = term.getKey(); System.out.println("Gesamtproduktgüte"); switch(key) { case 'q': expire(); break; default: Direction dir = Direction.keyToDir(key); if(dir != null) move(dir); break; } } catch(InterruptedException e) { e.printStackTrace(); } } @Override public Collection<Coordinate> getViewField() { return fov.getViewField(world(), pos(), 5); } }
Print "Gesamtproduktgüte" on any key press.
Print "Gesamtproduktgüte" on any key press.
Java
bsd-3-clause
swp-sebastian/zombiefu
java
## Code Before: package rogue.creature; import java.util.Collection; import jade.fov.RayCaster; import jade.fov.ViewField; import jade.ui.Camera; import jade.ui.Terminal; import jade.util.datatype.ColoredChar; import jade.util.datatype.Coordinate; import jade.util.datatype.Direction; public class Player extends Creature implements Camera { private Terminal term; private ViewField fov; public Player(Terminal term) { super(ColoredChar.create('@')); this.term = term; fov = new RayCaster(); } @Override public void act() { try { char key; key = term.getKey(); switch(key) { case 'q': expire(); break; default: Direction dir = Direction.keyToDir(key); if(dir != null) move(dir); break; } } catch(InterruptedException e) { e.printStackTrace(); } } @Override public Collection<Coordinate> getViewField() { return fov.getViewField(world(), pos(), 5); } } ## Instruction: Print "Gesamtproduktgüte" on any key press. ## Code After: package rogue.creature; import java.util.Collection; import jade.fov.RayCaster; import jade.fov.ViewField; import jade.ui.Camera; import jade.ui.Terminal; import jade.util.datatype.ColoredChar; import jade.util.datatype.Coordinate; import jade.util.datatype.Direction; public class Player extends Creature implements Camera { private Terminal term; private ViewField fov; public Player(Terminal term) { super(ColoredChar.create('@')); this.term = term; fov = new RayCaster(); } @Override public void act() { try { char key; key = term.getKey(); System.out.println("Gesamtproduktgüte"); switch(key) { case 'q': expire(); break; default: Direction dir = Direction.keyToDir(key); if(dir != null) move(dir); break; } } catch(InterruptedException e) { e.printStackTrace(); } } @Override public Collection<Coordinate> getViewField() { return fov.getViewField(world(), pos(), 5); } }
package rogue.creature; import java.util.Collection; import jade.fov.RayCaster; import jade.fov.ViewField; import jade.ui.Camera; import jade.ui.Terminal; import jade.util.datatype.ColoredChar; import jade.util.datatype.Coordinate; import jade.util.datatype.Direction; public class Player extends Creature implements Camera { private Terminal term; private ViewField fov; public Player(Terminal term) { super(ColoredChar.create('@')); this.term = term; fov = new RayCaster(); } @Override public void act() { try { char key; key = term.getKey(); + System.out.println("Gesamtproduktgüte"); switch(key) { case 'q': expire(); break; default: Direction dir = Direction.keyToDir(key); if(dir != null) move(dir); break; } } catch(InterruptedException e) { e.printStackTrace(); } } @Override public Collection<Coordinate> getViewField() { return fov.getViewField(world(), pos(), 5); } }
1
0.018519
1
0
c10c6c83771ed9a46bd9bcad8294c95da6bcb489
project.clj
project.clj
(defproject fleetdb "0.2.0" :description "A schema-free database optimized for agile development." :url "http://github.com/mmcgrana/fleetdb" :source-path "src/clj" :java-source-path "src/jvm/" :javac-fork "true" :namespaces [fleetdb.server] :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [clj-stacktrace "0.1.2"] [net.sf.jopt-simple/jopt-simple "3.2"] [clj-json "0.2.0"]] :dev-dependencies [[lein-javac "1.2.1-SNAPSHOT"] [clj-unit "0.1.0"]])
(defproject fleetdb "0.2.0" :description "A schema-free database optimized for agile development." :url "http://github.com/mmcgrana/fleetdb" :source-path "src/clj" :java-source-path "src/jvm/" :javac-fork "true" :hooks [leiningen.hooks.javac] :namespaces [fleetdb.server] :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [clj-stacktrace "0.1.2"] [net.sf.jopt-simple/jopt-simple "3.2"] [clj-json "0.2.0"]] :dev-dependencies [[org.clojars.mmcgrana/lein-javac "1.2.1"] [clj-unit "0.1.0"]])
Update lein-javac to recent stable version.
Update lein-javac to recent stable version.
Clojure
mit
mmcgrana/fleetdb
clojure
## Code Before: (defproject fleetdb "0.2.0" :description "A schema-free database optimized for agile development." :url "http://github.com/mmcgrana/fleetdb" :source-path "src/clj" :java-source-path "src/jvm/" :javac-fork "true" :namespaces [fleetdb.server] :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [clj-stacktrace "0.1.2"] [net.sf.jopt-simple/jopt-simple "3.2"] [clj-json "0.2.0"]] :dev-dependencies [[lein-javac "1.2.1-SNAPSHOT"] [clj-unit "0.1.0"]]) ## Instruction: Update lein-javac to recent stable version. ## Code After: (defproject fleetdb "0.2.0" :description "A schema-free database optimized for agile development." :url "http://github.com/mmcgrana/fleetdb" :source-path "src/clj" :java-source-path "src/jvm/" :javac-fork "true" :hooks [leiningen.hooks.javac] :namespaces [fleetdb.server] :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [clj-stacktrace "0.1.2"] [net.sf.jopt-simple/jopt-simple "3.2"] [clj-json "0.2.0"]] :dev-dependencies [[org.clojars.mmcgrana/lein-javac "1.2.1"] [clj-unit "0.1.0"]])
(defproject fleetdb "0.2.0" :description "A schema-free database optimized for agile development." :url "http://github.com/mmcgrana/fleetdb" :source-path "src/clj" :java-source-path "src/jvm/" :javac-fork "true" + :hooks [leiningen.hooks.javac] :namespaces [fleetdb.server] :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.0"] [clj-stacktrace "0.1.2"] [net.sf.jopt-simple/jopt-simple "3.2"] [clj-json "0.2.0"]] :dev-dependencies - [[lein-javac "1.2.1-SNAPSHOT"] + [[org.clojars.mmcgrana/lein-javac "1.2.1"] [clj-unit "0.1.0"]])
3
0.1875
2
1
f3b9269d6f0200ae9c8229b5586761ceebeed5ab
src/app/timer/timer.component.html
src/app/timer/timer.component.html
<div class="time-container"> <div class="panel"> <at-clock cleared="$ctrl.cleared" running="$ctrl.running" time="$ctrl.time"> </at-clock> <div class="time-inputs"> <input type="number" class="time-input" placeholder="mm" ng-min="0" ng-model="$ctrl.minInput" ng-change="$ctrl.changeTime()"> <input type="number" class="time-input" placeholder="ss" ng-min="0" ng-max="59" ng-model="$ctrl.secInput" ng-change="$ctrl.changeTime()"> </div> <div class="time-controls "> <button class="button success" ng-if="!$ctrl.running" ng-click="$ctrl.start()"> {{ $ctrl.cleared ? 'Start' : 'Resume' }} </button> <button class="button alert" ng-if="$ctrl.running" ng-click="$ctrl.pause()"> Pause </button> </div> </div> </div>
<div class="time-container"> <div class="panel"> <at-clock cleared="$ctrl.cleared" running="$ctrl.running" time="$ctrl.time"> </at-clock> <div class="time-inputs"> <input type="number" class="time-input" placeholder="mm" ng-min="0" ng-model="$ctrl.minInput" ng-change="$ctrl.changeTime()"> <input type="number" class="time-input" placeholder="ss" ng-min="0" ng-max="59" ng-model="$ctrl.secInput" ng-change="$ctrl.changeTime()"> </div> <div class="time-controls "> <button class="button success" ng-if="!$ctrl.running" ng-disabled="$ctrl.secInput === undefined || $ctrl.minInput === undefined" ng-click="$ctrl.start()"> {{ $ctrl.cleared ? 'Start' : 'Resume' }} </button> <button class="button alert" ng-if="$ctrl.running" ng-click="$ctrl.pause()"> Pause </button> </div> </div> </div>
Disable timer start button when no time input
Disable timer start button when no time input
HTML
mit
JavierPDev/AudioTime,JavierPDev/AudioTime
html
## Code Before: <div class="time-container"> <div class="panel"> <at-clock cleared="$ctrl.cleared" running="$ctrl.running" time="$ctrl.time"> </at-clock> <div class="time-inputs"> <input type="number" class="time-input" placeholder="mm" ng-min="0" ng-model="$ctrl.minInput" ng-change="$ctrl.changeTime()"> <input type="number" class="time-input" placeholder="ss" ng-min="0" ng-max="59" ng-model="$ctrl.secInput" ng-change="$ctrl.changeTime()"> </div> <div class="time-controls "> <button class="button success" ng-if="!$ctrl.running" ng-click="$ctrl.start()"> {{ $ctrl.cleared ? 'Start' : 'Resume' }} </button> <button class="button alert" ng-if="$ctrl.running" ng-click="$ctrl.pause()"> Pause </button> </div> </div> </div> ## Instruction: Disable timer start button when no time input ## Code After: <div class="time-container"> <div class="panel"> <at-clock cleared="$ctrl.cleared" running="$ctrl.running" time="$ctrl.time"> </at-clock> <div class="time-inputs"> <input type="number" class="time-input" placeholder="mm" ng-min="0" ng-model="$ctrl.minInput" ng-change="$ctrl.changeTime()"> <input type="number" class="time-input" placeholder="ss" ng-min="0" ng-max="59" ng-model="$ctrl.secInput" ng-change="$ctrl.changeTime()"> </div> <div class="time-controls "> <button class="button success" ng-if="!$ctrl.running" ng-disabled="$ctrl.secInput === undefined || $ctrl.minInput === undefined" ng-click="$ctrl.start()"> {{ $ctrl.cleared ? 'Start' : 'Resume' }} </button> <button class="button alert" ng-if="$ctrl.running" ng-click="$ctrl.pause()"> Pause </button> </div> </div> </div>
<div class="time-container"> <div class="panel"> <at-clock cleared="$ctrl.cleared" running="$ctrl.running" time="$ctrl.time"> </at-clock> <div class="time-inputs"> <input type="number" class="time-input" placeholder="mm" ng-min="0" ng-model="$ctrl.minInput" ng-change="$ctrl.changeTime()"> <input type="number" class="time-input" placeholder="ss" ng-min="0" ng-max="59" ng-model="$ctrl.secInput" ng-change="$ctrl.changeTime()"> </div> <div class="time-controls "> <button class="button success" ng-if="!$ctrl.running" + ng-disabled="$ctrl.secInput === undefined || $ctrl.minInput === undefined" ng-click="$ctrl.start()"> {{ $ctrl.cleared ? 'Start' : 'Resume' }} </button> <button class="button alert" ng-if="$ctrl.running" ng-click="$ctrl.pause()"> Pause </button> </div> </div> </div>
1
0.032258
1
0
8fb8f24536371ab2eebd0855158032265e4132a7
spec/active_record_spec_helper.rb
spec/active_record_spec_helper.rb
require 'spec_helper_lite' require 'faker' require 'yaml' require 'active_record' require 'factory_girl' require 'rack/test' require 'shoulda/matchers' require_relative './support/configure_transactions.rb' unless rails_loaded? $:.unshift File.expand_path '../../app/models', __FILE__ $:.unshift File.expand_path '../../app/uploaders', __FILE__ %w{ carrierwave i18n }.each do |name| require File.expand_path("#{File.dirname(__FILE__)}\ /../config/initializers/#{name}.rb") end connection_info = YAML.load_file("config/database.yml") ActiveRecord::Base.establish_connection(connection_info['test']) app_translations = Dir[ File.expand_path("#{File.dirname(__FILE__)}/../config/locales/*.yml") ] faker_root = Gem.loaded_specs['faker'].full_gem_path faker_translations = Dir[File.expand_path("#{File.join(faker_root, 'lib/locales/*.yml')}")] I18n.load_path << faker_translations I18n.load_path << app_translations require_relative './support/factory_girl.rb' Dir["#{File.dirname(__FILE__)}/factories/**/*.rb"].each { |f| require f } end
require 'spec_helper_lite' require 'faker' require 'yaml' require 'active_record' require 'factory_girl' require 'rack/test' require 'shoulda/matchers' require_relative './support/configure_transactions.rb' unless rails_loaded? $:.unshift File.expand_path '../../app/models', __FILE__ $:.unshift File.expand_path '../../app/uploaders', __FILE__ %w{ carrierwave i18n }.each do |name| require File.expand_path("#{File.dirname(__FILE__)}\ /../config/initializers/#{name}.rb") end connection_info = YAML.load(ERB.new(File.read("config/database.yml")).result) ActiveRecord::Base.establish_connection(connection_info['test']) app_translations = Dir[ File.expand_path("#{File.dirname(__FILE__)}/../config/locales/*.yml") ] faker_root = Gem.loaded_specs['faker'].full_gem_path faker_translations = Dir[File.expand_path("#{File.join(faker_root, 'lib/locales/*.yml')}")] I18n.load_path << faker_translations I18n.load_path << app_translations require_relative './support/factory_girl.rb' Dir["#{File.dirname(__FILE__)}/factories/**/*.rb"].each { |f| require f } end
Fix yaml erb parsing when Rails is not loaded
Fix yaml erb parsing when Rails is not loaded
Ruby
mit
zinedistro/zinedistro,zinedistro/zinedistro,zinedistro/zinedistro
ruby
## Code Before: require 'spec_helper_lite' require 'faker' require 'yaml' require 'active_record' require 'factory_girl' require 'rack/test' require 'shoulda/matchers' require_relative './support/configure_transactions.rb' unless rails_loaded? $:.unshift File.expand_path '../../app/models', __FILE__ $:.unshift File.expand_path '../../app/uploaders', __FILE__ %w{ carrierwave i18n }.each do |name| require File.expand_path("#{File.dirname(__FILE__)}\ /../config/initializers/#{name}.rb") end connection_info = YAML.load_file("config/database.yml") ActiveRecord::Base.establish_connection(connection_info['test']) app_translations = Dir[ File.expand_path("#{File.dirname(__FILE__)}/../config/locales/*.yml") ] faker_root = Gem.loaded_specs['faker'].full_gem_path faker_translations = Dir[File.expand_path("#{File.join(faker_root, 'lib/locales/*.yml')}")] I18n.load_path << faker_translations I18n.load_path << app_translations require_relative './support/factory_girl.rb' Dir["#{File.dirname(__FILE__)}/factories/**/*.rb"].each { |f| require f } end ## Instruction: Fix yaml erb parsing when Rails is not loaded ## Code After: require 'spec_helper_lite' require 'faker' require 'yaml' require 'active_record' require 'factory_girl' require 'rack/test' require 'shoulda/matchers' require_relative './support/configure_transactions.rb' unless rails_loaded? $:.unshift File.expand_path '../../app/models', __FILE__ $:.unshift File.expand_path '../../app/uploaders', __FILE__ %w{ carrierwave i18n }.each do |name| require File.expand_path("#{File.dirname(__FILE__)}\ /../config/initializers/#{name}.rb") end connection_info = YAML.load(ERB.new(File.read("config/database.yml")).result) ActiveRecord::Base.establish_connection(connection_info['test']) app_translations = Dir[ File.expand_path("#{File.dirname(__FILE__)}/../config/locales/*.yml") ] faker_root = Gem.loaded_specs['faker'].full_gem_path faker_translations = Dir[File.expand_path("#{File.join(faker_root, 'lib/locales/*.yml')}")] I18n.load_path << faker_translations I18n.load_path << app_translations require_relative './support/factory_girl.rb' Dir["#{File.dirname(__FILE__)}/factories/**/*.rb"].each { |f| require f } end
require 'spec_helper_lite' require 'faker' require 'yaml' require 'active_record' require 'factory_girl' require 'rack/test' require 'shoulda/matchers' require_relative './support/configure_transactions.rb' unless rails_loaded? $:.unshift File.expand_path '../../app/models', __FILE__ $:.unshift File.expand_path '../../app/uploaders', __FILE__ %w{ carrierwave i18n }.each do |name| require File.expand_path("#{File.dirname(__FILE__)}\ /../config/initializers/#{name}.rb") end - connection_info = YAML.load_file("config/database.yml") ? ^^ + connection_info = YAML.load(ERB.new(File.read("config/database.yml")).result) ? ^^^^^^^^^^ +++++ +++++++++ ActiveRecord::Base.establish_connection(connection_info['test']) app_translations = Dir[ File.expand_path("#{File.dirname(__FILE__)}/../config/locales/*.yml") ] faker_root = Gem.loaded_specs['faker'].full_gem_path faker_translations = Dir[File.expand_path("#{File.join(faker_root, 'lib/locales/*.yml')}")] I18n.load_path << faker_translations I18n.load_path << app_translations require_relative './support/factory_girl.rb' Dir["#{File.dirname(__FILE__)}/factories/**/*.rb"].each { |f| require f } end
2
0.055556
1
1
bf24ebb97868f99ae9aafd2c320490e0bc90c987
test/unit/edu/northwestern/bioinformatics/studycalendar/testing/StudyCalendarTestCase.java
test/unit/edu/northwestern/bioinformatics/studycalendar/testing/StudyCalendarTestCase.java
package edu.northwestern.bioinformatics.studycalendar.testing; import junit.framework.TestCase; import java.lang.reflect.Method; import java.util.Set; import java.util.HashSet; import org.easymock.classextension.EasyMock; /** * @author Rhett Sutphin */ public abstract class StudyCalendarTestCase extends TestCase { protected Set<Object> mocks = new HashSet<Object>(); ////// MOCK REGISTRATION AND HANDLING protected <T> T registerMockFor(Class<T> forClass) { return registered(EasyMock.createMock(forClass)); } protected <T> T registerMockFor(Class<T> forClass, Method[] methodsToMock) { return registered(EasyMock.createMock(forClass, methodsToMock)); } protected void replayMocks() { for (Object mock : mocks) EasyMock.replay(mock); } protected void verifyMocks() { for (Object mock : mocks) EasyMock.verify(mock); } protected void resetMocks() { for (Object mock : mocks) EasyMock.reset(mock); } private <T> T registered(T mock) { mocks.add(mock); return mock; } }
package edu.northwestern.bioinformatics.studycalendar.testing; import edu.nwu.bioinformatics.commons.testing.CoreTestCase; import junit.framework.TestCase; import java.lang.reflect.Method; import java.util.Set; import java.util.HashSet; import org.easymock.classextension.EasyMock; /** * @author Rhett Sutphin */ public abstract class StudyCalendarTestCase extends CoreTestCase { protected Set<Object> mocks = new HashSet<Object>(); ////// MOCK REGISTRATION AND HANDLING protected <T> T registerMockFor(Class<T> forClass) { return registered(EasyMock.createMock(forClass)); } protected <T> T registerMockFor(Class<T> forClass, Method[] methodsToMock) { return registered(EasyMock.createMock(forClass, methodsToMock)); } protected void replayMocks() { for (Object mock : mocks) EasyMock.replay(mock); } protected void verifyMocks() { for (Object mock : mocks) EasyMock.verify(mock); } protected void resetMocks() { for (Object mock : mocks) EasyMock.reset(mock); } private <T> T registered(T mock) { mocks.add(mock); return mock; } }
Extend CoreTestCase for access to assertPositve/Negative, others
Extend CoreTestCase for access to assertPositve/Negative, others
Java
bsd-3-clause
NCIP/psc,NCIP/psc,NCIP/psc,NCIP/psc
java
## Code Before: package edu.northwestern.bioinformatics.studycalendar.testing; import junit.framework.TestCase; import java.lang.reflect.Method; import java.util.Set; import java.util.HashSet; import org.easymock.classextension.EasyMock; /** * @author Rhett Sutphin */ public abstract class StudyCalendarTestCase extends TestCase { protected Set<Object> mocks = new HashSet<Object>(); ////// MOCK REGISTRATION AND HANDLING protected <T> T registerMockFor(Class<T> forClass) { return registered(EasyMock.createMock(forClass)); } protected <T> T registerMockFor(Class<T> forClass, Method[] methodsToMock) { return registered(EasyMock.createMock(forClass, methodsToMock)); } protected void replayMocks() { for (Object mock : mocks) EasyMock.replay(mock); } protected void verifyMocks() { for (Object mock : mocks) EasyMock.verify(mock); } protected void resetMocks() { for (Object mock : mocks) EasyMock.reset(mock); } private <T> T registered(T mock) { mocks.add(mock); return mock; } } ## Instruction: Extend CoreTestCase for access to assertPositve/Negative, others ## Code After: package edu.northwestern.bioinformatics.studycalendar.testing; import edu.nwu.bioinformatics.commons.testing.CoreTestCase; import junit.framework.TestCase; import java.lang.reflect.Method; import java.util.Set; import java.util.HashSet; import org.easymock.classextension.EasyMock; /** * @author Rhett Sutphin */ public abstract class StudyCalendarTestCase extends CoreTestCase { protected Set<Object> mocks = new HashSet<Object>(); ////// MOCK REGISTRATION AND HANDLING protected <T> T registerMockFor(Class<T> forClass) { return registered(EasyMock.createMock(forClass)); } protected <T> T registerMockFor(Class<T> forClass, Method[] methodsToMock) { return registered(EasyMock.createMock(forClass, methodsToMock)); } protected void replayMocks() { for (Object mock : mocks) EasyMock.replay(mock); } protected void verifyMocks() { for (Object mock : mocks) EasyMock.verify(mock); } protected void resetMocks() { for (Object mock : mocks) EasyMock.reset(mock); } private <T> T registered(T mock) { mocks.add(mock); return mock; } }
package edu.northwestern.bioinformatics.studycalendar.testing; + + import edu.nwu.bioinformatics.commons.testing.CoreTestCase; import junit.framework.TestCase; import java.lang.reflect.Method; import java.util.Set; import java.util.HashSet; import org.easymock.classextension.EasyMock; /** * @author Rhett Sutphin */ - public abstract class StudyCalendarTestCase extends TestCase { + public abstract class StudyCalendarTestCase extends CoreTestCase { ? ++++ protected Set<Object> mocks = new HashSet<Object>(); ////// MOCK REGISTRATION AND HANDLING protected <T> T registerMockFor(Class<T> forClass) { return registered(EasyMock.createMock(forClass)); } protected <T> T registerMockFor(Class<T> forClass, Method[] methodsToMock) { return registered(EasyMock.createMock(forClass, methodsToMock)); } protected void replayMocks() { for (Object mock : mocks) EasyMock.replay(mock); } protected void verifyMocks() { for (Object mock : mocks) EasyMock.verify(mock); } protected void resetMocks() { for (Object mock : mocks) EasyMock.reset(mock); } private <T> T registered(T mock) { mocks.add(mock); return mock; } }
4
0.093023
3
1
ffbae06de07966a6f0d1e9290dfa8cddcf487398
.travis.yml
.travis.yml
language: java install: true script: mvn --settings settings.xml test -Dgwt.validateOnly -Darquillian.jboss.home=/dev/null jdk: - openjdk6 - openjdk7 - oraclejdk7 - oraclejdk8 matrix: fast_finish: true allow_failures: - jdk: oraclejdk8
language: java install: true script: mvn --batch-mode --settings settings.xml test -Dgwt.validateOnly -Darquillian.jboss.home=/dev/null jdk: - openjdk6 - openjdk7 - oraclejdk7 - oraclejdk8 matrix: fast_finish: true allow_failures: - jdk: oraclejdk8
Configure Travis to run Maven in batch mode
Configure Travis to run Maven in batch mode
YAML
lgpl-2.1
zanata/zanata-platform,zanata/zanata-platform,zanata/zanata-platform,zanata/zanata-platform,zanata/zanata-platform,zanata/zanata-platform,zanata/zanata-platform
yaml
## Code Before: language: java install: true script: mvn --settings settings.xml test -Dgwt.validateOnly -Darquillian.jboss.home=/dev/null jdk: - openjdk6 - openjdk7 - oraclejdk7 - oraclejdk8 matrix: fast_finish: true allow_failures: - jdk: oraclejdk8 ## Instruction: Configure Travis to run Maven in batch mode ## Code After: language: java install: true script: mvn --batch-mode --settings settings.xml test -Dgwt.validateOnly -Darquillian.jboss.home=/dev/null jdk: - openjdk6 - openjdk7 - oraclejdk7 - oraclejdk8 matrix: fast_finish: true allow_failures: - jdk: oraclejdk8
language: java install: true - script: mvn --settings settings.xml test -Dgwt.validateOnly -Darquillian.jboss.home=/dev/null + script: mvn --batch-mode --settings settings.xml test -Dgwt.validateOnly -Darquillian.jboss.home=/dev/null ? +++++++++++++ jdk: - openjdk6 - openjdk7 - oraclejdk7 - oraclejdk8 matrix: fast_finish: true allow_failures: - jdk: oraclejdk8
2
0.153846
1
1
586b232cc3d99edaf56303025f93aee7f8edaf2e
lib/trailz-db/map/parks.js
lib/trailz-db/map/parks.js
/* @flow */ import { Parks } from "trailz"; import { fromJson as parkFromJson, Json as ParkJson } from "./park"; export type Json = Array<ParkJson>; export function fromJson(json: Json): Parks { var parks = []; json.map(parkFromJson) .forEach((el) => { if (el.success === 1) { parks.push(el.result); } }); return parks; }
/* @flow */ import { Parks } from "trailz"; import { fromJson as parkFromJson, Json as ParkJson } from "./park"; export type Json = Array<ParkJson>; export function fromJson(json: Json): Parks { return json.map(parkFromJson) .filter(result => result.success === 1) .map(result => result.result); }
Replace imperative `forEach` with `map`/`filter`
Replace imperative `forEach` with `map`/`filter`
JavaScript
mit
tekerson/trailz,tekerson/trailz
javascript
## Code Before: /* @flow */ import { Parks } from "trailz"; import { fromJson as parkFromJson, Json as ParkJson } from "./park"; export type Json = Array<ParkJson>; export function fromJson(json: Json): Parks { var parks = []; json.map(parkFromJson) .forEach((el) => { if (el.success === 1) { parks.push(el.result); } }); return parks; } ## Instruction: Replace imperative `forEach` with `map`/`filter` ## Code After: /* @flow */ import { Parks } from "trailz"; import { fromJson as parkFromJson, Json as ParkJson } from "./park"; export type Json = Array<ParkJson>; export function fromJson(json: Json): Parks { return json.map(parkFromJson) .filter(result => result.success === 1) .map(result => result.result); }
/* @flow */ import { Parks } from "trailz"; import { fromJson as parkFromJson, Json as ParkJson } from "./park"; export type Json = Array<ParkJson>; export function fromJson(json: Json): Parks { - var parks = []; - json.map(parkFromJson) + return json.map(parkFromJson) ? +++++++ + .filter(result => result.success === 1) + .map(result => result.result); - .forEach((el) => { - if (el.success === 1) { - parks.push(el.result); - } - }); - return parks; }
11
0.647059
3
8
e5ed628534255f6ea3dc473a51d7b3556dcf8cf1
source/js/txt.wav.js
source/js/txt.wav.js
(function() { var textWaveElements = document.getElementsByClassName('txtwav'); for (var i = 0, length = textWaveElements.length; i < length; i++) { var el = textWaveElements[i]; var text = el.textContent.trim(); el.innerHTML = null; spanWrapHelper(el, text); } function spanWrapHelper(el, text) { for(var i in text) { if(text[i] === " ") { var span = document.createElement('span'); span.innerHTML = "&nbsp;"; el.appendChild(span); } else { var span = document.createElement('span'); span.innerHTML = text[i]; el.appendChild(span); } } } })();
(function() { var textWaveElements = document.getElementsByClassName('txtwav'); for (var i = 0, length = textWaveElements.length; i < length; i++) { var el = textWaveElements[i], text = el.textContent.trim(); el.innerHTML = null; spanWrapHelper(el, text); } function spanWrapHelper(el, text) { for(var i in text) { var span = document.createElement('span'); span.innerHTML = text[i] === " " ? "&nbsp;" : text[i]; el.appendChild(span); } } })();
Remove repetition in helper function
Remove repetition in helper function
JavaScript
mit
still-life-studio/txt.wav
javascript
## Code Before: (function() { var textWaveElements = document.getElementsByClassName('txtwav'); for (var i = 0, length = textWaveElements.length; i < length; i++) { var el = textWaveElements[i]; var text = el.textContent.trim(); el.innerHTML = null; spanWrapHelper(el, text); } function spanWrapHelper(el, text) { for(var i in text) { if(text[i] === " ") { var span = document.createElement('span'); span.innerHTML = "&nbsp;"; el.appendChild(span); } else { var span = document.createElement('span'); span.innerHTML = text[i]; el.appendChild(span); } } } })(); ## Instruction: Remove repetition in helper function ## Code After: (function() { var textWaveElements = document.getElementsByClassName('txtwav'); for (var i = 0, length = textWaveElements.length; i < length; i++) { var el = textWaveElements[i], text = el.textContent.trim(); el.innerHTML = null; spanWrapHelper(el, text); } function spanWrapHelper(el, text) { for(var i in text) { var span = document.createElement('span'); span.innerHTML = text[i] === " " ? "&nbsp;" : text[i]; el.appendChild(span); } } })();
(function() { var textWaveElements = document.getElementsByClassName('txtwav'); for (var i = 0, length = textWaveElements.length; i < length; i++) { - var el = textWaveElements[i]; ? ^ + var el = textWaveElements[i], ? ^ - var text = el.textContent.trim(); ? ^^^ + text = el.textContent.trim(); ? ^ el.innerHTML = null; spanWrapHelper(el, text); } function spanWrapHelper(el, text) { for(var i in text) { - if(text[i] === " ") { - var span = document.createElement('span'); ? -- + var span = document.createElement('span'); - span.innerHTML = "&nbsp;"; + span.innerHTML = text[i] === " " ? "&nbsp;" : text[i]; - el.appendChild(span); ? -- + el.appendChild(span); - } else { - var span = document.createElement('span'); - span.innerHTML = text[i]; - el.appendChild(span); - } } } })();
16
0.64
5
11
d099f289d5c5d1f383f75a7f4f49310e23ebf272
ci/tasks/upload-acceptance-test-release.yml
ci/tasks/upload-acceptance-test-release.yml
--- image_resource: type: docker-image source: repository: c2cnetworking/deploy tag: latest platform: linux inputs: - name: env-repo - name: cf-networking-dev - name: cf-deployment-concourse-tasks run: path: cf-networking-release-ci/ci/tasks/upload-acceptance-test-release params: BBL_STATE_DIR:
--- image_resource: type: docker-image source: repository: c2cnetworking/deploy tag: latest platform: linux inputs: - name: cf-deployment-concourse-tasks - name: cf-networking-dev - name: cf-networking-release-ci - name: env-repo run: path: cf-networking-release-ci/ci/tasks/upload-acceptance-test-release params: BBL_STATE_DIR:
Add ci resource to task
Add ci resource to task [#131846249] Signed-off-by: Amelia Downs <3da6d4986e923696b3a0bfb6f5a9291799608f85@pivotal.io>
YAML
apache-2.0
cloudfoundry-incubator/cf-networking-release,cloudfoundry-incubator/cf-networking-release,cloudfoundry-incubator/cf-networking-release,cloudfoundry-incubator/cf-networking-release
yaml
## Code Before: --- image_resource: type: docker-image source: repository: c2cnetworking/deploy tag: latest platform: linux inputs: - name: env-repo - name: cf-networking-dev - name: cf-deployment-concourse-tasks run: path: cf-networking-release-ci/ci/tasks/upload-acceptance-test-release params: BBL_STATE_DIR: ## Instruction: Add ci resource to task [#131846249] Signed-off-by: Amelia Downs <3da6d4986e923696b3a0bfb6f5a9291799608f85@pivotal.io> ## Code After: --- image_resource: type: docker-image source: repository: c2cnetworking/deploy tag: latest platform: linux inputs: - name: cf-deployment-concourse-tasks - name: cf-networking-dev - name: cf-networking-release-ci - name: env-repo run: path: cf-networking-release-ci/ci/tasks/upload-acceptance-test-release params: BBL_STATE_DIR:
--- image_resource: type: docker-image source: repository: c2cnetworking/deploy tag: latest platform: linux inputs: + - name: cf-deployment-concourse-tasks + - name: cf-networking-dev + - name: cf-networking-release-ci - name: env-repo - - name: cf-networking-dev - - name: cf-deployment-concourse-tasks run: path: cf-networking-release-ci/ci/tasks/upload-acceptance-test-release params: BBL_STATE_DIR:
5
0.263158
3
2
00d18e7c4cfe7e8dea32bcbeaeec189c5460ef02
workstation_setup/10_install_pyqt.sh
workstation_setup/10_install_pyqt.sh
pyqt_rel='5.11.3' apt-get install -y checkinstall libreadline-gplv2-dev libncursesw5-dev \ libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \ libbz2-dev swig liblapack-dev libdbus-1-3 libglu1-mesa-dev cd ~/Downloads wget "https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-$pyqt_rel/PyQt5_gpl-$pyqt_rel.tar.gz" tar xzf "PyQt5_gpl-$pyqt_rel.tar.gz" cd ~/Downloads cd "PyQt5_gpl-$pyqt_rel"/ mkdir -p "/opt/Qt/$pyqt_rel/gcc_64/plugins/PyQt5" python-sirius configure.py --"qmake=/opt/Qt/$pyqt_rel/gcc_64/bin/qmake" \ --sip-incdir=/usr/include/python3.6m \ --"designer-plugindir=/opt/Qt/$pyqt_rel/gcc_64/plugins/designer" \ --"qml-plugindir=/opt/Qt/$pyqt_rel/gcc_64/plugins/PyQt5" \ --confirm-license \ --assume-shared \ --verbose make -j32 sudo make install
pyqt_rel='5.11.3' apt-get install -y checkinstall libreadline-gplv2-dev libncursesw5-dev \ libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \ libbz2-dev swig liblapack-dev libdbus-1-3 libglu1-mesa-dev # cd ~/Downloads wget "https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-$pyqt_rel/PyQt5_gpl-$pyqt_rel.tar.gz" tar xzf "PyQt5_gpl-$pyqt_rel.tar.gz" # cd ~/Downloads cd "PyQt5_gpl-$pyqt_rel"/ mkdir -p "/opt/Qt/$pyqt_rel/gcc_64/plugins/PyQt5" python-sirius configure.py --"qmake=/opt/Qt/$pyqt_rel/gcc_64/bin/qmake" \ --sip-incdir=/usr/include/python3.6m \ --"designer-plugindir=/opt/Qt/$pyqt_rel/gcc_64/plugins/designer" \ --"qml-plugindir=/opt/Qt/$pyqt_rel/gcc_64/plugins/PyQt5" \ --confirm-license \ --assume-shared \ --verbose make -j32 sudo make install cd .. rm -rf "PyQt5_gpl-$pyqt_rel.tar.gz" "PyQt5_gpl-$pyqt_rel"
Remove installation files and folders
Remove installation files and folders
Shell
mit
lnls-fac/scripts,lnls-fac/scripts
shell
## Code Before: pyqt_rel='5.11.3' apt-get install -y checkinstall libreadline-gplv2-dev libncursesw5-dev \ libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \ libbz2-dev swig liblapack-dev libdbus-1-3 libglu1-mesa-dev cd ~/Downloads wget "https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-$pyqt_rel/PyQt5_gpl-$pyqt_rel.tar.gz" tar xzf "PyQt5_gpl-$pyqt_rel.tar.gz" cd ~/Downloads cd "PyQt5_gpl-$pyqt_rel"/ mkdir -p "/opt/Qt/$pyqt_rel/gcc_64/plugins/PyQt5" python-sirius configure.py --"qmake=/opt/Qt/$pyqt_rel/gcc_64/bin/qmake" \ --sip-incdir=/usr/include/python3.6m \ --"designer-plugindir=/opt/Qt/$pyqt_rel/gcc_64/plugins/designer" \ --"qml-plugindir=/opt/Qt/$pyqt_rel/gcc_64/plugins/PyQt5" \ --confirm-license \ --assume-shared \ --verbose make -j32 sudo make install ## Instruction: Remove installation files and folders ## Code After: pyqt_rel='5.11.3' apt-get install -y checkinstall libreadline-gplv2-dev libncursesw5-dev \ libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \ libbz2-dev swig liblapack-dev libdbus-1-3 libglu1-mesa-dev # cd ~/Downloads wget "https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-$pyqt_rel/PyQt5_gpl-$pyqt_rel.tar.gz" tar xzf "PyQt5_gpl-$pyqt_rel.tar.gz" # cd ~/Downloads cd "PyQt5_gpl-$pyqt_rel"/ mkdir -p "/opt/Qt/$pyqt_rel/gcc_64/plugins/PyQt5" python-sirius configure.py --"qmake=/opt/Qt/$pyqt_rel/gcc_64/bin/qmake" \ --sip-incdir=/usr/include/python3.6m \ --"designer-plugindir=/opt/Qt/$pyqt_rel/gcc_64/plugins/designer" \ --"qml-plugindir=/opt/Qt/$pyqt_rel/gcc_64/plugins/PyQt5" \ --confirm-license \ --assume-shared \ --verbose make -j32 sudo make install cd .. rm -rf "PyQt5_gpl-$pyqt_rel.tar.gz" "PyQt5_gpl-$pyqt_rel"
pyqt_rel='5.11.3' apt-get install -y checkinstall libreadline-gplv2-dev libncursesw5-dev \ libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \ libbz2-dev swig liblapack-dev libdbus-1-3 libglu1-mesa-dev - cd ~/Downloads + # cd ~/Downloads ? ++ wget "https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-$pyqt_rel/PyQt5_gpl-$pyqt_rel.tar.gz" tar xzf "PyQt5_gpl-$pyqt_rel.tar.gz" - cd ~/Downloads + # cd ~/Downloads ? ++ cd "PyQt5_gpl-$pyqt_rel"/ mkdir -p "/opt/Qt/$pyqt_rel/gcc_64/plugins/PyQt5" python-sirius configure.py --"qmake=/opt/Qt/$pyqt_rel/gcc_64/bin/qmake" \ --sip-incdir=/usr/include/python3.6m \ --"designer-plugindir=/opt/Qt/$pyqt_rel/gcc_64/plugins/designer" \ --"qml-plugindir=/opt/Qt/$pyqt_rel/gcc_64/plugins/PyQt5" \ --confirm-license \ --assume-shared \ --verbose make -j32 sudo make install + + cd .. + rm -rf "PyQt5_gpl-$pyqt_rel.tar.gz" "PyQt5_gpl-$pyqt_rel" +
8
0.363636
6
2
38f01fbf3e4f0c40cf5071ea7c62294dff96b4f6
papillon.js
papillon.js
import State from './src/State'; import Observer from './src/Observer'; export { State, Observer };
export { default as State } from './src/State'; export { default as Observer } from './src/Observer';
IMPROVE change re-export to proper es6 syntax
IMPROVE change re-export to proper es6 syntax
JavaScript
mit
smalluban/papillon
javascript
## Code Before: import State from './src/State'; import Observer from './src/Observer'; export { State, Observer }; ## Instruction: IMPROVE change re-export to proper es6 syntax ## Code After: export { default as State } from './src/State'; export { default as Observer } from './src/Observer';
- import State from './src/State'; ? ^^ + export { default as State } from './src/State'; ? ^^ +++++++++++++ ++ - import Observer from './src/Observer'; ? ^^ + export { default as Observer } from './src/Observer'; ? ^^ +++++++++++++ ++ - export { - State, - Observer - };
8
1.142857
2
6
bf6a3788d114fb143579505837089bb100b830c6
app/views/posts/_show_article.html.slim
app/views/posts/_show_article.html.slim
article data-cable-post-id=post.id header h1.display-4 = post.title p.text-muted | Updated ' = time_tag(post.updated_at) .row .col-sm-10 == post.content - if post.clips.present? .row.no-gutters - post.clips.each do |clip| .col-2 .mb-2.mr-2 = image_tag clip.image_url(:thumbnail), class: 'img-thumbnail' - if post.copyright.present? hr .small.text-muted == post.copyright .col-sm-2 = link_to post_path(post, format: 'pdf'), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Export Post as PDF' do = icon('file-pdf-o fa-fw') = link_to edit_post_path(post), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Edit Post' do = icon('pencil') = link_to post, method: :delete, class: 'btn btn-danger btn-block', data: { toggle: 'tooltip', placement: 'right', confirm: 'Are you sure?' }, role: 'button', title: 'Delete Post' do = icon('trash')
article data-cable-post-id=post.id header h1.display-4 = post.title p.text-muted | Updated ' = time_tag(post.updated_at) .row .col-sm-10 == post.content - if post.clips.present? .row.no-gutters - post.clips.each do |clip| .col-2 .mb-2.mr-2 = image_tag clip.image_url(:thumbnail, expires_in: 1.day), class: 'img-thumbnail' - if post.copyright.present? hr .small.text-muted == post.copyright .col-sm-2 = link_to post_path(post, format: 'pdf'), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Export Post as PDF' do = icon('file-pdf-o fa-fw') = link_to edit_post_path(post), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Edit Post' do = icon('pencil') = link_to post, method: :delete, class: 'btn btn-danger btn-block', data: { toggle: 'tooltip', placement: 'right', confirm: 'Are you sure?' }, role: 'button', title: 'Delete Post' do = icon('trash')
Fix expiring image on S3
:bug: Fix expiring image on S3
Slim
mit
ledermann/docker-rails,ledermann/docker-rails,ledermann/docker-rails,ledermann/docker-rails
slim
## Code Before: article data-cable-post-id=post.id header h1.display-4 = post.title p.text-muted | Updated ' = time_tag(post.updated_at) .row .col-sm-10 == post.content - if post.clips.present? .row.no-gutters - post.clips.each do |clip| .col-2 .mb-2.mr-2 = image_tag clip.image_url(:thumbnail), class: 'img-thumbnail' - if post.copyright.present? hr .small.text-muted == post.copyright .col-sm-2 = link_to post_path(post, format: 'pdf'), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Export Post as PDF' do = icon('file-pdf-o fa-fw') = link_to edit_post_path(post), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Edit Post' do = icon('pencil') = link_to post, method: :delete, class: 'btn btn-danger btn-block', data: { toggle: 'tooltip', placement: 'right', confirm: 'Are you sure?' }, role: 'button', title: 'Delete Post' do = icon('trash') ## Instruction: :bug: Fix expiring image on S3 ## Code After: article data-cable-post-id=post.id header h1.display-4 = post.title p.text-muted | Updated ' = time_tag(post.updated_at) .row .col-sm-10 == post.content - if post.clips.present? .row.no-gutters - post.clips.each do |clip| .col-2 .mb-2.mr-2 = image_tag clip.image_url(:thumbnail, expires_in: 1.day), class: 'img-thumbnail' - if post.copyright.present? hr .small.text-muted == post.copyright .col-sm-2 = link_to post_path(post, format: 'pdf'), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Export Post as PDF' do = icon('file-pdf-o fa-fw') = link_to edit_post_path(post), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Edit Post' do = icon('pencil') = link_to post, method: :delete, class: 'btn btn-danger btn-block', data: { toggle: 'tooltip', placement: 'right', confirm: 'Are you sure?' }, role: 'button', title: 'Delete Post' do = icon('trash')
article data-cable-post-id=post.id header h1.display-4 = post.title p.text-muted | Updated ' = time_tag(post.updated_at) .row .col-sm-10 == post.content - if post.clips.present? .row.no-gutters - post.clips.each do |clip| .col-2 .mb-2.mr-2 - = image_tag clip.image_url(:thumbnail), class: 'img-thumbnail' + = image_tag clip.image_url(:thumbnail, expires_in: 1.day), class: 'img-thumbnail' ? +++++++++++++++++++ - if post.copyright.present? hr .small.text-muted == post.copyright .col-sm-2 = link_to post_path(post, format: 'pdf'), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Export Post as PDF' do = icon('file-pdf-o fa-fw') = link_to edit_post_path(post), class: 'btn btn-secondary btn-block', data: { toggle: 'tooltip', placement: 'right' }, title: 'Edit Post' do = icon('pencil') = link_to post, method: :delete, class: 'btn btn-danger btn-block', data: { toggle: 'tooltip', placement: 'right', confirm: 'Are you sure?' }, role: 'button', title: 'Delete Post' do = icon('trash')
2
0.057143
1
1
ed3bc448cf3d9d9c4562df0d9dbe20de01e5f104
setup.py
setup.py
from setuptools import setup setup( name='beets-alternatives', version='0.8.3-dev', description='beets plugin to manage multiple files', long_description=open('README.md').read(), author='Thomas Scholtes', author_email='thomas-scholtes@gmx.de', url='http://www.github.com/geigerzaehler/beets-alternatives', license='MIT', platforms='ALL', test_suite='test', packages=['beetsplug'], install_requires=[ 'beets>=1.4.7', 'futures', ], classifiers=[ 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Sound/Audio :: Players :: MP3', 'License :: OSI Approved :: MIT License', 'Environment :: Console', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ], )
from setuptools import setup setup( name='beets-alternatives', version='0.8.3-dev', description='beets plugin to manage multiple files', long_description=open('README.md').read(), author='Thomas Scholtes', author_email='thomas-scholtes@gmx.de', url='http://www.github.com/geigerzaehler/beets-alternatives', license='MIT', platforms='ALL', test_suite='test', packages=['beetsplug'], install_requires=[ 'beets>=1.4.7', 'futures; python_version<"3"', ], classifiers=[ 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Sound/Audio :: Players :: MP3', 'License :: OSI Approved :: MIT License', 'Environment :: Console', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], )
Update classifiers; conditionally require `futures` on Python 2
Update classifiers; conditionally require `futures` on Python 2 The `concurrent` library is part of Python 3 stdlib, by requiring futures we would fetch the old py2 version which causes syntax errors on py3.
Python
mit
geigerzaehler/beets-alternatives
python
## Code Before: from setuptools import setup setup( name='beets-alternatives', version='0.8.3-dev', description='beets plugin to manage multiple files', long_description=open('README.md').read(), author='Thomas Scholtes', author_email='thomas-scholtes@gmx.de', url='http://www.github.com/geigerzaehler/beets-alternatives', license='MIT', platforms='ALL', test_suite='test', packages=['beetsplug'], install_requires=[ 'beets>=1.4.7', 'futures', ], classifiers=[ 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Sound/Audio :: Players :: MP3', 'License :: OSI Approved :: MIT License', 'Environment :: Console', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', ], ) ## Instruction: Update classifiers; conditionally require `futures` on Python 2 The `concurrent` library is part of Python 3 stdlib, by requiring futures we would fetch the old py2 version which causes syntax errors on py3. ## Code After: from setuptools import setup setup( name='beets-alternatives', version='0.8.3-dev', description='beets plugin to manage multiple files', long_description=open('README.md').read(), author='Thomas Scholtes', author_email='thomas-scholtes@gmx.de', url='http://www.github.com/geigerzaehler/beets-alternatives', license='MIT', platforms='ALL', test_suite='test', packages=['beetsplug'], install_requires=[ 'beets>=1.4.7', 'futures; python_version<"3"', ], classifiers=[ 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Sound/Audio :: Players :: MP3', 'License :: OSI Approved :: MIT License', 'Environment :: Console', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', ], )
from setuptools import setup setup( name='beets-alternatives', version='0.8.3-dev', description='beets plugin to manage multiple files', long_description=open('README.md').read(), author='Thomas Scholtes', author_email='thomas-scholtes@gmx.de', url='http://www.github.com/geigerzaehler/beets-alternatives', license='MIT', platforms='ALL', test_suite='test', packages=['beetsplug'], install_requires=[ 'beets>=1.4.7', - 'futures', + 'futures; python_version<"3"', ], classifiers=[ 'Topic :: Multimedia :: Sound/Audio', 'Topic :: Multimedia :: Sound/Audio :: Players :: MP3', 'License :: OSI Approved :: MIT License', 'Environment :: Console', 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ], )
8
0.25
6
2
48870c0eb7f484e09bd4859ce1cbe6dc8d0f361f
.travis_build.sh
.travis_build.sh
echo "Generating googletest libraly" clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -isystem tests/googletest/googletest/ -c -o tests/gtest-all.o tests/googletest/googletest/src/gtest-all.cc echo "Done compiling gtest-all.cc" ar -rv tests/libgtest.a tests/gtest-all.o echo "Done archiving gtest-all.o" echo "Compiling sources..." clang++ -std=c++1y -pthread -g -Wall -Wextra -I/usr/local/include -c -o tests/kmosaic.o sources/kmosaic.cpp echo "Done compiling kmosaic.cpp" echo "Compiling unit tests..." clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -c -o tests/main.o tests/main.cpp echo "Done compiling main.cpp" clang++ -std=c++1y -pthread -g -Wall -Wextra -I/usr/local/include -isystem tests/googletest/googletest/include -c -o tests/kmosaic_test.o tests/kmosaic_test.cpp echo "Done compiling kmosaic_test.cpp" clang++ -std=c++1y -g -Wall -Wextra -o tests/gtest tests/kmosaic.o tests/main.o tests/kmosaic_test.o -pthread -Ltests/ -L/usr/local/lib -lgtest -lopencv_highgui -lopencv_core -lopencv_imgproc echo "Running unit tests..." tests/gtest -v result=$? rm -r tests/gtest tests/kmosaic.o tests/main.o tests/kmosaic_test.o tests/gtest-all.o tests/libgtest.a echo "Unit tests completed : $result" exit $result
echo "Generating googletest library" clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -isystem tests/googletest/googletest/ -c -o tests/gtest-all.o tests/googletest/googletest/src/gtest-all.cc ar -rv tests/libgtest.a tests/gtest-all.o echo "Compiling sources..." cd tests make echo "Running unit tests..." ./gtest -v cd ../ result=$? rm -r tests/gtest tests/kmosaic.o tests/main.o tests/kmosaic_test.o tests/gtest-all.o tests/libgtest.a echo "Unit tests completed : $result" exit $result
Improve setting file for Travis-CI.
Improve setting file for Travis-CI.
Shell
mit
kagemiku/KMosaic,kagemiku/KMosaic
shell
## Code Before: echo "Generating googletest libraly" clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -isystem tests/googletest/googletest/ -c -o tests/gtest-all.o tests/googletest/googletest/src/gtest-all.cc echo "Done compiling gtest-all.cc" ar -rv tests/libgtest.a tests/gtest-all.o echo "Done archiving gtest-all.o" echo "Compiling sources..." clang++ -std=c++1y -pthread -g -Wall -Wextra -I/usr/local/include -c -o tests/kmosaic.o sources/kmosaic.cpp echo "Done compiling kmosaic.cpp" echo "Compiling unit tests..." clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -c -o tests/main.o tests/main.cpp echo "Done compiling main.cpp" clang++ -std=c++1y -pthread -g -Wall -Wextra -I/usr/local/include -isystem tests/googletest/googletest/include -c -o tests/kmosaic_test.o tests/kmosaic_test.cpp echo "Done compiling kmosaic_test.cpp" clang++ -std=c++1y -g -Wall -Wextra -o tests/gtest tests/kmosaic.o tests/main.o tests/kmosaic_test.o -pthread -Ltests/ -L/usr/local/lib -lgtest -lopencv_highgui -lopencv_core -lopencv_imgproc echo "Running unit tests..." tests/gtest -v result=$? rm -r tests/gtest tests/kmosaic.o tests/main.o tests/kmosaic_test.o tests/gtest-all.o tests/libgtest.a echo "Unit tests completed : $result" exit $result ## Instruction: Improve setting file for Travis-CI. ## Code After: echo "Generating googletest library" clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -isystem tests/googletest/googletest/ -c -o tests/gtest-all.o tests/googletest/googletest/src/gtest-all.cc ar -rv tests/libgtest.a tests/gtest-all.o echo "Compiling sources..." cd tests make echo "Running unit tests..." ./gtest -v cd ../ result=$? rm -r tests/gtest tests/kmosaic.o tests/main.o tests/kmosaic_test.o tests/gtest-all.o tests/libgtest.a echo "Unit tests completed : $result" exit $result
- echo "Generating googletest libraly" ? ^ + echo "Generating googletest library" ? ^ clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -isystem tests/googletest/googletest/ -c -o tests/gtest-all.o tests/googletest/googletest/src/gtest-all.cc - echo "Done compiling gtest-all.cc" ar -rv tests/libgtest.a tests/gtest-all.o - echo "Done archiving gtest-all.o" echo "Compiling sources..." + cd tests + make - clang++ -std=c++1y -pthread -g -Wall -Wextra -I/usr/local/include -c -o tests/kmosaic.o sources/kmosaic.cpp - echo "Done compiling kmosaic.cpp" - echo "Compiling unit tests..." - clang++ -std=c++1y -pthread -g -Wall -Wextra -isystem tests/googletest/googletest/include -c -o tests/main.o tests/main.cpp - echo "Done compiling main.cpp" - clang++ -std=c++1y -pthread -g -Wall -Wextra -I/usr/local/include -isystem tests/googletest/googletest/include -c -o tests/kmosaic_test.o tests/kmosaic_test.cpp - echo "Done compiling kmosaic_test.cpp" - clang++ -std=c++1y -g -Wall -Wextra -o tests/gtest tests/kmosaic.o tests/main.o tests/kmosaic_test.o -pthread -Ltests/ -L/usr/local/lib -lgtest -lopencv_highgui -lopencv_core -lopencv_imgproc echo "Running unit tests..." - tests/gtest -v ? ^^^^^ + ./gtest -v ? ^ + cd ../ result=$? rm -r tests/gtest tests/kmosaic.o tests/main.o tests/kmosaic_test.o tests/gtest-all.o tests/libgtest.a echo "Unit tests completed : $result" exit $result
17
0.85
5
12
7ab5a39123a2f5a1a108ae8798df83b05bf86c55
CHANGELOG.md
CHANGELOG.md
CHANGELOG ========= * 2.0.0 (2013-02-13) * Change `Jwpage` to `Bdt` namespace. * 1.0.2 (2013-02-07) * Add `$client->sendMessage()` shortcut. * Require stable versions of Guzzle in `composer.json` * 1.0.1 (2013-01-15) * Update for compatibility with Guzzle 3.1.0 * 1.0.0 (2013-01-08) * Initial release.
CHANGELOG ========= * 2.0.1 (2013-03-05) * Support Guzzle 3.3.0 * 2.0.0 (2013-02-13) * Change `Jwpage` to `Bdt` namespace. * 1.0.2 (2013-02-07) * Add `$client->sendMessage()` shortcut. * Require stable versions of Guzzle in `composer.json` * 1.0.1 (2013-01-15) * Update for compatibility with Guzzle 3.1.0 * 1.0.0 (2013-01-08) * Initial release.
Update composer.json to support 3.3.0
Update composer.json to support 3.3.0
Markdown
mit
bluedogtraining/guzzle-clickatell
markdown
## Code Before: CHANGELOG ========= * 2.0.0 (2013-02-13) * Change `Jwpage` to `Bdt` namespace. * 1.0.2 (2013-02-07) * Add `$client->sendMessage()` shortcut. * Require stable versions of Guzzle in `composer.json` * 1.0.1 (2013-01-15) * Update for compatibility with Guzzle 3.1.0 * 1.0.0 (2013-01-08) * Initial release. ## Instruction: Update composer.json to support 3.3.0 ## Code After: CHANGELOG ========= * 2.0.1 (2013-03-05) * Support Guzzle 3.3.0 * 2.0.0 (2013-02-13) * Change `Jwpage` to `Bdt` namespace. * 1.0.2 (2013-02-07) * Add `$client->sendMessage()` shortcut. * Require stable versions of Guzzle in `composer.json` * 1.0.1 (2013-01-15) * Update for compatibility with Guzzle 3.1.0 * 1.0.0 (2013-01-08) * Initial release.
CHANGELOG ========= + * 2.0.1 (2013-03-05) + * Support Guzzle 3.3.0 + * 2.0.0 (2013-02-13) * Change `Jwpage` to `Bdt` namespace. + * 1.0.2 (2013-02-07) * Add `$client->sendMessage()` shortcut. * Require stable versions of Guzzle in `composer.json` + * 1.0.1 (2013-01-15) * Update for compatibility with Guzzle 3.1.0 + * 1.0.0 (2013-01-08) * Initial release.
6
0.5
6
0
37d7f3fd3f1a167d56e4652e15be4c5be3974668
_layouts/maindownloadpage.html
_layouts/maindownloadpage.html
--- layout: downloadpage --- <h3>Additional information</h3> New Scala users might want to read the <a href="{{ site.baseurl }}/documentation/getting-started.html">Getting Started</a> guide. You can find the links to prior versions or the latest development version below. To see a detailed list of changes for each version of Scala please refer to the <a href="{{ site.baseurl }}/download/changelog.html">changelog</a>. Note that the different major releases of Scala (e.g. Scala 2.9.3 and Scala 2.10.1) are not binary compatible. <ul> {% for release in page.other_releases %} <li><a href="/download/{{ release[2] }}.html">{{ release[1] }} - Scala {{ release[2] }}</a></li> {% endfor %} <li><a href="/files/archive/nightly/">Nightly builds</a></li> <li><a href="changelog.html">Changelog</a></li> <li><a href="all.html">All previous Scala Releases</a></li> </ul> <br/> The Scala distribution is released under a <a href="{{ site.baseurl }}/license.html">BSD-like license</a>. {{ content }}
--- layout: downloadpage --- <h3>Additional information</h3> New Scala users might want to read the <a href="{{ site.baseurl }}/documentation/getting-started.html">Getting Started</a> guide. You can find the links to prior versions or the latest development version below. To see a detailed list of changes for each version of Scala please refer to the <a href="{{ site.baseurl }}/download/changelog.html">changelog</a>. Note that the different major releases of Scala (e.g. Scala 2.9.3 and Scala 2.10.1) are not binary compatible. <ul> {% for release in page.other_releases %} <li><a href="/download/{{ release[2] }}.html">{{ release[1] }} - Scala {{ release[2] }}</a></li> {% endfor %} <li><a href="/files/archive/nightly/">Nightly builds</a></li> <li><a href="changelog.html">Changelog</a></li> <li><a href="all.html">All previous Scala Releases</a></li> </ul> <br/> The Scala distribution is released under the <a href="{{ site.baseurl }}/license.html">3-clause BSD license</a>. {{ content }}
Clarify it's the standard 3-clause BSD.
Clarify it's the standard 3-clause BSD.
HTML
bsd-3-clause
andy1138/scala-lang,boldradius/scala-lang,jeantil/scala-lang,vl4ds/scala-lang,jeantil/scala-lang,andy1138/scala-lang,vl4ds/scala-lang,vl4ds/scala-lang,andy1138/scala-lang,boldradius/scala-lang,andy1138/scala-lang,boldradius/scala-lang,jeantil/scala-lang,boldradius/scala-lang,vl4ds/scala-lang,jeantil/scala-lang
html
## Code Before: --- layout: downloadpage --- <h3>Additional information</h3> New Scala users might want to read the <a href="{{ site.baseurl }}/documentation/getting-started.html">Getting Started</a> guide. You can find the links to prior versions or the latest development version below. To see a detailed list of changes for each version of Scala please refer to the <a href="{{ site.baseurl }}/download/changelog.html">changelog</a>. Note that the different major releases of Scala (e.g. Scala 2.9.3 and Scala 2.10.1) are not binary compatible. <ul> {% for release in page.other_releases %} <li><a href="/download/{{ release[2] }}.html">{{ release[1] }} - Scala {{ release[2] }}</a></li> {% endfor %} <li><a href="/files/archive/nightly/">Nightly builds</a></li> <li><a href="changelog.html">Changelog</a></li> <li><a href="all.html">All previous Scala Releases</a></li> </ul> <br/> The Scala distribution is released under a <a href="{{ site.baseurl }}/license.html">BSD-like license</a>. {{ content }} ## Instruction: Clarify it's the standard 3-clause BSD. ## Code After: --- layout: downloadpage --- <h3>Additional information</h3> New Scala users might want to read the <a href="{{ site.baseurl }}/documentation/getting-started.html">Getting Started</a> guide. You can find the links to prior versions or the latest development version below. To see a detailed list of changes for each version of Scala please refer to the <a href="{{ site.baseurl }}/download/changelog.html">changelog</a>. Note that the different major releases of Scala (e.g. Scala 2.9.3 and Scala 2.10.1) are not binary compatible. <ul> {% for release in page.other_releases %} <li><a href="/download/{{ release[2] }}.html">{{ release[1] }} - Scala {{ release[2] }}</a></li> {% endfor %} <li><a href="/files/archive/nightly/">Nightly builds</a></li> <li><a href="changelog.html">Changelog</a></li> <li><a href="all.html">All previous Scala Releases</a></li> </ul> <br/> The Scala distribution is released under the <a href="{{ site.baseurl }}/license.html">3-clause BSD license</a>. {{ content }}
--- layout: downloadpage --- <h3>Additional information</h3> New Scala users might want to read the <a href="{{ site.baseurl }}/documentation/getting-started.html">Getting Started</a> guide. You can find the links to prior versions or the latest development version below. To see a detailed list of changes for each version of Scala please refer to the <a href="{{ site.baseurl }}/download/changelog.html">changelog</a>. Note that the different major releases of Scala (e.g. Scala 2.9.3 and Scala 2.10.1) are not binary compatible. <ul> {% for release in page.other_releases %} <li><a href="/download/{{ release[2] }}.html">{{ release[1] }} - Scala {{ release[2] }}</a></li> {% endfor %} <li><a href="/files/archive/nightly/">Nightly builds</a></li> <li><a href="changelog.html">Changelog</a></li> <li><a href="all.html">All previous Scala Releases</a></li> </ul> <br/> - The Scala distribution is released under a <a href="{{ site.baseurl }}/license.html">BSD-like license</a>. ? ^ ----- + The Scala distribution is released under the <a href="{{ site.baseurl }}/license.html">3-clause BSD license</a>. ? ^^^ +++++++++ {{ content }}
2
0.071429
1
1
84f9d1c65ab5f0fca8a25c3ace949ae62b9f3db6
app/parsers/document_parser.rb
app/parsers/document_parser.rb
module DocumentParser def self.parse(document_hash) document_hash = document_hash.with_indifferent_access case document_hash.fetch(:document_type) when "aaib_report" AaibReport.new(document_hash) when "cma_case" CmaCase.new(document_hash) when "international_development_fund" InternationalDevelopmentFund.new(document_hash) when "drug_safety_update" DrugSafetyUpdate.new(document_hash) when "maib_report" MaibReport.new(document_hash) when "medical_safety_alert" MedicalSafetyAlert.new(document_hash) when "raib_report" RaibReport.new(document_hash) end end end
module DocumentParser def self.parse(document_hash) document_hash = document_hash.with_indifferent_access case document_hash.fetch(:document_type) when "aaib_report" AaibReport.new(document_hash) when "cma_case" CmaCase.new(document_hash) when "international_development_fund" InternationalDevelopmentFund.new(document_hash) when "drug_safety_update" DrugSafetyUpdate.new(document_hash) when "maib_report" MaibReport.new(document_hash) when "medical_safety_alert" MedicalSafetyAlert.new(document_hash) when "raib_report" RaibReport.new(document_hash) else raise "Unexpected document type: #{document_hash.fetch(:document_type)}" end end end
Raise an error if an unexpected doc type is returned
Raise an error if an unexpected doc type is returned This had been missed for a document type I'm adding and was leading to it appearing that there were no results. The same thing is done in lib/finder_frontend.rb#presenter_class
Ruby
mit
alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend,alphagov/finder-frontend
ruby
## Code Before: module DocumentParser def self.parse(document_hash) document_hash = document_hash.with_indifferent_access case document_hash.fetch(:document_type) when "aaib_report" AaibReport.new(document_hash) when "cma_case" CmaCase.new(document_hash) when "international_development_fund" InternationalDevelopmentFund.new(document_hash) when "drug_safety_update" DrugSafetyUpdate.new(document_hash) when "maib_report" MaibReport.new(document_hash) when "medical_safety_alert" MedicalSafetyAlert.new(document_hash) when "raib_report" RaibReport.new(document_hash) end end end ## Instruction: Raise an error if an unexpected doc type is returned This had been missed for a document type I'm adding and was leading to it appearing that there were no results. The same thing is done in lib/finder_frontend.rb#presenter_class ## Code After: module DocumentParser def self.parse(document_hash) document_hash = document_hash.with_indifferent_access case document_hash.fetch(:document_type) when "aaib_report" AaibReport.new(document_hash) when "cma_case" CmaCase.new(document_hash) when "international_development_fund" InternationalDevelopmentFund.new(document_hash) when "drug_safety_update" DrugSafetyUpdate.new(document_hash) when "maib_report" MaibReport.new(document_hash) when "medical_safety_alert" MedicalSafetyAlert.new(document_hash) when "raib_report" RaibReport.new(document_hash) else raise "Unexpected document type: #{document_hash.fetch(:document_type)}" end end end
module DocumentParser def self.parse(document_hash) document_hash = document_hash.with_indifferent_access case document_hash.fetch(:document_type) when "aaib_report" AaibReport.new(document_hash) when "cma_case" CmaCase.new(document_hash) when "international_development_fund" InternationalDevelopmentFund.new(document_hash) when "drug_safety_update" DrugSafetyUpdate.new(document_hash) when "maib_report" MaibReport.new(document_hash) when "medical_safety_alert" MedicalSafetyAlert.new(document_hash) when "raib_report" RaibReport.new(document_hash) + else + raise "Unexpected document type: #{document_hash.fetch(:document_type)}" end end end
2
0.090909
2
0
bbd8b027eecc48266dfeee12419a6bcd807bdf65
tests/__init__.py
tests/__init__.py
import os import unittest import pytest class ScraperTest(unittest.TestCase): online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( self.test_file_name if self.test_file_name else self.scraper_class.__name__.lower() ) with open( "tests/test_data/{}.testhtml".format(test_file_name), encoding="utf-8" ) as testfile: self.harvester_class = self.scraper_class(testfile) canonical_url = self.harvester_class.canonical_url() if self.online: if not canonical_url: pytest.skip( f"could not find canonical url for online test of scraper '{self.scraper_class.__name__}'" ) self.harvester_class = self.scraper_class(url=canonical_url)
import os import unittest import pytest class ScraperTest(unittest.TestCase): maxDiff = None online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( self.test_file_name if self.test_file_name else self.scraper_class.__name__.lower() ) with open( "tests/test_data/{}.testhtml".format(test_file_name), encoding="utf-8" ) as testfile: self.harvester_class = self.scraper_class(testfile) canonical_url = self.harvester_class.canonical_url() if self.online: if not canonical_url: pytest.skip( f"could not find canonical url for online test of scraper '{self.scraper_class.__name__}'" ) self.harvester_class = self.scraper_class(url=canonical_url)
Set maxDiff to 'None' on the base ScraperTest class
Set maxDiff to 'None' on the base ScraperTest class
Python
mit
hhursev/recipe-scraper
python
## Code Before: import os import unittest import pytest class ScraperTest(unittest.TestCase): online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( self.test_file_name if self.test_file_name else self.scraper_class.__name__.lower() ) with open( "tests/test_data/{}.testhtml".format(test_file_name), encoding="utf-8" ) as testfile: self.harvester_class = self.scraper_class(testfile) canonical_url = self.harvester_class.canonical_url() if self.online: if not canonical_url: pytest.skip( f"could not find canonical url for online test of scraper '{self.scraper_class.__name__}'" ) self.harvester_class = self.scraper_class(url=canonical_url) ## Instruction: Set maxDiff to 'None' on the base ScraperTest class ## Code After: import os import unittest import pytest class ScraperTest(unittest.TestCase): maxDiff = None online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( self.test_file_name if self.test_file_name else self.scraper_class.__name__.lower() ) with open( "tests/test_data/{}.testhtml".format(test_file_name), encoding="utf-8" ) as testfile: self.harvester_class = self.scraper_class(testfile) canonical_url = self.harvester_class.canonical_url() if self.online: if not canonical_url: pytest.skip( f"could not find canonical url for online test of scraper '{self.scraper_class.__name__}'" ) self.harvester_class = self.scraper_class(url=canonical_url)
import os import unittest import pytest class ScraperTest(unittest.TestCase): + maxDiff = None online = False test_file_name = None def setUp(self): os.environ[ "RECIPE_SCRAPERS_SETTINGS" ] = "tests.test_data.test_settings_module.test_settings" test_file_name = ( self.test_file_name if self.test_file_name else self.scraper_class.__name__.lower() ) with open( "tests/test_data/{}.testhtml".format(test_file_name), encoding="utf-8" ) as testfile: self.harvester_class = self.scraper_class(testfile) canonical_url = self.harvester_class.canonical_url() if self.online: if not canonical_url: pytest.skip( f"could not find canonical url for online test of scraper '{self.scraper_class.__name__}'" ) self.harvester_class = self.scraper_class(url=canonical_url)
1
0.03125
1
0
2fccb798592a8c0210fd7e6bf55e7eed3d72ce98
lib/tesla/adapter/httpc.ex
lib/tesla/adapter/httpc.ex
defmodule Tesla.Adapter.Httpc do def call(env, _opts) do with {:ok, {status, headers, body}} <- request(env) do format_response(env, status, headers, body) end end defp format_response(env, {_, status, _}, headers, body) do %{env | status: status, headers: headers, body: body} end defp request(env) do content_type = to_char_list(env.headers["content-type"] || "") handle request( env.method || :get, Tesla.build_url(env.url, env.query) |> to_char_list, Enum.into(env.headers, [], fn {k,v} -> {to_char_list(k), to_char_list(v)} end), content_type, env.body ) end defp request(method, url, headers, _content_type, nil) do :httpc.request(method, {url, headers}, [], []) end defp request(method, url, headers, content_type, body) do :httpc.request(method, {url, headers, content_type, body}, [], []) end defp handle({:error, {:failed_connect, _}}), do: {:error, :econnrefused} defp handle(response), do: response end
defmodule Tesla.Adapter.Httpc do @http_opts ~w(timeout connect_timeout ssl essl autoredirect proxy_auth version relaxed url_encode)a def call(env, opts) do with {:ok, {status, headers, body}} <- request(env, opts || []) do format_response(env, status, headers, body) end end defp format_response(env, {_, status, _}, headers, body) do %{env | status: status, headers: headers, body: body} end defp request(env, opts) do content_type = to_char_list(env.headers["content-type"] || "") handle request( env.method || :get, Tesla.build_url(env.url, env.query) |> to_char_list, Enum.into(env.headers, [], fn {k,v} -> {to_char_list(k), to_char_list(v)} end), content_type, env.body, Keyword.split(opts ++ env.opts, @http_opts) ) end defp request(method, url, headers, _content_type, nil, {http_opts, opts}) do :httpc.request(method, {url, headers}, http_opts, opts) end defp request(method, url, headers, content_type, body, {http_opts, opts}) do :httpc.request(method, {url, headers, content_type, body}, http_opts, opts) end defp handle({:error, {:failed_connect, _}}), do: {:error, :econnrefused} defp handle(response), do: response end
Add support for Httpc options
Add support for Httpc options
Elixir
mit
monterail/tesla,teamon/tesla
elixir
## Code Before: defmodule Tesla.Adapter.Httpc do def call(env, _opts) do with {:ok, {status, headers, body}} <- request(env) do format_response(env, status, headers, body) end end defp format_response(env, {_, status, _}, headers, body) do %{env | status: status, headers: headers, body: body} end defp request(env) do content_type = to_char_list(env.headers["content-type"] || "") handle request( env.method || :get, Tesla.build_url(env.url, env.query) |> to_char_list, Enum.into(env.headers, [], fn {k,v} -> {to_char_list(k), to_char_list(v)} end), content_type, env.body ) end defp request(method, url, headers, _content_type, nil) do :httpc.request(method, {url, headers}, [], []) end defp request(method, url, headers, content_type, body) do :httpc.request(method, {url, headers, content_type, body}, [], []) end defp handle({:error, {:failed_connect, _}}), do: {:error, :econnrefused} defp handle(response), do: response end ## Instruction: Add support for Httpc options ## Code After: defmodule Tesla.Adapter.Httpc do @http_opts ~w(timeout connect_timeout ssl essl autoredirect proxy_auth version relaxed url_encode)a def call(env, opts) do with {:ok, {status, headers, body}} <- request(env, opts || []) do format_response(env, status, headers, body) end end defp format_response(env, {_, status, _}, headers, body) do %{env | status: status, headers: headers, body: body} end defp request(env, opts) do content_type = to_char_list(env.headers["content-type"] || "") handle request( env.method || :get, Tesla.build_url(env.url, env.query) |> to_char_list, Enum.into(env.headers, [], fn {k,v} -> {to_char_list(k), to_char_list(v)} end), content_type, env.body, Keyword.split(opts ++ env.opts, @http_opts) ) end defp request(method, url, headers, _content_type, nil, {http_opts, opts}) do :httpc.request(method, {url, headers}, http_opts, opts) end defp request(method, url, headers, content_type, body, {http_opts, opts}) do :httpc.request(method, {url, headers, content_type, body}, http_opts, opts) end defp handle({:error, {:failed_connect, _}}), do: {:error, :econnrefused} defp handle(response), do: response end
defmodule Tesla.Adapter.Httpc do + @http_opts ~w(timeout connect_timeout ssl essl autoredirect proxy_auth version relaxed url_encode)a + - def call(env, _opts) do ? - + def call(env, opts) do - with {:ok, {status, headers, body}} <- request(env) do + with {:ok, {status, headers, body}} <- request(env, opts || []) do ? ++++++++++++ format_response(env, status, headers, body) end end defp format_response(env, {_, status, _}, headers, body) do %{env | status: status, headers: headers, body: body} end - defp request(env) do + defp request(env, opts) do ? ++++++ content_type = to_char_list(env.headers["content-type"] || "") handle request( env.method || :get, Tesla.build_url(env.url, env.query) |> to_char_list, Enum.into(env.headers, [], fn {k,v} -> {to_char_list(k), to_char_list(v)} end), content_type, - env.body + env.body, ? + + Keyword.split(opts ++ env.opts, @http_opts) ) end - defp request(method, url, headers, _content_type, nil) do + defp request(method, url, headers, _content_type, nil, {http_opts, opts}) do ? +++++++++++++++++++ - :httpc.request(method, {url, headers}, [], []) ? ^^ ^^ + :httpc.request(method, {url, headers}, http_opts, opts) ? ^^^^^^^^^ ^^^^ end - defp request(method, url, headers, content_type, body) do + defp request(method, url, headers, content_type, body, {http_opts, opts}) do ? +++++++++++++++++++ - :httpc.request(method, {url, headers, content_type, body}, [], []) ? ^^ ^^ + :httpc.request(method, {url, headers, content_type, body}, http_opts, opts) ? ^^^^^^^^^ ^^^^ end defp handle({:error, {:failed_connect, _}}), do: {:error, :econnrefused} defp handle(response), do: response end
19
0.542857
11
8
2d20245f311bb5a5aec8e15940b34f9fa56b023a
AndroidManifest.xml
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.connectsdk" android:versionCode="11" android:versionName="1.5.0" > <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" /> <application /> </manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.connectsdk" android:versionCode="11" android:versionName="1.5.0" > <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/> <application /> </manifest>
Add required permissions to the manifest
Add required permissions to the manifest
XML
apache-2.0
ConnectSDK/Connect-SDK-Android
xml
## Code Before: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.connectsdk" android:versionCode="11" android:versionName="1.5.0" > <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" /> <application /> </manifest> ## Instruction: Add required permissions to the manifest ## Code After: <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.connectsdk" android:versionCode="11" android:versionName="1.5.0" > <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/> <application /> </manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.connectsdk" android:versionCode="11" android:versionName="1.5.0" > <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" /> + <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/> + <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/> <application /> </manifest>
2
0.181818
2
0
75f5e52178788359d1d5c0307fb5d13b48b068b8
tests/ref_resolver/test_simple.js
tests/ref_resolver/test_simple.js
'use strict'; const should = require('should'); const refResolver = require('./../../lib/ref_resolver'); const schema = require('./schema.json'); describe('RefResolver', () => { it('should resolve refs in schema synchronous', () => { const resolvedSchema = refResolver(schema); should(resolvedSchema.string) .eql('string'); }); });
'use strict'; const should = require('should'); const refResolver = require('./../../lib/ref_resolver'); const schema = require('./schema.json'); const resolvedSchema = require('./resolvedSchema.json'); describe('RefResolver', () => { it('should resolve refs in schema synchronous', () => { const resolved = refResolver(schema); should(resolved.string) .eql('string'); }); it('should work with already resolved schema', () => { const resolved = refResolver(resolvedSchema); should(resolved) .deepEqual(resolvedSchema); }); });
Add test for already resolved schema
Add test for already resolved schema
JavaScript
mit
5minds/nconfetti
javascript
## Code Before: 'use strict'; const should = require('should'); const refResolver = require('./../../lib/ref_resolver'); const schema = require('./schema.json'); describe('RefResolver', () => { it('should resolve refs in schema synchronous', () => { const resolvedSchema = refResolver(schema); should(resolvedSchema.string) .eql('string'); }); }); ## Instruction: Add test for already resolved schema ## Code After: 'use strict'; const should = require('should'); const refResolver = require('./../../lib/ref_resolver'); const schema = require('./schema.json'); const resolvedSchema = require('./resolvedSchema.json'); describe('RefResolver', () => { it('should resolve refs in schema synchronous', () => { const resolved = refResolver(schema); should(resolved.string) .eql('string'); }); it('should work with already resolved schema', () => { const resolved = refResolver(resolvedSchema); should(resolved) .deepEqual(resolvedSchema); }); });
'use strict'; const should = require('should'); const refResolver = require('./../../lib/ref_resolver'); const schema = require('./schema.json'); + const resolvedSchema = require('./resolvedSchema.json'); describe('RefResolver', () => { it('should resolve refs in schema synchronous', () => { - const resolvedSchema = refResolver(schema); ? ------ + const resolved = refResolver(schema); - should(resolvedSchema.string) ? ------ + should(resolved.string) .eql('string'); }); + it('should work with already resolved schema', () => { + const resolved = refResolver(resolvedSchema); + + should(resolved) + .deepEqual(resolvedSchema); + }); + });
12
0.666667
10
2
873d1cdbb762cc2f524ffa588895f4f12139036a
.travis.yml
.travis.yml
language: python python: - "2.7" - "3.2" env: # we only test interpreters who have native python packages # since those tests are running on ubuntu 12.04, pyqt5 cannot be tested - TOXENV=py27-pyqt4 - TOXENV=py32-pyqt4 - TOXENV=cov - TOXENV=pep8 matrix: exclude: - python: "2.7" env: TOXENV=cov - python: "2.7" env: TOXENV=pep8 - python: "2.7" env: TOXENV=py32-pyqt4 - python: "3.2" env: TOXENV=py27-pyqt4 allow_failures: - env: TOXENV=cov - env: TOXENV=pep8 virtualenv: system_site_packages: true before_install: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" install: - sudo apt-get install -qq python-qt4 --fix-missing - sudo apt-get install -qq python3-pyqt4 --fix-missing - pip install tox - pip install git+https://github.com/pyQode/pyqode.qt.git@develop script: - tox after_script: - if [ $TOXENV == "cov" ]; then pip install --quiet --use-mirrors coveralls; coveralls; fi
language: python python: - "2.7" - "3.2" env: # we only test interpreters who have native python packages # since those tests are running on ubuntu 12.04, pyqt5 cannot be tested - TOXENV=py27-pyqt4 - TOXENV=py32-pyqt4 - TOXENV=cov - TOXENV=pep8 matrix: exclude: - python: "2.7" env: TOXENV=cov - python: "2.7" env: TOXENV=pep8 - python: "2.7" env: TOXENV=py32-pyqt4 - python: "3.2" env: TOXENV=py27-pyqt4 allow_failures: - env: TOXENV=cov - env: TOXENV=pep8 virtualenv: system_site_packages: true before_install: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" install: - sudo apt-get install -qq python-qt4 --fix-missing - sudo apt-get install -qq python3-pyqt4 --fix-missing - pip install tox script: - tox after_script: - if [ $TOXENV == "cov" ]; then pip install --quiet --use-mirrors coveralls; coveralls; fi
Remove useless install (this is specified in tox.ini)
Remove useless install (this is specified in tox.ini)
YAML
mit
pyQode/pyqode.core,pyQode/pyqode.core,zwadar/pyqode.core
yaml
## Code Before: language: python python: - "2.7" - "3.2" env: # we only test interpreters who have native python packages # since those tests are running on ubuntu 12.04, pyqt5 cannot be tested - TOXENV=py27-pyqt4 - TOXENV=py32-pyqt4 - TOXENV=cov - TOXENV=pep8 matrix: exclude: - python: "2.7" env: TOXENV=cov - python: "2.7" env: TOXENV=pep8 - python: "2.7" env: TOXENV=py32-pyqt4 - python: "3.2" env: TOXENV=py27-pyqt4 allow_failures: - env: TOXENV=cov - env: TOXENV=pep8 virtualenv: system_site_packages: true before_install: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" install: - sudo apt-get install -qq python-qt4 --fix-missing - sudo apt-get install -qq python3-pyqt4 --fix-missing - pip install tox - pip install git+https://github.com/pyQode/pyqode.qt.git@develop script: - tox after_script: - if [ $TOXENV == "cov" ]; then pip install --quiet --use-mirrors coveralls; coveralls; fi ## Instruction: Remove useless install (this is specified in tox.ini) ## Code After: language: python python: - "2.7" - "3.2" env: # we only test interpreters who have native python packages # since those tests are running on ubuntu 12.04, pyqt5 cannot be tested - TOXENV=py27-pyqt4 - TOXENV=py32-pyqt4 - TOXENV=cov - TOXENV=pep8 matrix: exclude: - python: "2.7" env: TOXENV=cov - python: "2.7" env: TOXENV=pep8 - python: "2.7" env: TOXENV=py32-pyqt4 - python: "3.2" env: TOXENV=py27-pyqt4 allow_failures: - env: TOXENV=cov - env: TOXENV=pep8 virtualenv: system_site_packages: true before_install: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" install: - sudo apt-get install -qq python-qt4 --fix-missing - sudo apt-get install -qq python3-pyqt4 --fix-missing - pip install tox script: - tox after_script: - if [ $TOXENV == "cov" ]; then pip install --quiet --use-mirrors coveralls; coveralls; fi
language: python python: - "2.7" - "3.2" env: # we only test interpreters who have native python packages # since those tests are running on ubuntu 12.04, pyqt5 cannot be tested - TOXENV=py27-pyqt4 - TOXENV=py32-pyqt4 - TOXENV=cov - TOXENV=pep8 matrix: exclude: - python: "2.7" env: TOXENV=cov - python: "2.7" env: TOXENV=pep8 - python: "2.7" env: TOXENV=py32-pyqt4 - python: "3.2" env: TOXENV=py27-pyqt4 allow_failures: - env: TOXENV=cov - env: TOXENV=pep8 virtualenv: system_site_packages: true before_install: - "export DISPLAY=:99.0" - "sh -e /etc/init.d/xvfb start" install: - sudo apt-get install -qq python-qt4 --fix-missing - sudo apt-get install -qq python3-pyqt4 --fix-missing - pip install tox - - pip install git+https://github.com/pyQode/pyqode.qt.git@develop script: - tox after_script: - if [ $TOXENV == "cov" ]; then pip install --quiet --use-mirrors coveralls; coveralls; fi
1
0.02439
0
1
d6681dc42189f1216b4743555046da67ce55f7c5
tests/unit/Entity/CategoryTest.php
tests/unit/Entity/CategoryTest.php
<?php namespace Genj\FaqBundle\Entity; /** * Class CategoryTest * * @package Genj\FaqBundle\Entity */ class CategoryTest extends \PHPUnit_Framework_TestCase { /** * @covers Genj\FaqBundle\Entity\Category::__toString */ public function testToString() { $category = new Category(); $category->setHeadline('John Doe'); $categoryToString = (string) $category; $this->assertSame('John Doe', $categoryToString); } }
<?php namespace Genj\FaqBundle\Entity; /** * Class CategoryTest * * @package Genj\FaqBundle\Entity */ class CategoryTest extends \PHPUnit_Framework_TestCase { /** * @covers Genj\FaqBundle\Entity\Category::__toString */ public function testToString() { $category = new Category(); $category->setHeadline('John Doe'); $categoryToString = (string) $category; $this->assertSame('John Doe', $categoryToString); } /** * @covers Genj\FaqBundle\Entity\Category::getRouteName */ public function testGetRouteName() { $category = new Category(); $routeName = $category->getRouteName(); $this->assertSame('genj_faq', $routeName); } /** * @covers Genj\FaqBundle\Entity\Category::getRouteParameters */ public function testGetRouteParameters() { $category = new Category(); $category->setSlug('my-foo-slug'); $routeParameters = $category->getRouteParameters(); $this->assertSame(array('categorySlug' => 'my-foo-slug'), $routeParameters); } }
Add some more tests for Entity\Category
Add some more tests for Entity\Category
PHP
mit
genj/GenjFaqBundle,genj/GenjFaqBundle,kminh/GenjFaqBundle,nebijokit/GenjFaqBundle,nebijokit/GenjFaqBundle
php
## Code Before: <?php namespace Genj\FaqBundle\Entity; /** * Class CategoryTest * * @package Genj\FaqBundle\Entity */ class CategoryTest extends \PHPUnit_Framework_TestCase { /** * @covers Genj\FaqBundle\Entity\Category::__toString */ public function testToString() { $category = new Category(); $category->setHeadline('John Doe'); $categoryToString = (string) $category; $this->assertSame('John Doe', $categoryToString); } } ## Instruction: Add some more tests for Entity\Category ## Code After: <?php namespace Genj\FaqBundle\Entity; /** * Class CategoryTest * * @package Genj\FaqBundle\Entity */ class CategoryTest extends \PHPUnit_Framework_TestCase { /** * @covers Genj\FaqBundle\Entity\Category::__toString */ public function testToString() { $category = new Category(); $category->setHeadline('John Doe'); $categoryToString = (string) $category; $this->assertSame('John Doe', $categoryToString); } /** * @covers Genj\FaqBundle\Entity\Category::getRouteName */ public function testGetRouteName() { $category = new Category(); $routeName = $category->getRouteName(); $this->assertSame('genj_faq', $routeName); } /** * @covers Genj\FaqBundle\Entity\Category::getRouteParameters */ public function testGetRouteParameters() { $category = new Category(); $category->setSlug('my-foo-slug'); $routeParameters = $category->getRouteParameters(); $this->assertSame(array('categorySlug' => 'my-foo-slug'), $routeParameters); } }
<?php namespace Genj\FaqBundle\Entity; /** * Class CategoryTest * * @package Genj\FaqBundle\Entity */ class CategoryTest extends \PHPUnit_Framework_TestCase { /** * @covers Genj\FaqBundle\Entity\Category::__toString */ public function testToString() { $category = new Category(); $category->setHeadline('John Doe'); $categoryToString = (string) $category; $this->assertSame('John Doe', $categoryToString); } + + /** + * @covers Genj\FaqBundle\Entity\Category::getRouteName + */ + public function testGetRouteName() + { + $category = new Category(); + $routeName = $category->getRouteName(); + + $this->assertSame('genj_faq', $routeName); + } + + /** + * @covers Genj\FaqBundle\Entity\Category::getRouteParameters + */ + public function testGetRouteParameters() + { + $category = new Category(); + $category->setSlug('my-foo-slug'); + + $routeParameters = $category->getRouteParameters(); + + $this->assertSame(array('categorySlug' => 'my-foo-slug'), $routeParameters); + } }
24
1
24
0
766b7f76f8b7b1e3f4bcc2a4d5b672b52c483f4d
docs/index.rst
docs/index.rst
================== django-wkhtmltopdf ================== ``django-wkhtmltopdf`` allows a Django site to output dynamic PDFs. It utilises the wkhtmltopdf_ library, allowing you to write using the technologies you know - HTML and CSS - and output a PDF file. .. _wkhtmltopdf: http://code.google.com/p/wkhtmltopdf/ Quickstart ========== .. code-block:: bash pip install django-wkhtmltopdf Grab the wkhtmltopdf binary_ for your platform. .. _binary: http://code.google.com/p/wkhtmltopdf/downloads/list ``settings.py`` .. code-block:: python INSTALLED_APPS = ( # ... 'wkhtmltopdf', # ... ) ``urls.py`` .. code-block:: python from django.conf.urls.defaults import url, patterns from wkhtmltopdf.views import PDFTemplateView urlpatterns = patterns('', url(r'^pdf/$', PDFTemplateView.as_view(template_name='my_template.html', filename='my_pdf.pdf'), name='pdf'), ) Contribute ========== You can fork the project on Github_. .. _Github: http://github.com/incuna/django-wkhtmltopdf Contents ======== .. toctree:: :maxdepth: 1 installation usage settings
================== django-wkhtmltopdf ================== ``django-wkhtmltopdf`` allows a Django site to output dynamic PDFs. It utilises the wkhtmltopdf_ library, allowing you to write using the technologies you know - HTML and CSS - and output a PDF file. .. _wkhtmltopdf: http://wkhtmltopdf.org/ Quickstart ========== .. code-block:: bash pip install django-wkhtmltopdf Grab the wkhtmltopdf binary_ for your platform. .. _binary: http://wkhtmltopdf.org/downloads.html ``settings.py`` .. code-block:: python INSTALLED_APPS = ( # ... 'wkhtmltopdf', # ... ) ``urls.py`` .. code-block:: python from django.conf.urls.defaults import url, patterns from wkhtmltopdf.views import PDFTemplateView urlpatterns = patterns('', url(r'^pdf/$', PDFTemplateView.as_view(template_name='my_template.html', filename='my_pdf.pdf'), name='pdf'), ) Contribute ========== You can fork the project on Github_. .. _Github: https://github.com/incuna/django-wkhtmltopdf Contents ======== .. toctree:: :maxdepth: 1 installation usage settings
Fix links to point to correct website
[Doc] Fix links to point to correct website
reStructuredText
bsd-2-clause
tclancy/django-wkhtmltopdf,halfnibble/django-wkhtmltopdf,incuna/django-wkhtmltopdf,incuna/django-wkhtmltopdf,tclancy/django-wkhtmltopdf,halfnibble/django-wkhtmltopdf
restructuredtext
## Code Before: ================== django-wkhtmltopdf ================== ``django-wkhtmltopdf`` allows a Django site to output dynamic PDFs. It utilises the wkhtmltopdf_ library, allowing you to write using the technologies you know - HTML and CSS - and output a PDF file. .. _wkhtmltopdf: http://code.google.com/p/wkhtmltopdf/ Quickstart ========== .. code-block:: bash pip install django-wkhtmltopdf Grab the wkhtmltopdf binary_ for your platform. .. _binary: http://code.google.com/p/wkhtmltopdf/downloads/list ``settings.py`` .. code-block:: python INSTALLED_APPS = ( # ... 'wkhtmltopdf', # ... ) ``urls.py`` .. code-block:: python from django.conf.urls.defaults import url, patterns from wkhtmltopdf.views import PDFTemplateView urlpatterns = patterns('', url(r'^pdf/$', PDFTemplateView.as_view(template_name='my_template.html', filename='my_pdf.pdf'), name='pdf'), ) Contribute ========== You can fork the project on Github_. .. _Github: http://github.com/incuna/django-wkhtmltopdf Contents ======== .. toctree:: :maxdepth: 1 installation usage settings ## Instruction: [Doc] Fix links to point to correct website ## Code After: ================== django-wkhtmltopdf ================== ``django-wkhtmltopdf`` allows a Django site to output dynamic PDFs. It utilises the wkhtmltopdf_ library, allowing you to write using the technologies you know - HTML and CSS - and output a PDF file. .. _wkhtmltopdf: http://wkhtmltopdf.org/ Quickstart ========== .. code-block:: bash pip install django-wkhtmltopdf Grab the wkhtmltopdf binary_ for your platform. .. _binary: http://wkhtmltopdf.org/downloads.html ``settings.py`` .. code-block:: python INSTALLED_APPS = ( # ... 'wkhtmltopdf', # ... ) ``urls.py`` .. code-block:: python from django.conf.urls.defaults import url, patterns from wkhtmltopdf.views import PDFTemplateView urlpatterns = patterns('', url(r'^pdf/$', PDFTemplateView.as_view(template_name='my_template.html', filename='my_pdf.pdf'), name='pdf'), ) Contribute ========== You can fork the project on Github_. .. _Github: https://github.com/incuna/django-wkhtmltopdf Contents ======== .. toctree:: :maxdepth: 1 installation usage settings
================== django-wkhtmltopdf ================== ``django-wkhtmltopdf`` allows a Django site to output dynamic PDFs. It utilises the wkhtmltopdf_ library, allowing you to write using the technologies you know - HTML and CSS - and output a PDF file. - .. _wkhtmltopdf: http://code.google.com/p/wkhtmltopdf/ ? ------------------ + .. _wkhtmltopdf: http://wkhtmltopdf.org/ ? ++++ Quickstart ========== .. code-block:: bash pip install django-wkhtmltopdf Grab the wkhtmltopdf binary_ for your platform. - .. _binary: http://code.google.com/p/wkhtmltopdf/downloads/list + .. _binary: http://wkhtmltopdf.org/downloads.html ``settings.py`` .. code-block:: python INSTALLED_APPS = ( # ... 'wkhtmltopdf', # ... ) ``urls.py`` .. code-block:: python from django.conf.urls.defaults import url, patterns from wkhtmltopdf.views import PDFTemplateView urlpatterns = patterns('', url(r'^pdf/$', PDFTemplateView.as_view(template_name='my_template.html', filename='my_pdf.pdf'), name='pdf'), ) Contribute ========== You can fork the project on Github_. - .. _Github: http://github.com/incuna/django-wkhtmltopdf + .. _Github: https://github.com/incuna/django-wkhtmltopdf ? + Contents ======== .. toctree:: :maxdepth: 1 installation usage settings
6
0.101695
3
3
5855d112b761591c39f8f9fa011d885ea2cea5be
src/Symfony/Component/Notifier/Messenger/MessageHandler.php
src/Symfony/Component/Notifier/Messenger/MessageHandler.php
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Messenger; use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Fabien Potencier <fabien@symfony.com> * * @experimental in 5.1 */ final class MessageHandler { private $transport; public function __construct(TransportInterface $transport) { $this->transport = $transport; } public function __invoke(MessageInterface $message) { $this->transport->send($message); } }
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Messenger; use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Fabien Potencier <fabien@symfony.com> * * @experimental in 5.1 */ final class MessageHandler { private $transport; public function __construct(TransportInterface $transport) { $this->transport = $transport; } public function __invoke(MessageInterface $message): ?SentMessage { return $this->transport->send($message); } }
Return SentMessage from the Notifier message handler
[Notifier] Return SentMessage from the Notifier message handler
PHP
mit
gonzalovilaseca/symfony,curry684/symfony,xabbuh/symfony,HeahDude/symfony,HeahDude/symfony,Slamdunk/symfony,curry684/symfony,derrabus/symfony,nicolas-grekas/symfony,Tobion/symfony,paradajozsef/symfony,lyrixx/symfony,derrabus/symfony,hhamon/symfony,mpdude/symfony,sgehrig/symfony,oleg-andreyev/symfony,ro0NL/symfony,curry684/symfony,curry684/symfony,nicolas-grekas/symfony,d-ph/symfony,oleg-andreyev/symfony,mweimerskirch/symfony,d-ph/symfony,Deamon/symfony,fabpot/symfony,symfony/symfony,ro0NL/symfony,damienalexandre/symfony,damienalexandre/symfony,stof/symfony,sgehrig/symfony,lyrixx/symfony,Slamdunk/symfony,damienalexandre/symfony,jderusse/symfony,paradajozsef/symfony,tucksaun/symfony,tgalopin/symfony,hhamon/symfony,pierredup/symfony,fabpot/symfony,smatyas/symfony,pierredup/symfony,ro0NL/symfony,OskarStark/symfony,tgalopin/symfony,MatTheCat/symfony,jvasseur/symfony,mpdude/symfony,Nyholm/symfony,mweimerskirch/symfony,kbond/symfony,smatyas/symfony,mpdude/symfony,stof/symfony,Deamon/symfony,phramz/symfony,symfony/symfony,MatTheCat/symfony,lyrixx/symfony,tucksaun/symfony,derrabus/symfony,sgehrig/symfony,stof/symfony,mweimerskirch/symfony,fabpot/symfony,Deamon/symfony,jvasseur/symfony,Tobion/symfony,damienalexandre/symfony,tgalopin/symfony,jvasseur/symfony,derrabus/symfony,nicolas-grekas/symfony,kbond/symfony,smatyas/symfony,Slamdunk/symfony,pierredup/symfony,nicolas-grekas/symfony,chalasr/symfony,Tobion/symfony,xabbuh/symfony,tgalopin/symfony,mweimerskirch/symfony,d-ph/symfony,smatyas/symfony,mpdude/symfony,Deamon/symfony,OskarStark/symfony,oleg-andreyev/symfony,phramz/symfony,mweimerskirch/symfony,MatTheCat/symfony,Nyholm/symfony,jderusse/symfony,sgehrig/symfony,xabbuh/symfony,stof/symfony,jvasseur/symfony,Slamdunk/symfony,phramz/symfony,chalasr/symfony,symfony/symfony,tucksaun/symfony,OskarStark/symfony,OskarStark/symfony,chalasr/symfony,ogizanagi/symfony,smatyas/symfony,tucksaun/symfony,ogizanagi/symfony,Deamon/symfony,Tobion/symfony,paradajozsef/symfony,kbond/symfony,hhamon/symfony,paradajozsef/symfony,HeahDude/symfony,Nyholm/symfony,gonzalovilaseca/symfony,ogizanagi/symfony,xabbuh/symfony,ogizanagi/symfony,MatTheCat/symfony,fabpot/symfony,d-ph/symfony,gonzalovilaseca/symfony,kbond/symfony,oleg-andreyev/symfony,gonzalovilaseca/symfony,phramz/symfony,hhamon/symfony,pierredup/symfony,lyrixx/symfony,Nyholm/symfony,jderusse/symfony,symfony/symfony,HeahDude/symfony,chalasr/symfony,jderusse/symfony,ro0NL/symfony
php
## Code Before: <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Messenger; use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Fabien Potencier <fabien@symfony.com> * * @experimental in 5.1 */ final class MessageHandler { private $transport; public function __construct(TransportInterface $transport) { $this->transport = $transport; } public function __invoke(MessageInterface $message) { $this->transport->send($message); } } ## Instruction: [Notifier] Return SentMessage from the Notifier message handler ## Code After: <?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Messenger; use Symfony\Component\Notifier\Message\MessageInterface; use Symfony\Component\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Fabien Potencier <fabien@symfony.com> * * @experimental in 5.1 */ final class MessageHandler { private $transport; public function __construct(TransportInterface $transport) { $this->transport = $transport; } public function __invoke(MessageInterface $message): ?SentMessage { return $this->transport->send($message); } }
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Notifier\Messenger; use Symfony\Component\Notifier\Message\MessageInterface; + use Symfony\Component\Notifier\Message\SentMessage; use Symfony\Component\Notifier\Transport\TransportInterface; /** * @author Fabien Potencier <fabien@symfony.com> * * @experimental in 5.1 */ final class MessageHandler { private $transport; public function __construct(TransportInterface $transport) { $this->transport = $transport; } - public function __invoke(MessageInterface $message) + public function __invoke(MessageInterface $message): ?SentMessage ? ++++++++++++++ { - $this->transport->send($message); + return $this->transport->send($message); ? +++++++ } }
5
0.142857
3
2
194a05b4bebf897e218a7ce860a7f8ed8e2f9f44
src/LoginActivityListener.php
src/LoginActivityListener.php
<?php namespace Aginev\LoginActivity; use Illuminate\Events\Dispatcher; class LoginActivityListener { /** * Handle user login events. * @param $event */ public function onUserLogin($event) { LoginActivityFacade::login($event); } /** * Handle user logout events. * @param $event */ public function onUserLogout($event) { LoginActivityFacade::logout($event); } /** * Register the listeners for the subscriber. * * @param Dispatcher $events */ public function subscribe($events) { $events->listen( \Illuminate\Auth\Events\Login::class, 'Aginev\LoginActivity\LoginActivityListener@onUserLogin' ); $events->listen( \Illuminate\Auth\Events\Logout::class, 'Aginev\LoginActivity\LoginActivityListener@onUserLogout' ); } }
<?php namespace Aginev\LoginActivity; use Illuminate\Events\Dispatcher; class LoginActivityListener { /** * Handle user login events. * @param $event */ public function onUserLogin($event) { LoginActivityFacade::login($event); } /** * Handle user logout events. * @param $event */ public function onUserLogout($event) { LoginActivityFacade::logout($event); } /** * Register the listeners for the subscriber. * * @param Dispatcher $events */ public function subscribe($events) { if (config('login-activity.track_login', false)) { $events->listen( \Illuminate\Auth\Events\Login::class, 'Aginev\LoginActivity\LoginActivityListener@onUserLogin' ); } if (config('login-activity.track_logout', false)) { $events->listen( \Illuminate\Auth\Events\Logout::class, 'Aginev\LoginActivity\LoginActivityListener@onUserLogout' ); } } }
Switch login and logout on and off
Switch login and logout on and off
PHP
mit
aginev/login-activity
php
## Code Before: <?php namespace Aginev\LoginActivity; use Illuminate\Events\Dispatcher; class LoginActivityListener { /** * Handle user login events. * @param $event */ public function onUserLogin($event) { LoginActivityFacade::login($event); } /** * Handle user logout events. * @param $event */ public function onUserLogout($event) { LoginActivityFacade::logout($event); } /** * Register the listeners for the subscriber. * * @param Dispatcher $events */ public function subscribe($events) { $events->listen( \Illuminate\Auth\Events\Login::class, 'Aginev\LoginActivity\LoginActivityListener@onUserLogin' ); $events->listen( \Illuminate\Auth\Events\Logout::class, 'Aginev\LoginActivity\LoginActivityListener@onUserLogout' ); } } ## Instruction: Switch login and logout on and off ## Code After: <?php namespace Aginev\LoginActivity; use Illuminate\Events\Dispatcher; class LoginActivityListener { /** * Handle user login events. * @param $event */ public function onUserLogin($event) { LoginActivityFacade::login($event); } /** * Handle user logout events. * @param $event */ public function onUserLogout($event) { LoginActivityFacade::logout($event); } /** * Register the listeners for the subscriber. * * @param Dispatcher $events */ public function subscribe($events) { if (config('login-activity.track_login', false)) { $events->listen( \Illuminate\Auth\Events\Login::class, 'Aginev\LoginActivity\LoginActivityListener@onUserLogin' ); } if (config('login-activity.track_logout', false)) { $events->listen( \Illuminate\Auth\Events\Logout::class, 'Aginev\LoginActivity\LoginActivityListener@onUserLogout' ); } } }
<?php namespace Aginev\LoginActivity; use Illuminate\Events\Dispatcher; class LoginActivityListener { /** * Handle user login events. * @param $event */ public function onUserLogin($event) { LoginActivityFacade::login($event); } /** * Handle user logout events. * @param $event */ public function onUserLogout($event) { LoginActivityFacade::logout($event); } /** * Register the listeners for the subscriber. * * @param Dispatcher $events */ public function subscribe($events) { + if (config('login-activity.track_login', false)) { - $events->listen( + $events->listen( ? ++++ - \Illuminate\Auth\Events\Login::class, + \Illuminate\Auth\Events\Login::class, ? ++++ - 'Aginev\LoginActivity\LoginActivityListener@onUserLogin' + 'Aginev\LoginActivity\LoginActivityListener@onUserLogin' ? ++++ + ); - ); ? ^^ + } ? ^ + if (config('login-activity.track_logout', false)) { - $events->listen( + $events->listen( ? ++++ - \Illuminate\Auth\Events\Logout::class, + \Illuminate\Auth\Events\Logout::class, ? ++++ - 'Aginev\LoginActivity\LoginActivityListener@onUserLogout' + 'Aginev\LoginActivity\LoginActivityListener@onUserLogout' ? ++++ + ); - ); ? ^^ + } ? ^ } }
20
0.444444
12
8
1277223c96a4348f9b676cac4814d625270b4c9b
app/actions.rb
app/actions.rb
get '/' do erb :index end
get '/' do erb :index end get '/topics' do @topics = Topic.all.order(:topic) erb :'/topics/index.html' end
Add `/topics` route, and logic
Add `/topics` route, and logic
Ruby
mit
tweet-squared/Tweets-Squared-App,tweet-squared/Tweets-Squared-App,tweet-squared/Tweets-Squared-App
ruby
## Code Before: get '/' do erb :index end ## Instruction: Add `/topics` route, and logic ## Code After: get '/' do erb :index end get '/topics' do @topics = Topic.all.order(:topic) erb :'/topics/index.html' end
get '/' do erb :index end + + get '/topics' do + @topics = Topic.all.order(:topic) + erb :'/topics/index.html' + end
5
1.666667
5
0
04b2b13c986eebe04ecf1e48ffbd7db6757309e5
src/core/CompUnitRepo/Locally.pm
src/core/CompUnitRepo/Locally.pm
role CompUnitRepo::Locally { has Lock $!lock; has IO::Path $.path; has Str $.WHICH; my %instances; method new( $path is copy ) { $path = IO::Spec.rel2abs($path); return Nil unless $path.IO.e; %instances{$path} //= self.bless(:$path) } method BUILD(:$path) { $!lock = Lock.new; $!WHICH = self.^name ~ '|' ~ $path; $!path = $path.path; self } method Str { self.DEFINITE ?? $!path.Str !! Nil } method gist { self.DEFINITE ?? "{self.short-id}:{$!path.Str}" !! self.^name; } method perl { self.DEFINITE ?? "CompUnitRepo.new('{self.short-id}:{$!path.Str}')" !! self.^name; } # stubs method install($source, $from?) { ... } method files($file, :$name, :$auth, :$ver) { ... } method candidates($name, :$file, :$auth, :$ver) { ... } method short-id() { ... } }
role CompUnitRepo::Locally { has Lock $!lock; has IO::Path $.path; has Str $!WHICH; my %instances; method new( $path is copy ) { $path = IO::Spec.rel2abs($path); return Nil unless $path.IO.e; %instances{$path} //= self.bless(:$path) } method BUILD(:$path) { $!lock = Lock.new; $!WHICH = self.^name ~ '|' ~ $path; $!path = $path.path; self } method WHICH { self.DEFINITE ?? $!WHICH !! self.^name } method Str { self.DEFINITE ?? $!path.Str !! Nil } method gist { self.DEFINITE ?? "{self.short-id}:{$!path.Str}" !! self.^name; } method perl { self.DEFINITE ?? "CompUnitRepo.new('{self.short-id}:{$!path.Str}')" !! self.^name; } # stubs method install($source, $from?) { ... } method files($file, :$name, :$auth, :$ver) { ... } method candidates($name, :$file, :$auth, :$ver) { ... } method short-id() { ... } }
Make .WHICH also work on type objects
Make .WHICH also work on type objects
Perl
artistic-2.0
tony-o/deb-rakudodaily,tony-o/deb-rakudodaily,sjn/rakudo,cygx/rakudo,samcv/rakudo,ungrim97/rakudo,rakudo/rakudo,sergot/rakudo,samcv/rakudo,b2gills/rakudo,Leont/rakudo,usev6/rakudo,nunorc/rakudo,azawawi/rakudo,tbrowder/rakudo,MasterDuke17/rakudo,paultcochrane/rakudo,sergot/rakudo,LLFourn/rakudo,zostay/rakudo,tony-o/deb-rakudodaily,tbrowder/rakudo,raydiak/rakudo,Gnouc/rakudo,softmoth/rakudo,softmoth/rakudo,b2gills/rakudo,b2gills/rakudo,sergot/rakudo,MasterDuke17/rakudo,cognominal/rakudo,niner/rakudo,usev6/rakudo,paultcochrane/rakudo,ugexe/rakudo,cygx/rakudo,dankogai/rakudo,cognominal/rakudo,usev6/rakudo,labster/rakudo,retupmoca/rakudo,salortiz/rakudo,laben/rakudo,Leont/rakudo,awwaiid/rakudo,lucasbuchala/rakudo,tony-o/rakudo,nbrown/rakudo,salortiz/rakudo,tbrowder/rakudo,lucasbuchala/rakudo,nbrown/rakudo,tbrowder/rakudo,paultcochrane/rakudo,awwaiid/rakudo,tony-o/rakudo,tony-o/rakudo,Gnouc/rakudo,cygx/rakudo,labster/rakudo,Gnouc/rakudo,lucasbuchala/rakudo,sjn/rakudo,cognominal/rakudo,labster/rakudo,cygx/rakudo,zhuomingliang/rakudo,tbrowder/rakudo,awwaiid/rakudo,sjn/rakudo,labster/rakudo,laben/rakudo,dankogai/rakudo,nunorc/rakudo,usev6/rakudo,ungrim97/rakudo,nbrown/rakudo,ugexe/rakudo,softmoth/rakudo,MasterDuke17/rakudo,rakudo/rakudo,niner/rakudo,ugexe/rakudo,lucasbuchala/rakudo,laben/rakudo,dankogai/rakudo,Gnouc/rakudo,tony-o/rakudo,skids/rakudo,teodozjan/rakudo,Leont/rakudo,jonathanstowe/rakudo,b2gills/rakudo,teodozjan/rakudo,skids/rakudo,niner/rakudo,azawawi/rakudo,rakudo/rakudo,MasterDuke17/rakudo,skids/rakudo,retupmoca/rakudo,softmoth/rakudo,LLFourn/rakudo,ab5tract/rakudo,Gnouc/rakudo,lucasbuchala/rakudo,Leont/rakudo,ugexe/rakudo,zhuomingliang/rakudo,paultcochrane/rakudo,cognominal/rakudo,tony-o/deb-rakudodaily,ab5tract/rakudo,teodozjan/rakudo,zhuomingliang/rakudo,nunorc/rakudo,zhuomingliang/rakudo,salortiz/rakudo,salortiz/rakudo,rakudo/rakudo,labster/rakudo,awwaiid/rakudo,ungrim97/rakudo,cognominal/rakudo,ab5tract/rakudo,Gnouc/rakudo,azawawi/rakudo,dankogai/rakudo,cygx/rakudo,tony-o/deb-rakudodaily,jonathanstowe/rakudo,usev6/rakudo,LLFourn/rakudo,tony-o/deb-rakudodaily,dankogai/rakudo,MasterDuke17/rakudo,tony-o/rakudo,LLFourn/rakudo,rakudo/rakudo,MasterDuke17/rakudo,b2gills/rakudo,zostay/rakudo,salortiz/rakudo,jonathanstowe/rakudo,azawawi/rakudo,nbrown/rakudo,ab5tract/rakudo,niner/rakudo,laben/rakudo,tbrowder/rakudo,zostay/rakudo,samcv/rakudo,labster/rakudo,sjn/rakudo,awwaiid/rakudo,retupmoca/rakudo,raydiak/rakudo,jonathanstowe/rakudo,samcv/rakudo,tony-o/rakudo,azawawi/rakudo,nbrown/rakudo,salortiz/rakudo,softmoth/rakudo,skids/rakudo,teodozjan/rakudo,tony-o/deb-rakudodaily,ungrim97/rakudo,sergot/rakudo,ugexe/rakudo,skids/rakudo,nbrown/rakudo,nunorc/rakudo,LLFourn/rakudo,ungrim97/rakudo,raydiak/rakudo,sjn/rakudo,jonathanstowe/rakudo,raydiak/rakudo,zostay/rakudo,paultcochrane/rakudo,rakudo/rakudo,samcv/rakudo,ab5tract/rakudo,retupmoca/rakudo
perl
## Code Before: role CompUnitRepo::Locally { has Lock $!lock; has IO::Path $.path; has Str $.WHICH; my %instances; method new( $path is copy ) { $path = IO::Spec.rel2abs($path); return Nil unless $path.IO.e; %instances{$path} //= self.bless(:$path) } method BUILD(:$path) { $!lock = Lock.new; $!WHICH = self.^name ~ '|' ~ $path; $!path = $path.path; self } method Str { self.DEFINITE ?? $!path.Str !! Nil } method gist { self.DEFINITE ?? "{self.short-id}:{$!path.Str}" !! self.^name; } method perl { self.DEFINITE ?? "CompUnitRepo.new('{self.short-id}:{$!path.Str}')" !! self.^name; } # stubs method install($source, $from?) { ... } method files($file, :$name, :$auth, :$ver) { ... } method candidates($name, :$file, :$auth, :$ver) { ... } method short-id() { ... } } ## Instruction: Make .WHICH also work on type objects ## Code After: role CompUnitRepo::Locally { has Lock $!lock; has IO::Path $.path; has Str $!WHICH; my %instances; method new( $path is copy ) { $path = IO::Spec.rel2abs($path); return Nil unless $path.IO.e; %instances{$path} //= self.bless(:$path) } method BUILD(:$path) { $!lock = Lock.new; $!WHICH = self.^name ~ '|' ~ $path; $!path = $path.path; self } method WHICH { self.DEFINITE ?? $!WHICH !! self.^name } method Str { self.DEFINITE ?? $!path.Str !! Nil } method gist { self.DEFINITE ?? "{self.short-id}:{$!path.Str}" !! self.^name; } method perl { self.DEFINITE ?? "CompUnitRepo.new('{self.short-id}:{$!path.Str}')" !! self.^name; } # stubs method install($source, $from?) { ... } method files($file, :$name, :$auth, :$ver) { ... } method candidates($name, :$file, :$auth, :$ver) { ... } method short-id() { ... } }
role CompUnitRepo::Locally { has Lock $!lock; has IO::Path $.path; - has Str $.WHICH; ? ^ + has Str $!WHICH; ? ^ my %instances; method new( $path is copy ) { $path = IO::Spec.rel2abs($path); return Nil unless $path.IO.e; %instances{$path} //= self.bless(:$path) } method BUILD(:$path) { $!lock = Lock.new; $!WHICH = self.^name ~ '|' ~ $path; $!path = $path.path; self } + method WHICH { self.DEFINITE ?? $!WHICH !! self.^name } - method Str { self.DEFINITE ?? $!path.Str !! Nil } + method Str { self.DEFINITE ?? $!path.Str !! Nil } ? + - method gist { self.DEFINITE + method gist { self.DEFINITE ? + ?? "{self.short-id}:{$!path.Str}" !! self.^name; } - method perl { self.DEFINITE + method perl { self.DEFINITE ? + ?? "CompUnitRepo.new('{self.short-id}:{$!path.Str}')" !! self.^name; } # stubs method install($source, $from?) { ... } method files($file, :$name, :$auth, :$ver) { ... } method candidates($name, :$file, :$auth, :$ver) { ... } method short-id() { ... } }
9
0.25
5
4
14c834c50597ae635dd3d04b7197207efc120e1a
circle.yml
circle.yml
machine: environment: PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" dependencies: override: - yarn cache_directories: - ~/.cache/yarn test: override: - yarn test:cover post: - yarn coveralls
machine: environment: PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" node: version: stable dependencies: pre: - curl -o- -L https://yarnpkg.com/install.sh | bash override: - yarn install cache_directories: - ~/.cache/yarn test: override: - yarn test:cover post: - yarn coveralls
Set CircleCI to Node 6.10
Set CircleCI to Node 6.10
YAML
mit
sbstjn/discogs-collection
yaml
## Code Before: machine: environment: PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" dependencies: override: - yarn cache_directories: - ~/.cache/yarn test: override: - yarn test:cover post: - yarn coveralls ## Instruction: Set CircleCI to Node 6.10 ## Code After: machine: environment: PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" node: version: stable dependencies: pre: - curl -o- -L https://yarnpkg.com/install.sh | bash override: - yarn install cache_directories: - ~/.cache/yarn test: override: - yarn test:cover post: - yarn coveralls
machine: environment: PATH: "${PATH}:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin" - + node: + version: stable + dependencies: + pre: + - curl -o- -L https://yarnpkg.com/install.sh | bash override: - - yarn + - yarn install cache_directories: - ~/.cache/yarn test: override: - yarn test:cover post: - yarn coveralls
8
0.533333
6
2
7c253db94d410aceb9915618aebf075e3b26268b
package.json
package.json
{ "name": "fury", "description": "API Description SDK", "version": "0.2.0", "author": "Apiary.io <support@apiary.io>", "main": "./lib/fury", "repository": { "type": "git", "url": "git+ssh://git@github.com:apiaryio/fury.git" }, "engines": { "node": ">= 0.10.x" }, "scripts": { "test": "scripts/test", "prepublish": "scripts/build" }, "dependencies": { "coffee-script": "~1.9", "apiary-blueprint-parser": "", "protagonist": "~0.17.1", "request": "", "sanitizer": "", "underscore": "", "robotskirt": "" }, "devDependencies": { "chai": "~2.1", "coffee-coverage": "^0.4.4", "coveralls": "^2.11.2", "jscoverage": "^0.5.9", "mocha": "~2.1", "mocha-lcov-reporter": "0.0.2" }, "license": "MIT" }
{ "name": "fury", "description": "API Description SDK", "version": "0.3.0", "author": "Apiary.io <support@apiary.io>", "main": "./lib/fury", "repository": { "type": "git", "url": "git+ssh://git@github.com:apiaryio/fury.git" }, "engines": { "node": ">= 0.10.x" }, "scripts": { "test": "scripts/test", "prepublish": "scripts/build" }, "dependencies": { "coffee-script": "~1.9", "apiary-blueprint-parser": "", "protagonist": "~0.17.1", "sanitizer": "", "underscore": "", "robotskirt": "" }, "devDependencies": { "chai": "~2.1", "coffee-coverage": "^0.4.4", "coveralls": "^2.11.2", "jscoverage": "^0.5.9", "mocha": "~2.1", "mocha-lcov-reporter": "0.0.2" }, "license": "MIT" }
Remove unused dependencies, prepare v0.3.0
Remove unused dependencies, prepare v0.3.0
JSON
mit
apiaryio/fury.js
json
## Code Before: { "name": "fury", "description": "API Description SDK", "version": "0.2.0", "author": "Apiary.io <support@apiary.io>", "main": "./lib/fury", "repository": { "type": "git", "url": "git+ssh://git@github.com:apiaryio/fury.git" }, "engines": { "node": ">= 0.10.x" }, "scripts": { "test": "scripts/test", "prepublish": "scripts/build" }, "dependencies": { "coffee-script": "~1.9", "apiary-blueprint-parser": "", "protagonist": "~0.17.1", "request": "", "sanitizer": "", "underscore": "", "robotskirt": "" }, "devDependencies": { "chai": "~2.1", "coffee-coverage": "^0.4.4", "coveralls": "^2.11.2", "jscoverage": "^0.5.9", "mocha": "~2.1", "mocha-lcov-reporter": "0.0.2" }, "license": "MIT" } ## Instruction: Remove unused dependencies, prepare v0.3.0 ## Code After: { "name": "fury", "description": "API Description SDK", "version": "0.3.0", "author": "Apiary.io <support@apiary.io>", "main": "./lib/fury", "repository": { "type": "git", "url": "git+ssh://git@github.com:apiaryio/fury.git" }, "engines": { "node": ">= 0.10.x" }, "scripts": { "test": "scripts/test", "prepublish": "scripts/build" }, "dependencies": { "coffee-script": "~1.9", "apiary-blueprint-parser": "", "protagonist": "~0.17.1", "sanitizer": "", "underscore": "", "robotskirt": "" }, "devDependencies": { "chai": "~2.1", "coffee-coverage": "^0.4.4", "coveralls": "^2.11.2", "jscoverage": "^0.5.9", "mocha": "~2.1", "mocha-lcov-reporter": "0.0.2" }, "license": "MIT" }
{ "name": "fury", "description": "API Description SDK", - "version": "0.2.0", ? ^ + "version": "0.3.0", ? ^ "author": "Apiary.io <support@apiary.io>", "main": "./lib/fury", "repository": { "type": "git", "url": "git+ssh://git@github.com:apiaryio/fury.git" }, "engines": { "node": ">= 0.10.x" }, "scripts": { "test": "scripts/test", "prepublish": "scripts/build" }, "dependencies": { "coffee-script": "~1.9", "apiary-blueprint-parser": "", "protagonist": "~0.17.1", - "request": "", "sanitizer": "", "underscore": "", "robotskirt": "" }, "devDependencies": { "chai": "~2.1", "coffee-coverage": "^0.4.4", "coveralls": "^2.11.2", "jscoverage": "^0.5.9", "mocha": "~2.1", "mocha-lcov-reporter": "0.0.2" }, "license": "MIT" }
3
0.083333
1
2
1784f316aa95417a4dafbb244f04bac783ab6f21
scripts/connector_run.sh
scripts/connector_run.sh
export COCOON_ID=abc1 export COCOON_CODE_URL=https://github.com/ncodes/cocoon-example-01 export COCOON_CODE_LANG=go export COCOON_BUILD_PARAMS='eyAicGtnX21nciI6ICJnbGlkZSIgfQ==' go run core/main.go connector
export COCOON_ID=abc1 export COCOON_CODE_URL=https://github.com/ncodes/cocoon-example-01 export COCOON_CODE_LANG=go export COCOON_BUILD_PARAMS='eyAicGtnX21nciI6ICJnbGlkZSIgfQ==' #export DEV_ORDERER_ADDR= # directly set the orderer addr (for development) #export DEV_RUN_ROOT_BIN= # force launcher to ignore running the cocoon code build routine and just run a `ccode` binary in the cocoon code source root #export DEV_COCOON_CODE_PORT= # directly set the port to the cocoon code server the connector client connects to. go run core/main.go connector
Add (and comment) more list of environment variables
Add (and comment) more list of environment variables
Shell
agpl-3.0
ncodes/cocoon,ellcrys/cocoon,ellcrys/cocoon,ellcrys/cocoon,ellcrys/cocoon,ncodes/cocoon
shell
## Code Before: export COCOON_ID=abc1 export COCOON_CODE_URL=https://github.com/ncodes/cocoon-example-01 export COCOON_CODE_LANG=go export COCOON_BUILD_PARAMS='eyAicGtnX21nciI6ICJnbGlkZSIgfQ==' go run core/main.go connector ## Instruction: Add (and comment) more list of environment variables ## Code After: export COCOON_ID=abc1 export COCOON_CODE_URL=https://github.com/ncodes/cocoon-example-01 export COCOON_CODE_LANG=go export COCOON_BUILD_PARAMS='eyAicGtnX21nciI6ICJnbGlkZSIgfQ==' #export DEV_ORDERER_ADDR= # directly set the orderer addr (for development) #export DEV_RUN_ROOT_BIN= # force launcher to ignore running the cocoon code build routine and just run a `ccode` binary in the cocoon code source root #export DEV_COCOON_CODE_PORT= # directly set the port to the cocoon code server the connector client connects to. go run core/main.go connector
export COCOON_ID=abc1 export COCOON_CODE_URL=https://github.com/ncodes/cocoon-example-01 export COCOON_CODE_LANG=go export COCOON_BUILD_PARAMS='eyAicGtnX21nciI6ICJnbGlkZSIgfQ==' - + #export DEV_ORDERER_ADDR= # directly set the orderer addr (for development) + #export DEV_RUN_ROOT_BIN= # force launcher to ignore running the cocoon code build routine and just run a `ccode` binary in the cocoon code source root + #export DEV_COCOON_CODE_PORT= # directly set the port to the cocoon code server the connector client connects to. go run core/main.go connector
4
0.666667
3
1
f3e50b4ebb6ec72ee697bb0bfa1adc4cc52d6d43
spec/models/hero_spec.rb
spec/models/hero_spec.rb
require 'spec_helper' describe Hero do describe "Validations" do subject { Factory(:hero) } it { should validate_uniqueness_of :email } it { should validate_uniqueness_of :login } it { should validate_presence_of :email } it { should validate_presence_of :login } end describe "Associations" do it { should have_many :access_tokens } end end
require 'spec_helper' describe Hero do describe "Validations" do subject { Factory(:hero) } it { should validate_uniqueness_of :login } it { should validate_presence_of :login } end describe "Associations" do it { should have_many :access_tokens } end end
Remove validations from the spec
Remove validations from the spec
Ruby
mit
arunthampi/githeroes,arunthampi/githeroes
ruby
## Code Before: require 'spec_helper' describe Hero do describe "Validations" do subject { Factory(:hero) } it { should validate_uniqueness_of :email } it { should validate_uniqueness_of :login } it { should validate_presence_of :email } it { should validate_presence_of :login } end describe "Associations" do it { should have_many :access_tokens } end end ## Instruction: Remove validations from the spec ## Code After: require 'spec_helper' describe Hero do describe "Validations" do subject { Factory(:hero) } it { should validate_uniqueness_of :login } it { should validate_presence_of :login } end describe "Associations" do it { should have_many :access_tokens } end end
require 'spec_helper' describe Hero do describe "Validations" do subject { Factory(:hero) } - it { should validate_uniqueness_of :email } it { should validate_uniqueness_of :login } - it { should validate_presence_of :email } it { should validate_presence_of :login } end describe "Associations" do it { should have_many :access_tokens } end end
2
0.117647
0
2
6f26316caa7c3607e6415f0b649dfcc8992a4ff0
.gitlab-ci.yml
.gitlab-ci.yml
before_script: - apt-get -q update -y - echo " == Installing required packages" - apt-get -q install -y python python-yaml - echo " == Cloning fdroidserver" - test -d fdroidserver && rm -rf fdroidserver - git clone https://gitlab.com/fdroid/fdroidserver.git fdroidserver --depth=10 - export PATH="$PATH:$PWD/fdroidserver" - touch config.py metadata_check: script: - fdroid readmeta - fdroid lint
before_script: - apt-get -q update -y - echo " == Installing required packages" - apt-get -q install -y python python-yaml - echo " == Cloning fdroidserver" - test -d fdroidserver && rm -rf fdroidserver - git clone https://gitlab.com/fdroid/fdroidserver.git fdroidserver --depth=10 - export PATH="$PWD/fdroidserver:$PATH" - touch config.py test: script: - fdroid readmeta - fdroid lint
Set up fdroidserver at the start of PATH
Set up fdroidserver at the start of PATH
YAML
agpl-3.0
f-droid/fdroiddata,f-droid/fdroiddata,f-droid/fdroid-data
yaml
## Code Before: before_script: - apt-get -q update -y - echo " == Installing required packages" - apt-get -q install -y python python-yaml - echo " == Cloning fdroidserver" - test -d fdroidserver && rm -rf fdroidserver - git clone https://gitlab.com/fdroid/fdroidserver.git fdroidserver --depth=10 - export PATH="$PATH:$PWD/fdroidserver" - touch config.py metadata_check: script: - fdroid readmeta - fdroid lint ## Instruction: Set up fdroidserver at the start of PATH ## Code After: before_script: - apt-get -q update -y - echo " == Installing required packages" - apt-get -q install -y python python-yaml - echo " == Cloning fdroidserver" - test -d fdroidserver && rm -rf fdroidserver - git clone https://gitlab.com/fdroid/fdroidserver.git fdroidserver --depth=10 - export PATH="$PWD/fdroidserver:$PATH" - touch config.py test: script: - fdroid readmeta - fdroid lint
before_script: - apt-get -q update -y - echo " == Installing required packages" - apt-get -q install -y python python-yaml - echo " == Cloning fdroidserver" - test -d fdroidserver && rm -rf fdroidserver - git clone https://gitlab.com/fdroid/fdroidserver.git fdroidserver --depth=10 - - export PATH="$PATH:$PWD/fdroidserver" ? ------ + - export PATH="$PWD/fdroidserver:$PATH" ? ++++++ - touch config.py - metadata_check: + test: script: - fdroid readmeta - fdroid lint
4
0.285714
2
2
0c68a023aca936393a91aa96f3606eb65df97757
package.yaml
package.yaml
name: blockcat version: 0.0.1 category: Language stability: alpha maintainer: Shao Cheng <astrohavoc@gmail.com> copyright: (c) 2017 Shao Cheng license: BSD3 github: TerrorJack/blockcat extra-source-files: - README.md - CHANGELOG.md extra-libraries: - binaryen when: - condition: os(windows) then: include-dirs: - C:\\msys64\\usr\\local\\include extra-lib-dirs: - C:\\msys64\\usr\\local\\lib else: include-dirs: - ~/.local/include extra-lib-dirs: - ~/.local/lib ghc-options: -Wall dependencies: - base >= 4.9 && < 4.10 library: source-dirs: src
name: blockcat version: 0.0.1 category: Language stability: alpha maintainer: Shao Cheng <astrohavoc@gmail.com> copyright: (c) 2017 Shao Cheng license: BSD3 github: TerrorJack/blockcat extra-source-files: - README.md - CHANGELOG.md extra-libraries: - binaryen when: - condition: os(windows) then: include-dirs: - C:\\msys64\\usr\\local\\include extra-lib-dirs: - C:\\msys64\\usr\\local\\lib else: include-dirs: - $HOME/.local/include extra-lib-dirs: - $HOME/.local/lib ghc-options: -Wall dependencies: - base >= 4.9 && < 4.10 library: source-dirs: src
Test if environment variables work in Cabal paths.
Test if environment variables work in Cabal paths.
YAML
bsd-3-clause
TerrorJack/blockcat,TerrorJack/blockcat,TerrorJack/blockcat
yaml
## Code Before: name: blockcat version: 0.0.1 category: Language stability: alpha maintainer: Shao Cheng <astrohavoc@gmail.com> copyright: (c) 2017 Shao Cheng license: BSD3 github: TerrorJack/blockcat extra-source-files: - README.md - CHANGELOG.md extra-libraries: - binaryen when: - condition: os(windows) then: include-dirs: - C:\\msys64\\usr\\local\\include extra-lib-dirs: - C:\\msys64\\usr\\local\\lib else: include-dirs: - ~/.local/include extra-lib-dirs: - ~/.local/lib ghc-options: -Wall dependencies: - base >= 4.9 && < 4.10 library: source-dirs: src ## Instruction: Test if environment variables work in Cabal paths. ## Code After: name: blockcat version: 0.0.1 category: Language stability: alpha maintainer: Shao Cheng <astrohavoc@gmail.com> copyright: (c) 2017 Shao Cheng license: BSD3 github: TerrorJack/blockcat extra-source-files: - README.md - CHANGELOG.md extra-libraries: - binaryen when: - condition: os(windows) then: include-dirs: - C:\\msys64\\usr\\local\\include extra-lib-dirs: - C:\\msys64\\usr\\local\\lib else: include-dirs: - $HOME/.local/include extra-lib-dirs: - $HOME/.local/lib ghc-options: -Wall dependencies: - base >= 4.9 && < 4.10 library: source-dirs: src
name: blockcat version: 0.0.1 category: Language stability: alpha maintainer: Shao Cheng <astrohavoc@gmail.com> copyright: (c) 2017 Shao Cheng license: BSD3 github: TerrorJack/blockcat extra-source-files: - README.md - CHANGELOG.md extra-libraries: - binaryen when: - condition: os(windows) then: include-dirs: - C:\\msys64\\usr\\local\\include extra-lib-dirs: - C:\\msys64\\usr\\local\\lib else: include-dirs: - - ~/.local/include ? ^ + - $HOME/.local/include ? ^^^^^ extra-lib-dirs: - - ~/.local/lib ? ^ + - $HOME/.local/lib ? ^^^^^ ghc-options: -Wall dependencies: - base >= 4.9 && < 4.10 library: source-dirs: src
4
0.111111
2
2
ffa87366f0c7967323abead2eeac87ade9adcdd7
lib/emcee/railtie.rb
lib/emcee/railtie.rb
require "emcee/html_processor" require "emcee/html_compressor" module Emcee class Railtie < Rails::Railtie initializer :add_html_processor do |app| app.assets.register_mime_type "text/html", ".html" app.assets.register_preprocessor "text/html", HtmlProcessor end end end # Monkey patch Sprockets-rails so that loose html files are handled correctly. # # Not sure that modifying another gem's railtie is a good idea, but it works # for now. module Sprockets class Railtie # Remove the LOOSE_APP_ASSETS constant so we can modify it without Ruby # complaining. remove_const(:LOOSE_APP_ASSETS) if defined?(LOOSE_APP_ASSETS) # Add .html to the loose app assets file extensions. LOOSE_APP_ASSETS = lambda do |filename, path| path =~ /app\/assets/ && !%w(.js .css .html).include?(File.extname(filename)) end # Add the .html extension to the 'precompile' regex. config.assets.precompile = [LOOSE_APP_ASSETS, /(?:\/|\\|\A)application\.(css|js|html)$/] end end
require "emcee/html_processor" require "emcee/html_compressor" module Emcee class Railtie < Rails::Railtie initializer :add_html_processor do |app| app.assets.register_mime_type "text/html", ".html" app.assets.register_preprocessor "text/html", HtmlProcessor end initializer :add_html_compressor do |app| app.assets.register_bundle_processor "text/html", :html_compressor do |context, data| HtmlCompressor.new.compress(data) end end end end # Monkey patch Sprockets-rails so that loose html files are handled correctly. # # Not sure that modifying another gem's railtie is a good idea, but it works # for now. module Sprockets class Railtie # Remove the LOOSE_APP_ASSETS constant so we can modify it without Ruby # complaining. remove_const(:LOOSE_APP_ASSETS) if defined?(LOOSE_APP_ASSETS) # Add .html to the loose app assets file extensions. LOOSE_APP_ASSETS = lambda do |filename, path| path =~ /app\/assets/ && !%w(.js .css .html).include?(File.extname(filename)) end # Add the .html extension to the 'precompile' regex. config.assets.precompile = [LOOSE_APP_ASSETS, /(?:\/|\\|\A)application\.(css|js|html)$/] end end
Add html compressor as shorthand bundle processor
Add html compressor as shorthand bundle processor
Ruby
mit
ahuth/emcee,ahuth/emcee,ahuth/emcee
ruby
## Code Before: require "emcee/html_processor" require "emcee/html_compressor" module Emcee class Railtie < Rails::Railtie initializer :add_html_processor do |app| app.assets.register_mime_type "text/html", ".html" app.assets.register_preprocessor "text/html", HtmlProcessor end end end # Monkey patch Sprockets-rails so that loose html files are handled correctly. # # Not sure that modifying another gem's railtie is a good idea, but it works # for now. module Sprockets class Railtie # Remove the LOOSE_APP_ASSETS constant so we can modify it without Ruby # complaining. remove_const(:LOOSE_APP_ASSETS) if defined?(LOOSE_APP_ASSETS) # Add .html to the loose app assets file extensions. LOOSE_APP_ASSETS = lambda do |filename, path| path =~ /app\/assets/ && !%w(.js .css .html).include?(File.extname(filename)) end # Add the .html extension to the 'precompile' regex. config.assets.precompile = [LOOSE_APP_ASSETS, /(?:\/|\\|\A)application\.(css|js|html)$/] end end ## Instruction: Add html compressor as shorthand bundle processor ## Code After: require "emcee/html_processor" require "emcee/html_compressor" module Emcee class Railtie < Rails::Railtie initializer :add_html_processor do |app| app.assets.register_mime_type "text/html", ".html" app.assets.register_preprocessor "text/html", HtmlProcessor end initializer :add_html_compressor do |app| app.assets.register_bundle_processor "text/html", :html_compressor do |context, data| HtmlCompressor.new.compress(data) end end end end # Monkey patch Sprockets-rails so that loose html files are handled correctly. # # Not sure that modifying another gem's railtie is a good idea, but it works # for now. module Sprockets class Railtie # Remove the LOOSE_APP_ASSETS constant so we can modify it without Ruby # complaining. remove_const(:LOOSE_APP_ASSETS) if defined?(LOOSE_APP_ASSETS) # Add .html to the loose app assets file extensions. LOOSE_APP_ASSETS = lambda do |filename, path| path =~ /app\/assets/ && !%w(.js .css .html).include?(File.extname(filename)) end # Add the .html extension to the 'precompile' regex. config.assets.precompile = [LOOSE_APP_ASSETS, /(?:\/|\\|\A)application\.(css|js|html)$/] end end
require "emcee/html_processor" require "emcee/html_compressor" module Emcee class Railtie < Rails::Railtie initializer :add_html_processor do |app| app.assets.register_mime_type "text/html", ".html" app.assets.register_preprocessor "text/html", HtmlProcessor + end + + initializer :add_html_compressor do |app| + app.assets.register_bundle_processor "text/html", :html_compressor do |context, data| + HtmlCompressor.new.compress(data) + end end end end # Monkey patch Sprockets-rails so that loose html files are handled correctly. # # Not sure that modifying another gem's railtie is a good idea, but it works # for now. module Sprockets class Railtie # Remove the LOOSE_APP_ASSETS constant so we can modify it without Ruby # complaining. remove_const(:LOOSE_APP_ASSETS) if defined?(LOOSE_APP_ASSETS) # Add .html to the loose app assets file extensions. LOOSE_APP_ASSETS = lambda do |filename, path| path =~ /app\/assets/ && !%w(.js .css .html).include?(File.extname(filename)) end # Add the .html extension to the 'precompile' regex. config.assets.precompile = [LOOSE_APP_ASSETS, /(?:\/|\\|\A)application\.(css|js|html)$/] end end
6
0.193548
6
0
4699a88925bb03eec6e3e6b7a01cd8b0979521d4
Modules/ThirdParty/GoogleTest/UpdateFromUpstream.sh
Modules/ThirdParty/GoogleTest/UpdateFromUpstream.sh
thirdparty_module_name='GoogleTest' upstream_git_url='https://github.com/google/googletest.git' upstream_git_branch='master' github_compare=true snapshot_author_name='GoogleTest Upstream' snapshot_author_email='googletestframework@googlegroups.com' snapshot_redact_cmd='' snapshot_relative_path='src/itkgoogletest' snapshot_paths=' CMakeLists.txt googletest/CMakeLists.txt googletest/cmake googletest/src googletest/include ' source "${BASH_SOURCE%/*}/../../../Utilities/Maintenance/UpdateThirdPartyFromUpstream.sh" update_from_upstream
thirdparty_module_name='GoogleTest' upstream_git_url='https://github.com/google/googletest.git' upstream_git_branch='release-1.10.0' github_compare=true snapshot_author_name='GoogleTest Upstream' snapshot_author_email='googletestframework@googlegroups.com' snapshot_redact_cmd='' snapshot_relative_path='src/itkgoogletest' snapshot_paths=' CMakeLists.txt googletest/CMakeLists.txt googletest/cmake googletest/src googletest/include ' source "${BASH_SOURCE%/*}/../../../Utilities/Maintenance/UpdateThirdPartyFromUpstream.sh" update_from_upstream
Revert "ENH: use master branch of GoogleTest until a stable version is released"
Revert "ENH: use master branch of GoogleTest until a stable version is released" This reverts commit 58d757c4afa7cf707e0063ae89c95f784de0d7f9.
Shell
apache-2.0
thewtex/ITK,richardbeare/ITK,BRAINSia/ITK,vfonov/ITK,hjmjohnson/ITK,vfonov/ITK,thewtex/ITK,InsightSoftwareConsortium/ITK,BRAINSia/ITK,LucasGandel/ITK,hjmjohnson/ITK,LucasGandel/ITK,hjmjohnson/ITK,vfonov/ITK,vfonov/ITK,LucasGandel/ITK,hjmjohnson/ITK,vfonov/ITK,LucasGandel/ITK,Kitware/ITK,InsightSoftwareConsortium/ITK,richardbeare/ITK,hjmjohnson/ITK,LucasGandel/ITK,Kitware/ITK,Kitware/ITK,InsightSoftwareConsortium/ITK,Kitware/ITK,richardbeare/ITK,thewtex/ITK,BRAINSia/ITK,LucasGandel/ITK,BRAINSia/ITK,BRAINSia/ITK,richardbeare/ITK,Kitware/ITK,richardbeare/ITK,InsightSoftwareConsortium/ITK,InsightSoftwareConsortium/ITK,vfonov/ITK,BRAINSia/ITK,vfonov/ITK,richardbeare/ITK,richardbeare/ITK,hjmjohnson/ITK,LucasGandel/ITK,BRAINSia/ITK,Kitware/ITK,Kitware/ITK,thewtex/ITK,vfonov/ITK,thewtex/ITK,vfonov/ITK,LucasGandel/ITK,InsightSoftwareConsortium/ITK,InsightSoftwareConsortium/ITK,thewtex/ITK,thewtex/ITK,hjmjohnson/ITK
shell
## Code Before: thirdparty_module_name='GoogleTest' upstream_git_url='https://github.com/google/googletest.git' upstream_git_branch='master' github_compare=true snapshot_author_name='GoogleTest Upstream' snapshot_author_email='googletestframework@googlegroups.com' snapshot_redact_cmd='' snapshot_relative_path='src/itkgoogletest' snapshot_paths=' CMakeLists.txt googletest/CMakeLists.txt googletest/cmake googletest/src googletest/include ' source "${BASH_SOURCE%/*}/../../../Utilities/Maintenance/UpdateThirdPartyFromUpstream.sh" update_from_upstream ## Instruction: Revert "ENH: use master branch of GoogleTest until a stable version is released" This reverts commit 58d757c4afa7cf707e0063ae89c95f784de0d7f9. ## Code After: thirdparty_module_name='GoogleTest' upstream_git_url='https://github.com/google/googletest.git' upstream_git_branch='release-1.10.0' github_compare=true snapshot_author_name='GoogleTest Upstream' snapshot_author_email='googletestframework@googlegroups.com' snapshot_redact_cmd='' snapshot_relative_path='src/itkgoogletest' snapshot_paths=' CMakeLists.txt googletest/CMakeLists.txt googletest/cmake googletest/src googletest/include ' source "${BASH_SOURCE%/*}/../../../Utilities/Maintenance/UpdateThirdPartyFromUpstream.sh" update_from_upstream
thirdparty_module_name='GoogleTest' upstream_git_url='https://github.com/google/googletest.git' - upstream_git_branch='master' ? ^ - ^ + upstream_git_branch='release-1.10.0' ? ^^^^ ^^^^^^^ github_compare=true snapshot_author_name='GoogleTest Upstream' snapshot_author_email='googletestframework@googlegroups.com' snapshot_redact_cmd='' snapshot_relative_path='src/itkgoogletest' snapshot_paths=' CMakeLists.txt googletest/CMakeLists.txt googletest/cmake googletest/src googletest/include ' source "${BASH_SOURCE%/*}/../../../Utilities/Maintenance/UpdateThirdPartyFromUpstream.sh" update_from_upstream
2
0.086957
1
1
7d66d70cb1f63109aa106daa19a8c1e1b9eb7630
heltour/tournament/templates/tournament/register.html
heltour/tournament/templates/tournament/register.html
{% extends "base.html" %} {% load bootstrap3 tournament_extras %} {% block title %}Registration - {{ season.name }} - {{ league.name }}{% endblock %} {% block content %} <div class="row row-condensed-xs"> <div class="col-md-12"> <div class="well" id="well-register"> <div class="well-head"> <h3>{{ registration_season.name }} Registration ({{ registration_season.start_date|date_or_q }} - {{ registration_season.end_date|date_or_q }})</h3> </div> <div class="well-body"> <form action="" method="post"> {% csrf_token %} {% bootstrap_form form %} {% buttons %} <button type="submit" class="btn btn-primary">Submit</button> {% endbuttons %} </form> </div> </div> </div> </div> {% endblock %}
{% extends "base.html" %} {% load bootstrap3 tournament_extras %} {% block title %}Registration - {{ registration_season.name }} - {{ league.name }}{% endblock %} {% block content %} <div class="row row-condensed-xs"> <div class="col-md-12"> <div class="well" id="well-register"> <div class="well-head"> <h3>{{ registration_season.name }} Registration</h3> </div> <div class="well-body"> {% if registration_season.start_date %} <p>The season {% if registration_season.is_started %}started{% else %}starts{% endif %} {{ registration_season.start_date|date_or_q }}{% if registration_season.end_date %} and ends {{ registration_season.end_date|date_or_q }}{% endif %}.</p> {% endif %} <form action="" method="post"> {% csrf_token %} {% bootstrap_form form %} {% buttons %} <button type="submit" class="btn btn-primary">Submit</button> {% endbuttons %} </form> </div> </div> </div> </div> {% endblock %}
Move the season start and end date out of the title for registration
Move the season start and end date out of the title for registration
HTML
mit
cyanfish/heltour,cyanfish/heltour,cyanfish/heltour,cyanfish/heltour
html
## Code Before: {% extends "base.html" %} {% load bootstrap3 tournament_extras %} {% block title %}Registration - {{ season.name }} - {{ league.name }}{% endblock %} {% block content %} <div class="row row-condensed-xs"> <div class="col-md-12"> <div class="well" id="well-register"> <div class="well-head"> <h3>{{ registration_season.name }} Registration ({{ registration_season.start_date|date_or_q }} - {{ registration_season.end_date|date_or_q }})</h3> </div> <div class="well-body"> <form action="" method="post"> {% csrf_token %} {% bootstrap_form form %} {% buttons %} <button type="submit" class="btn btn-primary">Submit</button> {% endbuttons %} </form> </div> </div> </div> </div> {% endblock %} ## Instruction: Move the season start and end date out of the title for registration ## Code After: {% extends "base.html" %} {% load bootstrap3 tournament_extras %} {% block title %}Registration - {{ registration_season.name }} - {{ league.name }}{% endblock %} {% block content %} <div class="row row-condensed-xs"> <div class="col-md-12"> <div class="well" id="well-register"> <div class="well-head"> <h3>{{ registration_season.name }} Registration</h3> </div> <div class="well-body"> {% if registration_season.start_date %} <p>The season {% if registration_season.is_started %}started{% else %}starts{% endif %} {{ registration_season.start_date|date_or_q }}{% if registration_season.end_date %} and ends {{ registration_season.end_date|date_or_q }}{% endif %}.</p> {% endif %} <form action="" method="post"> {% csrf_token %} {% bootstrap_form form %} {% buttons %} <button type="submit" class="btn btn-primary">Submit</button> {% endbuttons %} </form> </div> </div> </div> </div> {% endblock %}
{% extends "base.html" %} {% load bootstrap3 tournament_extras %} - {% block title %}Registration - {{ season.name }} - {{ league.name }}{% endblock %} + {% block title %}Registration - {{ registration_season.name }} - {{ league.name }}{% endblock %} ? +++++++++++++ {% block content %} <div class="row row-condensed-xs"> <div class="col-md-12"> <div class="well" id="well-register"> <div class="well-head"> - <h3>{{ registration_season.name }} Registration ({{ registration_season.start_date|date_or_q }} - {{ registration_season.end_date|date_or_q }})</h3> + <h3>{{ registration_season.name }} Registration</h3> </div> <div class="well-body"> + {% if registration_season.start_date %} + <p>The season {% if registration_season.is_started %}started{% else %}starts{% endif %} {{ registration_season.start_date|date_or_q }}{% if registration_season.end_date %} and ends {{ registration_season.end_date|date_or_q }}{% endif %}.</p> + {% endif %} <form action="" method="post"> {% csrf_token %} {% bootstrap_form form %} {% buttons %} <button type="submit" class="btn btn-primary">Submit</button> {% endbuttons %} </form> </div> </div> </div> </div> {% endblock %}
7
0.28
5
2
6d8a5911ee29ecb8e0e047c17fdaab14205e35d6
docsite/source/testing.html.md
docsite/source/testing.html.md
--- title: Testing layout: gem-single name: dry-container --- ### Stub To stub your containers call `#stub` method: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container[:redis] # => "Redis instance" require 'dry/container/stub' # before stub you need to enable stubs for specific container container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container[:redis] # => "Stubbed redis instance" ``` Also, you can unstub container: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container[:redis] # => "Redis instance" require 'dry/container/stub' container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container[:redis] # => "Stubbed redis instance" container.unstub(:redis) # => "Redis instance" ```
--- title: Testing layout: gem-single name: dry-container --- ### Stub To stub your containers call `#stub` method: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container[:redis] # => "Redis instance" require 'dry/container/stub' # before stub you need to enable stubs for specific container container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container[:redis] # => "Stubbed redis instance" ``` Also, you can unstub container: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container[:redis] # => "Redis instance" require 'dry/container/stub' container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container[:redis] # => "Stubbed redis instance" container.unstub(:redis) # => "Redis instance" ``` To clear all stubs at once, call `#unstub` without any arguments: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container.register(:db) { "DB instance" } require 'dry/container/stub' container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container.stub(:db, "Stubbed DB instance") container.unstub # This will unstub all previously stubbed keys container[:redis] # => "Redis instance" container[:db] # => "Redis instance" ```
Add an example unstubbing all keys at once
Docs: Add an example unstubbing all keys at once
Markdown
mit
dryrb/dry-container
markdown
## Code Before: --- title: Testing layout: gem-single name: dry-container --- ### Stub To stub your containers call `#stub` method: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container[:redis] # => "Redis instance" require 'dry/container/stub' # before stub you need to enable stubs for specific container container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container[:redis] # => "Stubbed redis instance" ``` Also, you can unstub container: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container[:redis] # => "Redis instance" require 'dry/container/stub' container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container[:redis] # => "Stubbed redis instance" container.unstub(:redis) # => "Redis instance" ``` ## Instruction: Docs: Add an example unstubbing all keys at once ## Code After: --- title: Testing layout: gem-single name: dry-container --- ### Stub To stub your containers call `#stub` method: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container[:redis] # => "Redis instance" require 'dry/container/stub' # before stub you need to enable stubs for specific container container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container[:redis] # => "Stubbed redis instance" ``` Also, you can unstub container: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container[:redis] # => "Redis instance" require 'dry/container/stub' container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container[:redis] # => "Stubbed redis instance" container.unstub(:redis) # => "Redis instance" ``` To clear all stubs at once, call `#unstub` without any arguments: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container.register(:db) { "DB instance" } require 'dry/container/stub' container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container.stub(:db, "Stubbed DB instance") container.unstub # This will unstub all previously stubbed keys container[:redis] # => "Redis instance" container[:db] # => "Redis instance" ```
--- title: Testing layout: gem-single name: dry-container --- ### Stub To stub your containers call `#stub` method: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container[:redis] # => "Redis instance" require 'dry/container/stub' # before stub you need to enable stubs for specific container container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container[:redis] # => "Stubbed redis instance" ``` Also, you can unstub container: ```ruby container = Dry::Container.new container.register(:redis) { "Redis instance" } container[:redis] # => "Redis instance" require 'dry/container/stub' container.enable_stubs! container.stub(:redis, "Stubbed redis instance") container[:redis] # => "Stubbed redis instance" container.unstub(:redis) # => "Redis instance" ``` + + To clear all stubs at once, call `#unstub` without any arguments: + + ```ruby + container = Dry::Container.new + container.register(:redis) { "Redis instance" } + container.register(:db) { "DB instance" } + + require 'dry/container/stub' + container.enable_stubs! + container.stub(:redis, "Stubbed redis instance") + container.stub(:db, "Stubbed DB instance") + + container.unstub # This will unstub all previously stubbed keys + + container[:redis] # => "Redis instance" + container[:db] # => "Redis instance" + ```
18
0.461538
18
0
60e0343777b39fc0b387f060208b197ce3eb4032
lib/sendhub.rb
lib/sendhub.rb
require 'uri' require 'net/http' require 'net/https' require 'digest/sha1' require 'cgi' require 'rubygems' require 'json' module Sendhub end require 'sendhub/http' require 'sendhub/response' require 'sendhub/client' if defined? Rails if Rails.version =~ /^2./ require 'action_mailer' require 'sendhub/plugins/rails2' elsif Rails.version =~ /^3./ require 'sendhub/plugins/rails3' elsif Rails.version =~ /^4./ require 'sendhub/plugins/rails3' end end
require 'uri' require 'net/http' require 'net/https' require 'digest/sha1' require 'cgi' require 'rubygems' require 'json' module Sendhub end require 'sendhub/http' require 'sendhub/response' require 'sendhub/client' if defined? Rails if Rails.version =~ /^2./ require 'action_mailer' require 'sendhub/plugins/rails2' elsif Rails.version =~ /^3./ require 'sendhub/plugins/rails3' elsif Rails.version =~ /^4./ require 'sendhub/plugins/rails3' elsif Rails.version =~ /^5./ require 'sendhub/plugins/rails3' end end
Add support for Rails 5.x
Add support for Rails 5.x
Ruby
mit
moocode/sendhub_ruby
ruby
## Code Before: require 'uri' require 'net/http' require 'net/https' require 'digest/sha1' require 'cgi' require 'rubygems' require 'json' module Sendhub end require 'sendhub/http' require 'sendhub/response' require 'sendhub/client' if defined? Rails if Rails.version =~ /^2./ require 'action_mailer' require 'sendhub/plugins/rails2' elsif Rails.version =~ /^3./ require 'sendhub/plugins/rails3' elsif Rails.version =~ /^4./ require 'sendhub/plugins/rails3' end end ## Instruction: Add support for Rails 5.x ## Code After: require 'uri' require 'net/http' require 'net/https' require 'digest/sha1' require 'cgi' require 'rubygems' require 'json' module Sendhub end require 'sendhub/http' require 'sendhub/response' require 'sendhub/client' if defined? Rails if Rails.version =~ /^2./ require 'action_mailer' require 'sendhub/plugins/rails2' elsif Rails.version =~ /^3./ require 'sendhub/plugins/rails3' elsif Rails.version =~ /^4./ require 'sendhub/plugins/rails3' elsif Rails.version =~ /^5./ require 'sendhub/plugins/rails3' end end
require 'uri' require 'net/http' require 'net/https' require 'digest/sha1' require 'cgi' require 'rubygems' require 'json' module Sendhub end require 'sendhub/http' require 'sendhub/response' require 'sendhub/client' if defined? Rails if Rails.version =~ /^2./ require 'action_mailer' require 'sendhub/plugins/rails2' elsif Rails.version =~ /^3./ require 'sendhub/plugins/rails3' elsif Rails.version =~ /^4./ require 'sendhub/plugins/rails3' + elsif Rails.version =~ /^5./ + require 'sendhub/plugins/rails3' end end
2
0.076923
2
0
74a5e70e0451c691fc31c43cd370765f1872ee99
entrypoint.sh
entrypoint.sh
if [ "$(tr '[:upper:]' '[:lower:]' <<<"$NODE_ENV")" = "production" ]; then npm run build:prod fi exec "$@"
if [ "$(tr '[:upper:]' '[:lower:]' <<<"$NODE_ENV")" = "production" ]; then npm run build:prod git rev-parse HEAD >.build/revision fi exec "$@"
Add a static file serving the build's git revision
Add a static file serving the build's git revision
Shell
agpl-3.0
EdenSG/democracy.io,EFForg/democracy.io,EdenSG/democracy.io,EFForg/democracy.io,EdenSG/democracy.io,EFForg/democracy.io
shell
## Code Before: if [ "$(tr '[:upper:]' '[:lower:]' <<<"$NODE_ENV")" = "production" ]; then npm run build:prod fi exec "$@" ## Instruction: Add a static file serving the build's git revision ## Code After: if [ "$(tr '[:upper:]' '[:lower:]' <<<"$NODE_ENV")" = "production" ]; then npm run build:prod git rev-parse HEAD >.build/revision fi exec "$@"
if [ "$(tr '[:upper:]' '[:lower:]' <<<"$NODE_ENV")" = "production" ]; then npm run build:prod + git rev-parse HEAD >.build/revision fi exec "$@"
1
0.142857
1
0
8ed2df157c52d5242158c0f2d4421ab202ba32ab
ch11-data-warehousing/oltp/04_sqoop_import.sh
ch11-data-warehousing/oltp/04_sqoop_import.sh
sudo -u hdfs hadoop fs -mkdir -p /data/movielens sudo -u hdfs hadoop fs -chown -R $USER: /data/movielens sudo -u hdfs hadoop fs -mkdir -p /user/$USER sudo -u hdfs hadoop fs -chown -R $USER: /user/$USER # Need to have MySQL instance permissions set properly so all nodes of cluster (not just the node running sqoop command) can access the database # Cleanup if necessary sudo -u hdfs hadoop fs -rmr /data/movielens/movie #Sqoop command is sqoop import --connect jdbc:mysql://mgrover-haa-2.vpc.cloudera.com:3306/oltp --username root --query 'SELECT movie.*, group_concat(genre.name) FROM movie JOIN movie_genre ON (movie.id = movie_genre.movie_id) JOIN genre ON (movie_genre.genre_id = genre.id) GROUP BY movie.id WHERE $CONDITIONS' \ --split-by movie.id --as-avrodatafile --target-dir /data/movielens/movie
sudo -u hdfs hadoop fs -mkdir -p /data/movielens sudo -u hdfs hadoop fs -chown -R $USER: /data/movielens sudo -u hdfs hadoop fs -mkdir -p /user/$USER sudo -u hdfs hadoop fs -chown -R $USER: /user/$USER # Need to have MySQL instance permissions set properly so all nodes of cluster (not just the node running sqoop command) can access the database # Cleanup if necessary sudo -u hdfs hadoop fs -rmr /data/movielens/movie #Sqoop command is sqoop import --connect jdbc:mysql://mgrover-haa-2.vpc.cloudera.com:3306/oltp --username root --query 'SELECT movie.*, group_concat(genre.name) FROM movie JOIN movie_genre ON (movie.id = movie_genre.movie_id) JOIN genre ON (movie_genre.genre_id = genre.id) WHERE $CONDITIONS GROUP BY movie.id' \ --split-by movie.id --as-avrodatafile --target-dir /data/movielens/movie
Correct the error in SQL statement
Correct the error in SQL statement
Shell
apache-2.0
smartpcr/hadoop-arch-book,hadooparchitecturebook/hadoop-arch-book,hadooparchitecturebook/hadoop-arch-book,smartpcr/hadoop-arch-book,nvoron23/hadoop-arch-book,smartpcr/hadoop-arch-book,hadooparchitecturebook/hadoop-arch-book,nvoron23/hadoop-arch-book,nvoron23/hadoop-arch-book
shell
## Code Before: sudo -u hdfs hadoop fs -mkdir -p /data/movielens sudo -u hdfs hadoop fs -chown -R $USER: /data/movielens sudo -u hdfs hadoop fs -mkdir -p /user/$USER sudo -u hdfs hadoop fs -chown -R $USER: /user/$USER # Need to have MySQL instance permissions set properly so all nodes of cluster (not just the node running sqoop command) can access the database # Cleanup if necessary sudo -u hdfs hadoop fs -rmr /data/movielens/movie #Sqoop command is sqoop import --connect jdbc:mysql://mgrover-haa-2.vpc.cloudera.com:3306/oltp --username root --query 'SELECT movie.*, group_concat(genre.name) FROM movie JOIN movie_genre ON (movie.id = movie_genre.movie_id) JOIN genre ON (movie_genre.genre_id = genre.id) GROUP BY movie.id WHERE $CONDITIONS' \ --split-by movie.id --as-avrodatafile --target-dir /data/movielens/movie ## Instruction: Correct the error in SQL statement ## Code After: sudo -u hdfs hadoop fs -mkdir -p /data/movielens sudo -u hdfs hadoop fs -chown -R $USER: /data/movielens sudo -u hdfs hadoop fs -mkdir -p /user/$USER sudo -u hdfs hadoop fs -chown -R $USER: /user/$USER # Need to have MySQL instance permissions set properly so all nodes of cluster (not just the node running sqoop command) can access the database # Cleanup if necessary sudo -u hdfs hadoop fs -rmr /data/movielens/movie #Sqoop command is sqoop import --connect jdbc:mysql://mgrover-haa-2.vpc.cloudera.com:3306/oltp --username root --query 'SELECT movie.*, group_concat(genre.name) FROM movie JOIN movie_genre ON (movie.id = movie_genre.movie_id) JOIN genre ON (movie_genre.genre_id = genre.id) WHERE $CONDITIONS GROUP BY movie.id' \ --split-by movie.id --as-avrodatafile --target-dir /data/movielens/movie
sudo -u hdfs hadoop fs -mkdir -p /data/movielens sudo -u hdfs hadoop fs -chown -R $USER: /data/movielens sudo -u hdfs hadoop fs -mkdir -p /user/$USER sudo -u hdfs hadoop fs -chown -R $USER: /user/$USER # Need to have MySQL instance permissions set properly so all nodes of cluster (not just the node running sqoop command) can access the database # Cleanup if necessary sudo -u hdfs hadoop fs -rmr /data/movielens/movie #Sqoop command is sqoop import --connect jdbc:mysql://mgrover-haa-2.vpc.cloudera.com:3306/oltp --username root --query 'SELECT movie.*, group_concat(genre.name) FROM movie JOIN movie_genre ON (movie.id = movie_genre.movie_id) - JOIN genre ON (movie_genre.genre_id = genre.id) GROUP BY movie.id WHERE $CONDITIONS' \ ? ------------------ + JOIN genre ON (movie_genre.genre_id = genre.id) WHERE $CONDITIONS GROUP BY movie.id' \ ? ++++++++++++++++++ --split-by movie.id --as-avrodatafile --target-dir /data/movielens/movie
2
0.125
1
1
3224ec153742a3de23bd721bf35778bdeac87347
docs/user-guide/platforms/vsphere/install-bosh.md
docs/user-guide/platforms/vsphere/install-bosh.md
**Prerequisite:** The machine executing the commands below must be able to access VMs on the vSphere network. Depending on your network topology, a bastion host (jumpbox) may be needed. 1. Get latest version of kubo-deployment: ```bash cd ~ wget https://storage.googleapis.com/kubo-public/kubo-deployment-latest.tgz tar -xvf kubo-deployment-latest.tgz cd ~/kubo-deployment ``` 1. Create a kubo environment to set the configuration for BOSH and Kubo. ```bash export kubo_env=~/kubo-env export kubo_env_name=kubo export kubo_env_path="${kubo_env}/${kubo_env_name}" mkdir -p "${kubo_env}" ./bin/generate_env_config "${kubo_env}" ${kubo_env_name} vsphere ``` The `kubo_env_path` will point to the folder containing the Kubo settings, and will be referred to throughout this guide as `KUBO_ENV`. 1. Populate the environment config skeleton created at `${kubo_env_path}/director.yml` Fill the vSphere user password in the `${kubo_env_path}/director-secrets.yml`. Make sure not to check that file into the VCS. 1. Deploy a BOSH director for Kubo ```bash ./bin/deploy_bosh "${kubo_env_path}" ``` Credentials and SSL certificates for the environment will be generated and saved into the configuration path in a file called `creds.yml`. This file contains sensitive information and should not be stored in VCS. The file `state.json` contains [environment state for the BOSH environment](https://bosh.io/docs/cli-envs.html#deployment-state). Subsequent runs of `bin/bosh_deploy` will apply changes made to the configuration to an already existing BOSH installation, reusing the credentials stored in the `creds.yml`.
**This topic has been relocated to the new Kubo documentation site.** **See [Deploying BOSH for Kubo on vSphere](https://docs-kubo.cfapps.io/installing/vsphere/deploying-bosh-vsphere/).** **For an overview of how to deploy Kubo on vSphere, see [Preparing vSphere for Kubo](https://docs-kubo.cfapps.io/installing/vsphere/).**
Add deprecation notice to "Deploying BOSH for Kubo on vSphere"
Add deprecation notice to "Deploying BOSH for Kubo on vSphere"
Markdown
apache-2.0
jaimegag/kubo-deployment,pivotal-cf-experimental/kubo-deployment,pivotal-cf-experimental/kubo-deployment,jaimegag/kubo-deployment
markdown
## Code Before: **Prerequisite:** The machine executing the commands below must be able to access VMs on the vSphere network. Depending on your network topology, a bastion host (jumpbox) may be needed. 1. Get latest version of kubo-deployment: ```bash cd ~ wget https://storage.googleapis.com/kubo-public/kubo-deployment-latest.tgz tar -xvf kubo-deployment-latest.tgz cd ~/kubo-deployment ``` 1. Create a kubo environment to set the configuration for BOSH and Kubo. ```bash export kubo_env=~/kubo-env export kubo_env_name=kubo export kubo_env_path="${kubo_env}/${kubo_env_name}" mkdir -p "${kubo_env}" ./bin/generate_env_config "${kubo_env}" ${kubo_env_name} vsphere ``` The `kubo_env_path` will point to the folder containing the Kubo settings, and will be referred to throughout this guide as `KUBO_ENV`. 1. Populate the environment config skeleton created at `${kubo_env_path}/director.yml` Fill the vSphere user password in the `${kubo_env_path}/director-secrets.yml`. Make sure not to check that file into the VCS. 1. Deploy a BOSH director for Kubo ```bash ./bin/deploy_bosh "${kubo_env_path}" ``` Credentials and SSL certificates for the environment will be generated and saved into the configuration path in a file called `creds.yml`. This file contains sensitive information and should not be stored in VCS. The file `state.json` contains [environment state for the BOSH environment](https://bosh.io/docs/cli-envs.html#deployment-state). Subsequent runs of `bin/bosh_deploy` will apply changes made to the configuration to an already existing BOSH installation, reusing the credentials stored in the `creds.yml`. ## Instruction: Add deprecation notice to "Deploying BOSH for Kubo on vSphere" ## Code After: **This topic has been relocated to the new Kubo documentation site.** **See [Deploying BOSH for Kubo on vSphere](https://docs-kubo.cfapps.io/installing/vsphere/deploying-bosh-vsphere/).** **For an overview of how to deploy Kubo on vSphere, see [Preparing vSphere for Kubo](https://docs-kubo.cfapps.io/installing/vsphere/).**
+ **This topic has been relocated to the new Kubo documentation site.** - **Prerequisite:** The machine executing the commands below must be able to access VMs on the vSphere network. - Depending on your network topology, a bastion host (jumpbox) may be needed. - 1. Get latest version of kubo-deployment: + **See [Deploying BOSH for Kubo on vSphere](https://docs-kubo.cfapps.io/installing/vsphere/deploying-bosh-vsphere/).** + **For an overview of how to deploy Kubo on vSphere, see [Preparing vSphere for Kubo](https://docs-kubo.cfapps.io/installing/vsphere/).** - ```bash - cd ~ - wget https://storage.googleapis.com/kubo-public/kubo-deployment-latest.tgz - tar -xvf kubo-deployment-latest.tgz - cd ~/kubo-deployment - ``` - - 1. Create a kubo environment to set the configuration for BOSH and Kubo. - - ```bash - export kubo_env=~/kubo-env - export kubo_env_name=kubo - export kubo_env_path="${kubo_env}/${kubo_env_name}" - - mkdir -p "${kubo_env}" - ./bin/generate_env_config "${kubo_env}" ${kubo_env_name} vsphere - ``` - - The `kubo_env_path` will point to the folder containing the Kubo settings, - and will be referred to throughout this guide as `KUBO_ENV`. - - 1. Populate the environment config skeleton created at `${kubo_env_path}/director.yml` - Fill the vSphere user password in the `${kubo_env_path}/director-secrets.yml`. - Make sure not to check that file into the VCS. - - 1. Deploy a BOSH director for Kubo - - ```bash - ./bin/deploy_bosh "${kubo_env_path}" - ``` - Credentials and SSL certificates for the environment will be generated and - saved into the configuration path in a file called `creds.yml`. This file - contains sensitive information and should not be stored in VCS. The file - `state.json` contains - [environment state for the BOSH environment](https://bosh.io/docs/cli-envs.html#deployment-state). - - Subsequent runs of `bin/bosh_deploy` will apply changes made to - the configuration to an already existing BOSH installation, reusing - the credentials stored in the `creds.yml`.
45
1
3
42
46b935bce68581f5e648c020d75bb374a3b07b87
leveldata.ts
leveldata.ts
var levels = { "Entryway": { "map": [ "####E###", "#......#", "#.@....#", "#......#", "#......E", "#.#..#.#", "#......#", "########"], "n_to": "Kitchen", "e_to": "Vehicle maintenance", }, "Kitchen": { "map": [ "########", "#.c.c..#", "#...@..#", "#......#", "#......#", "#. .. .#", "#......#", "####E###"], "s_to": "Entryway", }, "Vehicle maintenance": { "map": [ "##EE####", "#... .##", "#......#", "####...#", "E .##..#", "#. .. .#", "#......#", "########"], "w_to": "Entryway", "n_to": "Service entrance", }, "Service entrance": { "map": [ "########", "#... . #", "#......#", "# ##..#", "# .##..#", "#. .. .#", "#......#", "##EE####"], "s_to": "Vehicle maintenance" } };
var levels = { "Entryway": { "map": [ "####EE######", "#..........#", "#..........#", "#..........#", "#..........#", "#..........#", "#.@........#", "#..........E", "#..........E", "#.#..#.....#", "#..........#", "############"], "n_to": "Kitchen", "e_to": "Vehicle maintenance", }, "Kitchen": { "map": [ "############", "#.c.c......#", "#...@......#", "#..........#", "#..........#", "#..........#", "#..........#", "#..........#", "#..........#", "#. ...... .#", "#..........#", "####EE######"], "s_to": "Entryway", }, "Vehicle maintenance": { "map": [ "##EE########", "#... .##", "#..........#", "#..........#", "#..........#", "####.......#", "# .##......#", "E..##... ..#", "E..........#", "#. .. .....#", "#..........#", "############"], "w_to": "Entryway", "n_to": "Service entrance", }, "Service entrance": { "map": [ "############", "#... ..... #", "#..........#", "#..........#", "#..........#", "# ##......#", "# .##......#", "#..........#", "#..........#", "#. ...... .#", "#..........#", "##EE########"], "s_to": "Vehicle maintenance" } };
Convert levels to 12x12 layout
Convert levels to 12x12 layout
TypeScript
mit
jmacarthur/ld37,jmacarthur/ld37
typescript
## Code Before: var levels = { "Entryway": { "map": [ "####E###", "#......#", "#.@....#", "#......#", "#......E", "#.#..#.#", "#......#", "########"], "n_to": "Kitchen", "e_to": "Vehicle maintenance", }, "Kitchen": { "map": [ "########", "#.c.c..#", "#...@..#", "#......#", "#......#", "#. .. .#", "#......#", "####E###"], "s_to": "Entryway", }, "Vehicle maintenance": { "map": [ "##EE####", "#... .##", "#......#", "####...#", "E .##..#", "#. .. .#", "#......#", "########"], "w_to": "Entryway", "n_to": "Service entrance", }, "Service entrance": { "map": [ "########", "#... . #", "#......#", "# ##..#", "# .##..#", "#. .. .#", "#......#", "##EE####"], "s_to": "Vehicle maintenance" } }; ## Instruction: Convert levels to 12x12 layout ## Code After: var levels = { "Entryway": { "map": [ "####EE######", "#..........#", "#..........#", "#..........#", "#..........#", "#..........#", "#.@........#", "#..........E", "#..........E", "#.#..#.....#", "#..........#", "############"], "n_to": "Kitchen", "e_to": "Vehicle maintenance", }, "Kitchen": { "map": [ "############", "#.c.c......#", "#...@......#", "#..........#", "#..........#", "#..........#", "#..........#", "#..........#", "#..........#", "#. ...... .#", "#..........#", "####EE######"], "s_to": "Entryway", }, "Vehicle maintenance": { "map": [ "##EE########", "#... .##", "#..........#", "#..........#", "#..........#", "####.......#", "# .##......#", "E..##... ..#", "E..........#", "#. .. .....#", "#..........#", "############"], "w_to": "Entryway", "n_to": "Service entrance", }, "Service entrance": { "map": [ "############", "#... ..... #", "#..........#", "#..........#", "#..........#", "# ##......#", "# .##......#", "#..........#", "#..........#", "#. ...... .#", "#..........#", "##EE########"], "s_to": "Vehicle maintenance" } };
var levels = { "Entryway": { - "map": [ "####E###", + "map": [ "####EE######", ? ++++ - "#......#", + "#..........#", ? ++++ - "#.@....#", - "#......#", + "#..........#", ? ++++ - "#......E", - "#.#..#.#", - "#......#", + "#..........#", ? ++++ + "#..........#", + "#..........#", + "#.@........#", + "#..........E", + "#..........E", + "#.#..#.....#", + "#..........#", - "########"], + "############"], ? ++++ "n_to": "Kitchen", "e_to": "Vehicle maintenance", }, "Kitchen": { - "map": [ "########", + "map": [ "############", ? ++++ - "#.c.c..#", + "#.c.c......#", ? ++++ - "#...@..#", + "#...@......#", ? ++++ - "#......#", + "#..........#", ? ++++ - "#......#", + "#..........#", ? ++++ - "#. .. .#", - "#......#", + "#..........#", ? ++++ + "#..........#", + "#..........#", + "#..........#", + "#. ...... .#", + "#..........#", - "####E###"], + "####EE######"], ? ++++ "s_to": "Entryway", }, "Vehicle maintenance": { - "map": [ "##EE####", + "map": [ "##EE########", ? ++++ - "#... .##", + "#... .##", ? ++++ - "#......#", + "#..........#", ? ++++ - "####...#", - "E .##..#", - "#. .. .#", - "#......#", + "#..........#", ? ++++ + "#..........#", + "####.......#", + "# .##......#", + "E..##... ..#", + "E..........#", + "#. .. .....#", + "#..........#", - "########"], + "############"], ? ++++ "w_to": "Entryway", "n_to": "Service entrance", }, "Service entrance": { - "map": [ "########", + "map": [ "############", ? ++++ - "#... . #", + "#... ..... #", ? ++++ - "#......#", + "#..........#", ? ++++ - "# ##..#", - "# .##..#", - "#. .. .#", - "#......#", + "#..........#", ? ++++ + "#..........#", + "# ##......#", + "# .##......#", + "#..........#", + "#..........#", + "#. ...... .#", + "#..........#", - "##EE####"], + "##EE########"], ? ++++ "s_to": "Vehicle maintenance" } };
80
1.666667
48
32
4de108f10438363b5e64d10b3473b5866fb12594
tools/valgrind/gtest_exclude/media_unittests.gtest-tsan.txt
tools/valgrind/gtest_exclude/media_unittests.gtest-tsan.txt
AudioBusTest.* AudioRendererAlgorithmTest.*
AudioBusTest.* AudioRendererAlgorithmTest.* VectorMathTest.* VideoFrame.*
Exclude more media tests from TSan runs BUG=157793 TBR=thestig NOTRY=true
Exclude more media tests from TSan runs BUG=157793 TBR=thestig NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11358007 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@165145 0039d316-1c4b-4281-b951-d872f2087c98
Text
bsd-3-clause
fujunwei/chromium-crosswalk,Jonekee/chromium.src,anirudhSK/chromium,axinging/chromium-crosswalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,Just-D/chromium-1,mogoweb/chromium-crosswalk,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,patrickm/chromium.src,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,ltilve/chromium,ondra-novak/chromium.src,Chilledheart/chromium,Jonekee/chromium.src,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,hujiajie/pa-chromium,ltilve/chromium,fujunwei/chromium-crosswalk,anirudhSK/chromium,hujiajie/pa-chromium,anirudhSK/chromium,axinging/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,ltilve/chromium,pozdnyakov/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,anirudhSK/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,hujiajie/pa-chromium,jaruba/chromium.src,M4sse/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,anirudhSK/chromium,jaruba/chromium.src,anirudhSK/chromium,ondra-novak/chromium.src,timopulkkinen/BubbleFish,dushu1203/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,patrickm/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,patrickm/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,dednal/chromium.src,M4sse/chromium.src,patrickm/chromium.src,ltilve/chromium,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,M4sse/chromium.src,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,pozdnyakov/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,dednal/chromium.src,Chilledheart/chromium,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,anirudhSK/chromium,littlstar/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,Just-D/chromium-1,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,littlstar/chromium.src,dushu1203/chromium.src,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,jaruba/chromium.src,ondra-novak/chromium.src,Chilledheart/chromium,Jonekee/chromium.src,Chilledheart/chromium,zcbenz/cefode-chromium,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,ChromiumWebApps/chromium,ltilve/chromium,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,Fireblend/chromium-crosswalk,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,patrickm/chromium.src,Just-D/chromium-1,M4sse/chromium.src,chuan9/chromium-crosswalk,hujiajie/pa-chromium,Chilledheart/chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,hujiajie/pa-chromium,Jonekee/chromium.src,patrickm/chromium.src,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,littlstar/chromium.src,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,zcbenz/cefode-chromium,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,ltilve/chromium,jaruba/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,ChromiumWebApps/chromium,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,dednal/chromium.src,littlstar/chromium.src,hujiajie/pa-chromium,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,hujiajie/pa-chromium,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,Just-D/chromium-1,timopulkkinen/BubbleFish,ondra-novak/chromium.src,jaruba/chromium.src,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,timopulkkinen/BubbleFish,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,zcbenz/cefode-chromium,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,jaruba/chromium.src,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,mogoweb/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,dednal/chromium.src,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,hujiajie/pa-chromium,patrickm/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,hgl888/chromium-crosswalk,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,anirudhSK/chromium,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,jaruba/chromium.src,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,mogoweb/chromium-crosswalk,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,Just-D/chromium-1
text
## Code Before: AudioBusTest.* AudioRendererAlgorithmTest.* ## Instruction: Exclude more media tests from TSan runs BUG=157793 TBR=thestig NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11358007 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@165145 0039d316-1c4b-4281-b951-d872f2087c98 ## Code After: AudioBusTest.* AudioRendererAlgorithmTest.* VectorMathTest.* VideoFrame.*
AudioBusTest.* AudioRendererAlgorithmTest.* + VectorMathTest.* + VideoFrame.*
2
1
2
0