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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
664ce646983abc10fc6437b400b18bdca26b48c5 | linter.py | linter.py |
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface to rpmlint."""
syntax = 'rpm spec'
cmd = 'rpmlint'
executable = None
regex = (
r'^(?P<line>\d+):'
r'((?P<warning>W\:)|(?P<error>error\:)):'
r'(?P<message>.+)'
)
tempfile_suffix = '-'
error_stream = util.STREAM_STDOUT
word_re = r'^(".*?"|[-\w]+)'
|
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface to rpmlint."""
syntax = 'rpm spec'
cmd = 'rpmlint'
executable = None
regex = (
r'(?P<line>\d+):'
r'(?:(?P<warning>W)|(?P<error>error))'
r'(?:P<message>.+)'
)
tempfile_suffix = '-'
error_stream = util.STREAM_STDOUT
| Fix regexp for rpmlint output | Fix regexp for rpmlint output
| Python | mit | SergK/SublimeLinter-contrib-rpmlint | python | ## Code Before:
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface to rpmlint."""
syntax = 'rpm spec'
cmd = 'rpmlint'
executable = None
regex = (
r'^(?P<line>\d+):'
r'((?P<warning>W\:)|(?P<error>error\:)):'
r'(?P<message>.+)'
)
tempfile_suffix = '-'
error_stream = util.STREAM_STDOUT
word_re = r'^(".*?"|[-\w]+)'
## Instruction:
Fix regexp for rpmlint output
## Code After:
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface to rpmlint."""
syntax = 'rpm spec'
cmd = 'rpmlint'
executable = None
regex = (
r'(?P<line>\d+):'
r'(?:(?P<warning>W)|(?P<error>error))'
r'(?:P<message>.+)'
)
tempfile_suffix = '-'
error_stream = util.STREAM_STDOUT
|
"""This module exports the Rpmlint plugin class."""
from SublimeLinter.lint import Linter, util
class Rpmlint(Linter):
"""Provides an interface to rpmlint."""
syntax = 'rpm spec'
cmd = 'rpmlint'
executable = None
regex = (
- r'^(?P<line>\d+):'
? -
+ r'(?P<line>\d+):'
- r'((?P<warning>W\:)|(?P<error>error\:)):'
? -- -- -
+ r'(?:(?P<warning>W)|(?P<error>error))'
? ++
- r'(?P<message>.+)'
+ r'(?:P<message>.+)'
? +
)
tempfile_suffix = '-'
error_stream = util.STREAM_STDOUT
- word_re = r'^(".*?"|[-\w]+)'
+ | 8 | 0.380952 | 4 | 4 |
b6b676be62b38fd3ff4b3e26688d48deed3a6104 | test/fetch_test.sh | test/fetch_test.sh | . ./test/helper.sh
function setUp()
{
RUBY=ruby
}
function test_fetch()
{
local key="1.8.7"
local expected="1.8.7-p374"
local value=$(fetch "$RUBY/versions" "$key")
assertEquals "did not fetch the correct value" "$expected" "$value"
}
function test_fetch_with_excess_whitespace()
{
local key="ruby-1.8.7-p374.tar.bz2"
local expected="83c92e2b57ea08f31187060098b2200b"
local value=$(fetch "$RUBY/md5" "$key")
assertEquals "did not fetch the correct value" "$expected" "$value"
}
function test_fetch_with_unknown_key()
{
local key="foo"
local expected=""
local value=$(fetch "$RUBY/versions" "$key")
assertEquals "returned the wrong value" "$expected" "$value"
}
SHUNIT_PARENT=$0 . $SHUNIT2
| . ./test/helper.sh
RUBY_INSTALL_DIR="./test/tmp"
FILE="$RUBY_INSTALL_DIR/db.txt"
function setUp()
{
mkdir "$RUBY_INSTALL_DIR"
}
function test_fetch()
{
local key="1.8.7"
local expected="1.8.7-p374"
echo "$key: $expected" > "$FILE"
local value=$(fetch "db" "$key")
assertEquals "did not fetch the correct value" "$expected" "$value"
}
function test_fetch_with_excess_whitespace()
{
local key="ruby-1.8.7-p374.tar.bz2"
local expected="83c92e2b57ea08f31187060098b2200b"
echo "$key: $expected" > "$FILE"
local value=$(fetch "db" "$key")
assertEquals "did not fetch the correct value" "$expected" "$value"
}
function test_fetch_with_unknown_key()
{
local key="foo"
local expected=""
echo "bar: bar" > "$FILE"
local value=$(fetch "db" "$key")
assertEquals "returned the wrong value" "$expected" "$value"
}
function tearDown()
{
rm -r "$RUBY_INSTALL_DIR"
}
SHUNIT_PARENT=$0 . $SHUNIT2
| Test fetch() with auto-generated files. | Test fetch() with auto-generated files.
| Shell | mit | firstval/ruby-install,bascht/ruby-install,PLOS/ruby-install,postmodern/ruby-install,FreedomBen/ruby-install,firstval/ruby-install,boone/ruby-install,boone/ruby-install,regularfry/ruby-install,PLOS/ruby-install,bascht/ruby-install,ngpestelos/ruby-install,gevans/miner-install,ngpestelos/ruby-install,postmodern/ruby-install,regularfry/ruby-install,FreedomBen/ruby-install | shell | ## Code Before:
. ./test/helper.sh
function setUp()
{
RUBY=ruby
}
function test_fetch()
{
local key="1.8.7"
local expected="1.8.7-p374"
local value=$(fetch "$RUBY/versions" "$key")
assertEquals "did not fetch the correct value" "$expected" "$value"
}
function test_fetch_with_excess_whitespace()
{
local key="ruby-1.8.7-p374.tar.bz2"
local expected="83c92e2b57ea08f31187060098b2200b"
local value=$(fetch "$RUBY/md5" "$key")
assertEquals "did not fetch the correct value" "$expected" "$value"
}
function test_fetch_with_unknown_key()
{
local key="foo"
local expected=""
local value=$(fetch "$RUBY/versions" "$key")
assertEquals "returned the wrong value" "$expected" "$value"
}
SHUNIT_PARENT=$0 . $SHUNIT2
## Instruction:
Test fetch() with auto-generated files.
## Code After:
. ./test/helper.sh
RUBY_INSTALL_DIR="./test/tmp"
FILE="$RUBY_INSTALL_DIR/db.txt"
function setUp()
{
mkdir "$RUBY_INSTALL_DIR"
}
function test_fetch()
{
local key="1.8.7"
local expected="1.8.7-p374"
echo "$key: $expected" > "$FILE"
local value=$(fetch "db" "$key")
assertEquals "did not fetch the correct value" "$expected" "$value"
}
function test_fetch_with_excess_whitespace()
{
local key="ruby-1.8.7-p374.tar.bz2"
local expected="83c92e2b57ea08f31187060098b2200b"
echo "$key: $expected" > "$FILE"
local value=$(fetch "db" "$key")
assertEquals "did not fetch the correct value" "$expected" "$value"
}
function test_fetch_with_unknown_key()
{
local key="foo"
local expected=""
echo "bar: bar" > "$FILE"
local value=$(fetch "db" "$key")
assertEquals "returned the wrong value" "$expected" "$value"
}
function tearDown()
{
rm -r "$RUBY_INSTALL_DIR"
}
SHUNIT_PARENT=$0 . $SHUNIT2
| . ./test/helper.sh
+
+ RUBY_INSTALL_DIR="./test/tmp"
+ FILE="$RUBY_INSTALL_DIR/db.txt"
function setUp()
{
- RUBY=ruby
+ mkdir "$RUBY_INSTALL_DIR"
}
function test_fetch()
{
local key="1.8.7"
local expected="1.8.7-p374"
+
+ echo "$key: $expected" > "$FILE"
+
- local value=$(fetch "$RUBY/versions" "$key")
? ^^^^^^^^^^^^^^
+ local value=$(fetch "db" "$key")
? ^^
assertEquals "did not fetch the correct value" "$expected" "$value"
}
function test_fetch_with_excess_whitespace()
{
local key="ruby-1.8.7-p374.tar.bz2"
local expected="83c92e2b57ea08f31187060098b2200b"
+
+ echo "$key: $expected" > "$FILE"
+
- local value=$(fetch "$RUBY/md5" "$key")
? ------- ^
+ local value=$(fetch "db" "$key")
? ^
assertEquals "did not fetch the correct value" "$expected" "$value"
}
function test_fetch_with_unknown_key()
{
local key="foo"
local expected=""
+
+ echo "bar: bar" > "$FILE"
+
- local value=$(fetch "$RUBY/versions" "$key")
? ^^^^^^^^^^^^^^
+ local value=$(fetch "db" "$key")
? ^^
assertEquals "returned the wrong value" "$expected" "$value"
}
+ function tearDown()
+ {
+ rm -r "$RUBY_INSTALL_DIR"
+ }
+
SHUNIT_PARENT=$0 . $SHUNIT2 | 25 | 0.714286 | 21 | 4 |
e914f26f93e65b20c45c2c4d58c56fc78e04f128 | README.md | README.md |
Just me trying out the tutorials at http://os.phil-opp.com/.
## Building
If you have all the build tools from the tutorial, you can:
```
$ make iso
```
If not, but you have [Docker](https://www.docker.com), just run:
```bash
$ make dockerbuild
```
Then, to run the thing, make sure you have [QEMU](http://www.qemu.org) and run:
```bash
$ make run
```
|
Just me trying out the tutorials at http://os.phil-opp.com/.
## Building
If you have all the build tools from the tutorial, you can:
```
$ make iso
```
If not, but you have [Docker](https://www.docker.com), just run:
```bash
$ make dockerbuild
```
If you also don't have Make, but you do have Docker, you can:
```bash
$ docker build -t buildy-thing .
$ docker run --rm -v $PWD:/build buildy-thing
```
## Running
Once you have the `.iso` built, make sure you have [QEMU](http://www.qemu.org)
and run:
```bash
$ make run
```
Or, without Make:
```bash
$ qemu-system-x86_64 -hda build/os-x86_64.iso
```
Or you can use the `.iso` in other virtualization things, or burn it to a CD
or whatever!
| Make the instructions more confusing | Make the instructions more confusing | Markdown | mit | grampajoe/rust-kernel | markdown | ## Code Before:
Just me trying out the tutorials at http://os.phil-opp.com/.
## Building
If you have all the build tools from the tutorial, you can:
```
$ make iso
```
If not, but you have [Docker](https://www.docker.com), just run:
```bash
$ make dockerbuild
```
Then, to run the thing, make sure you have [QEMU](http://www.qemu.org) and run:
```bash
$ make run
```
## Instruction:
Make the instructions more confusing
## Code After:
Just me trying out the tutorials at http://os.phil-opp.com/.
## Building
If you have all the build tools from the tutorial, you can:
```
$ make iso
```
If not, but you have [Docker](https://www.docker.com), just run:
```bash
$ make dockerbuild
```
If you also don't have Make, but you do have Docker, you can:
```bash
$ docker build -t buildy-thing .
$ docker run --rm -v $PWD:/build buildy-thing
```
## Running
Once you have the `.iso` built, make sure you have [QEMU](http://www.qemu.org)
and run:
```bash
$ make run
```
Or, without Make:
```bash
$ qemu-system-x86_64 -hda build/os-x86_64.iso
```
Or you can use the `.iso` in other virtualization things, or burn it to a CD
or whatever!
|
Just me trying out the tutorials at http://os.phil-opp.com/.
## Building
If you have all the build tools from the tutorial, you can:
```
$ make iso
```
If not, but you have [Docker](https://www.docker.com), just run:
```bash
$ make dockerbuild
```
- Then, to run the thing, make sure you have [QEMU](http://www.qemu.org) and run:
+ If you also don't have Make, but you do have Docker, you can:
+
+ ```bash
+ $ docker build -t buildy-thing .
+ $ docker run --rm -v $PWD:/build buildy-thing
+ ```
+
+ ## Running
+
+ Once you have the `.iso` built, make sure you have [QEMU](http://www.qemu.org)
+ and run:
```bash
$ make run
```
+
+ Or, without Make:
+
+ ```bash
+ $ qemu-system-x86_64 -hda build/os-x86_64.iso
+ ```
+
+ Or you can use the `.iso` in other virtualization things, or burn it to a CD
+ or whatever! | 21 | 0.954545 | 20 | 1 |
bc9d8f4f607ce4d620363723eef079c9eb278899 | src/lib/Earner.php | src/lib/Earner.php | <?php
namespace UoMCS\OpenBadges\Backend;
class Earner extends Base
{
public $data = array(
'id' => null,
'identity' => null,
'hashed' => null,
'type' => null,
);
protected static $table_name = 'earners';
public function toJson()
{
$data = $this->data;
$data['hashed'] = (bool) $data['hashed'];
return json_encode($data, true);
}
}
| <?php
namespace UoMCS\OpenBadges\Backend;
class Earner extends Base
{
public $data = array(
'id' => null,
'identity' => null,
'hashed' => null,
'type' => null,
);
protected static $table_name = 'earners';
public function toJson()
{
$data = $this->data;
// Remove unnecessary elements
unset($data['id']);
$data['hashed'] = (bool) $data['hashed'];
return json_encode($data, true);
}
}
| Remove fields not in spec from JSON | Remove fields not in spec from JSON
| PHP | mit | UoMCS/openbadges-backend | php | ## Code Before:
<?php
namespace UoMCS\OpenBadges\Backend;
class Earner extends Base
{
public $data = array(
'id' => null,
'identity' => null,
'hashed' => null,
'type' => null,
);
protected static $table_name = 'earners';
public function toJson()
{
$data = $this->data;
$data['hashed'] = (bool) $data['hashed'];
return json_encode($data, true);
}
}
## Instruction:
Remove fields not in spec from JSON
## Code After:
<?php
namespace UoMCS\OpenBadges\Backend;
class Earner extends Base
{
public $data = array(
'id' => null,
'identity' => null,
'hashed' => null,
'type' => null,
);
protected static $table_name = 'earners';
public function toJson()
{
$data = $this->data;
// Remove unnecessary elements
unset($data['id']);
$data['hashed'] = (bool) $data['hashed'];
return json_encode($data, true);
}
}
| <?php
namespace UoMCS\OpenBadges\Backend;
class Earner extends Base
{
public $data = array(
'id' => null,
'identity' => null,
'hashed' => null,
'type' => null,
);
protected static $table_name = 'earners';
public function toJson()
{
$data = $this->data;
+ // Remove unnecessary elements
+ unset($data['id']);
+
$data['hashed'] = (bool) $data['hashed'];
return json_encode($data, true);
}
} | 3 | 0.125 | 3 | 0 |
d2aa92cc3eefbe1f4d464ce72f055cfaf11169ec | .travis.yml | .travis.yml | language: java
notifications:
email:
- douglas.orr99@gmail.com
| language: java
script:
- travis_wait ./gradlew check
jdk:
- oraclejdk8
- openjdk6
notifications:
email:
- douglas.orr99@gmail.com
| Configure build to wait for tests | Configure build to wait for tests
| YAML | mit | DouglasOrr/SharedCollections | yaml | ## Code Before:
language: java
notifications:
email:
- douglas.orr99@gmail.com
## Instruction:
Configure build to wait for tests
## Code After:
language: java
script:
- travis_wait ./gradlew check
jdk:
- oraclejdk8
- openjdk6
notifications:
email:
- douglas.orr99@gmail.com
| language: java
+
+ script:
+ - travis_wait ./gradlew check
+
+ jdk:
+ - oraclejdk8
+ - openjdk6
notifications:
email:
- douglas.orr99@gmail.com | 7 | 1.4 | 7 | 0 |
9232fafa099bf97cd84fb398cf710053dd7fcde7 | CHANGES.rst | CHANGES.rst | =======
retools
=======
0.2 (**tip**)
=============
Features
--------
- Statistics for the cache is now optional and can be disabled to slightly
reduce the Redis queries used to store/retrieve cache data.
Internals
---------
- Heavily refactored ``Connection`` to not be a class singleton, instead
a global_connection instance is created and used by default.
- Increased conditional coverage to 100% (via instrumental).
Backwards Incompatibilities
---------------------------
- Changing the default global Redis connection has changed semantics, instead
of using ``Connection.set_default``, you should set the global_connection's
redis property directly::
import redis
from retools import global_connection
global_connection.redis = redis.Redis(host='myhost')
Incompatibilities
-----------------
- Removed clear argument from invalidate_region, as removing keys from the
set but not removing the hit statistics can lead to data accumulating in
Redis that has no easy removal other than .keys() which should not be run
in production environments.
- Removed deco_args from invalidate_callable (invalidate_function) as its
not actually needed since the namespace is already on the callable to
invalidate.
0.1 (07/08/2011)
================
Features
--------
- Caching in a similar style to Beaker, with hit/miss statistics, backed by
a Redis global write-lock with old values served to prevent the dogpile
effect
- Redis global lock
| =======
retools
=======
0.2 (**tip**)
=============
Features
--------
- Statistics for the cache is now optional and can be disabled to slightly
reduce the Redis queries used to store/retrieve cache data.
- Added first revision of worker/job Queue system, with event support.
Internals
---------
- Heavily refactored ``Connection`` to not be a class singleton, instead
a global_connection instance is created and used by default.
- Increased conditional coverage to 100% (via instrumental).
Backwards Incompatibilities
---------------------------
- Changing the default global Redis connection has changed semantics, instead
of using ``Connection.set_default``, you should set the global_connection's
redis property directly::
import redis
from retools import global_connection
global_connection.redis = redis.Redis(host='myhost')
Incompatibilities
-----------------
- Removed clear argument from invalidate_region, as removing keys from the
set but not removing the hit statistics can lead to data accumulating in
Redis that has no easy removal other than .keys() which should not be run
in production environments.
- Removed deco_args from invalidate_callable (invalidate_function) as its
not actually needed since the namespace is already on the callable to
invalidate.
0.1 (07/08/2011)
================
Features
--------
- Caching in a similar style to Beaker, with hit/miss statistics, backed by
a Redis global write-lock with old values served to prevent the dogpile
effect
- Redis global lock
| Update changes for queue addition | Update changes for queue addition
| reStructuredText | mit | mozilla-services/retools,bbangert/retools,0x1997/retools | restructuredtext | ## Code Before:
=======
retools
=======
0.2 (**tip**)
=============
Features
--------
- Statistics for the cache is now optional and can be disabled to slightly
reduce the Redis queries used to store/retrieve cache data.
Internals
---------
- Heavily refactored ``Connection`` to not be a class singleton, instead
a global_connection instance is created and used by default.
- Increased conditional coverage to 100% (via instrumental).
Backwards Incompatibilities
---------------------------
- Changing the default global Redis connection has changed semantics, instead
of using ``Connection.set_default``, you should set the global_connection's
redis property directly::
import redis
from retools import global_connection
global_connection.redis = redis.Redis(host='myhost')
Incompatibilities
-----------------
- Removed clear argument from invalidate_region, as removing keys from the
set but not removing the hit statistics can lead to data accumulating in
Redis that has no easy removal other than .keys() which should not be run
in production environments.
- Removed deco_args from invalidate_callable (invalidate_function) as its
not actually needed since the namespace is already on the callable to
invalidate.
0.1 (07/08/2011)
================
Features
--------
- Caching in a similar style to Beaker, with hit/miss statistics, backed by
a Redis global write-lock with old values served to prevent the dogpile
effect
- Redis global lock
## Instruction:
Update changes for queue addition
## Code After:
=======
retools
=======
0.2 (**tip**)
=============
Features
--------
- Statistics for the cache is now optional and can be disabled to slightly
reduce the Redis queries used to store/retrieve cache data.
- Added first revision of worker/job Queue system, with event support.
Internals
---------
- Heavily refactored ``Connection`` to not be a class singleton, instead
a global_connection instance is created and used by default.
- Increased conditional coverage to 100% (via instrumental).
Backwards Incompatibilities
---------------------------
- Changing the default global Redis connection has changed semantics, instead
of using ``Connection.set_default``, you should set the global_connection's
redis property directly::
import redis
from retools import global_connection
global_connection.redis = redis.Redis(host='myhost')
Incompatibilities
-----------------
- Removed clear argument from invalidate_region, as removing keys from the
set but not removing the hit statistics can lead to data accumulating in
Redis that has no easy removal other than .keys() which should not be run
in production environments.
- Removed deco_args from invalidate_callable (invalidate_function) as its
not actually needed since the namespace is already on the callable to
invalidate.
0.1 (07/08/2011)
================
Features
--------
- Caching in a similar style to Beaker, with hit/miss statistics, backed by
a Redis global write-lock with old values served to prevent the dogpile
effect
- Redis global lock
| =======
retools
=======
0.2 (**tip**)
=============
Features
--------
- Statistics for the cache is now optional and can be disabled to slightly
reduce the Redis queries used to store/retrieve cache data.
+ - Added first revision of worker/job Queue system, with event support.
Internals
---------
- Heavily refactored ``Connection`` to not be a class singleton, instead
a global_connection instance is created and used by default.
- Increased conditional coverage to 100% (via instrumental).
Backwards Incompatibilities
---------------------------
- Changing the default global Redis connection has changed semantics, instead
of using ``Connection.set_default``, you should set the global_connection's
redis property directly::
import redis
from retools import global_connection
global_connection.redis = redis.Redis(host='myhost')
Incompatibilities
-----------------
- Removed clear argument from invalidate_region, as removing keys from the
set but not removing the hit statistics can lead to data accumulating in
Redis that has no easy removal other than .keys() which should not be run
in production environments.
- Removed deco_args from invalidate_callable (invalidate_function) as its
not actually needed since the namespace is already on the callable to
invalidate.
0.1 (07/08/2011)
================
Features
--------
- Caching in a similar style to Beaker, with hit/miss statistics, backed by
a Redis global write-lock with old values served to prevent the dogpile
effect
- Redis global lock | 1 | 0.017544 | 1 | 0 |
1d4d518b50edec020faad41cc857edbf75b47eda | docs/metrics-howto.rst | docs/metrics-howto.rst | How to monitor Synapse metrics using Prometheus
===============================================
1: Install prometheus:
Follow instructions at http://prometheus.io/docs/introduction/install/
2: Enable synapse metrics:
Simply setting a (local) port number will enable it. Pick a port.
prometheus itself defaults to 9090, so starting just above that for
locally monitored services seems reasonable. E.g. 9092:
Add to homeserver.yaml
metrics_port: 9092
Restart synapse
3: Add a prometheus target for synapse. It needs to set the ``metrics_path``
to a non-default value::
- job_name: "synapse"
metrics_path: "/_synapse/metrics"
static_configs:
- targets:
"my.server.here:9092"
| How to monitor Synapse metrics using Prometheus
===============================================
1: Install prometheus:
Follow instructions at http://prometheus.io/docs/introduction/install/
2: Enable synapse metrics:
Simply setting a (local) port number will enable it. Pick a port.
prometheus itself defaults to 9090, so starting just above that for
locally monitored services seems reasonable. E.g. 9092:
Add to homeserver.yaml
metrics_port: 9092
Restart synapse
3: Add a prometheus target for synapse. It needs to set the ``metrics_path``
to a non-default value::
- job_name: "synapse"
metrics_path: "/_synapse/metrics"
static_configs:
- targets:
"my.server.here:9092"
Standard Metric Names
---------------------
As of synapse version 0.18.2, the format of the process-wide metrics has been
changed to fit prometheus standard naming conventions. Additionally the units
have been changed to seconds, from miliseconds.
================================== =============================
New name Old name
---------------------------------- -----------------------------
process_cpu_user_seconds_total process_resource_utime / 1000
process_cpu_system_seconds_total process_resource_stime / 1000
process_open_fds (no 'type' label) process_fds
================================== =============================
The python-specific counts of garbage collector performance have been renamed.
=========================== ======================
New name Old name
--------------------------- ----------------------
python_gc_time reactor_gc_time
python_gc_unreachable_total reactor_gc_unreachable
python_gc_counts reactor_gc_counts
=========================== ======================
The twisted-specific reactor metrics have been renamed.
==================================== =================
New name Old name
------------------------------------ -----------------
python_twisted_reactor_pending_calls reactor_tick_time
python_twisted_reactor_tick_time reactor_tick_time
==================================== =================
| Add details of renamed metrics | Add details of renamed metrics
| reStructuredText | apache-2.0 | matrix-org/synapse,TribeMedia/synapse,TribeMedia/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse | restructuredtext | ## Code Before:
How to monitor Synapse metrics using Prometheus
===============================================
1: Install prometheus:
Follow instructions at http://prometheus.io/docs/introduction/install/
2: Enable synapse metrics:
Simply setting a (local) port number will enable it. Pick a port.
prometheus itself defaults to 9090, so starting just above that for
locally monitored services seems reasonable. E.g. 9092:
Add to homeserver.yaml
metrics_port: 9092
Restart synapse
3: Add a prometheus target for synapse. It needs to set the ``metrics_path``
to a non-default value::
- job_name: "synapse"
metrics_path: "/_synapse/metrics"
static_configs:
- targets:
"my.server.here:9092"
## Instruction:
Add details of renamed metrics
## Code After:
How to monitor Synapse metrics using Prometheus
===============================================
1: Install prometheus:
Follow instructions at http://prometheus.io/docs/introduction/install/
2: Enable synapse metrics:
Simply setting a (local) port number will enable it. Pick a port.
prometheus itself defaults to 9090, so starting just above that for
locally monitored services seems reasonable. E.g. 9092:
Add to homeserver.yaml
metrics_port: 9092
Restart synapse
3: Add a prometheus target for synapse. It needs to set the ``metrics_path``
to a non-default value::
- job_name: "synapse"
metrics_path: "/_synapse/metrics"
static_configs:
- targets:
"my.server.here:9092"
Standard Metric Names
---------------------
As of synapse version 0.18.2, the format of the process-wide metrics has been
changed to fit prometheus standard naming conventions. Additionally the units
have been changed to seconds, from miliseconds.
================================== =============================
New name Old name
---------------------------------- -----------------------------
process_cpu_user_seconds_total process_resource_utime / 1000
process_cpu_system_seconds_total process_resource_stime / 1000
process_open_fds (no 'type' label) process_fds
================================== =============================
The python-specific counts of garbage collector performance have been renamed.
=========================== ======================
New name Old name
--------------------------- ----------------------
python_gc_time reactor_gc_time
python_gc_unreachable_total reactor_gc_unreachable
python_gc_counts reactor_gc_counts
=========================== ======================
The twisted-specific reactor metrics have been renamed.
==================================== =================
New name Old name
------------------------------------ -----------------
python_twisted_reactor_pending_calls reactor_tick_time
python_twisted_reactor_tick_time reactor_tick_time
==================================== =================
| How to monitor Synapse metrics using Prometheus
===============================================
1: Install prometheus:
Follow instructions at http://prometheus.io/docs/introduction/install/
2: Enable synapse metrics:
Simply setting a (local) port number will enable it. Pick a port.
prometheus itself defaults to 9090, so starting just above that for
locally monitored services seems reasonable. E.g. 9092:
Add to homeserver.yaml
metrics_port: 9092
Restart synapse
3: Add a prometheus target for synapse. It needs to set the ``metrics_path``
to a non-default value::
- job_name: "synapse"
metrics_path: "/_synapse/metrics"
static_configs:
- targets:
"my.server.here:9092"
+
+ Standard Metric Names
+ ---------------------
+
+ As of synapse version 0.18.2, the format of the process-wide metrics has been
+ changed to fit prometheus standard naming conventions. Additionally the units
+ have been changed to seconds, from miliseconds.
+
+ ================================== =============================
+ New name Old name
+ ---------------------------------- -----------------------------
+ process_cpu_user_seconds_total process_resource_utime / 1000
+ process_cpu_system_seconds_total process_resource_stime / 1000
+ process_open_fds (no 'type' label) process_fds
+ ================================== =============================
+
+ The python-specific counts of garbage collector performance have been renamed.
+
+ =========================== ======================
+ New name Old name
+ --------------------------- ----------------------
+ python_gc_time reactor_gc_time
+ python_gc_unreachable_total reactor_gc_unreachable
+ python_gc_counts reactor_gc_counts
+ =========================== ======================
+
+ The twisted-specific reactor metrics have been renamed.
+
+ ==================================== =================
+ New name Old name
+ ------------------------------------ -----------------
+ python_twisted_reactor_pending_calls reactor_tick_time
+ python_twisted_reactor_tick_time reactor_tick_time
+ ==================================== ================= | 34 | 1.36 | 34 | 0 |
b0e39088d326557192486a24c87df3b68bf617ce | api/models.py | api/models.py | from django.db import models
class Page(models.Model):
"""A Page in Dyanote."""
created = models.DateTimeField(auto_now_add=True)
title = models.CharField(max_length=100, default='')
parent = models.ForeignKey('api.Page', null=True, related_name='children')
body = models.TextField(blank=True, default='')
author = models.ForeignKey('auth.User', related_name='pages')
NORMAL = 0
ROOT = 1
TRASH = 2
FLAGS = (
(NORMAL, 'Normal page'),
(ROOT, 'Root page'),
(TRASH, 'Trash page'),
)
flags = models.IntegerField(choices=FLAGS, default=NORMAL)
class Meta:
ordering = ('created',)
| from django.db import models
class Page(models.Model):
"""A Page in Dyanote."""
created = models.DateTimeField(auto_now_add=True)
title = models.CharField(max_length=100, default='')
parent = models.ForeignKey('api.Page', null=True, blank=True, related_name='children')
body = models.TextField(blank=True, default='')
author = models.ForeignKey('auth.User', related_name='pages')
NORMAL = 0
ROOT = 1
TRASH = 2
FLAGS = (
(NORMAL, 'Normal page'),
(ROOT, 'Root page'),
(TRASH, 'Trash page'),
)
flags = models.IntegerField(choices=FLAGS, default=NORMAL)
class Meta:
ordering = ('created',)
| Mark Page's parent field as 'blank' | Mark Page's parent field as 'blank'
| Python | mit | MatteoNardi/dyanote-server,MatteoNardi/dyanote-server | python | ## Code Before:
from django.db import models
class Page(models.Model):
"""A Page in Dyanote."""
created = models.DateTimeField(auto_now_add=True)
title = models.CharField(max_length=100, default='')
parent = models.ForeignKey('api.Page', null=True, related_name='children')
body = models.TextField(blank=True, default='')
author = models.ForeignKey('auth.User', related_name='pages')
NORMAL = 0
ROOT = 1
TRASH = 2
FLAGS = (
(NORMAL, 'Normal page'),
(ROOT, 'Root page'),
(TRASH, 'Trash page'),
)
flags = models.IntegerField(choices=FLAGS, default=NORMAL)
class Meta:
ordering = ('created',)
## Instruction:
Mark Page's parent field as 'blank'
## Code After:
from django.db import models
class Page(models.Model):
"""A Page in Dyanote."""
created = models.DateTimeField(auto_now_add=True)
title = models.CharField(max_length=100, default='')
parent = models.ForeignKey('api.Page', null=True, blank=True, related_name='children')
body = models.TextField(blank=True, default='')
author = models.ForeignKey('auth.User', related_name='pages')
NORMAL = 0
ROOT = 1
TRASH = 2
FLAGS = (
(NORMAL, 'Normal page'),
(ROOT, 'Root page'),
(TRASH, 'Trash page'),
)
flags = models.IntegerField(choices=FLAGS, default=NORMAL)
class Meta:
ordering = ('created',)
| from django.db import models
class Page(models.Model):
"""A Page in Dyanote."""
created = models.DateTimeField(auto_now_add=True)
title = models.CharField(max_length=100, default='')
- parent = models.ForeignKey('api.Page', null=True, related_name='children')
+ parent = models.ForeignKey('api.Page', null=True, blank=True, related_name='children')
? ++++++++++++
body = models.TextField(blank=True, default='')
author = models.ForeignKey('auth.User', related_name='pages')
NORMAL = 0
ROOT = 1
TRASH = 2
FLAGS = (
(NORMAL, 'Normal page'),
(ROOT, 'Root page'),
(TRASH, 'Trash page'),
)
flags = models.IntegerField(choices=FLAGS, default=NORMAL)
class Meta:
ordering = ('created',) | 2 | 0.090909 | 1 | 1 |
5fdba77e70366acc2119955668071d913807fc14 | classes/Kohana/GIT.php | classes/Kohana/GIT.php | <?php
class Kohana_GIT {
/**
* Execute a GIT command in the specified working directory
*
* @param string $command The GIT command to execute. This is NOT
* automagically escaped, be ware!
* @param string $repository The path to the git repository
* @return string
*/
public static function execute($command, $repository = APPPATH)
{
if ( ! `which git`)
throw new Kohana_Exception("The GIT binary must be installed");
$command = 'git '.$command;
// Setup the file descriptors specification
$descriptsspec = array(
1 => array('pipe', 'w'),
2 => array('pipe', 'w'),
);
// Store the pipes in this array
$pipes = array();
// Execute the command
$resource = proc_open($command, $descriptsspec, $pipes);
// Setup the output
$output = array(
1 => trim(stream_get_contents($pipes[1])),
2 => trim(stream_get_contents($pipes[2])),
);
// Close the pipes
array_map('fclose', $pipes);
// Make sure the process didn't exit with a non-zero value
if (trim(proc_close($resource)))
throw new Kohana_Exception($output[2]);
return $output[1];
}
}
| <?php
class Kohana_GIT {
/**
* Execute a GIT command in the specified working directory
*
* @param string $command The GIT command to execute. This is NOT
* automagically escaped, be ware!
* @param string $cwd The working directory to run the command under.
* This can be set to NULL to use the directory the
* script was run under
* @return string
*/
public static function execute($command, $cwd = APPPATH)
{
if ( ! `which git`)
throw new Kohana_Exception("The GIT binary must be installed");
$command = 'git '.$command;
if ($cwd !== NULL)
{
// Change directories to the working tree
$command = 'cd '.escapeshellarg($cwd).' && '.$command;
}
// Setup the file descriptors specification
$descriptsspec = array(
1 => array('pipe', 'w'),
2 => array('pipe', 'w'),
);
// Store the pipes in this array
$pipes = array();
// Execute the command
$resource = proc_open($command, $descriptsspec, $pipes);
// Setup the output
$output = array(
1 => trim(stream_get_contents($pipes[1])),
2 => trim(stream_get_contents($pipes[2])),
);
// Close the pipes
array_map('fclose', $pipes);
// Make sure the process didn't exit with a non-zero value
if (trim(proc_close($resource)))
throw new Kohana_Exception($output[2]);
return $output[1];
}
}
| Add the functionallity for the `cwd` paremeter | Add the functionallity for the `cwd` paremeter
This parameter allows the current working directory to be set for git to
command run in
| PHP | mit | EvanPurkhiser/kohana-git | php | ## Code Before:
<?php
class Kohana_GIT {
/**
* Execute a GIT command in the specified working directory
*
* @param string $command The GIT command to execute. This is NOT
* automagically escaped, be ware!
* @param string $repository The path to the git repository
* @return string
*/
public static function execute($command, $repository = APPPATH)
{
if ( ! `which git`)
throw new Kohana_Exception("The GIT binary must be installed");
$command = 'git '.$command;
// Setup the file descriptors specification
$descriptsspec = array(
1 => array('pipe', 'w'),
2 => array('pipe', 'w'),
);
// Store the pipes in this array
$pipes = array();
// Execute the command
$resource = proc_open($command, $descriptsspec, $pipes);
// Setup the output
$output = array(
1 => trim(stream_get_contents($pipes[1])),
2 => trim(stream_get_contents($pipes[2])),
);
// Close the pipes
array_map('fclose', $pipes);
// Make sure the process didn't exit with a non-zero value
if (trim(proc_close($resource)))
throw new Kohana_Exception($output[2]);
return $output[1];
}
}
## Instruction:
Add the functionallity for the `cwd` paremeter
This parameter allows the current working directory to be set for git to
command run in
## Code After:
<?php
class Kohana_GIT {
/**
* Execute a GIT command in the specified working directory
*
* @param string $command The GIT command to execute. This is NOT
* automagically escaped, be ware!
* @param string $cwd The working directory to run the command under.
* This can be set to NULL to use the directory the
* script was run under
* @return string
*/
public static function execute($command, $cwd = APPPATH)
{
if ( ! `which git`)
throw new Kohana_Exception("The GIT binary must be installed");
$command = 'git '.$command;
if ($cwd !== NULL)
{
// Change directories to the working tree
$command = 'cd '.escapeshellarg($cwd).' && '.$command;
}
// Setup the file descriptors specification
$descriptsspec = array(
1 => array('pipe', 'w'),
2 => array('pipe', 'w'),
);
// Store the pipes in this array
$pipes = array();
// Execute the command
$resource = proc_open($command, $descriptsspec, $pipes);
// Setup the output
$output = array(
1 => trim(stream_get_contents($pipes[1])),
2 => trim(stream_get_contents($pipes[2])),
);
// Close the pipes
array_map('fclose', $pipes);
// Make sure the process didn't exit with a non-zero value
if (trim(proc_close($resource)))
throw new Kohana_Exception($output[2]);
return $output[1];
}
}
| <?php
class Kohana_GIT {
/**
* Execute a GIT command in the specified working directory
*
- * @param string $command The GIT command to execute. This is NOT
? ---
+ * @param string $command The GIT command to execute. This is NOT
- * automagically escaped, be ware!
? ---
+ * automagically escaped, be ware!
- * @param string $repository The path to the git repository
+ * @param string $cwd The working directory to run the command under.
+ * This can be set to NULL to use the directory the
+ * script was run under
* @return string
*/
- public static function execute($command, $repository = APPPATH)
? ^^^^^^^^^^
+ public static function execute($command, $cwd = APPPATH)
? ^^^
{
if ( ! `which git`)
throw new Kohana_Exception("The GIT binary must be installed");
$command = 'git '.$command;
+
+ if ($cwd !== NULL)
+ {
+ // Change directories to the working tree
+ $command = 'cd '.escapeshellarg($cwd).' && '.$command;
+ }
// Setup the file descriptors specification
$descriptsspec = array(
1 => array('pipe', 'w'),
2 => array('pipe', 'w'),
);
// Store the pipes in this array
$pipes = array();
// Execute the command
$resource = proc_open($command, $descriptsspec, $pipes);
// Setup the output
$output = array(
1 => trim(stream_get_contents($pipes[1])),
2 => trim(stream_get_contents($pipes[2])),
);
// Close the pipes
array_map('fclose', $pipes);
// Make sure the process didn't exit with a non-zero value
if (trim(proc_close($resource)))
throw new Kohana_Exception($output[2]);
return $output[1];
}
} | 16 | 0.333333 | 12 | 4 |
a6918bc6800356696a0aad886e9be1673964dcb1 | build.ps1 | build.ps1 | dotnet --version
$buildExitCode=0
Write-Output "*** Restoring packages"
dotnet restore
$buildExitCode = $LASTEXITCODE
if ($buildExitCode -ne 0){
Write-Output "*** Restore failed"
exit $buildExitCode
}
Write-Output "*** Building projects"
$buildExitCode=0
Get-Content build\build-order.txt | ForEach-Object {
Write-Output "*** dotnet build $_"
dotnet build $_
if ($LASTEXITCODE -ne 0){
$buildExitCode = $LASTEXITCODE
}
}
if($buildExitCode -ne 0) {
Write-Output "*** Build failed"
exit $buildExitCode
}
#$testExitCode = 0
#Get-Content build\test-order.txt | ForEach-Object {
# dotnet test $_
# if ($LASTEXITCODE -ne 0){
# $testExitCode = $LASTEXITCODE
# }
#}
#
#exit $testExitCode
| $here = Split-Path -Parent $MyInvocation.MyCommand.Path
dotnet --version
$buildExitCode=0
Write-Output "*** Restoring packages"
dotnet restore
$buildExitCode = $LASTEXITCODE
if ($buildExitCode -ne 0){
Write-Output "*** Restore failed"
exit $buildExitCode
}
Write-Output "*** Building projects"
$buildExitCode=0
Get-Content "$here\build\build-order.txt" | ForEach-Object {
Write-Output "*** dotnet build $_"
dotnet build $_
if ($LASTEXITCODE -ne 0){
$buildExitCode = $LASTEXITCODE
}
}
if($buildExitCode -ne 0) {
Write-Output "*** Build failed"
exit $buildExitCode
}
#$testExitCode = 0
#Get-Content build\test-order.txt | ForEach-Object {
# dotnet test $_
# if ($LASTEXITCODE -ne 0){
# $testExitCode = $LASTEXITCODE
# }
#}
#
#exit $testExitCode
| Use script path to relative paths | Use script path to relative paths
This enables the script to run from anywhere
| PowerShell | mit | vflorusso/nether,vflorusso/nether,ankodu/nether,stuartleeks/nether,brentstineman/nether,ankodu/nether,MicrosoftDX/nether,stuartleeks/nether,ankodu/nether,ankodu/nether,vflorusso/nether,stuartleeks/nether,vflorusso/nether,navalev/nether,vflorusso/nether,brentstineman/nether,navalev/nether,navalev/nether,brentstineman/nether,oliviak/nether,navalev/nether,brentstineman/nether,krist00fer/nether,stuartleeks/nether,stuartleeks/nether,brentstineman/nether | powershell | ## Code Before:
dotnet --version
$buildExitCode=0
Write-Output "*** Restoring packages"
dotnet restore
$buildExitCode = $LASTEXITCODE
if ($buildExitCode -ne 0){
Write-Output "*** Restore failed"
exit $buildExitCode
}
Write-Output "*** Building projects"
$buildExitCode=0
Get-Content build\build-order.txt | ForEach-Object {
Write-Output "*** dotnet build $_"
dotnet build $_
if ($LASTEXITCODE -ne 0){
$buildExitCode = $LASTEXITCODE
}
}
if($buildExitCode -ne 0) {
Write-Output "*** Build failed"
exit $buildExitCode
}
#$testExitCode = 0
#Get-Content build\test-order.txt | ForEach-Object {
# dotnet test $_
# if ($LASTEXITCODE -ne 0){
# $testExitCode = $LASTEXITCODE
# }
#}
#
#exit $testExitCode
## Instruction:
Use script path to relative paths
This enables the script to run from anywhere
## Code After:
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
dotnet --version
$buildExitCode=0
Write-Output "*** Restoring packages"
dotnet restore
$buildExitCode = $LASTEXITCODE
if ($buildExitCode -ne 0){
Write-Output "*** Restore failed"
exit $buildExitCode
}
Write-Output "*** Building projects"
$buildExitCode=0
Get-Content "$here\build\build-order.txt" | ForEach-Object {
Write-Output "*** dotnet build $_"
dotnet build $_
if ($LASTEXITCODE -ne 0){
$buildExitCode = $LASTEXITCODE
}
}
if($buildExitCode -ne 0) {
Write-Output "*** Build failed"
exit $buildExitCode
}
#$testExitCode = 0
#Get-Content build\test-order.txt | ForEach-Object {
# dotnet test $_
# if ($LASTEXITCODE -ne 0){
# $testExitCode = $LASTEXITCODE
# }
#}
#
#exit $testExitCode
| + $here = Split-Path -Parent $MyInvocation.MyCommand.Path
+
dotnet --version
$buildExitCode=0
Write-Output "*** Restoring packages"
dotnet restore
$buildExitCode = $LASTEXITCODE
if ($buildExitCode -ne 0){
Write-Output "*** Restore failed"
exit $buildExitCode
}
Write-Output "*** Building projects"
$buildExitCode=0
- Get-Content build\build-order.txt | ForEach-Object {
+ Get-Content "$here\build\build-order.txt" | ForEach-Object {
? +++++++ +
Write-Output "*** dotnet build $_"
dotnet build $_
if ($LASTEXITCODE -ne 0){
$buildExitCode = $LASTEXITCODE
}
}
if($buildExitCode -ne 0) {
Write-Output "*** Build failed"
exit $buildExitCode
}
#$testExitCode = 0
#Get-Content build\test-order.txt | ForEach-Object {
# dotnet test $_
# if ($LASTEXITCODE -ne 0){
# $testExitCode = $LASTEXITCODE
# }
#}
#
#exit $testExitCode | 4 | 0.111111 | 3 | 1 |
01ca1a3591a4054962c71af618b348ece2256c54 | .buildkite/pipeline.yml | .buildkite/pipeline.yml | steps:
- command: /hello
plugins:
docker-compose:
build: helloworld
config: .buildkite/docker-compose.yml
- wait
- command: /hello
plugins:
docker-compose:
run: helloworld
config: .buildkite/docker-compose.yml
| steps:
# Test a straight-up run
- command: /hello
plugins:
docker-compose:
run: helloworld
config: .buildkite/docker-compose.yml
- wait
# Test a build + run
- command: /hello
plugins:
docker-compose:
build: helloworld
config: .buildkite/docker-compose.yml
- wait
- command: /hello
plugins:
docker-compose:
run: helloworld
config: .buildkite/docker-compose.yml
| Add a run without meta-data | Add a run without meta-data
| YAML | mit | buildkite-plugins/docker-compose-buildkite-plugin,buildkite/docker-compose-buildkite-plugin,buildkite-plugins/docker-compose | yaml | ## Code Before:
steps:
- command: /hello
plugins:
docker-compose:
build: helloworld
config: .buildkite/docker-compose.yml
- wait
- command: /hello
plugins:
docker-compose:
run: helloworld
config: .buildkite/docker-compose.yml
## Instruction:
Add a run without meta-data
## Code After:
steps:
# Test a straight-up run
- command: /hello
plugins:
docker-compose:
run: helloworld
config: .buildkite/docker-compose.yml
- wait
# Test a build + run
- command: /hello
plugins:
docker-compose:
build: helloworld
config: .buildkite/docker-compose.yml
- wait
- command: /hello
plugins:
docker-compose:
run: helloworld
config: .buildkite/docker-compose.yml
| steps:
+ # Test a straight-up run
+ - command: /hello
+ plugins:
+ docker-compose:
+ run: helloworld
+ config: .buildkite/docker-compose.yml
+ - wait
+ # Test a build + run
- command: /hello
plugins:
docker-compose:
build: helloworld
config: .buildkite/docker-compose.yml
- wait
- command: /hello
plugins:
docker-compose:
run: helloworld
config: .buildkite/docker-compose.yml | 8 | 0.666667 | 8 | 0 |
0487f0f68f691aec6fea0187d079573044e1a496 | metadata/com.ulicae.cinelog.yml | metadata/com.ulicae.cinelog.yml | AntiFeatures:
- NonFreeNet
Categories:
- Multimedia
- Writing
License: GPL-3.0-only
SourceCode: https://github.com/Alcidauk/CineLog
IssueTracker: https://github.com/Alcidauk/CineLog/issues
AutoName: CineLog
Summary: Save reviews of movies
Description: Search for films with [https://www.themoviedb.org/ tmdb.org] API. Save
them to your local database. Add review and rating to watched films. Rate and
review films that does not exist in tmdb too.
RepoType: git
Repo: https://github.com/Alcidauk/CineLog.git
Builds:
- versionName: '0.9'
versionCode: 14
commit: v0.9
subdir: app
gradle:
- yes
- versionName: '1.0'
versionCode: 15
commit: v1.0
subdir: app
gradle:
- yes
- versionName: 1.0.1
versionCode: 16
commit: v1.0.1
subdir: app
gradle:
- yes
- versionName: '1.1'
versionCode: 17
commit: v1.1
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.1'
CurrentVersionCode: 17
| AntiFeatures:
- NonFreeNet
Categories:
- Multimedia
- Writing
License: GPL-3.0-only
SourceCode: https://github.com/Alcidauk/CineLog
IssueTracker: https://github.com/Alcidauk/CineLog/issues
AutoName: CineLog
Summary: Save reviews of movies
Description: Search for films with [https://www.themoviedb.org/ tmdb.org] API. Save
them to your local database. Add review and rating to watched films. Rate and
review films that does not exist in tmdb too.
RepoType: git
Repo: https://github.com/Alcidauk/CineLog.git
Builds:
- versionName: '0.9'
versionCode: 14
commit: v0.9
subdir: app
gradle:
- yes
- versionName: '1.0'
versionCode: 15
commit: v1.0
subdir: app
gradle:
- yes
- versionName: 1.0.1
versionCode: 16
commit: v1.0.1
subdir: app
gradle:
- yes
- versionName: '1.1'
versionCode: 17
commit: v1.1
subdir: app
gradle:
- yes
- versionName: 1.1.1
versionCode: 18
commit: v1.1.1
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 1.1.1
CurrentVersionCode: 18
| Update CineLog to 1.1.1 (18) | Update CineLog to 1.1.1 (18)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata,f-droid/fdroid-data | yaml | ## Code Before:
AntiFeatures:
- NonFreeNet
Categories:
- Multimedia
- Writing
License: GPL-3.0-only
SourceCode: https://github.com/Alcidauk/CineLog
IssueTracker: https://github.com/Alcidauk/CineLog/issues
AutoName: CineLog
Summary: Save reviews of movies
Description: Search for films with [https://www.themoviedb.org/ tmdb.org] API. Save
them to your local database. Add review and rating to watched films. Rate and
review films that does not exist in tmdb too.
RepoType: git
Repo: https://github.com/Alcidauk/CineLog.git
Builds:
- versionName: '0.9'
versionCode: 14
commit: v0.9
subdir: app
gradle:
- yes
- versionName: '1.0'
versionCode: 15
commit: v1.0
subdir: app
gradle:
- yes
- versionName: 1.0.1
versionCode: 16
commit: v1.0.1
subdir: app
gradle:
- yes
- versionName: '1.1'
versionCode: 17
commit: v1.1
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: '1.1'
CurrentVersionCode: 17
## Instruction:
Update CineLog to 1.1.1 (18)
## Code After:
AntiFeatures:
- NonFreeNet
Categories:
- Multimedia
- Writing
License: GPL-3.0-only
SourceCode: https://github.com/Alcidauk/CineLog
IssueTracker: https://github.com/Alcidauk/CineLog/issues
AutoName: CineLog
Summary: Save reviews of movies
Description: Search for films with [https://www.themoviedb.org/ tmdb.org] API. Save
them to your local database. Add review and rating to watched films. Rate and
review films that does not exist in tmdb too.
RepoType: git
Repo: https://github.com/Alcidauk/CineLog.git
Builds:
- versionName: '0.9'
versionCode: 14
commit: v0.9
subdir: app
gradle:
- yes
- versionName: '1.0'
versionCode: 15
commit: v1.0
subdir: app
gradle:
- yes
- versionName: 1.0.1
versionCode: 16
commit: v1.0.1
subdir: app
gradle:
- yes
- versionName: '1.1'
versionCode: 17
commit: v1.1
subdir: app
gradle:
- yes
- versionName: 1.1.1
versionCode: 18
commit: v1.1.1
subdir: app
gradle:
- yes
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
CurrentVersion: 1.1.1
CurrentVersionCode: 18
| AntiFeatures:
- NonFreeNet
Categories:
- Multimedia
- Writing
License: GPL-3.0-only
SourceCode: https://github.com/Alcidauk/CineLog
IssueTracker: https://github.com/Alcidauk/CineLog/issues
AutoName: CineLog
Summary: Save reviews of movies
Description: Search for films with [https://www.themoviedb.org/ tmdb.org] API. Save
them to your local database. Add review and rating to watched films. Rate and
review films that does not exist in tmdb too.
RepoType: git
Repo: https://github.com/Alcidauk/CineLog.git
Builds:
- versionName: '0.9'
versionCode: 14
commit: v0.9
subdir: app
gradle:
- yes
- versionName: '1.0'
versionCode: 15
commit: v1.0
subdir: app
gradle:
- yes
- versionName: 1.0.1
versionCode: 16
commit: v1.0.1
subdir: app
gradle:
- yes
- versionName: '1.1'
versionCode: 17
commit: v1.1
subdir: app
gradle:
- yes
+ - versionName: 1.1.1
+ versionCode: 18
+ commit: v1.1.1
+ subdir: app
+ gradle:
+ - yes
+
AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
- CurrentVersion: '1.1'
? - ^
+ CurrentVersion: 1.1.1
? ^^
- CurrentVersionCode: 17
? ^
+ CurrentVersionCode: 18
? ^
| 11 | 0.215686 | 9 | 2 |
2caba79c769c161d400084c4c9ede9f0d3370c6e | README.md | README.md |
Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.
Never write another getter or equals method again, with one annotation your class has a fully featured builder, automate your logging variables, and much more.
See [LICENSE](https://github.com/rzwitserloot/lombok/blob/master/LICENSE) for the Project Lombok license.
Looking for professional support of Project Lombok? Lombok is now part of a [tidelift subscription](https://tidelift.com/subscription/pkg/maven-org-projectlombok-lombok?utm_source=maven-org-projectlombok-lombok&utm_medium=referral&campaign=website)!
For a list of all authors, see the [AUTHORS](https://github.com/rzwitserloot/lombok/blob/master/AUTHORS) file.
For complete project information, see [projectlombok.org](https://projectlombok.org/)
You can review our security policy via [SECURITY.md](https://github.com/rzwitserloot/lombok/blob/master/SECURITY.md)
|
Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.
Never write another getter or equals method again, with one annotation your class has a fully featured builder, automate your logging variables, and much more.
See [LICENSE][licence-file] for the Project Lombok license.
Looking for professional support of Project Lombok? Lombok is now part of a [tidelift subscription][tidelift-sub]!
For a list of all authors, see the [AUTHORS][authors-file] file.
For complete project information, see [projectlombok.org][projectlombok-site]
You can review our security policy via [SECURITY.md][security-file]
[licence-file]: https://github.com/rzwitserloot/lombok/blob/master/LICENSE
[authors-file]: https://github.com/rzwitserloot/lombok/blob/master/AUTHORS
[security-file]: https://github.com/rzwitserloot/lombok/blob/master/SECURITY.md
[projectlombok-site]: https://projectlombok.org/
[tidelift-sub]: https://tidelift.com/subscription/pkg/maven-org-projectlombok-lombok?utm_source=maven-org-projectlombok-lombok&utm_medium=referral&campaign=website
| Use reference links instead of inlined links | Use reference links instead of inlined links
| Markdown | mit | rzwitserloot/lombok,rzwitserloot/lombok,rzwitserloot/lombok,rzwitserloot/lombok,rzwitserloot/lombok | markdown | ## Code Before:
Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.
Never write another getter or equals method again, with one annotation your class has a fully featured builder, automate your logging variables, and much more.
See [LICENSE](https://github.com/rzwitserloot/lombok/blob/master/LICENSE) for the Project Lombok license.
Looking for professional support of Project Lombok? Lombok is now part of a [tidelift subscription](https://tidelift.com/subscription/pkg/maven-org-projectlombok-lombok?utm_source=maven-org-projectlombok-lombok&utm_medium=referral&campaign=website)!
For a list of all authors, see the [AUTHORS](https://github.com/rzwitserloot/lombok/blob/master/AUTHORS) file.
For complete project information, see [projectlombok.org](https://projectlombok.org/)
You can review our security policy via [SECURITY.md](https://github.com/rzwitserloot/lombok/blob/master/SECURITY.md)
## Instruction:
Use reference links instead of inlined links
## Code After:
Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.
Never write another getter or equals method again, with one annotation your class has a fully featured builder, automate your logging variables, and much more.
See [LICENSE][licence-file] for the Project Lombok license.
Looking for professional support of Project Lombok? Lombok is now part of a [tidelift subscription][tidelift-sub]!
For a list of all authors, see the [AUTHORS][authors-file] file.
For complete project information, see [projectlombok.org][projectlombok-site]
You can review our security policy via [SECURITY.md][security-file]
[licence-file]: https://github.com/rzwitserloot/lombok/blob/master/LICENSE
[authors-file]: https://github.com/rzwitserloot/lombok/blob/master/AUTHORS
[security-file]: https://github.com/rzwitserloot/lombok/blob/master/SECURITY.md
[projectlombok-site]: https://projectlombok.org/
[tidelift-sub]: https://tidelift.com/subscription/pkg/maven-org-projectlombok-lombok?utm_source=maven-org-projectlombok-lombok&utm_medium=referral&campaign=website
|
Project Lombok is a java library that automatically plugs into your editor and build tools, spicing up your java.
Never write another getter or equals method again, with one annotation your class has a fully featured builder, automate your logging variables, and much more.
- See [LICENSE](https://github.com/rzwitserloot/lombok/blob/master/LICENSE) for the Project Lombok license.
+ See [LICENSE][licence-file] for the Project Lombok license.
- Looking for professional support of Project Lombok? Lombok is now part of a [tidelift subscription](https://tidelift.com/subscription/pkg/maven-org-projectlombok-lombok?utm_source=maven-org-projectlombok-lombok&utm_medium=referral&campaign=website)!
+ Looking for professional support of Project Lombok? Lombok is now part of a [tidelift subscription][tidelift-sub]!
- For a list of all authors, see the [AUTHORS](https://github.com/rzwitserloot/lombok/blob/master/AUTHORS) file.
+ For a list of all authors, see the [AUTHORS][authors-file] file.
- For complete project information, see [projectlombok.org](https://projectlombok.org/)
? ^^^^^^^^^ ^^^^^^
+ For complete project information, see [projectlombok.org][projectlombok-site]
? ^ ^^^^^^
- You can review our security policy via [SECURITY.md](https://github.com/rzwitserloot/lombok/blob/master/SECURITY.md)
+ You can review our security policy via [SECURITY.md][security-file]
+
+ [licence-file]: https://github.com/rzwitserloot/lombok/blob/master/LICENSE
+ [authors-file]: https://github.com/rzwitserloot/lombok/blob/master/AUTHORS
+ [security-file]: https://github.com/rzwitserloot/lombok/blob/master/SECURITY.md
+ [projectlombok-site]: https://projectlombok.org/
+ [tidelift-sub]: https://tidelift.com/subscription/pkg/maven-org-projectlombok-lombok?utm_source=maven-org-projectlombok-lombok&utm_medium=referral&campaign=website | 16 | 1.230769 | 11 | 5 |
b9cf4aa1e6d1077f5adc47fffbf0e79ef190d7c6 | app/assets/javascripts/buckets.js.coffee | app/assets/javascripts/buckets.js.coffee | $ ->
$(".js-bucket-list").sortable({
connectWith: ".js-bucket-list"
update: (event, ui) ->
if this == ui.item.parent()[0]
window.target = $(event.target)
bucket_id = target.data("bucket-id")
position = ui.item.index()
$.ajax
type: "POST"
url: ui.item.data("prioritized-issue-path")
dataType: "json"
data: { prioritized_issue: { bucket_id: bucket_id, row_order_position: position } }
}).disableSelection();
| makeBucketsSortable = ->
$(".js-bucket-list").sortable({
connectWith: ".js-bucket-list"
update: (event, ui) ->
if this == ui.item.parent()[0]
window.target = $(event.target)
bucket_id = target.data("bucket-id")
position = ui.item.index()
$.ajax
type: "POST"
url: ui.item.data("prioritized-issue-path")
dataType: "json"
data: { prioritized_issue: { bucket_id: bucket_id, row_order_position: position } }
}).disableSelection();
$ ->
makeBucketsSortable();
$(document).on "page:load", ->
makeBucketsSortable();
| Make list sortable on page load/turbolinks event | Make list sortable on page load/turbolinks event
| CoffeeScript | mit | jonmagic/i-got-issues,jonmagic/i-got-issues,jonmagic/i-got-issues | coffeescript | ## Code Before:
$ ->
$(".js-bucket-list").sortable({
connectWith: ".js-bucket-list"
update: (event, ui) ->
if this == ui.item.parent()[0]
window.target = $(event.target)
bucket_id = target.data("bucket-id")
position = ui.item.index()
$.ajax
type: "POST"
url: ui.item.data("prioritized-issue-path")
dataType: "json"
data: { prioritized_issue: { bucket_id: bucket_id, row_order_position: position } }
}).disableSelection();
## Instruction:
Make list sortable on page load/turbolinks event
## Code After:
makeBucketsSortable = ->
$(".js-bucket-list").sortable({
connectWith: ".js-bucket-list"
update: (event, ui) ->
if this == ui.item.parent()[0]
window.target = $(event.target)
bucket_id = target.data("bucket-id")
position = ui.item.index()
$.ajax
type: "POST"
url: ui.item.data("prioritized-issue-path")
dataType: "json"
data: { prioritized_issue: { bucket_id: bucket_id, row_order_position: position } }
}).disableSelection();
$ ->
makeBucketsSortable();
$(document).on "page:load", ->
makeBucketsSortable();
| - $ ->
+ makeBucketsSortable = ->
$(".js-bucket-list").sortable({
connectWith: ".js-bucket-list"
update: (event, ui) ->
if this == ui.item.parent()[0]
window.target = $(event.target)
bucket_id = target.data("bucket-id")
position = ui.item.index()
$.ajax
type: "POST"
url: ui.item.data("prioritized-issue-path")
dataType: "json"
data: { prioritized_issue: { bucket_id: bucket_id, row_order_position: position } }
}).disableSelection();
+
+ $ ->
+ makeBucketsSortable();
+
+ $(document).on "page:load", ->
+ makeBucketsSortable(); | 8 | 0.533333 | 7 | 1 |
1714977f459017ba9a2cc07e881107fef01defef | GPUSD.cmake | GPUSD.cmake |
list(APPEND CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/gpu-sd/CMake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/gpu-sd/CMake)
find_package(GPUSD 1.0.1)
if(EQUALIZER_RELEASE OR (GPUSD_FOUND AND NOT GPUSD_LOCAL))
return()
endif()
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
message(STATUS "git not found, automatic submodule configuration not done")
endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/gpu-sd/CMakeLists.txt")
add_subdirectory(gpu-sd)
find_package(GPUSD) # re-find after add_subdirectory to find correct modules
else()
message(WARNING "git submodule update failed, no automatic configuration")
endif()
| list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/gpu-sd/CMake)
find_package(GPUSD 1.0.1)
if(EQUALIZER_RELEASE OR (GPUSD_FOUND AND NOT GPUSD_LOCAL))
return()
endif()
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
message(STATUS "git not found, automatic submodule configuration not done")
endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/gpu-sd/CMakeLists.txt")
add_subdirectory(gpu-sd)
find_package(GPUSD) # re-find after add_subdirectory to find correct modules
else()
message(WARNING "git submodule update failed, no automatic configuration")
endif()
| Make queue slave parameters configurable | Make queue slave parameters configurable
[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[x] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation
| CMake | bsd-3-clause | biddisco/CMake,jafyvilla/CMake,shurikasa/CMake,shurikasa/CMake,jafyvilla/CMake,shuaibarshad/KAUST-CMake,jafyvilla/CMake,biddisco/CMake,rballester/vmmlib,ptoharia/CMake,hernando/vmmlib,hernando/vmmlib,hernando/vmmlib,jafyvilla/CMake,biddisco/CMake,shuaibarshad/KAUST-CMake,tribal-tec/vmmlib,shurikasa/CMake,shuaibarshad/KAUST-CMake,ptoharia/CMake,BlueBrain/Tuvok,shurikasa/CMake,ptoharia/CMake,ptoharia/CMake,BlueBrain/Tuvok,biddisco/CMake,rballester/vmmlib,BlueBrain/Tuvok,rballester/vmmlib,shuaibarshad/KAUST-CMake | cmake | ## Code Before:
list(APPEND CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/gpu-sd/CMake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/gpu-sd/CMake)
find_package(GPUSD 1.0.1)
if(EQUALIZER_RELEASE OR (GPUSD_FOUND AND NOT GPUSD_LOCAL))
return()
endif()
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
message(STATUS "git not found, automatic submodule configuration not done")
endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/gpu-sd/CMakeLists.txt")
add_subdirectory(gpu-sd)
find_package(GPUSD) # re-find after add_subdirectory to find correct modules
else()
message(WARNING "git submodule update failed, no automatic configuration")
endif()
## Instruction:
Make queue slave parameters configurable
[ ] May break build
[ ] May break existing applications (see CHANGES.txt)
[ ] Bugfix
[x] New Feature
[x] Cleanup
[ ] Optimization
[ ] Documentation
## Code After:
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/gpu-sd/CMake)
find_package(GPUSD 1.0.1)
if(EQUALIZER_RELEASE OR (GPUSD_FOUND AND NOT GPUSD_LOCAL))
return()
endif()
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
message(STATUS "git not found, automatic submodule configuration not done")
endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/gpu-sd/CMakeLists.txt")
add_subdirectory(gpu-sd)
find_package(GPUSD) # re-find after add_subdirectory to find correct modules
else()
message(WARNING "git submodule update failed, no automatic configuration")
endif()
| -
- list(APPEND CMAKE_MODULE_PATH ${CMAKE_INSTALL_PREFIX}/share/gpu-sd/CMake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/gpu-sd/CMake)
find_package(GPUSD 1.0.1)
if(EQUALIZER_RELEASE OR (GPUSD_FOUND AND NOT GPUSD_LOCAL))
return()
endif()
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
else()
message(STATUS "git not found, automatic submodule configuration not done")
endif()
if(EXISTS "${CMAKE_SOURCE_DIR}/gpu-sd/CMakeLists.txt")
add_subdirectory(gpu-sd)
find_package(GPUSD) # re-find after add_subdirectory to find correct modules
else()
message(WARNING "git submodule update failed, no automatic configuration")
endif() | 2 | 0.090909 | 0 | 2 |
f65eb3bf6c43261ce73783c5de3c5515c96d2779 | environment_linux.yml | environment_linux.yml | name: py2_parcels
channels:
- conda-forge
dependencies:
- cachetools
- cgen
- coverage
- enum34
- ffmpeg
- flake8
- gcc_linux-64
- git
- jupyter
- matplotlib
- netcdf4
- numpy
- progressbar2
- py
- pymbolic
- python-dateutil
- scipy
- six
- xarray
- pip:
- pytest
- nbval
| name: py2_parcels
channels:
- conda-forge
dependencies:
- cachetools>=1.0.0
- cgen
- coverage
- enum34
- ffmpeg>=3.2.3,<3.2.6
- flake8>=2.1.0
- gcc_linux-64
- git
- jupyter
- matplotlib=2.0.2
- netcdf4>=1.1.9
- numpy>=1.9.1
- progressbar2
- py>=1.4.27
- pymbolic
- python-dateutil
- scipy>=0.16.0
- six >=1.10.0
- xarray>=0.5.1
- pip:
- pytest>=2.7.0
- nbval
| Revert "removing all version info on environment" | Revert "removing all version info on environment"
This reverts commit 99129912701bd25c8cbc9c9590fd70704cf06eec.
| YAML | mit | OceanPARCELS/parcels,OceanPARCELS/parcels | yaml | ## Code Before:
name: py2_parcels
channels:
- conda-forge
dependencies:
- cachetools
- cgen
- coverage
- enum34
- ffmpeg
- flake8
- gcc_linux-64
- git
- jupyter
- matplotlib
- netcdf4
- numpy
- progressbar2
- py
- pymbolic
- python-dateutil
- scipy
- six
- xarray
- pip:
- pytest
- nbval
## Instruction:
Revert "removing all version info on environment"
This reverts commit 99129912701bd25c8cbc9c9590fd70704cf06eec.
## Code After:
name: py2_parcels
channels:
- conda-forge
dependencies:
- cachetools>=1.0.0
- cgen
- coverage
- enum34
- ffmpeg>=3.2.3,<3.2.6
- flake8>=2.1.0
- gcc_linux-64
- git
- jupyter
- matplotlib=2.0.2
- netcdf4>=1.1.9
- numpy>=1.9.1
- progressbar2
- py>=1.4.27
- pymbolic
- python-dateutil
- scipy>=0.16.0
- six >=1.10.0
- xarray>=0.5.1
- pip:
- pytest>=2.7.0
- nbval
| name: py2_parcels
channels:
- conda-forge
dependencies:
- - cachetools
+ - cachetools>=1.0.0
? +++++++
- cgen
- coverage
- enum34
- - ffmpeg
- - flake8
+ - ffmpeg>=3.2.3,<3.2.6
+ - flake8>=2.1.0
- gcc_linux-64
- git
- jupyter
- - matplotlib
+ - matplotlib=2.0.2
? ++++++
- - netcdf4
+ - netcdf4>=1.1.9
? +++++++
- - numpy
+ - numpy>=1.9.1
- progressbar2
- - py
+ - py>=1.4.27
- pymbolic
- python-dateutil
- - scipy
- - six
- - xarray
+ - scipy>=0.16.0
+ - six >=1.10.0
+ - xarray>=0.5.1
- pip:
- - pytest
+ - pytest>=2.7.0
? +++++++
- nbval | 22 | 0.846154 | 11 | 11 |
797f8299e7bc329c3260ccd9841b70a75bcc932f | build.sbt | build.sbt | name := "jpos-tools-scala"
organization := "io.github.binaryfoo"
version := "0.1-SNAPSHOT"
scalaVersion := "2.11.4"
libraryDependencies += "joda-time" % "joda-time" % "2.6" % "compile"
libraryDependencies += "com.github.scopt" %% "scopt" % "3.2.0"
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test"
mainClass in assembly := Some("io.github.binaryfoo.isotools.shell.Main")
initialCommands in console :=
"""
|import io.github.binaryfoo.isotools._
""".stripMargin
| name := "jpos-tools-scala"
organization := "io.github.binaryfoo"
version := "0.1-SNAPSHOT"
scalaVersion := "2.11.4"
crossScalaVersions := Seq("2.11.4", "2.10.4")
libraryDependencies += "joda-time" % "joda-time" % "2.6" % "compile"
libraryDependencies += "com.github.scopt" %% "scopt" % "3.2.0"
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test"
mainClass in assembly := Some("io.github.binaryfoo.isotools.shell.Main")
initialCommands in console :=
"""
|import io.github.binaryfoo.isotools._
""".stripMargin
| Build for Spark's scala version too. | Build for Spark's scala version too.
| Scala | mit | binaryfoo/lagotto,binaryfoo/lagotto | scala | ## Code Before:
name := "jpos-tools-scala"
organization := "io.github.binaryfoo"
version := "0.1-SNAPSHOT"
scalaVersion := "2.11.4"
libraryDependencies += "joda-time" % "joda-time" % "2.6" % "compile"
libraryDependencies += "com.github.scopt" %% "scopt" % "3.2.0"
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test"
mainClass in assembly := Some("io.github.binaryfoo.isotools.shell.Main")
initialCommands in console :=
"""
|import io.github.binaryfoo.isotools._
""".stripMargin
## Instruction:
Build for Spark's scala version too.
## Code After:
name := "jpos-tools-scala"
organization := "io.github.binaryfoo"
version := "0.1-SNAPSHOT"
scalaVersion := "2.11.4"
crossScalaVersions := Seq("2.11.4", "2.10.4")
libraryDependencies += "joda-time" % "joda-time" % "2.6" % "compile"
libraryDependencies += "com.github.scopt" %% "scopt" % "3.2.0"
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test"
mainClass in assembly := Some("io.github.binaryfoo.isotools.shell.Main")
initialCommands in console :=
"""
|import io.github.binaryfoo.isotools._
""".stripMargin
| name := "jpos-tools-scala"
organization := "io.github.binaryfoo"
version := "0.1-SNAPSHOT"
scalaVersion := "2.11.4"
+
+ crossScalaVersions := Seq("2.11.4", "2.10.4")
libraryDependencies += "joda-time" % "joda-time" % "2.6" % "compile"
libraryDependencies += "com.github.scopt" %% "scopt" % "3.2.0"
libraryDependencies += "org.scalatest" % "scalatest_2.11" % "2.2.1" % "test"
mainClass in assembly := Some("io.github.binaryfoo.isotools.shell.Main")
initialCommands in console :=
"""
|import io.github.binaryfoo.isotools._
""".stripMargin | 2 | 0.1 | 2 | 0 |
e032f3c52b6e37c0ae6736078a21ad13bb71f4b3 | .travis.yml | .travis.yml | language: java
matrix:
include:
- jdk: oraclejdk8
dist: trusty
- jdk: oraclejdk9
- jdk: oraclejdk8
- jdk: oraclejdk9
- jdk: oraclejdk11
- jdk: openjdk8
- jdk: openjdk10
- jdk: openjdk11
- jdk: openjdk13
before_install:
- sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
- git clone git://github.com/cose-wg/Examples Examples
script:
- ls
- mvn test -B
| language: java
matrix:
include:
- jdk: oraclejdk8
dist: trusty
- jdk: oraclejdk9
dist: trusty
- jdk: oraclejdk11
- jdk: openjdk8
- jdk: openjdk10
- jdk: openjdk11
- jdk: openjdk13
before_install:
- sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
- git clone git://github.com/cose-wg/Examples Examples
script:
- ls
- mvn test -B
| Use trsty on oraclejdk9 as well | Use trsty on oraclejdk9 as well
| YAML | bsd-3-clause | cose-wg/COSE-JAVA,cose-wg/COSE-JAVA | yaml | ## Code Before:
language: java
matrix:
include:
- jdk: oraclejdk8
dist: trusty
- jdk: oraclejdk9
- jdk: oraclejdk8
- jdk: oraclejdk9
- jdk: oraclejdk11
- jdk: openjdk8
- jdk: openjdk10
- jdk: openjdk11
- jdk: openjdk13
before_install:
- sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
- git clone git://github.com/cose-wg/Examples Examples
script:
- ls
- mvn test -B
## Instruction:
Use trsty on oraclejdk9 as well
## Code After:
language: java
matrix:
include:
- jdk: oraclejdk8
dist: trusty
- jdk: oraclejdk9
dist: trusty
- jdk: oraclejdk11
- jdk: openjdk8
- jdk: openjdk10
- jdk: openjdk11
- jdk: openjdk13
before_install:
- sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
- git clone git://github.com/cose-wg/Examples Examples
script:
- ls
- mvn test -B
| language: java
matrix:
include:
- jdk: oraclejdk8
dist: trusty
- jdk: oraclejdk9
+ dist: trusty
- - jdk: oraclejdk8
- - jdk: oraclejdk9
- jdk: oraclejdk11
- jdk: openjdk8
- jdk: openjdk10
- jdk: openjdk11
- jdk: openjdk13
before_install:
- sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
- git clone git://github.com/cose-wg/Examples Examples
script:
- ls
- mvn test -B | 3 | 0.125 | 1 | 2 |
28a151bc3b2531608f99c3308cde9c5809b311c6 | build-fuzzylite.sh | build-fuzzylite.sh |
set -e
set -u
mkdir -p fuzzylite/fuzzylite/release
cd fuzzylite/fuzzylite/release
# We use g++-4.8 as >4.8 requires >= GLIBCXX 3.4.20, but only 3.4.19 is
# available on ubuntu 14.04
cmake .. -G"Unix Makefiles" -DCMAKE_CXX_COMPILER=$(which g++-4.8) -DCMAKE_BUILD_TYPE=Release -DFL_BACKTRACE=ON -DFL_USE_FLOAT=OFF -DFL_CPP11=OFF
make
|
set -e
set -u
mkdir -p fuzzylite/fuzzylite/release
cd fuzzylite/fuzzylite/release
# We require GLIBCXX >= 3.4.20, which is something you get with g++-4.8 and
# newer. Keep in mind that for example ubuntu 14.04 has a version of g++ that
# is too old.
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFL_BACKTRACE=ON -DFL_USE_FLOAT=OFF -DFL_CPP11=OFF
make
| Update build-system to work cross-platform | Update build-system to work cross-platform
| Shell | apache-2.0 | Scypho/node-fuzzylite,Scypho/node-fuzzylite | shell | ## Code Before:
set -e
set -u
mkdir -p fuzzylite/fuzzylite/release
cd fuzzylite/fuzzylite/release
# We use g++-4.8 as >4.8 requires >= GLIBCXX 3.4.20, but only 3.4.19 is
# available on ubuntu 14.04
cmake .. -G"Unix Makefiles" -DCMAKE_CXX_COMPILER=$(which g++-4.8) -DCMAKE_BUILD_TYPE=Release -DFL_BACKTRACE=ON -DFL_USE_FLOAT=OFF -DFL_CPP11=OFF
make
## Instruction:
Update build-system to work cross-platform
## Code After:
set -e
set -u
mkdir -p fuzzylite/fuzzylite/release
cd fuzzylite/fuzzylite/release
# We require GLIBCXX >= 3.4.20, which is something you get with g++-4.8 and
# newer. Keep in mind that for example ubuntu 14.04 has a version of g++ that
# is too old.
cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFL_BACKTRACE=ON -DFL_USE_FLOAT=OFF -DFL_CPP11=OFF
make
|
set -e
set -u
mkdir -p fuzzylite/fuzzylite/release
cd fuzzylite/fuzzylite/release
- # We use g++-4.8 as >4.8 requires >= GLIBCXX 3.4.20, but only 3.4.19 is
- # available on ubuntu 14.04
+ # We require GLIBCXX >= 3.4.20, which is something you get with g++-4.8 and
+ # newer. Keep in mind that for example ubuntu 14.04 has a version of g++ that
+ # is too old.
- cmake .. -G"Unix Makefiles" -DCMAKE_CXX_COMPILER=$(which g++-4.8) -DCMAKE_BUILD_TYPE=Release -DFL_BACKTRACE=ON -DFL_USE_FLOAT=OFF -DFL_CPP11=OFF
? --------------------------------------
+ cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFL_BACKTRACE=ON -DFL_USE_FLOAT=OFF -DFL_CPP11=OFF
make | 7 | 0.636364 | 4 | 3 |
05fa3c4c6ab1d7619281399bb5f1db89e55c6fa8 | einops/__init__.py | einops/__init__.py | __author__ = 'Alex Rogozhnikov'
__version__ = '0.4.1'
class EinopsError(RuntimeError):
""" Runtime error thrown by einops """
pass
__all__ = ['rearrange', 'reduce', 'repeat', 'parse_shape', 'asnumpy', 'EinopsError']
from .einops import rearrange, reduce, repeat, parse_shape, asnumpy
| __author__ = 'Alex Rogozhnikov'
__version__ = '0.4.1'
class EinopsError(RuntimeError):
""" Runtime error thrown by einops """
pass
__all__ = ['rearrange', 'reduce', 'repeat', 'einsum',
'parse_shape', 'asnumpy', 'EinopsError']
from .einops import rearrange, reduce, repeat, einsum, parse_shape, asnumpy
| Include einsum in main library | Include einsum in main library
| Python | mit | arogozhnikov/einops | python | ## Code Before:
__author__ = 'Alex Rogozhnikov'
__version__ = '0.4.1'
class EinopsError(RuntimeError):
""" Runtime error thrown by einops """
pass
__all__ = ['rearrange', 'reduce', 'repeat', 'parse_shape', 'asnumpy', 'EinopsError']
from .einops import rearrange, reduce, repeat, parse_shape, asnumpy
## Instruction:
Include einsum in main library
## Code After:
__author__ = 'Alex Rogozhnikov'
__version__ = '0.4.1'
class EinopsError(RuntimeError):
""" Runtime error thrown by einops """
pass
__all__ = ['rearrange', 'reduce', 'repeat', 'einsum',
'parse_shape', 'asnumpy', 'EinopsError']
from .einops import rearrange, reduce, repeat, einsum, parse_shape, asnumpy
| __author__ = 'Alex Rogozhnikov'
__version__ = '0.4.1'
class EinopsError(RuntimeError):
""" Runtime error thrown by einops """
pass
- __all__ = ['rearrange', 'reduce', 'repeat', 'parse_shape', 'asnumpy', 'EinopsError']
+ __all__ = ['rearrange', 'reduce', 'repeat', 'einsum',
+ 'parse_shape', 'asnumpy', 'EinopsError']
- from .einops import rearrange, reduce, repeat, parse_shape, asnumpy
+ from .einops import rearrange, reduce, repeat, einsum, parse_shape, asnumpy
? ++++++++
| 5 | 0.416667 | 3 | 2 |
0af78814e5130719402bf0aef345c9a57739a26f | src/dom/recycler.js | src/dom/recycler.js | import { ATTR_KEY } from '../constants';
import { toLowerCase } from '../util';
import { ensureNodeData, getRawNodeAttributes, removeNode } from './index';
/** DOM node pool, keyed on nodeName. */
const nodes = {};
export function collectNode(node) {
removeNode(node);
if (node instanceof Element) {
if (node[ATTR_KEY]) {
ensureNodeData(node, getRawNodeAttributes(node));
}
node._component = node._componentConstructor = null;
let name = node.normalizedNodeName || toLowerCase(node.nodeName);
(nodes[name] || (nodes[name] = [])).push(node);
}
}
export function createNode(nodeName, isSvg) {
let name = toLowerCase(nodeName),
node = nodes[name] && nodes[name].pop() || (isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName));
ensureNodeData(node);
node.normalizedNodeName = name;
return node;
}
| import { ATTR_KEY } from '../constants';
import { toLowerCase } from '../util';
import { ensureNodeData, getRawNodeAttributes, removeNode } from './index';
/** DOM node pool, keyed on nodeName. */
const nodes = {};
export function collectNode(node) {
removeNode(node);
if (node instanceof Element) {
if (!(ATTR_KEY in node)) {
ensureNodeData(node, getRawNodeAttributes(node));
}
node._component = node._componentConstructor = null;
let name = node.normalizedNodeName || toLowerCase(node.nodeName);
(nodes[name] || (nodes[name] = [])).push(node);
}
}
export function createNode(nodeName, isSvg) {
let name = toLowerCase(nodeName),
node = nodes[name] && nodes[name].pop() || (isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName));
ensureNodeData(node);
node.normalizedNodeName = name;
return node;
}
| Fix prop cache reset triggering in the wrong case (affected performance) | Fix prop cache reset triggering in the wrong case (affected performance)
| JavaScript | mit | neeharv/preact,neeharv/preact,developit/preact,gogoyqj/preact,developit/preact | javascript | ## Code Before:
import { ATTR_KEY } from '../constants';
import { toLowerCase } from '../util';
import { ensureNodeData, getRawNodeAttributes, removeNode } from './index';
/** DOM node pool, keyed on nodeName. */
const nodes = {};
export function collectNode(node) {
removeNode(node);
if (node instanceof Element) {
if (node[ATTR_KEY]) {
ensureNodeData(node, getRawNodeAttributes(node));
}
node._component = node._componentConstructor = null;
let name = node.normalizedNodeName || toLowerCase(node.nodeName);
(nodes[name] || (nodes[name] = [])).push(node);
}
}
export function createNode(nodeName, isSvg) {
let name = toLowerCase(nodeName),
node = nodes[name] && nodes[name].pop() || (isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName));
ensureNodeData(node);
node.normalizedNodeName = name;
return node;
}
## Instruction:
Fix prop cache reset triggering in the wrong case (affected performance)
## Code After:
import { ATTR_KEY } from '../constants';
import { toLowerCase } from '../util';
import { ensureNodeData, getRawNodeAttributes, removeNode } from './index';
/** DOM node pool, keyed on nodeName. */
const nodes = {};
export function collectNode(node) {
removeNode(node);
if (node instanceof Element) {
if (!(ATTR_KEY in node)) {
ensureNodeData(node, getRawNodeAttributes(node));
}
node._component = node._componentConstructor = null;
let name = node.normalizedNodeName || toLowerCase(node.nodeName);
(nodes[name] || (nodes[name] = [])).push(node);
}
}
export function createNode(nodeName, isSvg) {
let name = toLowerCase(nodeName),
node = nodes[name] && nodes[name].pop() || (isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName));
ensureNodeData(node);
node.normalizedNodeName = name;
return node;
}
| import { ATTR_KEY } from '../constants';
import { toLowerCase } from '../util';
import { ensureNodeData, getRawNodeAttributes, removeNode } from './index';
/** DOM node pool, keyed on nodeName. */
const nodes = {};
export function collectNode(node) {
removeNode(node);
if (node instanceof Element) {
- if (node[ATTR_KEY]) {
+ if (!(ATTR_KEY in node)) {
ensureNodeData(node, getRawNodeAttributes(node));
}
node._component = node._componentConstructor = null;
let name = node.normalizedNodeName || toLowerCase(node.nodeName);
(nodes[name] || (nodes[name] = [])).push(node);
}
}
export function createNode(nodeName, isSvg) {
let name = toLowerCase(nodeName),
node = nodes[name] && nodes[name].pop() || (isSvg ? document.createElementNS('http://www.w3.org/2000/svg', nodeName) : document.createElement(nodeName));
ensureNodeData(node);
node.normalizedNodeName = name;
return node;
}
| 2 | 0.0625 | 1 | 1 |
5932774ac5124ebb0e25f2ebac44fdc60eb6a00a | app/views/shared/_nav.html.haml | app/views/shared/_nav.html.haml | %aside{:class => [local_assigns.fetch(:fluid, false) ? 'fluid' : nil]}
.container
.logo
%a.logo__link{:href => "/"}= logo_tag
.home
= link_to t('application.explore'), '/explore'
- if user_signed_in?
= link_to t('application.my_dashboard'), root_url
- if current_user && current_user.admin?
= link_to t('application.recent_activity'), '/recent-activity'
= link_to t('application.training'), :training
= link_to t('application.help'), '/ask', target: '_blank'
- if user_signed_in?
.search
= form_tag("/ask", method: "get", target: '_blank') do
= text_field_tag(:q, '', placeholder: t('application.search'))
%button{:type => "submit"}
%i.icon.icon-search
.login
- if user_signed_in?
%b>= link_to current_user.wiki_id, :root
= link_to t('application.log_out'), :destroy_user_session
- else
= link_to user_omniauth_authorize_path(:mediawiki_signup) do
%i.icon.icon-wiki-logo
= t('application.sign_up')
%span.expand= t('application.sign_up_log_in_extended')
= link_to user_omniauth_authorize_path(:mediawiki) do
%i.icon.icon-wiki-logo
= t('application.log_in')
%span.expand= t('application.sign_up_log_in_extended')
| %aside{:class => [local_assigns.fetch(:fluid, false) ? 'fluid' : nil]}
.container
.logo
%a.logo__link{:href => "/"}= logo_tag
.home
= link_to t('application.explore'), '/explore'
- if user_signed_in?
= link_to t('application.my_dashboard'), root_url
- if current_user && current_user.admin?
= link_to t('application.recent_activity'), '/recent-activity'
= link_to t('application.training'), :training
= link_to t('application.help'), '/ask', target: '_blank'
- if user_signed_in?
.search
= form_tag("/ask", method: "get", target: '_blank') do
= text_field_tag(:q, '', placeholder: t('application.search'))
%button{:type => "submit"}
%i.icon.icon-search
.login
- if user_signed_in?
%b>= link_to current_user.wiki_id, :root
= link_to t('application.log_out'), :destroy_user_session
- else
= link_to user_omniauth_authorize_path(:mediawiki) do
%i.icon.icon-wiki-logo
= t('application.log_in')
%span.expand= t('application.sign_up_log_in_extended')
| Remove 'Sign Up' link from nav header. | Remove 'Sign Up' link from nav header.
Resolves #545
| Haml | mit | majakomel/WikiEduDashboard,feelfreelinux/WikiEduDashboard,Wowu/WikiEduDashboard,adamwight/WikiEduDashboard,MusikAnimal/WikiEduDashboard,alpha721/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,Wowu/WikiEduDashboard,MusikAnimal/WikiEduDashboard,alpha721/WikiEduDashboard,majakomel/WikiEduDashboard,KarmaHater/WikiEduDashboard,Wowu/WikiEduDashboard,alpha721/WikiEduDashboard,sejalkhatri/WikiEduDashboard,majakomel/WikiEduDashboard,sejalkhatri/WikiEduDashboard,KarmaHater/WikiEduDashboard,MusikAnimal/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,Wowu/WikiEduDashboard,feelfreelinux/WikiEduDashboard,MusikAnimal/WikiEduDashboard,adamwight/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,sejalkhatri/WikiEduDashboard,alpha721/WikiEduDashboard,sejalkhatri/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard,KarmaHater/WikiEduDashboard,adamwight/WikiEduDashboard,sejalkhatri/WikiEduDashboard,majakomel/WikiEduDashboard,KarmaHater/WikiEduDashboard,feelfreelinux/WikiEduDashboard,feelfreelinux/WikiEduDashboard,WikiEducationFoundation/WikiEduDashboard | haml | ## Code Before:
%aside{:class => [local_assigns.fetch(:fluid, false) ? 'fluid' : nil]}
.container
.logo
%a.logo__link{:href => "/"}= logo_tag
.home
= link_to t('application.explore'), '/explore'
- if user_signed_in?
= link_to t('application.my_dashboard'), root_url
- if current_user && current_user.admin?
= link_to t('application.recent_activity'), '/recent-activity'
= link_to t('application.training'), :training
= link_to t('application.help'), '/ask', target: '_blank'
- if user_signed_in?
.search
= form_tag("/ask", method: "get", target: '_blank') do
= text_field_tag(:q, '', placeholder: t('application.search'))
%button{:type => "submit"}
%i.icon.icon-search
.login
- if user_signed_in?
%b>= link_to current_user.wiki_id, :root
= link_to t('application.log_out'), :destroy_user_session
- else
= link_to user_omniauth_authorize_path(:mediawiki_signup) do
%i.icon.icon-wiki-logo
= t('application.sign_up')
%span.expand= t('application.sign_up_log_in_extended')
= link_to user_omniauth_authorize_path(:mediawiki) do
%i.icon.icon-wiki-logo
= t('application.log_in')
%span.expand= t('application.sign_up_log_in_extended')
## Instruction:
Remove 'Sign Up' link from nav header.
Resolves #545
## Code After:
%aside{:class => [local_assigns.fetch(:fluid, false) ? 'fluid' : nil]}
.container
.logo
%a.logo__link{:href => "/"}= logo_tag
.home
= link_to t('application.explore'), '/explore'
- if user_signed_in?
= link_to t('application.my_dashboard'), root_url
- if current_user && current_user.admin?
= link_to t('application.recent_activity'), '/recent-activity'
= link_to t('application.training'), :training
= link_to t('application.help'), '/ask', target: '_blank'
- if user_signed_in?
.search
= form_tag("/ask", method: "get", target: '_blank') do
= text_field_tag(:q, '', placeholder: t('application.search'))
%button{:type => "submit"}
%i.icon.icon-search
.login
- if user_signed_in?
%b>= link_to current_user.wiki_id, :root
= link_to t('application.log_out'), :destroy_user_session
- else
= link_to user_omniauth_authorize_path(:mediawiki) do
%i.icon.icon-wiki-logo
= t('application.log_in')
%span.expand= t('application.sign_up_log_in_extended')
| %aside{:class => [local_assigns.fetch(:fluid, false) ? 'fluid' : nil]}
.container
.logo
%a.logo__link{:href => "/"}= logo_tag
.home
= link_to t('application.explore'), '/explore'
- if user_signed_in?
= link_to t('application.my_dashboard'), root_url
- if current_user && current_user.admin?
= link_to t('application.recent_activity'), '/recent-activity'
= link_to t('application.training'), :training
= link_to t('application.help'), '/ask', target: '_blank'
- if user_signed_in?
.search
= form_tag("/ask", method: "get", target: '_blank') do
= text_field_tag(:q, '', placeholder: t('application.search'))
%button{:type => "submit"}
%i.icon.icon-search
.login
- if user_signed_in?
%b>= link_to current_user.wiki_id, :root
= link_to t('application.log_out'), :destroy_user_session
- else
- = link_to user_omniauth_authorize_path(:mediawiki_signup) do
- %i.icon.icon-wiki-logo
- = t('application.sign_up')
- %span.expand= t('application.sign_up_log_in_extended')
= link_to user_omniauth_authorize_path(:mediawiki) do
%i.icon.icon-wiki-logo
= t('application.log_in')
%span.expand= t('application.sign_up_log_in_extended') | 4 | 0.129032 | 0 | 4 |
d751a9e84feaa8500e356f23dcb3ee0238149ac0 | chart/templates/secret.yaml | chart/templates/secret.yaml | apiVersion: v1
kind: Secret
metadata:
name: "bootstrap-secret"
namespace: {{ .Release.Namespace }}
type: Opaque
data:
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace "bootstrap-secret" }}
{{- if and $existingSecret $existingSecret.data }}
bootstrapPassword: {{ $existingSecret.data.bootstrapPassword }}
{{- else }}
bootstrapPassword: {{ .Values.bootstrapPassword | b64enc | quote }}
{{- end }}
| apiVersion: v1
kind: Secret
metadata:
name: "bootstrap-secret"
namespace: {{ .Release.Namespace }}
type: Opaque
data:
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace "bootstrap-secret" }}
{{- if and $existingSecret $existingSecret.data }}
{{- if $existingSecret.data.bootstrapPassword }}
bootstrapPassword: {{ $existingSecret.data.bootstrapPassword }}
{{- else }}
bootstrapPassword: {{ .Values.bootstrapPassword | default "" | b64enc | quote }}
{{- end }}
{{- else }}
bootstrapPassword: {{ .Values.bootstrapPassword | default "" | b64enc | quote }}
{{- end }}
| Fix helm upgrade for bootstrap password | Fix helm upgrade for bootstrap password
This handles upgrade when bootstrapPassword is no in the values and
also if the bootstrap secret exists and has no data or empty
bootstrapPassword field
| YAML | apache-2.0 | rancher/rancher,rancher/rancher,rancher/rancher,rancher/rancher | yaml | ## Code Before:
apiVersion: v1
kind: Secret
metadata:
name: "bootstrap-secret"
namespace: {{ .Release.Namespace }}
type: Opaque
data:
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace "bootstrap-secret" }}
{{- if and $existingSecret $existingSecret.data }}
bootstrapPassword: {{ $existingSecret.data.bootstrapPassword }}
{{- else }}
bootstrapPassword: {{ .Values.bootstrapPassword | b64enc | quote }}
{{- end }}
## Instruction:
Fix helm upgrade for bootstrap password
This handles upgrade when bootstrapPassword is no in the values and
also if the bootstrap secret exists and has no data or empty
bootstrapPassword field
## Code After:
apiVersion: v1
kind: Secret
metadata:
name: "bootstrap-secret"
namespace: {{ .Release.Namespace }}
type: Opaque
data:
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace "bootstrap-secret" }}
{{- if and $existingSecret $existingSecret.data }}
{{- if $existingSecret.data.bootstrapPassword }}
bootstrapPassword: {{ $existingSecret.data.bootstrapPassword }}
{{- else }}
bootstrapPassword: {{ .Values.bootstrapPassword | default "" | b64enc | quote }}
{{- end }}
{{- else }}
bootstrapPassword: {{ .Values.bootstrapPassword | default "" | b64enc | quote }}
{{- end }}
| apiVersion: v1
kind: Secret
metadata:
name: "bootstrap-secret"
namespace: {{ .Release.Namespace }}
type: Opaque
data:
{{- $existingSecret := lookup "v1" "Secret" .Release.Namespace "bootstrap-secret" }}
{{- if and $existingSecret $existingSecret.data }}
+ {{- if $existingSecret.data.bootstrapPassword }}
bootstrapPassword: {{ $existingSecret.data.bootstrapPassword }}
+ {{- else }}
+ bootstrapPassword: {{ .Values.bootstrapPassword | default "" | b64enc | quote }}
+ {{- end }}
{{- else }}
- bootstrapPassword: {{ .Values.bootstrapPassword | b64enc | quote }}
+ bootstrapPassword: {{ .Values.bootstrapPassword | default "" | b64enc | quote }}
? +++++++++++++
{{- end }} | 6 | 0.461538 | 5 | 1 |
5f0a4f33196c368318dba21aaa66956d4b973d60 | usig_normalizador_amba/settings.py | usig_normalizador_amba/settings.py | from __future__ import absolute_import
default_settings = {
'callejero_amba_server': 'http://servicios.usig.buenosaires.gob.ar/callejero-amba/',
'callejero_caba_server': 'http://usig.buenosaires.gov.ar/servicios/Callejero',
}
# Tipo de normalizacion
CALLE = 0
CALLE_ALTURA = 1
CALLE_Y_CALLE = 2
INVALIDO = -1
# Tipo de Match
NO_MATCH = 0
MATCH = 1
MATCH_INCLUIDO = 2
MATCH_PERMUTADO = 3
MATCH_EXACTO = 4
| from __future__ import absolute_import
default_settings = {
'callejero_amba_server': 'http://servicios.usig.buenosaires.gob.ar/callejero-amba/',
'callejero_caba_server': 'http://servicios.usig.buenosaires.gob.ar/callejero',
}
# Tipo de normalizacion
CALLE = 0
CALLE_ALTURA = 1
CALLE_Y_CALLE = 2
INVALIDO = -1
# Tipo de Match
NO_MATCH = 0
MATCH = 1
MATCH_INCLUIDO = 2
MATCH_PERMUTADO = 3
MATCH_EXACTO = 4
| Fix a la url del callejero CABA | Fix a la url del callejero CABA
| Python | mit | usig/normalizador-amba,hogasa/normalizador-amba | python | ## Code Before:
from __future__ import absolute_import
default_settings = {
'callejero_amba_server': 'http://servicios.usig.buenosaires.gob.ar/callejero-amba/',
'callejero_caba_server': 'http://usig.buenosaires.gov.ar/servicios/Callejero',
}
# Tipo de normalizacion
CALLE = 0
CALLE_ALTURA = 1
CALLE_Y_CALLE = 2
INVALIDO = -1
# Tipo de Match
NO_MATCH = 0
MATCH = 1
MATCH_INCLUIDO = 2
MATCH_PERMUTADO = 3
MATCH_EXACTO = 4
## Instruction:
Fix a la url del callejero CABA
## Code After:
from __future__ import absolute_import
default_settings = {
'callejero_amba_server': 'http://servicios.usig.buenosaires.gob.ar/callejero-amba/',
'callejero_caba_server': 'http://servicios.usig.buenosaires.gob.ar/callejero',
}
# Tipo de normalizacion
CALLE = 0
CALLE_ALTURA = 1
CALLE_Y_CALLE = 2
INVALIDO = -1
# Tipo de Match
NO_MATCH = 0
MATCH = 1
MATCH_INCLUIDO = 2
MATCH_PERMUTADO = 3
MATCH_EXACTO = 4
| from __future__ import absolute_import
default_settings = {
'callejero_amba_server': 'http://servicios.usig.buenosaires.gob.ar/callejero-amba/',
- 'callejero_caba_server': 'http://usig.buenosaires.gov.ar/servicios/Callejero',
? ^ ----- -----
+ 'callejero_caba_server': 'http://servicios.usig.buenosaires.gob.ar/callejero',
? ++++++++++ ^
}
# Tipo de normalizacion
CALLE = 0
CALLE_ALTURA = 1
CALLE_Y_CALLE = 2
INVALIDO = -1
# Tipo de Match
NO_MATCH = 0
MATCH = 1
MATCH_INCLUIDO = 2
MATCH_PERMUTADO = 3
MATCH_EXACTO = 4 | 2 | 0.105263 | 1 | 1 |
404ba8f45712bba49f5f39f20d79218332caae91 | tslint.json | tslint.json | {
"extends": ["tslint:latest", "tslint-config-prettier"],
"rulesDirectory": ["tslint-plugin-prettier"],
"rules": {
"prettier": true,
"no-console": [false],
"quotemark": [true, "single"],
"semicolon": [true, "always", "ignore-bound-class-methods"],
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"only-arrow-functions": [true, "allow-named-functions"],
"arrow-parens": false,
"variable-name": [
true,
"check-format",
"allow-pascal-case",
"allow-leading-underscore"
],
"switch-default": false,
"member-access": false,
"ordered-imports": [false],
"object-literal-sort-keys": false,
"no-unused-expression": [
true,
"allow-fast-null-checks",
"allow-tagged-template"
],
"no-shadowed-variable": [true, { "underscore": false }],
"max-classes-per-file": [true, 1],
"object-literal-key-quotes": [true, "as-needed"],
"no-object-literal-type-assertion": false,
"member-ordering": [
true,
{
"order": "statics-first"
}
],
"no-submodule-imports": false,
"interface-name": [true, "never-prefix"]
}
}
| {
"extends": ["tslint:latest", "tslint-config-prettier"],
"rulesDirectory": ["tslint-plugin-prettier"],
"rules": {
"prettier": true,
"no-console": [false],
"quotemark": [true, "single"],
"semicolon": [true, "always", "ignore-bound-class-methods"],
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"only-arrow-functions": [true, "allow-named-functions"],
"arrow-parens": false,
"variable-name": [
true,
"check-format",
"allow-pascal-case",
"allow-leading-underscore"
],
"switch-default": false,
"member-access": false,
"ordered-imports": [false],
"object-literal-sort-keys": false,
"no-unused-expression": [
true,
"allow-fast-null-checks",
"allow-tagged-template"
],
"no-shadowed-variable": [true, { "underscore": false }],
"max-classes-per-file": [true, 1],
"object-literal-key-quotes": [true, "as-needed"],
"interface-over-type-literal": false,
"no-object-literal-type-assertion": false,
"member-ordering": [
true,
{
"order": "statics-first"
}
],
"no-submodule-imports": false,
"interface-name": [true, "never-prefix"]
}
}
| Allow us to use type literals | Allow us to use type literals
See https://github.com/palantir/tslint/issues/3248 for details.
| JSON | mit | adorableio/avatars-api | json | ## Code Before:
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rulesDirectory": ["tslint-plugin-prettier"],
"rules": {
"prettier": true,
"no-console": [false],
"quotemark": [true, "single"],
"semicolon": [true, "always", "ignore-bound-class-methods"],
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"only-arrow-functions": [true, "allow-named-functions"],
"arrow-parens": false,
"variable-name": [
true,
"check-format",
"allow-pascal-case",
"allow-leading-underscore"
],
"switch-default": false,
"member-access": false,
"ordered-imports": [false],
"object-literal-sort-keys": false,
"no-unused-expression": [
true,
"allow-fast-null-checks",
"allow-tagged-template"
],
"no-shadowed-variable": [true, { "underscore": false }],
"max-classes-per-file": [true, 1],
"object-literal-key-quotes": [true, "as-needed"],
"no-object-literal-type-assertion": false,
"member-ordering": [
true,
{
"order": "statics-first"
}
],
"no-submodule-imports": false,
"interface-name": [true, "never-prefix"]
}
}
## Instruction:
Allow us to use type literals
See https://github.com/palantir/tslint/issues/3248 for details.
## Code After:
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rulesDirectory": ["tslint-plugin-prettier"],
"rules": {
"prettier": true,
"no-console": [false],
"quotemark": [true, "single"],
"semicolon": [true, "always", "ignore-bound-class-methods"],
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"only-arrow-functions": [true, "allow-named-functions"],
"arrow-parens": false,
"variable-name": [
true,
"check-format",
"allow-pascal-case",
"allow-leading-underscore"
],
"switch-default": false,
"member-access": false,
"ordered-imports": [false],
"object-literal-sort-keys": false,
"no-unused-expression": [
true,
"allow-fast-null-checks",
"allow-tagged-template"
],
"no-shadowed-variable": [true, { "underscore": false }],
"max-classes-per-file": [true, 1],
"object-literal-key-quotes": [true, "as-needed"],
"interface-over-type-literal": false,
"no-object-literal-type-assertion": false,
"member-ordering": [
true,
{
"order": "statics-first"
}
],
"no-submodule-imports": false,
"interface-name": [true, "never-prefix"]
}
}
| {
"extends": ["tslint:latest", "tslint-config-prettier"],
"rulesDirectory": ["tslint-plugin-prettier"],
"rules": {
"prettier": true,
"no-console": [false],
"quotemark": [true, "single"],
"semicolon": [true, "always", "ignore-bound-class-methods"],
"trailing-comma": [
true,
{
"multiline": "always",
"singleline": "never"
}
],
"only-arrow-functions": [true, "allow-named-functions"],
"arrow-parens": false,
"variable-name": [
true,
"check-format",
"allow-pascal-case",
"allow-leading-underscore"
],
"switch-default": false,
"member-access": false,
"ordered-imports": [false],
"object-literal-sort-keys": false,
"no-unused-expression": [
true,
"allow-fast-null-checks",
"allow-tagged-template"
],
"no-shadowed-variable": [true, { "underscore": false }],
"max-classes-per-file": [true, 1],
"object-literal-key-quotes": [true, "as-needed"],
+ "interface-over-type-literal": false,
"no-object-literal-type-assertion": false,
"member-ordering": [
true,
{
"order": "statics-first"
}
],
"no-submodule-imports": false,
"interface-name": [true, "never-prefix"]
}
} | 1 | 0.021739 | 1 | 0 |
488a111b5682954df2d0cec407c84c92a05ee67d | lib/tasks/album.rake | lib/tasks/album.rake | namespace :album do
desc "Upload all photos in an album"
task :upload, [:path] => :environment do |t, args|
path = File.expand_path(args.path)
title = Pathname.new(path).basename.to_s.parameterize
s3 = AWS::S3.new
bucket = s3.buckets['robin-photos']
tree = bucket.as_tree(prefix: title)
existing_photos = tree.children.select(&:leaf?).map(&:key)
images = valid_images(path)
images.each do |image|
key = "#{title}/#{image}"
unless existing_photos.include?(key)
puts "creating #{key}"
bucket.objects.create(key, "#{path}/#{image}")
end
end
end
desc "Create an album from photos on s3"
task :create, [:title] => :environment do |t, args|
require "album_creator"
AlbumCreator.new(args.title).insert_all_photos_from_s3
end
def valid_images(path)
Dir.entries(path).select { |f| f =~ /\.jpg|png\Z/i }
end
end
| namespace :album do
desc "Upload all photos in an album"
task :upload, [:path] => :environment do |t, args|
path = File.expand_path(args.path)
title = Pathname.new(path).basename.to_s.parameterize
s3 = AWS::S3.new
bucket = s3.buckets['robin-photos']
tree = bucket.as_tree(prefix: title)
existing_photos = tree.children.select(&:leaf?).map(&:key)
images = valid_images(path)
images.each do |image|
key = "#{title}/#{image}"
unless existing_photos.include?(key)
puts "creating #{key}"
bucket.objects.create(key, "#{path}/#{image}")
end
end
end
desc "Create an album from photos on s3"
task :create, [:title] => :environment do |t, args|
require "album_creator"
AlbumCreator.new(args.title).insert_all_photos_from_s3
end
desc "Sets the cover photo for an album"
task :update_cover_photo, [:title, :filename] => :environment do |t, args|
photo = Photo.find_by_filename!(args.filename)
Album.find_by_title!(args.title).update_attributes!(cover_photo: photo)
end
def valid_images(path)
Dir.entries(path).select { |f| f =~ /\.jpg|png\Z/i }
end
end
| Add rake task to set cover photos | Add rake task to set cover photos
| Ruby | mit | RobinClowers/photo-album,RobinClowers/photo-album,RobinClowers/photo-album,RobinClowers/photo-album | ruby | ## Code Before:
namespace :album do
desc "Upload all photos in an album"
task :upload, [:path] => :environment do |t, args|
path = File.expand_path(args.path)
title = Pathname.new(path).basename.to_s.parameterize
s3 = AWS::S3.new
bucket = s3.buckets['robin-photos']
tree = bucket.as_tree(prefix: title)
existing_photos = tree.children.select(&:leaf?).map(&:key)
images = valid_images(path)
images.each do |image|
key = "#{title}/#{image}"
unless existing_photos.include?(key)
puts "creating #{key}"
bucket.objects.create(key, "#{path}/#{image}")
end
end
end
desc "Create an album from photos on s3"
task :create, [:title] => :environment do |t, args|
require "album_creator"
AlbumCreator.new(args.title).insert_all_photos_from_s3
end
def valid_images(path)
Dir.entries(path).select { |f| f =~ /\.jpg|png\Z/i }
end
end
## Instruction:
Add rake task to set cover photos
## Code After:
namespace :album do
desc "Upload all photos in an album"
task :upload, [:path] => :environment do |t, args|
path = File.expand_path(args.path)
title = Pathname.new(path).basename.to_s.parameterize
s3 = AWS::S3.new
bucket = s3.buckets['robin-photos']
tree = bucket.as_tree(prefix: title)
existing_photos = tree.children.select(&:leaf?).map(&:key)
images = valid_images(path)
images.each do |image|
key = "#{title}/#{image}"
unless existing_photos.include?(key)
puts "creating #{key}"
bucket.objects.create(key, "#{path}/#{image}")
end
end
end
desc "Create an album from photos on s3"
task :create, [:title] => :environment do |t, args|
require "album_creator"
AlbumCreator.new(args.title).insert_all_photos_from_s3
end
desc "Sets the cover photo for an album"
task :update_cover_photo, [:title, :filename] => :environment do |t, args|
photo = Photo.find_by_filename!(args.filename)
Album.find_by_title!(args.title).update_attributes!(cover_photo: photo)
end
def valid_images(path)
Dir.entries(path).select { |f| f =~ /\.jpg|png\Z/i }
end
end
| namespace :album do
desc "Upload all photos in an album"
task :upload, [:path] => :environment do |t, args|
path = File.expand_path(args.path)
title = Pathname.new(path).basename.to_s.parameterize
s3 = AWS::S3.new
bucket = s3.buckets['robin-photos']
tree = bucket.as_tree(prefix: title)
existing_photos = tree.children.select(&:leaf?).map(&:key)
images = valid_images(path)
images.each do |image|
key = "#{title}/#{image}"
unless existing_photos.include?(key)
puts "creating #{key}"
bucket.objects.create(key, "#{path}/#{image}")
end
end
end
desc "Create an album from photos on s3"
task :create, [:title] => :environment do |t, args|
require "album_creator"
AlbumCreator.new(args.title).insert_all_photos_from_s3
end
+ desc "Sets the cover photo for an album"
+ task :update_cover_photo, [:title, :filename] => :environment do |t, args|
+ photo = Photo.find_by_filename!(args.filename)
+ Album.find_by_title!(args.title).update_attributes!(cover_photo: photo)
+ end
+
def valid_images(path)
Dir.entries(path).select { |f| f =~ /\.jpg|png\Z/i }
end
end | 6 | 0.1875 | 6 | 0 |
b96ca64e4d787aa7104174ea45b44a30d7696c26 | app/assets/stylesheets/forest/admin/partials/_block_errors.scss | app/assets/stylesheets/forest/admin/partials/_block_errors.scss | // Block errors
.block-slot--has-error {
.block-slot__panel-heading {
color: $state-danger-text;
.text-muted {
color: $state-danger-text;
}
}
}
| // Block errors
.block-slot--has-error {
& > .panel {
border-color: #cb9492;
}
.block-slot__panel-heading {
color: $state-danger-text;
.text-muted {
color: $state-danger-text;
}
}
}
| Add red border color to blocks with errors | Add red border color to blocks with errors
| SCSS | mit | dylanfisher/forest,dylanfisher/forest,dylanfisher/forest | scss | ## Code Before:
// Block errors
.block-slot--has-error {
.block-slot__panel-heading {
color: $state-danger-text;
.text-muted {
color: $state-danger-text;
}
}
}
## Instruction:
Add red border color to blocks with errors
## Code After:
// Block errors
.block-slot--has-error {
& > .panel {
border-color: #cb9492;
}
.block-slot__panel-heading {
color: $state-danger-text;
.text-muted {
color: $state-danger-text;
}
}
}
| // Block errors
.block-slot--has-error {
+ & > .panel {
+ border-color: #cb9492;
+ }
+
.block-slot__panel-heading {
color: $state-danger-text;
.text-muted {
color: $state-danger-text;
}
}
} | 4 | 0.363636 | 4 | 0 |
62e80bf702e3568df0d03646334bbe1799722d21 | cloudbuild_library_tests.yaml | cloudbuild_library_tests.yaml | steps:
- # Check that we can install important libraries without error
name: gcr.io/gcp-runtimes/structure_test:latest
args: [
'-i', '${_DOCKER_NAMESPACE}/python:${_TAG}',
'--config', '/workspace/tests/python2-libraries/python2-libraries.yaml',
'--config', '/workspace/tests/python3-libraries/python3-libraries.yaml',
'-v'
]
env: [
# Avoid warning about unused substitutions
'UNUSED1=${_BUILDER_DOCKER_NAMESPACE}',
]
images: [
]
| timeout: 1800s
steps:
- # Check that we can install important libraries without error
name: gcr.io/gcp-runtimes/structure_test:latest
args: [
'-i', '${_DOCKER_NAMESPACE}/python:${_TAG}',
'--config', '/workspace/tests/python2-libraries/python2-libraries.yaml',
'--config', '/workspace/tests/python3-libraries/python3-libraries.yaml',
'-v'
]
env: [
# Avoid warning about unused substitutions
'UNUSED1=${_BUILDER_DOCKER_NAMESPACE}',
]
images: [
]
| Increase timeout for library compatibility test | Increase timeout for library compatibility test
| YAML | apache-2.0 | GoogleCloudPlatform/python-runtime,nkubala/python-runtime,GoogleCloudPlatform/python-runtime,nkubala/python-runtime | yaml | ## Code Before:
steps:
- # Check that we can install important libraries without error
name: gcr.io/gcp-runtimes/structure_test:latest
args: [
'-i', '${_DOCKER_NAMESPACE}/python:${_TAG}',
'--config', '/workspace/tests/python2-libraries/python2-libraries.yaml',
'--config', '/workspace/tests/python3-libraries/python3-libraries.yaml',
'-v'
]
env: [
# Avoid warning about unused substitutions
'UNUSED1=${_BUILDER_DOCKER_NAMESPACE}',
]
images: [
]
## Instruction:
Increase timeout for library compatibility test
## Code After:
timeout: 1800s
steps:
- # Check that we can install important libraries without error
name: gcr.io/gcp-runtimes/structure_test:latest
args: [
'-i', '${_DOCKER_NAMESPACE}/python:${_TAG}',
'--config', '/workspace/tests/python2-libraries/python2-libraries.yaml',
'--config', '/workspace/tests/python3-libraries/python3-libraries.yaml',
'-v'
]
env: [
# Avoid warning about unused substitutions
'UNUSED1=${_BUILDER_DOCKER_NAMESPACE}',
]
images: [
]
| + timeout: 1800s
steps:
- # Check that we can install important libraries without error
name: gcr.io/gcp-runtimes/structure_test:latest
args: [
'-i', '${_DOCKER_NAMESPACE}/python:${_TAG}',
'--config', '/workspace/tests/python2-libraries/python2-libraries.yaml',
'--config', '/workspace/tests/python3-libraries/python3-libraries.yaml',
'-v'
]
env: [
# Avoid warning about unused substitutions
'UNUSED1=${_BUILDER_DOCKER_NAMESPACE}',
]
images: [
] | 1 | 0.066667 | 1 | 0 |
fea93e818380d4d9b3b68bc47509058f60b8cdb7 | src/arch/sparc/kernel/arch.c | src/arch/sparc/kernel/arch.c | /**
* @file
* @brief Implements ARCH interface for sparc processors
*
* @date 14.02.10
* @author Eldar Abusalimov
*/
#include <hal/arch.h>
#include <asm/cache.h>
#include <hal/ipl.h>
void arch_init(void) {
cache_enable();
}
void arch_idle(void) {
}
unsigned int arch_excep_disable(void) {
unsigned int ret;
unsigned int tmp;
__asm__ __volatile__ (
"rd %%psr, %0\n\t"
"andn %0, %2, %1\n\t"
"wr %1, 0, %%psr\n\t"
" nop; nop; nop\n"
: "=&r" (ret), "=r" (tmp)
: "i" (PSR_ET)
: "memory"
);
return ret;
}
void __attribute__ ((noreturn)) arch_shutdown(arch_shutdown_mode_t mode) {
ipl_disable();
arch_excep_disable();
asm ("ta 0");
while (1) {}
}
| /**
* @file
* @brief Implements ARCH interface for sparc processors
*
* @date 14.02.10
* @author Eldar Abusalimov
*/
#include <hal/arch.h>
#include <asm/cache.h>
#include <hal/ipl.h>
void arch_init(void) {
cache_enable();
}
void arch_idle(void) {
__asm__ __volatile__ ("wr %g0, %asr19");
}
unsigned int arch_excep_disable(void) {
unsigned int ret;
unsigned int tmp;
__asm__ __volatile__ (
"rd %%psr, %0\n\t"
"andn %0, %2, %1\n\t"
"wr %1, 0, %%psr\n\t"
" nop; nop; nop\n"
: "=&r" (ret), "=r" (tmp)
: "i" (PSR_ET)
: "memory"
);
return ret;
}
void __attribute__ ((noreturn)) arch_shutdown(arch_shutdown_mode_t mode) {
ipl_disable();
arch_excep_disable();
asm ("ta 0");
while (1) {}
}
| Add power down mode for idle circle | sparc: Add power down mode for idle circle | C | bsd-2-clause | abusalimov/embox,mike2390/embox,vrxfile/embox-trik,abusalimov/embox,Kefir0192/embox,embox/embox,embox/embox,abusalimov/embox,gzoom13/embox,gzoom13/embox,Kakadu/embox,mike2390/embox,mike2390/embox,embox/embox,gzoom13/embox,Kefir0192/embox,Kakadu/embox,Kakadu/embox,Kefir0192/embox,gzoom13/embox,mike2390/embox,Kakadu/embox,Kefir0192/embox,abusalimov/embox,abusalimov/embox,Kakadu/embox,vrxfile/embox-trik,embox/embox,gzoom13/embox,Kefir0192/embox,Kefir0192/embox,mike2390/embox,abusalimov/embox,vrxfile/embox-trik,mike2390/embox,vrxfile/embox-trik,gzoom13/embox,vrxfile/embox-trik,Kakadu/embox,vrxfile/embox-trik,Kefir0192/embox,vrxfile/embox-trik,embox/embox,mike2390/embox,embox/embox,Kakadu/embox,gzoom13/embox | c | ## Code Before:
/**
* @file
* @brief Implements ARCH interface for sparc processors
*
* @date 14.02.10
* @author Eldar Abusalimov
*/
#include <hal/arch.h>
#include <asm/cache.h>
#include <hal/ipl.h>
void arch_init(void) {
cache_enable();
}
void arch_idle(void) {
}
unsigned int arch_excep_disable(void) {
unsigned int ret;
unsigned int tmp;
__asm__ __volatile__ (
"rd %%psr, %0\n\t"
"andn %0, %2, %1\n\t"
"wr %1, 0, %%psr\n\t"
" nop; nop; nop\n"
: "=&r" (ret), "=r" (tmp)
: "i" (PSR_ET)
: "memory"
);
return ret;
}
void __attribute__ ((noreturn)) arch_shutdown(arch_shutdown_mode_t mode) {
ipl_disable();
arch_excep_disable();
asm ("ta 0");
while (1) {}
}
## Instruction:
sparc: Add power down mode for idle circle
## Code After:
/**
* @file
* @brief Implements ARCH interface for sparc processors
*
* @date 14.02.10
* @author Eldar Abusalimov
*/
#include <hal/arch.h>
#include <asm/cache.h>
#include <hal/ipl.h>
void arch_init(void) {
cache_enable();
}
void arch_idle(void) {
__asm__ __volatile__ ("wr %g0, %asr19");
}
unsigned int arch_excep_disable(void) {
unsigned int ret;
unsigned int tmp;
__asm__ __volatile__ (
"rd %%psr, %0\n\t"
"andn %0, %2, %1\n\t"
"wr %1, 0, %%psr\n\t"
" nop; nop; nop\n"
: "=&r" (ret), "=r" (tmp)
: "i" (PSR_ET)
: "memory"
);
return ret;
}
void __attribute__ ((noreturn)) arch_shutdown(arch_shutdown_mode_t mode) {
ipl_disable();
arch_excep_disable();
asm ("ta 0");
while (1) {}
}
| /**
* @file
* @brief Implements ARCH interface for sparc processors
*
* @date 14.02.10
* @author Eldar Abusalimov
*/
#include <hal/arch.h>
#include <asm/cache.h>
#include <hal/ipl.h>
void arch_init(void) {
cache_enable();
}
void arch_idle(void) {
+ __asm__ __volatile__ ("wr %g0, %asr19");
}
unsigned int arch_excep_disable(void) {
unsigned int ret;
unsigned int tmp;
__asm__ __volatile__ (
"rd %%psr, %0\n\t"
"andn %0, %2, %1\n\t"
"wr %1, 0, %%psr\n\t"
" nop; nop; nop\n"
: "=&r" (ret), "=r" (tmp)
: "i" (PSR_ET)
: "memory"
);
return ret;
}
void __attribute__ ((noreturn)) arch_shutdown(arch_shutdown_mode_t mode) {
ipl_disable();
arch_excep_disable();
asm ("ta 0");
while (1) {}
} | 1 | 0.02381 | 1 | 0 |
cd128ab0c86b20f2cde789f0c8d241ea183cf813 | lib/contao/tasks/assets.rake | lib/contao/tasks/assets.rake | namespace :assets do
desc "Compile javascript"
task :javascript do
TechnoGate::Contao::CoffeescriptCompiler.compile
TechnoGate::Contao::CoffeescriptCompiler.compile
TechnoGate::Contao::JavascriptCompiler.compile
end
desc "Compile stylesheet"
task :stylesheet do
TechnoGate::Contao::StylesheetCompiler.compile
end
desc "Clean assets"
task :clean do
TechnoGate::Contao::StylesheetCompiler.clean
TechnoGate::Contao::CoffeescriptCompiler.clean
TechnoGate::Contao::JavascriptCompiler.clean
end
desc "Precompile assets"
task :precompile => [:clean, :stylesheet, :javascript]
end
| namespace :assets do
desc "Compile javascript"
task :javascript do
TechnoGate::Contao::CoffeescriptCompiler.compile
TechnoGate::Contao::JavascriptCompiler.compile
end
desc "Compile stylesheet"
task :stylesheet do
TechnoGate::Contao::StylesheetCompiler.compile
end
desc "Clean assets"
task :clean do
TechnoGate::Contao::StylesheetCompiler.clean
TechnoGate::Contao::CoffeescriptCompiler.clean
TechnoGate::Contao::JavascriptCompiler.clean
end
desc "Precompile assets"
task :precompile => [:clean, :stylesheet, :javascript]
end
| Revert "Compile CoffeeScript before compiling javascript" | Revert "Compile CoffeeScript before compiling javascript"
This reverts commit 11b143dde3f2b4b73d757a1b71daae0ffedca387.
| Ruby | mit | TechnoGate/contao | ruby | ## Code Before:
namespace :assets do
desc "Compile javascript"
task :javascript do
TechnoGate::Contao::CoffeescriptCompiler.compile
TechnoGate::Contao::CoffeescriptCompiler.compile
TechnoGate::Contao::JavascriptCompiler.compile
end
desc "Compile stylesheet"
task :stylesheet do
TechnoGate::Contao::StylesheetCompiler.compile
end
desc "Clean assets"
task :clean do
TechnoGate::Contao::StylesheetCompiler.clean
TechnoGate::Contao::CoffeescriptCompiler.clean
TechnoGate::Contao::JavascriptCompiler.clean
end
desc "Precompile assets"
task :precompile => [:clean, :stylesheet, :javascript]
end
## Instruction:
Revert "Compile CoffeeScript before compiling javascript"
This reverts commit 11b143dde3f2b4b73d757a1b71daae0ffedca387.
## Code After:
namespace :assets do
desc "Compile javascript"
task :javascript do
TechnoGate::Contao::CoffeescriptCompiler.compile
TechnoGate::Contao::JavascriptCompiler.compile
end
desc "Compile stylesheet"
task :stylesheet do
TechnoGate::Contao::StylesheetCompiler.compile
end
desc "Clean assets"
task :clean do
TechnoGate::Contao::StylesheetCompiler.clean
TechnoGate::Contao::CoffeescriptCompiler.clean
TechnoGate::Contao::JavascriptCompiler.clean
end
desc "Precompile assets"
task :precompile => [:clean, :stylesheet, :javascript]
end
| namespace :assets do
desc "Compile javascript"
task :javascript do
- TechnoGate::Contao::CoffeescriptCompiler.compile
TechnoGate::Contao::CoffeescriptCompiler.compile
TechnoGate::Contao::JavascriptCompiler.compile
end
desc "Compile stylesheet"
task :stylesheet do
TechnoGate::Contao::StylesheetCompiler.compile
end
desc "Clean assets"
task :clean do
TechnoGate::Contao::StylesheetCompiler.clean
TechnoGate::Contao::CoffeescriptCompiler.clean
TechnoGate::Contao::JavascriptCompiler.clean
end
desc "Precompile assets"
task :precompile => [:clean, :stylesheet, :javascript]
end | 1 | 0.043478 | 0 | 1 |
068460e74885378bade28d1c8184b8867128fd39 | test/Driver/XRay/xray-instrument-cpu.c | test/Driver/XRay/xray-instrument-cpu.c | // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
// XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64
// REQUIRES: linux
typedef int a;
| // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
// XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64, powerpc64le-
// REQUIRES: linux
typedef int a;
| Update XFAIL line after r294781. | Update XFAIL line after r294781.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@294820 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang | c | ## Code Before:
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
// XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64
// REQUIRES: linux
typedef int a;
## Instruction:
Update XFAIL line after r294781.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@294820 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
// XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64, powerpc64le-
// REQUIRES: linux
typedef int a;
| // RUN: not %clang -o /dev/null -v -fxray-instrument -c %s
- // XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64
+ // XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64, powerpc64le-
? ++++++++++++++
// REQUIRES: linux
typedef int a; | 2 | 0.5 | 1 | 1 |
07d13e6f675e63fee94e5179bdbfaad10681d7de | config/locales/en.yml | config/locales/en.yml | en:
enumerize:
user:
qae_info_source:
govuk: Gov.UK
competitor: From a Competitor
business_event: At a business event
national_press: In the National Press
business_press: In the Business Press
online: Online
local_trade_body: From a Local Trade body
national_trade_body: From a National Trade body
mail_from_qae: By direct mail from The Queen's Awards Office
word_of_mouth: General word of mouth
other: Other
eligibility:
organization_kind:
business: Business
charity: Not-for-profit
kind:
application: Apply for an award
nomination: Nominate an individual
industry:
product_business: Product business
service_business: Service business
activerecord:
errors:
messages:
blank: This field cannot be blank
accepted: Must be accepted
taken: "This %{attribute} has already been taken"
too_long: "%{attribute} is too long (maximum is %{count} characters)"
too_short: "%{attribute} is too short (minimum is %{count} characters)"
confirmation: "%{attribute} doesn't match."
| en:
enumerize:
user:
qae_info_source:
govuk: GOV.UK
competitor: From a competitor
business_event: At a business event
national_press: In the national press
business_press: In the business press
online: Online
local_trade_body: From a local trade body
national_trade_body: From a national trade body
mail_from_qae: Mail from the Queen’s Awards Office
word_of_mouth: Word of mouth
other: Other
eligibility:
organization_kind:
business: Business
charity: Not-for-profit
kind:
application: Apply for an award
nomination: Nominate an individual
industry:
product_business: Product business
service_business: Service business
activerecord:
errors:
messages:
blank: This field cannot be blank
accepted: Must be accepted
taken: "This %{attribute} has already been taken"
too_long: "%{attribute} is too long (maximum is %{count} characters)"
too_short: "%{attribute} is too short (minimum is %{count} characters)"
confirmation: "%{attribute} doesn't match."
| COPY updated how did you hear about us | COPY updated how did you hear about us
| YAML | mit | bitzesty/qae,bitzesty/qae,bitzesty/qae,bitzesty/qae | yaml | ## Code Before:
en:
enumerize:
user:
qae_info_source:
govuk: Gov.UK
competitor: From a Competitor
business_event: At a business event
national_press: In the National Press
business_press: In the Business Press
online: Online
local_trade_body: From a Local Trade body
national_trade_body: From a National Trade body
mail_from_qae: By direct mail from The Queen's Awards Office
word_of_mouth: General word of mouth
other: Other
eligibility:
organization_kind:
business: Business
charity: Not-for-profit
kind:
application: Apply for an award
nomination: Nominate an individual
industry:
product_business: Product business
service_business: Service business
activerecord:
errors:
messages:
blank: This field cannot be blank
accepted: Must be accepted
taken: "This %{attribute} has already been taken"
too_long: "%{attribute} is too long (maximum is %{count} characters)"
too_short: "%{attribute} is too short (minimum is %{count} characters)"
confirmation: "%{attribute} doesn't match."
## Instruction:
COPY updated how did you hear about us
## Code After:
en:
enumerize:
user:
qae_info_source:
govuk: GOV.UK
competitor: From a competitor
business_event: At a business event
national_press: In the national press
business_press: In the business press
online: Online
local_trade_body: From a local trade body
national_trade_body: From a national trade body
mail_from_qae: Mail from the Queen’s Awards Office
word_of_mouth: Word of mouth
other: Other
eligibility:
organization_kind:
business: Business
charity: Not-for-profit
kind:
application: Apply for an award
nomination: Nominate an individual
industry:
product_business: Product business
service_business: Service business
activerecord:
errors:
messages:
blank: This field cannot be blank
accepted: Must be accepted
taken: "This %{attribute} has already been taken"
too_long: "%{attribute} is too long (maximum is %{count} characters)"
too_short: "%{attribute} is too short (minimum is %{count} characters)"
confirmation: "%{attribute} doesn't match."
| en:
enumerize:
user:
qae_info_source:
- govuk: Gov.UK
? ^^
+ govuk: GOV.UK
? ^^
- competitor: From a Competitor
? ^
+ competitor: From a competitor
? ^
business_event: At a business event
- national_press: In the National Press
? ^ ^
+ national_press: In the national press
? ^ ^
- business_press: In the Business Press
? ^ ^
+ business_press: In the business press
? ^ ^
online: Online
- local_trade_body: From a Local Trade body
? ^ ^
+ local_trade_body: From a local trade body
? ^ ^
- national_trade_body: From a National Trade body
? ^ ^
+ national_trade_body: From a national trade body
? ^ ^
- mail_from_qae: By direct mail from The Queen's Awards Office
? ^^^^^^^^^^^ ^ ^
+ mail_from_qae: Mail from the Queen’s Awards Office
? ^ ^ ^
- word_of_mouth: General word of mouth
? ^^^^^^^^^
+ word_of_mouth: Word of mouth
? ^
other: Other
+
eligibility:
organization_kind:
business: Business
charity: Not-for-profit
kind:
application: Apply for an award
nomination: Nominate an individual
industry:
product_business: Product business
service_business: Service business
activerecord:
errors:
messages:
blank: This field cannot be blank
accepted: Must be accepted
taken: "This %{attribute} has already been taken"
too_long: "%{attribute} is too long (maximum is %{count} characters)"
too_short: "%{attribute} is too short (minimum is %{count} characters)"
confirmation: "%{attribute} doesn't match." | 17 | 0.485714 | 9 | 8 |
437eb8432fe91865d3cb24109e1b99818de8ce4e | pysc2/bin/battle_net_maps.py | pysc2/bin/battle_net_maps.py | """Print the list of available maps according to the game."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl import app
from pysc2 import run_configs
def main(unused_argv):
with run_configs.get().start(want_rgb=False) as controller:
available_maps = controller.available_maps()
print("\n")
print("Local map paths:")
for m in available_maps.local_map_paths:
print(m)
print()
print("Battle.net maps:")
for m in available_maps.battlenet_map_names:
print(m)
if __name__ == "__main__":
app.run(main)
| """Print the list of available maps according to the game."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl import app
from pysc2 import run_configs
def main(unused_argv):
with run_configs.get().start(want_rgb=False) as controller:
available_maps = controller.available_maps()
print("\n")
print("Local map paths:")
for m in sorted(available_maps.local_map_paths):
print(" ", m)
print()
print("Battle.net maps:")
for m in sorted(available_maps.battlenet_map_names):
print(" ", m)
if __name__ == "__main__":
app.run(main)
| Sort and indent the map lists. | Sort and indent the map lists.
PiperOrigin-RevId: 249276696
| Python | apache-2.0 | deepmind/pysc2 | python | ## Code Before:
"""Print the list of available maps according to the game."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl import app
from pysc2 import run_configs
def main(unused_argv):
with run_configs.get().start(want_rgb=False) as controller:
available_maps = controller.available_maps()
print("\n")
print("Local map paths:")
for m in available_maps.local_map_paths:
print(m)
print()
print("Battle.net maps:")
for m in available_maps.battlenet_map_names:
print(m)
if __name__ == "__main__":
app.run(main)
## Instruction:
Sort and indent the map lists.
PiperOrigin-RevId: 249276696
## Code After:
"""Print the list of available maps according to the game."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl import app
from pysc2 import run_configs
def main(unused_argv):
with run_configs.get().start(want_rgb=False) as controller:
available_maps = controller.available_maps()
print("\n")
print("Local map paths:")
for m in sorted(available_maps.local_map_paths):
print(" ", m)
print()
print("Battle.net maps:")
for m in sorted(available_maps.battlenet_map_names):
print(" ", m)
if __name__ == "__main__":
app.run(main)
| """Print the list of available maps according to the game."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from absl import app
from pysc2 import run_configs
def main(unused_argv):
with run_configs.get().start(want_rgb=False) as controller:
available_maps = controller.available_maps()
print("\n")
print("Local map paths:")
- for m in available_maps.local_map_paths:
+ for m in sorted(available_maps.local_map_paths):
? +++++++ +
- print(m)
+ print(" ", m)
? +++++
print()
print("Battle.net maps:")
- for m in available_maps.battlenet_map_names:
+ for m in sorted(available_maps.battlenet_map_names):
? +++++++ +
- print(m)
+ print(" ", m)
? +++++
if __name__ == "__main__":
app.run(main) | 8 | 0.307692 | 4 | 4 |
9251c4d017f589fe33f1ce7b22b11a33f12662b7 | README.md | README.md | PresentIO is a lightweight Mac app (OS X Yosemite or newer) that allows you to mirror your iOS devices to your screen.
There is nothing to install. Simply connect your device via a Lightning cable and you're ready to go.

### No Install. No Network. No Problem.
You've no doubt used other network-based approaches to mirroring.
You probably wouldn't be here if you hadn't already run into reliability issues there like I did - spending half of the presentation time trying to “jiggle the handle” and get things working again.
With PresentIO, you don't need a Wi-Fi or Bluetooth connection to flawlessly share your device display.
### This is great for:
- When you don't have a Wi-Fi network available, or your customer won't let you on theirs
- Doing a demo of your app's offline capabilities
- Live demos in front of hundreds of people all clobbering your access point
===
### Download application
Download version 1.0 of the app, already built and signed, from http://bit.ly/PresentIO-1-01
===
#### Donate a beer
Help me supporting new OS versions and adding cool new features. Connect on https://www.linkedin.com/in/goncaloborrega/ or tweet me at https://twitter.com/goborrega
| PresentIO is a lightweight Mac app (OS X Yosemite or newer) that allows you to mirror your iOS devices to your screen.
There is nothing to install. Simply connect your device via a Lightning cable and you're ready to go.

### No Install. No Network. No Problem.
You've no doubt used other network-based approaches to mirroring.
You probably wouldn't be here if you hadn't already run into reliability issues there like I did - spending half of the presentation time trying to “jiggle the handle” and get things working again.
With PresentIO, you don't need a Wi-Fi or Bluetooth connection to flawlessly share your device display.
### This is great for:
- When you don't have a Wi-Fi network available, or your customer won't let you on theirs
- Doing a demo of your app's offline capabilities
- Live demos in front of hundreds of people all clobbering your access point
===
### Download application
Download version 1.0 of the app, already built and signed, from https://github.com/goborrega/PresentIO/releases/download/1.0/PresentIO.app.zip
===
#### Donate a beer
Help me supporting new OS versions and adding cool new features. Connect on https://www.linkedin.com/in/goncaloborrega/ or tweet me at https://twitter.com/goborrega
| Fix link to Release 1.0 download | Fix link to Release 1.0 download | Markdown | mit | goborrega/PresentIO | markdown | ## Code Before:
PresentIO is a lightweight Mac app (OS X Yosemite or newer) that allows you to mirror your iOS devices to your screen.
There is nothing to install. Simply connect your device via a Lightning cable and you're ready to go.

### No Install. No Network. No Problem.
You've no doubt used other network-based approaches to mirroring.
You probably wouldn't be here if you hadn't already run into reliability issues there like I did - spending half of the presentation time trying to “jiggle the handle” and get things working again.
With PresentIO, you don't need a Wi-Fi or Bluetooth connection to flawlessly share your device display.
### This is great for:
- When you don't have a Wi-Fi network available, or your customer won't let you on theirs
- Doing a demo of your app's offline capabilities
- Live demos in front of hundreds of people all clobbering your access point
===
### Download application
Download version 1.0 of the app, already built and signed, from http://bit.ly/PresentIO-1-01
===
#### Donate a beer
Help me supporting new OS versions and adding cool new features. Connect on https://www.linkedin.com/in/goncaloborrega/ or tweet me at https://twitter.com/goborrega
## Instruction:
Fix link to Release 1.0 download
## Code After:
PresentIO is a lightweight Mac app (OS X Yosemite or newer) that allows you to mirror your iOS devices to your screen.
There is nothing to install. Simply connect your device via a Lightning cable and you're ready to go.

### No Install. No Network. No Problem.
You've no doubt used other network-based approaches to mirroring.
You probably wouldn't be here if you hadn't already run into reliability issues there like I did - spending half of the presentation time trying to “jiggle the handle” and get things working again.
With PresentIO, you don't need a Wi-Fi or Bluetooth connection to flawlessly share your device display.
### This is great for:
- When you don't have a Wi-Fi network available, or your customer won't let you on theirs
- Doing a demo of your app's offline capabilities
- Live demos in front of hundreds of people all clobbering your access point
===
### Download application
Download version 1.0 of the app, already built and signed, from https://github.com/goborrega/PresentIO/releases/download/1.0/PresentIO.app.zip
===
#### Donate a beer
Help me supporting new OS versions and adding cool new features. Connect on https://www.linkedin.com/in/goncaloborrega/ or tweet me at https://twitter.com/goborrega
| PresentIO is a lightweight Mac app (OS X Yosemite or newer) that allows you to mirror your iOS devices to your screen.
There is nothing to install. Simply connect your device via a Lightning cable and you're ready to go.

### No Install. No Network. No Problem.
You've no doubt used other network-based approaches to mirroring.
You probably wouldn't be here if you hadn't already run into reliability issues there like I did - spending half of the presentation time trying to “jiggle the handle” and get things working again.
With PresentIO, you don't need a Wi-Fi or Bluetooth connection to flawlessly share your device display.
### This is great for:
- When you don't have a Wi-Fi network available, or your customer won't let you on theirs
- Doing a demo of your app's offline capabilities
- Live demos in front of hundreds of people all clobbering your access point
===
### Download application
- Download version 1.0 of the app, already built and signed, from http://bit.ly/PresentIO-1-01
+ Download version 1.0 of the app, already built and signed, from https://github.com/goborrega/PresentIO/releases/download/1.0/PresentIO.app.zip
===
#### Donate a beer
Help me supporting new OS versions and adding cool new features. Connect on https://www.linkedin.com/in/goncaloborrega/ or tweet me at https://twitter.com/goborrega
| 2 | 0.074074 | 1 | 1 |
7f0af56e4fb5ea2b12609f3497215f67b0b42fcd | .travis.yml | .travis.yml | language: java
sudo: false
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
script:
- |-
if [ ${TRAVIS_PULL_REQUEST} = "false" ]; then
openssl aes-256-cbc -K $encrypted_25450b691aae_key -iv $encrypted_25450b691aae_iv -in my.azureauth.txt.enc -out my.azureauth.txt -d;
export AZURE_TEST_MODE=RECORD || travis_terminate 1 ;
export AZURE_AUTH_LOCATION=$TRAVIS_BUILD_DIR/my.azureauth.txt || travis_terminate 1 ;
mvn install -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
else
mvn install -DskipTests=true || travis_terminate 1 ;
mvn test -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
mvn checkstyle:check || travis_terminate 1 ;
mvn -pl !azure-samples package javadoc:aggregate -DskipTests=true || travis_terminate 1 ;
fi
| language: java
sudo: false
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
script:
- |-
if [ ${TRAVIS_PULL_REQUEST} = "false" ]; then
openssl aes-256-cbc -K $encrypted_25450b691aae_key -iv $encrypted_25450b691aae_iv -in my.azureauth.txt.enc -out my.azureauth.txt -d;
export AZURE_TEST_MODE=RECORD || travis_terminate 1 ;
export AZURE_AUTH_LOCATION=$TRAVIS_BUILD_DIR/my.azureauth.txt || travis_terminate 1 ;
mvn -pl !azure-keyvault,!azure-keyvault-extensions install -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
else
mvn install -DskipTests=true || travis_terminate 1 ;
mvn -pl !azure-keyvault,!azure-keyvault-extensions test -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
mvn checkstyle:check || travis_terminate 1 ;
mvn -pl !azure-samples package javadoc:aggregate -DskipTests=true || travis_terminate 1 ;
fi
| Exclude key vault from CI test runs | Exclude key vault from CI test runs | YAML | mit | Azure/azure-sdk-for-java,hovsepm/azure-sdk-for-java,hovsepm/azure-sdk-for-java,martinsawicki/azure-sdk-for-java,Azure/azure-sdk-for-java,martinsawicki/azure-sdk-for-java,anudeepsharma/azure-sdk-for-java,hovsepm/azure-sdk-for-java,anudeepsharma/azure-sdk-for-java,Azure/azure-sdk-for-java,hovsepm/azure-sdk-for-java,anudeepsharma/azure-sdk-for-java,ljhljh235/azure-sdk-for-java,selvasingh/azure-sdk-for-java,ljhljh235/azure-sdk-for-java,navalev/azure-sdk-for-java,jianghaolu/azure-sdk-for-java,jianghaolu/azure-sdk-for-java,anudeepsharma/azure-sdk-for-java,Azure/azure-sdk-for-java,navalev/azure-sdk-for-java,martinsawicki/azure-sdk-for-java,Azure/azure-sdk-for-java,navalev/azure-sdk-for-java,hovsepm/azure-sdk-for-java,anudeepsharma/azure-sdk-for-java,jianghaolu/azure-sdk-for-java,navalev/azure-sdk-for-java,selvasingh/azure-sdk-for-java,navalev/azure-sdk-for-java,selvasingh/azure-sdk-for-java | yaml | ## Code Before:
language: java
sudo: false
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
script:
- |-
if [ ${TRAVIS_PULL_REQUEST} = "false" ]; then
openssl aes-256-cbc -K $encrypted_25450b691aae_key -iv $encrypted_25450b691aae_iv -in my.azureauth.txt.enc -out my.azureauth.txt -d;
export AZURE_TEST_MODE=RECORD || travis_terminate 1 ;
export AZURE_AUTH_LOCATION=$TRAVIS_BUILD_DIR/my.azureauth.txt || travis_terminate 1 ;
mvn install -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
else
mvn install -DskipTests=true || travis_terminate 1 ;
mvn test -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
mvn checkstyle:check || travis_terminate 1 ;
mvn -pl !azure-samples package javadoc:aggregate -DskipTests=true || travis_terminate 1 ;
fi
## Instruction:
Exclude key vault from CI test runs
## Code After:
language: java
sudo: false
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
script:
- |-
if [ ${TRAVIS_PULL_REQUEST} = "false" ]; then
openssl aes-256-cbc -K $encrypted_25450b691aae_key -iv $encrypted_25450b691aae_iv -in my.azureauth.txt.enc -out my.azureauth.txt -d;
export AZURE_TEST_MODE=RECORD || travis_terminate 1 ;
export AZURE_AUTH_LOCATION=$TRAVIS_BUILD_DIR/my.azureauth.txt || travis_terminate 1 ;
mvn -pl !azure-keyvault,!azure-keyvault-extensions install -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
else
mvn install -DskipTests=true || travis_terminate 1 ;
mvn -pl !azure-keyvault,!azure-keyvault-extensions test -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
mvn checkstyle:check || travis_terminate 1 ;
mvn -pl !azure-samples package javadoc:aggregate -DskipTests=true || travis_terminate 1 ;
fi
| language: java
sudo: false
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
script:
- |-
if [ ${TRAVIS_PULL_REQUEST} = "false" ]; then
openssl aes-256-cbc -K $encrypted_25450b691aae_key -iv $encrypted_25450b691aae_iv -in my.azureauth.txt.enc -out my.azureauth.txt -d;
export AZURE_TEST_MODE=RECORD || travis_terminate 1 ;
export AZURE_AUTH_LOCATION=$TRAVIS_BUILD_DIR/my.azureauth.txt || travis_terminate 1 ;
- mvn install -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
+ mvn -pl !azure-keyvault,!azure-keyvault-extensions install -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
? +++++++++++++++++++++++++++++++++++++++++++++++
else
mvn install -DskipTests=true || travis_terminate 1 ;
- mvn test -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
+ mvn -pl !azure-keyvault,!azure-keyvault-extensions test -Dorg.slf4j.simpleLogger.defaultLogLevel=error || travis_terminate 1 ;
? +++++++++++++++++++++++++++++++++++++++++++++++
mvn checkstyle:check || travis_terminate 1 ;
mvn -pl !azure-samples package javadoc:aggregate -DskipTests=true || travis_terminate 1 ;
fi
| 4 | 0.181818 | 2 | 2 |
725d1a723e5bbc092df08364444d5a3ffb1f94b3 | doc/math-definitions.rst | doc/math-definitions.rst | .. raw:: latex
\marginpar{% Avoid creating empty vertical space for the math definitions
.. rst-class:: hidden
.. math::
\gdef\dirac#1{\operatorname{\delta}\left(#1\right)}
\gdef\e#1{\operatorname{e}^{#1}}
\gdef\Hankel#1#2#3{\mathop{{}H_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\hankel#1#2#3{\mathop{{}h_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\i{\mathrm{i}}
\gdef\scalarprod#1#2{\left\langle#1,#2\right\rangle}
\gdef\vec#1{\mathbf{#1}}
\gdef\wc{\frac{\omega}{c}}
\gdef\w{\omega}
\gdef\x{\vec{x}}
\gdef\n{\vec{n}}
.. raw:: latex
}
| .. raw:: latex
\marginpar{% Avoid creating empty vertical space for the math definitions
.. rst-class:: hidden
.. math::
\gdef\dirac#1{\mathop{{}\delta}\left(#1\right)}
\gdef\e#1{\operatorname{e}^{#1}}
\gdef\Hankel#1#2#3{\mathop{{}H_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\hankel#1#2#3{\mathop{{}h_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\i{\mathrm{i}}
\gdef\scalarprod#1#2{\left\langle#1,#2\right\rangle}
\gdef\vec#1{\mathbf{#1}}
\gdef\wc{\frac{\omega}{c}}
\gdef\w{\omega}
\gdef\x{\vec{x}}
\gdef\n{\vec{n}}
.. raw:: latex
}
| Use \mathop instead of \operatorname | Use \mathop instead of \operatorname
| reStructuredText | mit | sfstoolbox/sfs-python,sfstoolbox/sfs-python | restructuredtext | ## Code Before:
.. raw:: latex
\marginpar{% Avoid creating empty vertical space for the math definitions
.. rst-class:: hidden
.. math::
\gdef\dirac#1{\operatorname{\delta}\left(#1\right)}
\gdef\e#1{\operatorname{e}^{#1}}
\gdef\Hankel#1#2#3{\mathop{{}H_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\hankel#1#2#3{\mathop{{}h_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\i{\mathrm{i}}
\gdef\scalarprod#1#2{\left\langle#1,#2\right\rangle}
\gdef\vec#1{\mathbf{#1}}
\gdef\wc{\frac{\omega}{c}}
\gdef\w{\omega}
\gdef\x{\vec{x}}
\gdef\n{\vec{n}}
.. raw:: latex
}
## Instruction:
Use \mathop instead of \operatorname
## Code After:
.. raw:: latex
\marginpar{% Avoid creating empty vertical space for the math definitions
.. rst-class:: hidden
.. math::
\gdef\dirac#1{\mathop{{}\delta}\left(#1\right)}
\gdef\e#1{\operatorname{e}^{#1}}
\gdef\Hankel#1#2#3{\mathop{{}H_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\hankel#1#2#3{\mathop{{}h_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\i{\mathrm{i}}
\gdef\scalarprod#1#2{\left\langle#1,#2\right\rangle}
\gdef\vec#1{\mathbf{#1}}
\gdef\wc{\frac{\omega}{c}}
\gdef\w{\omega}
\gdef\x{\vec{x}}
\gdef\n{\vec{n}}
.. raw:: latex
}
| .. raw:: latex
\marginpar{% Avoid creating empty vertical space for the math definitions
.. rst-class:: hidden
.. math::
- \gdef\dirac#1{\operatorname{\delta}\left(#1\right)}
? ----------
+ \gdef\dirac#1{\mathop{{}\delta}\left(#1\right)}
? ++++ ++
\gdef\e#1{\operatorname{e}^{#1}}
\gdef\Hankel#1#2#3{\mathop{{}H_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\hankel#1#2#3{\mathop{{}h_{#2}^{(#1)}}\!\left(#3\right)}
\gdef\i{\mathrm{i}}
\gdef\scalarprod#1#2{\left\langle#1,#2\right\rangle}
\gdef\vec#1{\mathbf{#1}}
\gdef\wc{\frac{\omega}{c}}
\gdef\w{\omega}
\gdef\x{\vec{x}}
\gdef\n{\vec{n}}
.. raw:: latex
} | 2 | 0.090909 | 1 | 1 |
e3c840567fae974b2a1f169b05b86de97b60c8d0 | gitcms/publications/urls.py | gitcms/publications/urls.py | from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publications/files/(?P<file>.+)$', 'django.views.static.serve', {'document_root': settings._BASE_DIR + '/../media/publications/files'}),
)
| from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publications/files/(?P<file>.+)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT + '/publications/files'}),
)
| Remove stay mention to BASE_URL | Remove stay mention to BASE_URL
| Python | agpl-3.0 | luispedro/django-gitcms,luispedro/django-gitcms | python | ## Code Before:
from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publications/files/(?P<file>.+)$', 'django.views.static.serve', {'document_root': settings._BASE_DIR + '/../media/publications/files'}),
)
## Instruction:
Remove stay mention to BASE_URL
## Code After:
from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
(r'^publications/files/(?P<file>.+)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT + '/publications/files'}),
)
| from django.conf.urls.defaults import *
import settings
import views
urlpatterns = patterns('',
(r'^papers/(?P<paper>.+)$', views.papers),
(r'^publications/?$', views.publications, { 'collection' : 'luispedro' }),
(r'^publications/(?P<collection>.+)$', views.publications),
- (r'^publications/files/(?P<file>.+)$', 'django.views.static.serve', {'document_root': settings._BASE_DIR + '/../media/publications/files'}),
? ^^^^ - ---------
+ (r'^publications/files/(?P<file>.+)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT + '/publications/files'}),
? ^ ++ +++
)
| 2 | 0.181818 | 1 | 1 |
d7bd2c42b04e41d871ce7c13fd33e3e9d9a0d262 | src/shared/adjusters/html/textSizeTemplatePMT.html | src/shared/adjusters/html/textSizeTemplatePMT.html | <div class="gpii-prefsEditor-adjusterPanel">
<h4 class="gpiic-textSize-label"></h4>
<div class="gpii-prefsEditor-previewPerSettingContainer">
<div class="gpii-prefsEditor-adjusterIcons gpii-prefsEditor-previewPerSettingEye"></div>
<div class="gpii-prefsEditor-previewPerSettingEyeBackground"></div>
<iframe class="gpiic-textSize-preview gpiic-adjuster-preview gpii-prefsEditor-previewPerSettingFrame" src="" frameborder="0"></iframe>
</div>
<div class="gpiic-textSize-stepper gpii-stepper gpii-stepper-pmt">
<label class="gpiic-textfieldStepper-decrement gpii-stepper-buttons"></label>
<input type="text" class="gpiic-textfieldStepper-valueField gpii-stepper-valueField fl-inputs"/>
<label class="gpiic-textfieldStepper-unitField gpii-stepper-unit"></label>
<label class="gpiic-textfieldStepper-increment gpii-stepper-buttons"></label>
</div>
</div>
| <div class="gpii-prefsEditor-adjusterPanel">
<h4 class="gpiic-textSize-label"></h4>
<div class="gpii-prefsEditor-previewPerSettingContainer">
<div class="gpii-prefsEditor-adjusterIcons gpii-prefsEditor-previewPerSettingEye"></div>
<div class="gpii-prefsEditor-previewPerSettingEyeBackground"></div>
<iframe tabindex="-1" class="gpiic-textSize-preview gpiic-adjuster-preview gpii-prefsEditor-previewPerSettingFrame" src="" frameborder="0"></iframe>
</div>
<div class="gpiic-textSize-stepper gpii-stepper gpii-stepper-pmt">
<label class="gpiic-textfieldStepper-decrement gpii-stepper-buttons"></label>
<input type="text" class="gpiic-textfieldStepper-valueField gpii-stepper-valueField fl-inputs"/>
<label class="gpiic-textfieldStepper-unitField gpii-stepper-unit"></label>
<label class="gpiic-textfieldStepper-increment gpii-stepper-buttons"></label>
</div>
</div>
| Make the textSize preview frame non-focusable. | GPII-599: Make the textSize preview frame non-focusable. | HTML | bsd-3-clause | GPII/prefsEditors,kaspermarkus/prefsEditors,GPII/prefsEditors | html | ## Code Before:
<div class="gpii-prefsEditor-adjusterPanel">
<h4 class="gpiic-textSize-label"></h4>
<div class="gpii-prefsEditor-previewPerSettingContainer">
<div class="gpii-prefsEditor-adjusterIcons gpii-prefsEditor-previewPerSettingEye"></div>
<div class="gpii-prefsEditor-previewPerSettingEyeBackground"></div>
<iframe class="gpiic-textSize-preview gpiic-adjuster-preview gpii-prefsEditor-previewPerSettingFrame" src="" frameborder="0"></iframe>
</div>
<div class="gpiic-textSize-stepper gpii-stepper gpii-stepper-pmt">
<label class="gpiic-textfieldStepper-decrement gpii-stepper-buttons"></label>
<input type="text" class="gpiic-textfieldStepper-valueField gpii-stepper-valueField fl-inputs"/>
<label class="gpiic-textfieldStepper-unitField gpii-stepper-unit"></label>
<label class="gpiic-textfieldStepper-increment gpii-stepper-buttons"></label>
</div>
</div>
## Instruction:
GPII-599: Make the textSize preview frame non-focusable.
## Code After:
<div class="gpii-prefsEditor-adjusterPanel">
<h4 class="gpiic-textSize-label"></h4>
<div class="gpii-prefsEditor-previewPerSettingContainer">
<div class="gpii-prefsEditor-adjusterIcons gpii-prefsEditor-previewPerSettingEye"></div>
<div class="gpii-prefsEditor-previewPerSettingEyeBackground"></div>
<iframe tabindex="-1" class="gpiic-textSize-preview gpiic-adjuster-preview gpii-prefsEditor-previewPerSettingFrame" src="" frameborder="0"></iframe>
</div>
<div class="gpiic-textSize-stepper gpii-stepper gpii-stepper-pmt">
<label class="gpiic-textfieldStepper-decrement gpii-stepper-buttons"></label>
<input type="text" class="gpiic-textfieldStepper-valueField gpii-stepper-valueField fl-inputs"/>
<label class="gpiic-textfieldStepper-unitField gpii-stepper-unit"></label>
<label class="gpiic-textfieldStepper-increment gpii-stepper-buttons"></label>
</div>
</div>
| <div class="gpii-prefsEditor-adjusterPanel">
<h4 class="gpiic-textSize-label"></h4>
<div class="gpii-prefsEditor-previewPerSettingContainer">
<div class="gpii-prefsEditor-adjusterIcons gpii-prefsEditor-previewPerSettingEye"></div>
<div class="gpii-prefsEditor-previewPerSettingEyeBackground"></div>
- <iframe class="gpiic-textSize-preview gpiic-adjuster-preview gpii-prefsEditor-previewPerSettingFrame" src="" frameborder="0"></iframe>
+ <iframe tabindex="-1" class="gpiic-textSize-preview gpiic-adjuster-preview gpii-prefsEditor-previewPerSettingFrame" src="" frameborder="0"></iframe>
? ++++++++++++++
</div>
<div class="gpiic-textSize-stepper gpii-stepper gpii-stepper-pmt">
<label class="gpiic-textfieldStepper-decrement gpii-stepper-buttons"></label>
<input type="text" class="gpiic-textfieldStepper-valueField gpii-stepper-valueField fl-inputs"/>
<label class="gpiic-textfieldStepper-unitField gpii-stepper-unit"></label>
<label class="gpiic-textfieldStepper-increment gpii-stepper-buttons"></label>
</div>
</div> | 2 | 0.125 | 1 | 1 |
b949fe5eae35ad251e017eb2c96960e0fef2b4f1 | src/index.html | src/index.html | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="UK Train Departure Boards"/>
<meta name="author" content="Peter Mount"/>
<link rel=canonical href=”https://departureboards.mobi/” />
<link rel="icon" href="/fav/favicon.ico"/>
<link rel="stylesheet" href="https://area51.onl/css/bootstrap.min.css"/>
<title>UK Departure Boards</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
| <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="UK Train Departure Boards"/>
<meta name="author" content="Peter Mount"/>
<link rel=canonical href=”https://departureboards.mobi/”/>
<link rel="icon" href="/fav/favicon.ico"/>
<link rel="stylesheet" href="https://area51.onl/css/bootstrap.min.css"/>
<title>UK Departure Boards</title>
</head>
<body>
<div id="root">
<h1>Loading departureboards</h1>
<p>Please wait</p>
</div>
</body>
</html>
| Add placeholder for slow connections so users know it's loading | Add placeholder for slow connections so users know it's loading
| HTML | apache-2.0 | peter-mount/departureboards,peter-mount/departureboards,peter-mount/departureboards | html | ## Code Before:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="UK Train Departure Boards"/>
<meta name="author" content="Peter Mount"/>
<link rel=canonical href=”https://departureboards.mobi/” />
<link rel="icon" href="/fav/favicon.ico"/>
<link rel="stylesheet" href="https://area51.onl/css/bootstrap.min.css"/>
<title>UK Departure Boards</title>
</head>
<body>
<div id="root"></div>
</body>
</html>
## Instruction:
Add placeholder for slow connections so users know it's loading
## Code After:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="UK Train Departure Boards"/>
<meta name="author" content="Peter Mount"/>
<link rel=canonical href=”https://departureboards.mobi/”/>
<link rel="icon" href="/fav/favicon.ico"/>
<link rel="stylesheet" href="https://area51.onl/css/bootstrap.min.css"/>
<title>UK Departure Boards</title>
</head>
<body>
<div id="root">
<h1>Loading departureboards</h1>
<p>Please wait</p>
</div>
</body>
</html>
| <!doctype html>
<html lang="en">
- <head>
? ----
+ <head>
- <meta charset="utf-8">
? ----
+ <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
? ----
+ <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="description" content="UK Train Departure Boards"/>
? ----
+ <meta name="description" content="UK Train Departure Boards"/>
- <meta name="author" content="Peter Mount"/>
? ----
+ <meta name="author" content="Peter Mount"/>
- <link rel=canonical href=”https://departureboards.mobi/” />
? ---- -
+ <link rel=canonical href=”https://departureboards.mobi/”/>
- <link rel="icon" href="/fav/favicon.ico"/>
? ----
+ <link rel="icon" href="/fav/favicon.ico"/>
- <link rel="stylesheet" href="https://area51.onl/css/bootstrap.min.css"/>
? ----
+ <link rel="stylesheet" href="https://area51.onl/css/bootstrap.min.css"/>
- <title>UK Departure Boards</title>
? ----
+ <title>UK Departure Boards</title>
- </head>
? ----
+ </head>
- <body>
? ----
+ <body>
- <div id="root"></div>
+ <div id="root">
+ <h1>Loading departureboards</h1>
+ <p>Please wait</p>
+ </div>
- </body>
? ----
+ </body>
</html> | 29 | 1.8125 | 16 | 13 |
b3fbdeff4ad2f343ed3244e6223c7ba676989f53 | src/idbStorage.ts | src/idbStorage.ts | import { openDB, type IDBPDatabase } from 'idb';
export async function getDB() {
const db = await openDB('pokeapi.js', 1, {
async upgrade(db) {
const objectStore = db.createObjectStore('cachedResources', {
keyPath: 'cacheKey',
});
objectStore.createIndex('whenCached', 'whenCached', {
unique: false,
});
await objectStore.transaction.done
}
});
return db;
}
export async function get(db: IDBPDatabase, cacheKey: string) {
const tx = db.transaction('cachedResources', 'readonly');
const store = tx.store;
return store.get(cacheKey);
}
export async function put(db: IDBPDatabase, cacheKey: string, data: any) {
const tx = db.transaction('cachedResources', 'readwrite');
const store = tx.store;
const whenCached = Date.now();
return store.put({
cacheKey,
whenCached,
data,
})
}
export async function deleteKey(db: IDBPDatabase, cacheKey: string) {
const tx = db.transaction('cachedResources', 'readwrite');
const store = tx.store;
return store.delete(cacheKey);
} | import { openDB, type IDBPDatabase, type DBSchema } from 'idb';
interface CacheDBSchema extends DBSchema {
cachedResources: {
key: string;
value: {
cacheKey: string;
whenCached: number;
data: string;
};
indexes: {
whenCached: number
}
};
}
export async function getDB() {
const db = await openDB<CacheDBSchema>('pokeapi.js', 1, {
async upgrade(db) {
const objectStore = db.createObjectStore('cachedResources', {
keyPath: 'cacheKey',
});
objectStore.createIndex('whenCached', 'whenCached', {
unique: false,
});
await objectStore.transaction.done
}
});
return db;
}
export async function get(db: IDBPDatabase<CacheDBSchema>, cacheKey: string) {
const tx = db.transaction('cachedResources', 'readonly');
const store = tx.store;
return store.get(cacheKey);
}
export async function put(db: IDBPDatabase<CacheDBSchema>, cacheKey: string, data: string) {
const tx = db.transaction('cachedResources', 'readwrite');
const store = tx.store;
const whenCached = Date.now();
return store.put({
cacheKey,
whenCached,
data,
})
}
export async function deleteKey(db: IDBPDatabase<CacheDBSchema>, cacheKey: string) {
const tx = db.transaction('cachedResources', 'readwrite');
const store = tx.store;
return store.delete(cacheKey);
} | Add more strict types to DB methods | Add more strict types to DB methods
| TypeScript | apache-2.0 | 16patsle/pokeapi.js,16patsle/pokeapi.js | typescript | ## Code Before:
import { openDB, type IDBPDatabase } from 'idb';
export async function getDB() {
const db = await openDB('pokeapi.js', 1, {
async upgrade(db) {
const objectStore = db.createObjectStore('cachedResources', {
keyPath: 'cacheKey',
});
objectStore.createIndex('whenCached', 'whenCached', {
unique: false,
});
await objectStore.transaction.done
}
});
return db;
}
export async function get(db: IDBPDatabase, cacheKey: string) {
const tx = db.transaction('cachedResources', 'readonly');
const store = tx.store;
return store.get(cacheKey);
}
export async function put(db: IDBPDatabase, cacheKey: string, data: any) {
const tx = db.transaction('cachedResources', 'readwrite');
const store = tx.store;
const whenCached = Date.now();
return store.put({
cacheKey,
whenCached,
data,
})
}
export async function deleteKey(db: IDBPDatabase, cacheKey: string) {
const tx = db.transaction('cachedResources', 'readwrite');
const store = tx.store;
return store.delete(cacheKey);
}
## Instruction:
Add more strict types to DB methods
## Code After:
import { openDB, type IDBPDatabase, type DBSchema } from 'idb';
interface CacheDBSchema extends DBSchema {
cachedResources: {
key: string;
value: {
cacheKey: string;
whenCached: number;
data: string;
};
indexes: {
whenCached: number
}
};
}
export async function getDB() {
const db = await openDB<CacheDBSchema>('pokeapi.js', 1, {
async upgrade(db) {
const objectStore = db.createObjectStore('cachedResources', {
keyPath: 'cacheKey',
});
objectStore.createIndex('whenCached', 'whenCached', {
unique: false,
});
await objectStore.transaction.done
}
});
return db;
}
export async function get(db: IDBPDatabase<CacheDBSchema>, cacheKey: string) {
const tx = db.transaction('cachedResources', 'readonly');
const store = tx.store;
return store.get(cacheKey);
}
export async function put(db: IDBPDatabase<CacheDBSchema>, cacheKey: string, data: string) {
const tx = db.transaction('cachedResources', 'readwrite');
const store = tx.store;
const whenCached = Date.now();
return store.put({
cacheKey,
whenCached,
data,
})
}
export async function deleteKey(db: IDBPDatabase<CacheDBSchema>, cacheKey: string) {
const tx = db.transaction('cachedResources', 'readwrite');
const store = tx.store;
return store.delete(cacheKey);
} | - import { openDB, type IDBPDatabase } from 'idb';
+ import { openDB, type IDBPDatabase, type DBSchema } from 'idb';
? +++++++++++++++
+
+ interface CacheDBSchema extends DBSchema {
+ cachedResources: {
+ key: string;
+ value: {
+ cacheKey: string;
+ whenCached: number;
+ data: string;
+ };
+ indexes: {
+ whenCached: number
+ }
+ };
+ }
export async function getDB() {
- const db = await openDB('pokeapi.js', 1, {
+ const db = await openDB<CacheDBSchema>('pokeapi.js', 1, {
? +++++++++++++++
async upgrade(db) {
const objectStore = db.createObjectStore('cachedResources', {
keyPath: 'cacheKey',
});
objectStore.createIndex('whenCached', 'whenCached', {
unique: false,
});
await objectStore.transaction.done
}
});
return db;
}
- export async function get(db: IDBPDatabase, cacheKey: string) {
+ export async function get(db: IDBPDatabase<CacheDBSchema>, cacheKey: string) {
? +++++++++++++++
const tx = db.transaction('cachedResources', 'readonly');
const store = tx.store;
return store.get(cacheKey);
}
- export async function put(db: IDBPDatabase, cacheKey: string, data: any) {
? ^ ^
+ export async function put(db: IDBPDatabase<CacheDBSchema>, cacheKey: string, data: string) {
? +++++++++++++++ ^^^^ ^
const tx = db.transaction('cachedResources', 'readwrite');
const store = tx.store;
const whenCached = Date.now();
return store.put({
cacheKey,
whenCached,
data,
})
}
- export async function deleteKey(db: IDBPDatabase, cacheKey: string) {
+ export async function deleteKey(db: IDBPDatabase<CacheDBSchema>, cacheKey: string) {
? +++++++++++++++
const tx = db.transaction('cachedResources', 'readwrite');
const store = tx.store;
return store.delete(cacheKey);
} | 24 | 0.585366 | 19 | 5 |
964af8fe203ae23aec1c993807f40408082c06f7 | packages/gatsby-theme-patternfly-org/components/autoLinkHeader/autoLinkHeader.js | packages/gatsby-theme-patternfly-org/components/autoLinkHeader/autoLinkHeader.js | import React from 'react';
import { Title } from '@patternfly/react-core';
import { LinkIcon } from '@patternfly/react-icons';
import { slugger } from '../../helpers/slugger';
import './autoLinkHeader.css';
// "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"
const sizes = {
h1: '3xl',
h2: '2xl',
h3: 'xl',
h4: 'lg',
h5: 'md',
h6: 'sm'
}
export const AutoLinkHeader = ({
id,
size,
headingLevel,
children,
metaText,
...props
}) => {
const slug = slugger(children);
return (
<Title
id={slug}
size={sizes[size]}
headingLevel={headingLevel || size}
{...props}>
<a href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
<LinkIcon style={{ height: '0.5em', width: '0.5em', verticalAlign: 'middle' }} />
</a>
{children} {metaText}
</Title>
)
};
| import React from 'react';
import { Title } from '@patternfly/react-core';
import { LinkIcon } from '@patternfly/react-icons';
import { slugger } from '../../helpers/slugger';
import './autoLinkHeader.css';
// "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"
const sizes = {
h1: '3xl',
h2: '2xl',
h3: 'xl',
h4: 'lg',
h5: 'md',
h6: 'sm'
}
export const AutoLinkHeader = ({
id,
size,
headingLevel,
children,
metaText,
...props
}) => {
const slug = slugger(children);
return (
<Title
id={_.uniqueId(slug + '-')}
size={sizes[size]}
headingLevel={headingLevel || size}
{...props}>
<a href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
<LinkIcon style={{ height: '0.5em', width: '0.5em', verticalAlign: 'middle' }} />
</a>
{children} {metaText}
</Title>
)
};
| Create unique id for headings | Create unique id for headings
| JavaScript | mit | patternfly/patternfly-org | javascript | ## Code Before:
import React from 'react';
import { Title } from '@patternfly/react-core';
import { LinkIcon } from '@patternfly/react-icons';
import { slugger } from '../../helpers/slugger';
import './autoLinkHeader.css';
// "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"
const sizes = {
h1: '3xl',
h2: '2xl',
h3: 'xl',
h4: 'lg',
h5: 'md',
h6: 'sm'
}
export const AutoLinkHeader = ({
id,
size,
headingLevel,
children,
metaText,
...props
}) => {
const slug = slugger(children);
return (
<Title
id={slug}
size={sizes[size]}
headingLevel={headingLevel || size}
{...props}>
<a href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
<LinkIcon style={{ height: '0.5em', width: '0.5em', verticalAlign: 'middle' }} />
</a>
{children} {metaText}
</Title>
)
};
## Instruction:
Create unique id for headings
## Code After:
import React from 'react';
import { Title } from '@patternfly/react-core';
import { LinkIcon } from '@patternfly/react-icons';
import { slugger } from '../../helpers/slugger';
import './autoLinkHeader.css';
// "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"
const sizes = {
h1: '3xl',
h2: '2xl',
h3: 'xl',
h4: 'lg',
h5: 'md',
h6: 'sm'
}
export const AutoLinkHeader = ({
id,
size,
headingLevel,
children,
metaText,
...props
}) => {
const slug = slugger(children);
return (
<Title
id={_.uniqueId(slug + '-')}
size={sizes[size]}
headingLevel={headingLevel || size}
{...props}>
<a href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
<LinkIcon style={{ height: '0.5em', width: '0.5em', verticalAlign: 'middle' }} />
</a>
{children} {metaText}
</Title>
)
};
| import React from 'react';
import { Title } from '@patternfly/react-core';
import { LinkIcon } from '@patternfly/react-icons';
import { slugger } from '../../helpers/slugger';
import './autoLinkHeader.css';
// "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl"
const sizes = {
h1: '3xl',
h2: '2xl',
h3: 'xl',
h4: 'lg',
h5: 'md',
h6: 'sm'
}
export const AutoLinkHeader = ({
id,
size,
headingLevel,
children,
metaText,
...props
}) => {
const slug = slugger(children);
-
+
return (
<Title
- id={slug}
+ id={_.uniqueId(slug + '-')}
size={sizes[size]}
headingLevel={headingLevel || size}
{...props}>
<a href={`#${slug}`} className="ws-heading-anchor" tabIndex="-1" aria-hidden>
<LinkIcon style={{ height: '0.5em', width: '0.5em', verticalAlign: 'middle' }} />
</a>
{children} {metaText}
</Title>
)
}; | 4 | 0.102564 | 2 | 2 |
3993602d344b3550842b6d6bfb57fec43f7816ae | src/Resolvers/UserAgentResolver.php | src/Resolvers/UserAgentResolver.php | <?php
/**
* This file is part of the Laravel Auditing package.
*
* @author Antério Vieira <anteriovieira@gmail.com>
* @author Quetzy Garcia <quetzyg@altek.org>
* @author Raphael França <raphaelfrancabsb@gmail.com>
* @copyright 2015-2018
*
* For the full copyright and license information,
* please view the LICENSE.md file that was distributed
* with this source code.
*/
namespace OwenIt\Auditing\Resolvers;
use Illuminate\Support\Facades\Request;
class UserAgentResolver implements \OwenIt\Auditing\Contracts\UserAgentResolver
{
/**
* {@inheritdoc}
*/
public static function resolve()
{
return Request::userAgent();
}
}
| <?php
/**
* This file is part of the Laravel Auditing package.
*
* @author Antério Vieira <anteriovieira@gmail.com>
* @author Quetzy Garcia <quetzyg@altek.org>
* @author Raphael França <raphaelfrancabsb@gmail.com>
* @copyright 2015-2018
*
* For the full copyright and license information,
* please view the LICENSE.md file that was distributed
* with this source code.
*/
namespace OwenIt\Auditing\Resolvers;
use Illuminate\Support\Facades\Request;
class UserAgentResolver implements \OwenIt\Auditing\Contracts\UserAgentResolver
{
/**
* {@inheritdoc}
*/
public static function resolve()
{
return Request::header('User-Agent');
}
}
| Replace userAgent method call - fixes incompatibilty with Illuminate 5.2 | Replace userAgent method call - fixes incompatibilty with Illuminate 5.2
| PHP | mit | quetzyg/laravel-auditing,owen-it/laravel-auditing | php | ## Code Before:
<?php
/**
* This file is part of the Laravel Auditing package.
*
* @author Antério Vieira <anteriovieira@gmail.com>
* @author Quetzy Garcia <quetzyg@altek.org>
* @author Raphael França <raphaelfrancabsb@gmail.com>
* @copyright 2015-2018
*
* For the full copyright and license information,
* please view the LICENSE.md file that was distributed
* with this source code.
*/
namespace OwenIt\Auditing\Resolvers;
use Illuminate\Support\Facades\Request;
class UserAgentResolver implements \OwenIt\Auditing\Contracts\UserAgentResolver
{
/**
* {@inheritdoc}
*/
public static function resolve()
{
return Request::userAgent();
}
}
## Instruction:
Replace userAgent method call - fixes incompatibilty with Illuminate 5.2
## Code After:
<?php
/**
* This file is part of the Laravel Auditing package.
*
* @author Antério Vieira <anteriovieira@gmail.com>
* @author Quetzy Garcia <quetzyg@altek.org>
* @author Raphael França <raphaelfrancabsb@gmail.com>
* @copyright 2015-2018
*
* For the full copyright and license information,
* please view the LICENSE.md file that was distributed
* with this source code.
*/
namespace OwenIt\Auditing\Resolvers;
use Illuminate\Support\Facades\Request;
class UserAgentResolver implements \OwenIt\Auditing\Contracts\UserAgentResolver
{
/**
* {@inheritdoc}
*/
public static function resolve()
{
return Request::header('User-Agent');
}
}
| <?php
/**
* This file is part of the Laravel Auditing package.
*
* @author Antério Vieira <anteriovieira@gmail.com>
* @author Quetzy Garcia <quetzyg@altek.org>
* @author Raphael França <raphaelfrancabsb@gmail.com>
* @copyright 2015-2018
*
* For the full copyright and license information,
* please view the LICENSE.md file that was distributed
* with this source code.
*/
namespace OwenIt\Auditing\Resolvers;
use Illuminate\Support\Facades\Request;
class UserAgentResolver implements \OwenIt\Auditing\Contracts\UserAgentResolver
{
/**
* {@inheritdoc}
*/
public static function resolve()
{
- return Request::userAgent();
? ^ ^
+ return Request::header('User-Agent');
? ^^^^^^^^^ + ^
}
} | 2 | 0.071429 | 1 | 1 |
4147e6f560889c75abbfd9c8e85ea38ffe408550 | suelta/mechanisms/facebook_platform.py | suelta/mechanisms/facebook_platform.py | from suelta.util import bytes
from suelta.sasl import Mechanism, register_mechanism
try:
import urlparse
except ImportError:
import urllib.parse as urlparse
class X_FACEBOOK_PLATFORM(Mechanism):
def __init__(self, sasl, name):
super(X_FACEBOOK_PLATFORM, self).__init__(sasl, name)
self.check_values(['access_token', 'api_key'])
def process(self, challenge=None):
if challenge is not None:
values = {}
for kv in challenge.split('&'):
key, value = kv.split('=')
values[key] = value
resp_data = {
'method': values['method'],
'v': '1.0',
'call_id': '1.0',
'nonce': values['nonce'],
'access_token': self.values['access_token'],
'api_key': self.values['api_key']
}
resp = '&'.join(['%s=%s' % (k, v) for k, v in resp_data.items()])
return bytes(resp)
return bytes('')
def okay(self):
return True
register_mechanism('X-FACEBOOK-PLATFORM', 40, X_FACEBOOK_PLATFORM, use_hashes=False)
| from suelta.util import bytes
from suelta.sasl import Mechanism, register_mechanism
try:
import urlparse
except ImportError:
import urllib.parse as urlparse
class X_FACEBOOK_PLATFORM(Mechanism):
def __init__(self, sasl, name):
super(X_FACEBOOK_PLATFORM, self).__init__(sasl, name)
self.check_values(['access_token', 'api_key'])
def process(self, challenge=None):
if challenge is not None:
values = {}
for kv in challenge.split(b'&'):
key, value = kv.split(b'=')
values[key] = value
resp_data = {
b'method': values[b'method'],
b'v': b'1.0',
b'call_id': b'1.0',
b'nonce': values[b'nonce'],
b'access_token': self.values['access_token'],
b'api_key': self.values['api_key']
}
resp = '&'.join(['%s=%s' % (k, v) for k, v in resp_data.items()])
return bytes(resp)
return b''
def okay(self):
return True
register_mechanism('X-FACEBOOK-PLATFORM', 40, X_FACEBOOK_PLATFORM, use_hashes=False)
| Work around Python3's byte semantics. | Work around Python3's byte semantics.
| Python | mit | dwd/Suelta | python | ## Code Before:
from suelta.util import bytes
from suelta.sasl import Mechanism, register_mechanism
try:
import urlparse
except ImportError:
import urllib.parse as urlparse
class X_FACEBOOK_PLATFORM(Mechanism):
def __init__(self, sasl, name):
super(X_FACEBOOK_PLATFORM, self).__init__(sasl, name)
self.check_values(['access_token', 'api_key'])
def process(self, challenge=None):
if challenge is not None:
values = {}
for kv in challenge.split('&'):
key, value = kv.split('=')
values[key] = value
resp_data = {
'method': values['method'],
'v': '1.0',
'call_id': '1.0',
'nonce': values['nonce'],
'access_token': self.values['access_token'],
'api_key': self.values['api_key']
}
resp = '&'.join(['%s=%s' % (k, v) for k, v in resp_data.items()])
return bytes(resp)
return bytes('')
def okay(self):
return True
register_mechanism('X-FACEBOOK-PLATFORM', 40, X_FACEBOOK_PLATFORM, use_hashes=False)
## Instruction:
Work around Python3's byte semantics.
## Code After:
from suelta.util import bytes
from suelta.sasl import Mechanism, register_mechanism
try:
import urlparse
except ImportError:
import urllib.parse as urlparse
class X_FACEBOOK_PLATFORM(Mechanism):
def __init__(self, sasl, name):
super(X_FACEBOOK_PLATFORM, self).__init__(sasl, name)
self.check_values(['access_token', 'api_key'])
def process(self, challenge=None):
if challenge is not None:
values = {}
for kv in challenge.split(b'&'):
key, value = kv.split(b'=')
values[key] = value
resp_data = {
b'method': values[b'method'],
b'v': b'1.0',
b'call_id': b'1.0',
b'nonce': values[b'nonce'],
b'access_token': self.values['access_token'],
b'api_key': self.values['api_key']
}
resp = '&'.join(['%s=%s' % (k, v) for k, v in resp_data.items()])
return bytes(resp)
return b''
def okay(self):
return True
register_mechanism('X-FACEBOOK-PLATFORM', 40, X_FACEBOOK_PLATFORM, use_hashes=False)
| from suelta.util import bytes
from suelta.sasl import Mechanism, register_mechanism
try:
import urlparse
except ImportError:
import urllib.parse as urlparse
class X_FACEBOOK_PLATFORM(Mechanism):
def __init__(self, sasl, name):
super(X_FACEBOOK_PLATFORM, self).__init__(sasl, name)
self.check_values(['access_token', 'api_key'])
def process(self, challenge=None):
if challenge is not None:
values = {}
- for kv in challenge.split('&'):
+ for kv in challenge.split(b'&'):
? +
- key, value = kv.split('=')
+ key, value = kv.split(b'=')
? +
values[key] = value
resp_data = {
- 'method': values['method'],
+ b'method': values[b'method'],
? + +
- 'v': '1.0',
+ b'v': b'1.0',
? + +
- 'call_id': '1.0',
+ b'call_id': b'1.0',
? + +
- 'nonce': values['nonce'],
+ b'nonce': values[b'nonce'],
? + +
- 'access_token': self.values['access_token'],
+ b'access_token': self.values['access_token'],
? +
- 'api_key': self.values['api_key']
+ b'api_key': self.values['api_key']
? +
}
resp = '&'.join(['%s=%s' % (k, v) for k, v in resp_data.items()])
return bytes(resp)
- return bytes('')
? ----- -
+ return b''
def okay(self):
return True
register_mechanism('X-FACEBOOK-PLATFORM', 40, X_FACEBOOK_PLATFORM, use_hashes=False) | 18 | 0.45 | 9 | 9 |
353c5dcda5f9a67e09ac2e7003c4c2a59268641c | doc/changelog/08-tools/11523-coqdep+refactor2.rst | doc/changelog/08-tools/11523-coqdep+refactor2.rst | - **Changed:**
Internal options and behavior of ``coqdep`` have changed, in particular
options ``-w``, ``-D``, ``-mldep``, and ``-dumpbox`` have been removed,
and ``-boot`` will not load any path by default, ``-R/-Q`` should be
used instead
(`#11523 <https://github.com/coq/coq/pull/11523>`_,
by Emilio Jesus Gallego Arias).
| - **Changed:**
Internal options and behavior of ``coqdep`` have changed. ``coqdep``
no longer works as a replacement for ``ocamldep``, thus ``.ml``
files are not supported as input. Also, several deprecated options
have been removed: ``-w``, ``-D``, ``-mldep``, ``-prefix``,
``-slash``, and ``-dumpbox``. Passing ``-boot`` to ``coqdep`` will
not load any path by default now, ``-R/-Q`` should be used instead.
(`#11523 <https://github.com/coq/coq/pull/11523>`_ and
`#11589 <https://github.com/coq/coq/pull/11589>`_,
by Emilio Jesus Gallego Arias).
| Tweak changelog after recent PRs. | [coqdep] Tweak changelog after recent PRs.
| reStructuredText | lgpl-2.1 | SkySkimmer/coq,coq/coq,gares/coq,SkySkimmer/coq,gares/coq,JasonGross/coq,JasonGross/coq,Zimmi48/coq,silene/coq,ejgallego/coq,coq/coq,coq/coq,gares/coq,coq/coq,Zimmi48/coq,Zimmi48/coq,Zimmi48/coq,SkySkimmer/coq,gares/coq,ejgallego/coq,JasonGross/coq,silene/coq,ejgallego/coq,gares/coq,silene/coq,SkySkimmer/coq,JasonGross/coq,ejgallego/coq | restructuredtext | ## Code Before:
- **Changed:**
Internal options and behavior of ``coqdep`` have changed, in particular
options ``-w``, ``-D``, ``-mldep``, and ``-dumpbox`` have been removed,
and ``-boot`` will not load any path by default, ``-R/-Q`` should be
used instead
(`#11523 <https://github.com/coq/coq/pull/11523>`_,
by Emilio Jesus Gallego Arias).
## Instruction:
[coqdep] Tweak changelog after recent PRs.
## Code After:
- **Changed:**
Internal options and behavior of ``coqdep`` have changed. ``coqdep``
no longer works as a replacement for ``ocamldep``, thus ``.ml``
files are not supported as input. Also, several deprecated options
have been removed: ``-w``, ``-D``, ``-mldep``, ``-prefix``,
``-slash``, and ``-dumpbox``. Passing ``-boot`` to ``coqdep`` will
not load any path by default now, ``-R/-Q`` should be used instead.
(`#11523 <https://github.com/coq/coq/pull/11523>`_ and
`#11589 <https://github.com/coq/coq/pull/11589>`_,
by Emilio Jesus Gallego Arias).
| - **Changed:**
- Internal options and behavior of ``coqdep`` have changed, in particular
? ^ ^^^ ^^^^^^^^^
+ Internal options and behavior of ``coqdep`` have changed. ``coqdep``
? ^ ^^^^^^^ ^^
- options ``-w``, ``-D``, ``-mldep``, and ``-dumpbox`` have been removed,
- and ``-boot`` will not load any path by default, ``-R/-Q`` should be
- used instead
+ no longer works as a replacement for ``ocamldep``, thus ``.ml``
+ files are not supported as input. Also, several deprecated options
+ have been removed: ``-w``, ``-D``, ``-mldep``, ``-prefix``,
+ ``-slash``, and ``-dumpbox``. Passing ``-boot`` to ``coqdep`` will
+ not load any path by default now, ``-R/-Q`` should be used instead.
- (`#11523 <https://github.com/coq/coq/pull/11523>`_,
? ^
+ (`#11523 <https://github.com/coq/coq/pull/11523>`_ and
? ^^^^
+ `#11589 <https://github.com/coq/coq/pull/11589>`_,
by Emilio Jesus Gallego Arias). | 13 | 1.857143 | 8 | 5 |
eab17072bc52a28e02deee5ae72c543d959461fb | README.md | README.md |
So I've been challenged by [Earthware][earthware] to take part in
[Advent of Code][aoc]. This repo holds my solutions.
## Usage
```
make build
aoc -year <year> -day <day>
```
Simply running `aoc` will provide a list of available years and days.
[earthware]: http://www.earthware.co.uk
[aoc]: http://adventofcode.com/
|
![Build status][codeship]
So I've been challenged by [Earthware][earthware] to take part in
[Advent of Code][aoc]. This repo holds my solutions.
## Usage
```
make build
aoc -year <year> -day <day>
```
Simply running `aoc` will provide a list of available years and days.
[codeship]: https://codeship.com/projects/301c7020-9918-0134-dbee-3e4a8d26d28a/status?branch=master
[earthware]: http://www.earthware.co.uk
[aoc]: http://adventofcode.com/
| Add Codeship build status badge | Add Codeship build status badge
| Markdown | mit | domdavis/adventofcode | markdown | ## Code Before:
So I've been challenged by [Earthware][earthware] to take part in
[Advent of Code][aoc]. This repo holds my solutions.
## Usage
```
make build
aoc -year <year> -day <day>
```
Simply running `aoc` will provide a list of available years and days.
[earthware]: http://www.earthware.co.uk
[aoc]: http://adventofcode.com/
## Instruction:
Add Codeship build status badge
## Code After:
![Build status][codeship]
So I've been challenged by [Earthware][earthware] to take part in
[Advent of Code][aoc]. This repo holds my solutions.
## Usage
```
make build
aoc -year <year> -day <day>
```
Simply running `aoc` will provide a list of available years and days.
[codeship]: https://codeship.com/projects/301c7020-9918-0134-dbee-3e4a8d26d28a/status?branch=master
[earthware]: http://www.earthware.co.uk
[aoc]: http://adventofcode.com/
| +
+ ![Build status][codeship]
So I've been challenged by [Earthware][earthware] to take part in
[Advent of Code][aoc]. This repo holds my solutions.
## Usage
```
make build
aoc -year <year> -day <day>
```
Simply running `aoc` will provide a list of available years and days.
+ [codeship]: https://codeship.com/projects/301c7020-9918-0134-dbee-3e4a8d26d28a/status?branch=master
[earthware]: http://www.earthware.co.uk
[aoc]: http://adventofcode.com/ | 3 | 0.2 | 3 | 0 |
c355dd7b32ad2cd22e761a2b254e55ad79cf1032 | front/js/tobthebot.js | front/js/tobthebot.js | $( function() {
}) ; | $( function() {
var socket = io.connect('http://localhost:8080');
var timeouts = { 37:null, 38:null, 39:null, 40:null } ;
var LEFT = 37,
UP = 38,
RIGHT = 39,
DOWN = 40 ;
var getDisableCallback = function getDisableCallback( key ) {
return function() {
socket.emit( 'message', { key: key, active: false } ) ;
clearTimeout( timeouts[key] );
timeouts[key] = null ;
} ;
}
$( document ).keydown( function( event ) {
var key = event.which;
if( key >= LEFT && key <= DOWN ) {
var hasTimeout = ( timeouts[key] !== null ) ;
if( hasTimeout ) {
clearTimeout( timeouts[key] );
}
else {
socket.emit( 'message', { key: key, active: true } ) ;
}
timeouts[key] = setTimeout( getDisableCallback( key ), 1000 ) ;
}
});
$(document).keyup(function( event ){
var key = event.which;
if( key >= LEFT && key <= DOWN ) {
getDisableCallback( key )() ;
}
});
}) ; | Add minimal keyboard handling for control | Add minimal keyboard handling for control
| JavaScript | mit | jbouny/tobthebot | javascript | ## Code Before:
$( function() {
}) ;
## Instruction:
Add minimal keyboard handling for control
## Code After:
$( function() {
var socket = io.connect('http://localhost:8080');
var timeouts = { 37:null, 38:null, 39:null, 40:null } ;
var LEFT = 37,
UP = 38,
RIGHT = 39,
DOWN = 40 ;
var getDisableCallback = function getDisableCallback( key ) {
return function() {
socket.emit( 'message', { key: key, active: false } ) ;
clearTimeout( timeouts[key] );
timeouts[key] = null ;
} ;
}
$( document ).keydown( function( event ) {
var key = event.which;
if( key >= LEFT && key <= DOWN ) {
var hasTimeout = ( timeouts[key] !== null ) ;
if( hasTimeout ) {
clearTimeout( timeouts[key] );
}
else {
socket.emit( 'message', { key: key, active: true } ) ;
}
timeouts[key] = setTimeout( getDisableCallback( key ), 1000 ) ;
}
});
$(document).keyup(function( event ){
var key = event.which;
if( key >= LEFT && key <= DOWN ) {
getDisableCallback( key )() ;
}
});
}) ; | $( function() {
-
+ var socket = io.connect('http://localhost:8080');
+
+ var timeouts = { 37:null, 38:null, 39:null, 40:null } ;
+
+ var LEFT = 37,
+ UP = 38,
+ RIGHT = 39,
+ DOWN = 40 ;
+
+ var getDisableCallback = function getDisableCallback( key ) {
+ return function() {
+ socket.emit( 'message', { key: key, active: false } ) ;
+ clearTimeout( timeouts[key] );
+ timeouts[key] = null ;
+ } ;
+ }
+
+ $( document ).keydown( function( event ) {
+ var key = event.which;
+ if( key >= LEFT && key <= DOWN ) {
+ var hasTimeout = ( timeouts[key] !== null ) ;
+ if( hasTimeout ) {
+ clearTimeout( timeouts[key] );
+ }
+ else {
+ socket.emit( 'message', { key: key, active: true } ) ;
+ }
+ timeouts[key] = setTimeout( getDisableCallback( key ), 1000 ) ;
+ }
+ });
+
+ $(document).keyup(function( event ){
+ var key = event.which;
+ if( key >= LEFT && key <= DOWN ) {
+ getDisableCallback( key )() ;
+ }
+ });
}) ; | 38 | 12.666667 | 37 | 1 |
4945d1f3ab5860c2108d6b5631674f082463c71d | Cargo.toml | Cargo.toml | [package]
name = "maman"
version = "0.10.0"
authors = ["Laurent Arnoud <laurent@spkdev.net>"]
description = "Rust Web Crawler"
repository = "https://github.com/spk/maman.git"
homepage = "https://github.com/spk/maman"
keywords = ["web", "crawler", "spider"]
license = "MIT"
readme = "README.md"
[dependencies]
reqwest = "0.4.0"
html5ever = "0.10"
html5ever-atoms = "0.1.3"
tendril = "0.2"
string_cache = "0.2"
serde = "0.9"
serde_derive = "0.9"
serde_json = "0.9"
url = "1.4.0"
url_serde = "0.1.0"
robotparser = "0.8.0"
sidekiq = "0.5.0"
encoding = "0.2"
log = "0.3"
env_logger = "0.3"
| [package]
name = "maman"
version = "0.10.0"
authors = ["Laurent Arnoud <laurent@spkdev.net>"]
description = "Rust Web Crawler"
repository = "https://github.com/spk/maman.git"
homepage = "https://github.com/spk/maman"
keywords = ["http", "web", "crawler", "spider"]
license = "MIT"
readme = "README.md"
[badges]
travis-ci = { repository = "spk/maman" }
[dependencies]
reqwest = "0.4.0"
html5ever = "0.10"
html5ever-atoms = "0.1.3"
tendril = "0.2"
string_cache = "0.2"
serde = "0.9"
serde_derive = "0.9"
serde_json = "0.9"
url = "1.4.0"
url_serde = "0.1.0"
robotparser = "0.8.0"
sidekiq = "0.5.0"
encoding = "0.2"
log = "0.3"
env_logger = "0.3"
| Add travis-ci badge to crates.io | Add travis-ci badge to crates.io
| TOML | mit | spk/maman | toml | ## Code Before:
[package]
name = "maman"
version = "0.10.0"
authors = ["Laurent Arnoud <laurent@spkdev.net>"]
description = "Rust Web Crawler"
repository = "https://github.com/spk/maman.git"
homepage = "https://github.com/spk/maman"
keywords = ["web", "crawler", "spider"]
license = "MIT"
readme = "README.md"
[dependencies]
reqwest = "0.4.0"
html5ever = "0.10"
html5ever-atoms = "0.1.3"
tendril = "0.2"
string_cache = "0.2"
serde = "0.9"
serde_derive = "0.9"
serde_json = "0.9"
url = "1.4.0"
url_serde = "0.1.0"
robotparser = "0.8.0"
sidekiq = "0.5.0"
encoding = "0.2"
log = "0.3"
env_logger = "0.3"
## Instruction:
Add travis-ci badge to crates.io
## Code After:
[package]
name = "maman"
version = "0.10.0"
authors = ["Laurent Arnoud <laurent@spkdev.net>"]
description = "Rust Web Crawler"
repository = "https://github.com/spk/maman.git"
homepage = "https://github.com/spk/maman"
keywords = ["http", "web", "crawler", "spider"]
license = "MIT"
readme = "README.md"
[badges]
travis-ci = { repository = "spk/maman" }
[dependencies]
reqwest = "0.4.0"
html5ever = "0.10"
html5ever-atoms = "0.1.3"
tendril = "0.2"
string_cache = "0.2"
serde = "0.9"
serde_derive = "0.9"
serde_json = "0.9"
url = "1.4.0"
url_serde = "0.1.0"
robotparser = "0.8.0"
sidekiq = "0.5.0"
encoding = "0.2"
log = "0.3"
env_logger = "0.3"
| [package]
name = "maman"
version = "0.10.0"
authors = ["Laurent Arnoud <laurent@spkdev.net>"]
description = "Rust Web Crawler"
repository = "https://github.com/spk/maman.git"
homepage = "https://github.com/spk/maman"
- keywords = ["web", "crawler", "spider"]
+ keywords = ["http", "web", "crawler", "spider"]
? ++++++++
license = "MIT"
readme = "README.md"
+
+ [badges]
+ travis-ci = { repository = "spk/maman" }
[dependencies]
reqwest = "0.4.0"
html5ever = "0.10"
html5ever-atoms = "0.1.3"
tendril = "0.2"
string_cache = "0.2"
serde = "0.9"
serde_derive = "0.9"
serde_json = "0.9"
url = "1.4.0"
url_serde = "0.1.0"
robotparser = "0.8.0"
sidekiq = "0.5.0"
encoding = "0.2"
log = "0.3"
env_logger = "0.3" | 5 | 0.185185 | 4 | 1 |
2d0ddd0d28fe7760c48b39525a946aaa7673255f | src/Nether.Web/appsettings.json | src/Nether.Web/appsettings.json | {
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
},
"Leaderboard": {
"Store": {
"wellknown": "sql",
"properties": {
"ConnectionString": "<sql connection string here>"
}
},
"AnalyticsIntegrationClient": {
"wellknown": "null",
"properties": {
"AnalyticsBaseUrl": "http://localhost:5000/api/"
}
}
// "AnalyticsIntegrationClient": {
// "wellknown": "null"
// }
// Thoughts on leaderboard config:
// "Leaderboards": [
// {
// "Name": "default",
// "Type": "top",
// "Top": 10
// },
// {
// "Name": "rank",
// "Type": "aroundme",
// "Radius": 5
// }
// ]
},
"Identity": {
"Facebook": {
"AppToken": ""
}
},
"Analytics": {
// Add these configuration values via environment variables or override on deployment
"EventHub": {
"KeyName": "",
"AccessKey": "",
"Resource": "",
"Ttl": "24:00:00"
}
},
"PlayerManagement": {
"Store": {
"wellknown": "mongo",
"properties": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "players"
}
}
}
}
| {
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Information",
"System": "Information",
"Microsoft": "Information"
}
},
"Leaderboard": {
"Store": {
"wellknown": "sql",
"properties": {
"ConnectionString": "<sql connection string here>"
}
},
"AnalyticsIntegrationClient": {
"wellknown": "null",
"properties": {
"AnalyticsBaseUrl": "http://localhost:5000/api/"
}
}
// "AnalyticsIntegrationClient": {
// "wellknown": "null"
// }
// Thoughts on leaderboard config:
// "Leaderboards": [
// {
// "Name": "default",
// "Type": "top",
// "Top": 10
// },
// {
// "Name": "rank",
// "Type": "aroundme",
// "Radius": 5
// }
// ]
},
"Identity": {
"Facebook": {
"AppToken": ""
}
},
"Analytics": {
// Add these configuration values via environment variables or override on deployment
"EventHub": {
"KeyName": "",
"AccessKey": "",
"Resource": "",
"Ttl": "24:00:00"
}
},
"PlayerManagement": {
"Store": {
"wellknown": "mongo",
"properties": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "players"
}
}
}
}
| Change log level to Information | Change log level to Information
| JSON | mit | MicrosoftDX/nether,krist00fer/nether,vflorusso/nether,brentstineman/nether,ankodu/nether,stuartleeks/nether,ankodu/nether,brentstineman/nether,navalev/nether,brentstineman/nether,brentstineman/nether,navalev/nether,stuartleeks/nether,vflorusso/nether,oliviak/nether,stuartleeks/nether,brentstineman/nether,stuartleeks/nether,navalev/nether,ankodu/nether,stuartleeks/nether,vflorusso/nether,ankodu/nether,vflorusso/nether,vflorusso/nether,navalev/nether | json | ## Code Before:
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
},
"Leaderboard": {
"Store": {
"wellknown": "sql",
"properties": {
"ConnectionString": "<sql connection string here>"
}
},
"AnalyticsIntegrationClient": {
"wellknown": "null",
"properties": {
"AnalyticsBaseUrl": "http://localhost:5000/api/"
}
}
// "AnalyticsIntegrationClient": {
// "wellknown": "null"
// }
// Thoughts on leaderboard config:
// "Leaderboards": [
// {
// "Name": "default",
// "Type": "top",
// "Top": 10
// },
// {
// "Name": "rank",
// "Type": "aroundme",
// "Radius": 5
// }
// ]
},
"Identity": {
"Facebook": {
"AppToken": ""
}
},
"Analytics": {
// Add these configuration values via environment variables or override on deployment
"EventHub": {
"KeyName": "",
"AccessKey": "",
"Resource": "",
"Ttl": "24:00:00"
}
},
"PlayerManagement": {
"Store": {
"wellknown": "mongo",
"properties": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "players"
}
}
}
}
## Instruction:
Change log level to Information
## Code After:
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Information",
"System": "Information",
"Microsoft": "Information"
}
},
"Leaderboard": {
"Store": {
"wellknown": "sql",
"properties": {
"ConnectionString": "<sql connection string here>"
}
},
"AnalyticsIntegrationClient": {
"wellknown": "null",
"properties": {
"AnalyticsBaseUrl": "http://localhost:5000/api/"
}
}
// "AnalyticsIntegrationClient": {
// "wellknown": "null"
// }
// Thoughts on leaderboard config:
// "Leaderboards": [
// {
// "Name": "default",
// "Type": "top",
// "Top": 10
// },
// {
// "Name": "rank",
// "Type": "aroundme",
// "Radius": 5
// }
// ]
},
"Identity": {
"Facebook": {
"AppToken": ""
}
},
"Analytics": {
// Add these configuration values via environment variables or override on deployment
"EventHub": {
"KeyName": "",
"AccessKey": "",
"Resource": "",
"Ttl": "24:00:00"
}
},
"PlayerManagement": {
"Store": {
"wellknown": "mongo",
"properties": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "players"
}
}
}
}
| {
"Logging": {
"IncludeScopes": false,
"LogLevel": {
- "Default": "Debug",
+ "Default": "Information",
"System": "Information",
"Microsoft": "Information"
}
},
"Leaderboard": {
"Store": {
"wellknown": "sql",
"properties": {
"ConnectionString": "<sql connection string here>"
}
},
"AnalyticsIntegrationClient": {
"wellknown": "null",
"properties": {
"AnalyticsBaseUrl": "http://localhost:5000/api/"
}
}
// "AnalyticsIntegrationClient": {
// "wellknown": "null"
// }
// Thoughts on leaderboard config:
// "Leaderboards": [
// {
// "Name": "default",
// "Type": "top",
// "Top": 10
// },
// {
// "Name": "rank",
// "Type": "aroundme",
// "Radius": 5
// }
// ]
},
"Identity": {
"Facebook": {
"AppToken": ""
}
},
"Analytics": {
// Add these configuration values via environment variables or override on deployment
"EventHub": {
"KeyName": "",
"AccessKey": "",
"Resource": "",
"Ttl": "24:00:00"
}
},
"PlayerManagement": {
"Store": {
"wellknown": "mongo",
"properties": {
"ConnectionString": "mongodb://localhost:27017",
"DatabaseName": "players"
}
}
}
} | 2 | 0.028169 | 1 | 1 |
264d4b45bd8b5f3d1c9aa8efef78abd45fbf3780 | src/xml/transforms/enveloped_signature.ts | src/xml/transforms/enveloped_signature.ts | import { Select, XE, XmlError } from "xml-core";
import { Transform } from "../transform";
/**
* Represents the enveloped signature transform for an XML digital signature as defined by the W3C.
*/
export class XmlDsigEnvelopedSignatureTransform extends Transform {
public Algorithm = "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
/**
* Returns the output of the current XmlDsigEnvelopedSignatureTransform object.
* @returns string
*/
public GetOutput(): any {
if (!this.innerXml) {
throw new XmlError(XE.PARAM_REQUIRED, "innerXml");
}
const signature = Select(this.innerXml, ".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']")[0];
if (signature) {
signature.parentNode!.removeChild(signature);
}
return this.innerXml;
}
}
| import { Select, XE, XmlError } from "xml-core";
import { Transform } from "../transform";
/**
* Represents the enveloped signature transform for an XML digital signature as defined by the W3C.
*/
export class XmlDsigEnvelopedSignatureTransform extends Transform {
public Algorithm = "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
/**
* Returns the output of the current XmlDsigEnvelopedSignatureTransform object.
* @returns string
*/
public GetOutput(): any {
if (!this.innerXml) {
throw new XmlError(XE.PARAM_REQUIRED, "innerXml");
}
const signatures = Select(this.innerXml, ".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']");
for (let i = 0; i < signatures.length; i++) {
const signature = signatures[i];
if (signature.parentNode) {
signature.parentNode.removeChild(signature);
}
}
return this.innerXml;
}
}
| Remove all Signature child nodes | Remove all Signature child nodes
| TypeScript | mit | PeculiarVentures/xmldsigjs,PeculiarVentures/xmldsigjs | typescript | ## Code Before:
import { Select, XE, XmlError } from "xml-core";
import { Transform } from "../transform";
/**
* Represents the enveloped signature transform for an XML digital signature as defined by the W3C.
*/
export class XmlDsigEnvelopedSignatureTransform extends Transform {
public Algorithm = "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
/**
* Returns the output of the current XmlDsigEnvelopedSignatureTransform object.
* @returns string
*/
public GetOutput(): any {
if (!this.innerXml) {
throw new XmlError(XE.PARAM_REQUIRED, "innerXml");
}
const signature = Select(this.innerXml, ".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']")[0];
if (signature) {
signature.parentNode!.removeChild(signature);
}
return this.innerXml;
}
}
## Instruction:
Remove all Signature child nodes
## Code After:
import { Select, XE, XmlError } from "xml-core";
import { Transform } from "../transform";
/**
* Represents the enveloped signature transform for an XML digital signature as defined by the W3C.
*/
export class XmlDsigEnvelopedSignatureTransform extends Transform {
public Algorithm = "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
/**
* Returns the output of the current XmlDsigEnvelopedSignatureTransform object.
* @returns string
*/
public GetOutput(): any {
if (!this.innerXml) {
throw new XmlError(XE.PARAM_REQUIRED, "innerXml");
}
const signatures = Select(this.innerXml, ".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']");
for (let i = 0; i < signatures.length; i++) {
const signature = signatures[i];
if (signature.parentNode) {
signature.parentNode.removeChild(signature);
}
}
return this.innerXml;
}
}
| import { Select, XE, XmlError } from "xml-core";
import { Transform } from "../transform";
/**
* Represents the enveloped signature transform for an XML digital signature as defined by the W3C.
*/
export class XmlDsigEnvelopedSignatureTransform extends Transform {
public Algorithm = "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
/**
* Returns the output of the current XmlDsigEnvelopedSignatureTransform object.
* @returns string
*/
public GetOutput(): any {
if (!this.innerXml) {
throw new XmlError(XE.PARAM_REQUIRED, "innerXml");
}
- const signature = Select(this.innerXml, ".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']")[0];
? ---
+ const signatures = Select(this.innerXml, ".//*[local-name(.)='Signature' and namespace-uri(.)='http://www.w3.org/2000/09/xmldsig#']");
? +
+ for (let i = 0; i < signatures.length; i++) {
+ const signature = signatures[i];
- if (signature) {
+ if (signature.parentNode) {
? ++++ +++++++++++
- signature.parentNode!.removeChild(signature);
? -
+ signature.parentNode.removeChild(signature);
? ++++
+ }
}
return this.innerXml;
}
} | 9 | 0.321429 | 6 | 3 |
254b49639490b1dc9f555db0a4ec7fd4e2985591 | 01-basic/README.adoc | 01-basic/README.adoc | = Basic Examples
The basic examples in this directory show how the setup a CMake project,
set compile flags, create executables and libraries, and install them.
The examples included are
- hello-cmake. A hello world example.
- hello-headers. A slighly more complicated hello world example, with using Hello class and seperate source and include folders.
- shared-library. An example using a shared library.
- static-library. An example using a static library.
- installing. Shows how to create a 'make install' target to install the binaries and libraries
- build-type. An example showing how to set a default build type of your project.
- compile-flags. Shows how to set compile flags
| = Basic Examples
The basic examples in this directory show how the setup a CMake project,
set compile flags, create and link executables and libraries, and install them.
The examples included are
- link:A-hello-cmake[hello-cmake]. A hello world example.
- link:B-hello-headers[hello-headers]. A slighly more complicated hello world example, using seperate source and include folders.
- link:C-static-library[static-library]. An example using a static library.
- link:D-shared-library[shared-library]. An example using a shared library.
- link:E-installing[installing]. Shows how to create a 'make install' target that will install binaries and libraries.
- link:F-build-type[build-type]. An example showing how to set a default build and optimization flags for your project.
- link:G-compile-flags[compile-flags]. Shows how to set additional compile flags.
- link:H-third-party-library[third-party-library]. Shows an example of how to link third party libraries.
| Add links to filders and fix some typos | Add links to filders and fix some typos | AsciiDoc | mit | ttroy50/cmake-examples,ttroy50/cmake-examples,ttroy50/cmake-examples | asciidoc | ## Code Before:
= Basic Examples
The basic examples in this directory show how the setup a CMake project,
set compile flags, create executables and libraries, and install them.
The examples included are
- hello-cmake. A hello world example.
- hello-headers. A slighly more complicated hello world example, with using Hello class and seperate source and include folders.
- shared-library. An example using a shared library.
- static-library. An example using a static library.
- installing. Shows how to create a 'make install' target to install the binaries and libraries
- build-type. An example showing how to set a default build type of your project.
- compile-flags. Shows how to set compile flags
## Instruction:
Add links to filders and fix some typos
## Code After:
= Basic Examples
The basic examples in this directory show how the setup a CMake project,
set compile flags, create and link executables and libraries, and install them.
The examples included are
- link:A-hello-cmake[hello-cmake]. A hello world example.
- link:B-hello-headers[hello-headers]. A slighly more complicated hello world example, using seperate source and include folders.
- link:C-static-library[static-library]. An example using a static library.
- link:D-shared-library[shared-library]. An example using a shared library.
- link:E-installing[installing]. Shows how to create a 'make install' target that will install binaries and libraries.
- link:F-build-type[build-type]. An example showing how to set a default build and optimization flags for your project.
- link:G-compile-flags[compile-flags]. Shows how to set additional compile flags.
- link:H-third-party-library[third-party-library]. Shows an example of how to link third party libraries.
| = Basic Examples
The basic examples in this directory show how the setup a CMake project,
- set compile flags, create executables and libraries, and install them.
+ set compile flags, create and link executables and libraries, and install them.
? +++++++++
The examples included are
- - hello-cmake. A hello world example.
+ - link:A-hello-cmake[hello-cmake]. A hello world example.
? +++++++ +++++++++++++
- - hello-headers. A slighly more complicated hello world example, with using Hello class and seperate source and include folders.
? ----- ----------------
+ - link:B-hello-headers[hello-headers]. A slighly more complicated hello world example, using seperate source and include folders.
? +++++++ +++++++++++++++
- - shared-library. An example using a shared library.
- - static-library. An example using a static library.
+ - link:C-static-library[static-library]. An example using a static library.
? +++++++ ++++++++++++++++
+ - link:D-shared-library[shared-library]. An example using a shared library.
- - installing. Shows how to create a 'make install' target to install the binaries and libraries
? ^ ----
+ - link:E-installing[installing]. Shows how to create a 'make install' target that will install binaries and libraries.
? +++++++ ++++++++++++ ^^^^^^^^ +
- - build-type. An example showing how to set a default build type of your project.
? ^^^^
+ - link:F-build-type[build-type]. An example showing how to set a default build and optimization flags for your project.
? +++++++ ++++++++++++ ^^^ ++++++++++++ ++++++++
- - compile-flags. Shows how to set compile flags
+ - link:G-compile-flags[compile-flags]. Shows how to set additional compile flags.
+ - link:H-third-party-library[third-party-library]. Shows an example of how to link third party libraries. | 17 | 1.214286 | 9 | 8 |
1e45e0a6974a370eface0d215beba8493f5fcb2f | README.md | README.md | Staades PHP SDK
===============
Installation with Composer
--------------------------
```sh
$ php composer.phar require elic-dev/staades-php-sdk
```
For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/). | Staades PHP SDK
===============
Installation with Composer
--------------------------
```sh
$ php composer.phar require elic-dev/staades-php-sdk
```
For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).
Usage
--------------------------
Initialize a new StaadesClient with your access key.
```php
$config = array(
'app_key' => 'testapp',
'api_key' => 'testkey',
);
$client = \Staades\StaadesClient::factory($config);
```
Start sending commands to Staades.
Add something to your ident:
```php
$client->addValue('My.test.ident', 1);
```
Set the value of your ident:
```php
$client->setValue('My.test.ident', 1);
``` | Add SDK examples to readme file. | Add SDK examples to readme file.
| Markdown | mit | elic-dev/staades-sdk-php | markdown | ## Code Before:
Staades PHP SDK
===============
Installation with Composer
--------------------------
```sh
$ php composer.phar require elic-dev/staades-php-sdk
```
For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).
## Instruction:
Add SDK examples to readme file.
## Code After:
Staades PHP SDK
===============
Installation with Composer
--------------------------
```sh
$ php composer.phar require elic-dev/staades-php-sdk
```
For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).
Usage
--------------------------
Initialize a new StaadesClient with your access key.
```php
$config = array(
'app_key' => 'testapp',
'api_key' => 'testkey',
);
$client = \Staades\StaadesClient::factory($config);
```
Start sending commands to Staades.
Add something to your ident:
```php
$client->addValue('My.test.ident', 1);
```
Set the value of your ident:
```php
$client->setValue('My.test.ident', 1);
``` | Staades PHP SDK
===============
Installation with Composer
--------------------------
+
```sh
$ php composer.phar require elic-dev/staades-php-sdk
```
For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).
+
+ Usage
+ --------------------------
+
+ Initialize a new StaadesClient with your access key.
+
+ ```php
+ $config = array(
+ 'app_key' => 'testapp',
+ 'api_key' => 'testkey',
+ );
+
+ $client = \Staades\StaadesClient::factory($config);
+ ```
+
+ Start sending commands to Staades.
+
+ Add something to your ident:
+
+ ```php
+ $client->addValue('My.test.ident', 1);
+ ```
+
+ Set the value of your ident:
+
+ ```php
+ $client->setValue('My.test.ident', 1);
+ ``` | 29 | 3.222222 | 29 | 0 |
2aed7b3a679da3ab8cb906d5b7599c62daff96d7 | vscode/settings.json | vscode/settings.json | {
"workbench.welcome.enabled": false,
"workbench.colorTheme": "Base16 Ocean Dark",
"workbench.iconTheme": "material-icon-theme",
"editor.fontSize": 15,
"editor.renderWhitespace": "all",
"editor.insertSpaces": true,
"editor.dragAndDrop": false,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"window.zoomLevel": 0,
"workbench.activityBar.visible": true,
"editor.autoIndent": true,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/.vagrant": true,
"**/.vscode": true,
"**/.sass-cache": true
},
"extensions.ignoreRecommendations": true,
"material-icon-theme.showUpdateMessage": false,
"emmet.includeLanguages": {
"blade": "html"
},
"emmet.triggerExpansionOnTab": true
}
| {
"workbench.welcome.enabled": false,
"workbench.colorTheme": "Base16 Ocean Dark",
"workbench.iconTheme": "material-icon-theme",
"editor.fontSize": 15,
"editor.renderWhitespace": "all",
"editor.insertSpaces": true,
"editor.dragAndDrop": false,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"window.zoomLevel": 0,
"workbench.activityBar.visible": true,
"editor.autoIndent": true,
"explorer.openEditors.visible": 0,
"docker.showExplorer": false,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/.vagrant": true,
"**/.vscode": true,
"**/.sass-cache": true
},
"extensions.ignoreRecommendations": true,
"material-icon-theme.showUpdateMessage": false,
"emmet.includeLanguages": {
"blade": "html"
},
"emmet.triggerExpansionOnTab": true
}
| Hide useless tabs in the explorer | Hide useless tabs in the explorer
| JSON | mit | guillaumebriday/dotfiles,guillaumebriday/dotfiles | json | ## Code Before:
{
"workbench.welcome.enabled": false,
"workbench.colorTheme": "Base16 Ocean Dark",
"workbench.iconTheme": "material-icon-theme",
"editor.fontSize": 15,
"editor.renderWhitespace": "all",
"editor.insertSpaces": true,
"editor.dragAndDrop": false,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"window.zoomLevel": 0,
"workbench.activityBar.visible": true,
"editor.autoIndent": true,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/.vagrant": true,
"**/.vscode": true,
"**/.sass-cache": true
},
"extensions.ignoreRecommendations": true,
"material-icon-theme.showUpdateMessage": false,
"emmet.includeLanguages": {
"blade": "html"
},
"emmet.triggerExpansionOnTab": true
}
## Instruction:
Hide useless tabs in the explorer
## Code After:
{
"workbench.welcome.enabled": false,
"workbench.colorTheme": "Base16 Ocean Dark",
"workbench.iconTheme": "material-icon-theme",
"editor.fontSize": 15,
"editor.renderWhitespace": "all",
"editor.insertSpaces": true,
"editor.dragAndDrop": false,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"window.zoomLevel": 0,
"workbench.activityBar.visible": true,
"editor.autoIndent": true,
"explorer.openEditors.visible": 0,
"docker.showExplorer": false,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/.vagrant": true,
"**/.vscode": true,
"**/.sass-cache": true
},
"extensions.ignoreRecommendations": true,
"material-icon-theme.showUpdateMessage": false,
"emmet.includeLanguages": {
"blade": "html"
},
"emmet.triggerExpansionOnTab": true
}
| {
"workbench.welcome.enabled": false,
"workbench.colorTheme": "Base16 Ocean Dark",
"workbench.iconTheme": "material-icon-theme",
"editor.fontSize": 15,
"editor.renderWhitespace": "all",
"editor.insertSpaces": true,
"editor.dragAndDrop": false,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"telemetry.enableTelemetry": false,
"telemetry.enableCrashReporter": false,
"window.zoomLevel": 0,
"workbench.activityBar.visible": true,
"editor.autoIndent": true,
+ "explorer.openEditors.visible": 0,
+ "docker.showExplorer": false,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/.vagrant": true,
"**/.vscode": true,
"**/.sass-cache": true
},
"extensions.ignoreRecommendations": true,
"material-icon-theme.showUpdateMessage": false,
"emmet.includeLanguages": {
"blade": "html"
},
"emmet.triggerExpansionOnTab": true
} | 2 | 0.0625 | 2 | 0 |
9425191e634cfedc839b00c0aff20127bdafe49b | actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb | actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb | <header role="banner">
<h1>No template for interactive request</h1>
</header>
<main id="container">
<h2><%= h @exception.message %></h2>
<p class="summary">
<strong>NOTE!</strong><br>
Unless told otherwise, Rails expects an action to render a template with the same name,<br>
contained in a folder named after its controller.
If this controller is an API responding with 204 (No Content), <br>
which does not require a template,
then this error will occur when trying to access it via browser,<br>
since we expect an HTML template
to be rendered for such requests. If that's the case, carry on.
</p>
</main>
| <header role="banner">
<h1>No view template for interactive request</h1>
</header>
<main id="container">
<h2><%= h @exception.message %></h2>
<div class="summary">
<p>
<strong>NOTE:</strong>Rails usually expects a controller action to render a view template with the same name.
</p>
<p>
For example, a <code>BooksController#index</code> action defined in <code>app/controller/books_controller.rb</code> should have a corresponding view template
in a file named <code>app/views/books/index.erb.html</code>.
</p>
<p>
However, if this controller is an API endpoint responding with 204 (No Content), which does not require a view template because it doesn't serve an HTML response, then this error will occur when trying to access it with a browser. In this particular scenario, you can ignore this error.
</p>
<p>
You can find more about view template rendering conventions in the <a href="https://guides.rubyonrails.org/layouts_and_rendering.html#rendering-by-default-convention-over-configuration-in-action">Rails Guides on Layouts and Rendering in Rails</a>.
</p>
</div>
</main>
| Clarify missing template error page | Clarify missing template error page
Some goals here:
- Be less obtuse with word choices for folks who use English
as a second language.
- Stop referring to view templates as "templates" when the
literal directory is called `app/views` which has and will
confuse beginners (otherwise let's rename the directory).
- Stop formatting the HTML with `<br>` tags like it's 2005
and let the text flow with the viewport as appropriate.
- Give a *concrete* example of the naming relationship between
a controller and its view template, based on
[the ActionView Rails Guides][1].
I also tried to clarify the frankly confusing copy explaining
the 204 No Content rendering case, which I think should
probably mention that such endpoints shouldn't be allowed to
render HTML to avoid this error, but that might be pushing
the scope of the error feedback a bit too far.
[1]: https://guides.rubyonrails.org/layouts_and_rendering.html
| HTML+ERB | mit | rails/rails,rails/rails,rails/rails,rails/rails | html+erb | ## Code Before:
<header role="banner">
<h1>No template for interactive request</h1>
</header>
<main id="container">
<h2><%= h @exception.message %></h2>
<p class="summary">
<strong>NOTE!</strong><br>
Unless told otherwise, Rails expects an action to render a template with the same name,<br>
contained in a folder named after its controller.
If this controller is an API responding with 204 (No Content), <br>
which does not require a template,
then this error will occur when trying to access it via browser,<br>
since we expect an HTML template
to be rendered for such requests. If that's the case, carry on.
</p>
</main>
## Instruction:
Clarify missing template error page
Some goals here:
- Be less obtuse with word choices for folks who use English
as a second language.
- Stop referring to view templates as "templates" when the
literal directory is called `app/views` which has and will
confuse beginners (otherwise let's rename the directory).
- Stop formatting the HTML with `<br>` tags like it's 2005
and let the text flow with the viewport as appropriate.
- Give a *concrete* example of the naming relationship between
a controller and its view template, based on
[the ActionView Rails Guides][1].
I also tried to clarify the frankly confusing copy explaining
the 204 No Content rendering case, which I think should
probably mention that such endpoints shouldn't be allowed to
render HTML to avoid this error, but that might be pushing
the scope of the error feedback a bit too far.
[1]: https://guides.rubyonrails.org/layouts_and_rendering.html
## Code After:
<header role="banner">
<h1>No view template for interactive request</h1>
</header>
<main id="container">
<h2><%= h @exception.message %></h2>
<div class="summary">
<p>
<strong>NOTE:</strong>Rails usually expects a controller action to render a view template with the same name.
</p>
<p>
For example, a <code>BooksController#index</code> action defined in <code>app/controller/books_controller.rb</code> should have a corresponding view template
in a file named <code>app/views/books/index.erb.html</code>.
</p>
<p>
However, if this controller is an API endpoint responding with 204 (No Content), which does not require a view template because it doesn't serve an HTML response, then this error will occur when trying to access it with a browser. In this particular scenario, you can ignore this error.
</p>
<p>
You can find more about view template rendering conventions in the <a href="https://guides.rubyonrails.org/layouts_and_rendering.html#rendering-by-default-convention-over-configuration-in-action">Rails Guides on Layouts and Rendering in Rails</a>.
</p>
</div>
</main>
| <header role="banner">
- <h1>No template for interactive request</h1>
+ <h1>No view template for interactive request</h1>
? +++++
</header>
<main id="container">
<h2><%= h @exception.message %></h2>
- <p class="summary">
? ^
+ <div class="summary">
? ^^^
+ <p>
+ <strong>NOTE:</strong>Rails usually expects a controller action to render a view template with the same name.
- <strong>NOTE!</strong><br>
- Unless told otherwise, Rails expects an action to render a template with the same name,<br>
- contained in a folder named after its controller.
-
- If this controller is an API responding with 204 (No Content), <br>
- which does not require a template,
- then this error will occur when trying to access it via browser,<br>
- since we expect an HTML template
- to be rendered for such requests. If that's the case, carry on.
- </p>
+ </p>
? ++
+ <p>
+ For example, a <code>BooksController#index</code> action defined in <code>app/controller/books_controller.rb</code> should have a corresponding view template
+ in a file named <code>app/views/books/index.erb.html</code>.
+ </p>
+ <p>
+ However, if this controller is an API endpoint responding with 204 (No Content), which does not require a view template because it doesn't serve an HTML response, then this error will occur when trying to access it with a browser. In this particular scenario, you can ignore this error.
+ </p>
+ <p>
+ You can find more about view template rendering conventions in the <a href="https://guides.rubyonrails.org/layouts_and_rendering.html#rendering-by-default-convention-over-configuration-in-action">Rails Guides on Layouts and Rendering in Rails</a>.
+ </p>
+ </div>
</main> | 28 | 1.473684 | 16 | 12 |
e044bc0f35b7972c23a4b6a5647576b1b79031e9 | spec/models/invite_spec.rb | spec/models/invite_spec.rb | require 'spec_helper'
describe Invite do
it 'should always have a key of reasonable length after creation' do
invite = Invite.new
invite.key.should_not be_empty
invite.key.should satisfy { |key| key.length > 16 }
end
it 'should require a description' do
invite = Invite.create(:description => '').should_not be_valid
end
end
| require 'spec_helper'
min_key_length = 16
describe Invite do
before { @invite = Invite.new(:description => 'Test invite') }
subject { @invite }
it 'should always have a key of reasonable length after creation' do
subject.key.should_not be_empty
subject.key.should satisfy { |key| key.length > min_key_length }
end
it 'should require a description' do
invite = Invite.create(:description => '').should_not be_valid
end
it "should consider keys shorter than #{ min_key_length } to be invalid" do
subject.key = 'hello'
expect { subject.save! }.to raise_error(RecordInvalid)
end
end
| Refactor and check key length validation | Refactor and check key length validation
| Ruby | mit | Margatroid/uploadstuffto.me,Margatroid/uploadstuffto.me | ruby | ## Code Before:
require 'spec_helper'
describe Invite do
it 'should always have a key of reasonable length after creation' do
invite = Invite.new
invite.key.should_not be_empty
invite.key.should satisfy { |key| key.length > 16 }
end
it 'should require a description' do
invite = Invite.create(:description => '').should_not be_valid
end
end
## Instruction:
Refactor and check key length validation
## Code After:
require 'spec_helper'
min_key_length = 16
describe Invite do
before { @invite = Invite.new(:description => 'Test invite') }
subject { @invite }
it 'should always have a key of reasonable length after creation' do
subject.key.should_not be_empty
subject.key.should satisfy { |key| key.length > min_key_length }
end
it 'should require a description' do
invite = Invite.create(:description => '').should_not be_valid
end
it "should consider keys shorter than #{ min_key_length } to be invalid" do
subject.key = 'hello'
expect { subject.save! }.to raise_error(RecordInvalid)
end
end
| require 'spec_helper'
+ min_key_length = 16
+
describe Invite do
+ before { @invite = Invite.new(:description => 'Test invite') }
+ subject { @invite }
+
it 'should always have a key of reasonable length after creation' do
- invite = Invite.new
- invite.key.should_not be_empty
? ^^^^ -
+ subject.key.should_not be_empty
? ^^^^^^
- invite.key.should satisfy { |key| key.length > 16 }
? ^^^^ - ^^
+ subject.key.should satisfy { |key| key.length > min_key_length }
? ^^^^^^ ^^^^^^^^^^^^^^
end
it 'should require a description' do
invite = Invite.create(:description => '').should_not be_valid
end
+
+ it "should consider keys shorter than #{ min_key_length } to be invalid" do
+ subject.key = 'hello'
+ expect { subject.save! }.to raise_error(RecordInvalid)
+ end
end | 15 | 1.153846 | 12 | 3 |
6dc9b908de7a1dcddee1a32d19e4a226846c9368 | .travis.yml | .travis.yml | language: ruby
rvm:
- 1.9.3
- 2.1.10
- 2.2.9
- 2.3.8
- 2.4.6
- 2.5.5
- 2.6.3
- 2.7.0-preview1
- jruby-19mode
- jruby-head
- ruby-head
- truffleruby
install: gem install minitest
before_script:
- gem build ci_uy.gemspec
- gem install ci_uy
matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- rvm: truffleruby
| language: ruby
install: gem install minitest
before_script:
- gem build ci_uy.gemspec
- gem install ci_uy
matrix:
include:
- os: linux
dist: precise
rvm: 1.9.3
- os: linux
dist: xenial
rvm: 2.1.10
- os: linux
dist: xenial
rvm: 2.2.9
- os: linux
dist: xenial
rvm: 2.3.8
- os: linux
dist: xenial
rvm: 2.4.6
- os: linux
dist: xenial
rvm: 2.5.5
- os: linux
dist: xenial
rvm: 2.6.3
- os: linux
dist: xenial
rvm: 2.7.0-preview1
- os: linux
dist: xenial
rvm: jruby-19mode
- os: linux
dist: xenial
rvm: jruby-head
- os: linux
dist: xenial
rvm: ruby-head
- os: linux
dist: xenial
rvm: truffleruby
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- rvm: truffleruby
| Update Travis to use Ubuntu 12.04 for Ruby 1.9.3, remove Rubinius | Update Travis to use Ubuntu 12.04 for Ruby 1.9.3, remove Rubinius
| YAML | lgpl-2.1 | picandocodigo/ci_uy | yaml | ## Code Before:
language: ruby
rvm:
- 1.9.3
- 2.1.10
- 2.2.9
- 2.3.8
- 2.4.6
- 2.5.5
- 2.6.3
- 2.7.0-preview1
- jruby-19mode
- jruby-head
- ruby-head
- truffleruby
install: gem install minitest
before_script:
- gem build ci_uy.gemspec
- gem install ci_uy
matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- rvm: truffleruby
## Instruction:
Update Travis to use Ubuntu 12.04 for Ruby 1.9.3, remove Rubinius
## Code After:
language: ruby
install: gem install minitest
before_script:
- gem build ci_uy.gemspec
- gem install ci_uy
matrix:
include:
- os: linux
dist: precise
rvm: 1.9.3
- os: linux
dist: xenial
rvm: 2.1.10
- os: linux
dist: xenial
rvm: 2.2.9
- os: linux
dist: xenial
rvm: 2.3.8
- os: linux
dist: xenial
rvm: 2.4.6
- os: linux
dist: xenial
rvm: 2.5.5
- os: linux
dist: xenial
rvm: 2.6.3
- os: linux
dist: xenial
rvm: 2.7.0-preview1
- os: linux
dist: xenial
rvm: jruby-19mode
- os: linux
dist: xenial
rvm: jruby-head
- os: linux
dist: xenial
rvm: ruby-head
- os: linux
dist: xenial
rvm: truffleruby
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- rvm: truffleruby
| language: ruby
- rvm:
- - 1.9.3
- - 2.1.10
- - 2.2.9
- - 2.3.8
- - 2.4.6
- - 2.5.5
- - 2.6.3
- - 2.7.0-preview1
- - jruby-19mode
- - jruby-head
- - ruby-head
- - truffleruby
install: gem install minitest
before_script:
- gem build ci_uy.gemspec
- gem install ci_uy
matrix:
+ include:
+ - os: linux
+ dist: precise
+ rvm: 1.9.3
+ - os: linux
+ dist: xenial
+ rvm: 2.1.10
+ - os: linux
+ dist: xenial
+ rvm: 2.2.9
+ - os: linux
+ dist: xenial
+ rvm: 2.3.8
+ - os: linux
+ dist: xenial
+ rvm: 2.4.6
+ - os: linux
+ dist: xenial
+ rvm: 2.5.5
+ - os: linux
+ dist: xenial
+ rvm: 2.6.3
+ - os: linux
+ dist: xenial
+ rvm: 2.7.0-preview1
+ - os: linux
+ dist: xenial
+ rvm: jruby-19mode
+ - os: linux
+ dist: xenial
+ rvm: jruby-head
+ - os: linux
+ dist: xenial
+ rvm: ruby-head
+ - os: linux
+ dist: xenial
+ rvm: truffleruby
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- rvm: truffleruby | 50 | 2.173913 | 37 | 13 |
fc76e1e1a307bc8b1074611ed76bb18d0a2b7997 | db/migrate/20161112202920_add_state_to_signups.rb | db/migrate/20161112202920_add_state_to_signups.rb | class AddStateToSignups < ActiveRecord::Migration[5.0]
def change
add_column :signups, :state, :string, null: false, index: true
end
end
| class AddStateToSignups < ActiveRecord::Migration[5.0]
def change
add_column :signups, :state, :string, null: false, default: 'confirmed', index: true
end
end
| Add default value to not-null column (not having one is illegal in SQLite) | Add default value to not-null column (not having one is illegal in SQLite)
| Ruby | mit | neinteractiveliterature/intercode,neinteractiveliterature/intercode,neinteractiveliterature/intercode,neinteractiveliterature/intercode,neinteractiveliterature/intercode | ruby | ## Code Before:
class AddStateToSignups < ActiveRecord::Migration[5.0]
def change
add_column :signups, :state, :string, null: false, index: true
end
end
## Instruction:
Add default value to not-null column (not having one is illegal in SQLite)
## Code After:
class AddStateToSignups < ActiveRecord::Migration[5.0]
def change
add_column :signups, :state, :string, null: false, default: 'confirmed', index: true
end
end
| class AddStateToSignups < ActiveRecord::Migration[5.0]
def change
- add_column :signups, :state, :string, null: false, index: true
+ add_column :signups, :state, :string, null: false, default: 'confirmed', index: true
? ++++++++++++++++++++++
end
end | 2 | 0.4 | 1 | 1 |
0611d2790c7fbfa1ffa556d52e0868f0368afa17 | pipeline/app/assets/javascripts/controllers/HomeController.js | pipeline/app/assets/javascripts/controllers/HomeController.js | 'use strict'
angular.module('pathwayApp')
.controller('HomeController', function ($scope) {
});
// app.controller('HomeController', function ($scope) {
// $scope.event = "hello"
// }); | 'use strict'
angular.module('pathwayApp')
.controller('HomeController', function ($scope, $http) {
$http({method: 'GET',
url: '/api/pathways'
}).success(function(data, status){
$scope.pathways = data
})
}); | Add a get request to get all pathways | Add a get request to get all pathways
| JavaScript | mit | aattsai/Pathway,aattsai/Pathway,aattsai/Pathway | javascript | ## Code Before:
'use strict'
angular.module('pathwayApp')
.controller('HomeController', function ($scope) {
});
// app.controller('HomeController', function ($scope) {
// $scope.event = "hello"
// });
## Instruction:
Add a get request to get all pathways
## Code After:
'use strict'
angular.module('pathwayApp')
.controller('HomeController', function ($scope, $http) {
$http({method: 'GET',
url: '/api/pathways'
}).success(function(data, status){
$scope.pathways = data
})
}); | 'use strict'
angular.module('pathwayApp')
- .controller('HomeController', function ($scope) {
+ .controller('HomeController', function ($scope, $http) {
? +++++++
+ $http({method: 'GET',
+ url: '/api/pathways'
+ }).success(function(data, status){
+ $scope.pathways = data
+ })
});
-
- // app.controller('HomeController', function ($scope) {
- // $scope.event = "hello"
- // }); | 11 | 1.222222 | 6 | 5 |
9811421c5c83d5c331de839031c43a2a7bd6a973 | README.md | README.md |
This is the program running on an Intel Edison for the Fiware Challenge during the Campus Party México 2015.
|
This is the program running on an Intel Edison for the Fiware Challenge during the Campus Party México 2015.
# Dependencies
Server logic that receives data -> *https://github.com/Xotl/RetoCP15Fiware*
| Update dependencies of the project | Update dependencies of the project | Markdown | mit | Xotl/Fiware-Challenge-2015-Intel-Edison-Edition | markdown | ## Code Before:
This is the program running on an Intel Edison for the Fiware Challenge during the Campus Party México 2015.
## Instruction:
Update dependencies of the project
## Code After:
This is the program running on an Intel Edison for the Fiware Challenge during the Campus Party México 2015.
# Dependencies
Server logic that receives data -> *https://github.com/Xotl/RetoCP15Fiware*
|
This is the program running on an Intel Edison for the Fiware Challenge during the Campus Party México 2015.
+ # Dependencies
+ Server logic that receives data -> *https://github.com/Xotl/RetoCP15Fiware* | 2 | 0.666667 | 2 | 0 |
0ff46f682fb42775a7df965364053bf9d66fb6e0 | _includes/js.html | _includes/js.html | <!-- jQuery Version 1.11.0 -->
<script src="{{ "/js/jquery-1.11.0.js" | prepend: site.baseurl }}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{{ "/js/bootstrap.min.js" | prepend: site.baseurl }}"></script>
<!-- Plugin JavaScript -->
<script src="{{ "/js/jquery.easing.min.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/classie.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/cbpAnimatedHeader.js" | prepend: site.baseurl }}"></script>
<!-- Contact Form JavaScript -->
<script src="{{ "/js/jqBootstrapValidation.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/contact_me.js" | prepend: site.baseurl }}"></script>
<!-- Custom Theme JavaScript -->
<script src="{{ "/js/agency.js" | prepend: site.baseurl }}"></script>
<!-- Tito Events
<script src='https://js.tito.io/v1' async></script> -->
<!-- Custom Calendar JavaScript -->
<script src="{{ "/js/calendar.js" | prepend: site.baseurl }}"></script>
| <!-- jQuery Version 1.11.0 -->
<script src="{{ "/js/jquery-1.11.0.js" | prepend: site.baseurl }}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{{ "/js/bootstrap.min.js" | prepend: site.baseurl }}"></script>
<!-- Plugin JavaScript -->
<script src="{{ "/js/jquery.easing.min.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/classie.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/cbpAnimatedHeader.js" | prepend: site.baseurl }}"></script>
<!-- Contact Form JavaScript -->
<script src="{{ "/js/jqBootstrapValidation.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/contact_me.js" | prepend: site.baseurl }}"></script>
<!-- Custom Theme JavaScript -->
<script src="{{ "/js/agency.js" | prepend: site.baseurl }}"></script>
<!-- Tito Events
<script src='https://js.tito.io/v1' async></script> -->
<!-- Custom Calendar JavaScript -->
<script src="{{ "/js/calendar.js" | prepend: site.baseurl }}"></script>
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
// dayClick: function() {
// alert('a day has been clicked!');
// }
});
});
</script>
| Fix date to render correct format | Fix date to render correct format
| HTML | apache-2.0 | bpocit/website,bpocit/website,bpocit/website,bpocit/website | html | ## Code Before:
<!-- jQuery Version 1.11.0 -->
<script src="{{ "/js/jquery-1.11.0.js" | prepend: site.baseurl }}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{{ "/js/bootstrap.min.js" | prepend: site.baseurl }}"></script>
<!-- Plugin JavaScript -->
<script src="{{ "/js/jquery.easing.min.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/classie.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/cbpAnimatedHeader.js" | prepend: site.baseurl }}"></script>
<!-- Contact Form JavaScript -->
<script src="{{ "/js/jqBootstrapValidation.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/contact_me.js" | prepend: site.baseurl }}"></script>
<!-- Custom Theme JavaScript -->
<script src="{{ "/js/agency.js" | prepend: site.baseurl }}"></script>
<!-- Tito Events
<script src='https://js.tito.io/v1' async></script> -->
<!-- Custom Calendar JavaScript -->
<script src="{{ "/js/calendar.js" | prepend: site.baseurl }}"></script>
## Instruction:
Fix date to render correct format
## Code After:
<!-- jQuery Version 1.11.0 -->
<script src="{{ "/js/jquery-1.11.0.js" | prepend: site.baseurl }}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{{ "/js/bootstrap.min.js" | prepend: site.baseurl }}"></script>
<!-- Plugin JavaScript -->
<script src="{{ "/js/jquery.easing.min.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/classie.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/cbpAnimatedHeader.js" | prepend: site.baseurl }}"></script>
<!-- Contact Form JavaScript -->
<script src="{{ "/js/jqBootstrapValidation.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/contact_me.js" | prepend: site.baseurl }}"></script>
<!-- Custom Theme JavaScript -->
<script src="{{ "/js/agency.js" | prepend: site.baseurl }}"></script>
<!-- Tito Events
<script src='https://js.tito.io/v1' async></script> -->
<!-- Custom Calendar JavaScript -->
<script src="{{ "/js/calendar.js" | prepend: site.baseurl }}"></script>
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
// dayClick: function() {
// alert('a day has been clicked!');
// }
});
});
</script>
| <!-- jQuery Version 1.11.0 -->
<script src="{{ "/js/jquery-1.11.0.js" | prepend: site.baseurl }}"></script>
<!-- Bootstrap Core JavaScript -->
<script src="{{ "/js/bootstrap.min.js" | prepend: site.baseurl }}"></script>
<!-- Plugin JavaScript -->
<script src="{{ "/js/jquery.easing.min.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/classie.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/cbpAnimatedHeader.js" | prepend: site.baseurl }}"></script>
<!-- Contact Form JavaScript -->
<script src="{{ "/js/jqBootstrapValidation.js" | prepend: site.baseurl }}"></script>
<script src="{{ "/js/contact_me.js" | prepend: site.baseurl }}"></script>
<!-- Custom Theme JavaScript -->
<script src="{{ "/js/agency.js" | prepend: site.baseurl }}"></script>
<!-- Tito Events
<script src='https://js.tito.io/v1' async></script> -->
<!-- Custom Calendar JavaScript -->
<script src="{{ "/js/calendar.js" | prepend: site.baseurl }}"></script>
+
+ <script>
+ $(document).ready(function() {
+
+ $('#calendar').fullCalendar({
+ // dayClick: function() {
+ // alert('a day has been clicked!');
+ // }
+ });
+
+ });
+ </script> | 12 | 0.521739 | 12 | 0 |
58f982d01a7c47a12a7ae600c2ca17cb6c5c7ed9 | monitor/runner.py | monitor/runner.py | from time import sleep
from monitor.camera import Camera
from monitor.plotter_pygame import PyGamePlotter
def run(plotter, camera):
while True:
plotter.show(camera.get_image_data())
sleep(1.0)
if __name__ == "main":
cam_ioc = "X1-CAM"
plo = PyGamePlotter()
cam = Camera(cam_ioc)
run(plo, cam)
| import sys
from time import sleep
from camera import Camera
from plotter_pygame import PyGamePlotter
def run(plotter, camera):
old_timestamp = -1
while True:
data, timestamp = camera.get_image_data()
if timestamp != old_timestamp:
plotter.show(data)
old_timestamp = timestamp
sleep(1.0)
if __name__ == "__main__":
cam_ioc = sys.argv[1] # "X1-CAM"
cam = Camera(cam_ioc)
plo = PyGamePlotter()
plo.set_screensize(cam.xsize, cam.ysize)
run(plo, cam)
| Update to set screensize and take camera IOC as arg | Update to set screensize and take camera IOC as arg
| Python | apache-2.0 | nickbattam/picamon,nickbattam/picamon,nickbattam/picamon,nickbattam/picamon | python | ## Code Before:
from time import sleep
from monitor.camera import Camera
from monitor.plotter_pygame import PyGamePlotter
def run(plotter, camera):
while True:
plotter.show(camera.get_image_data())
sleep(1.0)
if __name__ == "main":
cam_ioc = "X1-CAM"
plo = PyGamePlotter()
cam = Camera(cam_ioc)
run(plo, cam)
## Instruction:
Update to set screensize and take camera IOC as arg
## Code After:
import sys
from time import sleep
from camera import Camera
from plotter_pygame import PyGamePlotter
def run(plotter, camera):
old_timestamp = -1
while True:
data, timestamp = camera.get_image_data()
if timestamp != old_timestamp:
plotter.show(data)
old_timestamp = timestamp
sleep(1.0)
if __name__ == "__main__":
cam_ioc = sys.argv[1] # "X1-CAM"
cam = Camera(cam_ioc)
plo = PyGamePlotter()
plo.set_screensize(cam.xsize, cam.ysize)
run(plo, cam)
| + import sys
from time import sleep
- from monitor.camera import Camera
? --------
+ from camera import Camera
- from monitor.plotter_pygame import PyGamePlotter
? --------
+ from plotter_pygame import PyGamePlotter
def run(plotter, camera):
-
+ old_timestamp = -1
while True:
- plotter.show(camera.get_image_data())
+ data, timestamp = camera.get_image_data()
+ if timestamp != old_timestamp:
+ plotter.show(data)
+ old_timestamp = timestamp
sleep(1.0)
- if __name__ == "main":
+ if __name__ == "__main__":
? ++ ++
- cam_ioc = "X1-CAM"
+ cam_ioc = sys.argv[1] # "X1-CAM"
+ cam = Camera(cam_ioc)
plo = PyGamePlotter()
- cam = Camera(cam_ioc)
+ plo.set_screensize(cam.xsize, cam.ysize)
run(plo, cam) | 19 | 1 | 12 | 7 |
9ad0dd8a1fac2e03be1fe3b44eb3b198994586ad | setup.py | setup.py | import setuptools
setuptools.setup(
setup_requires=['pbr>=1.3', 'setuptools>=17.1'],
pbr=True)
| import setuptools
setuptools.setup(
setup_requires=['pbr>=1.3', 'setuptools>=17.1'],
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
pbr=True)
| Add python_requires to help pip | Add python_requires to help pip
| Python | bsd-2-clause | testing-cabal/mock | python | ## Code Before:
import setuptools
setuptools.setup(
setup_requires=['pbr>=1.3', 'setuptools>=17.1'],
pbr=True)
## Instruction:
Add python_requires to help pip
## Code After:
import setuptools
setuptools.setup(
setup_requires=['pbr>=1.3', 'setuptools>=17.1'],
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
pbr=True)
| import setuptools
setuptools.setup(
setup_requires=['pbr>=1.3', 'setuptools>=17.1'],
+ python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
pbr=True) | 1 | 0.2 | 1 | 0 |
2668bf25b20bd87d72a32fea23ba7b2c69597614 | zsh/4.darwin.zsh | zsh/4.darwin.zsh |
if [[ `uname` != "Darwin" ]]; then
return
fi
alias ls="ls -GF"
|
if [[ `uname` != "Darwin" ]]; then
return
fi
alias ls="ls -GF"
PATH=$HOME/bin:$HOME/.bin:/usr/local/bin:$PATH
| Fix path issues with homebrew system executable overrides | Fix path issues with homebrew system executable overrides
| Shell | mit | mscharley/dotfiles,mscharley/dotfiles,mscharley/dotfiles,mscharley/dotfiles | shell | ## Code Before:
if [[ `uname` != "Darwin" ]]; then
return
fi
alias ls="ls -GF"
## Instruction:
Fix path issues with homebrew system executable overrides
## Code After:
if [[ `uname` != "Darwin" ]]; then
return
fi
alias ls="ls -GF"
PATH=$HOME/bin:$HOME/.bin:/usr/local/bin:$PATH
|
if [[ `uname` != "Darwin" ]]; then
return
fi
alias ls="ls -GF"
+ PATH=$HOME/bin:$HOME/.bin:/usr/local/bin:$PATH | 1 | 0.166667 | 1 | 0 |
a9989a3078673bcb48ba61fd46369be25d41bf4d | .github/ISSUE_TEMPLATE/config.yml | .github/ISSUE_TEMPLATE/config.yml | blank_issues_enabled: false
contact_links:
- name: Discord
url: https://discord.gg/rWtp5Aj
about: Ask a question at Discord
| blank_issues_enabled: true
contact_links:
- name: Discussions
url: https://github.com/go-redis/redis/discussions
about: Ask a question via GitHub Discussions
- name: Discord
url: https://discord.gg/rWtp5Aj
about: Ask a question via Discord
| Add a link to discussions | Add a link to discussions
| YAML | bsd-2-clause | vmihailenco/redis,go-redis/redis,HatsuneMiku3939/redis,HatsuneMiku3939/redis,go-redis/redis,HatsuneMiku3939/redis,HatsuneMiku3939/redis | yaml | ## Code Before:
blank_issues_enabled: false
contact_links:
- name: Discord
url: https://discord.gg/rWtp5Aj
about: Ask a question at Discord
## Instruction:
Add a link to discussions
## Code After:
blank_issues_enabled: true
contact_links:
- name: Discussions
url: https://github.com/go-redis/redis/discussions
about: Ask a question via GitHub Discussions
- name: Discord
url: https://discord.gg/rWtp5Aj
about: Ask a question via Discord
| - blank_issues_enabled: false
? ^^^^
+ blank_issues_enabled: true
? ^^^
contact_links:
+ - name: Discussions
+ url: https://github.com/go-redis/redis/discussions
+ about: Ask a question via GitHub Discussions
- name: Discord
url: https://discord.gg/rWtp5Aj
- about: Ask a question at Discord
? -
+ about: Ask a question via Discord
? ++
| 7 | 1.4 | 5 | 2 |
85fcc1e8f0f605fe8db43dfb117ec1ec25d788bd | CMakeLists.txt | CMakeLists.txt | project (ndhcp)
cmake_minimum_required (VERSION 2.6)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wno-format-extra-args -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wno-format-extra-args -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
include_directories("${PROJECT_SOURCE_DIR}/ncmlib")
add_subdirectory(ncmlib)
add_subdirectory(ndhc)
| project (ndhcp)
cmake_minimum_required (VERSION 2.6)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wshadow -Wpointer-arith -Wcast-qual -Wmissing-prototypes -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wshadow -Wpointer-arith -Wcast-qual -Wmissing-prototypes -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
include_directories("${PROJECT_SOURCE_DIR}/ncmlib")
add_subdirectory(ncmlib)
add_subdirectory(ndhc)
| Use stricter gcc warning flags by default. | Use stricter gcc warning flags by default.
| Text | mit | niklata/ndhc | text | ## Code Before:
project (ndhcp)
cmake_minimum_required (VERSION 2.6)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wno-format-extra-args -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wno-format-extra-args -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
include_directories("${PROJECT_SOURCE_DIR}/ncmlib")
add_subdirectory(ncmlib)
add_subdirectory(ndhc)
## Instruction:
Use stricter gcc warning flags by default.
## Code After:
project (ndhcp)
cmake_minimum_required (VERSION 2.6)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wshadow -Wpointer-arith -Wcast-qual -Wmissing-prototypes -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wshadow -Wpointer-arith -Wcast-qual -Wmissing-prototypes -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
include_directories("${PROJECT_SOURCE_DIR}/ncmlib")
add_subdirectory(ncmlib)
add_subdirectory(ndhc)
| project (ndhcp)
cmake_minimum_required (VERSION 2.6)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wno-format-extra-args -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
- set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wno-format-extra-args -Wno-format-zero-length -Wformat-nonliteral -Wformat-security -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wshadow -Wpointer-arith -Wcast-qual -Wmissing-prototypes -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
+ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wshadow -Wpointer-arith -Wcast-qual -Wmissing-prototypes -lrt -lcap -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX")
include_directories("${PROJECT_SOURCE_DIR}/ncmlib")
add_subdirectory(ncmlib)
add_subdirectory(ndhc) | 4 | 0.363636 | 2 | 2 |
0f88ef1eddaede7da535912925d45360293b6013 | lib/domains/blacklist.txt | lib/domains/blacklist.txt | si.edu
america.edu
californiacolleges.edu
cet.edu
australia.edu
alumni.nottingham.ac.uk
alumni.cmu.edu
int.edu.gr
sbu.ac.ir
mail.sbu.ac.ir
sharif.ir
sharif.edu
my.edu.moi
art.edu.lv
aaedu.edu.pl
k.tut.edu.pl
uno.edu.gr
mdu.edu.rs
my.tccd.edu
x.pycharm.ac.cn
pycharm.ac.cn
k.kkk.ac.nz
kkk.ac.nz
kkk.school.nz
m.uno.edu.gr
mail.ac.id
hbdx.ac.cn
tjdx.ac.cn
sxlg.ac.cn
bese.ac.cn
bjlg.ac.cn
dxss.ac.cn
educn.ac.cn
xinfu.ac.cn
gydx.ac.cn
xbdx.ac.cn
kjdx.ac.cn
xjdx.ac.cn
bjdx.ac.cn
ahlg.ac.cn
hndx.ac.cn
nkdx.ac.cn
northfacing.ac.cn
lxiv.secondary.edu.pl
mail.mzr.me
mail.hrka.net
abcda.tech
t.odmail.cn
ccc.edu
nfs.edu.rs
cqu.edu.cn
| si.edu
america.edu
californiacolleges.edu
cet.edu
australia.edu
alumni.nottingham.ac.uk
alumni.cmu.edu
int.edu.gr
sbu.ac.ir
mail.sbu.ac.ir
sharif.ir
sharif.edu
my.edu.moi
art.edu.lv
aaedu.edu.pl
k.tut.edu.pl
uno.edu.gr
mdu.edu.rs
my.tccd.edu
x.pycharm.ac.cn
pycharm.ac.cn
k.kkk.ac.nz
kkk.ac.nz
kkk.school.nz
m.uno.edu.gr
mail.ac.id
hbdx.ac.cn
tjdx.ac.cn
sxlg.ac.cn
bese.ac.cn
bjlg.ac.cn
dxss.ac.cn
educn.ac.cn
xinfu.ac.cn
gydx.ac.cn
xbdx.ac.cn
kjdx.ac.cn
xjdx.ac.cn
bjdx.ac.cn
ahlg.ac.cn
hndx.ac.cn
nkdx.ac.cn
northfacing.ac.cn
lxiv.secondary.edu.pl
mail.mzr.me
mail.hrka.net
abcda.tech
t.odmail.cn
ccc.edu
nfs.edu.rs
cqu.edu.cn
losrios.edu
vccs.edu | Add domains which lost trust due to addresses sale | Add domains which lost trust due to addresses sale
| Text | mit | bencarp/swot,philipto/swot,JetBrains/swot | text | ## Code Before:
si.edu
america.edu
californiacolleges.edu
cet.edu
australia.edu
alumni.nottingham.ac.uk
alumni.cmu.edu
int.edu.gr
sbu.ac.ir
mail.sbu.ac.ir
sharif.ir
sharif.edu
my.edu.moi
art.edu.lv
aaedu.edu.pl
k.tut.edu.pl
uno.edu.gr
mdu.edu.rs
my.tccd.edu
x.pycharm.ac.cn
pycharm.ac.cn
k.kkk.ac.nz
kkk.ac.nz
kkk.school.nz
m.uno.edu.gr
mail.ac.id
hbdx.ac.cn
tjdx.ac.cn
sxlg.ac.cn
bese.ac.cn
bjlg.ac.cn
dxss.ac.cn
educn.ac.cn
xinfu.ac.cn
gydx.ac.cn
xbdx.ac.cn
kjdx.ac.cn
xjdx.ac.cn
bjdx.ac.cn
ahlg.ac.cn
hndx.ac.cn
nkdx.ac.cn
northfacing.ac.cn
lxiv.secondary.edu.pl
mail.mzr.me
mail.hrka.net
abcda.tech
t.odmail.cn
ccc.edu
nfs.edu.rs
cqu.edu.cn
## Instruction:
Add domains which lost trust due to addresses sale
## Code After:
si.edu
america.edu
californiacolleges.edu
cet.edu
australia.edu
alumni.nottingham.ac.uk
alumni.cmu.edu
int.edu.gr
sbu.ac.ir
mail.sbu.ac.ir
sharif.ir
sharif.edu
my.edu.moi
art.edu.lv
aaedu.edu.pl
k.tut.edu.pl
uno.edu.gr
mdu.edu.rs
my.tccd.edu
x.pycharm.ac.cn
pycharm.ac.cn
k.kkk.ac.nz
kkk.ac.nz
kkk.school.nz
m.uno.edu.gr
mail.ac.id
hbdx.ac.cn
tjdx.ac.cn
sxlg.ac.cn
bese.ac.cn
bjlg.ac.cn
dxss.ac.cn
educn.ac.cn
xinfu.ac.cn
gydx.ac.cn
xbdx.ac.cn
kjdx.ac.cn
xjdx.ac.cn
bjdx.ac.cn
ahlg.ac.cn
hndx.ac.cn
nkdx.ac.cn
northfacing.ac.cn
lxiv.secondary.edu.pl
mail.mzr.me
mail.hrka.net
abcda.tech
t.odmail.cn
ccc.edu
nfs.edu.rs
cqu.edu.cn
losrios.edu
vccs.edu | si.edu
america.edu
californiacolleges.edu
cet.edu
australia.edu
alumni.nottingham.ac.uk
alumni.cmu.edu
int.edu.gr
sbu.ac.ir
mail.sbu.ac.ir
sharif.ir
sharif.edu
my.edu.moi
art.edu.lv
aaedu.edu.pl
k.tut.edu.pl
uno.edu.gr
mdu.edu.rs
my.tccd.edu
x.pycharm.ac.cn
pycharm.ac.cn
k.kkk.ac.nz
kkk.ac.nz
kkk.school.nz
m.uno.edu.gr
mail.ac.id
hbdx.ac.cn
tjdx.ac.cn
sxlg.ac.cn
bese.ac.cn
bjlg.ac.cn
dxss.ac.cn
educn.ac.cn
xinfu.ac.cn
gydx.ac.cn
xbdx.ac.cn
kjdx.ac.cn
xjdx.ac.cn
bjdx.ac.cn
ahlg.ac.cn
hndx.ac.cn
nkdx.ac.cn
northfacing.ac.cn
lxiv.secondary.edu.pl
mail.mzr.me
mail.hrka.net
abcda.tech
t.odmail.cn
ccc.edu
nfs.edu.rs
cqu.edu.cn
+ losrios.edu
+ vccs.edu | 2 | 0.039216 | 2 | 0 |
4c0099ee3b8ef6a23c6b74968cfb2fa63a75af3f | src/components/Markets.jsx | src/components/Markets.jsx | const React = window.React = require('react');
import AssetCard from './AssetCard.jsx';
import AssetPair from './AssetPair.jsx';
import AssetList from './AssetList.jsx';
import CustomMarketPicker from './CustomMarketPicker.jsx';
import Stellarify from '../lib/Stellarify';
import ErrorBoundary from './ErrorBoundary.jsx';
import _ from 'lodash';
export default class Markets extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<div className="so-back islandBack islandBack--t">
<div className="island">
<div className="island__header">
Stellar Asset Directory
</div>
<AssetList d={this.props.d}></AssetList>
<div className="AssetListFooter">
StellarTerm does not endorse any of these issuers. They are here for informational purposes only.
<br />
To get listed on StellarTerm, <a href="https://github.com/irisli/stellarterm/tree/master/directory" target="_blank" rel="nofollow noopener noreferrer">please read the instructions on GitHub</a>.
</div>
</div>
</div>
<ErrorBoundary>
<div className="so-back islandBack">
<CustomMarketPicker row={true}></CustomMarketPicker>
</div>
</ErrorBoundary>
</div>
);
}
};
| const React = window.React = require('react');
import AssetCard from './AssetCard.jsx';
import AssetPair from './AssetPair.jsx';
import AssetList from './AssetList.jsx';
import CustomMarketPicker from './CustomMarketPicker.jsx';
import Stellarify from '../lib/Stellarify';
import ErrorBoundary from './ErrorBoundary.jsx';
import _ from 'lodash';
export default class Markets extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<div className="so-back islandBack islandBack--t">
<div className="island">
<AssetList d={this.props.d}></AssetList>
<div className="AssetListFooter">
StellarTerm does not endorse any of these issuers. They are here for informational purposes only.
<br />
To get listed on StellarTerm, <a href="https://github.com/irisli/stellarterm/tree/master/directory" target="_blank" rel="nofollow noopener noreferrer">please read the instructions on GitHub</a>.
</div>
</div>
</div>
<ErrorBoundary>
<div className="so-back islandBack">
<CustomMarketPicker row={true}></CustomMarketPicker>
</div>
</ErrorBoundary>
</div>
);
}
};
| Remove header from markets page | Remove header from markets page
| JSX | apache-2.0 | irisli/stellarterm,irisli/stellarterm,irisli/stellarterm | jsx | ## Code Before:
const React = window.React = require('react');
import AssetCard from './AssetCard.jsx';
import AssetPair from './AssetPair.jsx';
import AssetList from './AssetList.jsx';
import CustomMarketPicker from './CustomMarketPicker.jsx';
import Stellarify from '../lib/Stellarify';
import ErrorBoundary from './ErrorBoundary.jsx';
import _ from 'lodash';
export default class Markets extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<div className="so-back islandBack islandBack--t">
<div className="island">
<div className="island__header">
Stellar Asset Directory
</div>
<AssetList d={this.props.d}></AssetList>
<div className="AssetListFooter">
StellarTerm does not endorse any of these issuers. They are here for informational purposes only.
<br />
To get listed on StellarTerm, <a href="https://github.com/irisli/stellarterm/tree/master/directory" target="_blank" rel="nofollow noopener noreferrer">please read the instructions on GitHub</a>.
</div>
</div>
</div>
<ErrorBoundary>
<div className="so-back islandBack">
<CustomMarketPicker row={true}></CustomMarketPicker>
</div>
</ErrorBoundary>
</div>
);
}
};
## Instruction:
Remove header from markets page
## Code After:
const React = window.React = require('react');
import AssetCard from './AssetCard.jsx';
import AssetPair from './AssetPair.jsx';
import AssetList from './AssetList.jsx';
import CustomMarketPicker from './CustomMarketPicker.jsx';
import Stellarify from '../lib/Stellarify';
import ErrorBoundary from './ErrorBoundary.jsx';
import _ from 'lodash';
export default class Markets extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<div className="so-back islandBack islandBack--t">
<div className="island">
<AssetList d={this.props.d}></AssetList>
<div className="AssetListFooter">
StellarTerm does not endorse any of these issuers. They are here for informational purposes only.
<br />
To get listed on StellarTerm, <a href="https://github.com/irisli/stellarterm/tree/master/directory" target="_blank" rel="nofollow noopener noreferrer">please read the instructions on GitHub</a>.
</div>
</div>
</div>
<ErrorBoundary>
<div className="so-back islandBack">
<CustomMarketPicker row={true}></CustomMarketPicker>
</div>
</ErrorBoundary>
</div>
);
}
};
| const React = window.React = require('react');
import AssetCard from './AssetCard.jsx';
import AssetPair from './AssetPair.jsx';
import AssetList from './AssetList.jsx';
import CustomMarketPicker from './CustomMarketPicker.jsx';
import Stellarify from '../lib/Stellarify';
import ErrorBoundary from './ErrorBoundary.jsx';
import _ from 'lodash';
export default class Markets extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div>
<div className="so-back islandBack islandBack--t">
<div className="island">
- <div className="island__header">
- Stellar Asset Directory
- </div>
<AssetList d={this.props.d}></AssetList>
<div className="AssetListFooter">
StellarTerm does not endorse any of these issuers. They are here for informational purposes only.
<br />
To get listed on StellarTerm, <a href="https://github.com/irisli/stellarterm/tree/master/directory" target="_blank" rel="nofollow noopener noreferrer">please read the instructions on GitHub</a>.
</div>
</div>
</div>
<ErrorBoundary>
<div className="so-back islandBack">
<CustomMarketPicker row={true}></CustomMarketPicker>
</div>
</ErrorBoundary>
</div>
);
}
}; | 3 | 0.076923 | 0 | 3 |
433f7133f5d196e9a324467b3fc87573a96dbf51 | app/locales/pages/contacts/new.en.yml | app/locales/pages/contacts/new.en.yml | en:
contacts:
new:
title: 'Request a Demo'
summary: 'Want to do more with your cause marketing and CSR dollars? Looking for civic sponsorship opportunities? Our mission is to help companies like yours be more neighborly. Find out how! Schedule a free demo and tour.'
| en:
contacts:
new:
title: 'Get Started'
summary: "Looking for a way to manage your community fundraising efforts? Our mission is to help organizations like yours be more neighborly. Find out how! Fill out the form below and we'll contact you with next steps to get you started."
| Update contact text to fit in pricing page link | Update contact text to fit in pricing page link
| YAML | mit | gustavoguichard/neighborly,gustavoguichard/neighborly,gustavoguichard/neighborly,MicroPasts/micropasts-crowdfunding,MicroPasts/micropasts-crowdfunding,MicroPasts/micropasts-crowdfunding,MicroPasts/micropasts-crowdfunding | yaml | ## Code Before:
en:
contacts:
new:
title: 'Request a Demo'
summary: 'Want to do more with your cause marketing and CSR dollars? Looking for civic sponsorship opportunities? Our mission is to help companies like yours be more neighborly. Find out how! Schedule a free demo and tour.'
## Instruction:
Update contact text to fit in pricing page link
## Code After:
en:
contacts:
new:
title: 'Get Started'
summary: "Looking for a way to manage your community fundraising efforts? Our mission is to help organizations like yours be more neighborly. Find out how! Fill out the form below and we'll contact you with next steps to get you started."
| en:
contacts:
new:
- title: 'Request a Demo'
- summary: 'Want to do more with your cause marketing and CSR dollars? Looking for civic sponsorship opportunities? Our mission is to help companies like yours be more neighborly. Find out how! Schedule a free demo and tour.'
+ title: 'Get Started'
+ summary: "Looking for a way to manage your community fundraising efforts? Our mission is to help organizations like yours be more neighborly. Find out how! Fill out the form below and we'll contact you with next steps to get you started." | 4 | 0.8 | 2 | 2 |
5e54c91cb486f582188b2090862d9e03f542d712 | metadata/com.hos_dvk.easyphone.full.yml | metadata/com.hos_dvk.easyphone.full.yml | Categories:
- System
- Theming
License: GPL-3.0-only
AuthorName: Handy Open Source
AuthorWebSite: https://www.handy-open-source.org/
SourceCode: https://github.com/handyopensource/HOSDVK-EasyPhone
IssueTracker: https://github.com/handyopensource/HOSDVK-EasyPhone/issues
Changelog: https://github.com/handyopensource/HOSDVK-EasyPhone/releases
AutoName: Easy-Phone
RepoType: git
Repo: https://github.com/handyopensource/HOSDVK-EasyPhone
Builds:
- versionName: '0.1'
versionCode: 9
commit: '9'
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- full
AutoUpdateMode: Version %c
UpdateCheckMode: Tags
CurrentVersion: '0.1'
CurrentVersionCode: 9
| Categories:
- System
- Theming
License: GPL-3.0-only
AuthorName: Handy Open Source
AuthorWebSite: https://www.handy-open-source.org/
SourceCode: https://github.com/handyopensource/HOSDVK-EasyPhone
IssueTracker: https://github.com/handyopensource/HOSDVK-EasyPhone/issues
Changelog: https://github.com/handyopensource/HOSDVK-EasyPhone/releases
AutoName: Easy-Phone
RepoType: git
Repo: https://github.com/handyopensource/HOSDVK-EasyPhone
Builds:
- versionName: '0.1'
versionCode: 9
commit: '9'
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- full
- versionName: '0.1'
versionCode: 11
commit: fdb5b186104aaf79b578b758d47638e776110634
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- full
AutoUpdateMode: Version %c
UpdateCheckMode: Tags
CurrentVersion: '0.1'
CurrentVersionCode: 11
| Update Easy-Phone to 0.1 (11) | Update Easy-Phone to 0.1 (11)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- System
- Theming
License: GPL-3.0-only
AuthorName: Handy Open Source
AuthorWebSite: https://www.handy-open-source.org/
SourceCode: https://github.com/handyopensource/HOSDVK-EasyPhone
IssueTracker: https://github.com/handyopensource/HOSDVK-EasyPhone/issues
Changelog: https://github.com/handyopensource/HOSDVK-EasyPhone/releases
AutoName: Easy-Phone
RepoType: git
Repo: https://github.com/handyopensource/HOSDVK-EasyPhone
Builds:
- versionName: '0.1'
versionCode: 9
commit: '9'
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- full
AutoUpdateMode: Version %c
UpdateCheckMode: Tags
CurrentVersion: '0.1'
CurrentVersionCode: 9
## Instruction:
Update Easy-Phone to 0.1 (11)
## Code After:
Categories:
- System
- Theming
License: GPL-3.0-only
AuthorName: Handy Open Source
AuthorWebSite: https://www.handy-open-source.org/
SourceCode: https://github.com/handyopensource/HOSDVK-EasyPhone
IssueTracker: https://github.com/handyopensource/HOSDVK-EasyPhone/issues
Changelog: https://github.com/handyopensource/HOSDVK-EasyPhone/releases
AutoName: Easy-Phone
RepoType: git
Repo: https://github.com/handyopensource/HOSDVK-EasyPhone
Builds:
- versionName: '0.1'
versionCode: 9
commit: '9'
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- full
- versionName: '0.1'
versionCode: 11
commit: fdb5b186104aaf79b578b758d47638e776110634
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- full
AutoUpdateMode: Version %c
UpdateCheckMode: Tags
CurrentVersion: '0.1'
CurrentVersionCode: 11
| Categories:
- System
- Theming
License: GPL-3.0-only
AuthorName: Handy Open Source
AuthorWebSite: https://www.handy-open-source.org/
SourceCode: https://github.com/handyopensource/HOSDVK-EasyPhone
IssueTracker: https://github.com/handyopensource/HOSDVK-EasyPhone/issues
Changelog: https://github.com/handyopensource/HOSDVK-EasyPhone/releases
AutoName: Easy-Phone
RepoType: git
Repo: https://github.com/handyopensource/HOSDVK-EasyPhone
Builds:
- versionName: '0.1'
versionCode: 9
commit: '9'
subdir: app
sudo:
- apt-get update || apt-get update
- apt-get install -y openjdk-11-jdk
- update-alternatives --auto java
gradle:
- full
+ - versionName: '0.1'
+ versionCode: 11
+ commit: fdb5b186104aaf79b578b758d47638e776110634
+ subdir: app
+ sudo:
+ - apt-get update || apt-get update
+ - apt-get install -y openjdk-11-jdk
+ - update-alternatives --auto java
+ gradle:
+ - full
+
AutoUpdateMode: Version %c
UpdateCheckMode: Tags
CurrentVersion: '0.1'
- CurrentVersionCode: 9
? ^
+ CurrentVersionCode: 11
? ^^
| 13 | 0.419355 | 12 | 1 |
dd5973406912d68dbcd63c655d10caa522b5c4e8 | server/database/models/usergroup.js | server/database/models/usergroup.js | module.exports = (sequelize, DataTypes) => {
const UserGroup = sequelize.define('UserGroup', {
userId: {
type: DataTypes.INTEGER,
allowNull: false
},
groupId: {
type: DataTypes.INTEGER,
allowNull: false
},
}, {
timestamps: false
});
return UserGroup;
};
| module.exports = (sequelize, DataTypes) => {
const UserGroup = sequelize.define('UserGroup', {
userId: {
type: DataTypes.INTEGER,
allowNull: false
},
groupId: {
type: DataTypes.INTEGER,
allowNull: false
},
}, {
classMethods: {
associate: (models) => {
UserGroup.belongsTo(models.Group, { foreignKey: 'groupId' });
UserGroup.belongsTo(models.User, { foreignKey: 'userId' });
}
},
timestamps: false
});
return UserGroup;
};
| Modify Server side model to work well with client | Modify Server side model to work well with client
| JavaScript | mit | johadi10/PostIt,johadi10/PostIt | javascript | ## Code Before:
module.exports = (sequelize, DataTypes) => {
const UserGroup = sequelize.define('UserGroup', {
userId: {
type: DataTypes.INTEGER,
allowNull: false
},
groupId: {
type: DataTypes.INTEGER,
allowNull: false
},
}, {
timestamps: false
});
return UserGroup;
};
## Instruction:
Modify Server side model to work well with client
## Code After:
module.exports = (sequelize, DataTypes) => {
const UserGroup = sequelize.define('UserGroup', {
userId: {
type: DataTypes.INTEGER,
allowNull: false
},
groupId: {
type: DataTypes.INTEGER,
allowNull: false
},
}, {
classMethods: {
associate: (models) => {
UserGroup.belongsTo(models.Group, { foreignKey: 'groupId' });
UserGroup.belongsTo(models.User, { foreignKey: 'userId' });
}
},
timestamps: false
});
return UserGroup;
};
| module.exports = (sequelize, DataTypes) => {
const UserGroup = sequelize.define('UserGroup', {
userId: {
type: DataTypes.INTEGER,
allowNull: false
},
groupId: {
type: DataTypes.INTEGER,
allowNull: false
},
}, {
+ classMethods: {
+ associate: (models) => {
+ UserGroup.belongsTo(models.Group, { foreignKey: 'groupId' });
+ UserGroup.belongsTo(models.User, { foreignKey: 'userId' });
+ }
+ },
timestamps: false
});
return UserGroup;
};
| 6 | 0.375 | 6 | 0 |
0dd9084f03352e64ba509ee7a49bee2487e36122 | memory.go | memory.go | package z80
type MemoryAccessor interface {
ReadByte(address uint16) byte
ReadByteInternal(address uint16) byte
WriteByte(address uint16, value byte)
WriteByteInternal(address uint16, value byte)
ContendRead(address uint16, time uint)
ContendReadNoMreq(address uint16, time uint)
ContendReadNoMreq_loop(address uint16, time uint, count uint)
ContendWriteNoMreq(address uint16, time uint)
ContendWriteNoMreq_loop(address uint16, time uint, count uint)
Read(address uint16) byte
Write(address uint16, value byte, protectROM bool)
Data() *[0x10000]byte
}
type MemoryReader interface {
ReadByte(address uint16) byte
}
| package z80
// MemoryAccessor is an interface to access memory addressed by the
// Z80.
// It defines four read/write method for accessing memory, taking
// into account contention when needed. In systems where memory
// contention is not an issue ReadByte and WriteByte should simply
// call ReadByteInternal and WriteByteInternal.
type MemoryAccessor interface {
// ReadByte reads a byte from address taking into account
// contention.
ReadByte(address uint16) byte
// ReadByteInternal reads a byte from address without taking
// into account contetion.
ReadByteInternal(address uint16) byte
// WriteByte writes a byte at address taking into account
// contention.
WriteByte(address uint16, value byte)
// WriteByteInternal writes a byte at address without taking
// into account contention.
WriteByteInternal(address uint16, value byte)
// Follow contention methods. Leave unimplemented if you don't
// care about memory contention.
// ContendRead increments the Tstates counter by time as a
// result of a memory read at the given address.
ContendRead(address uint16, time uint)
ContendReadNoMreq(address uint16, time uint)
ContendReadNoMreq_loop(address uint16, time uint, count uint)
ContendWriteNoMreq(address uint16, time uint)
ContendWriteNoMreq_loop(address uint16, time uint, count uint)
Read(address uint16) byte
Write(address uint16, value byte, protectROM bool)
// Data returns the memory content.
Data() []byte
}
// MemoryReader is a simple interface that defines only a ReadByte
// method. It's used mainly by the disassembler.
type MemoryReader interface {
ReadByte(address uint16) byte
}
| Improve documentation of MemoryAccessor interface | Improve documentation of MemoryAccessor interface
| Go | mit | remogatto/z80,remogatto/z80,remogatto/z80 | go | ## Code Before:
package z80
type MemoryAccessor interface {
ReadByte(address uint16) byte
ReadByteInternal(address uint16) byte
WriteByte(address uint16, value byte)
WriteByteInternal(address uint16, value byte)
ContendRead(address uint16, time uint)
ContendReadNoMreq(address uint16, time uint)
ContendReadNoMreq_loop(address uint16, time uint, count uint)
ContendWriteNoMreq(address uint16, time uint)
ContendWriteNoMreq_loop(address uint16, time uint, count uint)
Read(address uint16) byte
Write(address uint16, value byte, protectROM bool)
Data() *[0x10000]byte
}
type MemoryReader interface {
ReadByte(address uint16) byte
}
## Instruction:
Improve documentation of MemoryAccessor interface
## Code After:
package z80
// MemoryAccessor is an interface to access memory addressed by the
// Z80.
// It defines four read/write method for accessing memory, taking
// into account contention when needed. In systems where memory
// contention is not an issue ReadByte and WriteByte should simply
// call ReadByteInternal and WriteByteInternal.
type MemoryAccessor interface {
// ReadByte reads a byte from address taking into account
// contention.
ReadByte(address uint16) byte
// ReadByteInternal reads a byte from address without taking
// into account contetion.
ReadByteInternal(address uint16) byte
// WriteByte writes a byte at address taking into account
// contention.
WriteByte(address uint16, value byte)
// WriteByteInternal writes a byte at address without taking
// into account contention.
WriteByteInternal(address uint16, value byte)
// Follow contention methods. Leave unimplemented if you don't
// care about memory contention.
// ContendRead increments the Tstates counter by time as a
// result of a memory read at the given address.
ContendRead(address uint16, time uint)
ContendReadNoMreq(address uint16, time uint)
ContendReadNoMreq_loop(address uint16, time uint, count uint)
ContendWriteNoMreq(address uint16, time uint)
ContendWriteNoMreq_loop(address uint16, time uint, count uint)
Read(address uint16) byte
Write(address uint16, value byte, protectROM bool)
// Data returns the memory content.
Data() []byte
}
// MemoryReader is a simple interface that defines only a ReadByte
// method. It's used mainly by the disassembler.
type MemoryReader interface {
ReadByte(address uint16) byte
}
| package z80
+ // MemoryAccessor is an interface to access memory addressed by the
+ // Z80.
+ // It defines four read/write method for accessing memory, taking
+ // into account contention when needed. In systems where memory
+ // contention is not an issue ReadByte and WriteByte should simply
+ // call ReadByteInternal and WriteByteInternal.
type MemoryAccessor interface {
+ // ReadByte reads a byte from address taking into account
+ // contention.
ReadByte(address uint16) byte
+
+ // ReadByteInternal reads a byte from address without taking
+ // into account contetion.
ReadByteInternal(address uint16) byte
+ // WriteByte writes a byte at address taking into account
+ // contention.
WriteByte(address uint16, value byte)
+
+ // WriteByteInternal writes a byte at address without taking
+ // into account contention.
WriteByteInternal(address uint16, value byte)
+ // Follow contention methods. Leave unimplemented if you don't
+ // care about memory contention.
+
+ // ContendRead increments the Tstates counter by time as a
+ // result of a memory read at the given address.
ContendRead(address uint16, time uint)
+
ContendReadNoMreq(address uint16, time uint)
ContendReadNoMreq_loop(address uint16, time uint, count uint)
ContendWriteNoMreq(address uint16, time uint)
ContendWriteNoMreq_loop(address uint16, time uint, count uint)
Read(address uint16) byte
Write(address uint16, value byte, protectROM bool)
+
+ // Data returns the memory content.
- Data() *[0x10000]byte
? - -------
+ Data() []byte
}
+ // MemoryReader is a simple interface that defines only a ReadByte
+ // method. It's used mainly by the disassembler.
type MemoryReader interface {
ReadByte(address uint16) byte
} | 28 | 1.166667 | 27 | 1 |
853165ddeca124af0908b5cc5451070109ae8f43 | lib/resume/file_fetcher.rb | lib/resume/file_fetcher.rb | require 'open-uri'
require 'socket'
require_relative 'network_connection_error'
module Resume
class FileFetcher
def self.fetch(file, &block)
new(file, &block).fetch
end
private_class_method :new
def initialize(file, &block)
@file = file
@block = block
end
def fetch
Kernel.open(file, &block)
rescue SocketError, OpenURI::HTTPError, Errno::ECONNREFUSED
raise NetworkConnectionError
end
private
attr_reader :file, :block
end
end
| require 'open-uri'
require 'socket'
require_relative 'network_connection_error'
module Resume
class FileFetcher
def self.fetch(file, &block)
new(file, &block).fetch
end
private_class_method :new
def initialize(file, &block)
@file = file
@block = block
end
def fetch
# Specifically uses Kernel here in order to allow it to determine
# the return file type: for this resume, it could be File, TempFile,
# or StringIO
Kernel.open(file, &block)
rescue SocketError, OpenURI::HTTPError, Errno::ECONNREFUSED
raise NetworkConnectionError
end
private
attr_reader :file, :block
end
end
| Add comment about using Kernel in file fetcher | Add comment about using Kernel in file fetcher
| Ruby | mit | agrimm/resume,paulfioravanti/resume,agrimm/resume | ruby | ## Code Before:
require 'open-uri'
require 'socket'
require_relative 'network_connection_error'
module Resume
class FileFetcher
def self.fetch(file, &block)
new(file, &block).fetch
end
private_class_method :new
def initialize(file, &block)
@file = file
@block = block
end
def fetch
Kernel.open(file, &block)
rescue SocketError, OpenURI::HTTPError, Errno::ECONNREFUSED
raise NetworkConnectionError
end
private
attr_reader :file, :block
end
end
## Instruction:
Add comment about using Kernel in file fetcher
## Code After:
require 'open-uri'
require 'socket'
require_relative 'network_connection_error'
module Resume
class FileFetcher
def self.fetch(file, &block)
new(file, &block).fetch
end
private_class_method :new
def initialize(file, &block)
@file = file
@block = block
end
def fetch
# Specifically uses Kernel here in order to allow it to determine
# the return file type: for this resume, it could be File, TempFile,
# or StringIO
Kernel.open(file, &block)
rescue SocketError, OpenURI::HTTPError, Errno::ECONNREFUSED
raise NetworkConnectionError
end
private
attr_reader :file, :block
end
end
| require 'open-uri'
require 'socket'
require_relative 'network_connection_error'
module Resume
class FileFetcher
def self.fetch(file, &block)
new(file, &block).fetch
end
private_class_method :new
def initialize(file, &block)
@file = file
@block = block
end
def fetch
+ # Specifically uses Kernel here in order to allow it to determine
+ # the return file type: for this resume, it could be File, TempFile,
+ # or StringIO
Kernel.open(file, &block)
rescue SocketError, OpenURI::HTTPError, Errno::ECONNREFUSED
raise NetworkConnectionError
end
private
attr_reader :file, :block
end
end | 3 | 0.103448 | 3 | 0 |
35530305bc35d453f2f30ca0b43fe20fdff2d6b0 | src/site/tools/build/index.markdown | src/site/tools/build/index.markdown | ---
layout: section
title: "Build Your Site"
description: "Build a site that's responsive and performant. Use Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
introduction: "Build a site that's responsive and performant. Use Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
article:
written_on: 2014-05-29
updated_on: 2014-05-29
order: 3
collection: tools
id: build-your-site
---
{% comment %}
Page content will be output by the section layout pased on the article collection matching page.id
{% endcomment %}
| ---
layout: section
title: "Build Your Site"
description: "Build your multi-device site from the ground up. Learn about Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
introduction: "Build your multi-device site from the ground up. Learn about Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
article:
written_on: 2014-05-29
updated_on: 2014-05-29
order: 3
collection: tools
id: build-your-site
---
{% comment %}
Page content will be output by the section layout pased on the article collection matching page.id
{% endcomment %}
| Build description and intro take-two | Build description and intro take-two | Markdown | apache-2.0 | perdona/WebFundamentals,tzik/WebFundamentals,tommyboy326/WebFundamentals,cwdoh/WebFundamentals,yanglr/WebFundamentals,fonai/WebFundamentals,samthor/WebFundamentals,briankostar/WebFundamentals,SungwonKim/WebFundamentals,Howon/WebFundamentals,montogeek/WebFundamentals,beaufortfrancois/WebFundamentals,kidaa/WebFundamentals,briankostar/WebFundamentals,andrebellafronte/WebFundamentals,fonai/WebFundamentals,yanglr/WebFundamentals,GilFewster/WebFundamentals,savelichalex/WebFundamentals,jeffposnick/WebFundamentals,ropik/WebFundamentals,andrebellafronte/WebFundamentals,arnoldsandoval/WebFundamentals,cwdoh/WebFundamentals,pingjiang/WebFundamentals,AlfiyaZi/WebFundamentals,iacdingping/WebFundamentals,yoichiro/WebFundamentals,jakearchibald/WebFundamentals,johyphenel/WebFundamentals,samdutton/WebFundamentals,PaulKinlan/WebFundamentals-old,paulirish/WebFundamentals,GianlucaFormica/WebFundamentals,Howon/WebFundamentals,t9nf/WebFundamentals,jvkops/WebFundamentals,ThiagoGarciaAlves/WebFundamentals,PaulKinlan/WebFundamentals-old,1234-/WebFundamentals,ranjith068/WebFundamentals,1169458576/WebFundamentals,mjsolidarios/WebFundamentals,shields/WebFundamentals,paulirish/WebFundamentals,1169458576/WebFundamentals,ranjith068/WebFundamentals,jakearchibald/WebFundamentals,james4388/WebFundamentals,mubassirhayat/WebFundamentals,raulsenaferreira/WebFundamentals,myakura/WebFundamentals,beaufortfrancois/WebFundamentals,mubassirhayat/WebFundamentals,ebidel/WebFundamentals,yufengg/WebFundamentals,t9nf/WebFundamentals,sonyarianto/WebFundamentals,1169458576/WebFundamentals,jyasskin/WebFundamentals,jaythaceo/WebFundamentals,perdona/WebFundamentals,yanglr/WebFundamentals,montogeek/WebFundamentals,pingjiang/WebFundamentals,1234-/WebFundamentals,kidaa/WebFundamentals,raulsenaferreira/WebFundamentals,jeffposnick/WebFundamentals,merianos/WebFundamentals,mubassirhayat/WebFundamentals,gwmoura/WebFundamentals,ebidel/WebFundamentals,jeffposnick/WebFundamentals,chirilo/WebFundamentals,thinkerchan/WebFundamentals,PaulKinlan/WebFundamentals,Howon/WebFundamentals,perdona/WebFundamentals,mahemoff/WebFundamentals,AlfiyaZi/WebFundamentals,mahemoff/WebFundamentals,StephanieMak/WebFundamentals,kidaa/WebFundamentals,AlfiyaZi/WebFundamentals,jaythaceo/WebFundamentals,robdodson/WebFundamentals,yoichiro/WebFundamentals,mubassirhayat/WebFundamentals,uus169/WebFundamentals,yufengg/WebFundamentals,uus169/WebFundamentals,sonyarianto/WebFundamentals,umaar/WebFundamentals,kidaa/WebFundamentals,yanglr/WebFundamentals,ominux/WebFundamentals,merianos/WebFundamentals,saad14014/WebFundamentals,ebidel/WebFundamentals,iacdingping/WebFundamentals,jakearchibald/WebFundamentals,yufengg/WebFundamentals,simongong/WebFundamentals,t9nf/WebFundamentals,chirilo/WebFundamentals,jaythaceo/WebFundamentals,gwmoura/WebFundamentals,thinkerchan/WebFundamentals,tommyboy326/WebFundamentals,agektmr/WebFundamentals,chirilo/WebFundamentals,abdshomad/WebFundamentals,GianlucaFormica/WebFundamentals,abdshomad/WebFundamentals,cwdoh/WebFundamentals,briankostar/WebFundamentals,abdshomad/WebFundamentals,savelichalex/WebFundamentals,shields/WebFundamentals,1169458576/WebFundamentals,arnoldsandoval/WebFundamentals,1234-/WebFundamentals,myakura/WebFundamentals,simongong/WebFundamentals,ropik/WebFundamentals,raulsenaferreira/WebFundamentals,tommyboy326/WebFundamentals,montogeek/WebFundamentals,SungwonKim/WebFundamentals,mubassirhayat/WebFundamentals,samdutton/WebFundamentals,james4388/WebFundamentals,fonai/WebFundamentals,james4388/WebFundamentals,yanglr/WebFundamentals,ominux/WebFundamentals,jakearchibald/WebFundamentals,mjsolidarios/WebFundamentals,GianlucaFormica/WebFundamentals,johyphenel/WebFundamentals,thinkerchan/WebFundamentals,AlfiyaZi/WebFundamentals,johyphenel/WebFundamentals,1169458576/WebFundamentals,raulsenaferreira/WebFundamentals,t9nf/WebFundamentals,abdshomad/WebFundamentals,james4388/WebFundamentals,PaulKinlan/WebFundamentals-old,t9nf/WebFundamentals,yuyokk/WebFundamentals,ropik/WebFundamentals,ominux/WebFundamentals,PaulKinlan/WebFundamentals-old,shields/WebFundamentals,andrebellafronte/WebFundamentals,lucab85/WebFundamentals,laispace/WebFundamentals,kidaa/WebFundamentals,ominux/WebFundamentals,jeffposnick/WebFundamentals,pingjiang/WebFundamentals,savelichalex/WebFundamentals,tommyboy326/WebFundamentals,google/WebFundamentals,ThiagoGarciaAlves/WebFundamentals,GianlucaFormica/WebFundamentals,PaulKinlan/WebFundamentals,andrebellafronte/WebFundamentals,ThiagoGarciaAlves/WebFundamentals,shields/WebFundamentals,ThiagoGarciaAlves/WebFundamentals,briankostar/WebFundamentals,thinkerchan/WebFundamentals,simongong/WebFundamentals,umaar/WebFundamentals,PaulKinlan/WebFundamentals,gwmoura/WebFundamentals,SungwonKim/WebFundamentals,yuyokk/WebFundamentals,mjsolidarios/WebFundamentals,iacdingping/WebFundamentals,yuyokk/WebFundamentals,fonai/WebFundamentals,arnoldsandoval/WebFundamentals,gwmoura/WebFundamentals,iacdingping/WebFundamentals,lucab85/WebFundamentals,GilFewster/WebFundamentals,jvkops/WebFundamentals,jvkops/WebFundamentals,raulsenaferreira/WebFundamentals,jamesblunt/WebFundamentals,StephanieMak/WebFundamentals,james4388/WebFundamentals,saad14014/WebFundamentals,ranjith068/WebFundamentals,umaar/WebFundamentals,james4388/WebFundamentals,AlfiyaZi/WebFundamentals,johyphenel/WebFundamentals,GilFewster/WebFundamentals,merianos/WebFundamentals,beaufortfrancois/WebFundamentals,yuyokk/WebFundamentals,jaythaceo/WebFundamentals,jyasskin/WebFundamentals,beaufortfrancois/WebFundamentals,arnoldsandoval/WebFundamentals,chirilo/WebFundamentals,yanglr/WebFundamentals,jyasskin/WebFundamentals,beaufortfrancois/WebFundamentals,saad14014/WebFundamentals,ranjith068/WebFundamentals,paulirish/WebFundamentals,merianos/WebFundamentals,jakearchibald/WebFundamentals,mubassirhayat/WebFundamentals,ranjith068/WebFundamentals,saad14014/WebFundamentals,jaythaceo/WebFundamentals,StephanieMak/WebFundamentals,ranjith068/WebFundamentals,fonai/WebFundamentals,jaythaceo/WebFundamentals,1169458576/WebFundamentals,mahemoff/WebFundamentals,arnoldsandoval/WebFundamentals,arnoldsandoval/WebFundamentals,cwdoh/WebFundamentals,raulsenaferreira/WebFundamentals,jeffposnick/WebFundamentals,PaulKinlan/WebFundamentals,pingjiang/WebFundamentals,jvkops/WebFundamentals,pingjiang/WebFundamentals,GilFewster/WebFundamentals,ThiagoGarciaAlves/WebFundamentals,pingjiang/WebFundamentals,briankostar/WebFundamentals,lucab85/WebFundamentals,iacdingping/WebFundamentals,SungwonKim/WebFundamentals,montogeek/WebFundamentals,sonyarianto/WebFundamentals,jvkops/WebFundamentals,ominux/WebFundamentals,Howon/WebFundamentals,paulirish/WebFundamentals,AlfiyaZi/WebFundamentals,chirilo/WebFundamentals,yoichiro/WebFundamentals,shields/WebFundamentals,yoichiro/WebFundamentals,StephanieMak/WebFundamentals,saad14014/WebFundamentals,ThiagoGarciaAlves/WebFundamentals,robdodson/WebFundamentals,uus169/WebFundamentals,tzik/WebFundamentals,uus169/WebFundamentals,uus169/WebFundamentals,myakura/WebFundamentals,thinkerchan/WebFundamentals,jamesblunt/WebFundamentals,1234-/WebFundamentals,mjsolidarios/WebFundamentals,merianos/WebFundamentals,samdutton/WebFundamentals,PaulKinlan/WebFundamentals,jyasskin/WebFundamentals,jamesblunt/WebFundamentals,jvkops/WebFundamentals,johyphenel/WebFundamentals,SungwonKim/WebFundamentals,GilFewster/WebFundamentals,tommyboy326/WebFundamentals,gwmoura/WebFundamentals,tzik/WebFundamentals,samthor/WebFundamentals,PaulKinlan/WebFundamentals-old,paulirish/WebFundamentals,robdodson/WebFundamentals,PaulKinlan/WebFundamentals-old,andrebellafronte/WebFundamentals,ebidel/WebFundamentals,agektmr/WebFundamentals,Howon/WebFundamentals,umaar/WebFundamentals,savelichalex/WebFundamentals,simongong/WebFundamentals,tommyboy326/WebFundamentals,yoichiro/WebFundamentals,briankostar/WebFundamentals,GianlucaFormica/WebFundamentals,ropik/WebFundamentals,perdona/WebFundamentals,kidaa/WebFundamentals,johyphenel/WebFundamentals,tzik/WebFundamentals,mjsolidarios/WebFundamentals,jamesblunt/WebFundamentals,savelichalex/WebFundamentals,lucab85/WebFundamentals,1234-/WebFundamentals,jamesblunt/WebFundamentals,laispace/WebFundamentals,paulirish/WebFundamentals,andrebellafronte/WebFundamentals,tzik/WebFundamentals,tzik/WebFundamentals,yuyokk/WebFundamentals,cwdoh/WebFundamentals,google/WebFundamentals,chirilo/WebFundamentals,thinkerchan/WebFundamentals,perdona/WebFundamentals,StephanieMak/WebFundamentals,jakearchibald/WebFundamentals,shields/WebFundamentals,laispace/WebFundamentals,gwmoura/WebFundamentals,iacdingping/WebFundamentals,simongong/WebFundamentals,jyasskin/WebFundamentals,savelichalex/WebFundamentals,perdona/WebFundamentals,cwdoh/WebFundamentals,robdodson/WebFundamentals,google/WebFundamentals,t9nf/WebFundamentals,StephanieMak/WebFundamentals,samthor/WebFundamentals,samthor/WebFundamentals,jamesblunt/WebFundamentals,jyasskin/WebFundamentals,ominux/WebFundamentals,GilFewster/WebFundamentals,saad14014/WebFundamentals,yuyokk/WebFundamentals,simongong/WebFundamentals,mjsolidarios/WebFundamentals,Howon/WebFundamentals,yufengg/WebFundamentals,uus169/WebFundamentals,agektmr/WebFundamentals,GianlucaFormica/WebFundamentals,mahemoff/WebFundamentals,merianos/WebFundamentals,mahemoff/WebFundamentals,agektmr/WebFundamentals,umaar/WebFundamentals,myakura/WebFundamentals,google/WebFundamentals,umaar/WebFundamentals,sonyarianto/WebFundamentals,mahemoff/WebFundamentals,fonai/WebFundamentals,samdutton/WebFundamentals,PaulKinlan/WebFundamentals | markdown | ## Code Before:
---
layout: section
title: "Build Your Site"
description: "Build a site that's responsive and performant. Use Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
introduction: "Build a site that's responsive and performant. Use Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
article:
written_on: 2014-05-29
updated_on: 2014-05-29
order: 3
collection: tools
id: build-your-site
---
{% comment %}
Page content will be output by the section layout pased on the article collection matching page.id
{% endcomment %}
## Instruction:
Build description and intro take-two
## Code After:
---
layout: section
title: "Build Your Site"
description: "Build your multi-device site from the ground up. Learn about Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
introduction: "Build your multi-device site from the ground up. Learn about Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
article:
written_on: 2014-05-29
updated_on: 2014-05-29
order: 3
collection: tools
id: build-your-site
---
{% comment %}
Page content will be output by the section layout pased on the article collection matching page.id
{% endcomment %}
| ---
layout: section
title: "Build Your Site"
- description: "Build a site that's responsive and performant. Use Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
? ^^^^^^^^^^^^^^^^^ --------------------- ^^^
+ description: "Build your multi-device site from the ground up. Learn about Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
- introduction: "Build a site that's responsive and performant. Use Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
? ^^^^^^^^^^^^^^^^^ --------------------- ^^^
+ introduction: "Build your multi-device site from the ground up. Learn about Chrome DevTools designated to build sites that work great across devices. Walk through the steps to build your site with the Web Starter Kit."
? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
article:
written_on: 2014-05-29
updated_on: 2014-05-29
order: 3
collection: tools
id: build-your-site
---
{% comment %}
Page content will be output by the section layout pased on the article collection matching page.id
{% endcomment %}
| 4 | 0.235294 | 2 | 2 |
18ca4880efbb9fa060722a245e7ccb7c56914eac | README.md | README.md |
Proof-of-concept plugin for loading Bower packages into Broccoli.
At the moment, it's not well-specified where to pick up source files from
Bower packages. The top level is probably wrong; `lib` is often a good guess;
the `main` property in `bower.json` points at files too.
This plugin uses heuristics to pick the `lib` directory or `main` files, and
returns an array of trees-(hopefully)-containing-the-source-code for each
bower package found.
There is a lot of breakage ahead as the heuristics will give way to
well-specced behavior. It is not wise to rely on this package's current
behavior for anything.
## Installation
```
npm --save-dev broccoli-bower
```
## Usage
```js
var findBowerTrees = require('broccoli-bower');
var bowerTrees = findBowerTrees();
```
Then pass `bowerTrees` into other plugins to have the files in your bower
packages picked up by them.
|
Proof-of-concept plugin for loading Bower packages into Broccoli.
## Warning
**This is pre-alpha software!**
At the moment, it's not well-specified where to pick up source files from
Bower packages. The top level is probably wrong; `lib` is often a good guess;
the `main` property in `bower.json` points at files too. This plugin uses
heuristics to pick the `lib` directory and/or `main` files, and returns an
array of trees-(hopefully)-containing-the-source-code for each bower package
found.
Because of that, this plugin should be regarded as a pre-alpha proof of
concept to demonstrate what might be possible when we combine Bower with a
build system sitting on top.
You should not rely no its behavior for your production apps, and you should
not rely on its behavior to distribute your libraries.
There will be many cases where the current heuristic results in broken or
undesirable behavior. This is acceptable. Please do not send pull requests to
change the behavior, as fixing one edge case will just open up another.
The way forward is to write a mini spec for a configuration syntax to specify
where in a bower package source files should be picked up, such as `{ mainDir:
'lib' }`. This configuration might be part of `bower.json`, or might live in a
separate file.
## Installation
```
npm --save-dev broccoli-bower
```
## Usage
```js
var findBowerTrees = require('broccoli-bower');
var bowerTrees = findBowerTrees();
```
Then pass `bowerTrees` into other plugins to have the files in your bower
packages picked up by them.
| Add warning about pre-alpha status | Add warning about pre-alpha status
| Markdown | mit | joliss/broccoli-bower | markdown | ## Code Before:
Proof-of-concept plugin for loading Bower packages into Broccoli.
At the moment, it's not well-specified where to pick up source files from
Bower packages. The top level is probably wrong; `lib` is often a good guess;
the `main` property in `bower.json` points at files too.
This plugin uses heuristics to pick the `lib` directory or `main` files, and
returns an array of trees-(hopefully)-containing-the-source-code for each
bower package found.
There is a lot of breakage ahead as the heuristics will give way to
well-specced behavior. It is not wise to rely on this package's current
behavior for anything.
## Installation
```
npm --save-dev broccoli-bower
```
## Usage
```js
var findBowerTrees = require('broccoli-bower');
var bowerTrees = findBowerTrees();
```
Then pass `bowerTrees` into other plugins to have the files in your bower
packages picked up by them.
## Instruction:
Add warning about pre-alpha status
## Code After:
Proof-of-concept plugin for loading Bower packages into Broccoli.
## Warning
**This is pre-alpha software!**
At the moment, it's not well-specified where to pick up source files from
Bower packages. The top level is probably wrong; `lib` is often a good guess;
the `main` property in `bower.json` points at files too. This plugin uses
heuristics to pick the `lib` directory and/or `main` files, and returns an
array of trees-(hopefully)-containing-the-source-code for each bower package
found.
Because of that, this plugin should be regarded as a pre-alpha proof of
concept to demonstrate what might be possible when we combine Bower with a
build system sitting on top.
You should not rely no its behavior for your production apps, and you should
not rely on its behavior to distribute your libraries.
There will be many cases where the current heuristic results in broken or
undesirable behavior. This is acceptable. Please do not send pull requests to
change the behavior, as fixing one edge case will just open up another.
The way forward is to write a mini spec for a configuration syntax to specify
where in a bower package source files should be picked up, such as `{ mainDir:
'lib' }`. This configuration might be part of `bower.json`, or might live in a
separate file.
## Installation
```
npm --save-dev broccoli-bower
```
## Usage
```js
var findBowerTrees = require('broccoli-bower');
var bowerTrees = findBowerTrees();
```
Then pass `bowerTrees` into other plugins to have the files in your bower
packages picked up by them.
|
Proof-of-concept plugin for loading Bower packages into Broccoli.
+ ## Warning
+
+ **This is pre-alpha software!**
+
At the moment, it's not well-specified where to pick up source files from
Bower packages. The top level is probably wrong; `lib` is often a good guess;
- the `main` property in `bower.json` points at files too.
+ the `main` property in `bower.json` points at files too. This plugin uses
? +++++++++++++++++
+ heuristics to pick the `lib` directory and/or `main` files, and returns an
+ array of trees-(hopefully)-containing-the-source-code for each bower package
+ found.
- This plugin uses heuristics to pick the `lib` directory or `main` files, and
- returns an array of trees-(hopefully)-containing-the-source-code for each
- bower package found.
+ Because of that, this plugin should be regarded as a pre-alpha proof of
+ concept to demonstrate what might be possible when we combine Bower with a
+ build system sitting on top.
- There is a lot of breakage ahead as the heuristics will give way to
- well-specced behavior. It is not wise to rely on this package's current
- behavior for anything.
+ You should not rely no its behavior for your production apps, and you should
+ not rely on its behavior to distribute your libraries.
+
+ There will be many cases where the current heuristic results in broken or
+ undesirable behavior. This is acceptable. Please do not send pull requests to
+ change the behavior, as fixing one edge case will just open up another.
+
+ The way forward is to write a mini spec for a configuration syntax to specify
+ where in a bower package source files should be picked up, such as `{ mainDir:
+ 'lib' }`. This configuration might be part of `bower.json`, or might live in a
+ separate file.
## Installation
```
npm --save-dev broccoli-bower
```
## Usage
```js
var findBowerTrees = require('broccoli-bower');
var bowerTrees = findBowerTrees();
```
Then pass `bowerTrees` into other plugins to have the files in your bower
packages picked up by them. | 29 | 0.935484 | 22 | 7 |
104d37d81c2d8e39722eab95584aa5339ba94e4b | package.json | package.json | {
"name": "deferreds",
"description": "Functional utility library for working with Deferred objects",
"version": "1.1.0",
"homepage": "https://github.com/zship/deferreds.js",
"author": "Zach Shipley <zach@zachshipley.com>",
"repository": {
"type": "git",
"url": "https://github.com/zship/deferreds.js"
},
"license": "MIT",
"dependencies": {
"mout": "0.6.x",
"signals": "1.x",
"setimmediate": "1.x"
},
"devDependencies": {
"amdefine": "0.x",
"uglify-js": "2.x",
"almond": "0.2.x",
"promises-aplus-tests": "1.3.x",
"requirejs": "2.1.x",
"mocha": "1.12.x",
"glob": "3.x",
"umdify": "0.x",
"node-amd-require": "0.x",
"jquery": "1.x",
"q": "0.x",
"rsvp": "2.x",
"when": "2.x"
},
"keywords": [
"promises-aplus"
]
}
| {
"name": "deferreds",
"description": "Functional utility library for working with Deferred objects",
"version": "1.1.0",
"homepage": "https://github.com/zship/deferreds.js",
"author": "Zach Shipley <zach@zachshipley.com>",
"repository": {
"type": "git",
"url": "https://github.com/zship/deferreds.js"
},
"license": "MIT",
"dependencies": {
"mout": "0.6.x",
"signals": "1.x",
"setimmediate": "1.x"
},
"devDependencies": {
"amd-tools": "1.x",
"amdefine": "0.x",
"uglify-js": "2.x",
"almond": "0.2.x",
"promises-aplus-tests": "1.3.x",
"requirejs": "2.1.x",
"mocha": "1.12.x",
"glob": "3.x",
"umdify": "0.x",
"node-amd-require": "0.x",
"jquery": "1.x",
"q": "0.x",
"rsvp": "2.x",
"when": "2.x"
},
"keywords": [
"promises-aplus"
]
}
| Include amd-tools dependency (required by _make/optimize) | Include amd-tools dependency (required by _make/optimize)
| JSON | mit | zship/deferreds.js | json | ## Code Before:
{
"name": "deferreds",
"description": "Functional utility library for working with Deferred objects",
"version": "1.1.0",
"homepage": "https://github.com/zship/deferreds.js",
"author": "Zach Shipley <zach@zachshipley.com>",
"repository": {
"type": "git",
"url": "https://github.com/zship/deferreds.js"
},
"license": "MIT",
"dependencies": {
"mout": "0.6.x",
"signals": "1.x",
"setimmediate": "1.x"
},
"devDependencies": {
"amdefine": "0.x",
"uglify-js": "2.x",
"almond": "0.2.x",
"promises-aplus-tests": "1.3.x",
"requirejs": "2.1.x",
"mocha": "1.12.x",
"glob": "3.x",
"umdify": "0.x",
"node-amd-require": "0.x",
"jquery": "1.x",
"q": "0.x",
"rsvp": "2.x",
"when": "2.x"
},
"keywords": [
"promises-aplus"
]
}
## Instruction:
Include amd-tools dependency (required by _make/optimize)
## Code After:
{
"name": "deferreds",
"description": "Functional utility library for working with Deferred objects",
"version": "1.1.0",
"homepage": "https://github.com/zship/deferreds.js",
"author": "Zach Shipley <zach@zachshipley.com>",
"repository": {
"type": "git",
"url": "https://github.com/zship/deferreds.js"
},
"license": "MIT",
"dependencies": {
"mout": "0.6.x",
"signals": "1.x",
"setimmediate": "1.x"
},
"devDependencies": {
"amd-tools": "1.x",
"amdefine": "0.x",
"uglify-js": "2.x",
"almond": "0.2.x",
"promises-aplus-tests": "1.3.x",
"requirejs": "2.1.x",
"mocha": "1.12.x",
"glob": "3.x",
"umdify": "0.x",
"node-amd-require": "0.x",
"jquery": "1.x",
"q": "0.x",
"rsvp": "2.x",
"when": "2.x"
},
"keywords": [
"promises-aplus"
]
}
| {
"name": "deferreds",
"description": "Functional utility library for working with Deferred objects",
"version": "1.1.0",
"homepage": "https://github.com/zship/deferreds.js",
"author": "Zach Shipley <zach@zachshipley.com>",
"repository": {
"type": "git",
"url": "https://github.com/zship/deferreds.js"
},
"license": "MIT",
"dependencies": {
"mout": "0.6.x",
"signals": "1.x",
"setimmediate": "1.x"
},
"devDependencies": {
+ "amd-tools": "1.x",
"amdefine": "0.x",
"uglify-js": "2.x",
"almond": "0.2.x",
"promises-aplus-tests": "1.3.x",
"requirejs": "2.1.x",
"mocha": "1.12.x",
"glob": "3.x",
"umdify": "0.x",
"node-amd-require": "0.x",
"jquery": "1.x",
"q": "0.x",
"rsvp": "2.x",
"when": "2.x"
},
"keywords": [
"promises-aplus"
]
} | 1 | 0.028571 | 1 | 0 |
2003e03045b6b89de455afda677198bb8b8b36b7 | test/CodeGen/X86/avx2-shuffle.ll | test/CodeGen/X86/avx2-shuffle.ll | ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -mattr=+avx2 | FileCheck %s
; Make sure that we don't match this shuffle using the vpblendw instruction.
; The mask for the vpblendw instruction needs to be identical for both halves
; of the YMM.
; CHECK: blendw1
; CHECK-NOT: vpblendw
; CHECK: ret
define <16 x i16> @blendw1(<16 x i16> %a, <16 x i16> %b) nounwind alwaysinline {
%t = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> <i32 0, i32 17, i32 18, i32 3, i32 20, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
ret <16 x i16> %t
}
| ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -mattr=+avx2 | FileCheck %s
; Make sure that we don't match this shuffle using the vpblendw YMM instruction.
; The mask for the vpblendw instruction needs to be identical for both halves
; of the YMM. Need to use two vpblendw instructions.
; CHECK: blendw1
; CHECK: vpblendw
; CHECK: vpblendw
; CHECK: ret
define <16 x i16> @blendw1(<16 x i16> %a, <16 x i16> %b) nounwind alwaysinline {
%t = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> <i32 0, i32 17, i32 18, i32 3, i32 20, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 31>
ret <16 x i16> %t
}
| Fix the testcase. We do expect two vblendw on XMMs. | Fix the testcase. We do expect two vblendw on XMMs.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@155477 91177308-0d34-0410-b5e6-96231b3b80d8
| LLVM | bsd-2-clause | chubbymaggie/asap,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap | llvm | ## Code Before:
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -mattr=+avx2 | FileCheck %s
; Make sure that we don't match this shuffle using the vpblendw instruction.
; The mask for the vpblendw instruction needs to be identical for both halves
; of the YMM.
; CHECK: blendw1
; CHECK-NOT: vpblendw
; CHECK: ret
define <16 x i16> @blendw1(<16 x i16> %a, <16 x i16> %b) nounwind alwaysinline {
%t = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> <i32 0, i32 17, i32 18, i32 3, i32 20, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
ret <16 x i16> %t
}
## Instruction:
Fix the testcase. We do expect two vblendw on XMMs.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@155477 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -mattr=+avx2 | FileCheck %s
; Make sure that we don't match this shuffle using the vpblendw YMM instruction.
; The mask for the vpblendw instruction needs to be identical for both halves
; of the YMM. Need to use two vpblendw instructions.
; CHECK: blendw1
; CHECK: vpblendw
; CHECK: vpblendw
; CHECK: ret
define <16 x i16> @blendw1(<16 x i16> %a, <16 x i16> %b) nounwind alwaysinline {
%t = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> <i32 0, i32 17, i32 18, i32 3, i32 20, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 31>
ret <16 x i16> %t
}
| ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -mattr=+avx2 | FileCheck %s
- ; Make sure that we don't match this shuffle using the vpblendw instruction.
? -
+ ; Make sure that we don't match this shuffle using the vpblendw YMM instruction.
? ++++
- ; The mask for the vpblendw instruction needs to be identical for both halves
? -
+ ; The mask for the vpblendw instruction needs to be identical for both halves
- ; of the YMM.
+ ; of the YMM. Need to use two vpblendw instructions.
; CHECK: blendw1
- ; CHECK-NOT: vpblendw
? ----
+ ; CHECK: vpblendw
+ ; CHECK: vpblendw
; CHECK: ret
define <16 x i16> @blendw1(<16 x i16> %a, <16 x i16> %b) nounwind alwaysinline {
- %t = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> <i32 0, i32 17, i32 18, i32 3, i32 20, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15>
? -
+ %t = shufflevector <16 x i16> %a, <16 x i16> %b, <16 x i32> <i32 0, i32 17, i32 18, i32 3, i32 20, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 31>
? +
ret <16 x i16> %t
} | 11 | 0.846154 | 6 | 5 |
3b7430c9a37d21cafc5285e05b017a779c44a7bc | zsh/config.zsh | zsh/config.zsh | fpath=($ZSH/zsh/functions $fpath)
autoload -U $ZSH/zsh/functions/*(:t)
# colors
export LSCOLORS="exfxcxdxbxegedabagacad"
export CLICOLOR=true
# options
setopt NO_BG_NICE # don't nice background tasks
setopt NO_HUP
setopt NO_LIST_BEEP
setopt LOCAL_OPTIONS # allow functions to have local options
setopt LOCAL_TRAPS # allow functions to have local traps
setopt PROMPT_SUBST
setopt CORRECT
setopt COMPLETE_IN_WORD
setopt IGNORE_EOF
# don't expand aliases _before_ completion has finished
# like: git comm-[tab]
setopt complete_aliases
# set keybinding to emacs
bindkey -e
| fpath=($ZSH/zsh/functions $fpath)
autoload -U $ZSH/zsh/functions/*(:t)
# colors
export LSCOLORS="exfxcxdxbxegedabagacad"
export CLICOLOR=true
# options
setopt NO_BG_NICE # don't nice background tasks
setopt NO_HUP
setopt NO_LIST_BEEP
setopt LOCAL_OPTIONS # allow functions to have local options
setopt LOCAL_TRAPS # allow functions to have local traps
setopt PROMPT_SUBST
setopt CORRECT
setopt COMPLETE_IN_WORD
setopt IGNORE_EOF
# Change to a directory by just entering name
setopt auto_cd
# don't expand aliases _before_ completion has finished
# like: git comm-[tab]
setopt complete_aliases
# set keybinding to emacs
bindkey -e
| Allow cd to directory by just entering the name | Allow cd to directory by just entering the name
| Shell | mit | dplarson/dotfiles,dplarson/dotfiles | shell | ## Code Before:
fpath=($ZSH/zsh/functions $fpath)
autoload -U $ZSH/zsh/functions/*(:t)
# colors
export LSCOLORS="exfxcxdxbxegedabagacad"
export CLICOLOR=true
# options
setopt NO_BG_NICE # don't nice background tasks
setopt NO_HUP
setopt NO_LIST_BEEP
setopt LOCAL_OPTIONS # allow functions to have local options
setopt LOCAL_TRAPS # allow functions to have local traps
setopt PROMPT_SUBST
setopt CORRECT
setopt COMPLETE_IN_WORD
setopt IGNORE_EOF
# don't expand aliases _before_ completion has finished
# like: git comm-[tab]
setopt complete_aliases
# set keybinding to emacs
bindkey -e
## Instruction:
Allow cd to directory by just entering the name
## Code After:
fpath=($ZSH/zsh/functions $fpath)
autoload -U $ZSH/zsh/functions/*(:t)
# colors
export LSCOLORS="exfxcxdxbxegedabagacad"
export CLICOLOR=true
# options
setopt NO_BG_NICE # don't nice background tasks
setopt NO_HUP
setopt NO_LIST_BEEP
setopt LOCAL_OPTIONS # allow functions to have local options
setopt LOCAL_TRAPS # allow functions to have local traps
setopt PROMPT_SUBST
setopt CORRECT
setopt COMPLETE_IN_WORD
setopt IGNORE_EOF
# Change to a directory by just entering name
setopt auto_cd
# don't expand aliases _before_ completion has finished
# like: git comm-[tab]
setopt complete_aliases
# set keybinding to emacs
bindkey -e
| fpath=($ZSH/zsh/functions $fpath)
autoload -U $ZSH/zsh/functions/*(:t)
# colors
export LSCOLORS="exfxcxdxbxegedabagacad"
export CLICOLOR=true
# options
setopt NO_BG_NICE # don't nice background tasks
setopt NO_HUP
setopt NO_LIST_BEEP
setopt LOCAL_OPTIONS # allow functions to have local options
setopt LOCAL_TRAPS # allow functions to have local traps
setopt PROMPT_SUBST
setopt CORRECT
setopt COMPLETE_IN_WORD
setopt IGNORE_EOF
+ # Change to a directory by just entering name
+ setopt auto_cd
+
# don't expand aliases _before_ completion has finished
# like: git comm-[tab]
setopt complete_aliases
# set keybinding to emacs
bindkey -e | 3 | 0.12 | 3 | 0 |
6c51d0bb11e83d26741bf76e52d51a6cef5acc0a | node/node_path.zsh | node/node_path.zsh | export NODE_PATH="/usr/local/lib/node_modules:$NODE_PATH"
|
export NVM_DIR="$HOME/.nvm"
NVM_HOMEBREW="/usr/local/opt/nvm/nvm.sh"
[ -s "$NVM_HOMEBREW" ] && \. "$NVM_HOMEBREW"
[ -x "$(command -v npm)" ] && export NODE_PATH=$NODE_PATH:`npm root -g`
# export NODE_PATH="/usr/local/lib/node_modules:$NODE_PATH"
| Add nvm homebrew info to NODE_PATH | Add nvm homebrew info to NODE_PATH
| Shell | mit | tsdorsey/dotfiles,tsdorsey/dotfiles | shell | ## Code Before:
export NODE_PATH="/usr/local/lib/node_modules:$NODE_PATH"
## Instruction:
Add nvm homebrew info to NODE_PATH
## Code After:
export NVM_DIR="$HOME/.nvm"
NVM_HOMEBREW="/usr/local/opt/nvm/nvm.sh"
[ -s "$NVM_HOMEBREW" ] && \. "$NVM_HOMEBREW"
[ -x "$(command -v npm)" ] && export NODE_PATH=$NODE_PATH:`npm root -g`
# export NODE_PATH="/usr/local/lib/node_modules:$NODE_PATH"
| +
+ export NVM_DIR="$HOME/.nvm"
+ NVM_HOMEBREW="/usr/local/opt/nvm/nvm.sh"
+ [ -s "$NVM_HOMEBREW" ] && \. "$NVM_HOMEBREW"
+
+ [ -x "$(command -v npm)" ] && export NODE_PATH=$NODE_PATH:`npm root -g`
+
- export NODE_PATH="/usr/local/lib/node_modules:$NODE_PATH"
+ # export NODE_PATH="/usr/local/lib/node_modules:$NODE_PATH"
? ++
| 9 | 9 | 8 | 1 |
6997257c9f95814463b963ae6eac873253c29a4e | lib/tasks/downloads.rake | lib/tasks/downloads.rake | namespace :downloads do
desc "make downloadable for packages"
task packages: :environment do
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet name: 'Julia Packages'
package_attributes = [:name, :description]
sheet.update_row 0, *package_attributes.map(&:to_s).map(&:titleize), 'Category'
package_list = Package
.exclude_unregistered_packages
.active_batch_scope
.order(:name)
.select(package_attributes)
package_list.each_with_index do |package, index|
sheet.update_row \
(index+1), package.name, package.description, 'x'
end
FileUtils.mkdir_p(@downloads_directory) \
unless File.directory? @downloads_directory
spreadsheet_name = "julia_packages.xls"
spreadsheet_path = "#{@downloads_directory}/julia_packages.xls"
book.write spreadsheet_path
zipfile_name = "#{@downloads_directory}/julia_packages.zip"
Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile|
zipfile.add(spreadsheet_name, spreadsheet_path)
end
download_name = 'packages'
if Download.friendly.exists? download_name
download = Download.friendly.find download_name
else
download = Download.create! name: download_name
end
download.update file: zipfile_name
end
end
| namespace :downloads do
desc "make downloadable for packages"
task packages: :environment do
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet name: 'Julia Packages'
package_attributes = [:name, :description]
sheet.update_row 0, *package_attributes.map(&:to_s).map(&:titleize), 'Categories'
package_list = Package
.exclude_unregistered_packages
.active_batch_scope
.order(:name)
.select(package_attributes)
package_list.each_with_index do |package, index|
categories = package.categories.map(&:name).inspect
categories = 'x' if categories == '[]'
sheet.update_row \
(index+1), package.name, package.description, categories
end
FileUtils.mkdir_p(@downloads_directory) \
unless File.directory? @downloads_directory
spreadsheet_name = "julia_packages.xls"
spreadsheet_path = "#{@downloads_directory}/julia_packages.xls"
book.write spreadsheet_path
zipfile_name = "#{@downloads_directory}/julia_packages.zip"
Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile|
zipfile.add(spreadsheet_name, spreadsheet_path)
end
download_name = 'packages'
if Download.friendly.exists? download_name
download = Download.friendly.find download_name
else
download = Download.create! name: download_name
end
download.update file: zipfile_name
end
end
| Add original categories labels to pkg spreadsheet | Add original categories labels to pkg spreadsheet | Ruby | mit | djsegal/julia_observer,djsegal/julia_observer,djsegal/julia_observer | ruby | ## Code Before:
namespace :downloads do
desc "make downloadable for packages"
task packages: :environment do
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet name: 'Julia Packages'
package_attributes = [:name, :description]
sheet.update_row 0, *package_attributes.map(&:to_s).map(&:titleize), 'Category'
package_list = Package
.exclude_unregistered_packages
.active_batch_scope
.order(:name)
.select(package_attributes)
package_list.each_with_index do |package, index|
sheet.update_row \
(index+1), package.name, package.description, 'x'
end
FileUtils.mkdir_p(@downloads_directory) \
unless File.directory? @downloads_directory
spreadsheet_name = "julia_packages.xls"
spreadsheet_path = "#{@downloads_directory}/julia_packages.xls"
book.write spreadsheet_path
zipfile_name = "#{@downloads_directory}/julia_packages.zip"
Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile|
zipfile.add(spreadsheet_name, spreadsheet_path)
end
download_name = 'packages'
if Download.friendly.exists? download_name
download = Download.friendly.find download_name
else
download = Download.create! name: download_name
end
download.update file: zipfile_name
end
end
## Instruction:
Add original categories labels to pkg spreadsheet
## Code After:
namespace :downloads do
desc "make downloadable for packages"
task packages: :environment do
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet name: 'Julia Packages'
package_attributes = [:name, :description]
sheet.update_row 0, *package_attributes.map(&:to_s).map(&:titleize), 'Categories'
package_list = Package
.exclude_unregistered_packages
.active_batch_scope
.order(:name)
.select(package_attributes)
package_list.each_with_index do |package, index|
categories = package.categories.map(&:name).inspect
categories = 'x' if categories == '[]'
sheet.update_row \
(index+1), package.name, package.description, categories
end
FileUtils.mkdir_p(@downloads_directory) \
unless File.directory? @downloads_directory
spreadsheet_name = "julia_packages.xls"
spreadsheet_path = "#{@downloads_directory}/julia_packages.xls"
book.write spreadsheet_path
zipfile_name = "#{@downloads_directory}/julia_packages.zip"
Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile|
zipfile.add(spreadsheet_name, spreadsheet_path)
end
download_name = 'packages'
if Download.friendly.exists? download_name
download = Download.friendly.find download_name
else
download = Download.create! name: download_name
end
download.update file: zipfile_name
end
end
| namespace :downloads do
desc "make downloadable for packages"
task packages: :environment do
book = Spreadsheet::Workbook.new
sheet = book.create_worksheet name: 'Julia Packages'
package_attributes = [:name, :description]
- sheet.update_row 0, *package_attributes.map(&:to_s).map(&:titleize), 'Category'
? ^
+ sheet.update_row 0, *package_attributes.map(&:to_s).map(&:titleize), 'Categories'
? ^^^
package_list = Package
.exclude_unregistered_packages
.active_batch_scope
.order(:name)
.select(package_attributes)
package_list.each_with_index do |package, index|
+ categories = package.categories.map(&:name).inspect
+ categories = 'x' if categories == '[]'
+
sheet.update_row \
- (index+1), package.name, package.description, 'x'
? ^^^
+ (index+1), package.name, package.description, categories
? ^^^^^^^^^^
end
FileUtils.mkdir_p(@downloads_directory) \
unless File.directory? @downloads_directory
spreadsheet_name = "julia_packages.xls"
spreadsheet_path = "#{@downloads_directory}/julia_packages.xls"
book.write spreadsheet_path
zipfile_name = "#{@downloads_directory}/julia_packages.zip"
Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile|
zipfile.add(spreadsheet_name, spreadsheet_path)
end
download_name = 'packages'
if Download.friendly.exists? download_name
download = Download.friendly.find download_name
else
download = Download.create! name: download_name
end
download.update file: zipfile_name
end
end | 7 | 0.148936 | 5 | 2 |
cefaa6c8f0fd3c26be2bf6fba75d01b2f5095a34 | strapmin/widgets.py | strapmin/widgets.py | from django import forms
from django.forms.util import flatatt
from django.template.loader import render_to_string
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
class RichTextEditorWidget(forms.Textarea):
class Media:
js = ('admin/js/ckeditor/ckeditor.js',
'admin/js/ckeditor/jquery-ckeditor.js')
def render(self, name, value, attrs={}):
if value is None:
value = ''
final_attrs = self.build_attrs(attrs, name=name)
return mark_safe(render_to_string('ckeditor/widget.html', {
'final_attrs': flatatt(final_attrs),
'value': force_text(value),
'id': final_attrs['id'],
}))
| from django import forms
from django.template.loader import render_to_string
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
try:
from django.forms.utils import flatatt
except ImportError:
from django.forms.util import flatatt
class RichTextEditorWidget(forms.Textarea):
class Media:
js = ('admin/js/ckeditor/ckeditor.js',
'admin/js/ckeditor/jquery-ckeditor.js')
def render(self, name, value, attrs={}):
if value is None:
value = ''
final_attrs = self.build_attrs(attrs, name=name)
return mark_safe(render_to_string('ckeditor/widget.html', {
'final_attrs': flatatt(final_attrs),
'value': force_text(value),
'id': final_attrs['id'],
}))
| Fix flatatt import path for Django 1.9 | Fix flatatt import path for Django 1.9
| Python | bsd-2-clause | knyghty/strapmin,knyghty/strapmin,knyghty/strapmin | python | ## Code Before:
from django import forms
from django.forms.util import flatatt
from django.template.loader import render_to_string
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
class RichTextEditorWidget(forms.Textarea):
class Media:
js = ('admin/js/ckeditor/ckeditor.js',
'admin/js/ckeditor/jquery-ckeditor.js')
def render(self, name, value, attrs={}):
if value is None:
value = ''
final_attrs = self.build_attrs(attrs, name=name)
return mark_safe(render_to_string('ckeditor/widget.html', {
'final_attrs': flatatt(final_attrs),
'value': force_text(value),
'id': final_attrs['id'],
}))
## Instruction:
Fix flatatt import path for Django 1.9
## Code After:
from django import forms
from django.template.loader import render_to_string
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
try:
from django.forms.utils import flatatt
except ImportError:
from django.forms.util import flatatt
class RichTextEditorWidget(forms.Textarea):
class Media:
js = ('admin/js/ckeditor/ckeditor.js',
'admin/js/ckeditor/jquery-ckeditor.js')
def render(self, name, value, attrs={}):
if value is None:
value = ''
final_attrs = self.build_attrs(attrs, name=name)
return mark_safe(render_to_string('ckeditor/widget.html', {
'final_attrs': flatatt(final_attrs),
'value': force_text(value),
'id': final_attrs['id'],
}))
| from django import forms
- from django.forms.util import flatatt
+
from django.template.loader import render_to_string
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
+
+ try:
+ from django.forms.utils import flatatt
+ except ImportError:
+ from django.forms.util import flatatt
class RichTextEditorWidget(forms.Textarea):
class Media:
js = ('admin/js/ckeditor/ckeditor.js',
'admin/js/ckeditor/jquery-ckeditor.js')
def render(self, name, value, attrs={}):
if value is None:
value = ''
final_attrs = self.build_attrs(attrs, name=name)
return mark_safe(render_to_string('ckeditor/widget.html', {
'final_attrs': flatatt(final_attrs),
'value': force_text(value),
'id': final_attrs['id'],
})) | 7 | 0.333333 | 6 | 1 |
a256b66359803fba2925e7be1a448de61d32ff15 | README.md | README.md | Script to show public [Tent](https://tent.io/) status posts as an RSS feed.
Based on [Flask](http://flask.pocoo.org/).
See Flask's install instructions to get this running.
You can find my Tent at https://graue.tent.is/
| = TentRSS =
Script to show public [Tent](https://tent.io/) status posts as an RSS feed.
Based on [Flask](http://flask.pocoo.org/).
See Flask's install instructions to get this running.
You can find my Tent at https://graue.tent.is/
== Example nginx proxy configuration ==
location /tentrss/ {
proxy_pass http://127.0.0.1:8001/;
proxy_redirect default;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Original-Request-URI $request_uri;
}
The X-Original-Request-URI header allows TentRSS to generate a correct
URL to the resulting feed.
| Enhance readme with example nginx config | Enhance readme with example nginx config
| Markdown | mit | graue/tentrss | markdown | ## Code Before:
Script to show public [Tent](https://tent.io/) status posts as an RSS feed.
Based on [Flask](http://flask.pocoo.org/).
See Flask's install instructions to get this running.
You can find my Tent at https://graue.tent.is/
## Instruction:
Enhance readme with example nginx config
## Code After:
= TentRSS =
Script to show public [Tent](https://tent.io/) status posts as an RSS feed.
Based on [Flask](http://flask.pocoo.org/).
See Flask's install instructions to get this running.
You can find my Tent at https://graue.tent.is/
== Example nginx proxy configuration ==
location /tentrss/ {
proxy_pass http://127.0.0.1:8001/;
proxy_redirect default;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Original-Request-URI $request_uri;
}
The X-Original-Request-URI header allows TentRSS to generate a correct
URL to the resulting feed.
| + = TentRSS =
+
Script to show public [Tent](https://tent.io/) status posts as an RSS feed.
Based on [Flask](http://flask.pocoo.org/).
See Flask's install instructions to get this running.
You can find my Tent at https://graue.tent.is/
+
+ == Example nginx proxy configuration ==
+
+ location /tentrss/ {
+ proxy_pass http://127.0.0.1:8001/;
+ proxy_redirect default;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header Host $http_host;
+ proxy_set_header X-Original-Request-URI $request_uri;
+ }
+
+ The X-Original-Request-URI header allows TentRSS to generate a correct
+ URL to the resulting feed. | 15 | 2.5 | 15 | 0 |
81635e3a0b419b9aa4fb9f8975063e6064c3d311 | stack.yaml | stack.yaml | flags: {}
packages:
- '.'
extra-deps:
- aeson-0.11.1.0
- insert-ordered-containers-0.1.0.1
resolver: nightly-2016-03-04
| flags: {}
packages:
- '.'
extra-deps: []
resolver: nightly-2016-07-15
| Switch to the latest nightly to avoid extra-deps | Switch to the latest nightly to avoid extra-deps
| YAML | bsd-3-clause | GetShopTV/swagger2 | yaml | ## Code Before:
flags: {}
packages:
- '.'
extra-deps:
- aeson-0.11.1.0
- insert-ordered-containers-0.1.0.1
resolver: nightly-2016-03-04
## Instruction:
Switch to the latest nightly to avoid extra-deps
## Code After:
flags: {}
packages:
- '.'
extra-deps: []
resolver: nightly-2016-07-15
| flags: {}
packages:
- '.'
- extra-deps:
+ extra-deps: []
? +++
- - aeson-0.11.1.0
- - insert-ordered-containers-0.1.0.1
- resolver: nightly-2016-03-04
? ^ ^^
+ resolver: nightly-2016-07-15
? ^ ^^
| 6 | 0.857143 | 2 | 4 |
2225efed5e7163fe4f5206cf7a3eab53fad878fb | site/.forestry/front_matter/templates/news.yml | site/.forestry/front_matter/templates/news.yml | ---
pages:
- news/color-run-fundraiser.md
- news/earth-day-garden-party.md
- news/color-run-online-donations-are-better-than-ever-.md
- news/garden-work-party.md
- news/i-love-to-read-month.md
- news/vote-yes-for-anacortes-schools-.md
- news/november-pta-meeting---nov-15th-not-8th.md
- news/chocolate-fundraiser.md
- news/new-pta-website.md
hide_body: false
is_partial: false
fields:
- name: title
label: Title
type: text
hidden: false
default: ''
- name: date
label: Date
type: datetime
hidden: false
default: ''
- name: description
label: News Summary
type: textarea
hidden: false
default: ''
description: Short summary of the news post.
- name: image
label: Image
type: file
hidden: false
default: ''
- name: type
label: Type
type: text
hidden: true
default: news
| ---
pages:
- news/color-run-prizes-.md
- news/color-run-fundraiser.md
- news/earth-day-garden-party.md
- news/color-run-online-donations-are-better-than-ever-.md
- news/garden-work-party.md
- news/i-love-to-read-month.md
- news/vote-yes-for-anacortes-schools-.md
- news/november-pta-meeting---nov-15th-not-8th.md
- news/chocolate-fundraiser.md
- news/new-pta-website.md
hide_body: false
is_partial: false
fields:
- name: title
label: Title
type: text
hidden: false
default: ''
- name: date
label: Date
type: datetime
hidden: false
default: ''
- name: description
label: News Summary
type: textarea
hidden: false
default: ''
description: Short summary of the news post.
- name: image
label: Image
type: file
hidden: false
default: ''
- name: type
label: Type
type: text
hidden: true
default: news
| Update from Forestry.io - Added media | Update from Forestry.io - Added media | YAML | mit | IslandViewPTA/islandview-pta-site,IslandViewPTA/islandview-pta-site,IslandViewPTA/islandview-pta-site | yaml | ## Code Before:
---
pages:
- news/color-run-fundraiser.md
- news/earth-day-garden-party.md
- news/color-run-online-donations-are-better-than-ever-.md
- news/garden-work-party.md
- news/i-love-to-read-month.md
- news/vote-yes-for-anacortes-schools-.md
- news/november-pta-meeting---nov-15th-not-8th.md
- news/chocolate-fundraiser.md
- news/new-pta-website.md
hide_body: false
is_partial: false
fields:
- name: title
label: Title
type: text
hidden: false
default: ''
- name: date
label: Date
type: datetime
hidden: false
default: ''
- name: description
label: News Summary
type: textarea
hidden: false
default: ''
description: Short summary of the news post.
- name: image
label: Image
type: file
hidden: false
default: ''
- name: type
label: Type
type: text
hidden: true
default: news
## Instruction:
Update from Forestry.io - Added media
## Code After:
---
pages:
- news/color-run-prizes-.md
- news/color-run-fundraiser.md
- news/earth-day-garden-party.md
- news/color-run-online-donations-are-better-than-ever-.md
- news/garden-work-party.md
- news/i-love-to-read-month.md
- news/vote-yes-for-anacortes-schools-.md
- news/november-pta-meeting---nov-15th-not-8th.md
- news/chocolate-fundraiser.md
- news/new-pta-website.md
hide_body: false
is_partial: false
fields:
- name: title
label: Title
type: text
hidden: false
default: ''
- name: date
label: Date
type: datetime
hidden: false
default: ''
- name: description
label: News Summary
type: textarea
hidden: false
default: ''
description: Short summary of the news post.
- name: image
label: Image
type: file
hidden: false
default: ''
- name: type
label: Type
type: text
hidden: true
default: news
| ---
pages:
+ - news/color-run-prizes-.md
- news/color-run-fundraiser.md
- news/earth-day-garden-party.md
- news/color-run-online-donations-are-better-than-ever-.md
- news/garden-work-party.md
- news/i-love-to-read-month.md
- news/vote-yes-for-anacortes-schools-.md
- news/november-pta-meeting---nov-15th-not-8th.md
- news/chocolate-fundraiser.md
- news/new-pta-website.md
hide_body: false
is_partial: false
fields:
- name: title
label: Title
type: text
hidden: false
default: ''
- name: date
label: Date
type: datetime
hidden: false
default: ''
- name: description
label: News Summary
type: textarea
hidden: false
default: ''
description: Short summary of the news post.
- name: image
label: Image
type: file
hidden: false
default: ''
- name: type
label: Type
type: text
hidden: true
default: news | 1 | 0.025 | 1 | 0 |
23a6925e57fe26b444b0f531693fd647db884019 | app/views/admin/documents/new.html.erb | app/views/admin/documents/new.html.erb | <section class="g2 first">
<h1>Create <%= @document.type.titleize %></h1>
<%= render partial: "form", locals: {document: @document} %>
</section> | <section class="g2 first">
<h1>Create <%= @document.type.titleize %></h1>
<%= render partial: "form", locals: {document: @document} %>
<%= render partial: "govspeak_help" %>
</section> | Add govspeak helper to new document view as well as edit. | Add govspeak helper to new document view as well as edit.
| HTML+ERB | mit | alphagov/whitehall,robinwhittleton/whitehall,YOTOV-LIMITED/whitehall,alphagov/whitehall,alphagov/whitehall,askl56/whitehall,ggoral/whitehall,hotvulcan/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,YOTOV-LIMITED/whitehall,askl56/whitehall,ggoral/whitehall,YOTOV-LIMITED/whitehall,alphagov/whitehall,hotvulcan/whitehall,askl56/whitehall,hotvulcan/whitehall,robinwhittleton/whitehall,robinwhittleton/whitehall,robinwhittleton/whitehall,ggoral/whitehall,hotvulcan/whitehall,ggoral/whitehall | html+erb | ## Code Before:
<section class="g2 first">
<h1>Create <%= @document.type.titleize %></h1>
<%= render partial: "form", locals: {document: @document} %>
</section>
## Instruction:
Add govspeak helper to new document view as well as edit.
## Code After:
<section class="g2 first">
<h1>Create <%= @document.type.titleize %></h1>
<%= render partial: "form", locals: {document: @document} %>
<%= render partial: "govspeak_help" %>
</section> | <section class="g2 first">
<h1>Create <%= @document.type.titleize %></h1>
<%= render partial: "form", locals: {document: @document} %>
+ <%= render partial: "govspeak_help" %>
</section> | 1 | 0.25 | 1 | 0 |
42f1f36b1e41a64a511eefa2ff3b17c219a04653 | src/binomial_coefficients.rs | src/binomial_coefficients.rs | // http://rosettacode.org/wiki/Evaluate_binomial_coefficients
fn binomial(n: uint, mut k: uint) -> u64 {
// Since binomial(n, k) = binomial(n, n - k), we might as well use
// the smaller k to optimize
if n - k < k {
k = n - k;
}
// Compute the coefficient
let mut res = 1u64;
for i in range(1, k as u64 + 1) {
res *= (n - k) as u64 + i;
res /= i;
}
res
}
#[cfg(not(test))]
fn main() {
println!("{}", binomial(5, 3));
}
#[test]
fn test_binomial() {
assert_eq!(binomial(20, 0), binomial(20, 20));
assert_eq!(binomial(20, 15), binomial(19, 14) + binomial(19, 15));
assert_eq!(binomial(5, 3), 10);
assert_eq!(binomial(31, 17), 265182525);
}
| // http://rosettacode.org/wiki/Evaluate_binomial_coefficients
extern crate num;
extern crate core;
use num::bigint::BigUint;
use core::num::One;
fn binomial(n: uint, mut k: uint) -> BigUint {
// Since binomial(n, k) = binomial(n, n - k), we might as well use
// the smaller k to optimize
if n - k < k {
k = n - k;
}
// Compute the coefficient
let mut res: BigUint = One::one();
for i in range(1, k + 1) {
res = res * FromPrimitive::from_uint(n - k + i).unwrap();
res = res / FromPrimitive::from_uint(i).unwrap();
}
res
}
#[cfg(not(test))]
fn main() {
println!("{}", binomial(5, 3));
}
#[test]
fn test_binomial() {
use std::from_str::FromStr;
assert_eq!(binomial(20, 0), binomial(20, 20));
assert_eq!(binomial(20, 15), binomial(19, 14) + binomial(19, 15));
assert_eq!(binomial(5, 3), FromPrimitive::from_uint(10).unwrap());
assert_eq!(binomial(31, 17), FromPrimitive::from_uint(265182525).unwrap());
assert_eq!(binomial(300, 30),
FromStr::from_str("173193226149263513034110205899732811401360").unwrap());
}
| Use bigint when computing binomial coefficients | Use bigint when computing binomial coefficients
| Rust | unlicense | ghotiphud/rust-rosetta,JIghtuse/rust-rosetta,pfalabella/rust-rosetta,magum/rust-rosetta,magum/rust-rosetta,Hoverbear/rust-rosetta,crespyl/rust-rosetta,ZoomRmc/rust-rosetta,crr0004/rust-rosetta,sakeven/rust-rosetta | rust | ## Code Before:
// http://rosettacode.org/wiki/Evaluate_binomial_coefficients
fn binomial(n: uint, mut k: uint) -> u64 {
// Since binomial(n, k) = binomial(n, n - k), we might as well use
// the smaller k to optimize
if n - k < k {
k = n - k;
}
// Compute the coefficient
let mut res = 1u64;
for i in range(1, k as u64 + 1) {
res *= (n - k) as u64 + i;
res /= i;
}
res
}
#[cfg(not(test))]
fn main() {
println!("{}", binomial(5, 3));
}
#[test]
fn test_binomial() {
assert_eq!(binomial(20, 0), binomial(20, 20));
assert_eq!(binomial(20, 15), binomial(19, 14) + binomial(19, 15));
assert_eq!(binomial(5, 3), 10);
assert_eq!(binomial(31, 17), 265182525);
}
## Instruction:
Use bigint when computing binomial coefficients
## Code After:
// http://rosettacode.org/wiki/Evaluate_binomial_coefficients
extern crate num;
extern crate core;
use num::bigint::BigUint;
use core::num::One;
fn binomial(n: uint, mut k: uint) -> BigUint {
// Since binomial(n, k) = binomial(n, n - k), we might as well use
// the smaller k to optimize
if n - k < k {
k = n - k;
}
// Compute the coefficient
let mut res: BigUint = One::one();
for i in range(1, k + 1) {
res = res * FromPrimitive::from_uint(n - k + i).unwrap();
res = res / FromPrimitive::from_uint(i).unwrap();
}
res
}
#[cfg(not(test))]
fn main() {
println!("{}", binomial(5, 3));
}
#[test]
fn test_binomial() {
use std::from_str::FromStr;
assert_eq!(binomial(20, 0), binomial(20, 20));
assert_eq!(binomial(20, 15), binomial(19, 14) + binomial(19, 15));
assert_eq!(binomial(5, 3), FromPrimitive::from_uint(10).unwrap());
assert_eq!(binomial(31, 17), FromPrimitive::from_uint(265182525).unwrap());
assert_eq!(binomial(300, 30),
FromStr::from_str("173193226149263513034110205899732811401360").unwrap());
}
| // http://rosettacode.org/wiki/Evaluate_binomial_coefficients
+ extern crate num;
+ extern crate core;
+ use num::bigint::BigUint;
+ use core::num::One;
+
- fn binomial(n: uint, mut k: uint) -> u64 {
? ^^^
+ fn binomial(n: uint, mut k: uint) -> BigUint {
? ^^^^^^^
// Since binomial(n, k) = binomial(n, n - k), we might as well use
// the smaller k to optimize
if n - k < k {
k = n - k;
}
// Compute the coefficient
- let mut res = 1u64;
+ let mut res: BigUint = One::one();
- for i in range(1, k as u64 + 1) {
? -------
+ for i in range(1, k + 1) {
- res *= (n - k) as u64 + i;
- res /= i;
+ res = res * FromPrimitive::from_uint(n - k + i).unwrap();
+ res = res / FromPrimitive::from_uint(i).unwrap();
}
res
}
#[cfg(not(test))]
fn main() {
println!("{}", binomial(5, 3));
}
#[test]
fn test_binomial() {
+ use std::from_str::FromStr;
+
assert_eq!(binomial(20, 0), binomial(20, 20));
assert_eq!(binomial(20, 15), binomial(19, 14) + binomial(19, 15));
+ assert_eq!(binomial(5, 3), FromPrimitive::from_uint(10).unwrap());
+ assert_eq!(binomial(31, 17), FromPrimitive::from_uint(265182525).unwrap());
- assert_eq!(binomial(5, 3), 10);
? ^ -----
+ assert_eq!(binomial(300, 30),
? ^^^ +
- assert_eq!(binomial(31, 17), 265182525);
+ FromStr::from_str("173193226149263513034110205899732811401360").unwrap());
}
| 23 | 0.71875 | 16 | 7 |
99c19ae47a54fea32b7ec4ad7fce8305b4f6a0a5 | suites/base/host_tracker.txt | suites/base/host_tracker.txt | *** Settings ***
Documentation Test suite for the host tracker bundle.
Library Collections
Library RequestsLibrary
Library ../../libraries/Common.py
Variables ../../variables/Variables.py
*** Variables ***
${REST_CONTEXT} /controller/nb/v2/hosttracker
*** Test Cases ***
| *** Settings ***
Documentation Test suite for the arp handler bundle.
Library Collections
Library RequestsLibrary
Library ../../libraries/Common.py
Library ../../libraries/HostTracker.py
Variables ../../variables/Variables.py
*** Variables ***
${name} 10.0.1.4
${key} hostConfig
*** Test Cases ***
Add and remove a host
[Documentation] Add and remove a host. After each operation, list to validate the result.
[Tags] add_remove_info
${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress
... 10.0.1.4 staticHost ${True} nodeConnectorType OF
Add Host ${name} ${body}
${result} Get Hosts
Dictionary Should Contain Key ${result} ${key}
${content} Get From Dictionary ${result} ${key}
List Should Contain Value ${content} ${body}
Remove Host ${name}
${result} Get Hosts
Dictionary Should Contain Key ${result} ${key}
${content} Get From Dictionary ${result} ${key}
List Should Not Contain Value ${content} ${body}
| Add test for the host tracker, to add and remove a host. | Add test for the host tracker, to add and remove a host.
| Text | epl-1.0 | yeasy/robot_tool | text | ## Code Before:
*** Settings ***
Documentation Test suite for the host tracker bundle.
Library Collections
Library RequestsLibrary
Library ../../libraries/Common.py
Variables ../../variables/Variables.py
*** Variables ***
${REST_CONTEXT} /controller/nb/v2/hosttracker
*** Test Cases ***
## Instruction:
Add test for the host tracker, to add and remove a host.
## Code After:
*** Settings ***
Documentation Test suite for the arp handler bundle.
Library Collections
Library RequestsLibrary
Library ../../libraries/Common.py
Library ../../libraries/HostTracker.py
Variables ../../variables/Variables.py
*** Variables ***
${name} 10.0.1.4
${key} hostConfig
*** Test Cases ***
Add and remove a host
[Documentation] Add and remove a host. After each operation, list to validate the result.
[Tags] add_remove_info
${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress
... 10.0.1.4 staticHost ${True} nodeConnectorType OF
Add Host ${name} ${body}
${result} Get Hosts
Dictionary Should Contain Key ${result} ${key}
${content} Get From Dictionary ${result} ${key}
List Should Contain Value ${content} ${body}
Remove Host ${name}
${result} Get Hosts
Dictionary Should Contain Key ${result} ${key}
${content} Get From Dictionary ${result} ${key}
List Should Not Contain Value ${content} ${body}
| *** Settings ***
- Documentation Test suite for the host tracker bundle.
? ------ ^^
+ Documentation Test suite for the arp handler bundle.
? ++++ ^^^
Library Collections
Library RequestsLibrary
Library ../../libraries/Common.py
+ Library ../../libraries/HostTracker.py
Variables ../../variables/Variables.py
*** Variables ***
- ${REST_CONTEXT} /controller/nb/v2/hosttracker
+ ${name} 10.0.1.4
+ ${key} hostConfig
*** Test Cases ***
+ Add and remove a host
+ [Documentation] Add and remove a host. After each operation, list to validate the result.
+ [Tags] add_remove_info
+ ${body} Create Dictionary nodeType OF dataLayerAddress 5e:bf:79:84:10:a6 vlan
+ ... 1 nodeId 00:00:00:00:00:00:00:03 nodeConnectorId 9 networkAddress
+ ... 10.0.1.4 staticHost ${True} nodeConnectorType OF
+ Add Host ${name} ${body}
+ ${result} Get Hosts
+ Dictionary Should Contain Key ${result} ${key}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Contain Value ${content} ${body}
+ Remove Host ${name}
+ ${result} Get Hosts
+ Dictionary Should Contain Key ${result} ${key}
+ ${content} Get From Dictionary ${result} ${key}
+ List Should Not Contain Value ${content} ${body} | 22 | 2 | 20 | 2 |
ad4b6663a2de08fddc0ebef8a08e1f405c0cb80a | pkgcmp/cli.py | pkgcmp/cli.py | '''
Parse CLI options
'''
# Import python libs
import os
import copy
import argparse
# Import pkgcmp libs
import pkgcmp.scan
# Import third party libs
import yaml
DEFAULTS = {'cachedir': '/var/cache/pkgcmp'}
def parse():
'''
Parse!!
'''
parser = argparse.ArgumentParser(description='The pkgcmp map generator')
parser.add_argument(
'--cachedir',
dest='cachedir',
default=None,
help='The location to store all the files while working')
parser.add_argument(
'--config',
dest='config',
default='/etc/pkgcmp/pkgcmp',
help='The location of the pkgcmp config file')
opts = parser.parse_args().__dict__
conf = config(opts['config'])
for key in opts:
if opts[key] is not None:
conf[key] = opts[key]
return conf
def config(cfn):
'''
Read in the config file
'''
ret = copy.copy(DEFAULTS)
if os.path.isfile(cfn):
with open(cfn, 'r') as cfp:
conf = yaml.safe_load(cfp)
if isinstance(conf, dict):
ret.update(conf)
return ret
class PkgCmp:
'''
Build and run the application
'''
def __init__(self):
self.opts = parse()
self.scan = pkgcmp.scan.Scanner(self.opts)
def run(self):
self.scan.run()
| '''
Parse CLI options
'''
# Import python libs
import os
import copy
import argparse
# Import pkgcmp libs
import pkgcmp.scan
# Import third party libs
import yaml
DEFAULTS = {'cachedir': '/var/cache/pkgcmp',
'extension_modules': ''}
def parse():
'''
Parse!!
'''
parser = argparse.ArgumentParser(description='The pkgcmp map generator')
parser.add_argument(
'--cachedir',
dest='cachedir',
default=None,
help='The location to store all the files while working')
parser.add_argument(
'--config',
dest='config',
default='/etc/pkgcmp/pkgcmp',
help='The location of the pkgcmp config file')
opts = parser.parse_args().__dict__
conf = config(opts['config'])
for key in opts:
if opts[key] is not None:
conf[key] = opts[key]
return conf
def config(cfn):
'''
Read in the config file
'''
ret = copy.copy(DEFAULTS)
if os.path.isfile(cfn):
with open(cfn, 'r') as cfp:
conf = yaml.safe_load(cfp)
if isinstance(conf, dict):
ret.update(conf)
return ret
class PkgCmp:
'''
Build and run the application
'''
def __init__(self):
self.opts = parse()
self.scan = pkgcmp.scan.Scanner(self.opts)
def run(self):
self.scan.run()
| Add extension_modueles to the default configuration | Add extension_modueles to the default configuration
| Python | apache-2.0 | SS-RD/pkgcmp | python | ## Code Before:
'''
Parse CLI options
'''
# Import python libs
import os
import copy
import argparse
# Import pkgcmp libs
import pkgcmp.scan
# Import third party libs
import yaml
DEFAULTS = {'cachedir': '/var/cache/pkgcmp'}
def parse():
'''
Parse!!
'''
parser = argparse.ArgumentParser(description='The pkgcmp map generator')
parser.add_argument(
'--cachedir',
dest='cachedir',
default=None,
help='The location to store all the files while working')
parser.add_argument(
'--config',
dest='config',
default='/etc/pkgcmp/pkgcmp',
help='The location of the pkgcmp config file')
opts = parser.parse_args().__dict__
conf = config(opts['config'])
for key in opts:
if opts[key] is not None:
conf[key] = opts[key]
return conf
def config(cfn):
'''
Read in the config file
'''
ret = copy.copy(DEFAULTS)
if os.path.isfile(cfn):
with open(cfn, 'r') as cfp:
conf = yaml.safe_load(cfp)
if isinstance(conf, dict):
ret.update(conf)
return ret
class PkgCmp:
'''
Build and run the application
'''
def __init__(self):
self.opts = parse()
self.scan = pkgcmp.scan.Scanner(self.opts)
def run(self):
self.scan.run()
## Instruction:
Add extension_modueles to the default configuration
## Code After:
'''
Parse CLI options
'''
# Import python libs
import os
import copy
import argparse
# Import pkgcmp libs
import pkgcmp.scan
# Import third party libs
import yaml
DEFAULTS = {'cachedir': '/var/cache/pkgcmp',
'extension_modules': ''}
def parse():
'''
Parse!!
'''
parser = argparse.ArgumentParser(description='The pkgcmp map generator')
parser.add_argument(
'--cachedir',
dest='cachedir',
default=None,
help='The location to store all the files while working')
parser.add_argument(
'--config',
dest='config',
default='/etc/pkgcmp/pkgcmp',
help='The location of the pkgcmp config file')
opts = parser.parse_args().__dict__
conf = config(opts['config'])
for key in opts:
if opts[key] is not None:
conf[key] = opts[key]
return conf
def config(cfn):
'''
Read in the config file
'''
ret = copy.copy(DEFAULTS)
if os.path.isfile(cfn):
with open(cfn, 'r') as cfp:
conf = yaml.safe_load(cfp)
if isinstance(conf, dict):
ret.update(conf)
return ret
class PkgCmp:
'''
Build and run the application
'''
def __init__(self):
self.opts = parse()
self.scan = pkgcmp.scan.Scanner(self.opts)
def run(self):
self.scan.run()
| '''
Parse CLI options
'''
# Import python libs
import os
import copy
import argparse
# Import pkgcmp libs
import pkgcmp.scan
# Import third party libs
import yaml
- DEFAULTS = {'cachedir': '/var/cache/pkgcmp'}
? ^
+ DEFAULTS = {'cachedir': '/var/cache/pkgcmp',
? ^
+ 'extension_modules': ''}
def parse():
'''
Parse!!
'''
parser = argparse.ArgumentParser(description='The pkgcmp map generator')
parser.add_argument(
'--cachedir',
dest='cachedir',
default=None,
help='The location to store all the files while working')
parser.add_argument(
'--config',
dest='config',
default='/etc/pkgcmp/pkgcmp',
help='The location of the pkgcmp config file')
opts = parser.parse_args().__dict__
conf = config(opts['config'])
for key in opts:
if opts[key] is not None:
conf[key] = opts[key]
return conf
def config(cfn):
'''
Read in the config file
'''
ret = copy.copy(DEFAULTS)
if os.path.isfile(cfn):
with open(cfn, 'r') as cfp:
conf = yaml.safe_load(cfp)
if isinstance(conf, dict):
ret.update(conf)
return ret
class PkgCmp:
'''
Build and run the application
'''
def __init__(self):
self.opts = parse()
self.scan = pkgcmp.scan.Scanner(self.opts)
def run(self):
self.scan.run() | 3 | 0.04918 | 2 | 1 |
fc5614c040cccff6411c87ad6cc191f7ec0b6971 | SoftLayer/CLI/account/bandwidth_pools.py | SoftLayer/CLI/account/bandwidth_pools.py | """Displays information about the accounts bandwidth pools"""
# :license: MIT, see LICENSE for more details.
import click
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
from SoftLayer.managers.account import AccountManager as AccountManager
from SoftLayer import utils
@click.command()
@environment.pass_env
def cli(env):
"""Displays bandwidth pool information
Similiar to https://cloud.ibm.com/classic/network/bandwidth/vdr
"""
manager = AccountManager(env.client)
items = manager.get_bandwidth_pools()
table = formatting.Table([
"Pool Name",
"Region",
"Servers",
"Allocation",
"Current Usage",
"Projected Usage"
], title="Bandwidth Pools")
table.align = 'l'
for item in items:
name = item.get('name')
region = utils.lookup(item, 'locationGroup', 'name')
servers = manager.get_bandwidth_pool_counts(identifier=item.get('id'))
allocation = "{} GB".format(item.get('totalBandwidthAllocated', 0))
current = "{} GB".format(utils.lookup(item, 'billingCyclePublicBandwidthUsage', 'amountOut'))
projected = "{} GB".format(item.get('projectedPublicBandwidthUsage', 0))
table.add_row([name, region, servers, allocation, current, projected])
env.fout(table)
| """Displays information about the accounts bandwidth pools"""
# :license: MIT, see LICENSE for more details.
import click
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
from SoftLayer.managers.account import AccountManager as AccountManager
from SoftLayer import utils
@click.command()
@environment.pass_env
def cli(env):
"""Displays bandwidth pool information
Similiar to https://cloud.ibm.com/classic/network/bandwidth/vdr
"""
manager = AccountManager(env.client)
items = manager.get_bandwidth_pools()
table = formatting.Table([
"Id",
"Pool Name",
"Region",
"Servers",
"Allocation",
"Current Usage",
"Projected Usage"
], title="Bandwidth Pools")
table.align = 'l'
for item in items:
id = item.get('id')
name = item.get('name')
region = utils.lookup(item, 'locationGroup', 'name')
servers = manager.get_bandwidth_pool_counts(identifier=item.get('id'))
allocation = "{} GB".format(item.get('totalBandwidthAllocated', 0))
current = "{} GB".format(utils.lookup(item, 'billingCyclePublicBandwidthUsage', 'amountOut'))
projected = "{} GB".format(item.get('projectedPublicBandwidthUsage', 0))
table.add_row([id, name, region, servers, allocation, current, projected])
env.fout(table)
| Add id in the result in the command bandwidth-pools | Add id in the result in the command bandwidth-pools
| Python | mit | softlayer/softlayer-python,allmightyspiff/softlayer-python | python | ## Code Before:
"""Displays information about the accounts bandwidth pools"""
# :license: MIT, see LICENSE for more details.
import click
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
from SoftLayer.managers.account import AccountManager as AccountManager
from SoftLayer import utils
@click.command()
@environment.pass_env
def cli(env):
"""Displays bandwidth pool information
Similiar to https://cloud.ibm.com/classic/network/bandwidth/vdr
"""
manager = AccountManager(env.client)
items = manager.get_bandwidth_pools()
table = formatting.Table([
"Pool Name",
"Region",
"Servers",
"Allocation",
"Current Usage",
"Projected Usage"
], title="Bandwidth Pools")
table.align = 'l'
for item in items:
name = item.get('name')
region = utils.lookup(item, 'locationGroup', 'name')
servers = manager.get_bandwidth_pool_counts(identifier=item.get('id'))
allocation = "{} GB".format(item.get('totalBandwidthAllocated', 0))
current = "{} GB".format(utils.lookup(item, 'billingCyclePublicBandwidthUsage', 'amountOut'))
projected = "{} GB".format(item.get('projectedPublicBandwidthUsage', 0))
table.add_row([name, region, servers, allocation, current, projected])
env.fout(table)
## Instruction:
Add id in the result in the command bandwidth-pools
## Code After:
"""Displays information about the accounts bandwidth pools"""
# :license: MIT, see LICENSE for more details.
import click
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
from SoftLayer.managers.account import AccountManager as AccountManager
from SoftLayer import utils
@click.command()
@environment.pass_env
def cli(env):
"""Displays bandwidth pool information
Similiar to https://cloud.ibm.com/classic/network/bandwidth/vdr
"""
manager = AccountManager(env.client)
items = manager.get_bandwidth_pools()
table = formatting.Table([
"Id",
"Pool Name",
"Region",
"Servers",
"Allocation",
"Current Usage",
"Projected Usage"
], title="Bandwidth Pools")
table.align = 'l'
for item in items:
id = item.get('id')
name = item.get('name')
region = utils.lookup(item, 'locationGroup', 'name')
servers = manager.get_bandwidth_pool_counts(identifier=item.get('id'))
allocation = "{} GB".format(item.get('totalBandwidthAllocated', 0))
current = "{} GB".format(utils.lookup(item, 'billingCyclePublicBandwidthUsage', 'amountOut'))
projected = "{} GB".format(item.get('projectedPublicBandwidthUsage', 0))
table.add_row([id, name, region, servers, allocation, current, projected])
env.fout(table)
| """Displays information about the accounts bandwidth pools"""
# :license: MIT, see LICENSE for more details.
import click
from SoftLayer.CLI import environment
from SoftLayer.CLI import formatting
from SoftLayer.managers.account import AccountManager as AccountManager
from SoftLayer import utils
@click.command()
@environment.pass_env
def cli(env):
"""Displays bandwidth pool information
Similiar to https://cloud.ibm.com/classic/network/bandwidth/vdr
"""
manager = AccountManager(env.client)
items = manager.get_bandwidth_pools()
table = formatting.Table([
+ "Id",
"Pool Name",
"Region",
"Servers",
"Allocation",
"Current Usage",
"Projected Usage"
], title="Bandwidth Pools")
table.align = 'l'
-
for item in items:
+ id = item.get('id')
name = item.get('name')
region = utils.lookup(item, 'locationGroup', 'name')
servers = manager.get_bandwidth_pool_counts(identifier=item.get('id'))
allocation = "{} GB".format(item.get('totalBandwidthAllocated', 0))
current = "{} GB".format(utils.lookup(item, 'billingCyclePublicBandwidthUsage', 'amountOut'))
projected = "{} GB".format(item.get('projectedPublicBandwidthUsage', 0))
- table.add_row([name, region, servers, allocation, current, projected])
+ table.add_row([id, name, region, servers, allocation, current, projected])
? ++++
env.fout(table) | 5 | 0.121951 | 3 | 2 |
1f7eaea858cdc1c000621b6e11b6e4cbbf0c34c8 | src/hamiltonian_data.f90 | src/hamiltonian_data.f90 | module hamiltonian_data
! Small module to contain hamiltonian-related derived types to avoid cyclic
! dependencies until a better place for them is found.
use const, only: p
implicit none
type hmatel_t
! Derived type to contain all information on a particular hmatel, to
! allow compatibility between real and complex interfaces.
! Value for real hamiltonian elements.
real(p) :: r
! Value for complex hamiltonian elements.
complex(p) :: c
end type hmatel_t
end module hamiltonian_data
| module hamiltonian_data
! Small module to contain hamiltonian-related derived types to avoid cyclic
! dependencies until a better place for them is found.
use const, only: p
implicit none
! --- WARNING ---
! Only one component of hamil_t is in use at a time, depending upon the context.
! The other component is NOT initialised and so cannot be relied on to be zero.
! --- WARNING ---
type hmatel_t
! Derived type to contain all information on a particular hmatel, to
! allow compatibility between real and complex interfaces.
! Value for real hamiltonian elements.
real(p) :: r
! Value for complex hamiltonian elements.
complex(p) :: c
end type hmatel_t
end module hamiltonian_data
| Add warning about initialisation (or, rather, not) of hmatel_t. | Add warning about initialisation (or, rather, not) of hmatel_t.
| FORTRAN | lgpl-2.1 | hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,hande-qmc/hande,ruthfranklin/hande,hande-qmc/hande | fortran | ## Code Before:
module hamiltonian_data
! Small module to contain hamiltonian-related derived types to avoid cyclic
! dependencies until a better place for them is found.
use const, only: p
implicit none
type hmatel_t
! Derived type to contain all information on a particular hmatel, to
! allow compatibility between real and complex interfaces.
! Value for real hamiltonian elements.
real(p) :: r
! Value for complex hamiltonian elements.
complex(p) :: c
end type hmatel_t
end module hamiltonian_data
## Instruction:
Add warning about initialisation (or, rather, not) of hmatel_t.
## Code After:
module hamiltonian_data
! Small module to contain hamiltonian-related derived types to avoid cyclic
! dependencies until a better place for them is found.
use const, only: p
implicit none
! --- WARNING ---
! Only one component of hamil_t is in use at a time, depending upon the context.
! The other component is NOT initialised and so cannot be relied on to be zero.
! --- WARNING ---
type hmatel_t
! Derived type to contain all information on a particular hmatel, to
! allow compatibility between real and complex interfaces.
! Value for real hamiltonian elements.
real(p) :: r
! Value for complex hamiltonian elements.
complex(p) :: c
end type hmatel_t
end module hamiltonian_data
| module hamiltonian_data
! Small module to contain hamiltonian-related derived types to avoid cyclic
! dependencies until a better place for them is found.
use const, only: p
implicit none
+
+ ! --- WARNING ---
+ ! Only one component of hamil_t is in use at a time, depending upon the context.
+ ! The other component is NOT initialised and so cannot be relied on to be zero.
+ ! --- WARNING ---
type hmatel_t
! Derived type to contain all information on a particular hmatel, to
! allow compatibility between real and complex interfaces.
! Value for real hamiltonian elements.
real(p) :: r
! Value for complex hamiltonian elements.
complex(p) :: c
end type hmatel_t
end module hamiltonian_data | 5 | 0.238095 | 5 | 0 |
a23b49751e696777ab69bec86e1fed4aaa650d0d | metadata/com.cosmos.candle.yml | metadata/com.cosmos.candle.yml | AntiFeatures:
- NonFreeNet
Categories:
- Internet
- Money
License: GPL-3.0-only
AuthorName: CosmosApps
AuthorEmail: cosmos.dev@protonmail.com
SourceCode: https://gitlab.com/cosmosapps/candle
IssueTracker: https://gitlab.com/cosmosapps/candle/issues
Changelog: https://gitlab.com/cosmosapps/candle/-/blob/master/CHANGELOG.md
AutoName: Candle
RepoType: git
Repo: https://gitlab.com/cosmosapps/candle.git
Builds:
- versionName: 0.1.3
versionCode: 4
commit: 0.1.3
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
- versionName: 0.1.4
versionCode: 5
commit: f4ac190dee56d2880096e5102de4804a905ee5dc
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: 0.1.4
CurrentVersionCode: 5
| AntiFeatures:
- NonFreeNet
Categories:
- Internet
- Money
License: GPL-3.0-only
AuthorName: CosmosApps
AuthorEmail: cosmos.dev@protonmail.com
SourceCode: https://gitlab.com/cosmosapps/candle
IssueTracker: https://gitlab.com/cosmosapps/candle/issues
Changelog: https://gitlab.com/cosmosapps/candle/-/blob/master/CHANGELOG.md
AutoName: Candle
RepoType: git
Repo: https://gitlab.com/cosmosapps/candle.git
Builds:
- versionName: 0.1.3
versionCode: 4
commit: 0.1.3
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
- versionName: 0.1.4
versionCode: 5
commit: f4ac190dee56d2880096e5102de4804a905ee5dc
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
- versionName: 0.1.5
versionCode: 6
commit: 31e9d5abeb5b32496a78c1936a496041dfa8703c
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: 0.1.5
CurrentVersionCode: 6
| Update Candle to 0.1.5 (6) | Update Candle to 0.1.5 (6)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
AntiFeatures:
- NonFreeNet
Categories:
- Internet
- Money
License: GPL-3.0-only
AuthorName: CosmosApps
AuthorEmail: cosmos.dev@protonmail.com
SourceCode: https://gitlab.com/cosmosapps/candle
IssueTracker: https://gitlab.com/cosmosapps/candle/issues
Changelog: https://gitlab.com/cosmosapps/candle/-/blob/master/CHANGELOG.md
AutoName: Candle
RepoType: git
Repo: https://gitlab.com/cosmosapps/candle.git
Builds:
- versionName: 0.1.3
versionCode: 4
commit: 0.1.3
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
- versionName: 0.1.4
versionCode: 5
commit: f4ac190dee56d2880096e5102de4804a905ee5dc
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: 0.1.4
CurrentVersionCode: 5
## Instruction:
Update Candle to 0.1.5 (6)
## Code After:
AntiFeatures:
- NonFreeNet
Categories:
- Internet
- Money
License: GPL-3.0-only
AuthorName: CosmosApps
AuthorEmail: cosmos.dev@protonmail.com
SourceCode: https://gitlab.com/cosmosapps/candle
IssueTracker: https://gitlab.com/cosmosapps/candle/issues
Changelog: https://gitlab.com/cosmosapps/candle/-/blob/master/CHANGELOG.md
AutoName: Candle
RepoType: git
Repo: https://gitlab.com/cosmosapps/candle.git
Builds:
- versionName: 0.1.3
versionCode: 4
commit: 0.1.3
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
- versionName: 0.1.4
versionCode: 5
commit: f4ac190dee56d2880096e5102de4804a905ee5dc
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
- versionName: 0.1.5
versionCode: 6
commit: 31e9d5abeb5b32496a78c1936a496041dfa8703c
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
CurrentVersion: 0.1.5
CurrentVersionCode: 6
| AntiFeatures:
- NonFreeNet
Categories:
- Internet
- Money
License: GPL-3.0-only
AuthorName: CosmosApps
AuthorEmail: cosmos.dev@protonmail.com
SourceCode: https://gitlab.com/cosmosapps/candle
IssueTracker: https://gitlab.com/cosmosapps/candle/issues
Changelog: https://gitlab.com/cosmosapps/candle/-/blob/master/CHANGELOG.md
AutoName: Candle
RepoType: git
Repo: https://gitlab.com/cosmosapps/candle.git
Builds:
- versionName: 0.1.3
versionCode: 4
commit: 0.1.3
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
- versionName: 0.1.4
versionCode: 5
commit: f4ac190dee56d2880096e5102de4804a905ee5dc
subdir: app
gradle:
- yes
prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
+ - versionName: 0.1.5
+ versionCode: 6
+ commit: 31e9d5abeb5b32496a78c1936a496041dfa8703c
+ subdir: app
+ gradle:
+ - yes
+ prebuild: sed -i -e '/keystorePropertiesFile/d' build.gradle
+
AutoUpdateMode: Version %v
UpdateCheckMode: Tags
- CurrentVersion: 0.1.4
? ^
+ CurrentVersion: 0.1.5
? ^
- CurrentVersionCode: 5
? ^
+ CurrentVersionCode: 6
? ^
| 12 | 0.315789 | 10 | 2 |
66523147c9afa3f4629082e96f391463660f94f2 | .github/ISSUE_TEMPLATE/1-leak.md | .github/ISSUE_TEMPLATE/1-leak.md | ---
name: "\U0001F424Leak in your app"
about: Use Stack Overflow instead
title: "\U0001F649 [This issue will be immediately closed]"
labels: 'Close immediately'
assignees: ''
---
🛑 𝙎𝙏𝙊𝙋
This issue tracker is not for help with memory leaks detected by LeakCanary in your own app.
To fix a leak:
* First, learn the fundamentals: https://github.com/square/leakcanary#fundamentals
* Then, create a Stack Overflow question: http://stackoverflow.com/questions/tagged/leakcanary
| ---
name: "\U0001F424Leak in your app"
about: Use Stack Overflow instead
title: "\U0001F649 [This issue will be immediately closed]"
labels: 'Close immediately'
assignees: ''
---
🛑 𝙎𝙏𝙊𝙋
This issue tracker is not for help with memory leaks detected by LeakCanary in your own app.
To fix a leak:
* First, learn the fundamentals: https://square.github.io/leakcanary/fundamentals/
* Then, create a Stack Overflow question: https://stackoverflow.com/questions/tagged/leakcanary
| Fix links in app leak issue template | Fix links in app leak issue template
| Markdown | apache-2.0 | square/leakcanary,square/leakcanary,square/leakcanary | markdown | ## Code Before:
---
name: "\U0001F424Leak in your app"
about: Use Stack Overflow instead
title: "\U0001F649 [This issue will be immediately closed]"
labels: 'Close immediately'
assignees: ''
---
🛑 𝙎𝙏𝙊𝙋
This issue tracker is not for help with memory leaks detected by LeakCanary in your own app.
To fix a leak:
* First, learn the fundamentals: https://github.com/square/leakcanary#fundamentals
* Then, create a Stack Overflow question: http://stackoverflow.com/questions/tagged/leakcanary
## Instruction:
Fix links in app leak issue template
## Code After:
---
name: "\U0001F424Leak in your app"
about: Use Stack Overflow instead
title: "\U0001F649 [This issue will be immediately closed]"
labels: 'Close immediately'
assignees: ''
---
🛑 𝙎𝙏𝙊𝙋
This issue tracker is not for help with memory leaks detected by LeakCanary in your own app.
To fix a leak:
* First, learn the fundamentals: https://square.github.io/leakcanary/fundamentals/
* Then, create a Stack Overflow question: https://stackoverflow.com/questions/tagged/leakcanary
| ---
name: "\U0001F424Leak in your app"
about: Use Stack Overflow instead
title: "\U0001F649 [This issue will be immediately closed]"
labels: 'Close immediately'
assignees: ''
---
🛑 𝙎𝙏𝙊𝙋
This issue tracker is not for help with memory leaks detected by LeakCanary in your own app.
To fix a leak:
- * First, learn the fundamentals: https://github.com/square/leakcanary#fundamentals
? ^ -------- ^
+ * First, learn the fundamentals: https://square.github.io/leakcanary/fundamentals/
? +++++++ ^ ^ +
- * Then, create a Stack Overflow question: http://stackoverflow.com/questions/tagged/leakcanary
+ * Then, create a Stack Overflow question: https://stackoverflow.com/questions/tagged/leakcanary
? +
| 4 | 0.235294 | 2 | 2 |
0fada0412ee5d2dc7c5ac95a8bdd10d524c3266c | lib/tasks/fix_unique_legends.rake | lib/tasks/fix_unique_legends.rake | namespace :cartodb do
desc "fixes duplicated unique legends"
task fix_unique_legends: :environment do
query = 'SELECT layer_id, count(*) from legends group by layer_id having count(*) > 1'
ActiveRecord::Base.connection.execute(query).each do |row|
legends = Carto::Layer.find(row['layer_id']).legends
legends.sort_by(&:updated_at).slice(1..legends.count).each(&:destroy)
end
end
end
| namespace :cartodb do
desc "fixes duplicated unique legends"
task fix_unique_legends: :environment do
query = 'SELECT layer_id, count(*) from legends group by layer_id having count(*) > 1'
ActiveRecord::Base.connection.execute(query).each do |row|
legends = Carto::Layer.find(row['layer_id']).legends
legend_types = Carto::Legend::LEGEND_TYPES_PER_ATTRIBUTE.keys
legends_per_type = legend_types.reduce({}) { |m, o| m.merge(o => []) }
legend_per_type = legends.reduce(legends_per_type) do |m, legend|
legend_types.reduce(m) { |m, t|
m[t] << legend if Carto::Legend::LEGEND_TYPES_PER_ATTRIBUTE[t].include?(legend.type)
m
}
end
legend_per_type.each { |_, l| l.sort_by(&:updated_at).slice(1..l.count).each(&:destroy) if l.size > 1 }
end
end
end
| Fix rake so it only deletes legends of the same type | Fix rake so it only deletes legends of the same type
| Ruby | bsd-3-clause | CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb,CartoDB/cartodb | ruby | ## Code Before:
namespace :cartodb do
desc "fixes duplicated unique legends"
task fix_unique_legends: :environment do
query = 'SELECT layer_id, count(*) from legends group by layer_id having count(*) > 1'
ActiveRecord::Base.connection.execute(query).each do |row|
legends = Carto::Layer.find(row['layer_id']).legends
legends.sort_by(&:updated_at).slice(1..legends.count).each(&:destroy)
end
end
end
## Instruction:
Fix rake so it only deletes legends of the same type
## Code After:
namespace :cartodb do
desc "fixes duplicated unique legends"
task fix_unique_legends: :environment do
query = 'SELECT layer_id, count(*) from legends group by layer_id having count(*) > 1'
ActiveRecord::Base.connection.execute(query).each do |row|
legends = Carto::Layer.find(row['layer_id']).legends
legend_types = Carto::Legend::LEGEND_TYPES_PER_ATTRIBUTE.keys
legends_per_type = legend_types.reduce({}) { |m, o| m.merge(o => []) }
legend_per_type = legends.reduce(legends_per_type) do |m, legend|
legend_types.reduce(m) { |m, t|
m[t] << legend if Carto::Legend::LEGEND_TYPES_PER_ATTRIBUTE[t].include?(legend.type)
m
}
end
legend_per_type.each { |_, l| l.sort_by(&:updated_at).slice(1..l.count).each(&:destroy) if l.size > 1 }
end
end
end
| namespace :cartodb do
desc "fixes duplicated unique legends"
task fix_unique_legends: :environment do
query = 'SELECT layer_id, count(*) from legends group by layer_id having count(*) > 1'
ActiveRecord::Base.connection.execute(query).each do |row|
legends = Carto::Layer.find(row['layer_id']).legends
- legends.sort_by(&:updated_at).slice(1..legends.count).each(&:destroy)
+ legend_types = Carto::Legend::LEGEND_TYPES_PER_ATTRIBUTE.keys
+ legends_per_type = legend_types.reduce({}) { |m, o| m.merge(o => []) }
+ legend_per_type = legends.reduce(legends_per_type) do |m, legend|
+ legend_types.reduce(m) { |m, t|
+ m[t] << legend if Carto::Legend::LEGEND_TYPES_PER_ATTRIBUTE[t].include?(legend.type)
+ m
+ }
+ end
+ legend_per_type.each { |_, l| l.sort_by(&:updated_at).slice(1..l.count).each(&:destroy) if l.size > 1 }
end
end
end | 10 | 1 | 9 | 1 |
8fe41cce33b227d001107a63dec675a61dfbd5cd | i18n/string.go | i18n/string.go | package i18n
// TranslatableString is the interface implemented
// by strings that can be translated.
type TranslatableString interface {
TranslatedString(lang Languager) string
}
// String is an alias for string, but variables
// or constants declared with the type String will
// be extracted for translation.
type String string
// String returns the String as a plain string.
func (s String) String() string {
return string(s)
}
// TranslatedString returns the string translated into
// the language returned by lang.
func (s String) TranslatedString(lang Languager) string {
return T(string(s), lang)
}
| package i18n
import (
"gnd.la/util/textutil"
)
// TranslatableString is the interface implemented
// by strings that can be translated.
type TranslatableString interface {
TranslatedString(lang Languager) string
}
// String is an alias for string, but variables
// or constants declared with the type String will
// be extracted for translation.
type String string
// String returns the String as a plain string.
func (s String) String() string {
return string(s)
}
// TranslatedString returns the string translated into
// the language returned by lang.
func (s String) TranslatedString(lang Languager) string {
if string(s) == "" {
return ""
}
fields, _ := textutil.SplitFields(string(s), "|")
if len(fields) > 1 {
return Tc(fields[0], fields[1], lang)
}
if len(fields) > 0 {
return T(fields[0], lang)
}
return T(string(s), lang)
}
| Add support for i18n.String with multiple fields | Add support for i18n.String with multiple fields
1 field => singular
2 fields => context|singular
3 fields => context|singular|plural
| Go | mpl-2.0 | rainycape/gondola,rainycape/gondola,rainycape/gondola,rainycape/gondola | go | ## Code Before:
package i18n
// TranslatableString is the interface implemented
// by strings that can be translated.
type TranslatableString interface {
TranslatedString(lang Languager) string
}
// String is an alias for string, but variables
// or constants declared with the type String will
// be extracted for translation.
type String string
// String returns the String as a plain string.
func (s String) String() string {
return string(s)
}
// TranslatedString returns the string translated into
// the language returned by lang.
func (s String) TranslatedString(lang Languager) string {
return T(string(s), lang)
}
## Instruction:
Add support for i18n.String with multiple fields
1 field => singular
2 fields => context|singular
3 fields => context|singular|plural
## Code After:
package i18n
import (
"gnd.la/util/textutil"
)
// TranslatableString is the interface implemented
// by strings that can be translated.
type TranslatableString interface {
TranslatedString(lang Languager) string
}
// String is an alias for string, but variables
// or constants declared with the type String will
// be extracted for translation.
type String string
// String returns the String as a plain string.
func (s String) String() string {
return string(s)
}
// TranslatedString returns the string translated into
// the language returned by lang.
func (s String) TranslatedString(lang Languager) string {
if string(s) == "" {
return ""
}
fields, _ := textutil.SplitFields(string(s), "|")
if len(fields) > 1 {
return Tc(fields[0], fields[1], lang)
}
if len(fields) > 0 {
return T(fields[0], lang)
}
return T(string(s), lang)
}
| package i18n
+
+ import (
+ "gnd.la/util/textutil"
+ )
// TranslatableString is the interface implemented
// by strings that can be translated.
type TranslatableString interface {
TranslatedString(lang Languager) string
}
// String is an alias for string, but variables
// or constants declared with the type String will
// be extracted for translation.
type String string
// String returns the String as a plain string.
func (s String) String() string {
return string(s)
}
// TranslatedString returns the string translated into
// the language returned by lang.
func (s String) TranslatedString(lang Languager) string {
+ if string(s) == "" {
+ return ""
+ }
+ fields, _ := textutil.SplitFields(string(s), "|")
+ if len(fields) > 1 {
+ return Tc(fields[0], fields[1], lang)
+ }
+ if len(fields) > 0 {
+ return T(fields[0], lang)
+ }
return T(string(s), lang)
} | 14 | 0.608696 | 14 | 0 |
8ad5f9c0385115aba0d48882422906c1145a62a0 | README.md | README.md |
Evolutionary Algorithm(s) in Erlang
## How to add in new problems to solve
Genetica has a framework which allows one to create new modules and let them be
used in the main framework. This is done by following a "protocol", which
requires following functions to be available: `parse_args`, a function taking
the arguments given to this module and converts it into "proper" arguments.
`random_genotype_fn` takes parsed argument as input and returns a function
generating random genotypes. `phenotype_to_genotype_fn` and
`genotype_to_phenotype_fn` converts a phenotype to a genotype. If the conversion
from genotype to phenotype is not inversible, a common solution would be to let
the phenotype contain the genotype itself. `fitness_fn` returns a function which
evaluates the fitness of a phenotype, compared to the other phenotypes in the
population. `crossover_fn` returns a function which crosses two parent genotypes
and returns two children. `mutation_fn` returns a mutated genotype.
## License
Copyright © 2013 Jean Niklas L'orange
Distributed under the Eclipse Public License, the same as Clojure.
|
Evolutionary Algorithm(s) in Erlang
## How to add in new problems to solve
Genetica has a framework which allows one to create new modules and let them be
used in the main framework. This is done by following a protocol, which requires
following functions to be available: `parse_args`, a function taking the
arguments given to this module and converts it into "proper" arguments.
`random_genotype_fn` takes parsed argument as input and returns a function
generating random genotypes. `genotype_to_phenotype_fn` takes parsed arguments
as input and returns a function which converts a genotype to a phenotype (A
process). `mutation_fn` takes the input arguments as input and returns a mutated
genotype. `analyze_fn` takes the input arguments as input, and returns a
function which takes a list of phenotypes coupled with their fitness, and
returns a list of numbers which may later be processed.
## Phenotypes as processes
`Phenotype ! {Pid, {gtype}}`
Sends a message to `Pid` on the form `{Phenotype, gtype, Genotype}`, where
`Genotype` is the genotype of the Phenotype.
`Phenotype ! {Pid, {fitness, PopulationPids}}`
Sends a message to `Pid` on the form `{Phenotype, fitness, Fitness}`, where
`Fitness` is the fitness of the Phenotype.
`Phenotype ! {Pid, {crossover, OtherPhenotype}}`
Performs a crossover of `Phenotype` and `OtherPhenotype`, and sends the genotype
of the crossover as a message on the form `{Phenotype, crossover, Genotype}` to
`Pid`.
`Phenotype ! {Pid, {shutdown}}`
Sends the message `{Phenotype, shutdown}` to `Pid` and shutdowns.
## License
Copyright © 2013 Jean Niklas L'orange
Distributed under the Eclipse Public License, the same as Clojure.
| Add process protocol in readme. | Add process protocol in readme.
| Markdown | epl-1.0 | hyPiRion/genetica,hyPiRion/genetica | markdown | ## Code Before:
Evolutionary Algorithm(s) in Erlang
## How to add in new problems to solve
Genetica has a framework which allows one to create new modules and let them be
used in the main framework. This is done by following a "protocol", which
requires following functions to be available: `parse_args`, a function taking
the arguments given to this module and converts it into "proper" arguments.
`random_genotype_fn` takes parsed argument as input and returns a function
generating random genotypes. `phenotype_to_genotype_fn` and
`genotype_to_phenotype_fn` converts a phenotype to a genotype. If the conversion
from genotype to phenotype is not inversible, a common solution would be to let
the phenotype contain the genotype itself. `fitness_fn` returns a function which
evaluates the fitness of a phenotype, compared to the other phenotypes in the
population. `crossover_fn` returns a function which crosses two parent genotypes
and returns two children. `mutation_fn` returns a mutated genotype.
## License
Copyright © 2013 Jean Niklas L'orange
Distributed under the Eclipse Public License, the same as Clojure.
## Instruction:
Add process protocol in readme.
## Code After:
Evolutionary Algorithm(s) in Erlang
## How to add in new problems to solve
Genetica has a framework which allows one to create new modules and let them be
used in the main framework. This is done by following a protocol, which requires
following functions to be available: `parse_args`, a function taking the
arguments given to this module and converts it into "proper" arguments.
`random_genotype_fn` takes parsed argument as input and returns a function
generating random genotypes. `genotype_to_phenotype_fn` takes parsed arguments
as input and returns a function which converts a genotype to a phenotype (A
process). `mutation_fn` takes the input arguments as input and returns a mutated
genotype. `analyze_fn` takes the input arguments as input, and returns a
function which takes a list of phenotypes coupled with their fitness, and
returns a list of numbers which may later be processed.
## Phenotypes as processes
`Phenotype ! {Pid, {gtype}}`
Sends a message to `Pid` on the form `{Phenotype, gtype, Genotype}`, where
`Genotype` is the genotype of the Phenotype.
`Phenotype ! {Pid, {fitness, PopulationPids}}`
Sends a message to `Pid` on the form `{Phenotype, fitness, Fitness}`, where
`Fitness` is the fitness of the Phenotype.
`Phenotype ! {Pid, {crossover, OtherPhenotype}}`
Performs a crossover of `Phenotype` and `OtherPhenotype`, and sends the genotype
of the crossover as a message on the form `{Phenotype, crossover, Genotype}` to
`Pid`.
`Phenotype ! {Pid, {shutdown}}`
Sends the message `{Phenotype, shutdown}` to `Pid` and shutdowns.
## License
Copyright © 2013 Jean Niklas L'orange
Distributed under the Eclipse Public License, the same as Clojure.
|
Evolutionary Algorithm(s) in Erlang
## How to add in new problems to solve
Genetica has a framework which allows one to create new modules and let them be
- used in the main framework. This is done by following a "protocol", which
? - -
+ used in the main framework. This is done by following a protocol, which requires
? +++++++++
- requires following functions to be available: `parse_args`, a function taking
? ---------
+ following functions to be available: `parse_args`, a function taking the
? ++++
- the arguments given to this module and converts it into "proper" arguments.
? ----
+ arguments given to this module and converts it into "proper" arguments.
`random_genotype_fn` takes parsed argument as input and returns a function
- generating random genotypes. `phenotype_to_genotype_fn` and
? ^^ ^ ^
+ generating random genotypes. `genotype_to_phenotype_fn` takes parsed arguments
? ^ ^^ + +++++++++++++++++ ^^
- `genotype_to_phenotype_fn` converts a phenotype to a genotype. If the conversion
- from genotype to phenotype is not inversible, a common solution would be to let
- the phenotype contain the genotype itself. `fitness_fn` returns a function which
- evaluates the fitness of a phenotype, compared to the other phenotypes in the
- population. `crossover_fn` returns a function which crosses two parent genotypes
- and returns two children. `mutation_fn` returns a mutated genotype.
+ as input and returns a function which converts a genotype to a phenotype (A
+ process). `mutation_fn` takes the input arguments as input and returns a mutated
+ genotype. `analyze_fn` takes the input arguments as input, and returns a
+ function which takes a list of phenotypes coupled with their fitness, and
+ returns a list of numbers which may later be processed.
+
+ ## Phenotypes as processes
+
+ `Phenotype ! {Pid, {gtype}}`
+
+ Sends a message to `Pid` on the form `{Phenotype, gtype, Genotype}`, where
+ `Genotype` is the genotype of the Phenotype.
+
+ `Phenotype ! {Pid, {fitness, PopulationPids}}`
+
+ Sends a message to `Pid` on the form `{Phenotype, fitness, Fitness}`, where
+ `Fitness` is the fitness of the Phenotype.
+
+ `Phenotype ! {Pid, {crossover, OtherPhenotype}}`
+
+ Performs a crossover of `Phenotype` and `OtherPhenotype`, and sends the genotype
+ of the crossover as a message on the form `{Phenotype, crossover, Genotype}` to
+ `Pid`.
+
+ `Phenotype ! {Pid, {shutdown}}`
+
+ Sends the message `{Phenotype, shutdown}` to `Pid` and shutdowns.
## License
Copyright © 2013 Jean Niklas L'orange
Distributed under the Eclipse Public License, the same as Clojure. | 41 | 1.863636 | 31 | 10 |
e881235cacd6c911660cd7a678104892de765392 | jobs/build.groovy | jobs/build.groovy | job('r-baseball') {
scm {
git('git://github.com/bryantrobbins/r-baseball') { node ->
node / gitConfigName('Baseball Jenkins Auto')
node / gitConfigEmail('bryantrobbins@gmail.com')
}
}
steps {
shell('chmod 700 *.sh; ./build.sh')
}
}
job('worker-image') {
steps {
shell('pushd worker; chmod 700 *.sh; ./import.sh')
}
}
job('puppet-update') {
steps {
shell('')
}
}
| job('r-baseball') {
scm {
git('git://github.com/bryantrobbins/r-baseball') { node ->
node / gitConfigName('Baseball Jenkins Auto')
node / gitConfigEmail('bryantrobbins@gmail.com')
}
}
steps {
shell('chmod 700 *.sh; ./build.sh')
}
}
job('worker-image') {
scm {
git('git://github.com/bryantrobbins/baseball') { node ->
node / gitConfigName('Baseball Jenkins Auto')
node / gitConfigEmail('bryantrobbins@gmail.com')
}
}
steps {
shell('pushd worker; chmod 700 *.sh; ./import.sh')
}
}
job('puppet-update') {
steps {
shell('')
}
}
| Add git checkout to worker-image job | Add git checkout to worker-image job
| Groovy | apache-2.0 | bryantrobbins/baseball,bryantrobbins/baseball,bryantrobbins/baseball,bryantrobbins/baseball,bryantrobbins/baseball | groovy | ## Code Before:
job('r-baseball') {
scm {
git('git://github.com/bryantrobbins/r-baseball') { node ->
node / gitConfigName('Baseball Jenkins Auto')
node / gitConfigEmail('bryantrobbins@gmail.com')
}
}
steps {
shell('chmod 700 *.sh; ./build.sh')
}
}
job('worker-image') {
steps {
shell('pushd worker; chmod 700 *.sh; ./import.sh')
}
}
job('puppet-update') {
steps {
shell('')
}
}
## Instruction:
Add git checkout to worker-image job
## Code After:
job('r-baseball') {
scm {
git('git://github.com/bryantrobbins/r-baseball') { node ->
node / gitConfigName('Baseball Jenkins Auto')
node / gitConfigEmail('bryantrobbins@gmail.com')
}
}
steps {
shell('chmod 700 *.sh; ./build.sh')
}
}
job('worker-image') {
scm {
git('git://github.com/bryantrobbins/baseball') { node ->
node / gitConfigName('Baseball Jenkins Auto')
node / gitConfigEmail('bryantrobbins@gmail.com')
}
}
steps {
shell('pushd worker; chmod 700 *.sh; ./import.sh')
}
}
job('puppet-update') {
steps {
shell('')
}
}
| job('r-baseball') {
scm {
git('git://github.com/bryantrobbins/r-baseball') { node ->
node / gitConfigName('Baseball Jenkins Auto')
node / gitConfigEmail('bryantrobbins@gmail.com')
}
}
steps {
shell('chmod 700 *.sh; ./build.sh')
}
}
job('worker-image') {
+ scm {
+ git('git://github.com/bryantrobbins/baseball') { node ->
+ node / gitConfigName('Baseball Jenkins Auto')
+ node / gitConfigEmail('bryantrobbins@gmail.com')
+ }
+ }
steps {
shell('pushd worker; chmod 700 *.sh; ./import.sh')
}
}
job('puppet-update') {
steps {
shell('')
}
} | 6 | 0.26087 | 6 | 0 |
19063f32fc607af2955fd80cca74227f8e01bf0e | jenkins/ci.suse.de/templates/cloud-mkcloud-job-upgrade-disruptive-template.yaml | jenkins/ci.suse.de/templates/cloud-mkcloud-job-upgrade-disruptive-template.yaml | - job-template:
name: 'cloud-mkcloud{version}-job-upgrade-disruptive-{arch}'
node: cloud-trigger
disabled: '{obj:disabled}'
triggers:
- timed: '32 22 * * *'
logrotate:
numToKeep: -1
daysToKeep: 7
builders:
- trigger-builds:
- project: openstack-mkcloud
condition: SUCCESS
block: true
current-parameters: true
predefined-parameters: |
TESTHEAD=1
cloudsource=develcloud{previous_version}
upgrade_cloudsource=develcloud{version}
nodenumber=3
storage_method=swift
mkcloudtarget=plain_with_upgrade testsetup
want_nodesupgrade=1
label={label}
job_name=cloud-mkcloud{version}-job-upgrade-disruptive-{arch}
| - job-template:
name: 'cloud-mkcloud{version}-job-upgrade-disruptive-{arch}'
node: cloud-trigger
disabled: '{obj:disabled}'
triggers:
- timed: '32 22 * * *'
logrotate:
numToKeep: -1
daysToKeep: 7
builders:
- trigger-builds:
- project: openstack-mkcloud
condition: SUCCESS
block: true
current-parameters: true
predefined-parameters: |
TESTHEAD=1
cloudsource=develcloud{previous_version}
upgrade_cloudsource=develcloud{version}
nodenumber=3
cephvolumenumber=2
storage_method=swift
mkcloudtarget=plain_with_upgrade testsetup
want_nodesupgrade=1
label={label}
job_name=cloud-mkcloud{version}-job-upgrade-disruptive-{arch}
| Raise the number of disks so that default swift replica count can be correct | Raise the number of disks so that default swift replica count can be correct
The job fails because of number of swift replicas is bigger than number of disks
See https://ci.suse.de/job/openstack-mkcloud/57546/consoleText
| YAML | apache-2.0 | SUSE-Cloud/automation,aspiers/automation,vmoravec/automation,aspiers/automation,vmoravec/automation,gosipyan/automation,aspiers/automation,gosipyan/automation,gosipyan/automation,SUSE-Cloud/automation,gosipyan/automation,vmoravec/automation,SUSE-Cloud/automation,SUSE-Cloud/automation,vmoravec/automation,aspiers/automation | yaml | ## Code Before:
- job-template:
name: 'cloud-mkcloud{version}-job-upgrade-disruptive-{arch}'
node: cloud-trigger
disabled: '{obj:disabled}'
triggers:
- timed: '32 22 * * *'
logrotate:
numToKeep: -1
daysToKeep: 7
builders:
- trigger-builds:
- project: openstack-mkcloud
condition: SUCCESS
block: true
current-parameters: true
predefined-parameters: |
TESTHEAD=1
cloudsource=develcloud{previous_version}
upgrade_cloudsource=develcloud{version}
nodenumber=3
storage_method=swift
mkcloudtarget=plain_with_upgrade testsetup
want_nodesupgrade=1
label={label}
job_name=cloud-mkcloud{version}-job-upgrade-disruptive-{arch}
## Instruction:
Raise the number of disks so that default swift replica count can be correct
The job fails because of number of swift replicas is bigger than number of disks
See https://ci.suse.de/job/openstack-mkcloud/57546/consoleText
## Code After:
- job-template:
name: 'cloud-mkcloud{version}-job-upgrade-disruptive-{arch}'
node: cloud-trigger
disabled: '{obj:disabled}'
triggers:
- timed: '32 22 * * *'
logrotate:
numToKeep: -1
daysToKeep: 7
builders:
- trigger-builds:
- project: openstack-mkcloud
condition: SUCCESS
block: true
current-parameters: true
predefined-parameters: |
TESTHEAD=1
cloudsource=develcloud{previous_version}
upgrade_cloudsource=develcloud{version}
nodenumber=3
cephvolumenumber=2
storage_method=swift
mkcloudtarget=plain_with_upgrade testsetup
want_nodesupgrade=1
label={label}
job_name=cloud-mkcloud{version}-job-upgrade-disruptive-{arch}
| - job-template:
name: 'cloud-mkcloud{version}-job-upgrade-disruptive-{arch}'
node: cloud-trigger
disabled: '{obj:disabled}'
triggers:
- timed: '32 22 * * *'
logrotate:
numToKeep: -1
daysToKeep: 7
builders:
- trigger-builds:
- project: openstack-mkcloud
condition: SUCCESS
block: true
current-parameters: true
predefined-parameters: |
TESTHEAD=1
cloudsource=develcloud{previous_version}
upgrade_cloudsource=develcloud{version}
nodenumber=3
+ cephvolumenumber=2
storage_method=swift
mkcloudtarget=plain_with_upgrade testsetup
want_nodesupgrade=1
label={label}
job_name=cloud-mkcloud{version}-job-upgrade-disruptive-{arch} | 1 | 0.035714 | 1 | 0 |
6f3e3c85968bbe69487144770973ea8ab92a1a40 | service-worker/windowclient-navigate/README.md | service-worker/windowclient-navigate/README.md | Service Worker Sample: Custom Offline Page
===
See https://googlechrome.github.io/samples/service-worker/custom-offline-page/index.html for a live demo.
Learn more at https://www.chromestatus.com/feature/6561526227927040
| Service Worker Sample: WindowClient.navigate()
===
See https://googlechrome.github.io/samples/service-worker/windowclient-navigate/index.html for a live demo.
Learn more at https://www.chromestatus.com/feature/5314750808326144
| Update to match windowclient-navigate values | Update to match windowclient-navigate values | Markdown | apache-2.0 | jeffposnick/samples,joemarini/samples,GoogleChrome/samples,paullewis/samples,beaufortfrancois/samples,rsolomakhin/samples,dmurph/samples,GoogleChrome/samples,689/samples,jpmedley/samples,samthor/samples,jeffposnick/samples,ARRAffinity/samples,dmurph/samples,ARRAffinity/samples,rsolomakhin/samples,samthor/samples,joemarini/samples,beaufortfrancois/samples,paullewis/samples,jpmedley/samples,jeffposnick/samples,689/samples,beaufortfrancois/samples,jeffposnick/samples,GoogleChrome/samples,dmurph/samples,GoogleChrome/samples,jpmedley/samples,samthor/samples,joemarini/samples,rsolomakhin/samples,beaufortfrancois/samples,689/samples,paullewis/samples,ARRAffinity/samples,GoogleChrome/samples | markdown | ## Code Before:
Service Worker Sample: Custom Offline Page
===
See https://googlechrome.github.io/samples/service-worker/custom-offline-page/index.html for a live demo.
Learn more at https://www.chromestatus.com/feature/6561526227927040
## Instruction:
Update to match windowclient-navigate values
## Code After:
Service Worker Sample: WindowClient.navigate()
===
See https://googlechrome.github.io/samples/service-worker/windowclient-navigate/index.html for a live demo.
Learn more at https://www.chromestatus.com/feature/5314750808326144
| - Service Worker Sample: Custom Offline Page
+ Service Worker Sample: WindowClient.navigate()
===
- See https://googlechrome.github.io/samples/service-worker/custom-offline-page/index.html for a live demo.
? --------- ^ ^
+ See https://googlechrome.github.io/samples/service-worker/windowclient-navigate/index.html for a live demo.
? ++++++ + ^ ^ ++ ++
- Learn more at https://www.chromestatus.com/feature/6561526227927040
? - ---------- ^
+ Learn more at https://www.chromestatus.com/feature/5314750808326144
? +++++++++++ ^
| 6 | 1.2 | 3 | 3 |
49fa1187698fbc8dd1bd674eafcee05c2aa5b59b | domain/src/main/java/uk/gov/dvla/domain/EntitlementRestriction.java | domain/src/main/java/uk/gov/dvla/domain/EntitlementRestriction.java | package uk.gov.dvla.domain;
import com.google.code.morphia.annotations.Embedded;
import java.lang.String;
import java.util.Date;
@Embedded
public class EntitlementRestriction {
private String code;
private String text;
private Date validFrom;
private Date validTo;
private String categoryCode;
public EntitlementRestriction() {
}
public EntitlementRestriction(String code, String categoryCode) {
if (code == null) {
throw new RuntimeException("code must be specified");
}
this.code = code;
this.categoryCode = categoryCode;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public Date getValidFrom() {
return validFrom;
}
public void setValidFrom(Date validFrom) {
this.validFrom = validFrom;
}
public Date getValidTo() {
return validTo;
}
public void setValidTo(Date validTo) {
this.validTo = validTo;
}
public String getCategoryCode() {
return categoryCode;
}
public void setCategoryCode(String categoryCode) {
this.categoryCode = categoryCode;
}
}
| package uk.gov.dvla.domain;
import com.google.code.morphia.annotations.Embedded;
import java.lang.String;
import java.util.Date;
@Embedded
public class EntitlementRestriction {
private String code;
private String text;
private String categoryCode;
private Date validTo;
public EntitlementRestriction() {
}
public EntitlementRestriction(String code, String categoryCode) {
if (code == null) {
throw new RuntimeException("code must be specified");
}
this.code = code;
this.categoryCode = categoryCode;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String getCategoryCode() {
return categoryCode;
}
public void setCategoryCode(String categoryCode) {
this.categoryCode = categoryCode;
}
public Date getValidTo() {
return validTo;
}
public void setValidTo(Date validTo) {
this.validTo = validTo;
}
}
| Set validTo on Entitlement Restriction and calculated new directivestatus | Set validTo on Entitlement Restriction and calculated new directivestatus
| Java | mit | dvla/vdr-core | java | ## Code Before:
package uk.gov.dvla.domain;
import com.google.code.morphia.annotations.Embedded;
import java.lang.String;
import java.util.Date;
@Embedded
public class EntitlementRestriction {
private String code;
private String text;
private Date validFrom;
private Date validTo;
private String categoryCode;
public EntitlementRestriction() {
}
public EntitlementRestriction(String code, String categoryCode) {
if (code == null) {
throw new RuntimeException("code must be specified");
}
this.code = code;
this.categoryCode = categoryCode;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public Date getValidFrom() {
return validFrom;
}
public void setValidFrom(Date validFrom) {
this.validFrom = validFrom;
}
public Date getValidTo() {
return validTo;
}
public void setValidTo(Date validTo) {
this.validTo = validTo;
}
public String getCategoryCode() {
return categoryCode;
}
public void setCategoryCode(String categoryCode) {
this.categoryCode = categoryCode;
}
}
## Instruction:
Set validTo on Entitlement Restriction and calculated new directivestatus
## Code After:
package uk.gov.dvla.domain;
import com.google.code.morphia.annotations.Embedded;
import java.lang.String;
import java.util.Date;
@Embedded
public class EntitlementRestriction {
private String code;
private String text;
private String categoryCode;
private Date validTo;
public EntitlementRestriction() {
}
public EntitlementRestriction(String code, String categoryCode) {
if (code == null) {
throw new RuntimeException("code must be specified");
}
this.code = code;
this.categoryCode = categoryCode;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public String getCategoryCode() {
return categoryCode;
}
public void setCategoryCode(String categoryCode) {
this.categoryCode = categoryCode;
}
public Date getValidTo() {
return validTo;
}
public void setValidTo(Date validTo) {
this.validTo = validTo;
}
}
| package uk.gov.dvla.domain;
import com.google.code.morphia.annotations.Embedded;
import java.lang.String;
import java.util.Date;
@Embedded
public class EntitlementRestriction {
private String code;
private String text;
- private Date validFrom;
+ private String categoryCode;
private Date validTo;
- private String categoryCode;
public EntitlementRestriction() {
}
public EntitlementRestriction(String code, String categoryCode) {
if (code == null) {
throw new RuntimeException("code must be specified");
}
this.code = code;
this.categoryCode = categoryCode;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
- public Date getValidFrom() {
- return validFrom;
+ public String getCategoryCode() {
+ return categoryCode;
}
- public void setValidFrom(Date validFrom) {
- this.validFrom = validFrom;
+ public void setCategoryCode(String categoryCode) {
+ this.categoryCode = categoryCode;
}
public Date getValidTo() {
return validTo;
}
public void setValidTo(Date validTo) {
this.validTo = validTo;
}
-
- public String getCategoryCode() {
- return categoryCode;
- }
-
- public void setCategoryCode(String categoryCode) {
- this.categoryCode = categoryCode;
- }
} | 19 | 0.275362 | 5 | 14 |
f989e0a288b30308b4e5c70ac2eab2fd93ad1476 | _includes/scripts.html | _includes/scripts.html | <!-- jQuery and jQuery.browser -->
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.0.6/jquery.browser.min.js"></script>
<!--
String::format
https://github.com/davidchambers/string-format
-->
<script src="lib/string-format.js"></script>
<!-- My own JavaScript -->
<script src="js/le717.github.io.min.js"></script> | <!-- jQuery and jQuery.browser -->
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.0.6/jquery.browser.min.js"></script>
<!--
String::format
https://github.com/davidchambers/string-format
-->
<script src="lib/string-format.js"></script>
<!-- My own JavaScript -->
<script src="js/script.js"></script>
<!-- <script src="js/le717.github.io.min.js"></script>--> | Switch to unminified JS for now | Switch to unminified JS for now
[ci skip]
| HTML | mit | le717/le717.github.io | html | ## Code Before:
<!-- jQuery and jQuery.browser -->
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.0.6/jquery.browser.min.js"></script>
<!--
String::format
https://github.com/davidchambers/string-format
-->
<script src="lib/string-format.js"></script>
<!-- My own JavaScript -->
<script src="js/le717.github.io.min.js"></script>
## Instruction:
Switch to unminified JS for now
[ci skip]
## Code After:
<!-- jQuery and jQuery.browser -->
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.0.6/jquery.browser.min.js"></script>
<!--
String::format
https://github.com/davidchambers/string-format
-->
<script src="lib/string-format.js"></script>
<!-- My own JavaScript -->
<script src="js/script.js"></script>
<!-- <script src="js/le717.github.io.min.js"></script>--> | <!-- jQuery and jQuery.browser -->
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-browser/0.0.6/jquery.browser.min.js"></script>
<!--
String::format
https://github.com/davidchambers/string-format
-->
<script src="lib/string-format.js"></script>
<!-- My own JavaScript -->
+ <script src="js/script.js"></script>
- <script src="js/le717.github.io.min.js"></script>
+ <!-- <script src="js/le717.github.io.min.js"></script>-->
? ++++ +++
| 3 | 0.25 | 2 | 1 |
2778c1f64351b80da3b04fbb9d1f131a06f61b22 | test/test_helper.rb | test/test_helper.rb | require 'coveralls'
Coveralls.wear!
require 'maxitest/autorun'
require 'shoulda-context'
$LOAD_PATH.push File.expand_path("../../lib", __FILE__)
require File.dirname(__FILE__) + '/../lib/simctl.rb'
if ENV['TRAVIS']
SimCtl.default_timeout = 300
end
unless ENV['CUSTOM_DEVICE_SET_PATH'] == 'false'
SimCtl.device_set_path = Dir.mktmpdir
end
| require 'coveralls'
Coveralls.wear!
require 'maxitest/autorun'
require 'shoulda-context'
$LOAD_PATH.push File.expand_path("../../lib", __FILE__)
require File.dirname(__FILE__) + '/../lib/simctl.rb'
if ENV['TRAVIS']
SimCtl.default_timeout = 300
end
unless ENV['CUSTOM_DEVICE_SET_PATH'] == 'false'
SimCtl.device_set_path = Dir.mktmpdir 'foo bar'
end
| Test device set path with spaces | Test device set path with spaces
| Ruby | mit | adamprice/simctl,plu/simctl | ruby | ## Code Before:
require 'coveralls'
Coveralls.wear!
require 'maxitest/autorun'
require 'shoulda-context'
$LOAD_PATH.push File.expand_path("../../lib", __FILE__)
require File.dirname(__FILE__) + '/../lib/simctl.rb'
if ENV['TRAVIS']
SimCtl.default_timeout = 300
end
unless ENV['CUSTOM_DEVICE_SET_PATH'] == 'false'
SimCtl.device_set_path = Dir.mktmpdir
end
## Instruction:
Test device set path with spaces
## Code After:
require 'coveralls'
Coveralls.wear!
require 'maxitest/autorun'
require 'shoulda-context'
$LOAD_PATH.push File.expand_path("../../lib", __FILE__)
require File.dirname(__FILE__) + '/../lib/simctl.rb'
if ENV['TRAVIS']
SimCtl.default_timeout = 300
end
unless ENV['CUSTOM_DEVICE_SET_PATH'] == 'false'
SimCtl.device_set_path = Dir.mktmpdir 'foo bar'
end
| require 'coveralls'
Coveralls.wear!
require 'maxitest/autorun'
require 'shoulda-context'
$LOAD_PATH.push File.expand_path("../../lib", __FILE__)
require File.dirname(__FILE__) + '/../lib/simctl.rb'
if ENV['TRAVIS']
SimCtl.default_timeout = 300
end
unless ENV['CUSTOM_DEVICE_SET_PATH'] == 'false'
- SimCtl.device_set_path = Dir.mktmpdir
+ SimCtl.device_set_path = Dir.mktmpdir 'foo bar'
? ++++++++++
end | 2 | 0.125 | 1 | 1 |
e4baa3b28906a7b943dd5a9b574c13c3071dbdff | frontend/src/shogi/piece.js | frontend/src/shogi/piece.js | import Shogi from '../shogi';
Shogi.Piece = class Piece {
constructor(type, x, y) {
this.type = type;
this.x = x;
this.y = y;
}
};
| import Shogi from '../shogi';
Shogi.Piece = class Piece {
constructor(type, x, y) {
this.type = type;
this.x = x;
this.y = y;
}
promote() {
this.type = this.usiPromoteTypes(this.type) || this.type;
return this.type;
}
usiPromoteTypes() {
return {
p: 'p+',
l: 'l+',
n: 'n+',
s: 's+',
b: 'b+',
r: 'r+',
P: 'P+',
L: 'L+',
N: 'N+',
S: 'S+',
B: 'B+',
R: 'R+'
};
}
};
| Define promote method in Shogi.Piece | Define promote method in Shogi.Piece
| JavaScript | mit | mgi166/usi-front,mgi166/usi-front | javascript | ## Code Before:
import Shogi from '../shogi';
Shogi.Piece = class Piece {
constructor(type, x, y) {
this.type = type;
this.x = x;
this.y = y;
}
};
## Instruction:
Define promote method in Shogi.Piece
## Code After:
import Shogi from '../shogi';
Shogi.Piece = class Piece {
constructor(type, x, y) {
this.type = type;
this.x = x;
this.y = y;
}
promote() {
this.type = this.usiPromoteTypes(this.type) || this.type;
return this.type;
}
usiPromoteTypes() {
return {
p: 'p+',
l: 'l+',
n: 'n+',
s: 's+',
b: 'b+',
r: 'r+',
P: 'P+',
L: 'L+',
N: 'N+',
S: 'S+',
B: 'B+',
R: 'R+'
};
}
};
| import Shogi from '../shogi';
Shogi.Piece = class Piece {
constructor(type, x, y) {
this.type = type;
this.x = x;
this.y = y;
}
+
+ promote() {
+ this.type = this.usiPromoteTypes(this.type) || this.type;
+ return this.type;
+ }
+
+ usiPromoteTypes() {
+ return {
+ p: 'p+',
+ l: 'l+',
+ n: 'n+',
+ s: 's+',
+ b: 'b+',
+ r: 'r+',
+ P: 'P+',
+ L: 'L+',
+ N: 'N+',
+ S: 'S+',
+ B: 'B+',
+ R: 'R+'
+ };
+ }
}; | 22 | 2.444444 | 22 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.