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
51277a34fb426724616618c1afdb893ab2de4c6b
circle.yml
circle.yml
machine: python: version: 2.7.10 dependencies: override: - "pip install -U pip wheel setuptools" - "pip install -e git://github.com/edx/xblock-sdk.git@bddf9f4a2c6e4df28a411c8f632cc2250170ae9d#egg=xblock-sdk" - "pip install -r requirements.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/test.txt" - "pip uninstall -y xblock-problem-builder && python setup.py sdist && pip install dist/xblock-problem-builder-2.5.0.tar.gz" - "pip install -r test_requirements.txt" - "mkdir var" test: override: - "if [ $CIRCLE_NODE_INDEX = '0' ]; then pep8 problem_builder --max-line-length=120; fi": parallel: true - "if [ $CIRCLE_NODE_INDEX = '1' ]; then pylint problem_builder --disable=all --enable=function-redefined,undefined-variable,unused-import,unused-variable; fi": parallel: true - "python run_tests.py": parallel: true files: - "problem_builder/v1/tests/**/*.py" - "problem_builder/tests/**/*.py"
machine: python: version: 2.7.10 dependencies: override: - "pip install -U pip wheel" - "pip install setuptools==24.3.1" - "pip install -e git://github.com/edx/xblock-sdk.git@bddf9f4a2c6e4df28a411c8f632cc2250170ae9d#egg=xblock-sdk" - "pip install -r requirements.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/test.txt" - "pip uninstall -y xblock-problem-builder && python setup.py sdist && pip install dist/xblock-problem-builder-2.5.0.tar.gz" - "pip install -r test_requirements.txt" - "mkdir var" test: override: - "if [ $CIRCLE_NODE_INDEX = '0' ]; then pep8 problem_builder --max-line-length=120; fi": parallel: true - "if [ $CIRCLE_NODE_INDEX = '1' ]; then pylint problem_builder --disable=all --enable=function-redefined,undefined-variable,unused-import,unused-variable; fi": parallel: true - "python run_tests.py": parallel: true files: - "problem_builder/v1/tests/**/*.py" - "problem_builder/tests/**/*.py"
Fix dependency installation for CircleCI builds.
Fix dependency installation for CircleCI builds. XBlock is listed as a dependency in requirements files for xblock-sdk, xblock-utils, and problem-builder itself. These files list different (but compatible) versions of the XBlock repo. Because of that, XBlock gets installed multiple times when installing dependencies for CircleCI builds. Starting with setuptools 25.0.0, the behavior for installing packages on top of existing installs changed; see https://github.com/pypa/setuptools/issues/729 for an example issue that this change in behavior caused. For problem-builder CI builds, the issue was that after installing all dependencies, the egg link for XBlock ended up pointing to the installation of problem-builder itself, creating a situation where the code that ships with XBlock was not accessible from modules that depend on it. This caused imports for any classes defined in the XBlock repo to fail, and CircleCI builds errored out. To fix this, we temporarily pin setuptools to the most recent version that does not exhibit this behavior (24.3.1). An upstream fix seems to be underway (via https://github.com/pypa/pip/pull/3904), but it hasn't been merged/released yet.
YAML
agpl-3.0
proversity-org/problem-builder,proversity-org/problem-builder,proversity-org/problem-builder
yaml
## Code Before: machine: python: version: 2.7.10 dependencies: override: - "pip install -U pip wheel setuptools" - "pip install -e git://github.com/edx/xblock-sdk.git@bddf9f4a2c6e4df28a411c8f632cc2250170ae9d#egg=xblock-sdk" - "pip install -r requirements.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/test.txt" - "pip uninstall -y xblock-problem-builder && python setup.py sdist && pip install dist/xblock-problem-builder-2.5.0.tar.gz" - "pip install -r test_requirements.txt" - "mkdir var" test: override: - "if [ $CIRCLE_NODE_INDEX = '0' ]; then pep8 problem_builder --max-line-length=120; fi": parallel: true - "if [ $CIRCLE_NODE_INDEX = '1' ]; then pylint problem_builder --disable=all --enable=function-redefined,undefined-variable,unused-import,unused-variable; fi": parallel: true - "python run_tests.py": parallel: true files: - "problem_builder/v1/tests/**/*.py" - "problem_builder/tests/**/*.py" ## Instruction: Fix dependency installation for CircleCI builds. XBlock is listed as a dependency in requirements files for xblock-sdk, xblock-utils, and problem-builder itself. These files list different (but compatible) versions of the XBlock repo. Because of that, XBlock gets installed multiple times when installing dependencies for CircleCI builds. Starting with setuptools 25.0.0, the behavior for installing packages on top of existing installs changed; see https://github.com/pypa/setuptools/issues/729 for an example issue that this change in behavior caused. For problem-builder CI builds, the issue was that after installing all dependencies, the egg link for XBlock ended up pointing to the installation of problem-builder itself, creating a situation where the code that ships with XBlock was not accessible from modules that depend on it. This caused imports for any classes defined in the XBlock repo to fail, and CircleCI builds errored out. To fix this, we temporarily pin setuptools to the most recent version that does not exhibit this behavior (24.3.1). An upstream fix seems to be underway (via https://github.com/pypa/pip/pull/3904), but it hasn't been merged/released yet. ## Code After: machine: python: version: 2.7.10 dependencies: override: - "pip install -U pip wheel" - "pip install setuptools==24.3.1" - "pip install -e git://github.com/edx/xblock-sdk.git@bddf9f4a2c6e4df28a411c8f632cc2250170ae9d#egg=xblock-sdk" - "pip install -r requirements.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/test.txt" - "pip uninstall -y xblock-problem-builder && python setup.py sdist && pip install dist/xblock-problem-builder-2.5.0.tar.gz" - "pip install -r test_requirements.txt" - "mkdir var" test: override: - "if [ $CIRCLE_NODE_INDEX = '0' ]; then pep8 problem_builder --max-line-length=120; fi": parallel: true - "if [ $CIRCLE_NODE_INDEX = '1' ]; then pylint problem_builder --disable=all --enable=function-redefined,undefined-variable,unused-import,unused-variable; fi": parallel: true - "python run_tests.py": parallel: true files: - "problem_builder/v1/tests/**/*.py" - "problem_builder/tests/**/*.py"
machine: python: version: 2.7.10 dependencies: override: - - "pip install -U pip wheel setuptools" ? ----------- + - "pip install -U pip wheel" + - "pip install setuptools==24.3.1" - "pip install -e git://github.com/edx/xblock-sdk.git@bddf9f4a2c6e4df28a411c8f632cc2250170ae9d#egg=xblock-sdk" - "pip install -r requirements.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/base.txt" - "pip install -r $VIRTUAL_ENV/src/xblock-sdk/requirements/test.txt" - "pip uninstall -y xblock-problem-builder && python setup.py sdist && pip install dist/xblock-problem-builder-2.5.0.tar.gz" - "pip install -r test_requirements.txt" - "mkdir var" test: override: - "if [ $CIRCLE_NODE_INDEX = '0' ]; then pep8 problem_builder --max-line-length=120; fi": parallel: true - "if [ $CIRCLE_NODE_INDEX = '1' ]; then pylint problem_builder --disable=all --enable=function-redefined,undefined-variable,unused-import,unused-variable; fi": parallel: true - "python run_tests.py": parallel: true files: - "problem_builder/v1/tests/**/*.py" - "problem_builder/tests/**/*.py"
3
0.125
2
1
fa2da37f91dfd880c4488ffd3fcb49ff2c1f8822
CONTRIBUTORS.md
CONTRIBUTORS.md
The following people - listed in alphabetical order - contributed to [Concurrent Programming with Lwt](https://github.com/dkim/rwo-lwt): * [Deokhwan Kim](https://github.com/dkim)
The following people - listed in alphabetical order - contributed to [Concurrent Programming with Lwt](https://github.com/dkim/rwo-lwt): * [Anton Bachin](https://github.com/aantron) * [Deokhwan Kim](https://github.com/dkim)
Add Anton Bachin to contributors list
Add Anton Bachin to contributors list
Markdown
cc0-1.0
dkim/rwo-lwt
markdown
## Code Before: The following people - listed in alphabetical order - contributed to [Concurrent Programming with Lwt](https://github.com/dkim/rwo-lwt): * [Deokhwan Kim](https://github.com/dkim) ## Instruction: Add Anton Bachin to contributors list ## Code After: The following people - listed in alphabetical order - contributed to [Concurrent Programming with Lwt](https://github.com/dkim/rwo-lwt): * [Anton Bachin](https://github.com/aantron) * [Deokhwan Kim](https://github.com/dkim)
The following people - listed in alphabetical order - contributed to [Concurrent Programming with Lwt](https://github.com/dkim/rwo-lwt): + * [Anton Bachin](https://github.com/aantron) * [Deokhwan Kim](https://github.com/dkim)
1
0.333333
1
0
10db07f1fc432f6f3e1e530d28cfbfd6ada0a321
versebot/webparser.py
versebot/webparser.py
from bs4 import BeautifulSoup from urllib.request import urlopen class Parser: """ Parser class for BibleGateway parsing methods. """ def __init__(self): """ Initializes translations attribute and checks if there are any new translations to add to the database. """ trans = self.find_supported_translations() if trans is None: self.translations = None else: self.translations = trans.sort(key=len, reverse=True) def find_supported_translations(self): """ Retrieves a list of supported translations from BibleGateway's translation page. """ url = "http://www.biblegateway.com/versions/" translations = list() page = urlopen(url) soup = BeautifulSoup(page.read()) # It seems that BibleGateway has changed the layout of their versions page. This needs # to be redone! translations = soup.find("select", {"class":"search-translation-select"}) trans = translations.findAll("option") for t in trans: if t.has_attr("value") and not t.has_attr("class"): cur_trans = t["value"] translations.append(cur_trans) # Add local translations to supported translations list translations.append("NJPS") return translations
from bs4 import BeautifulSoup from urllib.request import urlopen class Parser: """ Parser class for BibleGateway parsing methods. """ def __init__(self): """ Initializes translations attribute and checks if there are any new translations to add to the database. """ trans = self.find_supported_translations() if trans is None: self.translations = None else: self.translations = trans.sort(key=len, reverse=True) def find_supported_translations(self): """ Retrieves a list of supported translations from BibleGateway's translation page. """ url = "https://www.biblegateway.com/versions/" translations = list() page = urlopen(url) soup = BeautifulSoup(page.read()) # It seems that BibleGateway has changed the layout of their versions page. This needs # to be redone! translations_select = soup.find("select", {"class":"search-translation-select"}) trans = translations_select.findAll("option") for t in trans: if t.has_attr("value") and not t.has_attr("class"): cur_trans = t["value"] translations.append(cur_trans) # Add local translations to supported translations list translations.append("NJPS") return translations
Rename translations to translations_select, switch to HTTPS
Rename translations to translations_select, switch to HTTPS
Python
mit
Matthew-Arnold/slack-versebot,Matthew-Arnold/slack-versebot
python
## Code Before: from bs4 import BeautifulSoup from urllib.request import urlopen class Parser: """ Parser class for BibleGateway parsing methods. """ def __init__(self): """ Initializes translations attribute and checks if there are any new translations to add to the database. """ trans = self.find_supported_translations() if trans is None: self.translations = None else: self.translations = trans.sort(key=len, reverse=True) def find_supported_translations(self): """ Retrieves a list of supported translations from BibleGateway's translation page. """ url = "http://www.biblegateway.com/versions/" translations = list() page = urlopen(url) soup = BeautifulSoup(page.read()) # It seems that BibleGateway has changed the layout of their versions page. This needs # to be redone! translations = soup.find("select", {"class":"search-translation-select"}) trans = translations.findAll("option") for t in trans: if t.has_attr("value") and not t.has_attr("class"): cur_trans = t["value"] translations.append(cur_trans) # Add local translations to supported translations list translations.append("NJPS") return translations ## Instruction: Rename translations to translations_select, switch to HTTPS ## Code After: from bs4 import BeautifulSoup from urllib.request import urlopen class Parser: """ Parser class for BibleGateway parsing methods. """ def __init__(self): """ Initializes translations attribute and checks if there are any new translations to add to the database. """ trans = self.find_supported_translations() if trans is None: self.translations = None else: self.translations = trans.sort(key=len, reverse=True) def find_supported_translations(self): """ Retrieves a list of supported translations from BibleGateway's translation page. """ url = "https://www.biblegateway.com/versions/" translations = list() page = urlopen(url) soup = BeautifulSoup(page.read()) # It seems that BibleGateway has changed the layout of their versions page. This needs # to be redone! translations_select = soup.find("select", {"class":"search-translation-select"}) trans = translations_select.findAll("option") for t in trans: if t.has_attr("value") and not t.has_attr("class"): cur_trans = t["value"] translations.append(cur_trans) # Add local translations to supported translations list translations.append("NJPS") return translations
from bs4 import BeautifulSoup from urllib.request import urlopen class Parser: """ Parser class for BibleGateway parsing methods. """ def __init__(self): """ Initializes translations attribute and checks if there are any new translations to add to the database. """ trans = self.find_supported_translations() if trans is None: self.translations = None else: self.translations = trans.sort(key=len, reverse=True) def find_supported_translations(self): """ Retrieves a list of supported translations from BibleGateway's translation page. """ - url = "http://www.biblegateway.com/versions/" + url = "https://www.biblegateway.com/versions/" ? + translations = list() page = urlopen(url) soup = BeautifulSoup(page.read()) # It seems that BibleGateway has changed the layout of their versions page. This needs # to be redone! - translations = soup.find("select", {"class":"search-translation-select"}) + translations_select = soup.find("select", {"class":"search-translation-select"}) ? +++++++ - trans = translations.findAll("option") + trans = translations_select.findAll("option") ? +++++++ for t in trans: if t.has_attr("value") and not t.has_attr("class"): cur_trans = t["value"] translations.append(cur_trans) # Add local translations to supported translations list translations.append("NJPS") return translations
6
0.157895
3
3
01a7c3ec9ca4a8a6731a88c665a77b42f9b35c13
src/libzerocoin/sigma/test/coin_tests.cpp
src/libzerocoin/sigma/test/coin_tests.cpp
BOOST_AUTO_TEST_SUITE(sigma_coin_tests) BOOST_AUTO_TEST_CASE(pubcoin_serialization) { secp_primitives::GroupElement coin; coin.randomize(); sigma::PublicCoinV3 pubcoin(coin, sigma::ZQ_GOLDWASSER); CDataStream serialized(SER_NETWORK, PROTOCOL_VERSION); serialized << pubcoin; sigma::PublicCoinV3 deserialized; serialized >> deserialized; BOOST_CHECK(pubcoin == deserialized); } BOOST_AUTO_TEST_CASE(pubcoin_validate) { auto params = sigma::ParamsV3::get_default(); sigma::PrivateCoinV3 privcoin(params); auto& pubcoin = privcoin.getPublicCoin(); BOOST_CHECK(pubcoin.validate()); } BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(sigma_coin_tests) BOOST_AUTO_TEST_CASE(pubcoin_serialization) { secp_primitives::GroupElement coin; coin.randomize(); sigma::PublicCoinV3 pubcoin(coin, sigma::ZQ_GOLDWASSER); CDataStream serialized(SER_NETWORK, PROTOCOL_VERSION); serialized << pubcoin; sigma::PublicCoinV3 deserialized; serialized >> deserialized; BOOST_CHECK(pubcoin == deserialized); } BOOST_AUTO_TEST_CASE(pubcoin_validate) { auto params = sigma::ParamsV3::get_default(); sigma::PrivateCoinV3 privcoin(params); auto& pubcoin = privcoin.getPublicCoin(); BOOST_CHECK(pubcoin.validate()); } BOOST_AUTO_TEST_CASE(getter_setter_priv) { auto params = sigma::ParamsV3::get_default(); sigma::PrivateCoinV3 privcoin(params); sigma::PrivateCoinV3 new_privcoin(params); BOOST_CHECK(privcoin.getPublicCoin() != new_privcoin.getPublicCoin()); BOOST_CHECK(privcoin.getSerialNumber() != new_privcoin.getSerialNumber()); BOOST_CHECK(privcoin.getRandomness() != new_privcoin.getRandomness()); BOOST_CHECK(privcoin.getVersion() == new_privcoin.getVersion()); new_privcoin.setPublicCoin(privcoin.getPublicCoin()); new_privcoin.setRandomness(privcoin.getRandomness()); new_privcoin.setSerialNumber(privcoin.getSerialNumber()); new_privcoin.setVersion(2); BOOST_CHECK(privcoin.getPublicCoin() == new_privcoin.getPublicCoin()); BOOST_CHECK(privcoin.getSerialNumber() == new_privcoin.getSerialNumber()); BOOST_CHECK(privcoin.getRandomness() == new_privcoin.getRandomness()); BOOST_CHECK(new_privcoin.getVersion() == 2); } BOOST_AUTO_TEST_SUITE_END()
Add coin serialize deserialize priv coin
Add coin serialize deserialize priv coin
C++
mit
zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin,zcoinofficial/zcoin
c++
## Code Before: BOOST_AUTO_TEST_SUITE(sigma_coin_tests) BOOST_AUTO_TEST_CASE(pubcoin_serialization) { secp_primitives::GroupElement coin; coin.randomize(); sigma::PublicCoinV3 pubcoin(coin, sigma::ZQ_GOLDWASSER); CDataStream serialized(SER_NETWORK, PROTOCOL_VERSION); serialized << pubcoin; sigma::PublicCoinV3 deserialized; serialized >> deserialized; BOOST_CHECK(pubcoin == deserialized); } BOOST_AUTO_TEST_CASE(pubcoin_validate) { auto params = sigma::ParamsV3::get_default(); sigma::PrivateCoinV3 privcoin(params); auto& pubcoin = privcoin.getPublicCoin(); BOOST_CHECK(pubcoin.validate()); } BOOST_AUTO_TEST_SUITE_END() ## Instruction: Add coin serialize deserialize priv coin ## Code After: BOOST_AUTO_TEST_SUITE(sigma_coin_tests) BOOST_AUTO_TEST_CASE(pubcoin_serialization) { secp_primitives::GroupElement coin; coin.randomize(); sigma::PublicCoinV3 pubcoin(coin, sigma::ZQ_GOLDWASSER); CDataStream serialized(SER_NETWORK, PROTOCOL_VERSION); serialized << pubcoin; sigma::PublicCoinV3 deserialized; serialized >> deserialized; BOOST_CHECK(pubcoin == deserialized); } BOOST_AUTO_TEST_CASE(pubcoin_validate) { auto params = sigma::ParamsV3::get_default(); sigma::PrivateCoinV3 privcoin(params); auto& pubcoin = privcoin.getPublicCoin(); BOOST_CHECK(pubcoin.validate()); } BOOST_AUTO_TEST_CASE(getter_setter_priv) { auto params = sigma::ParamsV3::get_default(); sigma::PrivateCoinV3 privcoin(params); sigma::PrivateCoinV3 new_privcoin(params); BOOST_CHECK(privcoin.getPublicCoin() != new_privcoin.getPublicCoin()); BOOST_CHECK(privcoin.getSerialNumber() != new_privcoin.getSerialNumber()); BOOST_CHECK(privcoin.getRandomness() != new_privcoin.getRandomness()); BOOST_CHECK(privcoin.getVersion() == new_privcoin.getVersion()); new_privcoin.setPublicCoin(privcoin.getPublicCoin()); new_privcoin.setRandomness(privcoin.getRandomness()); new_privcoin.setSerialNumber(privcoin.getSerialNumber()); new_privcoin.setVersion(2); BOOST_CHECK(privcoin.getPublicCoin() == new_privcoin.getPublicCoin()); BOOST_CHECK(privcoin.getSerialNumber() == new_privcoin.getSerialNumber()); BOOST_CHECK(privcoin.getRandomness() == new_privcoin.getRandomness()); BOOST_CHECK(new_privcoin.getVersion() == 2); } BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(sigma_coin_tests) BOOST_AUTO_TEST_CASE(pubcoin_serialization) { secp_primitives::GroupElement coin; coin.randomize(); sigma::PublicCoinV3 pubcoin(coin, sigma::ZQ_GOLDWASSER); CDataStream serialized(SER_NETWORK, PROTOCOL_VERSION); serialized << pubcoin; sigma::PublicCoinV3 deserialized; serialized >> deserialized; BOOST_CHECK(pubcoin == deserialized); } BOOST_AUTO_TEST_CASE(pubcoin_validate) { auto params = sigma::ParamsV3::get_default(); sigma::PrivateCoinV3 privcoin(params); auto& pubcoin = privcoin.getPublicCoin(); BOOST_CHECK(pubcoin.validate()); } + BOOST_AUTO_TEST_CASE(getter_setter_priv) + { + auto params = sigma::ParamsV3::get_default(); + + sigma::PrivateCoinV3 privcoin(params); + sigma::PrivateCoinV3 new_privcoin(params); + + BOOST_CHECK(privcoin.getPublicCoin() != new_privcoin.getPublicCoin()); + BOOST_CHECK(privcoin.getSerialNumber() != new_privcoin.getSerialNumber()); + BOOST_CHECK(privcoin.getRandomness() != new_privcoin.getRandomness()); + BOOST_CHECK(privcoin.getVersion() == new_privcoin.getVersion()); + + new_privcoin.setPublicCoin(privcoin.getPublicCoin()); + new_privcoin.setRandomness(privcoin.getRandomness()); + new_privcoin.setSerialNumber(privcoin.getSerialNumber()); + new_privcoin.setVersion(2); + + BOOST_CHECK(privcoin.getPublicCoin() == new_privcoin.getPublicCoin()); + BOOST_CHECK(privcoin.getSerialNumber() == new_privcoin.getSerialNumber()); + BOOST_CHECK(privcoin.getRandomness() == new_privcoin.getRandomness()); + BOOST_CHECK(new_privcoin.getVersion() == 2); + } + BOOST_AUTO_TEST_SUITE_END()
23
0.766667
23
0
24f5d90b20359692d65ba34228d79ebf1c251abd
src/com/aragaer/jtt/JTTHour.java
src/com/aragaer/jtt/JTTHour.java
package com.aragaer.jtt; public class JTTHour { public static final String Glyphs[] = { "酉", "戌", "亥", "子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申" }; public static final int ticks = 6; public static final int subs = 100; public boolean isNight; public int num; // 0 to 11, where 0 is hour of Cock and 11 is hour of Monkey public int strikes; public int fraction; // 0 to 99 private static final int num_to_strikes(int num) { return 9 - ((num - 3) % ticks); } public JTTHour(int num) { this(num, 0); } public JTTHour(int n, int f) { this.setTo(n, f); } // Instead of reallocation, reuse existing object public void setTo(int n, int f) { num = n; isNight = n < ticks; strikes = num_to_strikes(n); fraction = f; } }
package com.aragaer.jtt; public class JTTHour { public static final String Glyphs[] = "酉戌亥子丑寅卯辰巳午未申".split("(?!^)"); public static final int ticks = 6; public static final int subs = 100; public boolean isNight; public int num; // 0 to 11, where 0 is hour of Cock and 11 is hour of Monkey public int strikes; public int fraction; // 0 to 99 private static final int num_to_strikes(int num) { return 9 - ((num - 3) % ticks); } public JTTHour(int num) { this(num, 0); } public JTTHour(int n, int f) { this.setTo(n, f); } // Instead of reallocation, reuse existing object public void setTo(int n, int f) { num = n; isNight = n < ticks; strikes = num_to_strikes(n); fraction = f; } }
Replace array of glyphs with a single string and split
Replace array of glyphs with a single string and split
Java
mit
aragaer/jtt_android
java
## Code Before: package com.aragaer.jtt; public class JTTHour { public static final String Glyphs[] = { "酉", "戌", "亥", "子", "丑", "寅", "卯", "辰", "巳", "午", "未", "申" }; public static final int ticks = 6; public static final int subs = 100; public boolean isNight; public int num; // 0 to 11, where 0 is hour of Cock and 11 is hour of Monkey public int strikes; public int fraction; // 0 to 99 private static final int num_to_strikes(int num) { return 9 - ((num - 3) % ticks); } public JTTHour(int num) { this(num, 0); } public JTTHour(int n, int f) { this.setTo(n, f); } // Instead of reallocation, reuse existing object public void setTo(int n, int f) { num = n; isNight = n < ticks; strikes = num_to_strikes(n); fraction = f; } } ## Instruction: Replace array of glyphs with a single string and split ## Code After: package com.aragaer.jtt; public class JTTHour { public static final String Glyphs[] = "酉戌亥子丑寅卯辰巳午未申".split("(?!^)"); public static final int ticks = 6; public static final int subs = 100; public boolean isNight; public int num; // 0 to 11, where 0 is hour of Cock and 11 is hour of Monkey public int strikes; public int fraction; // 0 to 99 private static final int num_to_strikes(int num) { return 9 - ((num - 3) % ticks); } public JTTHour(int num) { this(num, 0); } public JTTHour(int n, int f) { this.setTo(n, f); } // Instead of reallocation, reuse existing object public void setTo(int n, int f) { num = n; isNight = n < ticks; strikes = num_to_strikes(n); fraction = f; } }
package com.aragaer.jtt; public class JTTHour { + public static final String Glyphs[] = "酉戌亥子丑寅卯辰巳午未申".split("(?!^)"); - public static final String Glyphs[] = { "酉", "戌", "亥", "子", "丑", "寅", "卯", - "辰", "巳", "午", "未", "申" }; public static final int ticks = 6; public static final int subs = 100; public boolean isNight; public int num; // 0 to 11, where 0 is hour of Cock and 11 is hour of Monkey public int strikes; public int fraction; // 0 to 99 private static final int num_to_strikes(int num) { return 9 - ((num - 3) % ticks); } public JTTHour(int num) { this(num, 0); } public JTTHour(int n, int f) { this.setTo(n, f); } // Instead of reallocation, reuse existing object public void setTo(int n, int f) { num = n; isNight = n < ticks; strikes = num_to_strikes(n); fraction = f; } }
3
0.088235
1
2
108b083cf6bb74ec1d3066389762da64b2b49e05
index.html
index.html
--- layout: default title: Home weight: 1 --- <div class="home container"> <section id="main_content"> <h2> <a name="welcome" class="anchor" href="#welcome"><span class="octicon octicon-link"></span></a>Welcome to my little website!</h2> <p> You can check out my <a href="about/">about page</a> or take a look at my <a href="https://github.com/MasterRoot24" target="_blank">GitHub profile</a>! </p> <p> You can also have a look at my <a href="cv/">CV</a> and also <a href="portfolio/">my portfolio</a> of previous work. </p> <p> If you want to get in touch, you can use the details found on my <a href="contact/">contact page</a>. </p> </section> <h2>Posts</h2> <ul class="posts"> {% for post in site.posts %} <li> <span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a> </li> {% endfor %} </ul> <p class="rss-subscribe">subscribe <a href="{{ "feed.xml" | prepend: site.baseurl }}">via RSS</a></p> </div>
--- layout: default title: Home weight: 1 --- <div class="home container"> <section id="main_content"> <h2> <a name="welcome" class="anchor" href="#welcome"><span class="octicon octicon-link"></span></a>Welcome to my little website!</h2> <p> You can check out my <a href="about/">about page</a> or take a look at my <a href="https://github.com/MasterRoot24" target="_blank">GitHub profile</a>! </p> <p> You can also have a look at my <a href="cv/">CV</a> and also <a href="portfolio/">my portfolio</a> of previous work. </p> <p> If you want to get in touch, you can use the details found on my <a href="contact/">contact page</a>. </p> </section> <h2>Posts</h2> <ul class="posts"> {% for post in site.posts %} <li> <span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a> </li> {% endfor %} </ul> <p class="rss-subscribe">You can also subscribe to my site's feed <a href="{{ "feed.xml" | prepend: site.baseurl }}">via RSS</a>.</p> </div>
Update body text of home page
Update body text of home page
HTML
mit
MasterRoot24/masterroot24.github.io,MasterRoot24/masterroot24.github.io,MasterRoot24/masterroot24.github.io
html
## Code Before: --- layout: default title: Home weight: 1 --- <div class="home container"> <section id="main_content"> <h2> <a name="welcome" class="anchor" href="#welcome"><span class="octicon octicon-link"></span></a>Welcome to my little website!</h2> <p> You can check out my <a href="about/">about page</a> or take a look at my <a href="https://github.com/MasterRoot24" target="_blank">GitHub profile</a>! </p> <p> You can also have a look at my <a href="cv/">CV</a> and also <a href="portfolio/">my portfolio</a> of previous work. </p> <p> If you want to get in touch, you can use the details found on my <a href="contact/">contact page</a>. </p> </section> <h2>Posts</h2> <ul class="posts"> {% for post in site.posts %} <li> <span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a> </li> {% endfor %} </ul> <p class="rss-subscribe">subscribe <a href="{{ "feed.xml" | prepend: site.baseurl }}">via RSS</a></p> </div> ## Instruction: Update body text of home page ## Code After: --- layout: default title: Home weight: 1 --- <div class="home container"> <section id="main_content"> <h2> <a name="welcome" class="anchor" href="#welcome"><span class="octicon octicon-link"></span></a>Welcome to my little website!</h2> <p> You can check out my <a href="about/">about page</a> or take a look at my <a href="https://github.com/MasterRoot24" target="_blank">GitHub profile</a>! </p> <p> You can also have a look at my <a href="cv/">CV</a> and also <a href="portfolio/">my portfolio</a> of previous work. </p> <p> If you want to get in touch, you can use the details found on my <a href="contact/">contact page</a>. </p> </section> <h2>Posts</h2> <ul class="posts"> {% for post in site.posts %} <li> <span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a> </li> {% endfor %} </ul> <p class="rss-subscribe">You can also subscribe to my site's feed <a href="{{ "feed.xml" | prepend: site.baseurl }}">via RSS</a>.</p> </div>
--- layout: default title: Home weight: 1 --- <div class="home container"> <section id="main_content"> <h2> <a name="welcome" class="anchor" href="#welcome"><span class="octicon octicon-link"></span></a>Welcome to my little website!</h2> <p> You can check out my <a href="about/">about page</a> or take a look at my <a href="https://github.com/MasterRoot24" target="_blank">GitHub profile</a>! </p> <p> You can also have a look at my <a href="cv/">CV</a> and also <a href="portfolio/">my portfolio</a> of previous work. </p> <p> If you want to get in touch, you can use the details found on my <a href="contact/">contact page</a>. </p> </section> <h2>Posts</h2> <ul class="posts"> {% for post in site.posts %} <li> <span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span> <a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a> </li> {% endfor %} </ul> - <p class="rss-subscribe">subscribe <a href="{{ "feed.xml" | prepend: site.baseurl }}">via RSS</a></p> + <p class="rss-subscribe">You can also subscribe to my site's feed <a href="{{ "feed.xml" | prepend: site.baseurl }}">via RSS</a>.</p> ? +++++++++++++ ++++++++++++++++++ + </div>
2
0.05
1
1
ad6a93348838649569c8aac5dd1d671bb8391cf6
app/assets/stylesheets/variables.scss
app/assets/stylesheets/variables.scss
// Bootstrap variables $navbar-height: 50px; $navbar-default-bg: #6FCAC2; $navbar-default-color: #fff; $navbar-default-link-color: darken($navbar-default-bg, 30%); $navbar-default-link-active-color: #fff; $navbar-default-brand-color: #fff; $navbar-default-brand-hover-color: #fff; $navbar-default-toggle-border-color: darken($navbar-default-bg, 15%); $navbar-default-toggle-icon-bar-bg: $navbar-default-toggle-border-color; $navbar-default-toggle-hover-bg: lighten($navbar-default-bg, 10%); $brand-primary: $navbar-default-link-color; $font-family-sans-serif: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif !default;
// Bootstrap variables $navbar-height: 50px; $navbar-default-bg: #6FCAC2; $navbar-default-color: #fff; $dropdown-link-hover-bg: $navbar-default-bg; $navbar-default-link-color: darken($navbar-default-bg, 30%); $navbar-default-link-active-color: #fff; $navbar-default-brand-color: #fff; $navbar-default-brand-hover-color: #fff; $navbar-default-toggle-border-color: darken($navbar-default-bg, 15%); $navbar-default-toggle-icon-bar-bg: $navbar-default-toggle-border-color; $navbar-default-toggle-hover-bg: lighten($navbar-default-bg, 10%); $brand-primary: $navbar-default-link-color; $font-family-sans-serif: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif !default;
Fix the dropdown active link colour.
Fix the dropdown active link colour.
SCSS
apache-2.0
dotledger/dotledger,malclocke/dotledger,malclocke/dotledger,malclocke/dotledger,dotledger/dotledger,dotledger/dotledger,dotledger/dotledger
scss
## Code Before: // Bootstrap variables $navbar-height: 50px; $navbar-default-bg: #6FCAC2; $navbar-default-color: #fff; $navbar-default-link-color: darken($navbar-default-bg, 30%); $navbar-default-link-active-color: #fff; $navbar-default-brand-color: #fff; $navbar-default-brand-hover-color: #fff; $navbar-default-toggle-border-color: darken($navbar-default-bg, 15%); $navbar-default-toggle-icon-bar-bg: $navbar-default-toggle-border-color; $navbar-default-toggle-hover-bg: lighten($navbar-default-bg, 10%); $brand-primary: $navbar-default-link-color; $font-family-sans-serif: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif !default; ## Instruction: Fix the dropdown active link colour. ## Code After: // Bootstrap variables $navbar-height: 50px; $navbar-default-bg: #6FCAC2; $navbar-default-color: #fff; $dropdown-link-hover-bg: $navbar-default-bg; $navbar-default-link-color: darken($navbar-default-bg, 30%); $navbar-default-link-active-color: #fff; $navbar-default-brand-color: #fff; $navbar-default-brand-hover-color: #fff; $navbar-default-toggle-border-color: darken($navbar-default-bg, 15%); $navbar-default-toggle-icon-bar-bg: $navbar-default-toggle-border-color; $navbar-default-toggle-hover-bg: lighten($navbar-default-bg, 10%); $brand-primary: $navbar-default-link-color; $font-family-sans-serif: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif !default;
// Bootstrap variables $navbar-height: 50px; $navbar-default-bg: #6FCAC2; $navbar-default-color: #fff; + + $dropdown-link-hover-bg: $navbar-default-bg; $navbar-default-link-color: darken($navbar-default-bg, 30%); $navbar-default-link-active-color: #fff; $navbar-default-brand-color: #fff; $navbar-default-brand-hover-color: #fff; $navbar-default-toggle-border-color: darken($navbar-default-bg, 15%); $navbar-default-toggle-icon-bar-bg: $navbar-default-toggle-border-color; $navbar-default-toggle-hover-bg: lighten($navbar-default-bg, 10%); $brand-primary: $navbar-default-link-color; $font-family-sans-serif: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif !default;
2
0.1
2
0
bd08185749978fd092aa8cf333b4a50e1de412d4
README.md
README.md
このサイトは [hexo](http://zespia.tw/hexo) で構築されています。サイトコンテンツは `source` の位置に markdown フォーマットで書かれています。プルリクエスト、歓迎します! ## 開発 **hexo 3.0** を使っているか確認してください。`localhost:4000` で開発サーバーを開始します。 ``` $ npm install -g hexo-cli $ npm install $ hexo server ``` ## 貢献者 (アルファベット順) - [@hashrock](https://github.com/hashrock) - [@kazupon](https://github.com/kazupon) - [@kojimakazuto](https://github.com/kojimakazuto) - [@positiveflat](https://github.com/positiveflat) - [@tejitak](https://github.com/tejitak) - [@yasunobuigarashi](https://github.com/yasunobuigarashi)
このサイトは [hexo](http://zespia.tw/hexo) で構築されています。サイトコンテンツは `source` の位置に markdown フォーマットで書かれています。プルリクエスト、歓迎します! ## 開発 **hexo 3.0** を使っているか確認してください。`localhost:4000` で開発サーバーを開始します。 ``` $ npm install -g hexo-cli $ npm install $ hexo server ``` ## チャット [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/kazupon/vuejs-jp-gitter) ## 貢献者 (アルファベット順) - [@hashrock](https://github.com/hashrock) - [@kazupon](https://github.com/kazupon) - [@kojimakazuto](https://github.com/kojimakazuto) - [@positiveflat](https://github.com/positiveflat) - [@tejitak](https://github.com/tejitak) - [@yasunobuigarashi](https://github.com/yasunobuigarashi)
Add vuejs-jp users group chat room link
Add vuejs-jp users group chat room link
Markdown
mit
hrysd/vuejs.org,vuejs-jp/jp.vuejs.org,vuejs-jp/012-jp.vuejs.org,sunya9/vuejs.org,vuejs/jp.vuejs.org,y-yagi/vuejs.org,vuejs-jp/vuejs.org,mono0x/vuejs.org,sapics/vuejs.org,sapics/vuejs.org,hrysd/vuejs.org,sunya9/vuejs.org,vuejs-jp/vuejs.org,vuejs-jp/012-jp.vuejs.org,y-yagi/vuejs.org,pocke/vuejs.org,vuejs-jp/jp.vuejs.org,pocke/vuejs.org,potato4d/jp.vuejs.org,mono0x/vuejs.org,vuejs/jp.vuejs.org,potato4d/jp.vuejs.org
markdown
## Code Before: このサイトは [hexo](http://zespia.tw/hexo) で構築されています。サイトコンテンツは `source` の位置に markdown フォーマットで書かれています。プルリクエスト、歓迎します! ## 開発 **hexo 3.0** を使っているか確認してください。`localhost:4000` で開発サーバーを開始します。 ``` $ npm install -g hexo-cli $ npm install $ hexo server ``` ## 貢献者 (アルファベット順) - [@hashrock](https://github.com/hashrock) - [@kazupon](https://github.com/kazupon) - [@kojimakazuto](https://github.com/kojimakazuto) - [@positiveflat](https://github.com/positiveflat) - [@tejitak](https://github.com/tejitak) - [@yasunobuigarashi](https://github.com/yasunobuigarashi) ## Instruction: Add vuejs-jp users group chat room link ## Code After: このサイトは [hexo](http://zespia.tw/hexo) で構築されています。サイトコンテンツは `source` の位置に markdown フォーマットで書かれています。プルリクエスト、歓迎します! ## 開発 **hexo 3.0** を使っているか確認してください。`localhost:4000` で開発サーバーを開始します。 ``` $ npm install -g hexo-cli $ npm install $ hexo server ``` ## チャット [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/kazupon/vuejs-jp-gitter) ## 貢献者 (アルファベット順) - [@hashrock](https://github.com/hashrock) - [@kazupon](https://github.com/kazupon) - [@kojimakazuto](https://github.com/kojimakazuto) - [@positiveflat](https://github.com/positiveflat) - [@tejitak](https://github.com/tejitak) - [@yasunobuigarashi](https://github.com/yasunobuigarashi)
このサイトは [hexo](http://zespia.tw/hexo) で構築されています。サイトコンテンツは `source` の位置に markdown フォーマットで書かれています。プルリクエスト、歓迎します! ## 開発 **hexo 3.0** を使っているか確認してください。`localhost:4000` で開発サーバーを開始します。 ``` $ npm install -g hexo-cli $ npm install $ hexo server ``` + ## チャット + [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/kazupon/vuejs-jp-gitter) + + ## 貢献者 (アルファベット順) - [@hashrock](https://github.com/hashrock) - [@kazupon](https://github.com/kazupon) - [@kojimakazuto](https://github.com/kojimakazuto) - [@positiveflat](https://github.com/positiveflat) - [@tejitak](https://github.com/tejitak) - [@yasunobuigarashi](https://github.com/yasunobuigarashi)
4
0.181818
4
0
8de5b46289719fcc246fd090b8f13d9e66b12bd9
.travis.yml
.travis.yml
language: php php: - '5.6' - '7.0' - '7.1' - '7.2' - nightly before_script: - composer self-update - composer install - mkdir build/logs -p script: - phpunit - composer cs-check after_success: - vendor/bin/test-reporter after_script: - rm -rf build/logs branches: only: - master - dev
language: php php: - '5.6' - '7.0' - '7.1' - '7.2' - nightly before_script: - composer self-update - composer install - mkdir build/logs -p script: - phpunit - composer cs-check after_success: - vendor/bin/test-reporter after_script: - rm -rf build/logs matrix: allow_failures: - php: nightly branches: only: - master - dev
Allow php nightly build to fail
Allow php nightly build to fail
YAML
agpl-3.0
halfpastfouram/PHPChartJS,halfpastfouram/PHPChartJS
yaml
## Code Before: language: php php: - '5.6' - '7.0' - '7.1' - '7.2' - nightly before_script: - composer self-update - composer install - mkdir build/logs -p script: - phpunit - composer cs-check after_success: - vendor/bin/test-reporter after_script: - rm -rf build/logs branches: only: - master - dev ## Instruction: Allow php nightly build to fail ## Code After: language: php php: - '5.6' - '7.0' - '7.1' - '7.2' - nightly before_script: - composer self-update - composer install - mkdir build/logs -p script: - phpunit - composer cs-check after_success: - vendor/bin/test-reporter after_script: - rm -rf build/logs matrix: allow_failures: - php: nightly branches: only: - master - dev
language: php php: - '5.6' - '7.0' - '7.1' - '7.2' - nightly before_script: - composer self-update - composer install - mkdir build/logs -p script: - phpunit - composer cs-check after_success: - vendor/bin/test-reporter after_script: - rm -rf build/logs + matrix: + allow_failures: + - php: nightly + branches: only: - master - dev
4
0.148148
4
0
90fbb3d94ef8ede4fbdefd6a8e1c81e71f658056
client/app/pages/users/settings.less
client/app/pages/users/settings.less
.profile__image { float: left; margin-right: 10px; } .profile__h3 { margin: 8px 0 0 0; } .btn-secondary { background: #fff; border: 1px solid #bbb !important; } .profile__cointainer { .well { .form-group:last-of-type { margin-bottom: 0; } } }
.profile__image { float: left; margin-right: 10px; } .profile__h3 { margin: 8px 0 0 0; } .profile__cointainer { .well { .form-group:last-of-type { margin-bottom: 0; } } }
Move global style out from local file
Move global style out from local file
Less
bsd-2-clause
denisov-vlad/redash,chriszs/redash,44px/redash,getredash/redash,hudl/redash,denisov-vlad/redash,crowdworks/redash,alexanderlz/redash,alexanderlz/redash,44px/redash,44px/redash,moritz9/redash,alexanderlz/redash,moritz9/redash,chriszs/redash,hudl/redash,crowdworks/redash,chriszs/redash,getredash/redash,moritz9/redash,chriszs/redash,crowdworks/redash,moritz9/redash,denisov-vlad/redash,getredash/redash,44px/redash,alexanderlz/redash,denisov-vlad/redash,getredash/redash,denisov-vlad/redash,hudl/redash,getredash/redash,crowdworks/redash,hudl/redash
less
## Code Before: .profile__image { float: left; margin-right: 10px; } .profile__h3 { margin: 8px 0 0 0; } .btn-secondary { background: #fff; border: 1px solid #bbb !important; } .profile__cointainer { .well { .form-group:last-of-type { margin-bottom: 0; } } } ## Instruction: Move global style out from local file ## Code After: .profile__image { float: left; margin-right: 10px; } .profile__h3 { margin: 8px 0 0 0; } .profile__cointainer { .well { .form-group:last-of-type { margin-bottom: 0; } } }
.profile__image { float: left; margin-right: 10px; } .profile__h3 { margin: 8px 0 0 0; } - .btn-secondary { - background: #fff; - border: 1px solid #bbb !important; - } - .profile__cointainer { .well { .form-group:last-of-type { margin-bottom: 0; } } }
5
0.238095
0
5
69f9a0f0032508735cfc05f1ffa1e47612404b81
icon-hider@kalnitsky.org/metadata.json
icon-hider@kalnitsky.org/metadata.json
{ "shell-version": ["3.4", "3.6", "3.7.92", "3.8"], "uuid": "icon-hider@kalnitsky.org", "name": "Icon Hider", "description": "Show/Hide icons from top panel", "url": "https://github.com/ikalnitsky/gnome-shell-extension-icon-hider", "settings-schema": "org.gnome.shell.extensions.icon-hider", "gettext-domain": "org.gnome.shell.extensions.icon-hider", "version": "3" }
{ "shell-version": ["3.4", "3.6", "3.8"], "uuid": "icon-hider@kalnitsky.org", "name": "Icon Hider", "description": "Show/Hide icons from top panel", "url": "https://github.com/ikalnitsky/gnome-shell-extension-icon-hider", "settings-schema": "org.gnome.shell.extensions.icon-hider", "gettext-domain": "org.gnome.shell.extensions.icon-hider", "version": "3" }
Remove Gnome-Shell testing version from metdata.
Remove Gnome-Shell testing version from metdata.
JSON
bsd-3-clause
ikalnitsky/gnome-shell-extension-icon-hider
json
## Code Before: { "shell-version": ["3.4", "3.6", "3.7.92", "3.8"], "uuid": "icon-hider@kalnitsky.org", "name": "Icon Hider", "description": "Show/Hide icons from top panel", "url": "https://github.com/ikalnitsky/gnome-shell-extension-icon-hider", "settings-schema": "org.gnome.shell.extensions.icon-hider", "gettext-domain": "org.gnome.shell.extensions.icon-hider", "version": "3" } ## Instruction: Remove Gnome-Shell testing version from metdata. ## Code After: { "shell-version": ["3.4", "3.6", "3.8"], "uuid": "icon-hider@kalnitsky.org", "name": "Icon Hider", "description": "Show/Hide icons from top panel", "url": "https://github.com/ikalnitsky/gnome-shell-extension-icon-hider", "settings-schema": "org.gnome.shell.extensions.icon-hider", "gettext-domain": "org.gnome.shell.extensions.icon-hider", "version": "3" }
{ - "shell-version": ["3.4", "3.6", "3.7.92", "3.8"], ? ---------- + "shell-version": ["3.4", "3.6", "3.8"], "uuid": "icon-hider@kalnitsky.org", "name": "Icon Hider", "description": "Show/Hide icons from top panel", "url": "https://github.com/ikalnitsky/gnome-shell-extension-icon-hider", "settings-schema": "org.gnome.shell.extensions.icon-hider", "gettext-domain": "org.gnome.shell.extensions.icon-hider", "version": "3" }
2
0.2
1
1
884dc591087be70adf14b29677086d2f9d29b46c
projects/trade-platform.md
projects/trade-platform.md
Material sourcing platform for industries ----------------------- ### Background The process of purchasing raw materials for any manufacturing industry is complex. There are a number of middlemen involved who act as suppliers and suitable candidates are usually discovered through personal connections, newspaper advertisements etc. These mediums have little reach because of which industries and suppliers both miss out on opportunities. Also, there is little transparency and visibility to the trade which is happening in the outside world. Our product idea aims to facilitate trade, make it easier, simpler and cheaper. ### Challenge We aim to create an online platform where all the players involved in trade, like industries, suppliers, contractors etc can connect and partner with each other. Through a profile page/dashboard, the entities will also be able to display the materials they can supply/manufacture (like alumina, pig iron, coal etc), their past and current trading histories, their current activites etc. Industries will be able to discover new sources based on their requirements like materials, location and quality. Through this platform we also envision to make activites like bulk purchases, negotiations, auctions simpler. ### Team [Naveen Parthasarathy](../people/naveen-parthasarathy.md),[Peter Tran](../people/peter-tran.md),[Ashwin Ramanathan](../people/ashwin-ramanathan.md) ### Project Management Tool Pivotal Tracker https://www.pivotaltracker.com/n/projects/1430536
Material sourcing platform for industries ----------------------- ### Background The process of purchasing raw materials for any manufacturing industry is complex. There are a number of middlemen involved who act as suppliers and suitable candidates are usually discovered through personal connections, newspaper advertisements etc. These mediums have little reach because of which industries and suppliers both miss out on opportunities. Also, there is little transparency and visibility to the trade which is happening in the outside world. Our product idea aims to facilitate trade, make it easier, simpler and cheaper. ### Challenge We aim to create an online platform where all the players involved in trade, like industries, suppliers, contractors etc can connect and partner with each other. Through a profile page/dashboard, the entities will also be able to display the materials they can supply/manufacture (like alumina, pig iron, coal etc), their past and current trading histories, their current activites etc. Industries will be able to discover new sources based on their requirements like materials, location and quality. Through this platform we also envision to make activites like bulk purchases, negotiations, auctions simpler. ### Team [Naveen Parthasarathy](../people/naveen-parthasarathy.md),[Peter Tran](../people/peter-tran.md),[Ashwin Ramanathan](../people/ashwin-ramanathan.md) ### Github repo https://github.com/naveenlp/bizsouk ### Project Management Tool Pivotal Tracker https://www.pivotaltracker.com/n/projects/1430536
Add link to the github repo
Add link to the github repo
Markdown
mit
AndyLiu0429/cs5356,velicue/cs5356,AndyLiu0429/cs5356,anasb/cs5356,AndyLiu0429/cs5356,anasb/cs5356,velicue/cs5356,anasb/cs5356,velicue/cs5356
markdown
## Code Before: Material sourcing platform for industries ----------------------- ### Background The process of purchasing raw materials for any manufacturing industry is complex. There are a number of middlemen involved who act as suppliers and suitable candidates are usually discovered through personal connections, newspaper advertisements etc. These mediums have little reach because of which industries and suppliers both miss out on opportunities. Also, there is little transparency and visibility to the trade which is happening in the outside world. Our product idea aims to facilitate trade, make it easier, simpler and cheaper. ### Challenge We aim to create an online platform where all the players involved in trade, like industries, suppliers, contractors etc can connect and partner with each other. Through a profile page/dashboard, the entities will also be able to display the materials they can supply/manufacture (like alumina, pig iron, coal etc), their past and current trading histories, their current activites etc. Industries will be able to discover new sources based on their requirements like materials, location and quality. Through this platform we also envision to make activites like bulk purchases, negotiations, auctions simpler. ### Team [Naveen Parthasarathy](../people/naveen-parthasarathy.md),[Peter Tran](../people/peter-tran.md),[Ashwin Ramanathan](../people/ashwin-ramanathan.md) ### Project Management Tool Pivotal Tracker https://www.pivotaltracker.com/n/projects/1430536 ## Instruction: Add link to the github repo ## Code After: Material sourcing platform for industries ----------------------- ### Background The process of purchasing raw materials for any manufacturing industry is complex. There are a number of middlemen involved who act as suppliers and suitable candidates are usually discovered through personal connections, newspaper advertisements etc. These mediums have little reach because of which industries and suppliers both miss out on opportunities. Also, there is little transparency and visibility to the trade which is happening in the outside world. Our product idea aims to facilitate trade, make it easier, simpler and cheaper. ### Challenge We aim to create an online platform where all the players involved in trade, like industries, suppliers, contractors etc can connect and partner with each other. Through a profile page/dashboard, the entities will also be able to display the materials they can supply/manufacture (like alumina, pig iron, coal etc), their past and current trading histories, their current activites etc. Industries will be able to discover new sources based on their requirements like materials, location and quality. Through this platform we also envision to make activites like bulk purchases, negotiations, auctions simpler. ### Team [Naveen Parthasarathy](../people/naveen-parthasarathy.md),[Peter Tran](../people/peter-tran.md),[Ashwin Ramanathan](../people/ashwin-ramanathan.md) ### Github repo https://github.com/naveenlp/bizsouk ### Project Management Tool Pivotal Tracker https://www.pivotaltracker.com/n/projects/1430536
Material sourcing platform for industries ----------------------- ### Background The process of purchasing raw materials for any manufacturing industry is complex. There are a number of middlemen involved who act as suppliers and suitable candidates are usually discovered through personal connections, newspaper advertisements etc. These mediums have little reach because of which industries and suppliers both miss out on opportunities. Also, there is little transparency and visibility to the trade which is happening in the outside world. Our product idea aims to facilitate trade, make it easier, simpler and cheaper. ### Challenge We aim to create an online platform where all the players involved in trade, like industries, suppliers, contractors etc can connect and partner with each other. Through a profile page/dashboard, the entities will also be able to display the materials they can supply/manufacture (like alumina, pig iron, coal etc), their past and current trading histories, their current activites etc. Industries will be able to discover new sources based on their requirements like materials, location and quality. Through this platform we also envision to make activites like bulk purchases, negotiations, auctions simpler. ### Team [Naveen Parthasarathy](../people/naveen-parthasarathy.md),[Peter Tran](../people/peter-tran.md),[Ashwin Ramanathan](../people/ashwin-ramanathan.md) + ### Github repo + https://github.com/naveenlp/bizsouk + + ### Project Management Tool Pivotal Tracker https://www.pivotaltracker.com/n/projects/1430536
4
0.235294
4
0
9e709327ecce641fa51e7d5f9420a1b58af2c075
source/_team.html.haml
source/_team.html.haml
%section#team.container %h3.section__title= I18n.t("corporate.team.title") .row - data.team.each do |member| .col-3.col.col--centered %img{src: gravatar_for(member.email), class: "avatar", alt: member.email} %h4= member.name %ul.social-networks %li %a{href: "https://github.com/#{member.github}", target: "_blank"} Github %li %a{href: "https://twitter.com/#{member.twitter}", target: "_blank"} Twitter .row .col-1.col.col--centered %p= I18n.t("corporate.team.join-us")
%section#team.container %h3.section__title= I18n.t("corporate.team.title") .row - data.team.each do |member| .col-3.col.col--centered %img{src: gravatar_for(member.email), class: "avatar", alt: member.email} %h4= member.name %ul.social-networks %li %a{href: "https://github.com/#{member.github}", target: "_blank"} Github - if member.twitter %li %a{href: "https://twitter.com/#{member.twitter}", target: "_blank"} Twitter .row .col-1.col.col--centered %p= I18n.t("corporate.team.join-us")
Support team members without twitter account
Support team members without twitter account
Haml
mit
lilfaf/website,alpinelab/website,alpinelab/website,lilfaf/website,alpinelab/website
haml
## Code Before: %section#team.container %h3.section__title= I18n.t("corporate.team.title") .row - data.team.each do |member| .col-3.col.col--centered %img{src: gravatar_for(member.email), class: "avatar", alt: member.email} %h4= member.name %ul.social-networks %li %a{href: "https://github.com/#{member.github}", target: "_blank"} Github %li %a{href: "https://twitter.com/#{member.twitter}", target: "_blank"} Twitter .row .col-1.col.col--centered %p= I18n.t("corporate.team.join-us") ## Instruction: Support team members without twitter account ## Code After: %section#team.container %h3.section__title= I18n.t("corporate.team.title") .row - data.team.each do |member| .col-3.col.col--centered %img{src: gravatar_for(member.email), class: "avatar", alt: member.email} %h4= member.name %ul.social-networks %li %a{href: "https://github.com/#{member.github}", target: "_blank"} Github - if member.twitter %li %a{href: "https://twitter.com/#{member.twitter}", target: "_blank"} Twitter .row .col-1.col.col--centered %p= I18n.t("corporate.team.join-us")
%section#team.container %h3.section__title= I18n.t("corporate.team.title") .row - data.team.each do |member| .col-3.col.col--centered %img{src: gravatar_for(member.email), class: "avatar", alt: member.email} %h4= member.name %ul.social-networks %li %a{href: "https://github.com/#{member.github}", target: "_blank"} Github + - if member.twitter - %li + %li ? ++ - %a{href: "https://twitter.com/#{member.twitter}", target: "_blank"} Twitter ? -------- + %a{href: "https://twitter.com/#{member.twitter}", target: "_blank"} ? ++ + Twitter .row .col-1.col.col--centered %p= I18n.t("corporate.team.join-us")
6
0.4
4
2
fbd4b7d6a7c793a48c7235fc1ab7373968690f27
fpm-mapdata.sh
fpm-mapdata.sh
set -euo pipefail package() { declare source="$1" declare type="${2:-deb}" # https://fpm.readthedocs.io/en/latest/source/dir.html set -xv fpm \ --input-type dir \ --output-type "$type" \ --name trinitycore-mapdata --version 3.3.5 \ --iteration \ --verbose \ --url "https://www.trinitycore.org" \ --maintainer "TrinityCore" \ --category "Amusements/Games" \ --vendor "TrinityCore" \ --description "TrinityCore world server map data" \ --architecture "all" \ --directories "/opt/trinitycore/$source" \ "$source"=/opt/trinitycore { set +xv; } >/dev/null 2>&1 } main() { pushd "${BASH_SOURCE[0]%/*}/artifacts" package "mapdata" "${1:-deb}" popd } main "$@"
set -euo pipefail package() { declare source="$1" declare type="${2:-deb}" # https://fpm.readthedocs.io/en/latest/source/dir.html set -xv fpm \ --input-type dir \ --output-type "$type" \ --name trinitycore-mapdata --version 3.3.5 \ --iteration "$(< git-rev-short)" \ --verbose \ --url "https://www.trinitycore.org" \ --maintainer "TrinityCore" \ --category "Amusements/Games" \ --vendor "TrinityCore" \ --description "TrinityCore world server map data" \ --architecture "all" \ --directories "/opt/trinitycore/$source" \ "$source"=/opt/trinitycore { set +xv; } >/dev/null 2>&1 } main() { pushd "${BASH_SOURCE[0]%/*}/artifacts" package "mapdata" "${1:-deb}" popd } main "$@"
Make that it works in 90% of the cases. 3:30.
Make that it works in 90% of the cases. 3:30.
Shell
mit
neechbear/trinitycore,neechbear/trinitycore,neechbear/trinitycore
shell
## Code Before: set -euo pipefail package() { declare source="$1" declare type="${2:-deb}" # https://fpm.readthedocs.io/en/latest/source/dir.html set -xv fpm \ --input-type dir \ --output-type "$type" \ --name trinitycore-mapdata --version 3.3.5 \ --iteration \ --verbose \ --url "https://www.trinitycore.org" \ --maintainer "TrinityCore" \ --category "Amusements/Games" \ --vendor "TrinityCore" \ --description "TrinityCore world server map data" \ --architecture "all" \ --directories "/opt/trinitycore/$source" \ "$source"=/opt/trinitycore { set +xv; } >/dev/null 2>&1 } main() { pushd "${BASH_SOURCE[0]%/*}/artifacts" package "mapdata" "${1:-deb}" popd } main "$@" ## Instruction: Make that it works in 90% of the cases. 3:30. ## Code After: set -euo pipefail package() { declare source="$1" declare type="${2:-deb}" # https://fpm.readthedocs.io/en/latest/source/dir.html set -xv fpm \ --input-type dir \ --output-type "$type" \ --name trinitycore-mapdata --version 3.3.5 \ --iteration "$(< git-rev-short)" \ --verbose \ --url "https://www.trinitycore.org" \ --maintainer "TrinityCore" \ --category "Amusements/Games" \ --vendor "TrinityCore" \ --description "TrinityCore world server map data" \ --architecture "all" \ --directories "/opt/trinitycore/$source" \ "$source"=/opt/trinitycore { set +xv; } >/dev/null 2>&1 } main() { pushd "${BASH_SOURCE[0]%/*}/artifacts" package "mapdata" "${1:-deb}" popd } main "$@"
set -euo pipefail package() { declare source="$1" declare type="${2:-deb}" # https://fpm.readthedocs.io/en/latest/source/dir.html set -xv fpm \ --input-type dir \ --output-type "$type" \ --name trinitycore-mapdata --version 3.3.5 \ - --iteration \ + --iteration "$(< git-rev-short)" \ --verbose \ --url "https://www.trinitycore.org" \ --maintainer "TrinityCore" \ --category "Amusements/Games" \ --vendor "TrinityCore" \ --description "TrinityCore world server map data" \ --architecture "all" \ --directories "/opt/trinitycore/$source" \ "$source"=/opt/trinitycore { set +xv; } >/dev/null 2>&1 } main() { pushd "${BASH_SOURCE[0]%/*}/artifacts" package "mapdata" "${1:-deb}" popd } main "$@"
2
0.055556
1
1
11206bbd2a7a48f47b9bcf05ca75030f84749c65
manifest.json
manifest.json
{ "name": "Wikihover", "version": "0.0.1", "manifest_version": 2, "description": "A Chrome extension that allows you get the summary of an article with the hover of your mouse.", "homepage_url": "http://ellenbrook.github.io", "icons": { "16": "icons/icon16.png", "48": "icons/icon48.png", "128": "icons/icon128.png" }, "default_locale": "en", "permissions": [ "http://wikipedia.org/*", "http://en.wikipedia.org/*" ], "content_scripts": [ { "matches": [ "http://wikipedia.org/*", "http://*.wikipedia.org/*" ], "js": [ "js/jquery/jquery.js", "src/inject/inject.js" ] } ] }
{ "name": "Wikihover", "version": "0.0.3", "manifest_version": 2, "description": "A Chrome extension that allows you get the summary of an article with the hover of your mouse.", "homepage_url": "http://ellenbrook.github.io", "icons": { "16": "icons/icon16.png", "48": "icons/icon48.png", "128": "icons/icon128.png" }, "default_locale": "en", "permissions": [ "http://wikipedia.org/*", "https://wikipedia.org/*", "http://en.wikipedia.org/*", "https://en.wikipedia.org/*" ], "content_scripts": [ { "matches": [ "http://wikipedia.org/*", "https://wikipedia.org/*", "http://*.wikipedia.org/*", "https://*.wikipedia.org/*" ], "js": [ "js/jquery/jquery.js", "src/inject/inject.js" ] } ] }
Update Manifest to account for https
Update Manifest to account for https
JSON
mit
ellenbrook/Wikihover
json
## Code Before: { "name": "Wikihover", "version": "0.0.1", "manifest_version": 2, "description": "A Chrome extension that allows you get the summary of an article with the hover of your mouse.", "homepage_url": "http://ellenbrook.github.io", "icons": { "16": "icons/icon16.png", "48": "icons/icon48.png", "128": "icons/icon128.png" }, "default_locale": "en", "permissions": [ "http://wikipedia.org/*", "http://en.wikipedia.org/*" ], "content_scripts": [ { "matches": [ "http://wikipedia.org/*", "http://*.wikipedia.org/*" ], "js": [ "js/jquery/jquery.js", "src/inject/inject.js" ] } ] } ## Instruction: Update Manifest to account for https ## Code After: { "name": "Wikihover", "version": "0.0.3", "manifest_version": 2, "description": "A Chrome extension that allows you get the summary of an article with the hover of your mouse.", "homepage_url": "http://ellenbrook.github.io", "icons": { "16": "icons/icon16.png", "48": "icons/icon48.png", "128": "icons/icon128.png" }, "default_locale": "en", "permissions": [ "http://wikipedia.org/*", "https://wikipedia.org/*", "http://en.wikipedia.org/*", "https://en.wikipedia.org/*" ], "content_scripts": [ { "matches": [ "http://wikipedia.org/*", "https://wikipedia.org/*", "http://*.wikipedia.org/*", "https://*.wikipedia.org/*" ], "js": [ "js/jquery/jquery.js", "src/inject/inject.js" ] } ] }
{ "name": "Wikihover", - "version": "0.0.1", ? ^ + "version": "0.0.3", ? ^ "manifest_version": 2, "description": "A Chrome extension that allows you get the summary of an article with the hover of your mouse.", "homepage_url": "http://ellenbrook.github.io", "icons": { "16": "icons/icon16.png", "48": "icons/icon48.png", "128": "icons/icon128.png" }, "default_locale": "en", "permissions": [ "http://wikipedia.org/*", + "https://wikipedia.org/*", - "http://en.wikipedia.org/*" + "http://en.wikipedia.org/*", ? + + "https://en.wikipedia.org/*" ], "content_scripts": [ { "matches": [ "http://wikipedia.org/*", + "https://wikipedia.org/*", - "http://*.wikipedia.org/*" + "http://*.wikipedia.org/*", ? + + "https://*.wikipedia.org/*" ], "js": [ "js/jquery/jquery.js", "src/inject/inject.js" ] } ] }
10
0.344828
7
3
554652724e18814d4b0f297ca5ce8ed327524d78
schema/StudentInsertCoursework.sql
schema/StudentInsertCoursework.sql
insert into Coursework(title,date_submitted,file,student_user_id,class_id) values (?,now(),?,?,?);
insert into Coursework(title,date_submitted,file,file_extension,student_user_id,class_id) values (?,now(),?,?,?,?);
Modify to match new column data for Coursework table
Modify to match new column data for Coursework table
SQL
apache-2.0
Daytron/revworks
sql
## Code Before: insert into Coursework(title,date_submitted,file,student_user_id,class_id) values (?,now(),?,?,?); ## Instruction: Modify to match new column data for Coursework table ## Code After: insert into Coursework(title,date_submitted,file,file_extension,student_user_id,class_id) values (?,now(),?,?,?,?);
- insert into Coursework(title,date_submitted,file,student_user_id,class_id) + insert into Coursework(title,date_submitted,file,file_extension,student_user_id,class_id) ? +++++++++++++++ - values (?,now(),?,?,?); + values (?,now(),?,?,?,?); ? ++
4
2
2
2
43fa635dbc6fa17b60d37c81b10e24cba415ea4c
Android/Shopr/src/main/java/com/uwetrottmann/shopr/loaders/ItemLoader.java
Android/Shopr/src/main/java/com/uwetrottmann/shopr/loaders/ItemLoader.java
package com.uwetrottmann.shopr.loaders; import android.content.Context; import com.uwetrottmann.shopr.model.Item; import com.uwetrottmann.shopr.utils.Lists; import java.math.BigDecimal; import java.util.List; /** * Returns a list of items based on the current user model. */ public class ItemLoader extends GenericSimpleLoader<List<Item>> { public ItemLoader(Context context) { super(context); } @Override public List<Item> loadInBackground() { List<Item> items = Lists.newArrayList(); for (int i = 0; i < 10; i++) { Item item = new Item().id(i).name("Sample Item " + i).picture("sample.jpg").shopId(42); double random = Math.random() * 200; item.price(new BigDecimal(random)); item.label(Math.random() > 0.5 ? "Armani" : "Hugo Boss"); items.add(item); } return items; } }
package com.uwetrottmann.shopr.loaders; import android.content.Context; import com.uwetrottmann.shopr.algorithm.AdaptiveSelection; import com.uwetrottmann.shopr.algorithm.model.Attributes; import com.uwetrottmann.shopr.model.Item; import com.uwetrottmann.shopr.utils.Lists; import java.math.BigDecimal; import java.util.List; /** * Returns a list of items based on the current user model. */ public class ItemLoader extends GenericSimpleLoader<List<Item>> { public ItemLoader(Context context) { super(context); } @Override public List<Item> loadInBackground() { List<Item> items = Lists.newArrayList(); AdaptiveSelection manager = AdaptiveSelection.get(); List<com.uwetrottmann.shopr.algorithm.model.Item> recommendations = manager .getRecommendations(null); // Until we have real data transfer the model of item used by algorithm // to the app model int count = 0; for (com.uwetrottmann.shopr.algorithm.model.Item item : recommendations) { Attributes attrs = item.attributes(); String label = attrs.label().currentValue().toString(); String type = attrs.type().currentValue().toString(); Item expandedItem = new Item().id(count++); expandedItem.name(label + " " + type + " " + count); expandedItem.color(attrs.color().currentValue().toString()); expandedItem.label(label); expandedItem.type(type); double random = Math.random() * 200; expandedItem.price(new BigDecimal(random)); items.add(expandedItem); } return items; } }
Integrate recommender into item loader.
Integrate recommender into item loader.
Java
apache-2.0
UweTrottmann/Shopr,adiguzel/Shopr
java
## Code Before: package com.uwetrottmann.shopr.loaders; import android.content.Context; import com.uwetrottmann.shopr.model.Item; import com.uwetrottmann.shopr.utils.Lists; import java.math.BigDecimal; import java.util.List; /** * Returns a list of items based on the current user model. */ public class ItemLoader extends GenericSimpleLoader<List<Item>> { public ItemLoader(Context context) { super(context); } @Override public List<Item> loadInBackground() { List<Item> items = Lists.newArrayList(); for (int i = 0; i < 10; i++) { Item item = new Item().id(i).name("Sample Item " + i).picture("sample.jpg").shopId(42); double random = Math.random() * 200; item.price(new BigDecimal(random)); item.label(Math.random() > 0.5 ? "Armani" : "Hugo Boss"); items.add(item); } return items; } } ## Instruction: Integrate recommender into item loader. ## Code After: package com.uwetrottmann.shopr.loaders; import android.content.Context; import com.uwetrottmann.shopr.algorithm.AdaptiveSelection; import com.uwetrottmann.shopr.algorithm.model.Attributes; import com.uwetrottmann.shopr.model.Item; import com.uwetrottmann.shopr.utils.Lists; import java.math.BigDecimal; import java.util.List; /** * Returns a list of items based on the current user model. */ public class ItemLoader extends GenericSimpleLoader<List<Item>> { public ItemLoader(Context context) { super(context); } @Override public List<Item> loadInBackground() { List<Item> items = Lists.newArrayList(); AdaptiveSelection manager = AdaptiveSelection.get(); List<com.uwetrottmann.shopr.algorithm.model.Item> recommendations = manager .getRecommendations(null); // Until we have real data transfer the model of item used by algorithm // to the app model int count = 0; for (com.uwetrottmann.shopr.algorithm.model.Item item : recommendations) { Attributes attrs = item.attributes(); String label = attrs.label().currentValue().toString(); String type = attrs.type().currentValue().toString(); Item expandedItem = new Item().id(count++); expandedItem.name(label + " " + type + " " + count); expandedItem.color(attrs.color().currentValue().toString()); expandedItem.label(label); expandedItem.type(type); double random = Math.random() * 200; expandedItem.price(new BigDecimal(random)); items.add(expandedItem); } return items; } }
package com.uwetrottmann.shopr.loaders; import android.content.Context; + import com.uwetrottmann.shopr.algorithm.AdaptiveSelection; + import com.uwetrottmann.shopr.algorithm.model.Attributes; import com.uwetrottmann.shopr.model.Item; import com.uwetrottmann.shopr.utils.Lists; import java.math.BigDecimal; import java.util.List; /** * Returns a list of items based on the current user model. */ public class ItemLoader extends GenericSimpleLoader<List<Item>> { public ItemLoader(Context context) { super(context); } @Override public List<Item> loadInBackground() { List<Item> items = Lists.newArrayList(); - for (int i = 0; i < 10; i++) { - Item item = new Item().id(i).name("Sample Item " + i).picture("sample.jpg").shopId(42); + AdaptiveSelection manager = AdaptiveSelection.get(); + List<com.uwetrottmann.shopr.algorithm.model.Item> recommendations = manager + .getRecommendations(null); + + // Until we have real data transfer the model of item used by algorithm + // to the app model + int count = 0; + for (com.uwetrottmann.shopr.algorithm.model.Item item : recommendations) { + Attributes attrs = item.attributes(); + String label = attrs.label().currentValue().toString(); + String type = attrs.type().currentValue().toString(); + + Item expandedItem = new Item().id(count++); + expandedItem.name(label + " " + type + " " + count); + expandedItem.color(attrs.color().currentValue().toString()); + expandedItem.label(label); + expandedItem.type(type); double random = Math.random() * 200; - item.price(new BigDecimal(random)); ? ^ + expandedItem.price(new BigDecimal(random)); ? ^^^^^^^^^ - item.label(Math.random() > 0.5 ? "Armani" : "Hugo Boss"); + - items.add(item); ? ^ + items.add(expandedItem); ? ^^^^^^^^^ } return items; } }
27
0.75
22
5
31be8f697c59b55c81b72dea31b06c3814139ecb
spec/hash_object_spec.rb
spec/hash_object_spec.rb
require 'spec_helper' # Test support object describe HashObject do subject { HashObject.new(hash) } let(:hash) do { :name => 'Steve', :address => {:street => 'Mainstreet'}, :posts => [ {:title => 'It is christmas'}, {:title => 'NOT'} ] } end it 'maps an intergalactic hash' do assert_equal hash[:name], subject.name assert_equal hash[:address][:street], subject.address.street assert_equal hash[:posts].size, subject.posts.size assert_equal hash[:posts][0][:title], subject.posts[0].title assert_equal hash[:posts][1][:title], subject.posts[1].title end end
require 'spec_helper' # Test support object describe HashObject do subject { HashObject.new(hash) } let(:hash) do { :name => 'Steve', :address => {:street => 'Mainstreet'}, :posts => [ {:title => 'It is christmas'}, {:title => 'NOT'} ], :living? => true } end it 'maps an intergalactic hash' do assert_equal hash[:name], subject.name assert_equal hash[:address][:street], subject.address.street assert_equal hash[:posts].size, subject.posts.size assert_equal hash[:posts][0][:title], subject.posts[0].title assert_equal hash[:posts][1][:title], subject.posts[1].title assert_equal hash[:living?], subject.living? end end
Add postfix example-attribute to HashObject spec
Add postfix example-attribute to HashObject spec
Ruby
mit
neopoly/bound
ruby
## Code Before: require 'spec_helper' # Test support object describe HashObject do subject { HashObject.new(hash) } let(:hash) do { :name => 'Steve', :address => {:street => 'Mainstreet'}, :posts => [ {:title => 'It is christmas'}, {:title => 'NOT'} ] } end it 'maps an intergalactic hash' do assert_equal hash[:name], subject.name assert_equal hash[:address][:street], subject.address.street assert_equal hash[:posts].size, subject.posts.size assert_equal hash[:posts][0][:title], subject.posts[0].title assert_equal hash[:posts][1][:title], subject.posts[1].title end end ## Instruction: Add postfix example-attribute to HashObject spec ## Code After: require 'spec_helper' # Test support object describe HashObject do subject { HashObject.new(hash) } let(:hash) do { :name => 'Steve', :address => {:street => 'Mainstreet'}, :posts => [ {:title => 'It is christmas'}, {:title => 'NOT'} ], :living? => true } end it 'maps an intergalactic hash' do assert_equal hash[:name], subject.name assert_equal hash[:address][:street], subject.address.street assert_equal hash[:posts].size, subject.posts.size assert_equal hash[:posts][0][:title], subject.posts[0].title assert_equal hash[:posts][1][:title], subject.posts[1].title assert_equal hash[:living?], subject.living? end end
require 'spec_helper' # Test support object describe HashObject do subject { HashObject.new(hash) } let(:hash) do { :name => 'Steve', :address => {:street => 'Mainstreet'}, :posts => [ {:title => 'It is christmas'}, {:title => 'NOT'} - ] + ], ? + + :living? => true } end it 'maps an intergalactic hash' do assert_equal hash[:name], subject.name assert_equal hash[:address][:street], subject.address.street assert_equal hash[:posts].size, subject.posts.size assert_equal hash[:posts][0][:title], subject.posts[0].title assert_equal hash[:posts][1][:title], subject.posts[1].title + assert_equal hash[:living?], subject.living? end end
4
0.16
3
1
23de0ec3b30fe0fd691d4e93b08624d7c41c0a6f
composer.json
composer.json
{ "name": "codesleeve/stapler", "description": "Easy file attachment management using Eloquent in Laravel 4", "keywords": ["laravel", "file", "upload", "S3", "AWS", "paperclip", "lpm"], "license": "MIT", "authors": [ { "name": "Travis Bennett", "email": "tandrewbennett@hotmail.com" } ], "require": { "php": ">=5.4", "imagine/imagine": "~0.5.0", "illuminate/foundation": "~4" }, "require-dev": { "mikey179/vfsStream": "1.2.0", "aws/aws-sdk-php": "2.4.*@dev" }, "autoload": { "classmap": [ "src/migrations", "tests/TestCase.php" ], "psr-0": { "Codesleeve\\Stapler": "src/" } }, "minimum-stability": "dev" }
{ "name": "codesleeve/stapler", "description": "Easy file attachment management using Eloquent in Laravel 4", "keywords": ["laravel", "file", "upload", "S3", "AWS", "paperclip", "lpm"], "license": "MIT", "authors": [ { "name": "Travis Bennett", "email": "tandrewbennett@hotmail.com" } ], "require": { "php": ">=5.4", "imagine/imagine": "~0.5.0", "illuminate/foundation": "~4" }, "require-dev": { "mikey179/vfsStream": "1.2.0", "mockery/mockery": "0.8.0", "aws/aws-sdk-php": "2.4.*@dev" }, "autoload": { "classmap": [ "src/migrations", "tests/TestCase.php" ], "psr-0": { "Codesleeve\\Stapler": "src/" } }, "minimum-stability": "dev" }
Add mockery library for testing.
Add mockery library for testing. Added mockery to composer.json.
JSON
mit
AndreasHeiberg/stapler,oschettler/stapler,aozisik/stapler,flaxandteal/stapler,sonuku/stapler,CodeSleeve/stapler,riyan8250/stapler,simudream/stapler,neerajgoyal12/stapler,InMoji/stapler
json
## Code Before: { "name": "codesleeve/stapler", "description": "Easy file attachment management using Eloquent in Laravel 4", "keywords": ["laravel", "file", "upload", "S3", "AWS", "paperclip", "lpm"], "license": "MIT", "authors": [ { "name": "Travis Bennett", "email": "tandrewbennett@hotmail.com" } ], "require": { "php": ">=5.4", "imagine/imagine": "~0.5.0", "illuminate/foundation": "~4" }, "require-dev": { "mikey179/vfsStream": "1.2.0", "aws/aws-sdk-php": "2.4.*@dev" }, "autoload": { "classmap": [ "src/migrations", "tests/TestCase.php" ], "psr-0": { "Codesleeve\\Stapler": "src/" } }, "minimum-stability": "dev" } ## Instruction: Add mockery library for testing. Added mockery to composer.json. ## Code After: { "name": "codesleeve/stapler", "description": "Easy file attachment management using Eloquent in Laravel 4", "keywords": ["laravel", "file", "upload", "S3", "AWS", "paperclip", "lpm"], "license": "MIT", "authors": [ { "name": "Travis Bennett", "email": "tandrewbennett@hotmail.com" } ], "require": { "php": ">=5.4", "imagine/imagine": "~0.5.0", "illuminate/foundation": "~4" }, "require-dev": { "mikey179/vfsStream": "1.2.0", "mockery/mockery": "0.8.0", "aws/aws-sdk-php": "2.4.*@dev" }, "autoload": { "classmap": [ "src/migrations", "tests/TestCase.php" ], "psr-0": { "Codesleeve\\Stapler": "src/" } }, "minimum-stability": "dev" }
{ "name": "codesleeve/stapler", "description": "Easy file attachment management using Eloquent in Laravel 4", "keywords": ["laravel", "file", "upload", "S3", "AWS", "paperclip", "lpm"], "license": "MIT", "authors": [ { "name": "Travis Bennett", "email": "tandrewbennett@hotmail.com" } ], "require": { "php": ">=5.4", "imagine/imagine": "~0.5.0", "illuminate/foundation": "~4" }, "require-dev": { "mikey179/vfsStream": "1.2.0", + "mockery/mockery": "0.8.0", "aws/aws-sdk-php": "2.4.*@dev" }, "autoload": { "classmap": [ "src/migrations", "tests/TestCase.php" ], "psr-0": { "Codesleeve\\Stapler": "src/" } }, "minimum-stability": "dev" }
1
0.032258
1
0
27957fe86084f24a0069ed0e6cddb4b0b4cca427
.github/workflows/test.yml
.github/workflows/test.yml
name: Ctypes on: - pull_request - push jobs: tests: name: Tests strategy: fail-fast: false matrix: os: - macos-latest - ubuntu-latest - windows-latest ocaml-version: - 4.09.0 - 4.10.0 runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v2 - name: Use OCaml ${{ matrix.ocaml-version }} uses: avsm/setup-ocaml@v1 with: ocaml-version: ${{ matrix.ocaml-version }} - name: Deps run: | opam pin add -n ctypes.dev . opam pin add -n ctypes-foreign.dev . opam depext -ty ctypes ctypes-foreign opam install -t --deps-only . - name: Build run: opam exec -- make - name: Test run: opam exec -- make test
name: Ctypes on: - pull_request - push - workflow_dispatch jobs: tests: name: Tests strategy: fail-fast: false matrix: os: - macos-latest - ubuntu-latest - windows-latest ocaml-version: - 4.09.0 - 4.10.0 runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v2 - name: Use OCaml ${{ matrix.ocaml-version }} uses: avsm/setup-ocaml@v1 with: ocaml-version: ${{ matrix.ocaml-version }} - name: Deps run: | opam pin add -n ctypes.dev . opam pin add -n ctypes-foreign.dev . opam depext -ty ctypes ctypes-foreign opam install -t --deps-only . - name: Build run: opam exec -- make - name: Test run: opam exec -- make test
Add a workflow_dispatch button to the GitHub Actions config.
Add a workflow_dispatch button to the GitHub Actions config.
YAML
mit
yallop/ocaml-ctypes,ocamllabs/ocaml-ctypes,ocamllabs/ocaml-ctypes,yallop/ocaml-ctypes
yaml
## Code Before: name: Ctypes on: - pull_request - push jobs: tests: name: Tests strategy: fail-fast: false matrix: os: - macos-latest - ubuntu-latest - windows-latest ocaml-version: - 4.09.0 - 4.10.0 runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v2 - name: Use OCaml ${{ matrix.ocaml-version }} uses: avsm/setup-ocaml@v1 with: ocaml-version: ${{ matrix.ocaml-version }} - name: Deps run: | opam pin add -n ctypes.dev . opam pin add -n ctypes-foreign.dev . opam depext -ty ctypes ctypes-foreign opam install -t --deps-only . - name: Build run: opam exec -- make - name: Test run: opam exec -- make test ## Instruction: Add a workflow_dispatch button to the GitHub Actions config. ## Code After: name: Ctypes on: - pull_request - push - workflow_dispatch jobs: tests: name: Tests strategy: fail-fast: false matrix: os: - macos-latest - ubuntu-latest - windows-latest ocaml-version: - 4.09.0 - 4.10.0 runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v2 - name: Use OCaml ${{ matrix.ocaml-version }} uses: avsm/setup-ocaml@v1 with: ocaml-version: ${{ matrix.ocaml-version }} - name: Deps run: | opam pin add -n ctypes.dev . opam pin add -n ctypes-foreign.dev . opam depext -ty ctypes ctypes-foreign opam install -t --deps-only . - name: Build run: opam exec -- make - name: Test run: opam exec -- make test
name: Ctypes on: - pull_request - push + - workflow_dispatch jobs: tests: name: Tests strategy: fail-fast: false matrix: os: - macos-latest - ubuntu-latest - windows-latest ocaml-version: - 4.09.0 - 4.10.0 runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v2 - name: Use OCaml ${{ matrix.ocaml-version }} uses: avsm/setup-ocaml@v1 with: ocaml-version: ${{ matrix.ocaml-version }} - name: Deps run: | opam pin add -n ctypes.dev . opam pin add -n ctypes-foreign.dev . opam depext -ty ctypes ctypes-foreign opam install -t --deps-only . - name: Build run: opam exec -- make - name: Test run: opam exec -- make test
1
0.022727
1
0
db4f2ef3af0531bda30e7733343ead84a6c108b5
jgiven-tests/src/test/java/com/tngtech/jgiven/report/html5/Html5AppStage.java
jgiven-tests/src/test/java/com/tngtech/jgiven/report/html5/Html5AppStage.java
package com.tngtech.jgiven.report.html5; import static org.assertj.core.api.Assertions.assertThat; import com.tngtech.jgiven.CurrentStep; import com.tngtech.jgiven.Stage; import com.tngtech.jgiven.annotation.ExpectedScenarioState; import com.tngtech.jgiven.attachment.Attachment; import com.tngtech.jgiven.attachment.MediaType; import java.io.File; import java.util.List; import org.openqa.selenium.*; public class Html5AppStage<SELF extends Html5AppStage<?>> extends Stage<SELF> { @ExpectedScenarioState protected CurrentStep currentStep; @ExpectedScenarioState protected WebDriver webDriver; @ExpectedScenarioState protected File targetReportDir; protected void takeScreenshot() { String base64 = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.BASE64); currentStep.addAttachment(Attachment.fromBase64(base64, MediaType.PNG).withTitle("Screenshot")); } protected WebElement findTagWithName(String tagName) { List<WebElement> links = webDriver.findElements( By.xpath(String.format("//a/span[contains(@class,'tag') and contains(text(), '%s')]/..", tagName))); assertThat(links).isNotEmpty(); return links.get(0); } }
package com.tngtech.jgiven.report.html5; import static org.assertj.core.api.Assertions.assertThat; import com.tngtech.jgiven.CurrentStep; import com.tngtech.jgiven.Stage; import com.tngtech.jgiven.annotation.ExpectedScenarioState; import com.tngtech.jgiven.attachment.Attachment; import com.tngtech.jgiven.attachment.MediaType; import java.io.File; import java.util.List; import org.openqa.selenium.*; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; public class Html5AppStage<SELF extends Html5AppStage<?>> extends Stage<SELF> { private static final int WEBDRIVER_FIND_TIMEOUT_SECONDS = 120; @ExpectedScenarioState protected CurrentStep currentStep; @ExpectedScenarioState protected WebDriver webDriver; @ExpectedScenarioState protected File targetReportDir; protected void takeScreenshot() { String base64 = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.BASE64); currentStep.addAttachment(Attachment.fromBase64(base64, MediaType.PNG).withTitle("Screenshot")); } protected WebElement findTagWithName(String tagName) { By elementLocator = By.xpath(String.format("//a/span[contains(@class,'tag') and contains(text(), '%s')]/..", tagName)); WebDriverWait timeoutSetter = new WebDriverWait(webDriver, WEBDRIVER_FIND_TIMEOUT_SECONDS); timeoutSetter.until(ExpectedConditions.visibilityOfElementLocated(elementLocator)); List<WebElement> links = webDriver.findElements(elementLocator); assertThat(links).isNotEmpty(); return links.get(0); } }
Add bigger timeout for xpath element locator
Add bigger timeout for xpath element locator Signed-off-by: Andru Stefanescu <7ddc31439e278e07060dec99cf8ddedbee60ab4a@cam.ac.uk>
Java
apache-2.0
TNG/JGiven,TNG/JGiven,TNG/JGiven,TNG/JGiven
java
## Code Before: package com.tngtech.jgiven.report.html5; import static org.assertj.core.api.Assertions.assertThat; import com.tngtech.jgiven.CurrentStep; import com.tngtech.jgiven.Stage; import com.tngtech.jgiven.annotation.ExpectedScenarioState; import com.tngtech.jgiven.attachment.Attachment; import com.tngtech.jgiven.attachment.MediaType; import java.io.File; import java.util.List; import org.openqa.selenium.*; public class Html5AppStage<SELF extends Html5AppStage<?>> extends Stage<SELF> { @ExpectedScenarioState protected CurrentStep currentStep; @ExpectedScenarioState protected WebDriver webDriver; @ExpectedScenarioState protected File targetReportDir; protected void takeScreenshot() { String base64 = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.BASE64); currentStep.addAttachment(Attachment.fromBase64(base64, MediaType.PNG).withTitle("Screenshot")); } protected WebElement findTagWithName(String tagName) { List<WebElement> links = webDriver.findElements( By.xpath(String.format("//a/span[contains(@class,'tag') and contains(text(), '%s')]/..", tagName))); assertThat(links).isNotEmpty(); return links.get(0); } } ## Instruction: Add bigger timeout for xpath element locator Signed-off-by: Andru Stefanescu <7ddc31439e278e07060dec99cf8ddedbee60ab4a@cam.ac.uk> ## Code After: package com.tngtech.jgiven.report.html5; import static org.assertj.core.api.Assertions.assertThat; import com.tngtech.jgiven.CurrentStep; import com.tngtech.jgiven.Stage; import com.tngtech.jgiven.annotation.ExpectedScenarioState; import com.tngtech.jgiven.attachment.Attachment; import com.tngtech.jgiven.attachment.MediaType; import java.io.File; import java.util.List; import org.openqa.selenium.*; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; public class Html5AppStage<SELF extends Html5AppStage<?>> extends Stage<SELF> { private static final int WEBDRIVER_FIND_TIMEOUT_SECONDS = 120; @ExpectedScenarioState protected CurrentStep currentStep; @ExpectedScenarioState protected WebDriver webDriver; @ExpectedScenarioState protected File targetReportDir; protected void takeScreenshot() { String base64 = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.BASE64); currentStep.addAttachment(Attachment.fromBase64(base64, MediaType.PNG).withTitle("Screenshot")); } protected WebElement findTagWithName(String tagName) { By elementLocator = By.xpath(String.format("//a/span[contains(@class,'tag') and contains(text(), '%s')]/..", tagName)); WebDriverWait timeoutSetter = new WebDriverWait(webDriver, WEBDRIVER_FIND_TIMEOUT_SECONDS); timeoutSetter.until(ExpectedConditions.visibilityOfElementLocated(elementLocator)); List<WebElement> links = webDriver.findElements(elementLocator); assertThat(links).isNotEmpty(); return links.get(0); } }
package com.tngtech.jgiven.report.html5; import static org.assertj.core.api.Assertions.assertThat; import com.tngtech.jgiven.CurrentStep; import com.tngtech.jgiven.Stage; import com.tngtech.jgiven.annotation.ExpectedScenarioState; import com.tngtech.jgiven.attachment.Attachment; import com.tngtech.jgiven.attachment.MediaType; import java.io.File; import java.util.List; import org.openqa.selenium.*; + import org.openqa.selenium.support.ui.ExpectedConditions; + import org.openqa.selenium.support.ui.WebDriverWait; public class Html5AppStage<SELF extends Html5AppStage<?>> extends Stage<SELF> { + private static final int WEBDRIVER_FIND_TIMEOUT_SECONDS = 120; @ExpectedScenarioState protected CurrentStep currentStep; @ExpectedScenarioState protected WebDriver webDriver; @ExpectedScenarioState protected File targetReportDir; protected void takeScreenshot() { String base64 = ((TakesScreenshot) webDriver).getScreenshotAs(OutputType.BASE64); currentStep.addAttachment(Attachment.fromBase64(base64, MediaType.PNG).withTitle("Screenshot")); } protected WebElement findTagWithName(String tagName) { + By elementLocator = By.xpath(String.format("//a/span[contains(@class,'tag') and contains(text(), '%s')]/..", + tagName)); + WebDriverWait timeoutSetter = new WebDriverWait(webDriver, WEBDRIVER_FIND_TIMEOUT_SECONDS); + timeoutSetter.until(ExpectedConditions.visibilityOfElementLocated(elementLocator)); + - List<WebElement> links = webDriver.findElements( + List<WebElement> links = webDriver.findElements(elementLocator); ? ++++++++++++++++ - By.xpath(String.format("//a/span[contains(@class,'tag') and contains(text(), '%s')]/..", tagName))); assertThat(links).isNotEmpty(); return links.get(0); } }
11
0.305556
9
2
b39b5b1b568a4f245187caf954fcab6e3fb75d3f
activity/src/main/java/com/pascalwelsch/compositeandroid/dialogfragment/DialogFragmentPluginBase.java
activity/src/main/java/com/pascalwelsch/compositeandroid/dialogfragment/DialogFragmentPluginBase.java
package com.pascalwelsch.compositeandroid.dialogfragment; import com.pascalwelsch.compositeandroid.core.AbstractPlugin; import com.pascalwelsch.compositeandroid.fragment.FragmentDelegate; public class DialogFragmentPluginBase extends AbstractPlugin<CompositeDialogFragment, FragmentDelegate> { public CompositeDialogFragment getFragment() { return getOriginal(); } }
package com.pascalwelsch.compositeandroid.dialogfragment; import com.pascalwelsch.compositeandroid.core.AbstractPlugin; public class DialogFragmentPluginBase extends AbstractPlugin<CompositeDialogFragment, DialogFragmentDelegate> { public CompositeDialogFragment getFragment() { return getOriginal(); } }
Use correct delegate type for for CompositeDialogFragment plugins
Use correct delegate type for for CompositeDialogFragment plugins
Java
apache-2.0
passsy/CompositeAndroid,passsy/CompositeAndroid
java
## Code Before: package com.pascalwelsch.compositeandroid.dialogfragment; import com.pascalwelsch.compositeandroid.core.AbstractPlugin; import com.pascalwelsch.compositeandroid.fragment.FragmentDelegate; public class DialogFragmentPluginBase extends AbstractPlugin<CompositeDialogFragment, FragmentDelegate> { public CompositeDialogFragment getFragment() { return getOriginal(); } } ## Instruction: Use correct delegate type for for CompositeDialogFragment plugins ## Code After: package com.pascalwelsch.compositeandroid.dialogfragment; import com.pascalwelsch.compositeandroid.core.AbstractPlugin; public class DialogFragmentPluginBase extends AbstractPlugin<CompositeDialogFragment, DialogFragmentDelegate> { public CompositeDialogFragment getFragment() { return getOriginal(); } }
package com.pascalwelsch.compositeandroid.dialogfragment; import com.pascalwelsch.compositeandroid.core.AbstractPlugin; - import com.pascalwelsch.compositeandroid.fragment.FragmentDelegate; + public class DialogFragmentPluginBase - public class DialogFragmentPluginBase extends AbstractPlugin<CompositeDialogFragment, FragmentDelegate> { ? ------ ----- ^^^^^^^^^^^^^^^^^^^^^^^^ + extends AbstractPlugin<CompositeDialogFragment, DialogFragmentDelegate> { ? ^^^^^ ++++++ public CompositeDialogFragment getFragment() { return getOriginal(); } }
4
0.363636
2
2
377fa94c2963a9c2522164ff374431dbe836217e
indra/sources/rlimsp/api.py
indra/sources/rlimsp/api.py
__all__ = ['process_pmc'] import logging import requests from .processor import RlimspProcessor logger = logging.getLogger(__name__) RLIMSP_URL = 'https://research.bioinformatics.udel.edu/itextmine/api/data/rlims/pmc' class RLIMSP_Error(Exception): pass def process_pmc(pmcid, with_grounding=True): """Get an output from RLIMS-p for the given pmic id. Parameters ---------- pmcid : str A PMCID, with the prefix PMC, of the paper to be "read". with_grounding : bool The RLIMS-P web service provides two endpoints, one pre-grounded, the other not so much. The grounded endpoint returns far less content, and may perform some grounding that can be handled by the grounding mapper. """ if with_grounding: resp = requests.get(RLIMSP_URL + '.normed/pmcid/%s' % pmcid) else: resp = requests.get(RLIMSP_URL + '/pmcid/%s' % pmcid) if resp.status_code != 200: raise RLIMSP_Error("Bad status code: %d - %s" % (resp.status_code, resp.reason)) rp = RlimspProcessor(resp.json()) return rp
__all__ = ['process_from_webservice'] import logging import requests from .processor import RlimspProcessor logger = logging.getLogger(__name__) RLIMSP_URL = 'https://research.bioinformatics.udel.edu/itextmine/api/data/rlims/' class RLIMSP_Error(Exception): pass def process_from_webservice(id_val, id_type='pmcid', source='pmc', with_grounding=True): """Get an output from RLIMS-p for the given pmic id. Parameters ---------- id_val : str A PMCID, with the prefix PMC, or pmid, with no prefix, of the paper to be "read". id_type : str Either 'pmid' or 'pmcid'. The default is 'pmcid'. source : str Either 'pmc' or 'medline', whether you want pmc fulltext or medline abstracts. with_grounding : bool The RLIMS-P web service provides two endpoints, one pre-grounded, the other not so much. The grounded endpoint returns far less content, and may perform some grounding that can be handled by the grounding mapper. """ if with_grounding: fmt = '%s.normed/%s/%s' else: fmt = '%s/%s/%s' resp = requests.get(RLIMSP_URL + fmt % (source, id_type, id_val)) if resp.status_code != 200: raise RLIMSP_Error("Bad status code: %d - %s" % (resp.status_code, resp.reason)) rp = RlimspProcessor(resp.json()) return rp
Add capability to read pmids and get medline.
Add capability to read pmids and get medline.
Python
bsd-2-clause
sorgerlab/belpy,bgyori/indra,johnbachman/belpy,johnbachman/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/belpy,sorgerlab/belpy,pvtodorov/indra,pvtodorov/indra,pvtodorov/indra,johnbachman/indra,johnbachman/belpy,sorgerlab/indra,sorgerlab/indra,sorgerlab/indra,bgyori/indra,bgyori/indra,johnbachman/indra
python
## Code Before: __all__ = ['process_pmc'] import logging import requests from .processor import RlimspProcessor logger = logging.getLogger(__name__) RLIMSP_URL = 'https://research.bioinformatics.udel.edu/itextmine/api/data/rlims/pmc' class RLIMSP_Error(Exception): pass def process_pmc(pmcid, with_grounding=True): """Get an output from RLIMS-p for the given pmic id. Parameters ---------- pmcid : str A PMCID, with the prefix PMC, of the paper to be "read". with_grounding : bool The RLIMS-P web service provides two endpoints, one pre-grounded, the other not so much. The grounded endpoint returns far less content, and may perform some grounding that can be handled by the grounding mapper. """ if with_grounding: resp = requests.get(RLIMSP_URL + '.normed/pmcid/%s' % pmcid) else: resp = requests.get(RLIMSP_URL + '/pmcid/%s' % pmcid) if resp.status_code != 200: raise RLIMSP_Error("Bad status code: %d - %s" % (resp.status_code, resp.reason)) rp = RlimspProcessor(resp.json()) return rp ## Instruction: Add capability to read pmids and get medline. ## Code After: __all__ = ['process_from_webservice'] import logging import requests from .processor import RlimspProcessor logger = logging.getLogger(__name__) RLIMSP_URL = 'https://research.bioinformatics.udel.edu/itextmine/api/data/rlims/' class RLIMSP_Error(Exception): pass def process_from_webservice(id_val, id_type='pmcid', source='pmc', with_grounding=True): """Get an output from RLIMS-p for the given pmic id. Parameters ---------- id_val : str A PMCID, with the prefix PMC, or pmid, with no prefix, of the paper to be "read". id_type : str Either 'pmid' or 'pmcid'. The default is 'pmcid'. source : str Either 'pmc' or 'medline', whether you want pmc fulltext or medline abstracts. with_grounding : bool The RLIMS-P web service provides two endpoints, one pre-grounded, the other not so much. The grounded endpoint returns far less content, and may perform some grounding that can be handled by the grounding mapper. """ if with_grounding: fmt = '%s.normed/%s/%s' else: fmt = '%s/%s/%s' resp = requests.get(RLIMSP_URL + fmt % (source, id_type, id_val)) if resp.status_code != 200: raise RLIMSP_Error("Bad status code: %d - %s" % (resp.status_code, resp.reason)) rp = RlimspProcessor(resp.json()) return rp
- __all__ = ['process_pmc'] ? ^ + __all__ = ['process_from_webservice'] ? ^^^ +++++++++ + import logging import requests from .processor import RlimspProcessor logger = logging.getLogger(__name__) - RLIMSP_URL = 'https://research.bioinformatics.udel.edu/itextmine/api/data/rlims/pmc' ? --- + RLIMSP_URL = 'https://research.bioinformatics.udel.edu/itextmine/api/data/rlims/' class RLIMSP_Error(Exception): pass - def process_pmc(pmcid, with_grounding=True): + def process_from_webservice(id_val, id_type='pmcid', source='pmc', + with_grounding=True): """Get an output from RLIMS-p for the given pmic id. Parameters ---------- - pmcid : str ? --- + id_val : str ? ++++ - A PMCID, with the prefix PMC, of the paper to be "read". + A PMCID, with the prefix PMC, or pmid, with no prefix, of the paper to + be "read". + id_type : str + Either 'pmid' or 'pmcid'. The default is 'pmcid'. + source : str + Either 'pmc' or 'medline', whether you want pmc fulltext or medline + abstracts. with_grounding : bool The RLIMS-P web service provides two endpoints, one pre-grounded, the other not so much. The grounded endpoint returns far less content, and may perform some grounding that can be handled by the grounding mapper. """ if with_grounding: - resp = requests.get(RLIMSP_URL + '.normed/pmcid/%s' % pmcid) + fmt = '%s.normed/%s/%s' else: - resp = requests.get(RLIMSP_URL + '/pmcid/%s' % pmcid) + fmt = '%s/%s/%s' + + resp = requests.get(RLIMSP_URL + fmt % (source, id_type, id_val)) if resp.status_code != 200: raise RLIMSP_Error("Bad status code: %d - %s" % (resp.status_code, resp.reason)) rp = RlimspProcessor(resp.json()) return rp
23
0.547619
16
7
29652896b0d2bccaa6b74cc11ff1ce2f154af330
test/specs/4loop.spec.js
test/specs/4loop.spec.js
const FourLoop = require('../../index'); describe('4loop', () => { it('callback executed on obj', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop({ cats: 'rule' }, callback); expect(wasCallbackHit).toBe(true); }); it('callback executed on array', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(['cats', 'rule'], callback); expect(wasCallbackHit).toBe(true); }); it('callback executed on number', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(['cats', 'rule'].length, callback); expect(wasCallbackHit).toBe(true); }); });
const FourLoop = require('../../index'); describe('4loop', () => { describe('ensures callbacks were executed', () => { it('called the callback executed on obj', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop({ cats: 'rule' }, callback); expect(wasCallbackHit).toBe(true); }); it('called the callback executed on array', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(['cats', 'rule'], callback); expect(wasCallbackHit).toBe(true); }); it('called the callback executed on number', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(['cats', 'rule'].length, callback); expect(wasCallbackHit).toBe(true); }); it('called the callback executed on set', (expect) => { const mySet = new Set(['foo', 'bar', { baz: 'cats' }]); let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(mySet, callback); expect(wasCallbackHit).toBe(true); }); it('called the callback executed on map', (expect) => { const myMap = new Map([['foo', 'bar'], ['baz', 'cats'], ['dogs', undefined]]); let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(myMap, callback); expect(wasCallbackHit).toBe(true); }); }); });
Add callback tests for map and sets
RB: Add callback tests for map and sets
JavaScript
mit
raymondborkowski/4loop
javascript
## Code Before: const FourLoop = require('../../index'); describe('4loop', () => { it('callback executed on obj', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop({ cats: 'rule' }, callback); expect(wasCallbackHit).toBe(true); }); it('callback executed on array', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(['cats', 'rule'], callback); expect(wasCallbackHit).toBe(true); }); it('callback executed on number', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(['cats', 'rule'].length, callback); expect(wasCallbackHit).toBe(true); }); }); ## Instruction: RB: Add callback tests for map and sets ## Code After: const FourLoop = require('../../index'); describe('4loop', () => { describe('ensures callbacks were executed', () => { it('called the callback executed on obj', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop({ cats: 'rule' }, callback); expect(wasCallbackHit).toBe(true); }); it('called the callback executed on array', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(['cats', 'rule'], callback); expect(wasCallbackHit).toBe(true); }); it('called the callback executed on number', (expect) => { let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(['cats', 'rule'].length, callback); expect(wasCallbackHit).toBe(true); }); it('called the callback executed on set', (expect) => { const mySet = new Set(['foo', 'bar', { baz: 'cats' }]); let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(mySet, callback); expect(wasCallbackHit).toBe(true); }); it('called the callback executed on map', (expect) => { const myMap = new Map([['foo', 'bar'], ['baz', 'cats'], ['dogs', undefined]]); let wasCallbackHit = false; const callback = function callback(){ wasCallbackHit = true; }; FourLoop(myMap, callback); expect(wasCallbackHit).toBe(true); }); }); });
const FourLoop = require('../../index'); describe('4loop', () => { + describe('ensures callbacks were executed', () => { - it('callback executed on obj', (expect) => { + it('called the callback executed on obj', (expect) => { ? ++++ +++++++++++ - let wasCallbackHit = false; + let wasCallbackHit = false; ? ++++ - const callback = function callback(){ + const callback = function callback(){ ? ++++ - wasCallbackHit = true; + wasCallbackHit = true; ? ++++ - }; + }; ? ++++ - FourLoop({ cats: 'rule' }, callback); + FourLoop({ cats: 'rule' }, callback); ? ++++ - expect(wasCallbackHit).toBe(true); + expect(wasCallbackHit).toBe(true); ? ++++ - }); + }); ? ++++ - it('callback executed on array', (expect) => { + it('called the callback executed on array', (expect) => { ? ++++ +++++++++++ - let wasCallbackHit = false; + let wasCallbackHit = false; ? ++++ - const callback = function callback(){ + const callback = function callback(){ ? ++++ - wasCallbackHit = true; + wasCallbackHit = true; ? ++++ - }; + }; ? ++++ - FourLoop(['cats', 'rule'], callback); + FourLoop(['cats', 'rule'], callback); ? ++++ - expect(wasCallbackHit).toBe(true); + expect(wasCallbackHit).toBe(true); ? ++++ - }); + }); ? ++++ - it('callback executed on number', (expect) => { + it('called the callback executed on number', (expect) => { ? ++++ +++++++++++ - let wasCallbackHit = false; + let wasCallbackHit = false; ? ++++ - const callback = function callback(){ + const callback = function callback(){ ? ++++ - wasCallbackHit = true; + wasCallbackHit = true; ? ++++ - }; + }; ? ++++ - FourLoop(['cats', 'rule'].length, callback); + FourLoop(['cats', 'rule'].length, callback); ? ++++ - expect(wasCallbackHit).toBe(true); + expect(wasCallbackHit).toBe(true); ? ++++ + }); + it('called the callback executed on set', (expect) => { + const mySet = new Set(['foo', 'bar', { baz: 'cats' }]); + let wasCallbackHit = false; + + const callback = function callback(){ + wasCallbackHit = true; + }; + + FourLoop(mySet, callback); + expect(wasCallbackHit).toBe(true); + }); + it('called the callback executed on map', (expect) => { + const myMap = new Map([['foo', 'bar'], ['baz', 'cats'], ['dogs', undefined]]); + let wasCallbackHit = false; + + const callback = function callback(){ + wasCallbackHit = true; + }; + + FourLoop(myMap, callback); + expect(wasCallbackHit).toBe(true); + }); }); });
70
2.5
47
23
4016ff795bb184461996c5539327befc8da2af6f
.circleci/config.yml
.circleci/config.yml
version: 2 jobs: build: parallelism: 4 shell: /bin/bash --login docker: - image: ericfreese/zsh-autosuggestions-test:latest command: /sbin/init steps: - checkout - run: name: Running tests command: | for v in $(grep "^[^#]" ZSH_VERSIONS | awk "(NR + $CIRCLE_NODE_INDEX) % $CIRCLE_NODE_TOTAL == 0"); do TEST_ZSH_BIN=zsh-$v make test || exit 1 done
version: 2 jobs: build: parallelism: 4 shell: /bin/bash --login docker: - image: ericfreese/zsh-autosuggestions-test:latest steps: - checkout - run: name: Running tests command: | for v in $(grep "^[^#]" ZSH_VERSIONS | awk "(NR + $CIRCLE_NODE_INDEX) % $CIRCLE_NODE_TOTAL == 0"); do TEST_ZSH_BIN=zsh-$v make test || exit 1 done
Fix circle ci build issues
Fix circle ci build issues We are getting errors on circle ci builds (e.g. see [1]): ``` CircleCI was unable to run the job runner because we were unable to execute commands in build container. This typically means that the build container entrypoint or command is terminating the container prematurely, or interfering with executed commands. Consider clearing entrypoint/command values and try again. ``` Folks in this thread [2] suggest removing the `command: /sbin/init` line initially added by the v1 => v2 migration script. --- 1: https://circleci.com/gh/zsh-users/zsh-autosuggestions/381 2: https://discuss.circleci.com/t/circleci-was-unable-to-run-the-job-runner/31894/18
YAML
mit
ascenator/zsh-autosuggestions,tarruda/zsh-autosuggestions,zsh-users/zsh-autosuggestions,zsh-users/zsh-autosuggestions
yaml
## Code Before: version: 2 jobs: build: parallelism: 4 shell: /bin/bash --login docker: - image: ericfreese/zsh-autosuggestions-test:latest command: /sbin/init steps: - checkout - run: name: Running tests command: | for v in $(grep "^[^#]" ZSH_VERSIONS | awk "(NR + $CIRCLE_NODE_INDEX) % $CIRCLE_NODE_TOTAL == 0"); do TEST_ZSH_BIN=zsh-$v make test || exit 1 done ## Instruction: Fix circle ci build issues We are getting errors on circle ci builds (e.g. see [1]): ``` CircleCI was unable to run the job runner because we were unable to execute commands in build container. This typically means that the build container entrypoint or command is terminating the container prematurely, or interfering with executed commands. Consider clearing entrypoint/command values and try again. ``` Folks in this thread [2] suggest removing the `command: /sbin/init` line initially added by the v1 => v2 migration script. --- 1: https://circleci.com/gh/zsh-users/zsh-autosuggestions/381 2: https://discuss.circleci.com/t/circleci-was-unable-to-run-the-job-runner/31894/18 ## Code After: version: 2 jobs: build: parallelism: 4 shell: /bin/bash --login docker: - image: ericfreese/zsh-autosuggestions-test:latest steps: - checkout - run: name: Running tests command: | for v in $(grep "^[^#]" ZSH_VERSIONS | awk "(NR + $CIRCLE_NODE_INDEX) % $CIRCLE_NODE_TOTAL == 0"); do TEST_ZSH_BIN=zsh-$v make test || exit 1 done
version: 2 jobs: build: parallelism: 4 shell: /bin/bash --login docker: - image: ericfreese/zsh-autosuggestions-test:latest - command: /sbin/init steps: - checkout - run: name: Running tests command: | for v in $(grep "^[^#]" ZSH_VERSIONS | awk "(NR + $CIRCLE_NODE_INDEX) % $CIRCLE_NODE_TOTAL == 0"); do TEST_ZSH_BIN=zsh-$v make test || exit 1 done
1
0.0625
0
1
0b12f86eb4d54a66c53f34beab73135a9e895c3e
Promsort/tests/in1.v2/method_parameters.xml
Promsort/tests/in1.v2/method_parameters.xml
<?xml version="1.0" encoding="UTF-8"?> <xmcda:XMCDA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmcda="http://www.decision-deck.org/2016/XMCDA-2.2.2" xsi:schemaLocation="http://www.decision-deck.org/2016/XMCDA-2.2.2 http://www.decision-deck.org/xmcda/_downloads/XMCDA-2.2.2.xsd"> <methodParameters> <parameter name="cut_point"> <value> <real>0.0</real> </value> </parameter> <parameter name="assign_to_better_class"> <value> <boolean>true</boolean> </value> </parameter> </methodParameters> </xmcda:XMCDA>
<?xml version="1.0" encoding="UTF-8"?> <xmcda:XMCDA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmcda="http://www.decision-deck.org/2016/XMCDA-2.2.2" xsi:schemaLocation="http://www.decision-deck.org/2016/XMCDA-2.2.2 http://www.decision-deck.org/xmcda/_downloads/XMCDA-2.2.2.xsd"> <methodParameters> <parameter id="cutPoint"> <value> <real>0.0</real> </value> </parameter> <parameter id="assignToABetterClass"> <value> <boolean>true</boolean> </value> </parameter> </methodParameters> </xmcda:XMCDA>
Fix test in1.v2: method params' ids to match the expected values
[Promsort] Fix test in1.v2: method params' ids to match the expected values
XML
mit
maciej7777/PrometheeDiviz,maciej7777/PrometheeDiviz,sbigaret/PrometheeDiviz-maciej7777,sbigaret/PrometheeDiviz-maciej7777
xml
## Code Before: <?xml version="1.0" encoding="UTF-8"?> <xmcda:XMCDA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmcda="http://www.decision-deck.org/2016/XMCDA-2.2.2" xsi:schemaLocation="http://www.decision-deck.org/2016/XMCDA-2.2.2 http://www.decision-deck.org/xmcda/_downloads/XMCDA-2.2.2.xsd"> <methodParameters> <parameter name="cut_point"> <value> <real>0.0</real> </value> </parameter> <parameter name="assign_to_better_class"> <value> <boolean>true</boolean> </value> </parameter> </methodParameters> </xmcda:XMCDA> ## Instruction: [Promsort] Fix test in1.v2: method params' ids to match the expected values ## Code After: <?xml version="1.0" encoding="UTF-8"?> <xmcda:XMCDA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmcda="http://www.decision-deck.org/2016/XMCDA-2.2.2" xsi:schemaLocation="http://www.decision-deck.org/2016/XMCDA-2.2.2 http://www.decision-deck.org/xmcda/_downloads/XMCDA-2.2.2.xsd"> <methodParameters> <parameter id="cutPoint"> <value> <real>0.0</real> </value> </parameter> <parameter id="assignToABetterClass"> <value> <boolean>true</boolean> </value> </parameter> </methodParameters> </xmcda:XMCDA>
<?xml version="1.0" encoding="UTF-8"?> <xmcda:XMCDA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xmcda="http://www.decision-deck.org/2016/XMCDA-2.2.2" xsi:schemaLocation="http://www.decision-deck.org/2016/XMCDA-2.2.2 http://www.decision-deck.org/xmcda/_downloads/XMCDA-2.2.2.xsd"> <methodParameters> - <parameter name="cut_point"> ? ^^^^ ^^ + <parameter id="cutPoint"> ? ^^ ^ <value> <real>0.0</real> </value> </parameter> - <parameter name="assign_to_better_class"> ? ^^^^ ^^ ^^ ^^ + <parameter id="assignToABetterClass"> ? ^^ ^ ^^ ^ <value> <boolean>true</boolean> </value> </parameter> </methodParameters> </xmcda:XMCDA>
4
0.2
2
2
1510981d302c9a54cabe73b87c0dde37881f9c79
app/templates/components/schedule-list.hbs
app/templates/components/schedule-list.hbs
{{#each list.schedules as |schedule|}} {{schedule-edit schedule=schedule onInsert='registerComponent' createNewEvent='createNewEvent' disallowAllEdits='disallowAllEdits'}} {{/each}} <div class="schedule__icon" {{action 'createNewSchedule'}}> + </div>
{{#each list.schedules as |schedule|}} {{schedule-edit schedule=schedule onInsert='registerComponent' createNewEvent='createNewEvent' disallowAllEdits='disallowAllEdits'}} {{/each}} <div> <div class="schedule__icon" {{action 'createNewSchedule'}}> + </div> </div>
Make the new schedule button behave the same as the other icons.
Make the new schedule button behave the same as the other icons.
Handlebars
mit
erbridge/iris,erbridge/gladys,erbridge/gladys,erbridge/iris
handlebars
## Code Before: {{#each list.schedules as |schedule|}} {{schedule-edit schedule=schedule onInsert='registerComponent' createNewEvent='createNewEvent' disallowAllEdits='disallowAllEdits'}} {{/each}} <div class="schedule__icon" {{action 'createNewSchedule'}}> + </div> ## Instruction: Make the new schedule button behave the same as the other icons. ## Code After: {{#each list.schedules as |schedule|}} {{schedule-edit schedule=schedule onInsert='registerComponent' createNewEvent='createNewEvent' disallowAllEdits='disallowAllEdits'}} {{/each}} <div> <div class="schedule__icon" {{action 'createNewSchedule'}}> + </div> </div>
{{#each list.schedules as |schedule|}} {{schedule-edit schedule=schedule onInsert='registerComponent' createNewEvent='createNewEvent' disallowAllEdits='disallowAllEdits'}} {{/each}} - <div class="schedule__icon" {{action 'createNewSchedule'}}> + <div> + <div class="schedule__icon" {{action 'createNewSchedule'}}> + - + + + ? ++ + + </div> </div>
8
0.727273
6
2
7fc3d10a9b9f575aa6417a5b6354f3ad892d1357
chrome/browser/resources/ntp4/guest_tab.html
chrome/browser/resources/ntp4/guest_tab.html
<!DOCTYPE html> <html i18n-values="dir:textdirection"> <head> <meta charset="utf-8"> <title i18n-content="title"></title> <link rel="stylesheet" href="incognito_and_guest_tab.css"> <script> // Until themes can clear the cache, force-reload the theme stylesheet. document.write('<link id="guestthemecss" rel="stylesheet" ' + 'href="chrome://theme/css/guest_new_tab_theme.css?' + Date.now() + '">'); </script> </head> <body> <div class="content" i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> <h1 i18n-content="guestTabHeading"></h1> <p> <span i18n-content="guestTabDescription"></span> <a i18n-content="learnMore" i18n-values=".href:learnMoreLink"></a> </p> </div> </body> <script src="chrome://resources/js/cr.js"></script> <script> function themeChanged() { document.getElementById('guestthemecss').href = 'chrome://theme/css/guest_new_tab_theme.css?' + Date.now(); } </script> </html>
<!DOCTYPE html> <html i18n-values="dir:textdirection"> <head> <meta charset="utf-8"> <title i18n-content="title"></title> <link rel="stylesheet" href="incognito_and_guest_tab.css"> <script> // Until themes can clear the cache, force-reload the theme stylesheet. document.write('<link id="guestthemecss" rel="stylesheet" ' + 'href="chrome://theme/css/guest_new_tab_theme.css?' + Date.now() + '">'); </script> </head> <body> <div class="content" i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> <h1 i18n-content="guestTabHeading"></h1> <p> <span i18n-content="guestTabDescription"></span> <a i18n-content="learnMore" i18n-values=".href:learnMoreLink"></a> </p> </div> </body> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script> function themeChanged() { document.getElementById('guestthemecss').href = 'chrome://theme/css/guest_new_tab_theme.css?' + Date.now(); } </script> </html>
Add missing .js file to allow load-time datafill of Guest screen.
Add missing .js file to allow load-time datafill of Guest screen. BUG=418443 Review URL: https://codereview.chromium.org/633193002 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#298903}
HTML
bsd-3-clause
jaruba/chromium.src,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,dednal/chromium.src,Just-D/chromium-1,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,ltilve/chromium,ltilve/chromium,chuan9/chromium-crosswalk,markYoungH/chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,M4sse/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk,ltilve/chromium,ltilve/chromium,axinging/chromium-crosswalk,ltilve/chromium,TheTypoMaster/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,dushu1203/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,Chilledheart/chromium,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,Just-D/chromium-1,M4sse/chromium.src,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,Jonekee/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,jaruba/chromium.src,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,dednal/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,dednal/chromium.src,fujunwei/chromium-crosswalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,M4sse/chromium.src,Just-D/chromium-1,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,Chilledheart/chromium,ltilve/chromium,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,dednal/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,jaruba/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,Just-D/chromium-1,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,dednal/chromium.src,dushu1203/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,Fireblend/chromium-crosswalk
html
## Code Before: <!DOCTYPE html> <html i18n-values="dir:textdirection"> <head> <meta charset="utf-8"> <title i18n-content="title"></title> <link rel="stylesheet" href="incognito_and_guest_tab.css"> <script> // Until themes can clear the cache, force-reload the theme stylesheet. document.write('<link id="guestthemecss" rel="stylesheet" ' + 'href="chrome://theme/css/guest_new_tab_theme.css?' + Date.now() + '">'); </script> </head> <body> <div class="content" i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> <h1 i18n-content="guestTabHeading"></h1> <p> <span i18n-content="guestTabDescription"></span> <a i18n-content="learnMore" i18n-values=".href:learnMoreLink"></a> </p> </div> </body> <script src="chrome://resources/js/cr.js"></script> <script> function themeChanged() { document.getElementById('guestthemecss').href = 'chrome://theme/css/guest_new_tab_theme.css?' + Date.now(); } </script> </html> ## Instruction: Add missing .js file to allow load-time datafill of Guest screen. BUG=418443 Review URL: https://codereview.chromium.org/633193002 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#298903} ## Code After: <!DOCTYPE html> <html i18n-values="dir:textdirection"> <head> <meta charset="utf-8"> <title i18n-content="title"></title> <link rel="stylesheet" href="incognito_and_guest_tab.css"> <script> // Until themes can clear the cache, force-reload the theme stylesheet. document.write('<link id="guestthemecss" rel="stylesheet" ' + 'href="chrome://theme/css/guest_new_tab_theme.css?' + Date.now() + '">'); </script> </head> <body> <div class="content" i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> <h1 i18n-content="guestTabHeading"></h1> <p> <span i18n-content="guestTabDescription"></span> <a i18n-content="learnMore" i18n-values=".href:learnMoreLink"></a> </p> </div> </body> <script src="chrome://resources/js/cr.js"></script> <script src="chrome://resources/js/load_time_data.js"></script> <script> function themeChanged() { document.getElementById('guestthemecss').href = 'chrome://theme/css/guest_new_tab_theme.css?' + Date.now(); } </script> </html>
<!DOCTYPE html> <html i18n-values="dir:textdirection"> <head> <meta charset="utf-8"> <title i18n-content="title"></title> <link rel="stylesheet" href="incognito_and_guest_tab.css"> <script> // Until themes can clear the cache, force-reload the theme stylesheet. document.write('<link id="guestthemecss" rel="stylesheet" ' + 'href="chrome://theme/css/guest_new_tab_theme.css?' + Date.now() + '">'); </script> </head> <body> <div class="content" i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> <h1 i18n-content="guestTabHeading"></h1> <p> <span i18n-content="guestTabDescription"></span> <a i18n-content="learnMore" i18n-values=".href:learnMoreLink"></a> </p> </div> </body> <script src="chrome://resources/js/cr.js"></script> + <script src="chrome://resources/js/load_time_data.js"></script> <script> function themeChanged() { document.getElementById('guestthemecss').href = 'chrome://theme/css/guest_new_tab_theme.css?' + Date.now(); } </script> </html>
1
0.032258
1
0
b1d8abc10df10eb0c6dc6499cc03da73de2cdf80
requirements/prod.txt
requirements/prod.txt
h5py==2.6.0 Keras==1.2.1 matplotlib==2.0.0 networkx==1.11 neuroglancer==0.0.8 numpy==1.12.0 Pillow==4.0.0 pytoml==0.1.11 requests==2.13.0 scipy==0.18.1 tensorflow-gpu==0.12.1 tqdm==4.11.2
h5py==2.6.0 Keras==1.2.1 matplotlib==2.0.0 networkx==1.11 neuroglancer==0.0.8 numpy==1.12.0 Pillow==4.0.0 pytoml==0.1.11 requests==2.13.0 scikit-image==0.13.0 scipy==0.18.1 tensorflow-gpu==0.12.1 tqdm==4.11.2
Add scikit-image dependency for seed generation
Add scikit-image dependency for seed generation
Text
mit
aschampion/diluvian
text
## Code Before: h5py==2.6.0 Keras==1.2.1 matplotlib==2.0.0 networkx==1.11 neuroglancer==0.0.8 numpy==1.12.0 Pillow==4.0.0 pytoml==0.1.11 requests==2.13.0 scipy==0.18.1 tensorflow-gpu==0.12.1 tqdm==4.11.2 ## Instruction: Add scikit-image dependency for seed generation ## Code After: h5py==2.6.0 Keras==1.2.1 matplotlib==2.0.0 networkx==1.11 neuroglancer==0.0.8 numpy==1.12.0 Pillow==4.0.0 pytoml==0.1.11 requests==2.13.0 scikit-image==0.13.0 scipy==0.18.1 tensorflow-gpu==0.12.1 tqdm==4.11.2
h5py==2.6.0 Keras==1.2.1 matplotlib==2.0.0 networkx==1.11 neuroglancer==0.0.8 numpy==1.12.0 Pillow==4.0.0 pytoml==0.1.11 requests==2.13.0 + scikit-image==0.13.0 scipy==0.18.1 tensorflow-gpu==0.12.1 tqdm==4.11.2
1
0.083333
1
0
54425aa7601914e7471d0abc427622567fa14151
assets/json/shop_config.json
assets/json/shop_config.json
{ "armor_cost": 10, "items" : [ { "name" : "armor", "file" : "Armor.png" }, { "name" : "shield", "file" : "Shield.png" } ] }
{ "armor_cost": 10, "items" : [ { "name" : "armor", "file" : "Armor.png" }, { "name" : "shield", "file" : "Shield.png" }, { "name" : "vacuum", "file" : "Vacuum.png" } ] }
Add vacuum to the shop
Add vacuum to the shop
JSON
mit
nhandy/gem_cart_rush,nhandy/gem_cart_rush
json
## Code Before: { "armor_cost": 10, "items" : [ { "name" : "armor", "file" : "Armor.png" }, { "name" : "shield", "file" : "Shield.png" } ] } ## Instruction: Add vacuum to the shop ## Code After: { "armor_cost": 10, "items" : [ { "name" : "armor", "file" : "Armor.png" }, { "name" : "shield", "file" : "Shield.png" }, { "name" : "vacuum", "file" : "Vacuum.png" } ] }
{ "armor_cost": 10, "items" : [ { "name" : "armor", "file" : "Armor.png" }, { "name" : "shield", "file" : "Shield.png" + }, + { + "name" : "vacuum", + "file" : "Vacuum.png" } ] }
4
0.285714
4
0
c0323c35af8f232fec7f10b1c82dd9dc435f69b1
_includes/head/custom.html
_includes/head/custom.html
<!-- start custom head snippets --> <!-- insert favicons. use https://realfavicongenerator.net/ --> <!-- end custom head snippets -->
<!-- start custom head snippets --> <!-- insert favicons. use https://realfavicongenerator.net/ --> <iframe src="//partners.coupang.com/cdn/redirect?url=customjs/affiliate/search-bar/0.0.3/logo-02.html?trackingCode=AF6171341" width="100%" height="44" frameborder="0" scrolling="no"></iframe> <!-- end custom head snippets -->
Add coupang search bar on header
Add coupang search bar on header
HTML
mit
LoveMeWithoutAll/lovemewithoutall.github.io,LoveMeWithoutAll/lovemewithoutall.github.io,LoveMeWithoutAll/lovemewithoutall.github.io
html
## Code Before: <!-- start custom head snippets --> <!-- insert favicons. use https://realfavicongenerator.net/ --> <!-- end custom head snippets --> ## Instruction: Add coupang search bar on header ## Code After: <!-- start custom head snippets --> <!-- insert favicons. use https://realfavicongenerator.net/ --> <iframe src="//partners.coupang.com/cdn/redirect?url=customjs/affiliate/search-bar/0.0.3/logo-02.html?trackingCode=AF6171341" width="100%" height="44" frameborder="0" scrolling="no"></iframe> <!-- end custom head snippets -->
<!-- start custom head snippets --> <!-- insert favicons. use https://realfavicongenerator.net/ --> - + <iframe src="//partners.coupang.com/cdn/redirect?url=customjs/affiliate/search-bar/0.0.3/logo-02.html?trackingCode=AF6171341" width="100%" height="44" frameborder="0" scrolling="no"></iframe> <!-- end custom head snippets -->
2
0.4
1
1
0c39deaa7160b078e9a9ac339f0464cd67c25a98
app/workers/gem_installer.rb
app/workers/gem_installer.rb
class GemInstaller include SuckerPunch::Job workers 16 WORKING = [] def perform(gem_name, version = nil) SuckerPunch.logger.info "install #{gem_name} #{version}" pl = Plugin.new(gem_name: gem_name, version: version) WORKING.push(pl) pl.uninstall! if pl.installed? pl.install! WORKING.delete(pl) SuckerPunch.logger.info "installed #{gem_name} #{version}" end end
class GemInstaller include SuckerPunch::Job workers 16 WORKING = [] def perform(gem_name, version = nil) SuckerPunch.logger.info "install #{gem_name} #{version}" pl = Plugin.new(gem_name: gem_name, version: version) unless WORKING.find{|p| p.gem_name == pl.gem_name} WORKING.push(pl) pl.uninstall! if pl.installed? pl.install! WORKING.delete(pl) end SuckerPunch.logger.info "installed #{gem_name} #{version}" end end
Fix to not install plugin if it is installing
Fix to not install plugin if it is installing
Ruby
apache-2.0
mt0803/fluentd-ui,fluent/fluentd-ui,mt0803/fluentd-ui,fluent/fluentd-ui,mt0803/fluentd-ui,fluent/fluentd-ui
ruby
## Code Before: class GemInstaller include SuckerPunch::Job workers 16 WORKING = [] def perform(gem_name, version = nil) SuckerPunch.logger.info "install #{gem_name} #{version}" pl = Plugin.new(gem_name: gem_name, version: version) WORKING.push(pl) pl.uninstall! if pl.installed? pl.install! WORKING.delete(pl) SuckerPunch.logger.info "installed #{gem_name} #{version}" end end ## Instruction: Fix to not install plugin if it is installing ## Code After: class GemInstaller include SuckerPunch::Job workers 16 WORKING = [] def perform(gem_name, version = nil) SuckerPunch.logger.info "install #{gem_name} #{version}" pl = Plugin.new(gem_name: gem_name, version: version) unless WORKING.find{|p| p.gem_name == pl.gem_name} WORKING.push(pl) pl.uninstall! if pl.installed? pl.install! WORKING.delete(pl) end SuckerPunch.logger.info "installed #{gem_name} #{version}" end end
class GemInstaller include SuckerPunch::Job workers 16 WORKING = [] def perform(gem_name, version = nil) SuckerPunch.logger.info "install #{gem_name} #{version}" pl = Plugin.new(gem_name: gem_name, version: version) + unless WORKING.find{|p| p.gem_name == pl.gem_name} - WORKING.push(pl) + WORKING.push(pl) ? ++ - pl.uninstall! if pl.installed? + pl.uninstall! if pl.installed? ? ++ - pl.install! + pl.install! ? ++ - WORKING.delete(pl) + WORKING.delete(pl) ? ++ + end SuckerPunch.logger.info "installed #{gem_name} #{version}" end end
10
0.625
6
4
d00089e1dbb1774e52a1d39e18afa5aec5a447fe
src/Infrastructure/MimeDbRepository.php
src/Infrastructure/MimeDbRepository.php
<?php namespace Reshadman\FileSecretary\Infrastructure; use MimeTyper\Repository\MimeDbRepository as BaseMimeDbRepository; class MimeDbRepository extends BaseMimeDbRepository { public function findExtension($type) { $found = parent::findExtension($type); return FileSecretaryManager::normalizeExtension($found); } public function findType($extension) { // Get all matching extensions. $types = $this->findTypes($extension); if (count($types) > 0) { // Return first match. return $types[0]; } return null; } }
<?php namespace Reshadman\FileSecretary\Infrastructure; use MimeTyper\Repository\MimeDbRepository as BaseMimeDbRepository; class MimeDbRepository extends BaseMimeDbRepository { protected $extendedMimes = [ 'application/x-rar-compressed' => 'rar', 'application/rar' => 'rar' ]; public function findExtension($type) { $found = parent::findExtension($type); if ($found === null) { if (isset($this->extendedMimes[$type])) { $found = $this->extendedMimes[$type]; } } return FileSecretaryManager::normalizeExtension($found); } public function findType($extension) { // Get all matching extensions. $types = $this->findTypes($extension); if (count($types) > 0) { // Return first match. return $types[0]; } return null; } }
Add rar mime type support
Add rar mime type support
PHP
mit
reshadman/file-secretary
php
## Code Before: <?php namespace Reshadman\FileSecretary\Infrastructure; use MimeTyper\Repository\MimeDbRepository as BaseMimeDbRepository; class MimeDbRepository extends BaseMimeDbRepository { public function findExtension($type) { $found = parent::findExtension($type); return FileSecretaryManager::normalizeExtension($found); } public function findType($extension) { // Get all matching extensions. $types = $this->findTypes($extension); if (count($types) > 0) { // Return first match. return $types[0]; } return null; } } ## Instruction: Add rar mime type support ## Code After: <?php namespace Reshadman\FileSecretary\Infrastructure; use MimeTyper\Repository\MimeDbRepository as BaseMimeDbRepository; class MimeDbRepository extends BaseMimeDbRepository { protected $extendedMimes = [ 'application/x-rar-compressed' => 'rar', 'application/rar' => 'rar' ]; public function findExtension($type) { $found = parent::findExtension($type); if ($found === null) { if (isset($this->extendedMimes[$type])) { $found = $this->extendedMimes[$type]; } } return FileSecretaryManager::normalizeExtension($found); } public function findType($extension) { // Get all matching extensions. $types = $this->findTypes($extension); if (count($types) > 0) { // Return first match. return $types[0]; } return null; } }
<?php namespace Reshadman\FileSecretary\Infrastructure; use MimeTyper\Repository\MimeDbRepository as BaseMimeDbRepository; class MimeDbRepository extends BaseMimeDbRepository { + protected $extendedMimes = [ + 'application/x-rar-compressed' => 'rar', + 'application/rar' => 'rar' + ]; + public function findExtension($type) { $found = parent::findExtension($type); + + if ($found === null) { + if (isset($this->extendedMimes[$type])) { + $found = $this->extendedMimes[$type]; + } + } return FileSecretaryManager::normalizeExtension($found); } public function findType($extension) { // Get all matching extensions. $types = $this->findTypes($extension); if (count($types) > 0) { // Return first match. return $types[0]; } return null; } }
11
0.392857
11
0
5e6dd18a0b11eeaa050213621050de1eabe8f1cc
node-caffe/install-caffe.sh
node-caffe/install-caffe.sh
J="-j2" if [[ -z $CI ]]; then J="-j6" fi if [ -z "$CAFFE_ROOT" ]; then # Download caffe SHA=24d2f67173db3344141dce24b1008efffbfe1c7d if [[ ! -d caffe ]]; then echo Downloading caffe git clone git@github.com:BVLC/caffe.git git -C caffe checkout $SHA pushd caffe git am ../patch/0001-Fix-veclib-path-for-OSX-sierra.patch popd fi # Install caffe if [[ ! -f caffe/build/lib/libcaffe.dylib && ! -f caffe/build/lib/libcaffe.so ]]; then echo "Compiling caffe" pushd caffe mkdir -p build pushd build cmake \ -DCPU_ONLY=ON \ -DBUILD_python=OFF \ -DBUILD_matlab=OFF \ -DUSE_LEVELDB=OFF \ -DUSE_LMDB=OFF \ -DBUILD_docs=OFF \ .. make all $J popd popd else echo "Caffe already compiled; skipping compilation" fi else echo "Using caffe from $CAFFE_ROOT" fi
J="-j2" if [[ -z $CI ]]; then J="-j6" fi if [ -z "$CAFFE_ROOT" ]; then cd $(dirname $0) # Download caffe SHA=24d2f67173db3344141dce24b1008efffbfe1c7d if [[ ! -d caffe ]]; then echo Downloading caffe git clone git@github.com:BVLC/caffe.git git -C caffe checkout $SHA pushd caffe git am ../patch/0001-Fix-veclib-path-for-OSX-sierra.patch popd fi # Install caffe if [[ ! -f caffe/build/lib/libcaffe.dylib && ! -f caffe/build/lib/libcaffe.so ]]; then echo "Compiling caffe" pushd caffe mkdir -p build pushd build cmake \ -DCPU_ONLY=ON \ -DBUILD_python=OFF \ -DBUILD_matlab=OFF \ -DUSE_LEVELDB=OFF \ -DUSE_LMDB=OFF \ -DBUILD_docs=OFF \ .. make all $J popd popd else echo "Caffe already compiled; skipping compilation" fi else echo "Using caffe from $CAFFE_ROOT" fi
Install caffe in the right place
Install caffe in the right place
Shell
mit
silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk,silklabs/silk
shell
## Code Before: J="-j2" if [[ -z $CI ]]; then J="-j6" fi if [ -z "$CAFFE_ROOT" ]; then # Download caffe SHA=24d2f67173db3344141dce24b1008efffbfe1c7d if [[ ! -d caffe ]]; then echo Downloading caffe git clone git@github.com:BVLC/caffe.git git -C caffe checkout $SHA pushd caffe git am ../patch/0001-Fix-veclib-path-for-OSX-sierra.patch popd fi # Install caffe if [[ ! -f caffe/build/lib/libcaffe.dylib && ! -f caffe/build/lib/libcaffe.so ]]; then echo "Compiling caffe" pushd caffe mkdir -p build pushd build cmake \ -DCPU_ONLY=ON \ -DBUILD_python=OFF \ -DBUILD_matlab=OFF \ -DUSE_LEVELDB=OFF \ -DUSE_LMDB=OFF \ -DBUILD_docs=OFF \ .. make all $J popd popd else echo "Caffe already compiled; skipping compilation" fi else echo "Using caffe from $CAFFE_ROOT" fi ## Instruction: Install caffe in the right place ## Code After: J="-j2" if [[ -z $CI ]]; then J="-j6" fi if [ -z "$CAFFE_ROOT" ]; then cd $(dirname $0) # Download caffe SHA=24d2f67173db3344141dce24b1008efffbfe1c7d if [[ ! -d caffe ]]; then echo Downloading caffe git clone git@github.com:BVLC/caffe.git git -C caffe checkout $SHA pushd caffe git am ../patch/0001-Fix-veclib-path-for-OSX-sierra.patch popd fi # Install caffe if [[ ! -f caffe/build/lib/libcaffe.dylib && ! -f caffe/build/lib/libcaffe.so ]]; then echo "Compiling caffe" pushd caffe mkdir -p build pushd build cmake \ -DCPU_ONLY=ON \ -DBUILD_python=OFF \ -DBUILD_matlab=OFF \ -DUSE_LEVELDB=OFF \ -DUSE_LMDB=OFF \ -DBUILD_docs=OFF \ .. make all $J popd popd else echo "Caffe already compiled; skipping compilation" fi else echo "Using caffe from $CAFFE_ROOT" fi
J="-j2" if [[ -z $CI ]]; then J="-j6" fi if [ -z "$CAFFE_ROOT" ]; then + cd $(dirname $0) + # Download caffe SHA=24d2f67173db3344141dce24b1008efffbfe1c7d if [[ ! -d caffe ]]; then echo Downloading caffe git clone git@github.com:BVLC/caffe.git git -C caffe checkout $SHA pushd caffe git am ../patch/0001-Fix-veclib-path-for-OSX-sierra.patch popd fi # Install caffe if [[ ! -f caffe/build/lib/libcaffe.dylib && ! -f caffe/build/lib/libcaffe.so ]]; then echo "Compiling caffe" pushd caffe mkdir -p build pushd build cmake \ -DCPU_ONLY=ON \ -DBUILD_python=OFF \ -DBUILD_matlab=OFF \ -DUSE_LEVELDB=OFF \ -DUSE_LMDB=OFF \ -DBUILD_docs=OFF \ .. make all $J popd popd else echo "Caffe already compiled; skipping compilation" fi else echo "Using caffe from $CAFFE_ROOT" fi
2
0.04878
2
0
5bce7a474102430679f4761de76bd872341b849a
iptables/README.mkd
iptables/README.mkd
Since this seems to be a popular section I split it off into it's own github project: https://github.com/vrillusions/iptables-init If you are just looking for the last version that existed here, it would be from commit 051b6c797d .
Since this seems to be a popular section I split it off into it's own github project: https://github.com/vrillusions/iptables-init If you are just looking for the last version that existed here, it was last updated in commit [051b6c797d](https://github.com/vrillusions/bash-scripts/commit/051b6c797dd296f6baaf7056569ea8b10802559d).
Fix link to commit with iptables
Fix link to commit with iptables Apparently you can't specify a commit hash that auto links so just specify manualy
Markdown
unlicense
vrillusions/bash-scripts
markdown
## Code Before: Since this seems to be a popular section I split it off into it's own github project: https://github.com/vrillusions/iptables-init If you are just looking for the last version that existed here, it would be from commit 051b6c797d . ## Instruction: Fix link to commit with iptables Apparently you can't specify a commit hash that auto links so just specify manualy ## Code After: Since this seems to be a popular section I split it off into it's own github project: https://github.com/vrillusions/iptables-init If you are just looking for the last version that existed here, it was last updated in commit [051b6c797d](https://github.com/vrillusions/bash-scripts/commit/051b6c797dd296f6baaf7056569ea8b10802559d).
Since this seems to be a popular section I split it off into it's own github project: https://github.com/vrillusions/iptables-init - If you are just looking for the last version that existed here, it would be from commit 051b6c797d . + If you are just looking for the last version that existed here, it was last updated in commit [051b6c797d](https://github.com/vrillusions/bash-scripts/commit/051b6c797dd296f6baaf7056569ea8b10802559d).
2
0.5
1
1
a337a36d8ba15a7796408c865cfebc3d550129eb
generators/friendly_id/friendly_id_generator.rb
generators/friendly_id/friendly_id_generator.rb
class FriendlyIdGenerator < Rails::Generator::Base def manifest record do |m| unless options[:skip_migration] m.migration_template( 'create_slugs.rb', 'db/migrate', :migration_file_name => 'create_slugs' ) m.file "/../../../lib/tasks/friendly_id.rake", "lib/tasks/friendly_id.rake" end end end end
class FriendlyIdGenerator < Rails::Generator::Base def manifest record do |m| unless options[:skip_migration] m.migration_template( 'create_slugs.rb', 'db/migrate', :migration_file_name => 'create_slugs' ) m.directory "lib/tasks" m.file "/../../../lib/tasks/friendly_id.rake", "lib/tasks/friendly_id.rake" end end end end
Make sure lib/tasks exists before putting a file ther.
Make sure lib/tasks exists before putting a file ther.
Ruby
mit
onursarikaya/friendly_id,kangkyu/friendly_id,joshsoftware/friendly_id,tekin/friendly_id,Pathgather/friendly_id,MatthewRDodds/friendly_id,ThanhKhoaIT/friendly_id,morsedigital/friendly_id,Empact/friendly_id,MAubreyK/friendly_id,norman/friendly_id,sideci-sample/sideci-sample-friendly_id,zenhacks/friendly_id,ashagnanasekar/friendly_id
ruby
## Code Before: class FriendlyIdGenerator < Rails::Generator::Base def manifest record do |m| unless options[:skip_migration] m.migration_template( 'create_slugs.rb', 'db/migrate', :migration_file_name => 'create_slugs' ) m.file "/../../../lib/tasks/friendly_id.rake", "lib/tasks/friendly_id.rake" end end end end ## Instruction: Make sure lib/tasks exists before putting a file ther. ## Code After: class FriendlyIdGenerator < Rails::Generator::Base def manifest record do |m| unless options[:skip_migration] m.migration_template( 'create_slugs.rb', 'db/migrate', :migration_file_name => 'create_slugs' ) m.directory "lib/tasks" m.file "/../../../lib/tasks/friendly_id.rake", "lib/tasks/friendly_id.rake" end end end end
class FriendlyIdGenerator < Rails::Generator::Base def manifest record do |m| unless options[:skip_migration] m.migration_template( 'create_slugs.rb', 'db/migrate', :migration_file_name => 'create_slugs' ) + m.directory "lib/tasks" m.file "/../../../lib/tasks/friendly_id.rake", "lib/tasks/friendly_id.rake" end end end end
1
0.083333
1
0
c6105531cdf452290114d4b72931dccd33534853
README.md
README.md
Kitten Litter ============= This is where I put all my cat crap. ## Prerequisites * PHP 5.4 ## Setup ``` git clone git@github.com:tentacode/KittenLitter.git cd KittentLitter composer.phar install bin/reload app/console assets:install ``` ## Run ``` app/console server:run ``` ## Stuff [Elastic search](src/App/Resources/doc/elastic.md) ## About RAD Bundle Read the [full documentation](http://rad.knplabs.com/).
Kitten Litter ============= This is where I put all my cat crap. ## Prerequisites * PHP 5.4 ## Setup ``` git clone git@github.com:tentacode/KittenLitter.git cd KittentLitter composer.phar install bin/reload ``` ## Run ``` app/console server:run ``` ## Stuff [Elastic search](src/App/Resources/doc/elastic.md) ## About RAD Bundle Read the [full documentation](http://rad.knplabs.com/).
Remove duplicated (and hardlink) asset:install
Remove duplicated (and hardlink) asset:install
Markdown
mit
tentacode/KittenLitter,tentacode/KittenLitter,tentacode/KittenLitter,tentacode/KittenLitter
markdown
## Code Before: Kitten Litter ============= This is where I put all my cat crap. ## Prerequisites * PHP 5.4 ## Setup ``` git clone git@github.com:tentacode/KittenLitter.git cd KittentLitter composer.phar install bin/reload app/console assets:install ``` ## Run ``` app/console server:run ``` ## Stuff [Elastic search](src/App/Resources/doc/elastic.md) ## About RAD Bundle Read the [full documentation](http://rad.knplabs.com/). ## Instruction: Remove duplicated (and hardlink) asset:install ## Code After: Kitten Litter ============= This is where I put all my cat crap. ## Prerequisites * PHP 5.4 ## Setup ``` git clone git@github.com:tentacode/KittenLitter.git cd KittentLitter composer.phar install bin/reload ``` ## Run ``` app/console server:run ``` ## Stuff [Elastic search](src/App/Resources/doc/elastic.md) ## About RAD Bundle Read the [full documentation](http://rad.knplabs.com/).
Kitten Litter ============= This is where I put all my cat crap. ## Prerequisites * PHP 5.4 ## Setup ``` git clone git@github.com:tentacode/KittenLitter.git cd KittentLitter composer.phar install bin/reload - app/console assets:install ``` ## Run ``` app/console server:run ``` ## Stuff [Elastic search](src/App/Resources/doc/elastic.md) ## About RAD Bundle Read the [full documentation](http://rad.knplabs.com/).
1
0.03125
0
1
b58e97a09a781cc1aa90e3ccd13d1a4307bd5462
app/controllers/activities_controller.rb
app/controllers/activities_controller.rb
class ActivitiesController < MyplaceonlineController def model Activity end def display_obj(obj) obj.name end protected def sorts ["lower(activities.name) ASC"] end def obj_params params.require(:activity).permit(:name) end end
class ActivitiesController < MyplaceonlineController def model Activity end def display_obj(obj) obj.name end protected def insecure true end def sorts ["lower(activities.name) ASC"] end def obj_params params.require(:activity).permit(:name) end end
Allow adding activity without password re-entry
Allow adding activity without password re-entry
Ruby
agpl-3.0
myplaceonline/myplaceonline_rails,myplaceonline/myplaceonline_rails,myplaceonline/myplaceonline_rails
ruby
## Code Before: class ActivitiesController < MyplaceonlineController def model Activity end def display_obj(obj) obj.name end protected def sorts ["lower(activities.name) ASC"] end def obj_params params.require(:activity).permit(:name) end end ## Instruction: Allow adding activity without password re-entry ## Code After: class ActivitiesController < MyplaceonlineController def model Activity end def display_obj(obj) obj.name end protected def insecure true end def sorts ["lower(activities.name) ASC"] end def obj_params params.require(:activity).permit(:name) end end
class ActivitiesController < MyplaceonlineController def model Activity end def display_obj(obj) obj.name end protected + def insecure + true + end + def sorts ["lower(activities.name) ASC"] end def obj_params params.require(:activity).permit(:name) end end
4
0.222222
4
0
8640b294faa1f2f99e72ec46d36ba4873d8d3f5b
spec/features/projects/artifacts/browse_spec.rb
spec/features/projects/artifacts/browse_spec.rb
require 'spec_helper' feature 'Browse artifact', :js do let(:project) { create(:project, :public) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) } let(:browse_url) do browse_path('other_artifacts_0.1.2') end def browse_path(path) browse_project_job_artifacts_path(project, job, path) end context 'when visiting old URL' do before do visit browse_url.sub('/-/jobs', '/builds') end it "redirects to new URL" do expect(page.current_path).to eq(browse_url) end end context 'when browsing a directory with an text file' do let(:txt_entry) { job.artifacts_metadata_entry('other_artifacts_0.1.2/doc_sample.txt') } before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) allow(Gitlab.config.pages).to receive(:artifacts_server).and_return(true) visit browse_url end it "shows external link icon and styles" do link = first('.tree-item-file-external-link') expect(link).to have_content('doc_sample.txt') expect(page).to have_selector('.js-artifact-tree-external-icon') end end end
require 'spec_helper' feature 'Browse artifact', :js do let(:project) { create(:project, :public) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) } let(:browse_url) do browse_path('other_artifacts_0.1.2') end def browse_path(path) browse_project_job_artifacts_path(project, job, path) end context 'when visiting old URL' do before do visit browse_url.sub('/-/jobs', '/builds') end it "redirects to new URL" do expect(page.current_path).to eq(browse_url) end end context 'when browsing a directory with an text file' do let(:txt_entry) { job.artifacts_metadata_entry('other_artifacts_0.1.2/doc_sample.txt') } before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) allow(Gitlab.config.pages).to receive(:artifacts_server).and_return(true) visit browse_url end it "shows external link icon and styles" do link = first('.tree-item-file-external-link') expect(page).to have_link('doc_sample.txt', href: file_project_job_artifacts_path(project, job, path: txt_entry.blob.path)) expect(link[:target]).to eq('_blank') expect(link[:rel]).to include('noopener') expect(link[:rel]).to include('noreferrer') expect(page).to have_selector('.js-artifact-tree-external-icon') end end end
Add extra assertions about how the link will open
Add extra assertions about how the link will open
Ruby
mit
dreampet/gitlab,mmkassem/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,stoplightio/gitlabhq,mmkassem/gitlabhq,iiet/iiet-git,jirutka/gitlabhq,axilleas/gitlabhq,iiet/iiet-git,iiet/iiet-git,axilleas/gitlabhq,jirutka/gitlabhq,jirutka/gitlabhq,axilleas/gitlabhq,dreampet/gitlab,jirutka/gitlabhq,stoplightio/gitlabhq,dreampet/gitlab,axilleas/gitlabhq,stoplightio/gitlabhq,mmkassem/gitlabhq,mmkassem/gitlabhq,dreampet/gitlab
ruby
## Code Before: require 'spec_helper' feature 'Browse artifact', :js do let(:project) { create(:project, :public) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) } let(:browse_url) do browse_path('other_artifacts_0.1.2') end def browse_path(path) browse_project_job_artifacts_path(project, job, path) end context 'when visiting old URL' do before do visit browse_url.sub('/-/jobs', '/builds') end it "redirects to new URL" do expect(page.current_path).to eq(browse_url) end end context 'when browsing a directory with an text file' do let(:txt_entry) { job.artifacts_metadata_entry('other_artifacts_0.1.2/doc_sample.txt') } before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) allow(Gitlab.config.pages).to receive(:artifacts_server).and_return(true) visit browse_url end it "shows external link icon and styles" do link = first('.tree-item-file-external-link') expect(link).to have_content('doc_sample.txt') expect(page).to have_selector('.js-artifact-tree-external-icon') end end end ## Instruction: Add extra assertions about how the link will open ## Code After: require 'spec_helper' feature 'Browse artifact', :js do let(:project) { create(:project, :public) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) } let(:browse_url) do browse_path('other_artifacts_0.1.2') end def browse_path(path) browse_project_job_artifacts_path(project, job, path) end context 'when visiting old URL' do before do visit browse_url.sub('/-/jobs', '/builds') end it "redirects to new URL" do expect(page.current_path).to eq(browse_url) end end context 'when browsing a directory with an text file' do let(:txt_entry) { job.artifacts_metadata_entry('other_artifacts_0.1.2/doc_sample.txt') } before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) allow(Gitlab.config.pages).to receive(:artifacts_server).and_return(true) visit browse_url end it "shows external link icon and styles" do link = first('.tree-item-file-external-link') expect(page).to have_link('doc_sample.txt', href: file_project_job_artifacts_path(project, job, path: txt_entry.blob.path)) expect(link[:target]).to eq('_blank') expect(link[:rel]).to include('noopener') expect(link[:rel]).to include('noreferrer') expect(page).to have_selector('.js-artifact-tree-external-icon') end end end
require 'spec_helper' feature 'Browse artifact', :js do let(:project) { create(:project, :public) } let(:pipeline) { create(:ci_empty_pipeline, project: project) } let(:job) { create(:ci_build, :artifacts, pipeline: pipeline) } let(:browse_url) do browse_path('other_artifacts_0.1.2') end def browse_path(path) browse_project_job_artifacts_path(project, job, path) end context 'when visiting old URL' do before do visit browse_url.sub('/-/jobs', '/builds') end it "redirects to new URL" do expect(page.current_path).to eq(browse_url) end end context 'when browsing a directory with an text file' do let(:txt_entry) { job.artifacts_metadata_entry('other_artifacts_0.1.2/doc_sample.txt') } before do allow(Gitlab.config.pages).to receive(:enabled).and_return(true) allow(Gitlab.config.pages).to receive(:artifacts_server).and_return(true) visit browse_url end it "shows external link icon and styles" do link = first('.tree-item-file-external-link') - expect(link).to have_content('doc_sample.txt') + expect(page).to have_link('doc_sample.txt', href: file_project_job_artifacts_path(project, job, path: txt_entry.blob.path)) + expect(link[:target]).to eq('_blank') + expect(link[:rel]).to include('noopener') + expect(link[:rel]).to include('noreferrer') expect(page).to have_selector('.js-artifact-tree-external-icon') end end end
5
0.119048
4
1
295b34b73d8a09c08d9b014d17903708826a3b68
install-casks.sh
install-casks.sh
brew cask install aerial brew cask install android-studio brew cask install appcleaner brew cask install appcode brew cask install arq brew cask install boxer brew cask install caffeine brew cask install clion brew cask install cyberduck brew cask install daisydisk brew cask install dash brew cask install diffmerge brew cask install docker brew cask install dolphin brew cask install dropbox brew cask install fork brew cask install geekbench brew cask install google-chrome brew cask install google-hangouts brew cask install handbrake brew cask install icons8 brew cask install imageoptim brew cask install intellij-idea brew cask install invisionsync brew cask install istat-menus brew cask install iterm2 brew cask install java brew cask install kitematic brew cask install macvim brew cask install markright brew cask install messenger brew cask install mp4tools brew cask install mplayerx brew cask install openemu brew cask install parallels-desktop brew cask install pycharm brew cask install sequel-pro brew cask install sip brew cask install sketch brew cask install skype brew cask install slack brew cask install sourcetree brew cask install spotify brew cask install sqlitebrowser brew cask install steveschow-gfxcardstatus brew cask install sublime-text brew cask install subtitles brew cask install vlc brew cask install webstorm brew cask install whatsapp brew cask install zeplin brew doctor brew cleanup && brew prune && brew cask cleanup
brew cask install aerial brew cask install android-studio brew cask install appcleaner brew cask install appcode brew cask install arq brew cask install boxer brew cask install caffeine brew cask install clion brew cask install cyberduck brew cask install daisydisk brew cask install dash brew cask install diffmerge brew cask install docker brew cask install dolphin brew cask install dropbox brew cask install fork brew cask install geekbench brew cask install google-chrome brew cask install google-hangouts brew cask install handbrake brew cask install icons8 brew cask install iina brew cask install imageoptim brew cask install intellij-idea brew cask install invisionsync brew cask install istat-menus brew cask install iterm2 brew cask install java brew cask install kitematic brew cask install mactracker brew cask install macvim brew cask install markright brew cask install messenger brew cask install mp4tools brew cask install mplayerx brew cask install openemu brew cask install parallels-desktop brew cask install postman brew cask install pycharm brew cask install sequel-pro brew cask install sip brew cask install sketch brew cask install skype brew cask install slack brew cask install sourcetree brew cask install spotify brew cask install sqlitebrowser brew cask install steveschow-gfxcardstatus brew cask install sublime-text brew cask install subtitles brew cask install vlc brew cask install webstorm brew cask install whatsapp brew cask install zeplin brew doctor brew cleanup && brew prune && brew cask cleanup
Add inna, mactracker and postman casks
Add inna, mactracker and postman casks
Shell
mit
mikumi/dotfiles,mikumi/dotfiles,mikumi/dotfiles,mikumi/dotfiles
shell
## Code Before: brew cask install aerial brew cask install android-studio brew cask install appcleaner brew cask install appcode brew cask install arq brew cask install boxer brew cask install caffeine brew cask install clion brew cask install cyberduck brew cask install daisydisk brew cask install dash brew cask install diffmerge brew cask install docker brew cask install dolphin brew cask install dropbox brew cask install fork brew cask install geekbench brew cask install google-chrome brew cask install google-hangouts brew cask install handbrake brew cask install icons8 brew cask install imageoptim brew cask install intellij-idea brew cask install invisionsync brew cask install istat-menus brew cask install iterm2 brew cask install java brew cask install kitematic brew cask install macvim brew cask install markright brew cask install messenger brew cask install mp4tools brew cask install mplayerx brew cask install openemu brew cask install parallels-desktop brew cask install pycharm brew cask install sequel-pro brew cask install sip brew cask install sketch brew cask install skype brew cask install slack brew cask install sourcetree brew cask install spotify brew cask install sqlitebrowser brew cask install steveschow-gfxcardstatus brew cask install sublime-text brew cask install subtitles brew cask install vlc brew cask install webstorm brew cask install whatsapp brew cask install zeplin brew doctor brew cleanup && brew prune && brew cask cleanup ## Instruction: Add inna, mactracker and postman casks ## Code After: brew cask install aerial brew cask install android-studio brew cask install appcleaner brew cask install appcode brew cask install arq brew cask install boxer brew cask install caffeine brew cask install clion brew cask install cyberduck brew cask install daisydisk brew cask install dash brew cask install diffmerge brew cask install docker brew cask install dolphin brew cask install dropbox brew cask install fork brew cask install geekbench brew cask install google-chrome brew cask install google-hangouts brew cask install handbrake brew cask install icons8 brew cask install iina brew cask install imageoptim brew cask install intellij-idea brew cask install invisionsync brew cask install istat-menus brew cask install iterm2 brew cask install java brew cask install kitematic brew cask install mactracker brew cask install macvim brew cask install markright brew cask install messenger brew cask install mp4tools brew cask install mplayerx brew cask install openemu brew cask install parallels-desktop brew cask install postman brew cask install pycharm brew cask install sequel-pro brew cask install sip brew cask install sketch brew cask install skype brew cask install slack brew cask install sourcetree brew cask install spotify brew cask install sqlitebrowser brew cask install steveschow-gfxcardstatus brew cask install sublime-text brew cask install subtitles brew cask install vlc brew cask install webstorm brew cask install whatsapp brew cask install zeplin brew doctor brew cleanup && brew prune && brew cask cleanup
brew cask install aerial brew cask install android-studio brew cask install appcleaner brew cask install appcode brew cask install arq brew cask install boxer brew cask install caffeine brew cask install clion brew cask install cyberduck brew cask install daisydisk brew cask install dash brew cask install diffmerge brew cask install docker brew cask install dolphin brew cask install dropbox brew cask install fork brew cask install geekbench brew cask install google-chrome brew cask install google-hangouts brew cask install handbrake brew cask install icons8 + brew cask install iina brew cask install imageoptim brew cask install intellij-idea brew cask install invisionsync brew cask install istat-menus brew cask install iterm2 brew cask install java brew cask install kitematic + brew cask install mactracker brew cask install macvim brew cask install markright brew cask install messenger brew cask install mp4tools brew cask install mplayerx brew cask install openemu brew cask install parallels-desktop + brew cask install postman brew cask install pycharm brew cask install sequel-pro brew cask install sip brew cask install sketch brew cask install skype brew cask install slack brew cask install sourcetree brew cask install spotify brew cask install sqlitebrowser brew cask install steveschow-gfxcardstatus brew cask install sublime-text brew cask install subtitles brew cask install vlc brew cask install webstorm brew cask install whatsapp brew cask install zeplin brew doctor brew cleanup && brew prune && brew cask cleanup
3
0.053571
3
0
aed1ed094f1525472a74b6bcea8f80d8e284bf6d
core/src/org/javarosa/core/services/storage/StorageModifiedException.java
core/src/org/javarosa/core/services/storage/StorageModifiedException.java
package org.javarosa.core.services.storage; public class StorageModifiedException extends RuntimeException { }
package org.javarosa.core.services.storage; public class StorageModifiedException extends RuntimeException { public StorageModifiedException() { super(); } public StorageModifiedException(String message) { super(message); } }
Support Messages in storage modified exceptions
Support Messages in storage modified exceptions
Java
apache-2.0
dimagi/commcare,dimagi/commcare-core,dimagi/commcare-core,dimagi/commcare,dimagi/commcare-core,dimagi/commcare
java
## Code Before: package org.javarosa.core.services.storage; public class StorageModifiedException extends RuntimeException { } ## Instruction: Support Messages in storage modified exceptions ## Code After: package org.javarosa.core.services.storage; public class StorageModifiedException extends RuntimeException { public StorageModifiedException() { super(); } public StorageModifiedException(String message) { super(message); } }
package org.javarosa.core.services.storage; public class StorageModifiedException extends RuntimeException { - + public StorageModifiedException() { + super(); + } + + public StorageModifiedException(String message) { + super(message); + } }
8
1.6
7
1
4100af9db73058ff7d58f4ff6bda62fc7f8b55bf
codeship-services.yml
codeship-services.yml
db: image: silintl/mariadb:latest environment: MYSQL_ROOT_PASSWORD: r00tp@ss! MYSQL_DATABASE: test MYSQL_USER: idpmgmt MYSQL_PASSWORD: idpmgmt zxcvbn: image: wcjr/zxcvbn-api:1.1.0 ports: - "3000" memcache1: image: memcached:1.4-alpine ports: - "11212:11211" memcache2: image: memcached:1.4-alpine ports: - "11213:11211" api: build: image: silintl/idp-pw-api dockerfile_path: ./Dockerfile cached: true links: - db - memcache1 - memcache2 - zxcvbn environment: MYSQL_HOST: db MYSQL_DATABASE: test MYSQL_USER: idpmgmt MYSQL_PASSWORD: idpmgmt MAILER_USEFILES: true ALERTS_EMAIL_ENABLED: false ALERTS_EMAIL: alerts@nowhere.com working_dir: /data command: /data/run-tests.sh
db: image: silintl/mariadb:latest environment: MYSQL_ROOT_PASSWORD: r00tp@ss! MYSQL_DATABASE: test MYSQL_USER: idpmgmt MYSQL_PASSWORD: idpmgmt zxcvbn: image: wcjr/zxcvbn-api:1.1.0 ports: - "3000" memcache1: image: memcached:1.4-alpine ports: - "11212:11211" memcache2: image: memcached:1.4-alpine ports: - "11213:11211" api: build: image: silintl/idp-pw-api dockerfile_path: ./Dockerfile cached: true links: - db - memcache1 - memcache2 - zxcvbn environment: MYSQL_HOST: db MYSQL_DATABASE: test MYSQL_USER: idpmgmt MYSQL_PASSWORD: idpmgmt MAILER_USEFILES: true ALERTS_EMAIL_ENABLED: false ALERTS_EMAIL: alerts@nowhere.com MEMCACHE_CONFIG1_host: memcache1 MEMCACHE_CONFIG1_port: 11211 MEMCACHE_CONFIG1_weight: 100 MEMCACHE_CONFIG2_host: memcache2 MEMCACHE_CONFIG2_port: 11211 MEMCACHE_CONFIG2_weight: 50 working_dir: /data command: /data/run-tests.sh
Add memcache config values for api on codeship
Add memcache config values for api on codeship
YAML
mit
silinternational/idp-pw-api,silinternational/idp-pw-api
yaml
## Code Before: db: image: silintl/mariadb:latest environment: MYSQL_ROOT_PASSWORD: r00tp@ss! MYSQL_DATABASE: test MYSQL_USER: idpmgmt MYSQL_PASSWORD: idpmgmt zxcvbn: image: wcjr/zxcvbn-api:1.1.0 ports: - "3000" memcache1: image: memcached:1.4-alpine ports: - "11212:11211" memcache2: image: memcached:1.4-alpine ports: - "11213:11211" api: build: image: silintl/idp-pw-api dockerfile_path: ./Dockerfile cached: true links: - db - memcache1 - memcache2 - zxcvbn environment: MYSQL_HOST: db MYSQL_DATABASE: test MYSQL_USER: idpmgmt MYSQL_PASSWORD: idpmgmt MAILER_USEFILES: true ALERTS_EMAIL_ENABLED: false ALERTS_EMAIL: alerts@nowhere.com working_dir: /data command: /data/run-tests.sh ## Instruction: Add memcache config values for api on codeship ## Code After: db: image: silintl/mariadb:latest environment: MYSQL_ROOT_PASSWORD: r00tp@ss! MYSQL_DATABASE: test MYSQL_USER: idpmgmt MYSQL_PASSWORD: idpmgmt zxcvbn: image: wcjr/zxcvbn-api:1.1.0 ports: - "3000" memcache1: image: memcached:1.4-alpine ports: - "11212:11211" memcache2: image: memcached:1.4-alpine ports: - "11213:11211" api: build: image: silintl/idp-pw-api dockerfile_path: ./Dockerfile cached: true links: - db - memcache1 - memcache2 - zxcvbn environment: MYSQL_HOST: db MYSQL_DATABASE: test MYSQL_USER: idpmgmt MYSQL_PASSWORD: idpmgmt MAILER_USEFILES: true ALERTS_EMAIL_ENABLED: false ALERTS_EMAIL: alerts@nowhere.com MEMCACHE_CONFIG1_host: memcache1 MEMCACHE_CONFIG1_port: 11211 MEMCACHE_CONFIG1_weight: 100 MEMCACHE_CONFIG2_host: memcache2 MEMCACHE_CONFIG2_port: 11211 MEMCACHE_CONFIG2_weight: 50 working_dir: /data command: /data/run-tests.sh
db: image: silintl/mariadb:latest environment: MYSQL_ROOT_PASSWORD: r00tp@ss! MYSQL_DATABASE: test MYSQL_USER: idpmgmt MYSQL_PASSWORD: idpmgmt zxcvbn: image: wcjr/zxcvbn-api:1.1.0 ports: - "3000" memcache1: image: memcached:1.4-alpine ports: - "11212:11211" memcache2: image: memcached:1.4-alpine ports: - "11213:11211" api: build: image: silintl/idp-pw-api dockerfile_path: ./Dockerfile cached: true links: - db - memcache1 - memcache2 - zxcvbn environment: MYSQL_HOST: db MYSQL_DATABASE: test MYSQL_USER: idpmgmt MYSQL_PASSWORD: idpmgmt MAILER_USEFILES: true ALERTS_EMAIL_ENABLED: false ALERTS_EMAIL: alerts@nowhere.com + MEMCACHE_CONFIG1_host: memcache1 + MEMCACHE_CONFIG1_port: 11211 + MEMCACHE_CONFIG1_weight: 100 + MEMCACHE_CONFIG2_host: memcache2 + MEMCACHE_CONFIG2_port: 11211 + MEMCACHE_CONFIG2_weight: 50 working_dir: /data command: /data/run-tests.sh
6
0.12766
6
0
5b702de914f55ee936292576394b2ea06ad15680
tests/utils.py
tests/utils.py
from __future__ import unicode_literals import contextlib from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework.test import APIClient from rest_framework_simplejwt.settings import api_settings def client_action_wrapper(action): def wrapper_method(self, *args, **kwargs): if self.view_name is None: raise ValueError('Must give value for `view_name` property') reverse_args = kwargs.pop('reverse_args', tuple()) reverse_kwargs = kwargs.pop('reverse_kwargs', dict()) query_string = kwargs.pop('query_string', None) url = reverse(self.view_name, args=reverse_args, kwargs=reverse_kwargs) if query_string is not None: url = url + '?{0}'.format(query_string) return getattr(self.client, action)(url, *args, **kwargs) return wrapper_method class APIViewTestCase(TestCase): client_class = APIClient def authenticate_with_token(self, type, token): """ Authenticates requests with the given token. """ self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(type, token)) view_name = None view_post = client_action_wrapper('post') view_get = client_action_wrapper('get') @contextlib.contextmanager def override_api_settings(**settings): for k, v in settings.items(): setattr(api_settings, k, v) yield for k in settings.keys(): delattr(api_settings, k)
from __future__ import unicode_literals import contextlib from django.test import TestCase from rest_framework.test import APIClient from rest_framework_simplejwt.compat import reverse from rest_framework_simplejwt.settings import api_settings def client_action_wrapper(action): def wrapper_method(self, *args, **kwargs): if self.view_name is None: raise ValueError('Must give value for `view_name` property') reverse_args = kwargs.pop('reverse_args', tuple()) reverse_kwargs = kwargs.pop('reverse_kwargs', dict()) query_string = kwargs.pop('query_string', None) url = reverse(self.view_name, args=reverse_args, kwargs=reverse_kwargs) if query_string is not None: url = url + '?{0}'.format(query_string) return getattr(self.client, action)(url, *args, **kwargs) return wrapper_method class APIViewTestCase(TestCase): client_class = APIClient def authenticate_with_token(self, type, token): """ Authenticates requests with the given token. """ self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(type, token)) view_name = None view_post = client_action_wrapper('post') view_get = client_action_wrapper('get') @contextlib.contextmanager def override_api_settings(**settings): for k, v in settings.items(): setattr(api_settings, k, v) yield for k in settings.keys(): delattr(api_settings, k)
Fix broken tests in django master
Fix broken tests in django master
Python
mit
davesque/django-rest-framework-simplejwt,davesque/django-rest-framework-simplejwt
python
## Code Before: from __future__ import unicode_literals import contextlib from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework.test import APIClient from rest_framework_simplejwt.settings import api_settings def client_action_wrapper(action): def wrapper_method(self, *args, **kwargs): if self.view_name is None: raise ValueError('Must give value for `view_name` property') reverse_args = kwargs.pop('reverse_args', tuple()) reverse_kwargs = kwargs.pop('reverse_kwargs', dict()) query_string = kwargs.pop('query_string', None) url = reverse(self.view_name, args=reverse_args, kwargs=reverse_kwargs) if query_string is not None: url = url + '?{0}'.format(query_string) return getattr(self.client, action)(url, *args, **kwargs) return wrapper_method class APIViewTestCase(TestCase): client_class = APIClient def authenticate_with_token(self, type, token): """ Authenticates requests with the given token. """ self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(type, token)) view_name = None view_post = client_action_wrapper('post') view_get = client_action_wrapper('get') @contextlib.contextmanager def override_api_settings(**settings): for k, v in settings.items(): setattr(api_settings, k, v) yield for k in settings.keys(): delattr(api_settings, k) ## Instruction: Fix broken tests in django master ## Code After: from __future__ import unicode_literals import contextlib from django.test import TestCase from rest_framework.test import APIClient from rest_framework_simplejwt.compat import reverse from rest_framework_simplejwt.settings import api_settings def client_action_wrapper(action): def wrapper_method(self, *args, **kwargs): if self.view_name is None: raise ValueError('Must give value for `view_name` property') reverse_args = kwargs.pop('reverse_args', tuple()) reverse_kwargs = kwargs.pop('reverse_kwargs', dict()) query_string = kwargs.pop('query_string', None) url = reverse(self.view_name, args=reverse_args, kwargs=reverse_kwargs) if query_string is not None: url = url + '?{0}'.format(query_string) return getattr(self.client, action)(url, *args, **kwargs) return wrapper_method class APIViewTestCase(TestCase): client_class = APIClient def authenticate_with_token(self, type, token): """ Authenticates requests with the given token. """ self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(type, token)) view_name = None view_post = client_action_wrapper('post') view_get = client_action_wrapper('get') @contextlib.contextmanager def override_api_settings(**settings): for k, v in settings.items(): setattr(api_settings, k, v) yield for k in settings.keys(): delattr(api_settings, k)
from __future__ import unicode_literals import contextlib - from django.core.urlresolvers import reverse from django.test import TestCase from rest_framework.test import APIClient + from rest_framework_simplejwt.compat import reverse from rest_framework_simplejwt.settings import api_settings def client_action_wrapper(action): def wrapper_method(self, *args, **kwargs): if self.view_name is None: raise ValueError('Must give value for `view_name` property') reverse_args = kwargs.pop('reverse_args', tuple()) reverse_kwargs = kwargs.pop('reverse_kwargs', dict()) query_string = kwargs.pop('query_string', None) url = reverse(self.view_name, args=reverse_args, kwargs=reverse_kwargs) if query_string is not None: url = url + '?{0}'.format(query_string) return getattr(self.client, action)(url, *args, **kwargs) return wrapper_method class APIViewTestCase(TestCase): client_class = APIClient def authenticate_with_token(self, type, token): """ Authenticates requests with the given token. """ self.client.credentials(HTTP_AUTHORIZATION='{} {}'.format(type, token)) view_name = None view_post = client_action_wrapper('post') view_get = client_action_wrapper('get') @contextlib.contextmanager def override_api_settings(**settings): for k, v in settings.items(): setattr(api_settings, k, v) yield for k in settings.keys(): delattr(api_settings, k)
2
0.038462
1
1
8cf5160bd1d7e012c155c52b12af24ff04d1ccf9
README.md
README.md
REST API for getting Nogizaka46(乃木坂46)/Keyakizaka46(欅坂46) member profile.
https://travis-ci.org/ki… member profile.
Add travis icon to readme.md
Add travis icon to readme.md
Markdown
mit
kikutaro/Sakamichi46Api,kikutaro/Sakamichi46Api
markdown
## Code Before: REST API for getting Nogizaka46(乃木坂46)/Keyakizaka46(欅坂46) member profile. ## Instruction: Add travis icon to readme.md ## Code After: https://travis-ci.org/kikutaro/Sakamichi46Api.svg?branch=master REST API for getting Nogizaka46(乃木坂46)/Keyakizaka46(欅坂46) member profile.
+ https://travis-ci.org/kikutaro/Sakamichi46Api.svg?branch=master REST API for getting Nogizaka46(乃木坂46)/Keyakizaka46(欅坂46) member profile.
1
1
1
0
485be1aa2bcb52a397d71a27caa5dab410d2af4b
requirements-gevent.txt
requirements-gevent.txt
cython https://github.com/SiteSupport/gevent/tarball/1.0rc2
cython https://github.com/surfly/gevent/archive/1.0rc2.tar.gz
Update URL to gevent tarball
Update URL to gevent tarball
Text
apache-2.0
jodal/pykka,tamland/pykka,tempbottle/pykka
text
## Code Before: cython https://github.com/SiteSupport/gevent/tarball/1.0rc2 ## Instruction: Update URL to gevent tarball ## Code After: cython https://github.com/surfly/gevent/archive/1.0rc2.tar.gz
cython - https://github.com/SiteSupport/gevent/tarball/1.0rc2 + https://github.com/surfly/gevent/archive/1.0rc2.tar.gz
2
1
1
1
3802271e021cf52e718f8a5fadb5456cf538899c
README.md
README.md
Enable support for generators in Mocha tests using [co](https://github.com/visionmedia/co). Currently you must use the `--harmony-generators` flag when running node 0.11.x to get access to generators. ## Installation ``` npm install co-mocha --save-dev ``` ## Usage Add `--require co-mocha` to your `mocha.opts`. ## License MIT
Enable support for generators in Mocha tests using [co](https://github.com/visionmedia/co). Currently you must use the `--harmony-generators` flag when running node 0.11.x to get access to generators. ## Installation ``` npm install co-mocha --save-dev ``` ## Usage Add `--require co-mocha` to your `mocha.opts`. Now you can write your tests using generators. ```js it('should do something', function* () { yield users.load(123); }); ``` ## License MIT
Add an example to the readme.
Add an example to the readme.
Markdown
mit
qt911025/co-mocha-nightwatch,KenanSulayman/coroutine-mocha,blakeembrey/co-mocha
markdown
## Code Before: Enable support for generators in Mocha tests using [co](https://github.com/visionmedia/co). Currently you must use the `--harmony-generators` flag when running node 0.11.x to get access to generators. ## Installation ``` npm install co-mocha --save-dev ``` ## Usage Add `--require co-mocha` to your `mocha.opts`. ## License MIT ## Instruction: Add an example to the readme. ## Code After: Enable support for generators in Mocha tests using [co](https://github.com/visionmedia/co). Currently you must use the `--harmony-generators` flag when running node 0.11.x to get access to generators. ## Installation ``` npm install co-mocha --save-dev ``` ## Usage Add `--require co-mocha` to your `mocha.opts`. Now you can write your tests using generators. ```js it('should do something', function* () { yield users.load(123); }); ``` ## License MIT
Enable support for generators in Mocha tests using [co](https://github.com/visionmedia/co). Currently you must use the `--harmony-generators` flag when running node 0.11.x to get access to generators. ## Installation ``` npm install co-mocha --save-dev ``` ## Usage - Add `--require co-mocha` to your `mocha.opts`. + Add `--require co-mocha` to your `mocha.opts`. Now you can write your tests using generators. + + ```js + it('should do something', function* () { + yield users.load(123); + }); + ``` ## License MIT
8
0.444444
7
1
16afd397ac4f3dc607e18fbf6ecd72c1d50ada5c
src/website/js/commands.js
src/website/js/commands.js
(function () { // eslint-disable-line no-undef const commands = [ { Name: 'help', Info: 'Returns a help message to get you started with RemindMeBot.', Usage: 'r>help' }, { Name: 'remindme', Info: 'Creates a reminder. Pass without args to start a guided tour.', Usage: 'r>remindme [<time argument> "<message>"]', Example: 'r>remindme 12 hours "Buy groceries"' }, { Name: 'list', Info: ['Sends you your current reminders in DM.', 'Note: will send in channel if DMs are disabled.'], Usage: 'r>list' }, { Name: 'clear', Info: 'Starts a guided tour to clear all of your reminders.', Usage: 'r>clear' }, { Name: 'forget', Info: 'Starts a guided tour to forget one of your reminders.', Usage: 'r>forget' }, { Name: 'prefix', Info: 'Changes your prefix to the given argument.', Usage: 'r>prefix <desired prefix>', Example: 'r>prefix !!' }, { Name: 'invite', Info: 'Returns an invite for RemindMeBot.', Usage: 'r>invite' }, { Name: 'ping', Info: ' Returns the Websocket ping to the API servers in ms.', Usage: 'r>ping' }, { Name: 'stats', Info: 'Returns information and statistics about RemindMeBot.', Usage: 'r>stats' } ]; }();
loadCommands([ // eslint-disable-line no-undef { Name: 'help', Info: 'Returns a help message to get you started with RemindMeBot.', Usage: 'r>help' }, { Name: 'remindme', Info: 'Creates a reminder. Pass without args to start a guided tour.', Usage: 'r>remindme [<time argument> "<message>"]', Example: 'r>remindme 12 hours "Buy groceries"' }, { Name: 'list', Info: ['Sends you your current reminders in DM.', 'Note: will send in channel if DMs are disabled.'], Usage: 'r>list' }, { Name: 'clear', Info: 'Starts a guided tour to clear all of your reminders.', Usage: 'r>clear' }, { Name: 'forget', Info: 'Starts a guided tour to forget one of your reminders.', Usage: 'r>forget' }, { Name: 'prefix', Info: 'Changes your prefix to the given argument.', Usage: 'r>prefix <desired prefix>', Example: 'r>prefix !!' }, { Name: 'invite', Info: 'Returns an invite for RemindMeBot.', Usage: 'r>invite' }, { Name: 'ping', Info: ' Returns the Websocket ping to the API servers in ms.', Usage: 'r>ping' }, { Name: 'stats', Info: 'Returns information and statistics about RemindMeBot.', Usage: 'r>stats' } ]);
Move (back) to call-based jsonp
Move (back) to call-based jsonp
JavaScript
mit
Samoxive/remindme,Aetheryx/remindme,Aetheryx/remindme,Samoxive/remindme
javascript
## Code Before: (function () { // eslint-disable-line no-undef const commands = [ { Name: 'help', Info: 'Returns a help message to get you started with RemindMeBot.', Usage: 'r>help' }, { Name: 'remindme', Info: 'Creates a reminder. Pass without args to start a guided tour.', Usage: 'r>remindme [<time argument> "<message>"]', Example: 'r>remindme 12 hours "Buy groceries"' }, { Name: 'list', Info: ['Sends you your current reminders in DM.', 'Note: will send in channel if DMs are disabled.'], Usage: 'r>list' }, { Name: 'clear', Info: 'Starts a guided tour to clear all of your reminders.', Usage: 'r>clear' }, { Name: 'forget', Info: 'Starts a guided tour to forget one of your reminders.', Usage: 'r>forget' }, { Name: 'prefix', Info: 'Changes your prefix to the given argument.', Usage: 'r>prefix <desired prefix>', Example: 'r>prefix !!' }, { Name: 'invite', Info: 'Returns an invite for RemindMeBot.', Usage: 'r>invite' }, { Name: 'ping', Info: ' Returns the Websocket ping to the API servers in ms.', Usage: 'r>ping' }, { Name: 'stats', Info: 'Returns information and statistics about RemindMeBot.', Usage: 'r>stats' } ]; }(); ## Instruction: Move (back) to call-based jsonp ## Code After: loadCommands([ // eslint-disable-line no-undef { Name: 'help', Info: 'Returns a help message to get you started with RemindMeBot.', Usage: 'r>help' }, { Name: 'remindme', Info: 'Creates a reminder. Pass without args to start a guided tour.', Usage: 'r>remindme [<time argument> "<message>"]', Example: 'r>remindme 12 hours "Buy groceries"' }, { Name: 'list', Info: ['Sends you your current reminders in DM.', 'Note: will send in channel if DMs are disabled.'], Usage: 'r>list' }, { Name: 'clear', Info: 'Starts a guided tour to clear all of your reminders.', Usage: 'r>clear' }, { Name: 'forget', Info: 'Starts a guided tour to forget one of your reminders.', Usage: 'r>forget' }, { Name: 'prefix', Info: 'Changes your prefix to the given argument.', Usage: 'r>prefix <desired prefix>', Example: 'r>prefix !!' }, { Name: 'invite', Info: 'Returns an invite for RemindMeBot.', Usage: 'r>invite' }, { Name: 'ping', Info: ' Returns the Websocket ping to the API servers in ms.', Usage: 'r>ping' }, { Name: 'stats', Info: 'Returns information and statistics about RemindMeBot.', Usage: 'r>stats' } ]);
+ loadCommands([ // eslint-disable-line no-undef + { - (function () { // eslint-disable-line no-undef - const commands = [ - { - Name: 'help', ? ---- + Name: 'help', - Info: 'Returns a help message to get you started with RemindMeBot.', ? ---- + Info: 'Returns a help message to get you started with RemindMeBot.', - Usage: 'r>help' ? ---- + Usage: 'r>help' - }, ? ---- + }, - { + { - Name: 'remindme', ? ---- + Name: 'remindme', - Info: 'Creates a reminder. Pass without args to start a guided tour.', ? ---- + Info: 'Creates a reminder. Pass without args to start a guided tour.', - Usage: 'r>remindme [<time argument> "<message>"]', ? ---- + Usage: 'r>remindme [<time argument> "<message>"]', - Example: 'r>remindme 12 hours "Buy groceries"' ? ---- + Example: 'r>remindme 12 hours "Buy groceries"' - }, ? ---- + }, - { + { - Name: 'list', ? ---- + Name: 'list', - Info: ['Sends you your current reminders in DM.', 'Note: will send in channel if DMs are disabled.'], ? ---- + Info: ['Sends you your current reminders in DM.', 'Note: will send in channel if DMs are disabled.'], - Usage: 'r>list' ? ---- + Usage: 'r>list' - }, ? ---- + }, - { + { - Name: 'clear', ? ---- + Name: 'clear', - Info: 'Starts a guided tour to clear all of your reminders.', ? ---- + Info: 'Starts a guided tour to clear all of your reminders.', - Usage: 'r>clear' ? ---- + Usage: 'r>clear' - }, ? ---- + }, - { + { - Name: 'forget', ? ---- + Name: 'forget', - Info: 'Starts a guided tour to forget one of your reminders.', ? ---- + Info: 'Starts a guided tour to forget one of your reminders.', - Usage: 'r>forget' ? ---- + Usage: 'r>forget' - }, ? ---- + }, - { + { - Name: 'prefix', ? ---- + Name: 'prefix', - Info: 'Changes your prefix to the given argument.', ? ---- + Info: 'Changes your prefix to the given argument.', - Usage: 'r>prefix <desired prefix>', ? ---- + Usage: 'r>prefix <desired prefix>', - Example: 'r>prefix !!' ? ---- + Example: 'r>prefix !!' - }, ? ---- + }, - { + { - Name: 'invite', ? ---- + Name: 'invite', - Info: 'Returns an invite for RemindMeBot.', ? ---- + Info: 'Returns an invite for RemindMeBot.', - Usage: 'r>invite' ? ---- + Usage: 'r>invite' - }, ? ---- + }, - { + { - Name: 'ping', ? ---- + Name: 'ping', - Info: ' Returns the Websocket ping to the API servers in ms.', ? ---- + Info: ' Returns the Websocket ping to the API servers in ms.', - Usage: 'r>ping' ? ---- + Usage: 'r>ping' - }, ? ---- + }, - { + { - Name: 'stats', ? ---- + Name: 'stats', - Info: 'Returns information and statistics about RemindMeBot.', ? ---- + Info: 'Returns information and statistics about RemindMeBot.', - Usage: 'r>stats' ? ---- + Usage: 'r>stats' + } + ]); - } - ]; - }();
100
1.960784
49
51
4223769df08e9c0933579742b90d2b343c5ccef2
lib/tasks/whitespace.rake
lib/tasks/whitespace.rake
namespace :whitespace do desc 'Removes trailing whitespace' task :cleanup do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed 's/[ \t]*$//' > tmp; cp tmp $f; rm tmp; echo -n .; done} end desc 'Converts hard-tabs into two-space soft-tabs' task :retab do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed 's/\t/ /g' > tmp; cp tmp $f; rm tmp; echo -n .; done} end desc 'Remove consecutive blank lines' task :scrub_gratuitous_newlines do sh %{find . -name '*.rb' -exec sed -i '' '/./,/^$/!d' {} \\;} end end
namespace :whitespace do desc 'Removes trailing whitespace' task :cleanup do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed 's/[ \t]*$//' > tmp; cp tmp $f; rm tmp; echo -n .; done} end desc 'Converts hard-tabs into two-space soft-tabs' task :retab do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed 's/\t/ /g' > tmp; cp tmp $f; rm tmp; echo -n .; done} end desc 'Remove consecutive blank lines' task :scrub_gratuitous_newlines do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed '/./,/^$/!d' > tmp; cp tmp $f; rm tmp; echo -n .; done} end end
Improve task which remove consecutive blank lines
Improve task which remove consecutive blank lines
Ruby
agpl-3.0
jhass/diaspora,KentShikama/diaspora,spixi/diaspora,geraspora/diaspora,KentShikama/diaspora,geraspora/diaspora,diaspora/diaspora,despora/diaspora,SuperTux88/diaspora,SuperTux88/diaspora,Amadren/diaspora,diaspora/diaspora,Amadren/diaspora,spixi/diaspora,geraspora/diaspora,despora/diaspora,diaspora/diaspora,KentShikama/diaspora,geraspora/diaspora,Muhannes/diaspora,Muhannes/diaspora,Flaburgan/diaspora,despora/diaspora,diaspora/diaspora,SuperTux88/diaspora,KentShikama/diaspora,Muhannes/diaspora,despora/diaspora,jhass/diaspora,Amadren/diaspora,jhass/diaspora,spixi/diaspora,Muhannes/diaspora,Flaburgan/diaspora,SuperTux88/diaspora,Flaburgan/diaspora,spixi/diaspora,Flaburgan/diaspora,jhass/diaspora,Amadren/diaspora
ruby
## Code Before: namespace :whitespace do desc 'Removes trailing whitespace' task :cleanup do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed 's/[ \t]*$//' > tmp; cp tmp $f; rm tmp; echo -n .; done} end desc 'Converts hard-tabs into two-space soft-tabs' task :retab do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed 's/\t/ /g' > tmp; cp tmp $f; rm tmp; echo -n .; done} end desc 'Remove consecutive blank lines' task :scrub_gratuitous_newlines do sh %{find . -name '*.rb' -exec sed -i '' '/./,/^$/!d' {} \\;} end end ## Instruction: Improve task which remove consecutive blank lines ## Code After: namespace :whitespace do desc 'Removes trailing whitespace' task :cleanup do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed 's/[ \t]*$//' > tmp; cp tmp $f; rm tmp; echo -n .; done} end desc 'Converts hard-tabs into two-space soft-tabs' task :retab do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed 's/\t/ /g' > tmp; cp tmp $f; rm tmp; echo -n .; done} end desc 'Remove consecutive blank lines' task :scrub_gratuitous_newlines do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed '/./,/^$/!d' > tmp; cp tmp $f; rm tmp; echo -n .; done} end end
namespace :whitespace do desc 'Removes trailing whitespace' task :cleanup do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed 's/[ \t]*$//' > tmp; cp tmp $f; rm tmp; echo -n .; done} end desc 'Converts hard-tabs into two-space soft-tabs' task :retab do sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; do cat $f | sed 's/\t/ /g' > tmp; cp tmp $f; rm tmp; echo -n .; done} end desc 'Remove consecutive blank lines' task :scrub_gratuitous_newlines do - sh %{find . -name '*.rb' -exec sed -i '' '/./,/^$/!d' {} \\;} + sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`; + do cat $f | sed '/./,/^$/!d' > tmp; cp tmp $f; rm tmp; echo -n .; + done} end end
4
0.222222
3
1
eb4d20eea5485c7ad44579eca8ac4fe3b7bb98bc
README.md
README.md
[![Jenkins](https://img.shields.io/jenkins/s/https/ci.gnyra.com/job/LoL-Auto-Login/job/master.svg?style=flat-square)](https://ci.gnyra.com/blue/organizations/jenkins/LoL-Auto-Login) **Project is currently on hold while I work on school & other higher-priority projects. Sorry!** Automatic login for League of Legends. See the [official website page](https://www.nicoco007.com/other-stuff/lol-auto-login/) for more information. # Known issues * The client window is sometimes not detected correctly and the program fails to log in. The client tends to spawn multiple windows, and the program sometimes gets confused as to which window is the right one. # Acknowledgements LoL Auto Login uses the following 3<sup>rd</sup> party libraries: * [Windows Input Simulator](https://github.com/michaelnoonan/inputsimulator) by [michaelnoonan](https://github.com/michaelnoonan) &ndash; [Microsoft Public License](https://msdn.microsoft.com/en-us/library/ff647676.aspx)
[![Jenkins](https://img.shields.io/jenkins/s/https/ci.gnyra.com/job/LoL-Auto-Login/job/master.svg?style=flat-square)](https://ci.gnyra.com/blue/organizations/jenkins/LoL-Auto-Login) **Project is currently on hold while I work on school & other higher-priority projects. Sorry!** Automatic login for League of Legends. See the [official website page](https://www.nicoco007.com/other-stuff/lol-auto-login/) for more information. # Known issues * The client window is sometimes not detected correctly and the program fails to log in. The client tends to spawn multiple windows, and the program sometimes gets confused as to which window is the right one. # Acknowledgements LoL Auto Login uses the following 3<sup>rd</sup> party libraries: * [AutoIt](https://www.autoitscript.com) by Jonathan Bennett and the AutoIt Team &ndash; [AutoIt License](https://www.autoitscript.com/autoit3/docs/license.htm) * [Fody](https://github.com/Fody/Fody) by Simon Cropp and Cameron MacFarland &ndash; [MIT License](https://github.com/Fody/Fody/blob/master/License.txt) * [YamlDotNet](https://github.com/aaubry/YamlDotNet) by Antoine Aubry &ndash; [MIT License](https://github.com/aaubry/YamlDotNet/blob/master/LICENSE)
Complete list of 3rd party libraries
Complete list of 3rd party libraries
Markdown
agpl-3.0
nicoco007/LoL-Auto-Login
markdown
## Code Before: [![Jenkins](https://img.shields.io/jenkins/s/https/ci.gnyra.com/job/LoL-Auto-Login/job/master.svg?style=flat-square)](https://ci.gnyra.com/blue/organizations/jenkins/LoL-Auto-Login) **Project is currently on hold while I work on school & other higher-priority projects. Sorry!** Automatic login for League of Legends. See the [official website page](https://www.nicoco007.com/other-stuff/lol-auto-login/) for more information. # Known issues * The client window is sometimes not detected correctly and the program fails to log in. The client tends to spawn multiple windows, and the program sometimes gets confused as to which window is the right one. # Acknowledgements LoL Auto Login uses the following 3<sup>rd</sup> party libraries: * [Windows Input Simulator](https://github.com/michaelnoonan/inputsimulator) by [michaelnoonan](https://github.com/michaelnoonan) &ndash; [Microsoft Public License](https://msdn.microsoft.com/en-us/library/ff647676.aspx) ## Instruction: Complete list of 3rd party libraries ## Code After: [![Jenkins](https://img.shields.io/jenkins/s/https/ci.gnyra.com/job/LoL-Auto-Login/job/master.svg?style=flat-square)](https://ci.gnyra.com/blue/organizations/jenkins/LoL-Auto-Login) **Project is currently on hold while I work on school & other higher-priority projects. Sorry!** Automatic login for League of Legends. See the [official website page](https://www.nicoco007.com/other-stuff/lol-auto-login/) for more information. # Known issues * The client window is sometimes not detected correctly and the program fails to log in. The client tends to spawn multiple windows, and the program sometimes gets confused as to which window is the right one. # Acknowledgements LoL Auto Login uses the following 3<sup>rd</sup> party libraries: * [AutoIt](https://www.autoitscript.com) by Jonathan Bennett and the AutoIt Team &ndash; [AutoIt License](https://www.autoitscript.com/autoit3/docs/license.htm) * [Fody](https://github.com/Fody/Fody) by Simon Cropp and Cameron MacFarland &ndash; [MIT License](https://github.com/Fody/Fody/blob/master/License.txt) * [YamlDotNet](https://github.com/aaubry/YamlDotNet) by Antoine Aubry &ndash; [MIT License](https://github.com/aaubry/YamlDotNet/blob/master/LICENSE)
[![Jenkins](https://img.shields.io/jenkins/s/https/ci.gnyra.com/job/LoL-Auto-Login/job/master.svg?style=flat-square)](https://ci.gnyra.com/blue/organizations/jenkins/LoL-Auto-Login) **Project is currently on hold while I work on school & other higher-priority projects. Sorry!** Automatic login for League of Legends. See the [official website page](https://www.nicoco007.com/other-stuff/lol-auto-login/) for more information. # Known issues * The client window is sometimes not detected correctly and the program fails to log in. The client tends to spawn multiple windows, and the program sometimes gets confused as to which window is the right one. # Acknowledgements LoL Auto Login uses the following 3<sup>rd</sup> party libraries: - * [Windows Input Simulator](https://github.com/michaelnoonan/inputsimulator) by [michaelnoonan](https://github.com/michaelnoonan) &ndash; [Microsoft Public License](https://msdn.microsoft.com/en-us/library/ff647676.aspx) + * [AutoIt](https://www.autoitscript.com) by Jonathan Bennett and the AutoIt Team &ndash; [AutoIt License](https://www.autoitscript.com/autoit3/docs/license.htm) + * [Fody](https://github.com/Fody/Fody) by Simon Cropp and Cameron MacFarland &ndash; [MIT License](https://github.com/Fody/Fody/blob/master/License.txt) + * [YamlDotNet](https://github.com/aaubry/YamlDotNet) by Antoine Aubry &ndash; [MIT License](https://github.com/aaubry/YamlDotNet/blob/master/LICENSE)
4
0.333333
3
1
3a242d1b0176e0911ce4325fd961fd13246e404b
lib/toy.rb
lib/toy.rb
require 'simple_uuid' require 'active_model' require 'active_support/json' require 'active_support/core_ext/object' require 'active_support/core_ext/hash/indifferent_access' require 'active_support/core_ext/class/inheritable_attributes' require File.expand_path('../../vendor/moneta/lib/moneta', __FILE__) module Toy autoload :Attribute, 'toy/attribute' autoload :Attributes, 'toy/attributes' autoload :Callbacks, 'toy/callbacks' autoload :Dirty, 'toy/dirty' autoload :Persistence, 'toy/persistence' autoload :Store, 'toy/store' autoload :Serialization, 'toy/serialization' autoload :Validations, 'toy/validations' autoload :Querying, 'toy/querying' autoload :Version, 'toy/version' def encode(obj) ActiveSupport::JSON.encode(obj) end def decode(json) ActiveSupport::JSON.decode(json) end extend self end Dir[File.join(File.dirname(__FILE__), 'toy', 'extensions', '*.rb')].each do |extension| require extension end
require 'forwardable' require 'simple_uuid' require 'active_model' require 'active_support/json' require 'active_support/core_ext/object' require 'active_support/core_ext/hash/indifferent_access' require 'active_support/core_ext/class/inheritable_attributes' require File.expand_path('../../vendor/moneta/lib/moneta', __FILE__) module Toy extend Forwardable autoload :Attribute, 'toy/attribute' autoload :Attributes, 'toy/attributes' autoload :Callbacks, 'toy/callbacks' autoload :Dirty, 'toy/dirty' autoload :Persistence, 'toy/persistence' autoload :Store, 'toy/store' autoload :Serialization, 'toy/serialization' autoload :Validations, 'toy/validations' autoload :Querying, 'toy/querying' autoload :Version, 'toy/version' def_delegators ActiveSupport::JSON, :encode, :decode extend self end Dir[File.join(File.dirname(__FILE__), 'toy', 'extensions', '*.rb')].each do |extension| require extension end
Switch to delegation for json stuff. Nothing big.
Switch to delegation for json stuff. Nothing big.
Ruby
bsd-3-clause
jnunemaker/toystore
ruby
## Code Before: require 'simple_uuid' require 'active_model' require 'active_support/json' require 'active_support/core_ext/object' require 'active_support/core_ext/hash/indifferent_access' require 'active_support/core_ext/class/inheritable_attributes' require File.expand_path('../../vendor/moneta/lib/moneta', __FILE__) module Toy autoload :Attribute, 'toy/attribute' autoload :Attributes, 'toy/attributes' autoload :Callbacks, 'toy/callbacks' autoload :Dirty, 'toy/dirty' autoload :Persistence, 'toy/persistence' autoload :Store, 'toy/store' autoload :Serialization, 'toy/serialization' autoload :Validations, 'toy/validations' autoload :Querying, 'toy/querying' autoload :Version, 'toy/version' def encode(obj) ActiveSupport::JSON.encode(obj) end def decode(json) ActiveSupport::JSON.decode(json) end extend self end Dir[File.join(File.dirname(__FILE__), 'toy', 'extensions', '*.rb')].each do |extension| require extension end ## Instruction: Switch to delegation for json stuff. Nothing big. ## Code After: require 'forwardable' require 'simple_uuid' require 'active_model' require 'active_support/json' require 'active_support/core_ext/object' require 'active_support/core_ext/hash/indifferent_access' require 'active_support/core_ext/class/inheritable_attributes' require File.expand_path('../../vendor/moneta/lib/moneta', __FILE__) module Toy extend Forwardable autoload :Attribute, 'toy/attribute' autoload :Attributes, 'toy/attributes' autoload :Callbacks, 'toy/callbacks' autoload :Dirty, 'toy/dirty' autoload :Persistence, 'toy/persistence' autoload :Store, 'toy/store' autoload :Serialization, 'toy/serialization' autoload :Validations, 'toy/validations' autoload :Querying, 'toy/querying' autoload :Version, 'toy/version' def_delegators ActiveSupport::JSON, :encode, :decode extend self end Dir[File.join(File.dirname(__FILE__), 'toy', 'extensions', '*.rb')].each do |extension| require extension end
+ require 'forwardable' require 'simple_uuid' require 'active_model' require 'active_support/json' require 'active_support/core_ext/object' require 'active_support/core_ext/hash/indifferent_access' require 'active_support/core_ext/class/inheritable_attributes' require File.expand_path('../../vendor/moneta/lib/moneta', __FILE__) module Toy + extend Forwardable + autoload :Attribute, 'toy/attribute' autoload :Attributes, 'toy/attributes' autoload :Callbacks, 'toy/callbacks' autoload :Dirty, 'toy/dirty' autoload :Persistence, 'toy/persistence' autoload :Store, 'toy/store' autoload :Serialization, 'toy/serialization' autoload :Validations, 'toy/validations' autoload :Querying, 'toy/querying' autoload :Version, 'toy/version' + def_delegators ActiveSupport::JSON, :encode, :decode - def encode(obj) - ActiveSupport::JSON.encode(obj) - end - - def decode(json) - ActiveSupport::JSON.decode(json) - end extend self end Dir[File.join(File.dirname(__FILE__), 'toy', 'extensions', '*.rb')].each do |extension| require extension end
11
0.314286
4
7
1bd5f8221b734a2457f7d00b75c7d6e5cf6080e2
app/controllers/life_highlights_controller.rb
app/controllers/life_highlights_controller.rb
class LifeHighlightsController < MyplaceonlineController protected def insecure true end def sorts ["lower(life_highlights.life_highlight_name) ASC"] end def obj_params params.require(:life_highlight).permit( :life_highlight_time, :life_highlight_name, :notes ) end end
class LifeHighlightsController < MyplaceonlineController def use_bubble? true end def bubble_text(obj) Myp.display_date_month_year(obj.life_highlight_time, User.current_user) end protected def insecure true end def sorts ["life_highlights.life_highlight_time DESC", "lower(life_highlights.life_highlight_name) ASC"] end def obj_params params.require(:life_highlight).permit( :life_highlight_time, :life_highlight_name, :notes ) end end
Sort life highlights by time and show time in bubble
Sort life highlights by time and show time in bubble
Ruby
agpl-3.0
myplaceonline/myplaceonline_rails,myplaceonline/myplaceonline_rails,myplaceonline/myplaceonline_rails
ruby
## Code Before: class LifeHighlightsController < MyplaceonlineController protected def insecure true end def sorts ["lower(life_highlights.life_highlight_name) ASC"] end def obj_params params.require(:life_highlight).permit( :life_highlight_time, :life_highlight_name, :notes ) end end ## Instruction: Sort life highlights by time and show time in bubble ## Code After: class LifeHighlightsController < MyplaceonlineController def use_bubble? true end def bubble_text(obj) Myp.display_date_month_year(obj.life_highlight_time, User.current_user) end protected def insecure true end def sorts ["life_highlights.life_highlight_time DESC", "lower(life_highlights.life_highlight_name) ASC"] end def obj_params params.require(:life_highlight).permit( :life_highlight_time, :life_highlight_name, :notes ) end end
class LifeHighlightsController < MyplaceonlineController + def use_bubble? + true + end + + def bubble_text(obj) + Myp.display_date_month_year(obj.life_highlight_time, User.current_user) + end + protected def insecure true end def sorts - ["lower(life_highlights.life_highlight_name) ASC"] + ["life_highlights.life_highlight_time DESC", "lower(life_highlights.life_highlight_name) ASC"] end def obj_params params.require(:life_highlight).permit( :life_highlight_time, :life_highlight_name, :notes ) end end
10
0.555556
9
1
2a747d675272625863cce5c26ec955b95454f72e
.asf.yaml
.asf.yaml
github: description: "Apache Shiro" homepage: https://shiro.apache.org/ features: wiki: false issues: false projects: false enabled_merge_buttons: squash: false merge: true rebase: false notifications: pullrequests: commits@shiro.apache.org commits: commits@shiro.apache.org jira_options: link label worklog
github: description: "Apache Shiro" homepage: https://shiro.apache.org/ features: wiki: false issues: false projects: false enabled_merge_buttons: squash: false merge: true rebase: false notifications: pullrequests: commits@shiro.apache.org commits: commits@shiro.apache.org issues: issues@shiro.apache.org jira_options: link label worklog
Configure new JIRA "issues" mailing list
Configure new JIRA "issues" mailing list
YAML
apache-2.0
feige712/shiro,feige712/shiro,apache/shiro,apache/shiro
yaml
## Code Before: github: description: "Apache Shiro" homepage: https://shiro.apache.org/ features: wiki: false issues: false projects: false enabled_merge_buttons: squash: false merge: true rebase: false notifications: pullrequests: commits@shiro.apache.org commits: commits@shiro.apache.org jira_options: link label worklog ## Instruction: Configure new JIRA "issues" mailing list ## Code After: github: description: "Apache Shiro" homepage: https://shiro.apache.org/ features: wiki: false issues: false projects: false enabled_merge_buttons: squash: false merge: true rebase: false notifications: pullrequests: commits@shiro.apache.org commits: commits@shiro.apache.org issues: issues@shiro.apache.org jira_options: link label worklog
github: description: "Apache Shiro" homepage: https://shiro.apache.org/ features: wiki: false issues: false projects: false enabled_merge_buttons: squash: false merge: true rebase: false notifications: pullrequests: commits@shiro.apache.org commits: commits@shiro.apache.org + issues: issues@shiro.apache.org jira_options: link label worklog
1
0.0625
1
0
884a06ea0bd2021bfc298a93495433a28a717a3e
reportlab/test/test_tools_pythonpoint.py
reportlab/test/test_tools_pythonpoint.py
import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonpoint.pdf can be created from pythonpoint.xml." join, dirname, isfile, abspath = os.path.join, os.path.dirname, os.path.isfile, os.path.abspath rlDir = abspath(dirname(reportlab.__file__)) from reportlab.tools.pythonpoint import pythonpoint from reportlab.lib.utils import isCompactDistro, open_for_read ppDir = dirname(pythonpoint.__file__) xml = join(ppDir, 'demos', 'pythonpoint.xml') datafilename = 'pythonpoint.pdf' outdir = outputfile('') if isCompactDistro(): cwd = None xml = open_for_read(xml) else: outDir = join(rlDir, 'test') cwd = os.getcwd() os.chdir(join(ppDir, 'demos')) pdf = join(outDir, datafilename) if isfile(pdf): os.remove(pdf) pythonpoint.process(xml, outDir=outDir, verbose=0, datafilename=datafilename) if cwd: os.chdir(cwd) assert os.path.exists(pdf) os.remove(pdf) def makeSuite(): return makeSuiteForClasses(PythonPointTestCase) #noruntests if __name__ == "__main__": unittest.TextTestRunner().run(makeSuite())
import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonpoint.pdf can be created from pythonpoint.xml." join, dirname, isfile, abspath = os.path.join, os.path.dirname, os.path.isfile, os.path.abspath rlDir = abspath(dirname(reportlab.__file__)) from reportlab.tools.pythonpoint import pythonpoint from reportlab.lib.utils import isCompactDistro, open_for_read ppDir = dirname(pythonpoint.__file__) xml = join(ppDir, 'demos', 'pythonpoint.xml') datafilename = 'pythonpoint.pdf' outDir = outputfile('') if isCompactDistro(): cwd = None xml = open_for_read(xml) else: cwd = os.getcwd() os.chdir(join(ppDir, 'demos')) pdf = join(outDir, datafilename) if isfile(pdf): os.remove(pdf) pythonpoint.process(xml, outDir=outDir, verbose=0, datafilename=datafilename) if cwd: os.chdir(cwd) assert os.path.exists(pdf) def makeSuite(): return makeSuiteForClasses(PythonPointTestCase) #noruntests if __name__ == "__main__": unittest.TextTestRunner().run(makeSuite())
Fix buglet in compact testing
Fix buglet in compact testing
Python
bsd-3-clause
makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile,makinacorpus/reportlab-ecomobile
python
## Code Before: import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonpoint.pdf can be created from pythonpoint.xml." join, dirname, isfile, abspath = os.path.join, os.path.dirname, os.path.isfile, os.path.abspath rlDir = abspath(dirname(reportlab.__file__)) from reportlab.tools.pythonpoint import pythonpoint from reportlab.lib.utils import isCompactDistro, open_for_read ppDir = dirname(pythonpoint.__file__) xml = join(ppDir, 'demos', 'pythonpoint.xml') datafilename = 'pythonpoint.pdf' outdir = outputfile('') if isCompactDistro(): cwd = None xml = open_for_read(xml) else: outDir = join(rlDir, 'test') cwd = os.getcwd() os.chdir(join(ppDir, 'demos')) pdf = join(outDir, datafilename) if isfile(pdf): os.remove(pdf) pythonpoint.process(xml, outDir=outDir, verbose=0, datafilename=datafilename) if cwd: os.chdir(cwd) assert os.path.exists(pdf) os.remove(pdf) def makeSuite(): return makeSuiteForClasses(PythonPointTestCase) #noruntests if __name__ == "__main__": unittest.TextTestRunner().run(makeSuite()) ## Instruction: Fix buglet in compact testing ## Code After: import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonpoint.pdf can be created from pythonpoint.xml." join, dirname, isfile, abspath = os.path.join, os.path.dirname, os.path.isfile, os.path.abspath rlDir = abspath(dirname(reportlab.__file__)) from reportlab.tools.pythonpoint import pythonpoint from reportlab.lib.utils import isCompactDistro, open_for_read ppDir = dirname(pythonpoint.__file__) xml = join(ppDir, 'demos', 'pythonpoint.xml') datafilename = 'pythonpoint.pdf' outDir = outputfile('') if isCompactDistro(): cwd = None xml = open_for_read(xml) else: cwd = os.getcwd() os.chdir(join(ppDir, 'demos')) pdf = join(outDir, datafilename) if isfile(pdf): os.remove(pdf) pythonpoint.process(xml, outDir=outDir, verbose=0, datafilename=datafilename) if cwd: os.chdir(cwd) assert os.path.exists(pdf) def makeSuite(): return makeSuiteForClasses(PythonPointTestCase) #noruntests if __name__ == "__main__": unittest.TextTestRunner().run(makeSuite())
import os, sys, string from reportlab.test import unittest from reportlab.test.utils import makeSuiteForClasses, outputfile import reportlab class PythonPointTestCase(unittest.TestCase): "Some very crude tests on PythonPoint." def test0(self): "Test if pythonpoint.pdf can be created from pythonpoint.xml." join, dirname, isfile, abspath = os.path.join, os.path.dirname, os.path.isfile, os.path.abspath rlDir = abspath(dirname(reportlab.__file__)) from reportlab.tools.pythonpoint import pythonpoint from reportlab.lib.utils import isCompactDistro, open_for_read ppDir = dirname(pythonpoint.__file__) xml = join(ppDir, 'demos', 'pythonpoint.xml') datafilename = 'pythonpoint.pdf' - outdir = outputfile('') ? ^ + outDir = outputfile('') ? ^ if isCompactDistro(): cwd = None xml = open_for_read(xml) else: - outDir = join(rlDir, 'test') cwd = os.getcwd() os.chdir(join(ppDir, 'demos')) pdf = join(outDir, datafilename) if isfile(pdf): os.remove(pdf) pythonpoint.process(xml, outDir=outDir, verbose=0, datafilename=datafilename) if cwd: os.chdir(cwd) assert os.path.exists(pdf) - os.remove(pdf) def makeSuite(): return makeSuiteForClasses(PythonPointTestCase) #noruntests if __name__ == "__main__": unittest.TextTestRunner().run(makeSuite())
4
0.093023
1
3
060910c0888ddf3fcdd39fb1c8272822979326e6
local-cookbooks/cyclescape-backups/templates/default/run-backups.sh.erb
local-cookbooks/cyclescape-backups/templates/default/run-backups.sh.erb
set -e # Back up the shared directory, which includes uploaded images and documents tar --exclude="*.log" -cjpf <%= @shared_filename %> -C /var/www/cyclescape shared openssl dgst -md5 <%= @shared_filename %> > <%= @shared_filename + ".md5" %> # Back up the database pg_dump <%= @database %> -Z 1 -f <%= @dbdump_filename %> openssl dgst -md5 <%= @dbdump_filename %> > <%= @dbdump_filename + ".md5" %>
set -e # Back up the shared directory, which includes uploaded images and documents tar --exclude="*.log" -cjpf <%= @shared_filename %> -C /var/www/cyclescape shared openssl dgst -md5 <%= @shared_filename %> > <%= @shared_filename + ".md5" %> # Back up the database pg_dump <%= @database %> -Z 1 -f <%= @dbdump_filename %> openssl dgst -md5 <%= @dbdump_filename %> > <%= @dbdump_filename + ".md5" %> # Create an Anonymous version <% backupdb = "#{@database}_backup_#{Time.now.to_i} %> createdb <%= backupdb %> psql <%= backupdb %> < <%= @dbdump_filename %> psql -d <%= backupdb %> -c <<SQL UPDATE users SET full_name = CONCAT('someone+', id), email = CONCAT('someone+', id, '@example.com'), confirmation_token = NULL, reset_password_token = NULL, last_seen_at = NULL, public_token = CONCAT('token', id) WHERE NOT role = 'admin' SQL pg_dump <%= backupdb %> -Z 1 -f <%= "anon.#{@dbdump_filename}" %> openssl dgst -md5 <%= "anon.#{@dbdump_filename}" %> > <%= "anon.#{@dbdump_filename}.md5"" %> dropdb <%= backupdb %>
Add creating an anonymous db dump
Add creating an anonymous db dump Unless a developer uses the full names and emails then it is best practise for them not to be on laptops etc.
HTML+ERB
mit
auto-mat/toolkit-chef,cyclestreets/cyclescape-chef,cyclestreets/cyclescape-chef,cyclestreets/cyclescape-chef,auto-mat/toolkit-chef,auto-mat/toolkit-chef
html+erb
## Code Before: set -e # Back up the shared directory, which includes uploaded images and documents tar --exclude="*.log" -cjpf <%= @shared_filename %> -C /var/www/cyclescape shared openssl dgst -md5 <%= @shared_filename %> > <%= @shared_filename + ".md5" %> # Back up the database pg_dump <%= @database %> -Z 1 -f <%= @dbdump_filename %> openssl dgst -md5 <%= @dbdump_filename %> > <%= @dbdump_filename + ".md5" %> ## Instruction: Add creating an anonymous db dump Unless a developer uses the full names and emails then it is best practise for them not to be on laptops etc. ## Code After: set -e # Back up the shared directory, which includes uploaded images and documents tar --exclude="*.log" -cjpf <%= @shared_filename %> -C /var/www/cyclescape shared openssl dgst -md5 <%= @shared_filename %> > <%= @shared_filename + ".md5" %> # Back up the database pg_dump <%= @database %> -Z 1 -f <%= @dbdump_filename %> openssl dgst -md5 <%= @dbdump_filename %> > <%= @dbdump_filename + ".md5" %> # Create an Anonymous version <% backupdb = "#{@database}_backup_#{Time.now.to_i} %> createdb <%= backupdb %> psql <%= backupdb %> < <%= @dbdump_filename %> psql -d <%= backupdb %> -c <<SQL UPDATE users SET full_name = CONCAT('someone+', id), email = CONCAT('someone+', id, '@example.com'), confirmation_token = NULL, reset_password_token = NULL, last_seen_at = NULL, public_token = CONCAT('token', id) WHERE NOT role = 'admin' SQL pg_dump <%= backupdb %> -Z 1 -f <%= "anon.#{@dbdump_filename}" %> openssl dgst -md5 <%= "anon.#{@dbdump_filename}" %> > <%= "anon.#{@dbdump_filename}.md5"" %> dropdb <%= backupdb %>
set -e # Back up the shared directory, which includes uploaded images and documents tar --exclude="*.log" -cjpf <%= @shared_filename %> -C /var/www/cyclescape shared openssl dgst -md5 <%= @shared_filename %> > <%= @shared_filename + ".md5" %> # Back up the database pg_dump <%= @database %> -Z 1 -f <%= @dbdump_filename %> openssl dgst -md5 <%= @dbdump_filename %> > <%= @dbdump_filename + ".md5" %> + + # Create an Anonymous version + <% backupdb = "#{@database}_backup_#{Time.now.to_i} %> + createdb <%= backupdb %> + + psql <%= backupdb %> < <%= @dbdump_filename %> + psql -d <%= backupdb %> -c <<SQL + UPDATE users SET full_name = CONCAT('someone+', id), + email = CONCAT('someone+', id, '@example.com'), + confirmation_token = NULL, + reset_password_token = NULL, + last_seen_at = NULL, + public_token = CONCAT('token', id) + WHERE NOT role = 'admin' + SQL + + pg_dump <%= backupdb %> -Z 1 -f <%= "anon.#{@dbdump_filename}" %> + openssl dgst -md5 <%= "anon.#{@dbdump_filename}" %> > <%= "anon.#{@dbdump_filename}.md5"" %> + + dropdb <%= backupdb %>
20
2
20
0
03482469ddea1ff5ba7f16dcd35671add523fd91
app/controllers/items_controller.rb
app/controllers/items_controller.rb
class ItemsController < ApplicationController def index @items = Item.all end def show end end
class ItemsController < ApplicationController def index @items = Item.all end def show @item = Item.find(params[:id]) end end
Create instance variable that finds current item based on url params
Create instance variable that finds current item based on url params
Ruby
mit
benjaminhyw/rails-online-shop,benjaminhyw/rails-online-shop,benjaminhyw/rails-online-shop
ruby
## Code Before: class ItemsController < ApplicationController def index @items = Item.all end def show end end ## Instruction: Create instance variable that finds current item based on url params ## Code After: class ItemsController < ApplicationController def index @items = Item.all end def show @item = Item.find(params[:id]) end end
class ItemsController < ApplicationController def index @items = Item.all end def show - + @item = Item.find(params[:id]) end end
2
0.2
1
1
4fd7425293c4799fb42e167576f1a72e40ccb30a
vagrant_script/conf_jepsen.sh
vagrant_script/conf_jepsen.sh
mkdir -p /jepsen cd /jepsen branch="${1:-dev}" if ! git clone -b $branch https://github.com/bogdando/jepsen then cd ./jepsen git remote update git pull --ff-only cd - fi mkdir -p logs sync exit 0
rm -rf /jepsen mkdir -p /jepsen cd /jepsen branch="${1:-dev}" if ! git clone -b $branch https://github.com/bogdando/jepsen then cd ./jepsen git remote update git pull --ff-only cd - fi mkdir -p logs sync exit 0
Fix jepsen repo config idempotency
Fix jepsen repo config idempotency Signed-off-by: Bogdan Dobrelya <62b3a3e71fe69d786a0eb2bf561b6ce08e31d2cc@mail.ru>
Shell
apache-2.0
bogdando/rabbitmq-cluster-ocf-vagrant
shell
## Code Before: mkdir -p /jepsen cd /jepsen branch="${1:-dev}" if ! git clone -b $branch https://github.com/bogdando/jepsen then cd ./jepsen git remote update git pull --ff-only cd - fi mkdir -p logs sync exit 0 ## Instruction: Fix jepsen repo config idempotency Signed-off-by: Bogdan Dobrelya <62b3a3e71fe69d786a0eb2bf561b6ce08e31d2cc@mail.ru> ## Code After: rm -rf /jepsen mkdir -p /jepsen cd /jepsen branch="${1:-dev}" if ! git clone -b $branch https://github.com/bogdando/jepsen then cd ./jepsen git remote update git pull --ff-only cd - fi mkdir -p logs sync exit 0
+ rm -rf /jepsen mkdir -p /jepsen cd /jepsen branch="${1:-dev}" if ! git clone -b $branch https://github.com/bogdando/jepsen then cd ./jepsen git remote update git pull --ff-only cd - fi mkdir -p logs sync exit 0
1
0.076923
1
0
ff499ac32336c80bf0bc19749dab9207134eb302
.travis.yml
.travis.yml
language: python python: - "2.7" - "3.6" addons: apt: packages: - ffmpeg install: - python setup.py install script: - python -c "import audioread"
language: python python: - "2.7" - "3.6" addons: apt: sources: - trusty-media packages: - ffmpeg install: - python setup.py install script: - python -c "import audioread"
Add a PPA source for ffmpeg
Add a PPA source for ffmpeg
YAML
mit
beetbox/audioread
yaml
## Code Before: language: python python: - "2.7" - "3.6" addons: apt: packages: - ffmpeg install: - python setup.py install script: - python -c "import audioread" ## Instruction: Add a PPA source for ffmpeg ## Code After: language: python python: - "2.7" - "3.6" addons: apt: sources: - trusty-media packages: - ffmpeg install: - python setup.py install script: - python -c "import audioread"
language: python python: - "2.7" - "3.6" addons: apt: + sources: + - trusty-media packages: - ffmpeg install: - python setup.py install script: - python -c "import audioread"
2
0.125
2
0
491a6bba3b7bf81eebef2ac8c8060c3cc87e3553
README.adoc
README.adoc
= Code Valet == Problem The link:https://jenkins.io[Jenkins] project faces a challenge unusual to other contemporary CI/CD tools in that it is downloaded and executed on a user's machine(s) rather than as a service. While this offers quite a lot of flexibility to the end-user, it puts Jenkins developers at a disadvantage for a number of reasons: . There is no direct return line of feedback from where their code is executed. No error reports, etc. . There is a significant lag between developers releasing code and it being adopted/used. == Solution A free service which provides basic CI/CD functions with Jenkins as the core platform. With a regularly updated "Jenkins distribution" consisting of many of the key plugins which people are used, built from `master`, and rolled through the Code Valet cluster: . Blue Ocean . GitHub Branch Source . Pipeline . ???
= Code Valet == Problem The link:https://jenkins.io[Jenkins] project faces a challenge unusual to other contemporary CI/CD tools in that it is downloaded and executed on a user's machine(s) rather than as a service. While this offers quite a lot of flexibility to the end-user, it puts Jenkins developers at a disadvantage for a number of reasons: . There is no direct return line of feedback from where their code is executed. No error reports, etc. . There is a significant lag between developers releasing code and it being adopted/used. == Solution A free service which provides basic CI/CD functions with Jenkins as the core platform. With a regularly updated "Jenkins distribution" consisting of many of the key plugins which people are used, built from `master`, and rolled through the Code Valet cluster: . Blue Ocean . GitHub Branch Source . Pipeline . ??? == Architecture WARNING: This is most definitely not set in stone === Control Plane A Kubernetes cluster which will act as the control plane === Management A webapp which acts as the primary controller, user interface for non-Jenkins specific tasks: . Surfacing logs from the Jenkins masters .. Searchable logs for exceptions, etc . Listing statistics from the other running Jenkins masters .. Number of Pipelines active === Jenkins Each GitHub user will have a per-user allocated Jenkins master which executes as a container in this control plane. For example: `rtyler.codevalet.io` would contain all the Pipelines which can be found inside of `https://github.com/rtyler` To start, new Jenkins masters will be configured manual (beta testing!) and users will have access primarily through to link:https://jenkins.io/projects/blueocean[Blue Ocean], but will **not** be given administrative access to the Jenkins master. Groovy scripting will set up some VM templates which will provide dynamically provisioned agents in a cloud provider such as Azure, with a fixed quota, i.e. 2 active machines per.
Add a current thought dump on the architecture
Add a current thought dump on the architecture
AsciiDoc
agpl-3.0
CodeValet/codevalet,CodeValet/codevalet,CodeValet/codevalet
asciidoc
## Code Before: = Code Valet == Problem The link:https://jenkins.io[Jenkins] project faces a challenge unusual to other contemporary CI/CD tools in that it is downloaded and executed on a user's machine(s) rather than as a service. While this offers quite a lot of flexibility to the end-user, it puts Jenkins developers at a disadvantage for a number of reasons: . There is no direct return line of feedback from where their code is executed. No error reports, etc. . There is a significant lag between developers releasing code and it being adopted/used. == Solution A free service which provides basic CI/CD functions with Jenkins as the core platform. With a regularly updated "Jenkins distribution" consisting of many of the key plugins which people are used, built from `master`, and rolled through the Code Valet cluster: . Blue Ocean . GitHub Branch Source . Pipeline . ??? ## Instruction: Add a current thought dump on the architecture ## Code After: = Code Valet == Problem The link:https://jenkins.io[Jenkins] project faces a challenge unusual to other contemporary CI/CD tools in that it is downloaded and executed on a user's machine(s) rather than as a service. While this offers quite a lot of flexibility to the end-user, it puts Jenkins developers at a disadvantage for a number of reasons: . There is no direct return line of feedback from where their code is executed. No error reports, etc. . There is a significant lag between developers releasing code and it being adopted/used. == Solution A free service which provides basic CI/CD functions with Jenkins as the core platform. With a regularly updated "Jenkins distribution" consisting of many of the key plugins which people are used, built from `master`, and rolled through the Code Valet cluster: . Blue Ocean . GitHub Branch Source . Pipeline . ??? == Architecture WARNING: This is most definitely not set in stone === Control Plane A Kubernetes cluster which will act as the control plane === Management A webapp which acts as the primary controller, user interface for non-Jenkins specific tasks: . Surfacing logs from the Jenkins masters .. Searchable logs for exceptions, etc . Listing statistics from the other running Jenkins masters .. Number of Pipelines active === Jenkins Each GitHub user will have a per-user allocated Jenkins master which executes as a container in this control plane. For example: `rtyler.codevalet.io` would contain all the Pipelines which can be found inside of `https://github.com/rtyler` To start, new Jenkins masters will be configured manual (beta testing!) and users will have access primarily through to link:https://jenkins.io/projects/blueocean[Blue Ocean], but will **not** be given administrative access to the Jenkins master. Groovy scripting will set up some VM templates which will provide dynamically provisioned agents in a cloud provider such as Azure, with a fixed quota, i.e. 2 active machines per.
= Code Valet == Problem The link:https://jenkins.io[Jenkins] project faces a challenge unusual to other contemporary CI/CD tools in that it is downloaded and executed on a user's machine(s) rather than as a service. While this offers quite a lot of flexibility to the end-user, it puts Jenkins developers at a disadvantage for a number of reasons: . There is no direct return line of feedback from where their code is executed. No error reports, etc. . There is a significant lag between developers releasing code and it being adopted/used. == Solution A free service which provides basic CI/CD functions with Jenkins as the core platform. With a regularly updated "Jenkins distribution" consisting of many of the key plugins which people are used, built from `master`, and rolled through the Code Valet cluster: . Blue Ocean . GitHub Branch Source . Pipeline . ??? + + + + == Architecture + + WARNING: This is most definitely not set in stone + + + === Control Plane + + + A Kubernetes cluster which will act as the control plane + + + === Management + + A webapp which acts as the primary controller, user interface for non-Jenkins + specific tasks: + + . Surfacing logs from the Jenkins masters + .. Searchable logs for exceptions, etc + . Listing statistics from the other running Jenkins masters + .. Number of Pipelines active + + === Jenkins + + Each GitHub user will have a per-user allocated Jenkins master which executes + as a container in this control plane. For example: `rtyler.codevalet.io` would + contain all the Pipelines which can be found inside of + `https://github.com/rtyler` + + To start, new Jenkins masters will be configured manual (beta testing!) and + users will have access primarily through to + link:https://jenkins.io/projects/blueocean[Blue Ocean], but will **not** be + given administrative access to the Jenkins master. + + + Groovy scripting will set up some VM templates which will provide dynamically + provisioned agents in a cloud provider such as Azure, with a fixed quota, i.e. + 2 active machines per.
40
1.481481
40
0
59395b5ed8ec66614d6a90f5e1fcefaed2a30315
lerna.json
lerna.json
{ "command": { "publish": { "allowBranch": [ "master", "next" ] } }, "npmClient": "yarn", "useWorkspaces": true, "registry": "https://registry.npmjs.org", "version": "4.1.0-alpha.11" }
{ "command": { "publish": { "allowBranch": ["master", "next", "release/*"] } }, "npmClient": "yarn", "useWorkspaces": true, "registry": "https://registry.npmjs.org", "version": "4.1.0-alpha.11" }
Allow publishing from release branches
Allow publishing from release branches
JSON
mit
kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook
json
## Code Before: { "command": { "publish": { "allowBranch": [ "master", "next" ] } }, "npmClient": "yarn", "useWorkspaces": true, "registry": "https://registry.npmjs.org", "version": "4.1.0-alpha.11" } ## Instruction: Allow publishing from release branches ## Code After: { "command": { "publish": { "allowBranch": ["master", "next", "release/*"] } }, "npmClient": "yarn", "useWorkspaces": true, "registry": "https://registry.npmjs.org", "version": "4.1.0-alpha.11" }
{ "command": { "publish": { + "allowBranch": ["master", "next", "release/*"] - "allowBranch": [ - "master", - "next" - ] } }, "npmClient": "yarn", "useWorkspaces": true, "registry": "https://registry.npmjs.org", "version": "4.1.0-alpha.11" }
5
0.357143
1
4
06a5c2d8c81f6ac38e023ad80d9ae2e8f3ec365f
plugins/event_notification/providers/bpm/lib/model/BusinessProcessStartNotificationTemplate.php
plugins/event_notification/providers/bpm/lib/model/BusinessProcessStartNotificationTemplate.php
<?php /** * @package plugins.businessProcessNotification * @subpackage model */ class BusinessProcessStartNotificationTemplate extends BusinessProcessNotificationTemplate { public function __construct() { $this->setType(BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_START)); parent::__construct(); } /* (non-PHPdoc) * @see BatchEventNotificationTemplate::dispatch() */ public function abort($scope) { $abortCaseJobType = BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_ABORT); return $this->dispatchPerCase($scope, $abortCaseJobType); } }
<?php /** * @package plugins.businessProcessNotification * @subpackage model */ class BusinessProcessStartNotificationTemplate extends BusinessProcessNotificationTemplate { private $disableParameters = false; public function __construct() { $this->setType(BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_START)); parent::__construct(); } /* (non-PHPdoc) * @see EventNotificationTemplate::getContentParameters() */ public function getContentParameters() { return $this->disableParameters ? array() : parent::getContentParameters(); } /* (non-PHPdoc) * @see EventNotificationTemplate::getUserParameters() */ public function getUserParameters() { return $this->disableParameters ? array() : parent::getUserParameters(); } /* (non-PHPdoc) * @see BatchEventNotificationTemplate::dispatch() */ public function abort($scope) { $abortCaseJobType = BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_ABORT); $this->disableParameters = true; try { $ret = $this->dispatchPerCase($scope, $abortCaseJobType); } catch (Exception $e) { $this->disableParameters = false; throw $e; } $this->disableParameters = false; return $ret; } }
Disable parameters for abort actions
Disable parameters for abort actions
PHP
agpl-3.0
gale320/server,kaltura/server,DBezemer/server,gale320/server,ratliff/server,jorgevbo/server,doubleshot/server,DBezemer/server,gale320/server,doubleshot/server,matsuu/server,kaltura/server,DBezemer/server,matsuu/server,ivesbai/server,DBezemer/server,jorgevbo/server,jorgevbo/server,doubleshot/server,gale320/server,gale320/server,ratliff/server,matsuu/server,gale320/server,matsuu/server,ratliff/server,jorgevbo/server,ivesbai/server,matsuu/server,jorgevbo/server,jorgevbo/server,ivesbai/server,ratliff/server,ivesbai/server,matsuu/server,ratliff/server,DBezemer/server,kaltura/server,DBezemer/server,kaltura/server,DBezemer/server,ivesbai/server,ivesbai/server,ratliff/server,ratliff/server,DBezemer/server,matsuu/server,gale320/server,ivesbai/server,doubleshot/server,doubleshot/server,ivesbai/server,doubleshot/server,jorgevbo/server,jorgevbo/server,kaltura/server,gale320/server,ratliff/server,doubleshot/server,kaltura/server,matsuu/server,doubleshot/server
php
## Code Before: <?php /** * @package plugins.businessProcessNotification * @subpackage model */ class BusinessProcessStartNotificationTemplate extends BusinessProcessNotificationTemplate { public function __construct() { $this->setType(BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_START)); parent::__construct(); } /* (non-PHPdoc) * @see BatchEventNotificationTemplate::dispatch() */ public function abort($scope) { $abortCaseJobType = BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_ABORT); return $this->dispatchPerCase($scope, $abortCaseJobType); } } ## Instruction: Disable parameters for abort actions ## Code After: <?php /** * @package plugins.businessProcessNotification * @subpackage model */ class BusinessProcessStartNotificationTemplate extends BusinessProcessNotificationTemplate { private $disableParameters = false; public function __construct() { $this->setType(BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_START)); parent::__construct(); } /* (non-PHPdoc) * @see EventNotificationTemplate::getContentParameters() */ public function getContentParameters() { return $this->disableParameters ? array() : parent::getContentParameters(); } /* (non-PHPdoc) * @see EventNotificationTemplate::getUserParameters() */ public function getUserParameters() { return $this->disableParameters ? array() : parent::getUserParameters(); } /* (non-PHPdoc) * @see BatchEventNotificationTemplate::dispatch() */ public function abort($scope) { $abortCaseJobType = BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_ABORT); $this->disableParameters = true; try { $ret = $this->dispatchPerCase($scope, $abortCaseJobType); } catch (Exception $e) { $this->disableParameters = false; throw $e; } $this->disableParameters = false; return $ret; } }
<?php /** * @package plugins.businessProcessNotification * @subpackage model */ class BusinessProcessStartNotificationTemplate extends BusinessProcessNotificationTemplate { + private $disableParameters = false; + public function __construct() { $this->setType(BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_START)); parent::__construct(); + } + + /* (non-PHPdoc) + * @see EventNotificationTemplate::getContentParameters() + */ + public function getContentParameters() + { + return $this->disableParameters ? array() : parent::getContentParameters(); + } + + /* (non-PHPdoc) + * @see EventNotificationTemplate::getUserParameters() + */ + public function getUserParameters() + { + return $this->disableParameters ? array() : parent::getUserParameters(); } /* (non-PHPdoc) * @see BatchEventNotificationTemplate::dispatch() */ public function abort($scope) { $abortCaseJobType = BusinessProcessNotificationPlugin::getBusinessProcessNotificationTemplateTypeCoreValue(BusinessProcessNotificationTemplateType::BPM_ABORT); + $this->disableParameters = true; + try + { - return $this->dispatchPerCase($scope, $abortCaseJobType); ? ^^^ + $ret = $this->dispatchPerCase($scope, $abortCaseJobType); ? ++ ^^ + + } + catch (Exception $e) + { + $this->disableParameters = false; + throw $e; + } + $this->disableParameters = false; + return $ret; } }
31
1.409091
30
1
e0565a7c43da5f6ffd005daa1bf5ff098ff8f8ac
README.md
README.md
ElasticSearch Cookbook ====================== This Chef cookbook contains recipes that automatically installs and configures ElasticSearch 1.1.1 for AWS OpsWorks instances. License ======= Copyright &copy; 2014 Verdigris Technologies, Inc. All rights reserved. This cookbook is distributed under the BSD license. See [LICENSE.md]( https://github.com/VerdigrisTech/cookbook-elasticsearch/blob/master/LICENSE ) for more details.
ElasticSearch Cookbook ====================== This Chef cookbook contains recipes that automatically installs and configures ElasticSearch 1.1.1 for AWS OpsWorks instances. License ======= Copyright &copy; 2014 Verdigris Technologies, Inc. All rights reserved. This cookbook is licensed and distributed under the Simplified BSD license. See [LICENSE.md]( https://github.com/VerdigrisTech/cookbook-elasticsearch/blob/master/LICENSE ) for more details.
Add clarification to the type of BSD license
Add clarification to the type of BSD license
Markdown
bsd-2-clause
VerdigrisTech/cookbook-elasticsearch
markdown
## Code Before: ElasticSearch Cookbook ====================== This Chef cookbook contains recipes that automatically installs and configures ElasticSearch 1.1.1 for AWS OpsWorks instances. License ======= Copyright &copy; 2014 Verdigris Technologies, Inc. All rights reserved. This cookbook is distributed under the BSD license. See [LICENSE.md]( https://github.com/VerdigrisTech/cookbook-elasticsearch/blob/master/LICENSE ) for more details. ## Instruction: Add clarification to the type of BSD license ## Code After: ElasticSearch Cookbook ====================== This Chef cookbook contains recipes that automatically installs and configures ElasticSearch 1.1.1 for AWS OpsWorks instances. License ======= Copyright &copy; 2014 Verdigris Technologies, Inc. All rights reserved. This cookbook is licensed and distributed under the Simplified BSD license. See [LICENSE.md]( https://github.com/VerdigrisTech/cookbook-elasticsearch/blob/master/LICENSE ) for more details.
ElasticSearch Cookbook ====================== This Chef cookbook contains recipes that automatically installs and configures ElasticSearch 1.1.1 for AWS OpsWorks instances. License ======= Copyright &copy; 2014 Verdigris Technologies, Inc. All rights reserved. - This cookbook is distributed under the BSD license. See [LICENSE.md]( + This cookbook is licensed and distributed under the Simplified BSD license. See + [LICENSE.md]( https://github.com/VerdigrisTech/cookbook-elasticsearch/blob/master/LICENSE ) for more details.
3
0.214286
2
1
0c5f862ca8ea718bf1a11d71dda74e79f20499fa
package.json
package.json
{ "private": true, "dependencies": { "flexboxgrid": "^6.3.1", "font-awesome": "^4.6.3", "gulp": "^3.9.1", "laravel-elixir": "^5.0.0", "laravel-elixir-vueify": "^1.0.3", "prismjs": "^1.4.1", "source-code-pro": "git://github.com/adobe-fonts/source-code-pro.git#release", "source-sans-pro": "git://github.com/adobe-fonts/source-sans-pro.git#release", "vue": "^1.0.24", "vue-resource": "^0.7.4" } }
{ "private": true, "dependencies": { "flexboxgrid": "^6.3.1", "font-awesome": "^4.6.3", "gulp": "github:gulpjs/gulp#4.0", "laravel-elixir": "^5.0.0", "laravel-elixir-vueify": "^1.0.3", "prismjs": "^1.4.1", "source-code-pro": "git://github.com/adobe-fonts/source-code-pro.git#release", "source-sans-pro": "git://github.com/adobe-fonts/source-sans-pro.git#release", "vue": "^1.0.24", "vue-resource": "^0.7.4" } }
Switch to experimental gulp 4
Switch to experimental gulp 4
JSON
mit
OParl/dev-website,OParl/dev-website,OParl/dev-website
json
## Code Before: { "private": true, "dependencies": { "flexboxgrid": "^6.3.1", "font-awesome": "^4.6.3", "gulp": "^3.9.1", "laravel-elixir": "^5.0.0", "laravel-elixir-vueify": "^1.0.3", "prismjs": "^1.4.1", "source-code-pro": "git://github.com/adobe-fonts/source-code-pro.git#release", "source-sans-pro": "git://github.com/adobe-fonts/source-sans-pro.git#release", "vue": "^1.0.24", "vue-resource": "^0.7.4" } } ## Instruction: Switch to experimental gulp 4 ## Code After: { "private": true, "dependencies": { "flexboxgrid": "^6.3.1", "font-awesome": "^4.6.3", "gulp": "github:gulpjs/gulp#4.0", "laravel-elixir": "^5.0.0", "laravel-elixir-vueify": "^1.0.3", "prismjs": "^1.4.1", "source-code-pro": "git://github.com/adobe-fonts/source-code-pro.git#release", "source-sans-pro": "git://github.com/adobe-fonts/source-sans-pro.git#release", "vue": "^1.0.24", "vue-resource": "^0.7.4" } }
{ "private": true, "dependencies": { "flexboxgrid": "^6.3.1", "font-awesome": "^4.6.3", - "gulp": "^3.9.1", + "gulp": "github:gulpjs/gulp#4.0", "laravel-elixir": "^5.0.0", "laravel-elixir-vueify": "^1.0.3", "prismjs": "^1.4.1", "source-code-pro": "git://github.com/adobe-fonts/source-code-pro.git#release", "source-sans-pro": "git://github.com/adobe-fonts/source-sans-pro.git#release", "vue": "^1.0.24", "vue-resource": "^0.7.4" } }
2
0.133333
1
1
1dd87a4bd37bb3d19b4b2a4607554e9856d1dc8f
.travis.yml
.travis.yml
language: ruby rvm: - 2.1.2
language: ruby rvm: - 2.2.2 - 2.1.2 env: global: secure: LajEHfUoZ43iJI3DWRWNyWRumb73A4fCMJyTxP3chHoA7Rbh6Baie1vuQVDCbt4TiOMlZVhP7d21JonsvsFyfagKdTTNyUM1m9pNXWX1z/mIV51/TtOgpx2o8eNExI2SB4LqOrLDZ/UFvdl9xIrgmUQgRjcjqfq5MmNHLO1N/co=
Test on ruby 2.2 and export encrypted env var for Bing key
Test on ruby 2.2 and export encrypted env var for Bing key
YAML
mit
blackxored/whos_dated_who
yaml
## Code Before: language: ruby rvm: - 2.1.2 ## Instruction: Test on ruby 2.2 and export encrypted env var for Bing key ## Code After: language: ruby rvm: - 2.2.2 - 2.1.2 env: global: secure: LajEHfUoZ43iJI3DWRWNyWRumb73A4fCMJyTxP3chHoA7Rbh6Baie1vuQVDCbt4TiOMlZVhP7d21JonsvsFyfagKdTTNyUM1m9pNXWX1z/mIV51/TtOgpx2o8eNExI2SB4LqOrLDZ/UFvdl9xIrgmUQgRjcjqfq5MmNHLO1N/co=
language: ruby rvm: + - 2.2.2 - - 2.1.2 ? -- + - 2.1.2 + env: + global: + secure: LajEHfUoZ43iJI3DWRWNyWRumb73A4fCMJyTxP3chHoA7Rbh6Baie1vuQVDCbt4TiOMlZVhP7d21JonsvsFyfagKdTTNyUM1m9pNXWX1z/mIV51/TtOgpx2o8eNExI2SB4LqOrLDZ/UFvdl9xIrgmUQgRjcjqfq5MmNHLO1N/co=
6
2
5
1
5307bcbb0107d4a4dcbda54cdbb28b2dbfb01e91
lib/adapters/postgres.js
lib/adapters/postgres.js
var pg = null try { pg = require('pg') pg = pg.native } catch (__e) { if (!pg) { exports.create = exports.createQuery = function () { throw new Exception("pg driver failed to load, please `npm install pg`") } return } } var Transaction = require('../transaction') var helpers = require('../helpers') exports.createConnection = function (url, callback) { var opts = helpers.prepareUrl(url) , conn = new pg.Client(opts) if (callback) { conn.connect(function (err) { if (err) callback(err) else callback(null, conn) }) } else { conn.connect() } conn.begin = Transaction.createBeginMethod(exports.createQuery) //conn.query = wrapQueryMethod(conn.query) return conn } // Create a Query object that conforms to the Any-DB interface exports.createQuery = function (stmt, params, callback) { return new pg.Query(stmt, params, callback) }
var pg = null , native = null try { pg = require('pg') native = pg.native } catch (__e) { if (!pg) { exports.create = exports.createQuery = function () { throw new Exception("pg driver failed to load, please `npm install pg`") } return } } var Transaction = require('../transaction') var helpers = require('../helpers') exports.forceJS = false exports.createConnection = function (url, callback) { var opts = helpers.prepareUrl(url) , scheme = url.protocol , backend = (exports.forceJS || !native) ? pg : native , conn = backend.Client(opts) if (callback) { conn.connect(function (err) { if (err) callback(err) else callback(null, conn) }) } else { conn.connect() } conn.begin = Transaction.createBeginMethod(exports.createQuery) //conn.query = wrapQueryMethod(conn.query) return conn } // Create a Query object that conforms to the Any-DB interface exports.createQuery = function (stmt, params, callback) { var backend = (exports.forceJS || !native) ? pg : native return new backend.Query(stmt, params, callback) }
Allow disabling of native PG driver
Allow disabling of native PG driver
JavaScript
mit
grncdr/node-any-db,MignonCornet/node-any-db
javascript
## Code Before: var pg = null try { pg = require('pg') pg = pg.native } catch (__e) { if (!pg) { exports.create = exports.createQuery = function () { throw new Exception("pg driver failed to load, please `npm install pg`") } return } } var Transaction = require('../transaction') var helpers = require('../helpers') exports.createConnection = function (url, callback) { var opts = helpers.prepareUrl(url) , conn = new pg.Client(opts) if (callback) { conn.connect(function (err) { if (err) callback(err) else callback(null, conn) }) } else { conn.connect() } conn.begin = Transaction.createBeginMethod(exports.createQuery) //conn.query = wrapQueryMethod(conn.query) return conn } // Create a Query object that conforms to the Any-DB interface exports.createQuery = function (stmt, params, callback) { return new pg.Query(stmt, params, callback) } ## Instruction: Allow disabling of native PG driver ## Code After: var pg = null , native = null try { pg = require('pg') native = pg.native } catch (__e) { if (!pg) { exports.create = exports.createQuery = function () { throw new Exception("pg driver failed to load, please `npm install pg`") } return } } var Transaction = require('../transaction') var helpers = require('../helpers') exports.forceJS = false exports.createConnection = function (url, callback) { var opts = helpers.prepareUrl(url) , scheme = url.protocol , backend = (exports.forceJS || !native) ? pg : native , conn = backend.Client(opts) if (callback) { conn.connect(function (err) { if (err) callback(err) else callback(null, conn) }) } else { conn.connect() } conn.begin = Transaction.createBeginMethod(exports.createQuery) //conn.query = wrapQueryMethod(conn.query) return conn } // Create a Query object that conforms to the Any-DB interface exports.createQuery = function (stmt, params, callback) { var backend = (exports.forceJS || !native) ? pg : native return new backend.Query(stmt, params, callback) }
var pg = null + , native = null try { pg = require('pg') - pg = pg.native ? ^^ + native = pg.native ? ^^^^^^ } catch (__e) { if (!pg) { exports.create = exports.createQuery = function () { throw new Exception("pg driver failed to load, please `npm install pg`") } return } } var Transaction = require('../transaction') var helpers = require('../helpers') + exports.forceJS = false + exports.createConnection = function (url, callback) { var opts = helpers.prepareUrl(url) + , scheme = url.protocol + , backend = (exports.forceJS || !native) ? pg : native - , conn = new pg.Client(opts) ? ^^ ^^^^^ + , conn = backend.Client(opts) ? ^ +++++ ^ if (callback) { conn.connect(function (err) { if (err) callback(err) else callback(null, conn) }) } else { conn.connect() } + conn.begin = Transaction.createBeginMethod(exports.createQuery) //conn.query = wrapQueryMethod(conn.query) return conn } // Create a Query object that conforms to the Any-DB interface exports.createQuery = function (stmt, params, callback) { + var backend = (exports.forceJS || !native) ? pg : native - return new pg.Query(stmt, params, callback) ? ^^ + return new backend.Query(stmt, params, callback) ? ^^^^^^^ }
13
0.342105
10
3
1412f9474000dea92eb5091705b3b6de797ffff7
.travis.yml
.travis.yml
language: node_js node_js: - "stable" - "6" - "5" cache: directories: - node_modules
language: node_js node_js: - "stable" - "6" - "5" before_install: - npm -g install npm@'>=3' cache: directories: - node_modules
Update npm before running unit tests
Update npm before running unit tests
YAML
mit
cubehouse/themeparks
yaml
## Code Before: language: node_js node_js: - "stable" - "6" - "5" cache: directories: - node_modules ## Instruction: Update npm before running unit tests ## Code After: language: node_js node_js: - "stable" - "6" - "5" before_install: - npm -g install npm@'>=3' cache: directories: - node_modules
language: node_js node_js: - "stable" - "6" - "5" + before_install: + - npm -g install npm@'>=3' cache: directories: - node_modules
2
0.25
2
0
f311f4dbc4ee582cef996b59da827381fc0b54d4
.travis.yml
.travis.yml
language: python python: - "2.7" - "3.5" install: "pip install tox tox-travis" script: tox sudo: false
language: python python: - "2.7" - "3.5" - "3.6" install: "pip install tox tox-travis" script: tox sudo: false
Build and test with Python 3.6
Build and test with Python 3.6
YAML
apache-2.0
signalfx/signalfx-python,signalfx/signalfx-python
yaml
## Code Before: language: python python: - "2.7" - "3.5" install: "pip install tox tox-travis" script: tox sudo: false ## Instruction: Build and test with Python 3.6 ## Code After: language: python python: - "2.7" - "3.5" - "3.6" install: "pip install tox tox-travis" script: tox sudo: false
language: python python: - "2.7" - "3.5" + - "3.6" install: "pip install tox tox-travis" script: tox sudo: false
1
0.142857
1
0
017ea74cccc6b541ec3dd530846adbb569abf78f
package.json
package.json
{ "name": "cjh-tree", "author": "Christy Haragan", "version": "0.0.1", "dependencies": { "underscore": "~1.6.0" }, "devDependencies": { "mocha": "~1.20.0", "sinon": "~1.10.2", "sinon-chai": "~2.5.0", "chai": "~1.9.1" }, "engines": { "node": ">=0.10.0" } }
{ "name": "cjh-tree", "author": "Christy Haragan", "version": "0.0.1", "dependencies": { "underscore": "~1.6.0" }, "devDependencies": { "mocha": "~1.20.0", "sinon": "~1.10.2", "sinon-chai": "~2.5.0", "chai": "~1.9.1" }, "engines": { "node": ">=0.10.0" }, "main": "./lib/index.js" }
Add index.js as main entry point
Add index.js as main entry point
JSON
mit
christyharagan/cjh-tree
json
## Code Before: { "name": "cjh-tree", "author": "Christy Haragan", "version": "0.0.1", "dependencies": { "underscore": "~1.6.0" }, "devDependencies": { "mocha": "~1.20.0", "sinon": "~1.10.2", "sinon-chai": "~2.5.0", "chai": "~1.9.1" }, "engines": { "node": ">=0.10.0" } } ## Instruction: Add index.js as main entry point ## Code After: { "name": "cjh-tree", "author": "Christy Haragan", "version": "0.0.1", "dependencies": { "underscore": "~1.6.0" }, "devDependencies": { "mocha": "~1.20.0", "sinon": "~1.10.2", "sinon-chai": "~2.5.0", "chai": "~1.9.1" }, "engines": { "node": ">=0.10.0" }, "main": "./lib/index.js" }
{ "name": "cjh-tree", "author": "Christy Haragan", "version": "0.0.1", "dependencies": { "underscore": "~1.6.0" }, "devDependencies": { "mocha": "~1.20.0", "sinon": "~1.10.2", "sinon-chai": "~2.5.0", "chai": "~1.9.1" }, "engines": { "node": ">=0.10.0" - } + }, ? + + "main": "./lib/index.js" }
3
0.176471
2
1
c03d9a7e08557042d7c4880fe33488cf9bb1b664
views/partials/userCard.jade
views/partials/userCard.jade
.grid-item.user-card - var image_uri = card_user.profile.picture || '/images/person_placeholder.gif' - var bookmark_uri = curr_user.bookmarks.indexOf(card_user._id) >= 0 ? 'bookmark_active.svg' : 'bookmark_inactive.svg' img.bookmark(src='/images/#{bookmark_uri}', data-user-id=card_user.id) .profile-info .profile-pic(onclick='window.location = "/profile/#{card_user.id}"' class="#{card_user.match}" data-long=card_user.loc.coordinates[0] data-lat=card_user.loc.coordinates[1] style="background-image:url('#{image_uri}')", data-toggle="popover" data-trigger="hover" title="#{card_user.profile.name}") .name-location h3=card_user.profile.name.split(' ')[0] h4=card_user.profile.location p=card_user.aboutMe hr.separator .skill-icons each skill in card_user.skills.slice(0, 5) .skill-label #{skill.label} .card-footer .action-calls(data-toggle="modal", data-target="#requestModal", data-name="#{card_user.profile.name}" data-id="#{card_user.id}" data-skills=card_user.skills) Request me
.grid-item.user-card - var image_uri = card_user.profile.picture || '/images/person_placeholder.gif' - var bookmark_uri = curr_user.bookmarks.indexOf(card_user._id) >= 0 ? 'bookmark_active.svg' : 'bookmark_inactive.svg' img.bookmark(src='/images/#{bookmark_uri}', data-user-id=card_user.id) .profile-info .profile-pic(onclick='window.location = "/profile/#{card_user.id}"' class="#{card_user.match}" data-long=card_user.loc.coordinates[0] data-lat=card_user.loc.coordinates[1] style="background-image:url('#{image_uri}')", data-toggle="popover" data-trigger="hover" title="#{card_user.profile.name}") .name-location h3=card_user.profile.name.split(' ')[0] h4=card_user.profile.location p=card_user.aboutMe hr.separator .skill-icons each skill in card_user.skills.slice(0, 5) .skill-label #{skill.label} .card-footer button.btn.btn-success.action-calls(data-toggle="modal", data-target="#requestModal", data-name="#{card_user.profile.name}" data-id="#{card_user.id}" data-skills=card_user.skills) Request me
Make request button a success button
Make request button a success button
Jade
mit
shareonbazaar/bazaar,shareonbazaar/bazaar,shareonbazaar/bazaar
jade
## Code Before: .grid-item.user-card - var image_uri = card_user.profile.picture || '/images/person_placeholder.gif' - var bookmark_uri = curr_user.bookmarks.indexOf(card_user._id) >= 0 ? 'bookmark_active.svg' : 'bookmark_inactive.svg' img.bookmark(src='/images/#{bookmark_uri}', data-user-id=card_user.id) .profile-info .profile-pic(onclick='window.location = "/profile/#{card_user.id}"' class="#{card_user.match}" data-long=card_user.loc.coordinates[0] data-lat=card_user.loc.coordinates[1] style="background-image:url('#{image_uri}')", data-toggle="popover" data-trigger="hover" title="#{card_user.profile.name}") .name-location h3=card_user.profile.name.split(' ')[0] h4=card_user.profile.location p=card_user.aboutMe hr.separator .skill-icons each skill in card_user.skills.slice(0, 5) .skill-label #{skill.label} .card-footer .action-calls(data-toggle="modal", data-target="#requestModal", data-name="#{card_user.profile.name}" data-id="#{card_user.id}" data-skills=card_user.skills) Request me ## Instruction: Make request button a success button ## Code After: .grid-item.user-card - var image_uri = card_user.profile.picture || '/images/person_placeholder.gif' - var bookmark_uri = curr_user.bookmarks.indexOf(card_user._id) >= 0 ? 'bookmark_active.svg' : 'bookmark_inactive.svg' img.bookmark(src='/images/#{bookmark_uri}', data-user-id=card_user.id) .profile-info .profile-pic(onclick='window.location = "/profile/#{card_user.id}"' class="#{card_user.match}" data-long=card_user.loc.coordinates[0] data-lat=card_user.loc.coordinates[1] style="background-image:url('#{image_uri}')", data-toggle="popover" data-trigger="hover" title="#{card_user.profile.name}") .name-location h3=card_user.profile.name.split(' ')[0] h4=card_user.profile.location p=card_user.aboutMe hr.separator .skill-icons each skill in card_user.skills.slice(0, 5) .skill-label #{skill.label} .card-footer button.btn.btn-success.action-calls(data-toggle="modal", data-target="#requestModal", data-name="#{card_user.profile.name}" data-id="#{card_user.id}" data-skills=card_user.skills) Request me
.grid-item.user-card - var image_uri = card_user.profile.picture || '/images/person_placeholder.gif' - var bookmark_uri = curr_user.bookmarks.indexOf(card_user._id) >= 0 ? 'bookmark_active.svg' : 'bookmark_inactive.svg' img.bookmark(src='/images/#{bookmark_uri}', data-user-id=card_user.id) .profile-info .profile-pic(onclick='window.location = "/profile/#{card_user.id}"' class="#{card_user.match}" data-long=card_user.loc.coordinates[0] data-lat=card_user.loc.coordinates[1] style="background-image:url('#{image_uri}')", data-toggle="popover" data-trigger="hover" title="#{card_user.profile.name}") .name-location h3=card_user.profile.name.split(' ')[0] h4=card_user.profile.location p=card_user.aboutMe hr.separator .skill-icons each skill in card_user.skills.slice(0, 5) .skill-label #{skill.label} .card-footer - .action-calls(data-toggle="modal", data-target="#requestModal", data-name="#{card_user.profile.name}" data-id="#{card_user.id}" data-skills=card_user.skills) Request me + button.btn.btn-success.action-calls(data-toggle="modal", data-target="#requestModal", data-name="#{card_user.profile.name}" data-id="#{card_user.id}" data-skills=card_user.skills) Request me ? ++++++++++++++++++++++
2
0.125
1
1
d3469a6ec18649d52cbced07c3c476d09ab5e2ba
backend/app/views/spree/admin/shared/_head.html.erb
backend/app/views/spree/admin/shared/_head.html.erb
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <%= csrf_meta_tags %> <title> <% if content_for? :page_title %> <%= yield :page_title %> <% else %> <%= "Spree #{Spree.t('administration')}: " %> <%= Spree.t(controller.controller_name, :default => controller.controller_name.titleize) %> <% end %> </title> <!-- Get "Open Sans" font from Google --> <link href='//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600&subset=latin,cyrillic,greek,vietnamese' rel='stylesheet' type='text/css'> <%= stylesheet_link_tag 'spree/backend' %> <%= javascript_include_tag 'spree/backend' %> <%= render "spree/admin/shared/translations" %> <%= render "spree/admin/shared/routes" %> <%= javascript_tag do -%> jQuery.alerts.dialogClass = 'spree'; <%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" %> <% end -%> <%= yield :head %>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <%= csrf_meta_tags %> <title> <% if content_for? :title %> <%= yield :title %> <% else %> <%= "Spree #{Spree.t('administration')}: " %> <%= Spree.t(controller.controller_name, :default => controller.controller_name.titleize) %> <% end %> </title> <!-- Get "Open Sans" font from Google --> <link href='//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600&subset=latin,cyrillic,greek,vietnamese' rel='stylesheet' type='text/css'> <%= stylesheet_link_tag 'spree/backend' %> <%= javascript_include_tag 'spree/backend' %> <%= render "spree/admin/shared/translations" %> <%= render "spree/admin/shared/routes" %> <%= javascript_tag do -%> jQuery.alerts.dialogClass = 'spree'; <%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" %> <% end -%> <%= yield :head %>
Call shared/_head title content_for 'title', becuase 'page_title' is already taken
Call shared/_head title content_for 'title', becuase 'page_title' is already taken
HTML+ERB
bsd-3-clause
jaspreet21anand/spree,dafontaine/spree,JDutil/spree,mleglise/spree,calvinl/spree,knuepwebdev/FloatTubeRodHolders,ckk-scratch/solidus,Boomkat/spree,KMikhaylovCTG/spree,jasonfb/spree,CJMrozek/spree,wolfieorama/spree,siddharth28/spree,moneyspyder/spree,caiqinghua/spree,miyazawatomoka/spree,KMikhaylovCTG/spree,tesserakt/clean_spree,CiscoCloud/spree,pervino/solidus,vcavallo/spree,hifly/spree,kewaunited/spree,jsurdilla/solidus,kewaunited/spree,piousbox/spree,jordan-brough/spree,archSeer/spree,yushine/spree,adaddeo/spree,dotandbo/spree,camelmasa/spree,grzlus/solidus,shekibobo/spree,jasonfb/spree,Nevensoft/spree,brchristian/spree,quentinuys/spree,athal7/solidus,agient/agientstorefront,carlesjove/spree,KMikhaylovCTG/spree,locomotivapro/spree,ahmetabdi/spree,Senjai/solidus,assembledbrands/spree,assembledbrands/spree,wolfieorama/spree,softr8/spree,Migweld/spree,shioyama/spree,freerunningtech/spree,zamiang/spree,beni55/spree,robodisco/spree,pulkit21/spree,richardnuno/solidus,delphsoft/spree-store-ballchair,richardnuno/solidus,Kagetsuki/spree,yiqing95/spree,Boomkat/spree,rbngzlv/spree,keatonrow/spree,ayb/spree,raow/spree,Kagetsuki/spree,pervino/solidus,Arpsara/solidus,SadTreeFriends/spree,scottcrawford03/solidus,AgilTec/spree,reidblomquist/spree,azclick/spree,trigrass2/spree,JuandGirald/spree,rajeevriitm/spree,degica/spree,shioyama/spree,jsurdilla/solidus,tancnle/spree,project-eutopia/spree,DynamoMTL/spree,grzlus/spree,freerunningtech/spree,delphsoft/spree-store-ballchair,piousbox/spree,CiscoCloud/spree,vmatekole/spree,Migweld/spree,hoanghiep90/spree,jspizziri/spree,TimurTarasenko/spree,yiqing95/spree,jspizziri/spree,robodisco/spree,edgward/spree,biagidp/spree,hoanghiep90/spree,sunny2601/spree,jordan-brough/solidus,moneyspyder/spree,watg/spree,JDutil/spree,LBRapid/spree,joanblake/spree,NerdsvilleCEO/spree,FadliKun/spree,yomishra/pce,rajeevriitm/spree,kewaunited/spree,lsirivong/solidus,devilcoders/solidus,caiqinghua/spree,zaeznet/spree,pervino/spree,richardnuno/solidus,woboinc/spree,sliaquat/spree,maybii/spree,abhishekjain16/spree,JuandGirald/spree,sfcgeorge/spree,orenf/spree,carlesjove/spree,surfdome/spree,Machpowersystems/spree_mach,jasonfb/spree,volpejoaquin/spree,pulkit21/spree,jordan-brough/solidus,gregoryrikson/spree-sample,alepore/spree,scottcrawford03/solidus,Arpsara/solidus,caiqinghua/spree,miyazawatomoka/spree,TrialGuides/spree,builtbybuffalo/spree,DarkoP/spree,siddharth28/spree,forkata/solidus,lyzxsc/spree,Lostmyname/spree,patdec/spree,kewaunited/spree,Nevensoft/spree,Arpsara/solidus,forkata/solidus,PhoenixTeam/spree_phoenix,archSeer/spree,patdec/spree,dafontaine/spree,ujai/spree,adaddeo/spree,bonobos/solidus,progsri/spree,vinayvinsol/spree,alejandromangione/spree,tailic/spree,piousbox/spree,mindvolt/spree,jparr/spree,piousbox/spree,karlitxo/spree,carlesjove/spree,biagidp/spree,priyank-gupta/spree,tesserakt/clean_spree,vmatekole/spree,Arpsara/solidus,trigrass2/spree,Ropeney/spree,watg/spree,jeffboulet/spree,ayb/spree,pervino/spree,APohio/spree,Lostmyname/spree,jaspreet21anand/spree,bricesanchez/spree,brchristian/spree,njerrywerry/spree,locomotivapro/spree,rakibulislam/spree,jsurdilla/solidus,biagidp/spree,vmatekole/spree,degica/spree,adaddeo/spree,Machpowersystems/spree_mach,mleglise/spree,alejandromangione/spree,CiscoCloud/spree,azranel/spree,odk211/spree,lyzxsc/spree,FadliKun/spree,sliaquat/spree,sideci-sample/sideci-sample-spree,PhoenixTeam/spree_phoenix,Kagetsuki/spree,patdec/spree,grzlus/solidus,njerrywerry/spree,net2b/spree,azranel/spree,sfcgeorge/spree,Ropeney/spree,abhishekjain16/spree,azclick/spree,derekluo/spree,fahidnasir/spree,AgilTec/spree,adaddeo/spree,knuepwebdev/FloatTubeRodHolders,Hates/spree,hifly/spree,Migweld/spree,wolfieorama/spree,Mayvenn/spree,beni55/spree,azranel/spree,zaeznet/spree,builtbybuffalo/spree,robodisco/spree,net2b/spree,alvinjean/spree,lsirivong/spree,lsirivong/solidus,joanblake/spree,ahmetabdi/spree,raow/spree,omarsar/spree,CJMrozek/spree,imella/spree,wolfieorama/spree,tomash/spree,ramkumar-kr/spree,CJMrozek/spree,moneyspyder/spree,useiichi/spree,ckk-scratch/solidus,Nevensoft/spree,thogg4/spree,karlitxo/spree,progsri/spree,AgilTec/spree,bricesanchez/spree,patdec/spree,welitonfreitas/spree,DarkoP/spree,yushine/spree,jordan-brough/solidus,woboinc/spree,jsurdilla/solidus,orenf/spree,scottcrawford03/solidus,imella/spree,bonobos/solidus,volpejoaquin/spree,zamiang/spree,trigrass2/spree,xuewenfei/solidus,camelmasa/spree,alepore/spree,welitonfreitas/spree,delphsoft/spree-store-ballchair,azranel/spree,Senjai/solidus,bjornlinder/Spree,njerrywerry/spree,athal7/solidus,Senjai/spree,lsirivong/solidus,vinayvinsol/spree,grzlus/spree,richardnuno/solidus,tancnle/spree,calvinl/spree,alvinjean/spree,DynamoMTL/spree,dotandbo/spree,jparr/spree,omarsar/spree,Mayvenn/spree,Nevensoft/spree,radarseesradar/spree,Hawaiideveloper/shoppingcart,fahidnasir/spree,radarseesradar/spree,surfdome/spree,vulk/spree,dotandbo/spree,alepore/spree,TrialGuides/spree,Kagetsuki/spree,project-eutopia/spree,JDutil/spree,siddharth28/spree,vulk/spree,pervino/solidus,mleglise/spree,ramkumar-kr/spree,Senjai/solidus,yomishra/pce,tancnle/spree,reidblomquist/spree,joanblake/spree,APohio/spree,jaspreet21anand/spree,dandanwei/spree,grzlus/solidus,rakibulislam/spree,shekibobo/spree,jeffboulet/spree,jordan-brough/solidus,APohio/spree,builtbybuffalo/spree,Hates/spree,LBRapid/spree,xuewenfei/solidus,degica/spree,RatioClothing/spree,gregoryrikson/spree-sample,AgilTec/spree,Ropeney/spree,KMikhaylovCTG/spree,reidblomquist/spree,zaeznet/spree,thogg4/spree,shioyama/spree,alejandromangione/spree,azclick/spree,Boomkat/spree,orenf/spree,TimurTarasenko/spree,ckk-scratch/solidus,softr8/spree,builtbybuffalo/spree,groundctrl/spree,reinaris/spree,vcavallo/spree,firman/spree,StemboltHQ/spree,Hawaiideveloper/shoppingcart,madetech/spree,vinsol/spree,TimurTarasenko/spree,progsri/spree,sunny2601/spree,lsirivong/solidus,softr8/spree,vinsol/spree,njerrywerry/spree,surfdome/spree,devilcoders/solidus,DarkoP/spree,forkata/solidus,shaywood2/spree,assembledbrands/spree,vcavallo/spree,xuewenfei/solidus,DynamoMTL/spree,pervino/solidus,RatioClothing/spree,lyzxsc/spree,groundctrl/spree,rajeevriitm/spree,Hawaiideveloper/shoppingcart,lsirivong/spree,brchristian/spree,shaywood2/spree,TrialGuides/spree,vulk/spree,carlesjove/spree,archSeer/spree,woboinc/spree,raow/spree,firman/spree,jeffboulet/spree,robodisco/spree,maybii/spree,odk211/spree,Machpowersystems/spree_mach,joanblake/spree,JuandGirald/spree,siddharth28/spree,reinaris/spree,vinsol/spree,welitonfreitas/spree,priyank-gupta/spree,omarsar/spree,karlitxo/spree,gautamsawhney/spree,vulk/spree,surfdome/spree,gautamsawhney/spree,Migweld/spree,jparr/spree,StemboltHQ/spree,yushine/spree,mindvolt/spree,sideci-sample/sideci-sample-spree,Hawaiideveloper/shoppingcart,ayb/spree,orenf/spree,Ropeney/spree,sliaquat/spree,alvinjean/spree,lsirivong/spree,JDutil/spree,TimurTarasenko/spree,edgward/spree,grzlus/solidus,Hates/spree,freerunningtech/spree,Lostmyname/spree,bjornlinder/Spree,bonobos/solidus,Senjai/solidus,groundctrl/spree,hoanghiep90/spree,Hates/spree,derekluo/spree,fahidnasir/spree,net2b/spree,trigrass2/spree,LBRapid/spree,maybii/spree,gregoryrikson/spree-sample,dandanwei/spree,progsri/spree,alejandromangione/spree,SadTreeFriends/spree,DarkoP/spree,tailic/spree,pervino/spree,StemboltHQ/spree,archSeer/spree,useiichi/spree,tesserakt/clean_spree,knuepwebdev/FloatTubeRodHolders,NerdsvilleCEO/spree,devilcoders/solidus,priyank-gupta/spree,ckk-scratch/solidus,dafontaine/spree,dandanwei/spree,cutefrank/spree,sideci-sample/sideci-sample-spree,hifly/spree,Senjai/spree,PhoenixTeam/spree_phoenix,shekibobo/spree,fahidnasir/spree,pulkit21/spree,bjornlinder/Spree,dafontaine/spree,jaspreet21anand/spree,quentinuys/spree,ayb/spree,berkes/spree,thogg4/spree,vinsol/spree,radarseesradar/spree,imella/spree,jspizziri/spree,cutefrank/spree,madetech/spree,grzlus/spree,watg/spree,jeffboulet/spree,gautamsawhney/spree,jordan-brough/spree,volpejoaquin/spree,nooysters/spree,berkes/spree,RatioClothing/spree,hifly/spree,berkes/spree,zamiang/spree,berkes/spree,jimblesm/spree,jimblesm/spree,Engeltj/spree,madetech/spree,thogg4/spree,Engeltj/spree,rakibulislam/spree,sfcgeorge/spree,JuandGirald/spree,locomotivapro/spree,rakibulislam/spree,mleglise/spree,hoanghiep90/spree,shaywood2/spree,nooysters/spree,NerdsvilleCEO/spree,quentinuys/spree,alvinjean/spree,groundctrl/spree,shekibobo/spree,camelmasa/spree,keatonrow/spree,Boomkat/spree,zaeznet/spree,CJMrozek/spree,mindvolt/spree,cutefrank/spree,moneyspyder/spree,tomash/spree,edgward/spree,nooysters/spree,project-eutopia/spree,APohio/spree,vmatekole/spree,rbngzlv/spree,rbngzlv/spree,brchristian/spree,camelmasa/spree,project-eutopia/spree,priyank-gupta/spree,raow/spree,ahmetabdi/spree,FadliKun/spree,nooysters/spree,dandanwei/spree,ujai/spree,cutefrank/spree,jparr/spree,NerdsvilleCEO/spree,rbngzlv/spree,abhishekjain16/spree,vcavallo/spree,miyazawatomoka/spree,devilcoders/solidus,Lostmyname/spree,athal7/solidus,odk211/spree,reinaris/spree,radarseesradar/spree,zamiang/spree,reinaris/spree,net2b/spree,maybii/spree,CiscoCloud/spree,yiqing95/spree,vinayvinsol/spree,shaywood2/spree,tomash/spree,Mayvenn/spree,Engeltj/spree,calvinl/spree,mindvolt/spree,jspizziri/spree,ramkumar-kr/spree,abhishekjain16/spree,firman/spree,jasonfb/spree,sfcgeorge/spree,softr8/spree,grzlus/spree,bonobos/solidus,beni55/spree,reidblomquist/spree,caiqinghua/spree,tancnle/spree,TrialGuides/spree,athal7/solidus,edgward/spree,yushine/spree,firman/spree,tomash/spree,sunny2601/spree,beni55/spree,tesserakt/clean_spree,ahmetabdi/spree,keatonrow/spree,jordan-brough/spree,calvinl/spree,ujai/spree,Engeltj/spree,welitonfreitas/spree,PhoenixTeam/spree_phoenix,omarsar/spree,ramkumar-kr/spree,miyazawatomoka/spree,jimblesm/spree,scottcrawford03/solidus,tailic/spree,rajeevriitm/spree,jimblesm/spree,SadTreeFriends/spree,quentinuys/spree,delphsoft/spree-store-ballchair,karlitxo/spree,gregoryrikson/spree-sample,dotandbo/spree,SadTreeFriends/spree,useiichi/spree,DynamoMTL/spree,agient/agientstorefront,forkata/solidus,keatonrow/spree,locomotivapro/spree,FadliKun/spree,Senjai/spree,pervino/spree,bricesanchez/spree,yomishra/pce,derekluo/spree,volpejoaquin/spree,madetech/spree,useiichi/spree,lsirivong/spree,pulkit21/spree,vinayvinsol/spree,derekluo/spree,gautamsawhney/spree,azclick/spree,Mayvenn/spree,agient/agientstorefront,odk211/spree,sliaquat/spree,yiqing95/spree,xuewenfei/solidus,sunny2601/spree,agient/agientstorefront,lyzxsc/spree
html+erb
## Code Before: <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <%= csrf_meta_tags %> <title> <% if content_for? :page_title %> <%= yield :page_title %> <% else %> <%= "Spree #{Spree.t('administration')}: " %> <%= Spree.t(controller.controller_name, :default => controller.controller_name.titleize) %> <% end %> </title> <!-- Get "Open Sans" font from Google --> <link href='//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600&subset=latin,cyrillic,greek,vietnamese' rel='stylesheet' type='text/css'> <%= stylesheet_link_tag 'spree/backend' %> <%= javascript_include_tag 'spree/backend' %> <%= render "spree/admin/shared/translations" %> <%= render "spree/admin/shared/routes" %> <%= javascript_tag do -%> jQuery.alerts.dialogClass = 'spree'; <%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" %> <% end -%> <%= yield :head %> ## Instruction: Call shared/_head title content_for 'title', becuase 'page_title' is already taken ## Code After: <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <%= csrf_meta_tags %> <title> <% if content_for? :title %> <%= yield :title %> <% else %> <%= "Spree #{Spree.t('administration')}: " %> <%= Spree.t(controller.controller_name, :default => controller.controller_name.titleize) %> <% end %> </title> <!-- Get "Open Sans" font from Google --> <link href='//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600&subset=latin,cyrillic,greek,vietnamese' rel='stylesheet' type='text/css'> <%= stylesheet_link_tag 'spree/backend' %> <%= javascript_include_tag 'spree/backend' %> <%= render "spree/admin/shared/translations" %> <%= render "spree/admin/shared/routes" %> <%= javascript_tag do -%> jQuery.alerts.dialogClass = 'spree'; <%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" %> <% end -%> <%= yield :head %>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" /> <%= csrf_meta_tags %> <title> - <% if content_for? :page_title %> ? ----- + <% if content_for? :title %> - <%= yield :page_title %> ? ----- + <%= yield :title %> <% else %> <%= "Spree #{Spree.t('administration')}: " %> <%= Spree.t(controller.controller_name, :default => controller.controller_name.titleize) %> <% end %> </title> <!-- Get "Open Sans" font from Google --> <link href='//fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600&subset=latin,cyrillic,greek,vietnamese' rel='stylesheet' type='text/css'> <%= stylesheet_link_tag 'spree/backend' %> <%= javascript_include_tag 'spree/backend' %> <%= render "spree/admin/shared/translations" %> <%= render "spree/admin/shared/routes" %> <%= javascript_tag do -%> jQuery.alerts.dialogClass = 'spree'; <%== "var AUTH_TOKEN = #{form_authenticity_token.inspect};" %> <% end -%> <%= yield :head %>
4
0.137931
2
2
f845bcd561d3fdb9f7f7b8e6424454e93785b106
bigsequence/bigsequentialrender_test.go
bigsequence/bigsequentialrender_test.go
package bigsequence import ( "testing" "github.com/johnny-morrice/godelbrot/base" "github.com/johnny-morrice/godelbrot/bigbase" ) func TestBigMandelbrotSequence(t *testing.T) { const prec = 53 const iterLimit = 10 app := &bigbase.MockRenderApplication{ MockRenderApplication: base.MockRenderApplication{ Base: base.BaseConfig{ DivergeLimit: 4.0, }, PictureWidth: 10, PictureHeight: 10, }, } app.UserMin = bigbase.MakeBigComplex(0.0, 0.0, prec) app.UserMax = bigbase.MakeBigComplex(10.0, 10.0, prec) numerics := Make(app) out := numerics.Sequence() const expectedCount = 100 actualArea := numerics.Area() if expectedCount != actualArea { t.Error("Expected area of", expectedCount, "but received", actualArea) } members := make([]base.PixelMember, actualArea) i := 0 for point := range out { members[i] = point i++ } actualCount := len(members) if expectedCount != actualCount { t.Error("Expected", expectedCount, "members but there were", actualCount) } }
package bigsequence import ( "testing" "github.com/johnny-morrice/godelbrot/base" "github.com/johnny-morrice/godelbrot/bigbase" ) func TestBigMandelbrotSequence(t *testing.T) { const prec = 53 const iterLimit = 10 app := &bigbase.MockRenderApplication{ MockRenderApplication: base.MockRenderApplication{ Base: base.BaseConfig{ DivergeLimit: 4.0, }, PictureWidth: 10, PictureHeight: 10, }, } app.UserMin = bigbase.MakeBigComplex(0.0, 0.0, prec) app.UserMax = bigbase.MakeBigComplex(10.0, 10.0, prec) numerics := Make(app) out := numerics.Sequence() const expectedCount = 100 actualCount := len(out) if expectedCount != actualCount { t.Error("Expected", expectedCount, "members but there were", actualCount) } }
Fix failing unit tests for bigsequence
Fix failing unit tests for bigsequence
Go
mit
johnny-morrice/godelbrot
go
## Code Before: package bigsequence import ( "testing" "github.com/johnny-morrice/godelbrot/base" "github.com/johnny-morrice/godelbrot/bigbase" ) func TestBigMandelbrotSequence(t *testing.T) { const prec = 53 const iterLimit = 10 app := &bigbase.MockRenderApplication{ MockRenderApplication: base.MockRenderApplication{ Base: base.BaseConfig{ DivergeLimit: 4.0, }, PictureWidth: 10, PictureHeight: 10, }, } app.UserMin = bigbase.MakeBigComplex(0.0, 0.0, prec) app.UserMax = bigbase.MakeBigComplex(10.0, 10.0, prec) numerics := Make(app) out := numerics.Sequence() const expectedCount = 100 actualArea := numerics.Area() if expectedCount != actualArea { t.Error("Expected area of", expectedCount, "but received", actualArea) } members := make([]base.PixelMember, actualArea) i := 0 for point := range out { members[i] = point i++ } actualCount := len(members) if expectedCount != actualCount { t.Error("Expected", expectedCount, "members but there were", actualCount) } } ## Instruction: Fix failing unit tests for bigsequence ## Code After: package bigsequence import ( "testing" "github.com/johnny-morrice/godelbrot/base" "github.com/johnny-morrice/godelbrot/bigbase" ) func TestBigMandelbrotSequence(t *testing.T) { const prec = 53 const iterLimit = 10 app := &bigbase.MockRenderApplication{ MockRenderApplication: base.MockRenderApplication{ Base: base.BaseConfig{ DivergeLimit: 4.0, }, PictureWidth: 10, PictureHeight: 10, }, } app.UserMin = bigbase.MakeBigComplex(0.0, 0.0, prec) app.UserMax = bigbase.MakeBigComplex(10.0, 10.0, prec) numerics := Make(app) out := numerics.Sequence() const expectedCount = 100 actualCount := len(out) if expectedCount != actualCount { t.Error("Expected", expectedCount, "members but there were", actualCount) } }
package bigsequence import ( "testing" "github.com/johnny-morrice/godelbrot/base" "github.com/johnny-morrice/godelbrot/bigbase" ) func TestBigMandelbrotSequence(t *testing.T) { const prec = 53 const iterLimit = 10 app := &bigbase.MockRenderApplication{ MockRenderApplication: base.MockRenderApplication{ Base: base.BaseConfig{ DivergeLimit: 4.0, }, PictureWidth: 10, PictureHeight: 10, }, } app.UserMin = bigbase.MakeBigComplex(0.0, 0.0, prec) app.UserMax = bigbase.MakeBigComplex(10.0, 10.0, prec) numerics := Make(app) out := numerics.Sequence() const expectedCount = 100 - actualArea := numerics.Area() - - if expectedCount != actualArea { - t.Error("Expected area of", expectedCount, - "but received", actualArea) - } - - members := make([]base.PixelMember, actualArea) - - i := 0 - for point := range out { - members[i] = point - i++ - } - actualCount := len(members) ? ^^^^^^^ + actualCount := len(out) ? ^^^ if expectedCount != actualCount { t.Error("Expected", expectedCount, "members but there were", actualCount) } }
16
0.340426
1
15
7f6c75a06ac4ce3ab889dbe62b1a84e1e30512d4
src/RabbitMQ/Management/Entity/Exchange.php
src/RabbitMQ/Management/Entity/Exchange.php
<?php namespace RabbitMQ\Management\Entity; class Exchange extends AbstractEntity { public $name; public $vhost; public $type; public $durable = false; public $auto_delete = false; public $internal = false; public $arguments = array(); protected function getJsonParameters() { return array('type', 'auto_delete', 'durable', 'internal', 'arguments', 'vhost', 'name'); } }
<?php namespace RabbitMQ\Management\Entity; class Exchange extends AbstractEntity { public $name; public $vhost; public $type; public $incoming; public $message_stats_in; public $durable = false; public $auto_delete = false; public $internal = false; public $arguments = array(); protected function getJsonParameters() { return array('type', 'auto_delete', 'durable', 'internal', 'arguments', 'vhost', 'name'); } }
Update to rabbitMQ 3 informations
Update to rabbitMQ 3 informations
PHP
mit
alchemy-fr/RabbitMQ-Management-API-Client,robsen77/RabbitMQ-Management-API-Client
php
## Code Before: <?php namespace RabbitMQ\Management\Entity; class Exchange extends AbstractEntity { public $name; public $vhost; public $type; public $durable = false; public $auto_delete = false; public $internal = false; public $arguments = array(); protected function getJsonParameters() { return array('type', 'auto_delete', 'durable', 'internal', 'arguments', 'vhost', 'name'); } } ## Instruction: Update to rabbitMQ 3 informations ## Code After: <?php namespace RabbitMQ\Management\Entity; class Exchange extends AbstractEntity { public $name; public $vhost; public $type; public $incoming; public $message_stats_in; public $durable = false; public $auto_delete = false; public $internal = false; public $arguments = array(); protected function getJsonParameters() { return array('type', 'auto_delete', 'durable', 'internal', 'arguments', 'vhost', 'name'); } }
<?php namespace RabbitMQ\Management\Entity; class Exchange extends AbstractEntity { public $name; public $vhost; public $type; + public $incoming; + public $message_stats_in; public $durable = false; public $auto_delete = false; public $internal = false; public $arguments = array(); protected function getJsonParameters() { return array('type', 'auto_delete', 'durable', 'internal', 'arguments', 'vhost', 'name'); } }
2
0.105263
2
0
d53152aedff7777be771124a91ba325f75398739
test.py
test.py
from theora import Ogg from numpy import concatenate, zeros_like from scipy.misc import toimage f = open("video.ogv") o = Ogg(f) Y, Cb, Cr = o.test() Cb2 = zeros_like(Y) for i in range(Cb2.shape[0]): for j in range(Cb2.shape[1]): Cb2[i, j] = Cb[i/2, j/2] Cr2 = zeros_like(Y) for i in range(Cr2.shape[0]): for j in range(Cr2.shape[1]): Cr2[i, j] = Cr[i/2, j/2] w, h = Y.shape Y = Y.reshape((1, w, h)) Cb = Cb2.reshape((1, w, h)) Cr = Cr2.reshape((1, w, h)) A = concatenate((Y, Cb, Cr)) img = toimage(A, mode="YCbCr", channel_axis=0) print img from pylab import imshow, show from matplotlib import cm imshow(img, origin="lower") show()
from theora import Ogg from numpy import concatenate, zeros_like from scipy.misc import toimage f = open("video.ogv") o = Ogg(f) Y, Cb, Cr = o.test() Cb2 = zeros_like(Y) for i in range(Cb2.shape[0]): for j in range(Cb2.shape[1]): Cb2[i, j] = Cb[i/2, j/2] Cr2 = zeros_like(Y) for i in range(Cr2.shape[0]): for j in range(Cr2.shape[1]): Cr2[i, j] = Cr[i/2, j/2] w, h = Y.shape Y = Y.reshape((1, w, h)) Cb = Cb2.reshape((1, w, h)) Cr = Cr2.reshape((1, w, h)) A = concatenate((Y, Cb, Cr)) img = toimage(A, mode="YCbCr", channel_axis=0) img.convert("RGB").save("frame.png") from pylab import imshow, show from matplotlib import cm imshow(img, origin="lower") show()
Save the image to png
Save the image to png
Python
bsd-3-clause
certik/python-theora,certik/python-theora
python
## Code Before: from theora import Ogg from numpy import concatenate, zeros_like from scipy.misc import toimage f = open("video.ogv") o = Ogg(f) Y, Cb, Cr = o.test() Cb2 = zeros_like(Y) for i in range(Cb2.shape[0]): for j in range(Cb2.shape[1]): Cb2[i, j] = Cb[i/2, j/2] Cr2 = zeros_like(Y) for i in range(Cr2.shape[0]): for j in range(Cr2.shape[1]): Cr2[i, j] = Cr[i/2, j/2] w, h = Y.shape Y = Y.reshape((1, w, h)) Cb = Cb2.reshape((1, w, h)) Cr = Cr2.reshape((1, w, h)) A = concatenate((Y, Cb, Cr)) img = toimage(A, mode="YCbCr", channel_axis=0) print img from pylab import imshow, show from matplotlib import cm imshow(img, origin="lower") show() ## Instruction: Save the image to png ## Code After: from theora import Ogg from numpy import concatenate, zeros_like from scipy.misc import toimage f = open("video.ogv") o = Ogg(f) Y, Cb, Cr = o.test() Cb2 = zeros_like(Y) for i in range(Cb2.shape[0]): for j in range(Cb2.shape[1]): Cb2[i, j] = Cb[i/2, j/2] Cr2 = zeros_like(Y) for i in range(Cr2.shape[0]): for j in range(Cr2.shape[1]): Cr2[i, j] = Cr[i/2, j/2] w, h = Y.shape Y = Y.reshape((1, w, h)) Cb = Cb2.reshape((1, w, h)) Cr = Cr2.reshape((1, w, h)) A = concatenate((Y, Cb, Cr)) img = toimage(A, mode="YCbCr", channel_axis=0) img.convert("RGB").save("frame.png") from pylab import imshow, show from matplotlib import cm imshow(img, origin="lower") show()
from theora import Ogg from numpy import concatenate, zeros_like from scipy.misc import toimage f = open("video.ogv") o = Ogg(f) Y, Cb, Cr = o.test() Cb2 = zeros_like(Y) for i in range(Cb2.shape[0]): for j in range(Cb2.shape[1]): Cb2[i, j] = Cb[i/2, j/2] Cr2 = zeros_like(Y) for i in range(Cr2.shape[0]): for j in range(Cr2.shape[1]): Cr2[i, j] = Cr[i/2, j/2] w, h = Y.shape Y = Y.reshape((1, w, h)) Cb = Cb2.reshape((1, w, h)) Cr = Cr2.reshape((1, w, h)) A = concatenate((Y, Cb, Cr)) img = toimage(A, mode="YCbCr", channel_axis=0) - print img + img.convert("RGB").save("frame.png") from pylab import imshow, show from matplotlib import cm imshow(img, origin="lower") show()
2
0.068966
1
1
50766407f5a021bc300ec91984364e86f1baf2b4
appveyor.yml
appveyor.yml
environment: nodejs_version: "0.10" install: - ps: Install-Product node $env:nodejs_version - npm install - npm install -g grunt-cli test_script: - node --version - npm --version - grunt --version - grunt build: off
environment: matrix: - nodejs_version: "0.10" - nodejs_version: "0.12" install: - ps: Install-Product node $env:nodejs_version - npm install - npm install -g grunt-cli test_script: - node --version - npm --version - grunt --version - grunt build: off
Use node 0.12 in AppVeyor
Use node 0.12 in AppVeyor
YAML
apache-2.0
GabiGrin/tslint,prendradjaja/tslint,weswigham/tslint,marekszala/tslint,pocke/tslint,pspeter3/tslint,RyanCavanaugh/tslint,GabiGrin/tslint,bolatovumar/tslint,aciccarello/tslint,RyanCavanaugh/tslint,spirosikmd/tslint,aciccarello/tslint,JoshuaKGoldberg/tslint,pocke/tslint,prendradjaja/tslint,ScottSWu/tslint,andy-ms/tslint,spirosikmd/tslint,nchen63/tslint,Kuniwak/tslint,weswigham/tslint,YuichiNukiyama/tslint,YuichiNukiyama/tslint,aciccarello/tslint,nchen63/tslint,spirosikmd/tslint,RyanCavanaugh/tslint,berickson1/tslint,ScottSWu/tslint,GabiGrin/tslint,andy-ms/tslint,palantir/tslint,Kuniwak/tslint,YuichiNukiyama/tslint,nikklassen/tslint,IllusionMH/tslint,weswigham/tslint,vmmitev/tslint,nchen63/tslint,IllusionMH/tslint,andy-hanson/tslint,JoshuaKGoldberg/tslint,vmmitev/tslint,Pajn/tslint,Pajn/tslint,prendradjaja/tslint,JoshuaKGoldberg/tslint,Pajn/tslint,mprobst/tslint,berickson1/tslint,palantir/tslint,nikklassen/tslint,berickson1/tslint,ScottSWu/tslint,pocke/tslint,andy-hanson/tslint,palantir/tslint,pspeter3/tslint,bolatovumar/tslint,andy-hanson/tslint,pspeter3/tslint,marekszala/tslint,mprobst/tslint,bolatovumar/tslint,marekszala/tslint,andy-ms/tslint,Kuniwak/tslint,IllusionMH/tslint,mprobst/tslint,nikklassen/tslint,vmmitev/tslint
yaml
## Code Before: environment: nodejs_version: "0.10" install: - ps: Install-Product node $env:nodejs_version - npm install - npm install -g grunt-cli test_script: - node --version - npm --version - grunt --version - grunt build: off ## Instruction: Use node 0.12 in AppVeyor ## Code After: environment: matrix: - nodejs_version: "0.10" - nodejs_version: "0.12" install: - ps: Install-Product node $env:nodejs_version - npm install - npm install -g grunt-cli test_script: - node --version - npm --version - grunt --version - grunt build: off
environment: + matrix: - nodejs_version: "0.10" + - nodejs_version: "0.10" ? ++ + - nodejs_version: "0.12" install: - ps: Install-Product node $env:nodejs_version - npm install - npm install -g grunt-cli test_script: - node --version - npm --version - grunt --version - grunt build: off
4
0.266667
3
1
4e1124d7c68bc85cc6b6f1adceb63034d4bfe812
src/REvent.h
src/REvent.h
class REvent { public: REvent(); virtual ~REvent(); void accept(); void ignore(); bool isAccepted() const; void setAccepted(bool accepted); virtual rcount type() const; static rcount registerEventType(); private: bool mIsAccepted; }; /** * An easy wrapper template for generate type() method and provide auto * registered static type variable. So that you could focus on the * implementation of event class. */ template <class DerivedType, class BaseType> class TypeRegisteredEvent : public BaseType { public: rcount type() const { return sType; } static inline rcount staticType() { return sType; } private: static const rcount sType; }; template <class DerivedType, class BaseType> const rcount TypeRegisteredEvent<DerivedType, BaseType>::sType = REvent::registerEventType(); #endif // __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C
class REvent { public: REvent(); virtual ~REvent(); void accept(); void ignore(); bool isAccepted() const; void setAccepted(bool accepted); virtual rcount type() const; static rcount registerEventType(); private: bool mIsAccepted; }; /** * An easy wrapper template for generate type() method and provide auto * registered static type variable. So that you could focus on the * implementation of event class. */ template <class DerivedType, class BaseType = REvent> class TypeRegisteredEvent : public BaseType { public: // Inherit all constructors template <class ... ParamTypes> TypeRegisteredEvent(ParamTypes ... params) : BaseType(params ...) { } rcount type() const { return sType; } static inline rcount staticType() { return sType; } private: static const rcount sType; }; template <class DerivedType, class BaseType> const rcount TypeRegisteredEvent<DerivedType, BaseType>::sType = REvent::registerEventType(); #endif // __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C
Support inhert constructors from BaseType
Support inhert constructors from BaseType
C
mit
starofrainnight/ArduinoRabirdTookit,starofrainnight/ArduinoRabirdToolkit,starofrainnight/ArduinoRabirdToolkit
c
## Code Before: class REvent { public: REvent(); virtual ~REvent(); void accept(); void ignore(); bool isAccepted() const; void setAccepted(bool accepted); virtual rcount type() const; static rcount registerEventType(); private: bool mIsAccepted; }; /** * An easy wrapper template for generate type() method and provide auto * registered static type variable. So that you could focus on the * implementation of event class. */ template <class DerivedType, class BaseType> class TypeRegisteredEvent : public BaseType { public: rcount type() const { return sType; } static inline rcount staticType() { return sType; } private: static const rcount sType; }; template <class DerivedType, class BaseType> const rcount TypeRegisteredEvent<DerivedType, BaseType>::sType = REvent::registerEventType(); #endif // __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C ## Instruction: Support inhert constructors from BaseType ## Code After: class REvent { public: REvent(); virtual ~REvent(); void accept(); void ignore(); bool isAccepted() const; void setAccepted(bool accepted); virtual rcount type() const; static rcount registerEventType(); private: bool mIsAccepted; }; /** * An easy wrapper template for generate type() method and provide auto * registered static type variable. So that you could focus on the * implementation of event class. */ template <class DerivedType, class BaseType = REvent> class TypeRegisteredEvent : public BaseType { public: // Inherit all constructors template <class ... ParamTypes> TypeRegisteredEvent(ParamTypes ... params) : BaseType(params ...) { } rcount type() const { return sType; } static inline rcount staticType() { return sType; } private: static const rcount sType; }; template <class DerivedType, class BaseType> const rcount TypeRegisteredEvent<DerivedType, BaseType>::sType = REvent::registerEventType(); #endif // __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C
class REvent { public: REvent(); virtual ~REvent(); void accept(); void ignore(); bool isAccepted() const; void setAccepted(bool accepted); virtual rcount type() const; static rcount registerEventType(); private: bool mIsAccepted; }; /** * An easy wrapper template for generate type() method and provide auto * registered static type variable. So that you could focus on the * implementation of event class. */ - template <class DerivedType, class BaseType> + template <class DerivedType, class BaseType = REvent> ? +++++++++ class TypeRegisteredEvent : public BaseType { public: + // Inherit all constructors + template <class ... ParamTypes> + TypeRegisteredEvent(ParamTypes ... params) + : BaseType(params ...) + { + } + rcount type() const { return sType; } static inline rcount staticType() { return sType; } private: static const rcount sType; }; template <class DerivedType, class BaseType> const rcount TypeRegisteredEvent<DerivedType, BaseType>::sType = REvent::registerEventType(); #endif // __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C
9
0.15
8
1
b929573e051f84ecc15020889fde6f6d798daa18
pmxbot/__init__.py
pmxbot/__init__.py
from __future__ import absolute_import import socket import logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, password = None, silent_bot = False, log_channels = [], other_channels = [], places = ['London', 'Tokyo', 'New York'], feed_interval = 15, # minutes feeds = [dict( name = 'pmxbot bitbucket', channel = '#inane', linkurl = 'http://bitbucket.org/yougov/pmxbot', url = 'http://bitbucket.org/yougov/pmxbot', ), ], librarypaste = 'http://paste.jaraco.com', ) config['logs URL'] = 'http://' + socket.getfqdn() config['log level'] = logging.INFO "The config object"
from __future__ import absolute_import import socket import logging as _logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, password = None, silent_bot = False, log_channels = [], other_channels = [], places = ['London', 'Tokyo', 'New York'], feed_interval = 15, # minutes feeds = [dict( name = 'pmxbot bitbucket', channel = '#inane', linkurl = 'http://bitbucket.org/yougov/pmxbot', url = 'http://bitbucket.org/yougov/pmxbot', ), ], librarypaste = 'http://paste.jaraco.com', ) config['logs URL'] = 'http://' + socket.getfqdn() config['log level'] = _logging.INFO "The config object"
Fix issue with conflated pmxbot.logging
Fix issue with conflated pmxbot.logging
Python
mit
yougov/pmxbot,yougov/pmxbot,yougov/pmxbot
python
## Code Before: from __future__ import absolute_import import socket import logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, password = None, silent_bot = False, log_channels = [], other_channels = [], places = ['London', 'Tokyo', 'New York'], feed_interval = 15, # minutes feeds = [dict( name = 'pmxbot bitbucket', channel = '#inane', linkurl = 'http://bitbucket.org/yougov/pmxbot', url = 'http://bitbucket.org/yougov/pmxbot', ), ], librarypaste = 'http://paste.jaraco.com', ) config['logs URL'] = 'http://' + socket.getfqdn() config['log level'] = logging.INFO "The config object" ## Instruction: Fix issue with conflated pmxbot.logging ## Code After: from __future__ import absolute_import import socket import logging as _logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, password = None, silent_bot = False, log_channels = [], other_channels = [], places = ['London', 'Tokyo', 'New York'], feed_interval = 15, # minutes feeds = [dict( name = 'pmxbot bitbucket', channel = '#inane', linkurl = 'http://bitbucket.org/yougov/pmxbot', url = 'http://bitbucket.org/yougov/pmxbot', ), ], librarypaste = 'http://paste.jaraco.com', ) config['logs URL'] = 'http://' + socket.getfqdn() config['log level'] = _logging.INFO "The config object"
from __future__ import absolute_import import socket - import logging + import logging as _logging from .dictlib import ConfigDict config = ConfigDict( bot_nickname = 'pmxbot', database = 'sqlite:pmxbot.sqlite', server_host = 'localhost', server_port = 6667, use_ssl = False, password = None, silent_bot = False, log_channels = [], other_channels = [], places = ['London', 'Tokyo', 'New York'], feed_interval = 15, # minutes feeds = [dict( name = 'pmxbot bitbucket', channel = '#inane', linkurl = 'http://bitbucket.org/yougov/pmxbot', url = 'http://bitbucket.org/yougov/pmxbot', ), ], librarypaste = 'http://paste.jaraco.com', ) config['logs URL'] = 'http://' + socket.getfqdn() - config['log level'] = logging.INFO + config['log level'] = _logging.INFO ? + "The config object"
4
0.121212
2
2
0c75c636cc30c15fedfce4b3481fa50504d5434c
tox.ini
tox.ini
[tox] minversion = 1.8 envlist = py{27}-ansible{21,22,23} skipsdist = True [testenv] passenv = * whitelist_externals = echo pwd deps = -rrequirements.txt ansible21: ansible==2.1.3.0 ansible22: ansible==2.2.2.0 ansible23: ansible==2.3.0.0 commands = molecule test
[tox] minversion = 1.8 envlist = py{27}-ansible{22,23} skipsdist = True [testenv] passenv = * whitelist_externals = echo pwd deps = -rrequirements.txt ansible22: ansible==2.2.2.0 ansible23: ansible==2.3.0.0 commands = molecule test
Drop support for ansible 2.1 series
Drop support for ansible 2.1 series During the make over of the certificate role and the subsequent splitting of roles, the usage of include_role what needed. This module was introduced in ansible 2.2 and thus support for earlier version has dropped.
INI
apache-2.0
venekamp/nowfap-portal
ini
## Code Before: [tox] minversion = 1.8 envlist = py{27}-ansible{21,22,23} skipsdist = True [testenv] passenv = * whitelist_externals = echo pwd deps = -rrequirements.txt ansible21: ansible==2.1.3.0 ansible22: ansible==2.2.2.0 ansible23: ansible==2.3.0.0 commands = molecule test ## Instruction: Drop support for ansible 2.1 series During the make over of the certificate role and the subsequent splitting of roles, the usage of include_role what needed. This module was introduced in ansible 2.2 and thus support for earlier version has dropped. ## Code After: [tox] minversion = 1.8 envlist = py{27}-ansible{22,23} skipsdist = True [testenv] passenv = * whitelist_externals = echo pwd deps = -rrequirements.txt ansible22: ansible==2.2.2.0 ansible23: ansible==2.3.0.0 commands = molecule test
[tox] minversion = 1.8 - envlist = py{27}-ansible{21,22,23} ? --- + envlist = py{27}-ansible{22,23} skipsdist = True [testenv] passenv = * whitelist_externals = echo pwd deps = -rrequirements.txt - ansible21: ansible==2.1.3.0 ansible22: ansible==2.2.2.0 ansible23: ansible==2.3.0.0 commands = molecule test
3
0.176471
1
2
cb0c15b496c02143dd3ee924f4bec2fd78e0fdeb
README.md
README.md
[![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.spunkybot.de) This repository is the documentation counterpart of the [Spunky Bot](https://github.com/SpunkyBot/spunkybot) repository. Spunky Bot is a free game server administration bot and RCON tool for Urban Terror. If you want to know more, this is a list of selected starting points: * Introduction to [Spunky Bot](https://spunkybot.de) * The full list of [commands](https://github.com/SpunkyBot/spunkybot/blob/master/doc/Commands.md) * There is much more inside the [official documentation](https://docs.spunkybot.de)
[![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.spunkybot.de) This repository is the documentation counterpart of the [Spunky Bot](https://github.com/SpunkyBot/spunkybot) repository. Spunky Bot is a free game server administration bot and RCON tool for Urban Terror. If you want to know more, this is a list of selected starting points: * Introduction to [Spunky Bot](https://spunkybot.de) * The full list of [commands](https://spunkybot.de/docs/commands) * There is much more inside the [official documentation](https://docs.spunkybot.de)
Change link of full list of all commands
Change link of full list of all commands
Markdown
mit
SpunkyBot/spunkybot-docs
markdown
## Code Before: [![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.spunkybot.de) This repository is the documentation counterpart of the [Spunky Bot](https://github.com/SpunkyBot/spunkybot) repository. Spunky Bot is a free game server administration bot and RCON tool for Urban Terror. If you want to know more, this is a list of selected starting points: * Introduction to [Spunky Bot](https://spunkybot.de) * The full list of [commands](https://github.com/SpunkyBot/spunkybot/blob/master/doc/Commands.md) * There is much more inside the [official documentation](https://docs.spunkybot.de) ## Instruction: Change link of full list of all commands ## Code After: [![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.spunkybot.de) This repository is the documentation counterpart of the [Spunky Bot](https://github.com/SpunkyBot/spunkybot) repository. Spunky Bot is a free game server administration bot and RCON tool for Urban Terror. If you want to know more, this is a list of selected starting points: * Introduction to [Spunky Bot](https://spunkybot.de) * The full list of [commands](https://spunkybot.de/docs/commands) * There is much more inside the [official documentation](https://docs.spunkybot.de)
[![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.spunkybot.de) This repository is the documentation counterpart of the [Spunky Bot](https://github.com/SpunkyBot/spunkybot) repository. Spunky Bot is a free game server administration bot and RCON tool for Urban Terror. If you want to know more, this is a list of selected starting points: * Introduction to [Spunky Bot](https://spunkybot.de) - * The full list of [commands](https://github.com/SpunkyBot/spunkybot/blob/master/doc/Commands.md) ? --------------------- ^^^^^^^^^^ - ^ --- + * The full list of [commands](https://spunkybot.de/docs/commands) ? ^^ + ^ * There is much more inside the [official documentation](https://docs.spunkybot.de)
2
0.166667
1
1
440684776432c5741a70e28016f550bbc669f865
.travis.yml
.travis.yml
sudo: false language: node_js node_js: - 6.14.0 # Cloud Functions Runtime - 9 - 10 notifications: email: # Only send notifications when travis status changes on_failure: change on_success: change cache: directories: - node_modules branches: only: - master deploy: skip_cleanup: true provider: npm email: $NPM_EMAIL api_key: $NPM_KEY on: node: '10' branch: 'master' script: - npm run lint - npm run test:cov after_success: - codeclimate-test-reporter < coverage/lcov.info - npm run codecov
sudo: false language: node_js node_js: - 6 # Maintenance - 8 # Active - 10 # Current release notifications: email: # Only send notifications when travis status changes on_failure: change on_success: change cache: bundler: true directories: - $HOME/.npm branches: only: - master - next script: - npm run lint - npm run test:cov after_success: - codeclimate-test-reporter < coverage/lcov.info - npm run codecov deploy: - provider: npm skip_cleanup: true email: $NPM_EMAIL api_key: $NPM_TOKEN on: node: '10' branch: 'master' - provider: npm skip_cleanup: true email: $NPM_EMAIL api_key: $NPM_TOKEN tag: next on: node: '10' branch: 'next'
Add publish to npm from next branch
Add publish to npm from next branch
YAML
mit
prescottprue/redux-firestore,prescottprue/redux-firestore
yaml
## Code Before: sudo: false language: node_js node_js: - 6.14.0 # Cloud Functions Runtime - 9 - 10 notifications: email: # Only send notifications when travis status changes on_failure: change on_success: change cache: directories: - node_modules branches: only: - master deploy: skip_cleanup: true provider: npm email: $NPM_EMAIL api_key: $NPM_KEY on: node: '10' branch: 'master' script: - npm run lint - npm run test:cov after_success: - codeclimate-test-reporter < coverage/lcov.info - npm run codecov ## Instruction: Add publish to npm from next branch ## Code After: sudo: false language: node_js node_js: - 6 # Maintenance - 8 # Active - 10 # Current release notifications: email: # Only send notifications when travis status changes on_failure: change on_success: change cache: bundler: true directories: - $HOME/.npm branches: only: - master - next script: - npm run lint - npm run test:cov after_success: - codeclimate-test-reporter < coverage/lcov.info - npm run codecov deploy: - provider: npm skip_cleanup: true email: $NPM_EMAIL api_key: $NPM_TOKEN on: node: '10' branch: 'master' - provider: npm skip_cleanup: true email: $NPM_EMAIL api_key: $NPM_TOKEN tag: next on: node: '10' branch: 'next'
sudo: false language: node_js node_js: - - 6.14.0 # Cloud Functions Runtime - - 9 - - 10 + - 6 # Maintenance + - 8 # Active + - 10 # Current release notifications: email: # Only send notifications when travis status changes on_failure: change on_success: change cache: + bundler: true directories: - - node_modules + - $HOME/.npm branches: only: - master + - next - - deploy: - skip_cleanup: true - provider: npm - email: $NPM_EMAIL - api_key: $NPM_KEY - on: - node: '10' - branch: 'master' script: - npm run lint - npm run test:cov after_success: - codeclimate-test-reporter < coverage/lcov.info - npm run codecov + + deploy: + - provider: npm + skip_cleanup: true + email: $NPM_EMAIL + api_key: $NPM_TOKEN + on: + node: '10' + branch: 'master' + - provider: npm + skip_cleanup: true + email: $NPM_EMAIL + api_key: $NPM_TOKEN + tag: next + on: + node: '10' + branch: 'next'
36
0.923077
23
13
5a4ca8cf24c42e422e1f8331c23d2ba2ed4d63b9
_posts/blog/2015-05-19-terminator-genisys-installation-at-the-carlton-cannes-2015.md
_posts/blog/2015-05-19-terminator-genisys-installation-at-the-carlton-cannes-2015.md
--- published: true title: "Terminator Genisys Installation at the Carlton -Cannes 2015" layout: article tags: - blog image: feature: 1024x256.gif teaser: 400x250.gif --- The 68th Cannes Film Festival got underway last week and, after months of hard work by many at Lick, Terminator Genysis dominated the sea front. We have worked with Paramount for a few years on this activity, but this campaign was the most varied in terms of different mediums used to help launch the blockbuster. The front of the Carlton was transformed by a huge 5m x 4m HD digital screen. We used the latest 6mm LED technology to ensure the highest fidelity possible, and were showing exclusive content produced for the event (which we can monitor directly from a webcam hidden in the undergrowth). Passersby could scan QR codes to view the latest trailer on YouTube (here’s the code if you want to get involved). In addition to the fantastic vinyl artwork on the porch, La Cote Restaurant and entrance floor, hotel guests were greeted by huge Terminator skulls with bespoke motion activated eyes, embedded behind duratrans, that shone down on them as they left the building. ![Terminator eye animation]({{site.baseurl}}/images/cannes-eye-web.gif)
--- published: true title: "Terminator Genisys Installation at the Carlton -Cannes 2015" layout: article tags: - blog image: feature: terminator-page-feature.jpg teaser: 400x250.gif --- The 68th Cannes Film Festival got underway last week and, after months of hard work by many at Lick, Terminator Genysis dominated the sea front. We have worked with Paramount for a few years on this activity, but this campaign was the most varied in terms of different mediums used to help launch the blockbuster. The front of the Carlton was transformed by a huge 5m x 4m HD digital screen. We used the latest 6mm LED technology to ensure the highest fidelity possible, and were showing exclusive content produced for the event (which we can monitor directly from a webcam hidden in the undergrowth). Passersby could scan QR codes to view the latest trailer on YouTube (here’s the code if you want to get involved). In addition to the fantastic vinyl artwork on the porch, La Cote Restaurant and entrance floor, hotel guests were greeted by huge Terminator skulls with bespoke motion activated eyes, embedded behind duratrans, that shone down on them as they left the building. ![Terminator eye animation]({{site.baseurl}}/images/cannes-eye-web.gif)
Add feature image to Cannes blog
Add feature image to Cannes blog
Markdown
mit
lickinnovation/lickinnovation.github.io,lickinnovation/lickinnovation.github.io,lickinnovation/lickinnovation.github.io
markdown
## Code Before: --- published: true title: "Terminator Genisys Installation at the Carlton -Cannes 2015" layout: article tags: - blog image: feature: 1024x256.gif teaser: 400x250.gif --- The 68th Cannes Film Festival got underway last week and, after months of hard work by many at Lick, Terminator Genysis dominated the sea front. We have worked with Paramount for a few years on this activity, but this campaign was the most varied in terms of different mediums used to help launch the blockbuster. The front of the Carlton was transformed by a huge 5m x 4m HD digital screen. We used the latest 6mm LED technology to ensure the highest fidelity possible, and were showing exclusive content produced for the event (which we can monitor directly from a webcam hidden in the undergrowth). Passersby could scan QR codes to view the latest trailer on YouTube (here’s the code if you want to get involved). In addition to the fantastic vinyl artwork on the porch, La Cote Restaurant and entrance floor, hotel guests were greeted by huge Terminator skulls with bespoke motion activated eyes, embedded behind duratrans, that shone down on them as they left the building. ![Terminator eye animation]({{site.baseurl}}/images/cannes-eye-web.gif) ## Instruction: Add feature image to Cannes blog ## Code After: --- published: true title: "Terminator Genisys Installation at the Carlton -Cannes 2015" layout: article tags: - blog image: feature: terminator-page-feature.jpg teaser: 400x250.gif --- The 68th Cannes Film Festival got underway last week and, after months of hard work by many at Lick, Terminator Genysis dominated the sea front. We have worked with Paramount for a few years on this activity, but this campaign was the most varied in terms of different mediums used to help launch the blockbuster. The front of the Carlton was transformed by a huge 5m x 4m HD digital screen. We used the latest 6mm LED technology to ensure the highest fidelity possible, and were showing exclusive content produced for the event (which we can monitor directly from a webcam hidden in the undergrowth). Passersby could scan QR codes to view the latest trailer on YouTube (here’s the code if you want to get involved). In addition to the fantastic vinyl artwork on the porch, La Cote Restaurant and entrance floor, hotel guests were greeted by huge Terminator skulls with bespoke motion activated eyes, embedded behind duratrans, that shone down on them as they left the building. ![Terminator eye animation]({{site.baseurl}}/images/cannes-eye-web.gif)
--- published: true title: "Terminator Genisys Installation at the Carlton -Cannes 2015" layout: article tags: - blog image: - feature: 1024x256.gif + feature: terminator-page-feature.jpg teaser: 400x250.gif --- The 68th Cannes Film Festival got underway last week and, after months of hard work by many at Lick, Terminator Genysis dominated the sea front. We have worked with Paramount for a few years on this activity, but this campaign was the most varied in terms of different mediums used to help launch the blockbuster. The front of the Carlton was transformed by a huge 5m x 4m HD digital screen. We used the latest 6mm LED technology to ensure the highest fidelity possible, and were showing exclusive content produced for the event (which we can monitor directly from a webcam hidden in the undergrowth). Passersby could scan QR codes to view the latest trailer on YouTube (here’s the code if you want to get involved). In addition to the fantastic vinyl artwork on the porch, La Cote Restaurant and entrance floor, hotel guests were greeted by huge Terminator skulls with bespoke motion activated eyes, embedded behind duratrans, that shone down on them as they left the building. ![Terminator eye animation]({{site.baseurl}}/images/cannes-eye-web.gif)
2
0.111111
1
1
ee37119a4f77eef5c8163936d982e178c42cbc00
src/adhocracy/lib/machine_name.py
src/adhocracy/lib/machine_name.py
import platform class IncludeMachineName(object): def __init__(self, app, config): self.app = app self.config = config def __call__(self, environ, start_response): def local_response(status, headers, exc_info=None): headers.append(('X-Server-Machine', platform.node())) start_response(status, headers, exc_info) return self.app(environ, local_response)
import os import platform class IncludeMachineName(object): def __init__(self, app, config): self.app = app self.config = config def __call__(self, environ, start_response): def local_response(status, headers, exc_info=None): machine_id = '%s:%s (PID %d)' % ( platform.node(), environ.get('SERVER_PORT'), os.getpid()) headers.append(('X-Server-Machine', machine_id)) start_response(status, headers, exc_info) return self.app(environ, local_response)
Add Server Port and PID to the X-Server-Machine header
Add Server Port and PID to the X-Server-Machine header Fixes hhucn/adhocracy.hhu_theme#429
Python
agpl-3.0
liqd/adhocracy,liqd/adhocracy,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,alkadis/vcv,liqd/adhocracy,alkadis/vcv,phihag/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,phihag/adhocracy,liqd/adhocracy,phihag/adhocracy,phihag/adhocracy,alkadis/vcv,phihag/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy
python
## Code Before: import platform class IncludeMachineName(object): def __init__(self, app, config): self.app = app self.config = config def __call__(self, environ, start_response): def local_response(status, headers, exc_info=None): headers.append(('X-Server-Machine', platform.node())) start_response(status, headers, exc_info) return self.app(environ, local_response) ## Instruction: Add Server Port and PID to the X-Server-Machine header Fixes hhucn/adhocracy.hhu_theme#429 ## Code After: import os import platform class IncludeMachineName(object): def __init__(self, app, config): self.app = app self.config = config def __call__(self, environ, start_response): def local_response(status, headers, exc_info=None): machine_id = '%s:%s (PID %d)' % ( platform.node(), environ.get('SERVER_PORT'), os.getpid()) headers.append(('X-Server-Machine', machine_id)) start_response(status, headers, exc_info) return self.app(environ, local_response)
+ import os import platform class IncludeMachineName(object): def __init__(self, app, config): self.app = app self.config = config def __call__(self, environ, start_response): def local_response(status, headers, exc_info=None): + machine_id = '%s:%s (PID %d)' % ( + platform.node(), environ.get('SERVER_PORT'), os.getpid()) - headers.append(('X-Server-Machine', platform.node())) ? ^^ ^^^^^^ ^ -- - + headers.append(('X-Server-Machine', machine_id)) ? ^ ^^^ ^^^ start_response(status, headers, exc_info) return self.app(environ, local_response)
5
0.333333
4
1
b08e7e82ed4065ee6207edf795ba2654e6309b5b
src/groovy/publicshame/SinEntryHelper.groovy
src/groovy/publicshame/SinEntryHelper.groovy
package publicshame import publicshame.SinEntry import publicshame.Team class SinEntryHelper { public static final int MAX_STEP = 15 /** * This method will take a team and create a list of all sins * * @param teamUsed * @return list of all sins assigned no this team * */ public static List<SinEntry> generateSinnerList(Team teamUsed, int startPosition) { def sinnerList = [] SinEntry.findAllByTeam(teamUsed, [max: MAX_STEP, offset: startPosition]).each { sinnerList << createEntryMap(it) } return sinnerList } static def createEntryMap(SinEntry sinUsed) { def resultMap = [ sinner: sinUsed.sinner, sin: sinUsed.sin, id: sinUsed.id, ] if (sinUsed.misc) resultMap << ["misc", sinUsed.misc] resultMap } }
package publicshame class SinEntryHelper { public static final int MAX_STEP = 15 /** * This method will take a team and create a list of all sins * * @param teamUsed * @return list of all sins assigned no this team * */ public static List<SinEntry> generateSinnerList(Team teamUsed, int startPosition) { def sinnerList = [] SinEntry.findAllByTeam(teamUsed, [max: MAX_STEP, order: 'desc', sort:'id', offset: startPosition]).each { sinnerList << createEntryMap(it) } return sinnerList } static def createEntryMap(SinEntry sinUsed) { def resultMap = [ sinner: sinUsed.sinner, sin: sinUsed.sin, id: sinUsed.id, ] if (sinUsed.misc) resultMap << ["misc", sinUsed.misc] resultMap } }
Set to reverse order return
Set to reverse order return
Groovy
mit
ethankhall/archived-projects,ethankhall/archived-projects,ethankhall/archived-projects
groovy
## Code Before: package publicshame import publicshame.SinEntry import publicshame.Team class SinEntryHelper { public static final int MAX_STEP = 15 /** * This method will take a team and create a list of all sins * * @param teamUsed * @return list of all sins assigned no this team * */ public static List<SinEntry> generateSinnerList(Team teamUsed, int startPosition) { def sinnerList = [] SinEntry.findAllByTeam(teamUsed, [max: MAX_STEP, offset: startPosition]).each { sinnerList << createEntryMap(it) } return sinnerList } static def createEntryMap(SinEntry sinUsed) { def resultMap = [ sinner: sinUsed.sinner, sin: sinUsed.sin, id: sinUsed.id, ] if (sinUsed.misc) resultMap << ["misc", sinUsed.misc] resultMap } } ## Instruction: Set to reverse order return ## Code After: package publicshame class SinEntryHelper { public static final int MAX_STEP = 15 /** * This method will take a team and create a list of all sins * * @param teamUsed * @return list of all sins assigned no this team * */ public static List<SinEntry> generateSinnerList(Team teamUsed, int startPosition) { def sinnerList = [] SinEntry.findAllByTeam(teamUsed, [max: MAX_STEP, order: 'desc', sort:'id', offset: startPosition]).each { sinnerList << createEntryMap(it) } return sinnerList } static def createEntryMap(SinEntry sinUsed) { def resultMap = [ sinner: sinUsed.sinner, sin: sinUsed.sin, id: sinUsed.id, ] if (sinUsed.misc) resultMap << ["misc", sinUsed.misc] resultMap } }
package publicshame - - import publicshame.SinEntry - import publicshame.Team class SinEntryHelper { public static final int MAX_STEP = 15 /** * This method will take a team and create a list of all sins * * @param teamUsed * @return list of all sins assigned no this team * */ public static List<SinEntry> generateSinnerList(Team teamUsed, int startPosition) { def sinnerList = [] - SinEntry.findAllByTeam(teamUsed, [max: MAX_STEP, offset: startPosition]).each { + SinEntry.findAllByTeam(teamUsed, [max: MAX_STEP, order: 'desc', sort:'id', offset: startPosition]).each { ? ++++++++++++++++++++++++++ sinnerList << createEntryMap(it) } return sinnerList } static def createEntryMap(SinEntry sinUsed) { def resultMap = [ sinner: sinUsed.sinner, sin: sinUsed.sin, id: sinUsed.id, ] if (sinUsed.misc) resultMap << ["misc", sinUsed.misc] resultMap } }
5
0.135135
1
4
810ae2dc82aafdb092e2fdc34fe5a2b6e8b869e6
spec/lanes/models/CollectionSpec.coffee
spec/lanes/models/CollectionSpec.coffee
describe "Lanes.Models.Collection", -> it "it triggers promise on loading", (done) -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } LT.syncSucceedWith([ { id: 1, title: 'first value' } { id: 2, title: 'second value' } ]) collection = Model.where(name: 'foo') expect(collection.requestInProgress).toBeDefined() collection.whenLoaded -> expect( collection.isLoaded() ).toBe(true) done() it "triggers length when changed", -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } collection = new Model.Collection spy = jasmine.createSpy('onLengthChange') collection.on("change:length", spy) model = collection.add({ id: 1, title: 'first' }) expect(spy).toHaveBeenCalled() spy.calls.reset() collection.remove(model) expect(spy).toHaveBeenCalled() spy.calls.reset() collection.reset([{ id:11, title: 'last'}]) expect(spy).toHaveBeenCalled()
describe "Lanes.Models.Collection", -> it "it triggers promise on loading", (done) -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } LT.syncSucceedWith([ { id: 1, title: 'first value' } { id: 2, title: 'second value' } ]) collection = Model.where(name: 'foo') expect(collection.requestInProgress).toBeDefined() collection.whenLoaded -> expect( collection.isLoaded() ).toBe(true) done() it "triggers length when changed", -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } collection = new Model.Collection spy = jasmine.createSpy('onLengthChange') collection.on("change:length", spy) model = collection.add({ id: 1, title: 'first' }) expect(spy).toHaveBeenCalled() spy.calls.reset() collection.remove(model) expect(spy).toHaveBeenCalled() spy.calls.reset() collection.reset([{ id:11, title: 'last'}]) expect(spy).toHaveBeenCalled() it 'prevents duplicates when copying from', -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } collection = new Model.Collection a = collection.add({ id: 1, title: 'first' }) b = collection.add({ id: 2, title: 'second' }) c = collection.add({ id: 3, title: 'third' }) a.copyFrom(c) expect(collection.pluck('id')).toEqual([2, 3, 1])
Test duplicate prevention when copying
Test duplicate prevention when copying
CoffeeScript
mit
argosity/hippo,argosity/lanes,argosity/hippo,argosity/lanes,argosity/lanes,argosity/hippo
coffeescript
## Code Before: describe "Lanes.Models.Collection", -> it "it triggers promise on loading", (done) -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } LT.syncSucceedWith([ { id: 1, title: 'first value' } { id: 2, title: 'second value' } ]) collection = Model.where(name: 'foo') expect(collection.requestInProgress).toBeDefined() collection.whenLoaded -> expect( collection.isLoaded() ).toBe(true) done() it "triggers length when changed", -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } collection = new Model.Collection spy = jasmine.createSpy('onLengthChange') collection.on("change:length", spy) model = collection.add({ id: 1, title: 'first' }) expect(spy).toHaveBeenCalled() spy.calls.reset() collection.remove(model) expect(spy).toHaveBeenCalled() spy.calls.reset() collection.reset([{ id:11, title: 'last'}]) expect(spy).toHaveBeenCalled() ## Instruction: Test duplicate prevention when copying ## Code After: describe "Lanes.Models.Collection", -> it "it triggers promise on loading", (done) -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } LT.syncSucceedWith([ { id: 1, title: 'first value' } { id: 2, title: 'second value' } ]) collection = Model.where(name: 'foo') expect(collection.requestInProgress).toBeDefined() collection.whenLoaded -> expect( collection.isLoaded() ).toBe(true) done() it "triggers length when changed", -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } collection = new Model.Collection spy = jasmine.createSpy('onLengthChange') collection.on("change:length", spy) model = collection.add({ id: 1, title: 'first' }) expect(spy).toHaveBeenCalled() spy.calls.reset() collection.remove(model) expect(spy).toHaveBeenCalled() spy.calls.reset() collection.reset([{ id:11, title: 'last'}]) expect(spy).toHaveBeenCalled() it 'prevents duplicates when copying from', -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } collection = new Model.Collection a = collection.add({ id: 1, title: 'first' }) b = collection.add({ id: 2, title: 'second' }) c = collection.add({ id: 3, title: 'third' }) a.copyFrom(c) expect(collection.pluck('id')).toEqual([2, 3, 1])
describe "Lanes.Models.Collection", -> it "it triggers promise on loading", (done) -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } LT.syncSucceedWith([ { id: 1, title: 'first value' } { id: 2, title: 'second value' } ]) collection = Model.where(name: 'foo') expect(collection.requestInProgress).toBeDefined() collection.whenLoaded -> expect( collection.isLoaded() ).toBe(true) done() it "triggers length when changed", -> Model = Lanes.Test.defineModel props: { id: 'integer', title: 'string' } collection = new Model.Collection spy = jasmine.createSpy('onLengthChange') collection.on("change:length", spy) model = collection.add({ id: 1, title: 'first' }) expect(spy).toHaveBeenCalled() spy.calls.reset() collection.remove(model) expect(spy).toHaveBeenCalled() spy.calls.reset() collection.reset([{ id:11, title: 'last'}]) expect(spy).toHaveBeenCalled() + + it 'prevents duplicates when copying from', -> + Model = Lanes.Test.defineModel + props: { id: 'integer', title: 'string' } + collection = new Model.Collection + a = collection.add({ id: 1, title: 'first' }) + b = collection.add({ id: 2, title: 'second' }) + c = collection.add({ id: 3, title: 'third' }) + a.copyFrom(c) + expect(collection.pluck('id')).toEqual([2, 3, 1])
10
0.3125
10
0
e24ce5ff72d1a631b2c12907fc41aa37c7f0d155
spec/spec_helper.rb
spec/spec_helper.rb
require 'simplecov' # $: << File.expand_path("../../lib", __FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'organic-sitemap' require 'redis' SimpleCov.start RSpec.configure do |config| config.filter_run_excluding broken: true end
require 'simplecov' # $: << File.expand_path("../../lib", __FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'organic-sitemap' require 'redis' SimpleCov.start require 'fakeredis/rspec' RSpec.configure do |config| config.filter_run_excluding broken: true end OrganicSitemap.configure OK_STATUS_CODES = 200..207 REDIRECT_STATUS_CODES = 300..307 CLIENT_ERROR_STATUS_CODES = 400..429 ERROR_STATUS_CODE = 500..509 ALL_STATUS = [*OK_STATUS_CODES, *REDIRECT_STATUS_CODES, *CLIENT_ERROR_STATUS_CODES, *ERROR_STATUS_CODE]
Add require on tests and prepare constants with response status
Add require on tests and prepare constants with response status
Ruby
mit
abelardogilm/organic-sitemap,abelardogilm/organic-sitemap
ruby
## Code Before: require 'simplecov' # $: << File.expand_path("../../lib", __FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'organic-sitemap' require 'redis' SimpleCov.start RSpec.configure do |config| config.filter_run_excluding broken: true end ## Instruction: Add require on tests and prepare constants with response status ## Code After: require 'simplecov' # $: << File.expand_path("../../lib", __FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'organic-sitemap' require 'redis' SimpleCov.start require 'fakeredis/rspec' RSpec.configure do |config| config.filter_run_excluding broken: true end OrganicSitemap.configure OK_STATUS_CODES = 200..207 REDIRECT_STATUS_CODES = 300..307 CLIENT_ERROR_STATUS_CODES = 400..429 ERROR_STATUS_CODE = 500..509 ALL_STATUS = [*OK_STATUS_CODES, *REDIRECT_STATUS_CODES, *CLIENT_ERROR_STATUS_CODES, *ERROR_STATUS_CODE]
require 'simplecov' # $: << File.expand_path("../../lib", __FILE__) $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) require 'organic-sitemap' require 'redis' SimpleCov.start + require 'fakeredis/rspec' + RSpec.configure do |config| config.filter_run_excluding broken: true end + + OrganicSitemap.configure + + OK_STATUS_CODES = 200..207 + REDIRECT_STATUS_CODES = 300..307 + CLIENT_ERROR_STATUS_CODES = 400..429 + ERROR_STATUS_CODE = 500..509 + + ALL_STATUS = [*OK_STATUS_CODES, *REDIRECT_STATUS_CODES, *CLIENT_ERROR_STATUS_CODES, *ERROR_STATUS_CODE]
11
0.916667
11
0
b94d6a9d60781f0eeb58122151867468952a4d78
models/SignupForm.php
models/SignupForm.php
<?php namespace app\models; use yii\base\Model; /** * Signup form */ class SignupForm extends Model { public $email; public $signup_token; public $password; /** * @inheritdoc */ public function rules() { return [ ['signup_token', 'trim'], ['email', 'trim'], ['email', 'required'], ['email', 'email'], ['email', 'string', 'max' => 255], ['email', 'unique', 'targetClass' => '\app\models\User', 'message' => 'You are already an existing user. Proceed to login'], ['password', 'required'], ['password', 'string', 'min' => 6], ]; } /** * Signs user up. * * @return User|null the saved model or null if saving fails */ public function signup() { if (!$this->validate()) { return null; } $user = new User(); $user->email = $this->email; $user->setPassword($this->password); $user->generateAuthKey(); return $user->save() ? $user : null; } }
<?php namespace app\models; use yii\base\Model; /** * Signup form */ class SignupForm extends Model { public $email; public $signup_token; public $password; /** * @inheritdoc */ public function rules() { return [ ['signup_token', 'trim'], ['email', 'trim'], ['email', 'required'], ['email', 'email'], ['email', 'string', 'max' => 255], ['email', 'unique', 'targetClass' => '\app\models\User', 'message' => 'You are already an existing user. Proceed to login'], ['password', 'required'], ['password', 'string', 'min' => 6], ]; } /** * Signs user up. * * @return User|null the saved model or null if saving fails */ public function signup() { if (!$this->validate()) { return null; } $user = new User(); $user->email = $this->email; $user->role = SignupLinks::findByEmail($this->email)->role; $user->setPassword($this->password); $user->generateAuthKey(); return $user->save() ? $user : null; } }
Save user role when signing up
Save user role when signing up
PHP
bsd-3-clause
nkmathew/intern-portal,nkmathew/intern-portal
php
## Code Before: <?php namespace app\models; use yii\base\Model; /** * Signup form */ class SignupForm extends Model { public $email; public $signup_token; public $password; /** * @inheritdoc */ public function rules() { return [ ['signup_token', 'trim'], ['email', 'trim'], ['email', 'required'], ['email', 'email'], ['email', 'string', 'max' => 255], ['email', 'unique', 'targetClass' => '\app\models\User', 'message' => 'You are already an existing user. Proceed to login'], ['password', 'required'], ['password', 'string', 'min' => 6], ]; } /** * Signs user up. * * @return User|null the saved model or null if saving fails */ public function signup() { if (!$this->validate()) { return null; } $user = new User(); $user->email = $this->email; $user->setPassword($this->password); $user->generateAuthKey(); return $user->save() ? $user : null; } } ## Instruction: Save user role when signing up ## Code After: <?php namespace app\models; use yii\base\Model; /** * Signup form */ class SignupForm extends Model { public $email; public $signup_token; public $password; /** * @inheritdoc */ public function rules() { return [ ['signup_token', 'trim'], ['email', 'trim'], ['email', 'required'], ['email', 'email'], ['email', 'string', 'max' => 255], ['email', 'unique', 'targetClass' => '\app\models\User', 'message' => 'You are already an existing user. Proceed to login'], ['password', 'required'], ['password', 'string', 'min' => 6], ]; } /** * Signs user up. * * @return User|null the saved model or null if saving fails */ public function signup() { if (!$this->validate()) { return null; } $user = new User(); $user->email = $this->email; $user->role = SignupLinks::findByEmail($this->email)->role; $user->setPassword($this->password); $user->generateAuthKey(); return $user->save() ? $user : null; } }
<?php namespace app\models; use yii\base\Model; /** * Signup form */ class SignupForm extends Model { public $email; public $signup_token; public $password; /** * @inheritdoc */ public function rules() { return [ ['signup_token', 'trim'], ['email', 'trim'], ['email', 'required'], ['email', 'email'], ['email', 'string', 'max' => 255], ['email', 'unique', 'targetClass' => '\app\models\User', 'message' => 'You are already an existing user. Proceed to login'], ['password', 'required'], ['password', 'string', 'min' => 6], ]; } /** * Signs user up. * * @return User|null the saved model or null if saving fails */ public function signup() { if (!$this->validate()) { return null; } $user = new User(); $user->email = $this->email; + $user->role = SignupLinks::findByEmail($this->email)->role; $user->setPassword($this->password); $user->generateAuthKey(); return $user->save() ? $user : null; } }
1
0.019608
1
0
f2974663cded5daa7d4d543dca374e0477f10c18
premake5.lua
premake5.lua
solution "Example" language "C++" location "project" targetdir "bin" -- -- Statically link the C-Runtime to reduce dependencies needed to run our module -- flags "StaticRuntime" configurations { "Release" } configuration "Release" flags "symbols" optimize "On" project "example" kind "SharedLib" include "LuaInterface" files { "src/**.cpp", "src/**.h" }
solution "my_module" language "C++" location "project" targetdir "bin" -- -- Statically link the C-Runtime to reduce dependencies needed to run our module -- flags "StaticRuntime" configurations { "Release" } configuration "Release" flags "symbols" optimize "On" project "my_module" kind "SharedLib" include "LuaInterface" files { "src/**.cpp", "src/**.h" }
Rename module from 'example' to 'my_module'
Rename module from 'example' to 'my_module'
Lua
cc0-1.0
LennyPenny/gm_megamenu,glua/module-base,glua/module-base,LennyPenny/gm_megamenu,LennyPenny/gm_megamenu
lua
## Code Before: solution "Example" language "C++" location "project" targetdir "bin" -- -- Statically link the C-Runtime to reduce dependencies needed to run our module -- flags "StaticRuntime" configurations { "Release" } configuration "Release" flags "symbols" optimize "On" project "example" kind "SharedLib" include "LuaInterface" files { "src/**.cpp", "src/**.h" } ## Instruction: Rename module from 'example' to 'my_module' ## Code After: solution "my_module" language "C++" location "project" targetdir "bin" -- -- Statically link the C-Runtime to reduce dependencies needed to run our module -- flags "StaticRuntime" configurations { "Release" } configuration "Release" flags "symbols" optimize "On" project "my_module" kind "SharedLib" include "LuaInterface" files { "src/**.cpp", "src/**.h" }
- solution "Example" + solution "my_module" language "C++" location "project" targetdir "bin" -- -- Statically link the C-Runtime to reduce dependencies needed to run our module -- flags "StaticRuntime" configurations { "Release" } configuration "Release" flags "symbols" optimize "On" - project "example" + project "my_module" kind "SharedLib" include "LuaInterface" files { "src/**.cpp", "src/**.h" }
4
0.190476
2
2
9c1a5bb56b8661f142b857b7d26382caca7928bf
app/assets/templates/products/show.html.slim
app/assets/templates/products/show.html.slim
.row .col-sm-6.col-xs-12 section.gallery ng-include(src="'products/gallery.html'") .col-sm-6.col-xs-12 section.details h1(ng-bind="product.name") p.desc(ng-bind="product.description") section.options(ng-show='product.hasVariants') variant-selection(product="product" variant="selected.variant" class="{'btn-group-lg': true}") section.add.row .col-sm-4 quantity-input(quantity="selected.quantity" ng-if='!selected.variant || selected.variant.isAvailable()') .col-sm-8 p.sold-out(ng-if="selected.variant && !selected.variant.isAvailable()") span.fa.fa-exclamation-triangle | &nbsp;This item is sold out add-to-cart-button(ng-if="selected.variant.isAvailable() || product.master.isAvailable()" product="product" variant="selected.variant" quantity="selected.quantity" class="{'btn-lg': true, 'btn-block': true, 'btn-primary': !hasVariant(), 'btn-default': hasVariant()}") section.in-cart.row(ng-show='hasVariant()') .col-md-12 p Item was added to your cart checkout-button(user='user') ng-include(src="'products/properties.html'")
.row .col-sm-6.col-xs-12 section.gallery ng-include(src="'products/gallery.html'") .col-sm-6.col-xs-12 section.details h1(ng-bind="product.name") p.desc(ng-bind="product.description") section.options(ng-show='product.hasVariants') variant-selection(product="product" variant="selected.variant" class="{'btn-group-lg': true}") section.add.row .col-sm-4 quantity-input(quantity="selected.quantity" ng-if='!selected.variant || selected.variant.isAvailable()') .col-sm-8 p.sold-out(ng-if="selected.variant && !selected.variant.isAvailable()") span.fa.fa-exclamation-triangle | &nbsp;This item is sold out add-to-cart-button(ng-if="selected.variant.isAvailable() || product.master.isAvailable()" product="product" variant="selected.variant" quantity="selected.quantity" class="{'btn-lg': true, 'btn-block': true, 'btn-primary': !hasVariant(), 'btn-default': hasVariant()}") section.in-cart.row(ng-show='hasVariant()') .col-md-12 checkout-button(user='user') ng-include(src="'products/properties.html'")
Remove "item was added" message from PDP, popover now handles this feedback
Remove "item was added" message from PDP, popover now handles this feedback
Slim
mit
sprangular/sprangular,sprangular/sprangular,sprangular/sprangular
slim
## Code Before: .row .col-sm-6.col-xs-12 section.gallery ng-include(src="'products/gallery.html'") .col-sm-6.col-xs-12 section.details h1(ng-bind="product.name") p.desc(ng-bind="product.description") section.options(ng-show='product.hasVariants') variant-selection(product="product" variant="selected.variant" class="{'btn-group-lg': true}") section.add.row .col-sm-4 quantity-input(quantity="selected.quantity" ng-if='!selected.variant || selected.variant.isAvailable()') .col-sm-8 p.sold-out(ng-if="selected.variant && !selected.variant.isAvailable()") span.fa.fa-exclamation-triangle | &nbsp;This item is sold out add-to-cart-button(ng-if="selected.variant.isAvailable() || product.master.isAvailable()" product="product" variant="selected.variant" quantity="selected.quantity" class="{'btn-lg': true, 'btn-block': true, 'btn-primary': !hasVariant(), 'btn-default': hasVariant()}") section.in-cart.row(ng-show='hasVariant()') .col-md-12 p Item was added to your cart checkout-button(user='user') ng-include(src="'products/properties.html'") ## Instruction: Remove "item was added" message from PDP, popover now handles this feedback ## Code After: .row .col-sm-6.col-xs-12 section.gallery ng-include(src="'products/gallery.html'") .col-sm-6.col-xs-12 section.details h1(ng-bind="product.name") p.desc(ng-bind="product.description") section.options(ng-show='product.hasVariants') variant-selection(product="product" variant="selected.variant" class="{'btn-group-lg': true}") section.add.row .col-sm-4 quantity-input(quantity="selected.quantity" ng-if='!selected.variant || selected.variant.isAvailable()') .col-sm-8 p.sold-out(ng-if="selected.variant && !selected.variant.isAvailable()") span.fa.fa-exclamation-triangle | &nbsp;This item is sold out add-to-cart-button(ng-if="selected.variant.isAvailable() || product.master.isAvailable()" product="product" variant="selected.variant" quantity="selected.quantity" class="{'btn-lg': true, 'btn-block': true, 'btn-primary': !hasVariant(), 'btn-default': hasVariant()}") section.in-cart.row(ng-show='hasVariant()') .col-md-12 checkout-button(user='user') ng-include(src="'products/properties.html'")
.row .col-sm-6.col-xs-12 section.gallery ng-include(src="'products/gallery.html'") .col-sm-6.col-xs-12 section.details h1(ng-bind="product.name") p.desc(ng-bind="product.description") section.options(ng-show='product.hasVariants') variant-selection(product="product" variant="selected.variant" class="{'btn-group-lg': true}") section.add.row .col-sm-4 quantity-input(quantity="selected.quantity" ng-if='!selected.variant || selected.variant.isAvailable()') .col-sm-8 p.sold-out(ng-if="selected.variant && !selected.variant.isAvailable()") span.fa.fa-exclamation-triangle | &nbsp;This item is sold out add-to-cart-button(ng-if="selected.variant.isAvailable() || product.master.isAvailable()" product="product" variant="selected.variant" quantity="selected.quantity" class="{'btn-lg': true, 'btn-block': true, 'btn-primary': !hasVariant(), 'btn-default': hasVariant()}") section.in-cart.row(ng-show='hasVariant()') .col-md-12 - p Item was added to your cart - checkout-button(user='user') ng-include(src="'products/properties.html'")
2
0.057143
0
2
e28cb7620d09d7cc634b492d8724a1260bd9436a
src/org/linuxguy/MarketBot/GooglePlayWatcher.java
src/org/linuxguy/MarketBot/GooglePlayWatcher.java
package org.linuxguy.MarketBot; import com.gc.android.market.api.MarketSession; import com.gc.android.market.api.model.Market; import java.util.concurrent.TimeUnit; public class GooglePlayWatcher extends Watcher<Comment> implements MarketSession.Callback<Market.CommentsResponse> { private static final long POLL_INTERVAL_MS = TimeUnit.MINUTES.toMillis(5); private String mUsername; private String mPassword; private String mAppId; public GooglePlayWatcher(String username, String password, String appId) { mUsername = username; mPassword = password; mAppId = appId; } @Override public void run() { MarketSession session = new MarketSession(); session.login(mUsername, mPassword); while (true) { Market.CommentsRequest commentsRequest = Market.CommentsRequest.newBuilder() .setAppId(mAppId) .setStartIndex(0) .setEntriesCount(5) .build(); session.append(commentsRequest, this); session.flush(); try { Thread.sleep(POLL_INTERVAL_MS); } catch (InterruptedException e) { break; } } } @Override public void onResult(Market.ResponseContext responseContext, Market.CommentsResponse response) { for (Market.Comment c : response.getCommentsList()) { if (c.getCreationTime() > mLastPollTime) { notifyListeners(Comment.from(c)); } } } }
package org.linuxguy.MarketBot; import com.gc.android.market.api.MarketSession; import com.gc.android.market.api.model.Market; import java.util.concurrent.TimeUnit; public class GooglePlayWatcher extends Watcher<Comment> implements MarketSession.Callback<Market.CommentsResponse> { private static final long POLL_INTERVAL_MS = TimeUnit.MINUTES.toMillis(5); private String mUsername; private String mPassword; private String mAppId; public GooglePlayWatcher(String username, String password, String appId) { mUsername = username; mPassword = password; mAppId = appId; } @Override public void run() { MarketSession session = new MarketSession(); session.login(mUsername, mPassword); while (true) { Market.CommentsRequest commentsRequest = Market.CommentsRequest.newBuilder() .setAppId(mAppId) .setStartIndex(0) .setEntriesCount(5) .build(); session.append(commentsRequest, this); session.flush(); try { Thread.sleep(POLL_INTERVAL_MS); } catch (InterruptedException e) { break; } } } @Override public void onResult(Market.ResponseContext responseContext, Market.CommentsResponse response) { for (Market.Comment c : response.getCommentsList()) { if (c.getCreationTime() > mLastPollTime) { notifyListeners(Comment.from(c)); } } mLastPollTime = System.currentTimeMillis(); } }
Update the last poll time
Update the last poll time
Java
apache-2.0
acj/MarketBot
java
## Code Before: package org.linuxguy.MarketBot; import com.gc.android.market.api.MarketSession; import com.gc.android.market.api.model.Market; import java.util.concurrent.TimeUnit; public class GooglePlayWatcher extends Watcher<Comment> implements MarketSession.Callback<Market.CommentsResponse> { private static final long POLL_INTERVAL_MS = TimeUnit.MINUTES.toMillis(5); private String mUsername; private String mPassword; private String mAppId; public GooglePlayWatcher(String username, String password, String appId) { mUsername = username; mPassword = password; mAppId = appId; } @Override public void run() { MarketSession session = new MarketSession(); session.login(mUsername, mPassword); while (true) { Market.CommentsRequest commentsRequest = Market.CommentsRequest.newBuilder() .setAppId(mAppId) .setStartIndex(0) .setEntriesCount(5) .build(); session.append(commentsRequest, this); session.flush(); try { Thread.sleep(POLL_INTERVAL_MS); } catch (InterruptedException e) { break; } } } @Override public void onResult(Market.ResponseContext responseContext, Market.CommentsResponse response) { for (Market.Comment c : response.getCommentsList()) { if (c.getCreationTime() > mLastPollTime) { notifyListeners(Comment.from(c)); } } } } ## Instruction: Update the last poll time ## Code After: package org.linuxguy.MarketBot; import com.gc.android.market.api.MarketSession; import com.gc.android.market.api.model.Market; import java.util.concurrent.TimeUnit; public class GooglePlayWatcher extends Watcher<Comment> implements MarketSession.Callback<Market.CommentsResponse> { private static final long POLL_INTERVAL_MS = TimeUnit.MINUTES.toMillis(5); private String mUsername; private String mPassword; private String mAppId; public GooglePlayWatcher(String username, String password, String appId) { mUsername = username; mPassword = password; mAppId = appId; } @Override public void run() { MarketSession session = new MarketSession(); session.login(mUsername, mPassword); while (true) { Market.CommentsRequest commentsRequest = Market.CommentsRequest.newBuilder() .setAppId(mAppId) .setStartIndex(0) .setEntriesCount(5) .build(); session.append(commentsRequest, this); session.flush(); try { Thread.sleep(POLL_INTERVAL_MS); } catch (InterruptedException e) { break; } } } @Override public void onResult(Market.ResponseContext responseContext, Market.CommentsResponse response) { for (Market.Comment c : response.getCommentsList()) { if (c.getCreationTime() > mLastPollTime) { notifyListeners(Comment.from(c)); } } mLastPollTime = System.currentTimeMillis(); } }
package org.linuxguy.MarketBot; import com.gc.android.market.api.MarketSession; import com.gc.android.market.api.model.Market; import java.util.concurrent.TimeUnit; public class GooglePlayWatcher extends Watcher<Comment> implements MarketSession.Callback<Market.CommentsResponse> { private static final long POLL_INTERVAL_MS = TimeUnit.MINUTES.toMillis(5); private String mUsername; private String mPassword; private String mAppId; public GooglePlayWatcher(String username, String password, String appId) { mUsername = username; mPassword = password; mAppId = appId; } @Override public void run() { MarketSession session = new MarketSession(); session.login(mUsername, mPassword); while (true) { Market.CommentsRequest commentsRequest = Market.CommentsRequest.newBuilder() .setAppId(mAppId) .setStartIndex(0) .setEntriesCount(5) .build(); session.append(commentsRequest, this); session.flush(); try { Thread.sleep(POLL_INTERVAL_MS); } catch (InterruptedException e) { break; } } } @Override public void onResult(Market.ResponseContext responseContext, Market.CommentsResponse response) { for (Market.Comment c : response.getCommentsList()) { if (c.getCreationTime() > mLastPollTime) { notifyListeners(Comment.from(c)); } } + + mLastPollTime = System.currentTimeMillis(); } }
2
0.037736
2
0
02c4fa9d2dc9430ce71a2819e9d55f8e948aab06
templates/registration/password_reset_email.html
templates/registration/password_reset_email.html
Greetings {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %}, You are receiving this email because you requested that your password be reset on {{ domain }}. If you do not wish to reset your password, please ignore this email. To reset your password, please click the following link, or copy and paste it into your web browser: {{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %} Your username, in case you've forgotten, is "{{ user.username }}". Best regards, {{ site_name }} Support
{% load subdomainurls %} Greetings {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %}, You are receiving this email because you requested that your password be reset on {{ domain }}. If you do not wish to reset your password, please ignore this email. To reset your password, please click the following link, or copy and paste it into your web browser: {% url 'auth_password_reset_confirm' 'manage' uid token %} Your username, in case you've forgotten, is "{{ user.username }}". Best regards, {{ site_name }} Support
Make sure that password reset urls are correct
Make sure that password reset urls are correct
HTML
mit
stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb,stackmachine/bearweb
html
## Code Before: Greetings {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %}, You are receiving this email because you requested that your password be reset on {{ domain }}. If you do not wish to reset your password, please ignore this email. To reset your password, please click the following link, or copy and paste it into your web browser: {{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %} Your username, in case you've forgotten, is "{{ user.username }}". Best regards, {{ site_name }} Support ## Instruction: Make sure that password reset urls are correct ## Code After: {% load subdomainurls %} Greetings {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %}, You are receiving this email because you requested that your password be reset on {{ domain }}. If you do not wish to reset your password, please ignore this email. To reset your password, please click the following link, or copy and paste it into your web browser: {% url 'auth_password_reset_confirm' 'manage' uid token %} Your username, in case you've forgotten, is "{{ user.username }}". Best regards, {{ site_name }} Support
+ {% load subdomainurls %} + Greetings {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %}, You are receiving this email because you requested that your password be reset on {{ domain }}. If you do not wish to reset your password, please ignore this email. To reset your password, please click the following link, or copy and paste it into your web browser: - {{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %} + {% url 'auth_password_reset_confirm' 'manage' uid token %} Your username, in case you've forgotten, is "{{ user.username }}". Best regards, {{ site_name }} Support
4
0.266667
3
1
a6de5eb53f5814397e85818bf3eab6ce97187de1
README.md
README.md
Short project name for "OpenStreetMap Arbitrary eXcerpt eXport". Cuts out OpenStreetMap data, processes it to geodata and converts it to typical GIS fileformats before being prepared for download. Website: http://osmaxx.hsr.ch/
Short project name for "<strong>O</strong>pen<strong>S</strong>treet<strong>M</strong>ap <strong>a</strong>rbitrary e<strong>x</strong>cerpt e<strong>x</strong>port". Cuts out OpenStreetMap data, processes it to geodata and converts it to typical GIS fileformats before being prepared for download. Website: http://osmaxx.hsr.ch/
Use <strong> rather than capitalization to indicate initialism letters in full project name
Use <strong> rather than capitalization to indicate initialism letters in full project name Markdown's *- and _-Markup only works for whole words, but GitHub markdown does allow the <strong> HTML tag, too
Markdown
mit
geometalab/osmaxx-frontend,geometalab/osmaxx-frontend,geometalab/osmaxx,geometalab/drf-utm-zone-info,geometalab/osmaxx-frontend,geometalab/drf-utm-zone-info,geometalab/osmaxx,geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/osmaxx
markdown
## Code Before: Short project name for "OpenStreetMap Arbitrary eXcerpt eXport". Cuts out OpenStreetMap data, processes it to geodata and converts it to typical GIS fileformats before being prepared for download. Website: http://osmaxx.hsr.ch/ ## Instruction: Use <strong> rather than capitalization to indicate initialism letters in full project name Markdown's *- and _-Markup only works for whole words, but GitHub markdown does allow the <strong> HTML tag, too ## Code After: Short project name for "<strong>O</strong>pen<strong>S</strong>treet<strong>M</strong>ap <strong>a</strong>rbitrary e<strong>x</strong>cerpt e<strong>x</strong>port". Cuts out OpenStreetMap data, processes it to geodata and converts it to typical GIS fileformats before being prepared for download. Website: http://osmaxx.hsr.ch/
- Short project name for "OpenStreetMap Arbitrary eXcerpt eXport". + Short project name for "<strong>O</strong>pen<strong>S</strong>treet<strong>M</strong>ap <strong>a</strong>rbitrary e<strong>x</strong>cerpt e<strong>x</strong>port". Cuts out OpenStreetMap data, processes it to geodata and converts it to typical GIS fileformats before being prepared for download. Website: http://osmaxx.hsr.ch/
2
0.4
1
1
40fc54b5f1e6ab348bd7cd3004a36a3351abc2b3
scripts/travis.sh
scripts/travis.sh
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) if [ -z ${TASK} ]; then echo "No task provided" exit 2 fi # When running on master branch we want to run checks on all the files / packs # not only on changes ones. echo "Running on branch: ${GIT_BRANCH}" if [ "${GIT_BRANCH}" = "master" ]; then echo "Running on master branch, forcing check of all files" export FORCE_CHECK_ALL_FILES="true" fi if [ ${TASK} == "flake8" ]; then make flake8 elif [ ${TASK} == "pylint" ]; then make pylint elif [ ${TASK} == "configs-check" ]; then make configs-check elif [ ${TASK} == "metadata-check" ]; then make metadata-check elif [ ${TASK} == "packs-resource-register" ]; then make packs-resource-register elif [ ${TASK} == "packs-tests" ]; then make packs-tests else echo "Invalid task: ${TASK}" exit 2 fi exit $?
GIT_BRANCH=$(git symbolic-ref HEAD | sed -e "s/^refs\/heads\///") if [ -z ${TASK} ]; then echo "No task provided" exit 2 fi # When running on master branch we want to run checks on all the files / packs # not only on changes ones. echo "Running on branch: ${GIT_BRANCH}" if [ "${GIT_BRANCH}" = "master" ]; then echo "Running on master branch, forcing check of all files" export FORCE_CHECK_ALL_FILES="true" fi if [ ${TASK} == "flake8" ]; then make flake8 elif [ ${TASK} == "pylint" ]; then make pylint elif [ ${TASK} == "configs-check" ]; then make configs-check elif [ ${TASK} == "metadata-check" ]; then make metadata-check elif [ ${TASK} == "packs-resource-register" ]; then make packs-resource-register elif [ ${TASK} == "packs-tests" ]; then make packs-tests else echo "Invalid task: ${TASK}" exit 2 fi exit $?
Fix the approach of how we retrieve branch name.
Fix the approach of how we retrieve branch name. Previois approach doesn't work if we are in a detached state.
Shell
apache-2.0
tonybaloney/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,StackStorm/st2contrib,pidah/st2contrib,pidah/st2contrib,StackStorm/st2contrib,pidah/st2contrib,psychopenguin/st2contrib,armab/st2contrib,psychopenguin/st2contrib,StackStorm/st2contrib,armab/st2contrib,pearsontechnology/st2contrib,tonybaloney/st2contrib,armab/st2contrib,pearsontechnology/st2contrib,pearsontechnology/st2contrib
shell
## Code Before: GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) if [ -z ${TASK} ]; then echo "No task provided" exit 2 fi # When running on master branch we want to run checks on all the files / packs # not only on changes ones. echo "Running on branch: ${GIT_BRANCH}" if [ "${GIT_BRANCH}" = "master" ]; then echo "Running on master branch, forcing check of all files" export FORCE_CHECK_ALL_FILES="true" fi if [ ${TASK} == "flake8" ]; then make flake8 elif [ ${TASK} == "pylint" ]; then make pylint elif [ ${TASK} == "configs-check" ]; then make configs-check elif [ ${TASK} == "metadata-check" ]; then make metadata-check elif [ ${TASK} == "packs-resource-register" ]; then make packs-resource-register elif [ ${TASK} == "packs-tests" ]; then make packs-tests else echo "Invalid task: ${TASK}" exit 2 fi exit $? ## Instruction: Fix the approach of how we retrieve branch name. Previois approach doesn't work if we are in a detached state. ## Code After: GIT_BRANCH=$(git symbolic-ref HEAD | sed -e "s/^refs\/heads\///") if [ -z ${TASK} ]; then echo "No task provided" exit 2 fi # When running on master branch we want to run checks on all the files / packs # not only on changes ones. echo "Running on branch: ${GIT_BRANCH}" if [ "${GIT_BRANCH}" = "master" ]; then echo "Running on master branch, forcing check of all files" export FORCE_CHECK_ALL_FILES="true" fi if [ ${TASK} == "flake8" ]; then make flake8 elif [ ${TASK} == "pylint" ]; then make pylint elif [ ${TASK} == "configs-check" ]; then make configs-check elif [ ${TASK} == "metadata-check" ]; then make metadata-check elif [ ${TASK} == "packs-resource-register" ]; then make packs-resource-register elif [ ${TASK} == "packs-tests" ]; then make packs-tests else echo "Invalid task: ${TASK}" exit 2 fi exit $?
- GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + GIT_BRANCH=$(git symbolic-ref HEAD | sed -e "s/^refs\/heads\///") if [ -z ${TASK} ]; then echo "No task provided" exit 2 fi # When running on master branch we want to run checks on all the files / packs # not only on changes ones. echo "Running on branch: ${GIT_BRANCH}" if [ "${GIT_BRANCH}" = "master" ]; then echo "Running on master branch, forcing check of all files" export FORCE_CHECK_ALL_FILES="true" fi if [ ${TASK} == "flake8" ]; then make flake8 elif [ ${TASK} == "pylint" ]; then make pylint elif [ ${TASK} == "configs-check" ]; then make configs-check elif [ ${TASK} == "metadata-check" ]; then make metadata-check elif [ ${TASK} == "packs-resource-register" ]; then make packs-resource-register elif [ ${TASK} == "packs-tests" ]; then make packs-tests else echo "Invalid task: ${TASK}" exit 2 fi exit $?
2
0.058824
1
1
aeec64f65a7bbc4f047fbbdf93928532e5a62828
.github/PULL_REQUEST_TEMPLATE.md
.github/PULL_REQUEST_TEMPLATE.md
<!-- Describe the changes you have made here: what, why, ... Link issues that are fixed, e.g. "Fixes #333". If you fixed a koppor issue, link it, e.g. "Fixes https://github.com/koppor/jabref/issues/47". The title of the PR must not reference an issue, because GitHub does not support autolinking there. --> <!-- - Go through the list below. If a task has been completed, mark it done by using `[x]`. - Please don't remove any items, just leave them unchecked if they are not applicable. --> - [ ] Change in CHANGELOG.md described (if applicable) - [ ] Tests created for changes (if applicable) - [ ] Manually tested changed features in running JabRef (always required) - [ ] Screenshots added in PR description (for UI changes) - [ ] [Checked documentation](https://docs.jabref.org/): Is the information available and up to date? If not created an issue at <https://github.com/JabRef/user-documentation/issues> or, even better, submitted a pull request to the documentation repository.
<!-- Describe the changes you have made here: what, why, ... Link issues that are fixed, e.g. "Fixes #333". If you fixed a koppor issue, link it, e.g. "Fixes https://github.com/koppor/jabref/issues/47". The title of the PR must not reference an issue, because GitHub does not support autolinking there. --> <!-- - Go through the list below. If a task has been completed, mark it done by using `[x]`. - Please don't remove any items, just leave them unchecked if they are not applicable. --> - [ ] Change in `CHANGELOG.md` described in a way that is understandable for the average user (if applicable) - [ ] Tests created for changes (if applicable) - [ ] Manually tested changed features in running JabRef (always required) - [ ] Screenshots added in PR description (for UI changes) - [ ] [Checked documentation](https://docs.jabref.org/): Is the information available and up to date? If not created an issue at <https://github.com/JabRef/user-documentation/issues> or, even better, submitted a pull request to the documentation repository.
Clarify that changelog is user-facing
Clarify that changelog is user-facing
Markdown
mit
Siedlerchr/jabref,sauliusg/jabref,JabRef/jabref,sauliusg/jabref,Siedlerchr/jabref,sauliusg/jabref,Siedlerchr/jabref,JabRef/jabref,JabRef/jabref,JabRef/jabref,sauliusg/jabref,Siedlerchr/jabref
markdown
## Code Before: <!-- Describe the changes you have made here: what, why, ... Link issues that are fixed, e.g. "Fixes #333". If you fixed a koppor issue, link it, e.g. "Fixes https://github.com/koppor/jabref/issues/47". The title of the PR must not reference an issue, because GitHub does not support autolinking there. --> <!-- - Go through the list below. If a task has been completed, mark it done by using `[x]`. - Please don't remove any items, just leave them unchecked if they are not applicable. --> - [ ] Change in CHANGELOG.md described (if applicable) - [ ] Tests created for changes (if applicable) - [ ] Manually tested changed features in running JabRef (always required) - [ ] Screenshots added in PR description (for UI changes) - [ ] [Checked documentation](https://docs.jabref.org/): Is the information available and up to date? If not created an issue at <https://github.com/JabRef/user-documentation/issues> or, even better, submitted a pull request to the documentation repository. ## Instruction: Clarify that changelog is user-facing ## Code After: <!-- Describe the changes you have made here: what, why, ... Link issues that are fixed, e.g. "Fixes #333". If you fixed a koppor issue, link it, e.g. "Fixes https://github.com/koppor/jabref/issues/47". The title of the PR must not reference an issue, because GitHub does not support autolinking there. --> <!-- - Go through the list below. If a task has been completed, mark it done by using `[x]`. - Please don't remove any items, just leave them unchecked if they are not applicable. --> - [ ] Change in `CHANGELOG.md` described in a way that is understandable for the average user (if applicable) - [ ] Tests created for changes (if applicable) - [ ] Manually tested changed features in running JabRef (always required) - [ ] Screenshots added in PR description (for UI changes) - [ ] [Checked documentation](https://docs.jabref.org/): Is the information available and up to date? If not created an issue at <https://github.com/JabRef/user-documentation/issues> or, even better, submitted a pull request to the documentation repository.
<!-- Describe the changes you have made here: what, why, ... Link issues that are fixed, e.g. "Fixes #333". If you fixed a koppor issue, link it, e.g. "Fixes https://github.com/koppor/jabref/issues/47". The title of the PR must not reference an issue, because GitHub does not support autolinking there. --> <!-- - Go through the list below. If a task has been completed, mark it done by using `[x]`. - Please don't remove any items, just leave them unchecked if they are not applicable. --> - - [ ] Change in CHANGELOG.md described (if applicable) + - [ ] Change in `CHANGELOG.md` described in a way that is understandable for the average user (if applicable) - [ ] Tests created for changes (if applicable) - [ ] Manually tested changed features in running JabRef (always required) - [ ] Screenshots added in PR description (for UI changes) - [ ] [Checked documentation](https://docs.jabref.org/): Is the information available and up to date? If not created an issue at <https://github.com/JabRef/user-documentation/issues> or, even better, submitted a pull request to the documentation repository.
2
0.111111
1
1
864555f431a5dc0560e93ef9055e6cc49c499835
tests/test_basic_create.py
tests/test_basic_create.py
from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) self.assertIsNot(spec, proj) self.assertEqual(len(proj), 2) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) def test_create_additional_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() name = mini_uuid() proj = sg.create(type_, dict(name=name), ['name']) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) self.assertEqual(proj['name'], name) def test_create_missing_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() name = mini_uuid() proj = sg.create(type_, dict(name=name), ['name', 'does_not_exist']) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) self.assertEqual(proj['name'], name)
from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) print proj self.assertIsNot(spec, proj) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assertEqual(proj['name'], spec['name']) self.assert_(proj['id']) def test_create_additional_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() name = mini_uuid() proj = sg.create(type_, dict(name=name), ['name']) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) self.assertEqual(proj['name'], name) def test_create_missing_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() name = mini_uuid() proj = sg.create(type_, dict(name=name), ['name', 'does_not_exist']) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) self.assertEqual(proj['name'], name)
Adjust test for returned name
Adjust test for returned name
Python
bsd-3-clause
westernx/sgmock
python
## Code Before: from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) self.assertIsNot(spec, proj) self.assertEqual(len(proj), 2) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) def test_create_additional_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() name = mini_uuid() proj = sg.create(type_, dict(name=name), ['name']) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) self.assertEqual(proj['name'], name) def test_create_missing_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() name = mini_uuid() proj = sg.create(type_, dict(name=name), ['name', 'does_not_exist']) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) self.assertEqual(proj['name'], name) ## Instruction: Adjust test for returned name ## Code After: from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) print proj self.assertIsNot(spec, proj) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assertEqual(proj['name'], spec['name']) self.assert_(proj['id']) def test_create_additional_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() name = mini_uuid() proj = sg.create(type_, dict(name=name), ['name']) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) self.assertEqual(proj['name'], name) def test_create_missing_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() name = mini_uuid() proj = sg.create(type_, dict(name=name), ['name', 'does_not_exist']) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) self.assertEqual(proj['name'], name)
from common import * class TestBasicCreate(TestCase): def test_create_default_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() spec = dict(name=mini_uuid()) proj = sg.create(type_, spec) + print proj self.assertIsNot(spec, proj) - self.assertEqual(len(proj), 2) ? ^ + self.assertEqual(len(proj), 3) ? ^ self.assertEqual(proj['type'], type_) + self.assertEqual(proj['name'], spec['name']) self.assert_(proj['id']) def test_create_additional_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() name = mini_uuid() proj = sg.create(type_, dict(name=name), ['name']) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) self.assertEqual(proj['name'], name) def test_create_missing_return(self): sg = Shotgun() type_ = 'Dummy' + mini_uuid().upper() name = mini_uuid() proj = sg.create(type_, dict(name=name), ['name', 'does_not_exist']) self.assertEqual(len(proj), 3) self.assertEqual(proj['type'], type_) self.assert_(proj['id']) self.assertEqual(proj['name'], name)
4
0.117647
3
1
5dc4faebf762f69b2a19f2fe285b3b48a6856fb7
test/features/creates_a_wwltw_chore.js
test/features/creates_a_wwltw_chore.js
/** * Created by pivotal on 5/19/17. */ require('dotenv').config() describe('chrome extension is loaded properly when feature tests run', function () { beforeEach(function () { jasmine.getEnv().defaultTimeoutInterval = 1000000 }) it('creates a WWLTW chore in the backlog', function () { browser.setValue("[data-test='tracker-api-token'] input", process.env.TEST_PIVOTAL_TRACKER_TOKEN) browser.click('button=Submit') browser.pause(1000) browser.click('label=Test Project') browser.pause(1000) browser.url('https://www.pivotaltracker.com/signin') browser.setValue("#credentials_username", process.env.TEST_PIVOTAL_TRACKER_USERNAME) browser.click("#login_type_check_form input[type='submit']") browser.setValue("#credentials_password", process.env.TEST_PIVOTAL_TRACKER_PASSWORD ) browser.click("#login_type_check_form input[type='submit']") browser.click("a=Test Project") browser.pause(1000) expect(browser.getText(".story_name*=WWLTW for the week of")).toMatch(/WWLTW for the week of \d{1,2}\/\d{1,2}/) }) })
/** * Created by pivotal on 5/19/17. */ require('dotenv').config() describe('chrome extension is loaded properly when feature tests run', function () { it('creates a WWLTW chore in the backlog', function () { browser.setValue("[data-test='tracker-api-token'] input", process.env.TEST_PIVOTAL_TRACKER_TOKEN) browser.click('button=Submit') browser.pause(1000) browser.click('label=Test Project') browser.pause(1000) browser.url('https://www.pivotaltracker.com/signin') browser.setValue("#credentials_username", process.env.TEST_PIVOTAL_TRACKER_USERNAME) browser.click("#login_type_check_form input[type='submit']") browser.setValue("#credentials_password", process.env.TEST_PIVOTAL_TRACKER_PASSWORD ) browser.click("#login_type_check_form input[type='submit']") browser.click("a=Test Project") browser.pause(1000) expect(browser.getText(".story_name*=WWLTW for the week of")).toMatch(/WWLTW for the week of \d{1,2}\/\d{1,2}/) }) })
Remove code overriding default jasmine timeout interval
Remove code overriding default jasmine timeout interval
JavaScript
isc
oliverswitzer/wwltw-for-pivotal-tracker,oliverswitzer/wwltw-for-pivotal-tracker
javascript
## Code Before: /** * Created by pivotal on 5/19/17. */ require('dotenv').config() describe('chrome extension is loaded properly when feature tests run', function () { beforeEach(function () { jasmine.getEnv().defaultTimeoutInterval = 1000000 }) it('creates a WWLTW chore in the backlog', function () { browser.setValue("[data-test='tracker-api-token'] input", process.env.TEST_PIVOTAL_TRACKER_TOKEN) browser.click('button=Submit') browser.pause(1000) browser.click('label=Test Project') browser.pause(1000) browser.url('https://www.pivotaltracker.com/signin') browser.setValue("#credentials_username", process.env.TEST_PIVOTAL_TRACKER_USERNAME) browser.click("#login_type_check_form input[type='submit']") browser.setValue("#credentials_password", process.env.TEST_PIVOTAL_TRACKER_PASSWORD ) browser.click("#login_type_check_form input[type='submit']") browser.click("a=Test Project") browser.pause(1000) expect(browser.getText(".story_name*=WWLTW for the week of")).toMatch(/WWLTW for the week of \d{1,2}\/\d{1,2}/) }) }) ## Instruction: Remove code overriding default jasmine timeout interval ## Code After: /** * Created by pivotal on 5/19/17. */ require('dotenv').config() describe('chrome extension is loaded properly when feature tests run', function () { it('creates a WWLTW chore in the backlog', function () { browser.setValue("[data-test='tracker-api-token'] input", process.env.TEST_PIVOTAL_TRACKER_TOKEN) browser.click('button=Submit') browser.pause(1000) browser.click('label=Test Project') browser.pause(1000) browser.url('https://www.pivotaltracker.com/signin') browser.setValue("#credentials_username", process.env.TEST_PIVOTAL_TRACKER_USERNAME) browser.click("#login_type_check_form input[type='submit']") browser.setValue("#credentials_password", process.env.TEST_PIVOTAL_TRACKER_PASSWORD ) browser.click("#login_type_check_form input[type='submit']") browser.click("a=Test Project") browser.pause(1000) expect(browser.getText(".story_name*=WWLTW for the week of")).toMatch(/WWLTW for the week of \d{1,2}\/\d{1,2}/) }) })
/** * Created by pivotal on 5/19/17. */ require('dotenv').config() describe('chrome extension is loaded properly when feature tests run', function () { - beforeEach(function () { - jasmine.getEnv().defaultTimeoutInterval = 1000000 - }) - it('creates a WWLTW chore in the backlog', function () { browser.setValue("[data-test='tracker-api-token'] input", process.env.TEST_PIVOTAL_TRACKER_TOKEN) browser.click('button=Submit') browser.pause(1000) browser.click('label=Test Project') browser.pause(1000) browser.url('https://www.pivotaltracker.com/signin') browser.setValue("#credentials_username", process.env.TEST_PIVOTAL_TRACKER_USERNAME) browser.click("#login_type_check_form input[type='submit']") browser.setValue("#credentials_password", process.env.TEST_PIVOTAL_TRACKER_PASSWORD ) browser.click("#login_type_check_form input[type='submit']") browser.click("a=Test Project") browser.pause(1000) expect(browser.getText(".story_name*=WWLTW for the week of")).toMatch(/WWLTW for the week of \d{1,2}\/\d{1,2}/) }) })
4
0.137931
0
4
3e239b48becb9359850c7f016ba7ab67aa6a68bf
ui/src/main/js/client/scheduler-client.js
ui/src/main/js/client/scheduler-client.js
function makeClient() { const transport = new Thrift.Transport('/api'); const protocol = new Thrift.Protocol(transport); return new ReadOnlySchedulerClient(protocol); } export default makeClient();
import { isNully } from 'utils/Common'; function getBaseUrl() { // Power feature: load a different Scheduler URL from local storage to test against live APIs. // // In your browser console: // window.localStorage.apiUrl = 'http://myauroracluster.com'; // // To remove the item: // window.localStorage.removeItem('apiUrl') if (window && window.localStorage) { return isNully(window.localStorage.apiUrl) ? '' : window.localStorage.apiUrl; } return ''; } function makeClient() { const transport = new Thrift.Transport(`${getBaseUrl()}/api`); const protocol = new Thrift.Protocol(transport); return new ReadOnlySchedulerClient(protocol); } export default makeClient();
Add support for controlling API url in UI without modifying code.
Add support for controlling API url in UI without modifying code. Reviewed at https://reviews.apache.org/r/63040/
JavaScript
apache-2.0
medallia/aurora,medallia/aurora,crashlytics/aurora,crashlytics/aurora,crashlytics/aurora,apache/aurora,thinker0/aurora,rdelval/aurora,thinker0/aurora,thinker0/aurora,apache/aurora,thinker0/aurora,rdelval/aurora,thinker0/aurora,medallia/aurora,medallia/aurora,medallia/aurora,medallia/aurora,rdelval/aurora,rdelval/aurora,apache/aurora,crashlytics/aurora,thinker0/aurora,apache/aurora,apache/aurora,rdelval/aurora,crashlytics/aurora,rdelval/aurora,crashlytics/aurora,apache/aurora
javascript
## Code Before: function makeClient() { const transport = new Thrift.Transport('/api'); const protocol = new Thrift.Protocol(transport); return new ReadOnlySchedulerClient(protocol); } export default makeClient(); ## Instruction: Add support for controlling API url in UI without modifying code. Reviewed at https://reviews.apache.org/r/63040/ ## Code After: import { isNully } from 'utils/Common'; function getBaseUrl() { // Power feature: load a different Scheduler URL from local storage to test against live APIs. // // In your browser console: // window.localStorage.apiUrl = 'http://myauroracluster.com'; // // To remove the item: // window.localStorage.removeItem('apiUrl') if (window && window.localStorage) { return isNully(window.localStorage.apiUrl) ? '' : window.localStorage.apiUrl; } return ''; } function makeClient() { const transport = new Thrift.Transport(`${getBaseUrl()}/api`); const protocol = new Thrift.Protocol(transport); return new ReadOnlySchedulerClient(protocol); } export default makeClient();
+ import { isNully } from 'utils/Common'; + + function getBaseUrl() { + // Power feature: load a different Scheduler URL from local storage to test against live APIs. + // + // In your browser console: + // window.localStorage.apiUrl = 'http://myauroracluster.com'; + // + // To remove the item: + // window.localStorage.removeItem('apiUrl') + if (window && window.localStorage) { + return isNully(window.localStorage.apiUrl) ? '' : window.localStorage.apiUrl; + } + return ''; + } + function makeClient() { - const transport = new Thrift.Transport('/api'); ? ^ ^ + const transport = new Thrift.Transport(`${getBaseUrl()}/api`); ? ^^^^^^^^^^^^^^^^ ^ const protocol = new Thrift.Protocol(transport); return new ReadOnlySchedulerClient(protocol); } export default makeClient();
18
2.571429
17
1
b3fffefb957e49718c1b6d98888492f8c2a1191c
Troubleshooting-tips.md
Troubleshooting-tips.md
Create a registry key file (`dump.reg`) with the contents below, then execute it. The settings mean that every crash will produce a full dump (`DumpType`=2) in the folder specified by `DumpFolder`, and at most one will be kept (every subsequent crash will overwrite the file, because `DumpCount`=1). After this key is set, repro the issue and it should produce a dump file named after the crashing process. Use the registry editor to delete this key. ``` Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps] "DumpFolder"="c:\\localdumps" "DumpCount"=dword:00000001 "DumpType"=dword:00000002 ``` More [information](https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx)
Create a registry key file (`dump.reg`) with the contents below, then execute it. The settings mean that every crash will produce a full dump (`DumpType`=2) in the folder specified by `DumpFolder`, and at most one will be kept (every subsequent crash will overwrite the file, because `DumpCount`=1). After this key is set, repro the issue and it should produce a dump file named after the crashing process. Use the registry editor to delete this key. ``` Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps] "DumpFolder"="c:\\localdumps" "DumpCount"=dword:00000001 "DumpType"=dword:00000002 ``` More [information](https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx) ## Running the compiler with a long command line Often times the command-line recorded by msbuild logs is very long. Simply copy/pasting it into a command window fails, because the line gets truncated. The solution is to copy the command-line options into a test file (for instance, `repro.rsp`) then invoke the compiler with `csc.exe /noconfig @repro.rsp`. The same thing works with `vbc.exe`.
Add section on RSP file
Add section on RSP file
Markdown
mit
panopticoncentral/roslyn,KevinRansom/roslyn,physhi/roslyn,sharwell/roslyn,jasonmalinowski/roslyn,KirillOsenkov/roslyn,davkean/roslyn,CyrusNajmabadi/roslyn,dotnet/roslyn,mavasani/roslyn,tannergooding/roslyn,tmat/roslyn,weltkante/roslyn,brettfo/roslyn,heejaechang/roslyn,dotnet/roslyn,shyamnamboodiripad/roslyn,panopticoncentral/roslyn,mgoertz-msft/roslyn,heejaechang/roslyn,KirillOsenkov/roslyn,tmat/roslyn,eriawan/roslyn,diryboy/roslyn,genlu/roslyn,eriawan/roslyn,bartdesmet/roslyn,CyrusNajmabadi/roslyn,physhi/roslyn,dotnet/roslyn,wvdd007/roslyn,stephentoub/roslyn,gafter/roslyn,KirillOsenkov/roslyn,AlekseyTs/roslyn,mgoertz-msft/roslyn,AlekseyTs/roslyn,heejaechang/roslyn,diryboy/roslyn,aelij/roslyn,wvdd007/roslyn,mavasani/roslyn,abock/roslyn,sharwell/roslyn,mgoertz-msft/roslyn,tannergooding/roslyn,genlu/roslyn,agocke/roslyn,weltkante/roslyn,agocke/roslyn,eriawan/roslyn,gafter/roslyn,genlu/roslyn,bartdesmet/roslyn,brettfo/roslyn,KevinRansom/roslyn,ErikSchierboom/roslyn,abock/roslyn,ErikSchierboom/roslyn,jasonmalinowski/roslyn,physhi/roslyn,AmadeusW/roslyn,davkean/roslyn,stephentoub/roslyn,reaction1989/roslyn,aelij/roslyn,tannergooding/roslyn,shyamnamboodiripad/roslyn,CyrusNajmabadi/roslyn,stephentoub/roslyn,davkean/roslyn,jmarolf/roslyn,wvdd007/roslyn,diryboy/roslyn,tmat/roslyn,KevinRansom/roslyn,shyamnamboodiripad/roslyn,panopticoncentral/roslyn,jmarolf/roslyn,bartdesmet/roslyn,AmadeusW/roslyn,reaction1989/roslyn,AmadeusW/roslyn,mavasani/roslyn,brettfo/roslyn,gafter/roslyn,weltkante/roslyn,ErikSchierboom/roslyn,jasonmalinowski/roslyn,abock/roslyn,reaction1989/roslyn,jmarolf/roslyn,sharwell/roslyn,agocke/roslyn,aelij/roslyn,AlekseyTs/roslyn
markdown
## Code Before: Create a registry key file (`dump.reg`) with the contents below, then execute it. The settings mean that every crash will produce a full dump (`DumpType`=2) in the folder specified by `DumpFolder`, and at most one will be kept (every subsequent crash will overwrite the file, because `DumpCount`=1). After this key is set, repro the issue and it should produce a dump file named after the crashing process. Use the registry editor to delete this key. ``` Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps] "DumpFolder"="c:\\localdumps" "DumpCount"=dword:00000001 "DumpType"=dword:00000002 ``` More [information](https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx) ## Instruction: Add section on RSP file ## Code After: Create a registry key file (`dump.reg`) with the contents below, then execute it. The settings mean that every crash will produce a full dump (`DumpType`=2) in the folder specified by `DumpFolder`, and at most one will be kept (every subsequent crash will overwrite the file, because `DumpCount`=1). After this key is set, repro the issue and it should produce a dump file named after the crashing process. Use the registry editor to delete this key. ``` Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps] "DumpFolder"="c:\\localdumps" "DumpCount"=dword:00000001 "DumpType"=dword:00000002 ``` More [information](https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx) ## Running the compiler with a long command line Often times the command-line recorded by msbuild logs is very long. Simply copy/pasting it into a command window fails, because the line gets truncated. The solution is to copy the command-line options into a test file (for instance, `repro.rsp`) then invoke the compiler with `csc.exe /noconfig @repro.rsp`. The same thing works with `vbc.exe`.
Create a registry key file (`dump.reg`) with the contents below, then execute it. The settings mean that every crash will produce a full dump (`DumpType`=2) in the folder specified by `DumpFolder`, and at most one will be kept (every subsequent crash will overwrite the file, because `DumpCount`=1). After this key is set, repro the issue and it should produce a dump file named after the crashing process. Use the registry editor to delete this key. ``` Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps] "DumpFolder"="c:\\localdumps" "DumpCount"=dword:00000001 "DumpType"=dword:00000002 ``` More [information](https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx) + + ## Running the compiler with a long command line + + Often times the command-line recorded by msbuild logs is very long. Simply copy/pasting it into a command window fails, because the line gets truncated. + + The solution is to copy the command-line options into a test file (for instance, `repro.rsp`) then invoke the compiler with `csc.exe /noconfig @repro.rsp`. The same thing works with `vbc.exe`.
6
0.352941
6
0
4c6da54ee9e8d19ed41d50154fa76d975d270c9a
src/prefixer.js
src/prefixer.js
/** * Based on https://github.com/jsstyles/css-vendor, but without having to * convert between different cases all the time. * * @flow */ import InlineStylePrefixer from 'inline-style-prefixer'; function transformValues(style) { return Object.keys(style).reduce((newStyle, key) => { let value = style[key]; if (Array.isArray(value)) { value = value.join(';' + key + ':'); } newStyle[key] = value; return newStyle; }, {}); } // Returns a new style object with vendor prefixes added to property names // and values. export function getPrefixedStyle( style: Object, componentName: ?string, userAgent?: ?string, ): Object { const prefixer = new InlineStylePrefixer(userAgent); const prefixedStyle = prefixer.prefix(style); const prefixedStyleWithFallbacks = transformValues(prefixedStyle); return prefixedStyleWithFallbacks; }
/** * Based on https://github.com/jsstyles/css-vendor, but without having to * convert between different cases all the time. * * @flow */ import InlineStylePrefixer from 'inline-style-prefixer'; function transformValues(style) { return Object.keys(style).reduce((newStyle, key) => { let value = style[key]; if (Array.isArray(value)) { value = value.join(';' + key + ':'); } newStyle[key] = value; return newStyle; }, {}); } let lastUserAgent; let prefixer; // Returns a new style object with vendor prefixes added to property names // and values. export function getPrefixedStyle( style: Object, componentName: ?string, userAgent?: ?string, ): Object { const actualUserAgent = userAgent || (global && global.navigator && global.navigator.userAgent); if (!actualUserAgent) { throw new Error( 'Radium: userAgent must be supplied for server-side rendering. See ' + 'https://github.com/FormidableLabs/radium/tree/master/docs/api#radium ' + 'for more information.' ); } if (!prefixer || actualUserAgent !== lastUserAgent) { prefixer = new InlineStylePrefixer(actualUserAgent); lastUserAgent = actualUserAgent; } const prefixedStyle = prefixer.prefix(style); const prefixedStyleWithFallbacks = transformValues(prefixedStyle); return prefixedStyleWithFallbacks; }
Throw when no user agent supplied during server-side rendering
Throw when no user agent supplied during server-side rendering
JavaScript
mit
richardfickling/radium,nfl/radium,MicheleBertoli/radium,FormidableLabs/radium
javascript
## Code Before: /** * Based on https://github.com/jsstyles/css-vendor, but without having to * convert between different cases all the time. * * @flow */ import InlineStylePrefixer from 'inline-style-prefixer'; function transformValues(style) { return Object.keys(style).reduce((newStyle, key) => { let value = style[key]; if (Array.isArray(value)) { value = value.join(';' + key + ':'); } newStyle[key] = value; return newStyle; }, {}); } // Returns a new style object with vendor prefixes added to property names // and values. export function getPrefixedStyle( style: Object, componentName: ?string, userAgent?: ?string, ): Object { const prefixer = new InlineStylePrefixer(userAgent); const prefixedStyle = prefixer.prefix(style); const prefixedStyleWithFallbacks = transformValues(prefixedStyle); return prefixedStyleWithFallbacks; } ## Instruction: Throw when no user agent supplied during server-side rendering ## Code After: /** * Based on https://github.com/jsstyles/css-vendor, but without having to * convert between different cases all the time. * * @flow */ import InlineStylePrefixer from 'inline-style-prefixer'; function transformValues(style) { return Object.keys(style).reduce((newStyle, key) => { let value = style[key]; if (Array.isArray(value)) { value = value.join(';' + key + ':'); } newStyle[key] = value; return newStyle; }, {}); } let lastUserAgent; let prefixer; // Returns a new style object with vendor prefixes added to property names // and values. export function getPrefixedStyle( style: Object, componentName: ?string, userAgent?: ?string, ): Object { const actualUserAgent = userAgent || (global && global.navigator && global.navigator.userAgent); if (!actualUserAgent) { throw new Error( 'Radium: userAgent must be supplied for server-side rendering. See ' + 'https://github.com/FormidableLabs/radium/tree/master/docs/api#radium ' + 'for more information.' ); } if (!prefixer || actualUserAgent !== lastUserAgent) { prefixer = new InlineStylePrefixer(actualUserAgent); lastUserAgent = actualUserAgent; } const prefixedStyle = prefixer.prefix(style); const prefixedStyleWithFallbacks = transformValues(prefixedStyle); return prefixedStyleWithFallbacks; }
/** * Based on https://github.com/jsstyles/css-vendor, but without having to * convert between different cases all the time. * * @flow */ import InlineStylePrefixer from 'inline-style-prefixer'; function transformValues(style) { return Object.keys(style).reduce((newStyle, key) => { let value = style[key]; if (Array.isArray(value)) { value = value.join(';' + key + ':'); } newStyle[key] = value; return newStyle; }, {}); } + let lastUserAgent; + let prefixer; + // Returns a new style object with vendor prefixes added to property names // and values. export function getPrefixedStyle( style: Object, componentName: ?string, userAgent?: ?string, ): Object { + const actualUserAgent = userAgent || + (global && global.navigator && global.navigator.userAgent); + + if (!actualUserAgent) { + throw new Error( + 'Radium: userAgent must be supplied for server-side rendering. See ' + + 'https://github.com/FormidableLabs/radium/tree/master/docs/api#radium ' + + 'for more information.' + ); + } + + if (!prefixer || actualUserAgent !== lastUserAgent) { - const prefixer = new InlineStylePrefixer(userAgent); ? ^^^^^ + prefixer = new InlineStylePrefixer(actualUserAgent); ? ^ +++ +++ + lastUserAgent = actualUserAgent; + } + const prefixedStyle = prefixer.prefix(style); const prefixedStyleWithFallbacks = transformValues(prefixedStyle); return prefixedStyleWithFallbacks; }
20
0.625
19
1
5ace9e7218e8a554f2f1a53a15ed153880266e50
lib/collections/bets.js
lib/collections/bets.js
Bets = new Meteor.Collection("bets"); // { title: "", wager: "", status: "winner OR paid", // challenger_id: _id, defender_id: _id } // Meteor.publish("user_bets", function() { // return Bets.find( // {$or: [{challenger: user.username}, // {defender: user.username}] // } // } // })
Bets = new Mongo.Collection("bets");
Fix deprecated collections declaration for Bets from Meteor.collection to Mongo.collection
Fix deprecated collections declaration for Bets from Meteor.collection to Mongo.collection
JavaScript
mit
nmmascia/webet,nmmascia/webet
javascript
## Code Before: Bets = new Meteor.Collection("bets"); // { title: "", wager: "", status: "winner OR paid", // challenger_id: _id, defender_id: _id } // Meteor.publish("user_bets", function() { // return Bets.find( // {$or: [{challenger: user.username}, // {defender: user.username}] // } // } // }) ## Instruction: Fix deprecated collections declaration for Bets from Meteor.collection to Mongo.collection ## Code After: Bets = new Mongo.Collection("bets");
- Bets = new Meteor.Collection("bets"); ? --- ^ + Bets = new Mongo.Collection("bets"); ? ^^^ - // { title: "", wager: "", status: "winner OR paid", - // challenger_id: _id, defender_id: _id } - // Meteor.publish("user_bets", function() { - // return Bets.find( - // {$or: [{challenger: user.username}, - // {defender: user.username}] - // } - // } - // })
11
1.1
1
10
d76c22a32e53ce77d0cfd27178e1a8ebbf7c912f
fava/static/sass/_help.scss
fava/static/sass/_help.scss
// Help Pages @import "pygments"; .help-text { width: 660px; font: 16px $font_family_alternative; h1, h2, h3, h4, h5 { font-family: $font_family; } div { margin-bottom: 1em; } code { font-size: 1em; } hr { border: 1px solid darken($color_background, 20); } ul { padding-left: 2em; } li { list-style-type: disc; } } .help-sidebar { position: fixed; left: 850px; float: right; margin: 0 0 10px 10px; padding: 10px 10px 0 10px; border: 1px solid #eaeaea; background-color: #f8f8f8; border-radius: 1px; font-size: 1.1em; a { text-decoration: none; &:hover { text-decoration: underline; } &.selected { font-weight: 500; } } li { list-style-type: none; } }
// Help Pages @import "pygments"; .help-text { width: 660px; font: 16px $font_family_alternative; h1, h2, h3, h4, h5 { font-family: $font_family; } div { margin-bottom: 1em; } code { font-size: 1rem; } hr { border: 1px solid darken($color_background, 20); } ul { padding-left: 2em; } li { list-style-type: disc; } } .help-sidebar { position: fixed; left: 850px; float: right; margin: 0 0 10px 10px; padding: 10px 10px 0 10px; border: 1px solid #eaeaea; background-color: #f8f8f8; border-radius: 1px; font-size: 1.1em; a { text-decoration: none; &:hover { text-decoration: underline; } &.selected { font-weight: 500; } } li { list-style-type: none; } }
Update font-size for code-samples in help pages
Update font-size for code-samples in help pages
SCSS
mit
aumayr/beancount-web,corani/beancount-web,corani/beancount-web,aumayr/beancount-web,beancount/fava,yagebu/fava,corani/beancount-web,aumayr/beancount-web,yagebu/fava,beancount/fava,corani/beancount-web,yagebu/fava,yagebu/fava,beancount/fava,beancount/fava,beancount/fava,aumayr/beancount-web,yagebu/fava
scss
## Code Before: // Help Pages @import "pygments"; .help-text { width: 660px; font: 16px $font_family_alternative; h1, h2, h3, h4, h5 { font-family: $font_family; } div { margin-bottom: 1em; } code { font-size: 1em; } hr { border: 1px solid darken($color_background, 20); } ul { padding-left: 2em; } li { list-style-type: disc; } } .help-sidebar { position: fixed; left: 850px; float: right; margin: 0 0 10px 10px; padding: 10px 10px 0 10px; border: 1px solid #eaeaea; background-color: #f8f8f8; border-radius: 1px; font-size: 1.1em; a { text-decoration: none; &:hover { text-decoration: underline; } &.selected { font-weight: 500; } } li { list-style-type: none; } } ## Instruction: Update font-size for code-samples in help pages ## Code After: // Help Pages @import "pygments"; .help-text { width: 660px; font: 16px $font_family_alternative; h1, h2, h3, h4, h5 { font-family: $font_family; } div { margin-bottom: 1em; } code { font-size: 1rem; } hr { border: 1px solid darken($color_background, 20); } ul { padding-left: 2em; } li { list-style-type: disc; } } .help-sidebar { position: fixed; left: 850px; float: right; margin: 0 0 10px 10px; padding: 10px 10px 0 10px; border: 1px solid #eaeaea; background-color: #f8f8f8; border-radius: 1px; font-size: 1.1em; a { text-decoration: none; &:hover { text-decoration: underline; } &.selected { font-weight: 500; } } li { list-style-type: none; } }
// Help Pages @import "pygments"; .help-text { width: 660px; font: 16px $font_family_alternative; h1, h2, h3, h4, h5 { font-family: $font_family; } + div { - div { margin-bottom: 1em; } ? --- ^ -- + margin-bottom: 1em; ? ^^ + } code { - font-size: 1em; + font-size: 1rem; ? + } hr { border: 1px solid darken($color_background, 20); } ul { padding-left: 2em; } li { list-style-type: disc; } } .help-sidebar { position: fixed; left: 850px; float: right; margin: 0 0 10px 10px; padding: 10px 10px 0 10px; border: 1px solid #eaeaea; background-color: #f8f8f8; border-radius: 1px; font-size: 1.1em; a { text-decoration: none; &:hover { text-decoration: underline; } &.selected { font-weight: 500; } } li { list-style-type: none; } }
6
0.113208
4
2
c8de885fa70483705452650a222b9ae4384a1c5d
actionCreators.js
actionCreators.js
/** * Return an array of function of the form x => { type, payload = x } */ export function createActions(...types) { return types.map(createAction) } /** * Create a single action of the form x => { type, payload = x } */ export function createAction(type) { return (payload, error) => (Object.assign({ type }, payload ? { payload } : {}, error ? { error } : {})) } /** * Create a single action of the form x => { type } * Use this for actions that do not carry any payload, this is useful especially if the action is * going to be used as an event handler to avoid accidentally including the DOM event as payload. */ export function createAction0(type) { return () => ({ type }) } /** * Return an array of action creators. * Use this for actions that do not carry any payload. * * @returns {Array} */ export function creactActions0(...types) { return types.map(createAction0) }
/** * Return an array of function of the form x => { type, payload = x } */ export function createActions(...types) { return types.map(createAction) } /** * Create a single action of the form x => { type, payload = x } * * @returns {Array} */ export function createAction(type) { return (payload, error) => (Object.assign({ type }, payload ? { payload } : {}, error ? { error } : {})) } /** * Create a single action of the form x => { type } * Use this for actions that do not carry any payload, this is useful especially if the action is * going to be used as an event handler to avoid accidentally including the DOM event as payload. */ export function createAction0(type) { return () => ({ type }) } /** * Return an array of action creators. * Use this for actions that do not carry any payload. * * @returns {Array} */ export function creactActions0(...types) { return types.map(createAction0) }
Add newline in file to keep github happy
Add newline in file to keep github happy
JavaScript
mit
nicocrm/f1-redux-utils
javascript
## Code Before: /** * Return an array of function of the form x => { type, payload = x } */ export function createActions(...types) { return types.map(createAction) } /** * Create a single action of the form x => { type, payload = x } */ export function createAction(type) { return (payload, error) => (Object.assign({ type }, payload ? { payload } : {}, error ? { error } : {})) } /** * Create a single action of the form x => { type } * Use this for actions that do not carry any payload, this is useful especially if the action is * going to be used as an event handler to avoid accidentally including the DOM event as payload. */ export function createAction0(type) { return () => ({ type }) } /** * Return an array of action creators. * Use this for actions that do not carry any payload. * * @returns {Array} */ export function creactActions0(...types) { return types.map(createAction0) } ## Instruction: Add newline in file to keep github happy ## Code After: /** * Return an array of function of the form x => { type, payload = x } */ export function createActions(...types) { return types.map(createAction) } /** * Create a single action of the form x => { type, payload = x } * * @returns {Array} */ export function createAction(type) { return (payload, error) => (Object.assign({ type }, payload ? { payload } : {}, error ? { error } : {})) } /** * Create a single action of the form x => { type } * Use this for actions that do not carry any payload, this is useful especially if the action is * going to be used as an event handler to avoid accidentally including the DOM event as payload. */ export function createAction0(type) { return () => ({ type }) } /** * Return an array of action creators. * Use this for actions that do not carry any payload. * * @returns {Array} */ export function creactActions0(...types) { return types.map(createAction0) }
/** * Return an array of function of the form x => { type, payload = x } */ export function createActions(...types) { return types.map(createAction) } /** * Create a single action of the form x => { type, payload = x } + * + * @returns {Array} */ export function createAction(type) { return (payload, error) => (Object.assign({ type }, payload ? { payload } : {}, error ? { error } : {})) } /** * Create a single action of the form x => { type } * Use this for actions that do not carry any payload, this is useful especially if the action is * going to be used as an event handler to avoid accidentally including the DOM event as payload. */ export function createAction0(type) { return () => ({ type }) } /** * Return an array of action creators. * Use this for actions that do not carry any payload. - * ? - + * * @returns {Array} */ export function creactActions0(...types) { return types.map(createAction0) }
4
0.125
3
1
79e4839c06d8a3ae8de0c9a7c0cf7b536016dde3
pyglab/pyglab.py
pyglab/pyglab.py
_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = None self._per_page = None def sudo(self, user): """Permanently set a different username. Returns the old username.""" previous_user = self._user self._user = user return previous_user def request(self, request_type, url, params={}, sudo=None, page=None, per_page=None): if sudo is None and self._user is not None: sudo = _self.user if per_page is None and self._per_page is None: per_page = self._per_page r = ApiRequest(request_type, self._base_url + '/' + url.lstrip('/'), self._token, params, sudo, page, per_page) return r.content @property def users(self): u = self.request(RequestType.GET, '/users') return Users(u) def users_by_name(self, name): params = {'search': name} u = self.request(RequestType.GET, '/users', params=params) return Users(u)
_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = None self._per_page = None def sudo(self, user): """Permanently set a different username. Returns the old username.""" previous_user = self._user self._user = user return previous_user def request(self, request_type, url, params={}, sudo=None, page=None, per_page=None): if sudo is None and self._user is not None: sudo = _self.user if per_page is None and self._per_page is None: per_page = self._per_page r = ApiRequest(request_type, self._base_url + '/' + url.lstrip('/'), self._token, params, sudo, page, per_page) return r.content @property def users(self): return Users(self)
Create exactly one users function.
Create exactly one users function.
Python
mit
sloede/pyglab,sloede/pyglab
python
## Code Before: _defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = None self._per_page = None def sudo(self, user): """Permanently set a different username. Returns the old username.""" previous_user = self._user self._user = user return previous_user def request(self, request_type, url, params={}, sudo=None, page=None, per_page=None): if sudo is None and self._user is not None: sudo = _self.user if per_page is None and self._per_page is None: per_page = self._per_page r = ApiRequest(request_type, self._base_url + '/' + url.lstrip('/'), self._token, params, sudo, page, per_page) return r.content @property def users(self): u = self.request(RequestType.GET, '/users') return Users(u) def users_by_name(self, name): params = {'search': name} u = self.request(RequestType.GET, '/users', params=params) return Users(u) ## Instruction: Create exactly one users function. ## Code After: _defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = None self._per_page = None def sudo(self, user): """Permanently set a different username. Returns the old username.""" previous_user = self._user self._user = user return previous_user def request(self, request_type, url, params={}, sudo=None, page=None, per_page=None): if sudo is None and self._user is not None: sudo = _self.user if per_page is None and self._per_page is None: per_page = self._per_page r = ApiRequest(request_type, self._base_url + '/' + url.lstrip('/'), self._token, params, sudo, page, per_page) return r.content @property def users(self): return Users(self)
_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = None self._per_page = None def sudo(self, user): """Permanently set a different username. Returns the old username.""" previous_user = self._user self._user = user return previous_user def request(self, request_type, url, params={}, sudo=None, page=None, per_page=None): if sudo is None and self._user is not None: sudo = _self.user if per_page is None and self._per_page is None: per_page = self._per_page r = ApiRequest(request_type, self._base_url + '/' + url.lstrip('/'), self._token, params, sudo, page, per_page) return r.content @property def users(self): - u = self.request(RequestType.GET, '/users') - return Users(u) ? ^ + return Users(self) ? ^^^^ - - def users_by_name(self, name): - params = {'search': name} - u = self.request(RequestType.GET, '/users', params=params) - return Users(u)
8
0.205128
1
7