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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
34db4460aa67fc9abfaaaf2c48a6ea7c5b801ff0 | examples/libtest/imports/__init__.py | examples/libtest/imports/__init__.py |
exec_order = []
class Imports(object):
exec_order = exec_order
def __init__(self):
self.v = 1
imports = Imports()
overrideme = "not overridden"
from . import cls as loccls
from .imports import cls as upcls
def conditional_func():
return "not overridden"
if True:
def conditional_func():
return "overridden"
|
exec_order = []
class Imports(object):
exec_order = exec_order
def __init__(self):
self.v = 1
imports = Imports()
overrideme = "not overridden"
from . import cls as loccls
# This is not valid since Python 2.6!
try:
from .imports import cls as upcls
except ImportError:
upcls = loccls
def conditional_func():
return "not overridden"
if True:
def conditional_func():
return "overridden"
| Fix for libtest for cpython 2.6 / jython / pypy | Fix for libtest for cpython 2.6 / jython / pypy
| Python | apache-2.0 | spaceone/pyjs,minghuascode/pyj,pombredanne/pyjs,lancezlin/pyjs,Hasimir/pyjs,gpitel/pyjs,pyjs/pyjs,anandology/pyjamas,gpitel/pyjs,pombredanne/pyjs,minghuascode/pyj,minghuascode/pyj,lancezlin/pyjs,pyjs/pyjs,pyjs/pyjs,pyjs/pyjs,minghuascode/pyj,spaceone/pyjs,spaceone/pyjs,anandology/pyjamas,Hasimir/pyjs,pombredanne/pyjs,pombredanne/pyjs,gpitel/pyjs,anandology/pyjamas,Hasimir/pyjs,spaceone/pyjs,Hasimir/pyjs,lancezlin/pyjs,lancezlin/pyjs,anandology/pyjamas,gpitel/pyjs | python | ## Code Before:
exec_order = []
class Imports(object):
exec_order = exec_order
def __init__(self):
self.v = 1
imports = Imports()
overrideme = "not overridden"
from . import cls as loccls
from .imports import cls as upcls
def conditional_func():
return "not overridden"
if True:
def conditional_func():
return "overridden"
## Instruction:
Fix for libtest for cpython 2.6 / jython / pypy
## Code After:
exec_order = []
class Imports(object):
exec_order = exec_order
def __init__(self):
self.v = 1
imports = Imports()
overrideme = "not overridden"
from . import cls as loccls
# This is not valid since Python 2.6!
try:
from .imports import cls as upcls
except ImportError:
upcls = loccls
def conditional_func():
return "not overridden"
if True:
def conditional_func():
return "overridden"
|
exec_order = []
class Imports(object):
exec_order = exec_order
def __init__(self):
self.v = 1
imports = Imports()
overrideme = "not overridden"
from . import cls as loccls
+
+ # This is not valid since Python 2.6!
+ try:
- from .imports import cls as upcls
+ from .imports import cls as upcls
? ++++
+ except ImportError:
+ upcls = loccls
def conditional_func():
return "not overridden"
if True:
def conditional_func():
return "overridden" | 7 | 0.333333 | 6 | 1 |
d46ed93bc5a2cf6b02952b32e81e2e505d489846 | src/Helper/HttpClientHelper.php | src/Helper/HttpClientHelper.php | <?php
/**
* @file
* Contains \Drupal\Console\Helper\HttpClientHelper.
*/
namespace Drupal\Console\Helper;
use Drupal\Console\Helper\Helper;
use GuzzleHttp\Client;
/**
* Class HttpClientHelper
* @package \Drupal\Console\Helper\HttpClientHelper
*/
class HttpClientHelper extends Helper
{
public function downloadFile($url, $destination)
{
try {
$this->getClient()->get($url, array('sink' => $destination));
return true;
} catch (\Exception $e) {
return false;
}
}
public function getUrlAsString($url)
{
$response = $this->getClient()->get($url);
if ($response->getStatusCode() == 200) {
return (string) $response->getBody();
}
return null;
}
public function getHeader($url, $header)
{
$response = $this->getClient()->get($url);
$headerContent = $response->getHeader($header);
if (!empty($headerContent) && is_array($headerContent)) {
return array_shift($headerContent);
}
return $headerContent;
}
private function getClient()
{
return new Client();
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'httpClient';
}
}
| <?php
/**
* @file
* Contains \Drupal\Console\Helper\HttpClientHelper.
*/
namespace Drupal\Console\Helper;
use Drupal\Console\Helper\Helper;
use GuzzleHttp\Client;
/**
* Class HttpClientHelper
* @package \Drupal\Console\Helper\HttpClientHelper
*/
class HttpClientHelper extends Helper
{
public function downloadFile($url, $destination)
{
$this->getClient()->get($url, array('sink' => $destination));
return file_exists($destination);
}
public function getUrlAsString($url)
{
$response = $this->getClient()->get($url);
if ($response->getStatusCode() == 200) {
return (string) $response->getBody();
}
return null;
}
public function getHeader($url, $header)
{
$response = $this->getClient()->get($url);
$headerContent = $response->getHeader($header);
if (!empty($headerContent) && is_array($headerContent)) {
return array_shift($headerContent);
}
return $headerContent;
}
private function getClient()
{
return new Client();
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'httpClient';
}
}
| Remove try/catch to test TravisCI error | [console] Remove try/catch to test TravisCI error
| PHP | mit | revagomes/DrupalConsole,dkgndec/DrupalConsole,revagomes/DrupalConsole,dkgndec/DrupalConsole,dkgndec/DrupalConsole,revagomes/DrupalConsole | php | ## Code Before:
<?php
/**
* @file
* Contains \Drupal\Console\Helper\HttpClientHelper.
*/
namespace Drupal\Console\Helper;
use Drupal\Console\Helper\Helper;
use GuzzleHttp\Client;
/**
* Class HttpClientHelper
* @package \Drupal\Console\Helper\HttpClientHelper
*/
class HttpClientHelper extends Helper
{
public function downloadFile($url, $destination)
{
try {
$this->getClient()->get($url, array('sink' => $destination));
return true;
} catch (\Exception $e) {
return false;
}
}
public function getUrlAsString($url)
{
$response = $this->getClient()->get($url);
if ($response->getStatusCode() == 200) {
return (string) $response->getBody();
}
return null;
}
public function getHeader($url, $header)
{
$response = $this->getClient()->get($url);
$headerContent = $response->getHeader($header);
if (!empty($headerContent) && is_array($headerContent)) {
return array_shift($headerContent);
}
return $headerContent;
}
private function getClient()
{
return new Client();
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'httpClient';
}
}
## Instruction:
[console] Remove try/catch to test TravisCI error
## Code After:
<?php
/**
* @file
* Contains \Drupal\Console\Helper\HttpClientHelper.
*/
namespace Drupal\Console\Helper;
use Drupal\Console\Helper\Helper;
use GuzzleHttp\Client;
/**
* Class HttpClientHelper
* @package \Drupal\Console\Helper\HttpClientHelper
*/
class HttpClientHelper extends Helper
{
public function downloadFile($url, $destination)
{
$this->getClient()->get($url, array('sink' => $destination));
return file_exists($destination);
}
public function getUrlAsString($url)
{
$response = $this->getClient()->get($url);
if ($response->getStatusCode() == 200) {
return (string) $response->getBody();
}
return null;
}
public function getHeader($url, $header)
{
$response = $this->getClient()->get($url);
$headerContent = $response->getHeader($header);
if (!empty($headerContent) && is_array($headerContent)) {
return array_shift($headerContent);
}
return $headerContent;
}
private function getClient()
{
return new Client();
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'httpClient';
}
}
| <?php
/**
* @file
* Contains \Drupal\Console\Helper\HttpClientHelper.
*/
namespace Drupal\Console\Helper;
use Drupal\Console\Helper\Helper;
use GuzzleHttp\Client;
/**
* Class HttpClientHelper
* @package \Drupal\Console\Helper\HttpClientHelper
*/
class HttpClientHelper extends Helper
{
public function downloadFile($url, $destination)
{
- try {
- $this->getClient()->get($url, array('sink' => $destination));
? ----
+ $this->getClient()->get($url, array('sink' => $destination));
+ return file_exists($destination);
- return true;
- } catch (\Exception $e) {
- return false;
- }
}
public function getUrlAsString($url)
{
$response = $this->getClient()->get($url);
if ($response->getStatusCode() == 200) {
return (string) $response->getBody();
}
return null;
}
public function getHeader($url, $header)
{
$response = $this->getClient()->get($url);
$headerContent = $response->getHeader($header);
if (!empty($headerContent) && is_array($headerContent)) {
return array_shift($headerContent);
}
return $headerContent;
}
private function getClient()
{
return new Client();
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'httpClient';
}
} | 8 | 0.125 | 2 | 6 |
9e02f054b52ee99e9a275f6a9b8de79f7c34d4f2 | docs/reverse-proxy.rst | docs/reverse-proxy.rst | .. _reverse-proxy:
Running behind reverse proxy
============================
To run `Flower` behind a reverse proxy, remember to set the correct `Host`
header to the request to make sure Flower can generate correct URLs.
The following is a minimal `nginx` configuration:
.. code-block:: nginx
server {
listen 80;
server_name flower.example.com;
charset utf-8;
location / {
proxy_pass http://localhost:5555;
proxy_set_header Host $host;
}
}
Note that you should not expose this site to the public internet without
any sort of authentication! If you have a `htpasswd` file with user
credentials you can make `nginx` use this file by adding the following
lines to the location block:
.. code-block:: nginx
auth_basic "Restricted";
auth_basic_user_file htpasswd;
| .. _reverse-proxy:
Running behind reverse proxy
============================
To run `Flower` behind a reverse proxy, remember to set the correct `Host`
header to the request to make sure Flower can generate correct URLs.
The following is a minimal `nginx` configuration:
.. code-block:: nginx
server {
listen 80;
server_name flower.example.com;
charset utf-8;
location / {
proxy_pass http://localhost:5555;
proxy_set_header Host $host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Note that you should not expose this site to the public internet without
any sort of authentication! If you have a `htpasswd` file with user
credentials you can make `nginx` use this file by adding the following
lines to the location block:
.. code-block:: nginx
auth_basic "Restricted";
auth_basic_user_file htpasswd;
| Add nginx configuration to work with websockets | Add nginx configuration to work with websockets
Fix #213 | reStructuredText | bsd-3-clause | asmodehn/flower,ucb-bar/bar-crawl-web,ChinaQuants/flower,raphaelmerx/flower,marrybird/flower,jzhou77/flower,ChinaQuants/flower,Lingling7/flower,getupcloud/flower,marrybird/flower,barseghyanartur/flower,pj/flower,pygeek/flower,tellapart/flower,asmodehn/flower,Lingling7/flower,ucb-bar/bar-crawl-web,ucb-bar/bar-crawl-web,allengaller/flower,pygeek/flower,jzhou77/flower,getupcloud/flower,marrybird/flower,getupcloud/flower,barseghyanartur/flower,pygeek/flower,tellapart/flower,allengaller/flower,alexmojaki/flower,pj/flower,asmodehn/flower,lucius-feng/flower,pj/flower,alexmojaki/flower,lucius-feng/flower,barseghyanartur/flower,allengaller/flower,alexmojaki/flower,raphaelmerx/flower,lucius-feng/flower,Lingling7/flower,jzhou77/flower,tellapart/flower,raphaelmerx/flower,ChinaQuants/flower | restructuredtext | ## Code Before:
.. _reverse-proxy:
Running behind reverse proxy
============================
To run `Flower` behind a reverse proxy, remember to set the correct `Host`
header to the request to make sure Flower can generate correct URLs.
The following is a minimal `nginx` configuration:
.. code-block:: nginx
server {
listen 80;
server_name flower.example.com;
charset utf-8;
location / {
proxy_pass http://localhost:5555;
proxy_set_header Host $host;
}
}
Note that you should not expose this site to the public internet without
any sort of authentication! If you have a `htpasswd` file with user
credentials you can make `nginx` use this file by adding the following
lines to the location block:
.. code-block:: nginx
auth_basic "Restricted";
auth_basic_user_file htpasswd;
## Instruction:
Add nginx configuration to work with websockets
Fix #213
## Code After:
.. _reverse-proxy:
Running behind reverse proxy
============================
To run `Flower` behind a reverse proxy, remember to set the correct `Host`
header to the request to make sure Flower can generate correct URLs.
The following is a minimal `nginx` configuration:
.. code-block:: nginx
server {
listen 80;
server_name flower.example.com;
charset utf-8;
location / {
proxy_pass http://localhost:5555;
proxy_set_header Host $host;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Note that you should not expose this site to the public internet without
any sort of authentication! If you have a `htpasswd` file with user
credentials you can make `nginx` use this file by adding the following
lines to the location block:
.. code-block:: nginx
auth_basic "Restricted";
auth_basic_user_file htpasswd;
| .. _reverse-proxy:
Running behind reverse proxy
============================
To run `Flower` behind a reverse proxy, remember to set the correct `Host`
header to the request to make sure Flower can generate correct URLs.
The following is a minimal `nginx` configuration:
.. code-block:: nginx
server {
listen 80;
server_name flower.example.com;
charset utf-8;
location / {
proxy_pass http://localhost:5555;
proxy_set_header Host $host;
+ proxy_redirect off;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
}
}
Note that you should not expose this site to the public internet without
any sort of authentication! If you have a `htpasswd` file with user
credentials you can make `nginx` use this file by adding the following
lines to the location block:
.. code-block:: nginx
auth_basic "Restricted";
auth_basic_user_file htpasswd; | 4 | 0.129032 | 4 | 0 |
d8c2b7367e9530f0876673c39dcc3dc858cda689 | src/sass/Fabric.Components.scss | src/sass/Fabric.Components.scss | @import 'Fabric.Common';
@import '../components/Breadcrumb/Breadcrumb';
@import '../components/Button/Button';
@import '../components/Callout/Callout';
@import '../components/ChoiceField/ChoiceField';
@import '../components/CommandBar/CommandBar';
@import '../components/ContextualMenu/ContextualMenu';
@import '../components/DatePicker/DatePicker';
@import '../components/Dialog/Dialog';
@import '../components/Dropdown/Dropdown';
@import '../components/Label/Label';
@import '../components/Link/Link';
@import '../components/List/List';
@import '../components/ListItem/ListItem';
@import '../components/MessageBanner/MessageBanner';
@import '../components/NavBar/NavBar';
@import '../components/OrgChart/OrgChart';
@import '../components/Overlay/Overlay';
@import '../components/Panel/Panel';
@import '../components/PeoplePicker/PeoplePicker';
@import '../components/Persona/Persona';
@import '../components/PersonaCard/PersonaCard';
@import '../components/Pivot/Pivot';
@import '../components/ProgressIndicator/ProgressIndicator';
@import '../components/SearchBox/SearchBox';
@import '../components/Spinner/Spinner';
@import '../components/Table/Table';
@import '../components/TextField/TextField';
@import '../components/Toggle/Toggle';
| @import 'Fabric.Common';
@import '../components/Breadcrumb/Breadcrumb';
@import '../components/Button/Button';
@import '../components/Callout/Callout';
@import '../components/ChoiceField/ChoiceField';
@import '../components/CommandBar/CommandBar';
@import '../components/ContextualMenu/ContextualMenu';
@import '../components/DatePicker/DatePicker';
@import '../components/Dialog/Dialog';
@import '../components/Dropdown/Dropdown';
@import '../components/Facepile/Facepile';
@import '../components/Label/Label';
@import '../components/Link/Link';
@import '../components/List/List';
@import '../components/ListItem/ListItem';
@import '../components/MessageBanner/MessageBanner';
@import '../components/NavBar/NavBar';
@import '../components/OrgChart/OrgChart';
@import '../components/Overlay/Overlay';
@import '../components/Panel/Panel';
@import '../components/PeoplePicker/PeoplePicker';
@import '../components/Persona/Persona';
@import '../components/PersonaCard/PersonaCard';
@import '../components/Pivot/Pivot';
@import '../components/ProgressIndicator/ProgressIndicator';
@import '../components/SearchBox/SearchBox';
@import '../components/Spinner/Spinner';
@import '../components/Table/Table';
@import '../components/TextField/TextField';
@import '../components/Toggle/Toggle';
| Add Facepile component back to Fabric components | Add Facepile component back to Fabric components
| SCSS | mit | zkoehne/Office-UI-Fabric,zkoehne/Office-UI-Fabric,waldekmastykarz/Office-UI-Fabric,OfficeDev/Office-UI-Fabric,OfficeDev/Office-UI-Fabric,waldekmastykarz/Office-UI-Fabric | scss | ## Code Before:
@import 'Fabric.Common';
@import '../components/Breadcrumb/Breadcrumb';
@import '../components/Button/Button';
@import '../components/Callout/Callout';
@import '../components/ChoiceField/ChoiceField';
@import '../components/CommandBar/CommandBar';
@import '../components/ContextualMenu/ContextualMenu';
@import '../components/DatePicker/DatePicker';
@import '../components/Dialog/Dialog';
@import '../components/Dropdown/Dropdown';
@import '../components/Label/Label';
@import '../components/Link/Link';
@import '../components/List/List';
@import '../components/ListItem/ListItem';
@import '../components/MessageBanner/MessageBanner';
@import '../components/NavBar/NavBar';
@import '../components/OrgChart/OrgChart';
@import '../components/Overlay/Overlay';
@import '../components/Panel/Panel';
@import '../components/PeoplePicker/PeoplePicker';
@import '../components/Persona/Persona';
@import '../components/PersonaCard/PersonaCard';
@import '../components/Pivot/Pivot';
@import '../components/ProgressIndicator/ProgressIndicator';
@import '../components/SearchBox/SearchBox';
@import '../components/Spinner/Spinner';
@import '../components/Table/Table';
@import '../components/TextField/TextField';
@import '../components/Toggle/Toggle';
## Instruction:
Add Facepile component back to Fabric components
## Code After:
@import 'Fabric.Common';
@import '../components/Breadcrumb/Breadcrumb';
@import '../components/Button/Button';
@import '../components/Callout/Callout';
@import '../components/ChoiceField/ChoiceField';
@import '../components/CommandBar/CommandBar';
@import '../components/ContextualMenu/ContextualMenu';
@import '../components/DatePicker/DatePicker';
@import '../components/Dialog/Dialog';
@import '../components/Dropdown/Dropdown';
@import '../components/Facepile/Facepile';
@import '../components/Label/Label';
@import '../components/Link/Link';
@import '../components/List/List';
@import '../components/ListItem/ListItem';
@import '../components/MessageBanner/MessageBanner';
@import '../components/NavBar/NavBar';
@import '../components/OrgChart/OrgChart';
@import '../components/Overlay/Overlay';
@import '../components/Panel/Panel';
@import '../components/PeoplePicker/PeoplePicker';
@import '../components/Persona/Persona';
@import '../components/PersonaCard/PersonaCard';
@import '../components/Pivot/Pivot';
@import '../components/ProgressIndicator/ProgressIndicator';
@import '../components/SearchBox/SearchBox';
@import '../components/Spinner/Spinner';
@import '../components/Table/Table';
@import '../components/TextField/TextField';
@import '../components/Toggle/Toggle';
| @import 'Fabric.Common';
@import '../components/Breadcrumb/Breadcrumb';
@import '../components/Button/Button';
@import '../components/Callout/Callout';
@import '../components/ChoiceField/ChoiceField';
@import '../components/CommandBar/CommandBar';
@import '../components/ContextualMenu/ContextualMenu';
@import '../components/DatePicker/DatePicker';
@import '../components/Dialog/Dialog';
@import '../components/Dropdown/Dropdown';
+ @import '../components/Facepile/Facepile';
@import '../components/Label/Label';
@import '../components/Link/Link';
@import '../components/List/List';
@import '../components/ListItem/ListItem';
@import '../components/MessageBanner/MessageBanner';
@import '../components/NavBar/NavBar';
@import '../components/OrgChart/OrgChart';
@import '../components/Overlay/Overlay';
@import '../components/Panel/Panel';
@import '../components/PeoplePicker/PeoplePicker';
@import '../components/Persona/Persona';
@import '../components/PersonaCard/PersonaCard';
@import '../components/Pivot/Pivot';
@import '../components/ProgressIndicator/ProgressIndicator';
@import '../components/SearchBox/SearchBox';
@import '../components/Spinner/Spinner';
@import '../components/Table/Table';
@import '../components/TextField/TextField';
@import '../components/Toggle/Toggle'; | 1 | 0.033333 | 1 | 0 |
6049a233997a7c8901456436c167ba486e602948 | lib/kaisya.rb | lib/kaisya.rb |
require 'twitter'
require './time_messenger'
Twitter.configure do |config|
config.consumer_key = 'xxxxx'
config.consumer_secret = 'xxxxx'
config.oauth_token = 'xxxxx'
config.oauth_token_secret = 'xxxxx'
end
now = Time.now
message = TimeMessenger.get_message(now.year, now.month, now.mday, now.wday, now.hour)
begin
puts message
if message
client = Twitter::Client.new
client.update("#{message} #kaisya_bot")
end
rescue => e
p e
end
|
$:.unshift File.dirname(__FILE__)
require 'twitter'
require 'time_messenger'
client = Twitter::REST::Client.new do |config|
config.consumer_key = 'xxxxx'
config.consumer_secret = 'xxxxx'
config.access_token = 'xxxxx'
config.access_token_secret = 'xxxxx'
end
now = Time.now
message = TimeMessenger.get_message(now.year, now.month, now.mday, now.wday, now.hour)
begin
puts message
if message
client.update("#{message} #kaisya_bot")
end
rescue => e
p e
end
| Fix Twitter gem usage changes. | Fix Twitter gem usage changes.
| Ruby | mit | wnoguchi/kaisya_bot | ruby | ## Code Before:
require 'twitter'
require './time_messenger'
Twitter.configure do |config|
config.consumer_key = 'xxxxx'
config.consumer_secret = 'xxxxx'
config.oauth_token = 'xxxxx'
config.oauth_token_secret = 'xxxxx'
end
now = Time.now
message = TimeMessenger.get_message(now.year, now.month, now.mday, now.wday, now.hour)
begin
puts message
if message
client = Twitter::Client.new
client.update("#{message} #kaisya_bot")
end
rescue => e
p e
end
## Instruction:
Fix Twitter gem usage changes.
## Code After:
$:.unshift File.dirname(__FILE__)
require 'twitter'
require 'time_messenger'
client = Twitter::REST::Client.new do |config|
config.consumer_key = 'xxxxx'
config.consumer_secret = 'xxxxx'
config.access_token = 'xxxxx'
config.access_token_secret = 'xxxxx'
end
now = Time.now
message = TimeMessenger.get_message(now.year, now.month, now.mday, now.wday, now.hour)
begin
puts message
if message
client.update("#{message} #kaisya_bot")
end
rescue => e
p e
end
| +
+ $:.unshift File.dirname(__FILE__)
require 'twitter'
- require './time_messenger'
? --
+ require 'time_messenger'
- Twitter.configure do |config|
+ client = Twitter::REST::Client.new do |config|
config.consumer_key = 'xxxxx'
config.consumer_secret = 'xxxxx'
- config.oauth_token = 'xxxxx'
? - ^^^
+ config.access_token = 'xxxxx'
? ^^^^^
- config.oauth_token_secret = 'xxxxx'
? - ^^^
+ config.access_token_secret = 'xxxxx'
? ^^^^^
end
now = Time.now
message = TimeMessenger.get_message(now.year, now.month, now.mday, now.wday, now.hour)
begin
puts message
if message
- client = Twitter::Client.new
client.update("#{message} #kaisya_bot")
end
rescue => e
p e
end
+ | 12 | 0.521739 | 7 | 5 |
f24a1d84e1f822380515cb90c4baaa76e414a0cb | README.md | README.md |
Get the [Webmachine](http://webmachine.basho.com/) demo to work on [Heroku](http://heroku.com).
## Setup
Make sure you have the heroku gem installed
```bash
gem install heroku
```
Create a new heroku app and use the Erlang buildpack
```bash
heroku create wm-demo-heroku -s cedar
heroku config:add BUILDPACK_URL=http://github.com/heroku/heroku-buildpack-erlang.git
```
Then just push it to Heroku.
## Resources
* [Webmachine](http://webmachine.basho.com)
* [Webmachine Source](https://github.com/basho/webmachine)
* [Heroku Erlang Buildpack](https://github.com/heroku/heroku-buildpack-erlang)
## License
The code taken frome the Webmachine demo comes with [its own license](https://github.com/basho/webmachine/blob/master/LICENSE).
Anything else in this repository is licensed by me under the MIT license. See `LICENSE` for more information.
|
Get the [Webmachine](http://webmachine.basho.com/) demo to work on [Heroku](http://heroku.com).
## Setup
Make sure you have the heroku gem installed
```bash
gem install heroku
```
Create a new heroku app and use the Erlang buildpack
```bash
heroku create wm-demo-heroku -s cedar
heroku config:add BUILDPACK_URL="https://github.com/archaelus/heroku-buildpack-erlang.git"
```
Then just push it to Heroku.
## Resources
* [Webmachine](http://webmachine.basho.com)
* [Webmachine Source](https://github.com/basho/webmachine)
* [Heroku Erlang Buildpack](https://github.com/heroku/heroku-buildpack-erlang)
## License
The code taken frome the Webmachine demo comes with [its own license](https://github.com/basho/webmachine/blob/master/LICENSE).
Anything else in this repository is licensed by me under the MIT license. See `LICENSE` for more information.
| Use the new erlang buildpack | Use the new erlang buildpack
| Markdown | mit | geetarista/wm-demo-heroku | markdown | ## Code Before:
Get the [Webmachine](http://webmachine.basho.com/) demo to work on [Heroku](http://heroku.com).
## Setup
Make sure you have the heroku gem installed
```bash
gem install heroku
```
Create a new heroku app and use the Erlang buildpack
```bash
heroku create wm-demo-heroku -s cedar
heroku config:add BUILDPACK_URL=http://github.com/heroku/heroku-buildpack-erlang.git
```
Then just push it to Heroku.
## Resources
* [Webmachine](http://webmachine.basho.com)
* [Webmachine Source](https://github.com/basho/webmachine)
* [Heroku Erlang Buildpack](https://github.com/heroku/heroku-buildpack-erlang)
## License
The code taken frome the Webmachine demo comes with [its own license](https://github.com/basho/webmachine/blob/master/LICENSE).
Anything else in this repository is licensed by me under the MIT license. See `LICENSE` for more information.
## Instruction:
Use the new erlang buildpack
## Code After:
Get the [Webmachine](http://webmachine.basho.com/) demo to work on [Heroku](http://heroku.com).
## Setup
Make sure you have the heroku gem installed
```bash
gem install heroku
```
Create a new heroku app and use the Erlang buildpack
```bash
heroku create wm-demo-heroku -s cedar
heroku config:add BUILDPACK_URL="https://github.com/archaelus/heroku-buildpack-erlang.git"
```
Then just push it to Heroku.
## Resources
* [Webmachine](http://webmachine.basho.com)
* [Webmachine Source](https://github.com/basho/webmachine)
* [Heroku Erlang Buildpack](https://github.com/heroku/heroku-buildpack-erlang)
## License
The code taken frome the Webmachine demo comes with [its own license](https://github.com/basho/webmachine/blob/master/LICENSE).
Anything else in this repository is licensed by me under the MIT license. See `LICENSE` for more information.
|
Get the [Webmachine](http://webmachine.basho.com/) demo to work on [Heroku](http://heroku.com).
## Setup
Make sure you have the heroku gem installed
```bash
gem install heroku
```
Create a new heroku app and use the Erlang buildpack
```bash
heroku create wm-demo-heroku -s cedar
- heroku config:add BUILDPACK_URL=http://github.com/heroku/heroku-buildpack-erlang.git
? ^^^
+ heroku config:add BUILDPACK_URL="https://github.com/archaelus/heroku-buildpack-erlang.git"
? + + +++ + ^ + +
```
Then just push it to Heroku.
## Resources
* [Webmachine](http://webmachine.basho.com)
* [Webmachine Source](https://github.com/basho/webmachine)
* [Heroku Erlang Buildpack](https://github.com/heroku/heroku-buildpack-erlang)
## License
The code taken frome the Webmachine demo comes with [its own license](https://github.com/basho/webmachine/blob/master/LICENSE).
Anything else in this repository is licensed by me under the MIT license. See `LICENSE` for more information. | 2 | 0.064516 | 1 | 1 |
74e0c056a3f804925222a94d83a1a9eebdb50550 | app/views/groups/inquire.html.erb | app/views/groups/inquire.html.erb | <h2>Find your Neighbors!</h2>
<p>We need to know where you live so we can connect you to <strong>your</strong> neighbors.</p>
<%= form_tag do %>
<div class="field">
<%= label_tag :number, "Building Number" %>
<%= text_field_tag :number %>
</div>
<div class="field">
<%= label_tag :street, "Street" %>
<%= text_field_tag :street %>
</div>
<div class="field">
<%= label_tag :city, "city" %>
<%= text_field_tag :city %>
</div>
<div class="field">
<%= label_tag :zip_code, "Zip Code" %>
<%= text_field_tag :zip_code %>
</div>
<%= submit_tag "Find Your Neighbors!" %>
<% end %>
| <h3>Find your Neighbors!</h2>
<p>We need to know where you live so we can connect you to <strong>your</strong> neighbors.</p>
<%= form_for :address do |f| %>
<div class="field">
<%= f.label :street, "Street" %>
<%= f.text_field :street %>
</div>
<div class="field">
<%= f.label :city, "City" %>
<%= f.text_field :city %>
</div>
<div class="field">
<%= f.label :state, "State" %>
<%= f.text_field :state %>
</div>
<div class="field">
<%= f.label :zip_code, "Zip Code" %>
<%= f.text_field :zip_code %>
</div>
<div class="actions">
<%= submit_tag "Find Your Neighbors!" %>
</div>
<% end %>
| Change the view such that the form has "nested" attributes for easier parsing in the Groups Controller. | Change the view such that the form has "nested" attributes for easier
parsing in the Groups Controller.
| HTML+ERB | mit | kimchanyoung/nghborly,nyc-mud-turtles-2015/nghborly,nyc-mud-turtles-2015/nghborly,kimchanyoung/nghborly,nyc-mud-turtles-2015/nghborly,kimchanyoung/nghborly | html+erb | ## Code Before:
<h2>Find your Neighbors!</h2>
<p>We need to know where you live so we can connect you to <strong>your</strong> neighbors.</p>
<%= form_tag do %>
<div class="field">
<%= label_tag :number, "Building Number" %>
<%= text_field_tag :number %>
</div>
<div class="field">
<%= label_tag :street, "Street" %>
<%= text_field_tag :street %>
</div>
<div class="field">
<%= label_tag :city, "city" %>
<%= text_field_tag :city %>
</div>
<div class="field">
<%= label_tag :zip_code, "Zip Code" %>
<%= text_field_tag :zip_code %>
</div>
<%= submit_tag "Find Your Neighbors!" %>
<% end %>
## Instruction:
Change the view such that the form has "nested" attributes for easier
parsing in the Groups Controller.
## Code After:
<h3>Find your Neighbors!</h2>
<p>We need to know where you live so we can connect you to <strong>your</strong> neighbors.</p>
<%= form_for :address do |f| %>
<div class="field">
<%= f.label :street, "Street" %>
<%= f.text_field :street %>
</div>
<div class="field">
<%= f.label :city, "City" %>
<%= f.text_field :city %>
</div>
<div class="field">
<%= f.label :state, "State" %>
<%= f.text_field :state %>
</div>
<div class="field">
<%= f.label :zip_code, "Zip Code" %>
<%= f.text_field :zip_code %>
</div>
<div class="actions">
<%= submit_tag "Find Your Neighbors!" %>
</div>
<% end %>
| - <h2>Find your Neighbors!</h2>
? ^
+ <h3>Find your Neighbors!</h2>
? ^
<p>We need to know where you live so we can connect you to <strong>your</strong> neighbors.</p>
+ <%= form_for :address do |f| %>
- <%= form_tag do %>
-
<div class="field">
- <%= label_tag :number, "Building Number" %>
+ <%= f.label :street, "Street" %>
- <%= text_field_tag :number %>
? ---- ^^^^ ^
+ <%= f.text_field :street %>
? ++ ^^^ ^^
</div>
<div class="field">
- <%= label_tag :street, "Street" %>
+ <%= f.label :city, "City" %>
- <%= text_field_tag :street %>
? ---- ^ ^^^^
+ <%= f.text_field :city %>
? ++ ^^ ^
</div>
<div class="field">
- <%= label_tag :city, "city" %>
+ <%= f.label :state, "State" %>
- <%= text_field_tag :city %>
? ^ ----- ^
+ <%= f.text_field :state %>
? ++ ^^^ ^
</div>
<div class="field">
- <%= label_tag :zip_code, "Zip Code" %>
? ----
+ <%= f.label :zip_code, "Zip Code" %>
? ++
- <%= text_field_tag :zip_code %>
? ----
+ <%= f.text_field :zip_code %>
? ++
</div>
+ <div class="actions">
- <%= submit_tag "Find Your Neighbors!" %>
+ <%= submit_tag "Find Your Neighbors!" %>
? ++
+ </div>
<% end %> | 25 | 0.892857 | 13 | 12 |
71e936386443d7e71382dc6d0b9cfeccf47a89ea | base/sha1.h | base/sha1.h | // LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace base {
class Sha1 {
public:
enum { HashSize = 20 };
Sha1();
explicit Sha1(const std::vector<uint8_t>& digest);
// Calculates the SHA1 of the given file or string.
static Sha1 calculateFromFile(const std::string& fileName);
static Sha1 calculateFromString(const std::string& text);
bool operator==(const Sha1& other) const;
bool operator!=(const Sha1& other) const;
uint8_t operator[](int index) const {
return m_digest[index];
}
private:
std::vector<uint8_t> m_digest;
};
} // namespace base
#endif // BASE_SHA1_H_INCLUDED
| // LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace base {
class Sha1 {
public:
enum { HashSize = 20 };
Sha1();
explicit Sha1(const std::vector<uint8_t>& digest);
// Calculates the SHA1 of the given file or string.
static Sha1 calculateFromFile(const std::string& fileName);
static Sha1 calculateFromString(const std::string& text);
bool operator==(const Sha1& other) const;
bool operator!=(const Sha1& other) const;
uint8_t operator[](int index) const {
return m_digest[index];
}
const uint8_t *digest() const {
return m_digest.data();
}
size_t size() const {
return m_digest.size();
}
private:
std::vector<uint8_t> m_digest;
};
} // namespace base
#endif // BASE_SHA1_H_INCLUDED
| Add Sha1 class methods digest() and size() | Add Sha1 class methods digest() and size()
| C | mit | aseprite/laf,aseprite/laf | c | ## Code Before:
// LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace base {
class Sha1 {
public:
enum { HashSize = 20 };
Sha1();
explicit Sha1(const std::vector<uint8_t>& digest);
// Calculates the SHA1 of the given file or string.
static Sha1 calculateFromFile(const std::string& fileName);
static Sha1 calculateFromString(const std::string& text);
bool operator==(const Sha1& other) const;
bool operator!=(const Sha1& other) const;
uint8_t operator[](int index) const {
return m_digest[index];
}
private:
std::vector<uint8_t> m_digest;
};
} // namespace base
#endif // BASE_SHA1_H_INCLUDED
## Instruction:
Add Sha1 class methods digest() and size()
## Code After:
// LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace base {
class Sha1 {
public:
enum { HashSize = 20 };
Sha1();
explicit Sha1(const std::vector<uint8_t>& digest);
// Calculates the SHA1 of the given file or string.
static Sha1 calculateFromFile(const std::string& fileName);
static Sha1 calculateFromString(const std::string& text);
bool operator==(const Sha1& other) const;
bool operator!=(const Sha1& other) const;
uint8_t operator[](int index) const {
return m_digest[index];
}
const uint8_t *digest() const {
return m_digest.data();
}
size_t size() const {
return m_digest.size();
}
private:
std::vector<uint8_t> m_digest;
};
} // namespace base
#endif // BASE_SHA1_H_INCLUDED
| // LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace base {
class Sha1 {
public:
enum { HashSize = 20 };
Sha1();
explicit Sha1(const std::vector<uint8_t>& digest);
// Calculates the SHA1 of the given file or string.
static Sha1 calculateFromFile(const std::string& fileName);
static Sha1 calculateFromString(const std::string& text);
bool operator==(const Sha1& other) const;
bool operator!=(const Sha1& other) const;
uint8_t operator[](int index) const {
return m_digest[index];
}
+ const uint8_t *digest() const {
+ return m_digest.data();
+ }
+
+ size_t size() const {
+ return m_digest.size();
+ }
+
private:
std::vector<uint8_t> m_digest;
};
} // namespace base
#endif // BASE_SHA1_H_INCLUDED | 8 | 0.190476 | 8 | 0 |
71f9ad3fe3b9d08b9daa17b68b805b5483a1e586 | pkgs/development/libraries/yajl/default.nix | pkgs/development/libraries/yajl/default.nix | {stdenv, fetchurl, cmake, ruby}:
stdenv.mkDerivation {
name = "yajl-2.0.1";
src = fetchurl {
url = http://github.com/lloyd/yajl/tarball/2.0.1;
name = "yajl-2.0.1.tar.gz";
sha256 = "08a7bgmdpvi6w9f9bxx5f42njwmwzdf6jz3w6ila7jgbl5mhknf2";
};
buildInputs = [ cmake ruby ];
meta = {
description = "Yet Another JSON Library";
longDescription = ''
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI
C, and a small validating JSON generator.
'';
homepage = http://lloyd.github.com/yajl/;
license = stdenv.lib.license.isc;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [
z77z
];
};
}
| {stdenv, fetchurl, cmake, ruby, darwinInstallNameToolUtility}:
stdenv.mkDerivation {
name = "yajl-2.0.1";
src = fetchurl {
url = http://github.com/lloyd/yajl/tarball/2.0.1;
name = "yajl-2.0.1.tar.gz";
sha256 = "08a7bgmdpvi6w9f9bxx5f42njwmwzdf6jz3w6ila7jgbl5mhknf2";
};
buildInputs = [ cmake ruby ]
++ stdenv.lib.optional stdenv.isDarwin darwinInstallNameToolUtility;
meta = {
description = "Yet Another JSON Library";
longDescription = ''
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI
C, and a small validating JSON generator.
'';
homepage = http://lloyd.github.com/yajl/;
license = stdenv.lib.license.isc;
platforms = with stdenv.lib.platforms; [ linux darwin ];
maintainers = with stdenv.lib.maintainers; [
z77z
];
};
}
| Make yajl build on Darwin. | Make yajl build on Darwin.
svn path=/nixpkgs/trunk/; revision=29863
| Nix | mit | NixOS/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,triton/triton,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,triton/triton,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs | nix | ## Code Before:
{stdenv, fetchurl, cmake, ruby}:
stdenv.mkDerivation {
name = "yajl-2.0.1";
src = fetchurl {
url = http://github.com/lloyd/yajl/tarball/2.0.1;
name = "yajl-2.0.1.tar.gz";
sha256 = "08a7bgmdpvi6w9f9bxx5f42njwmwzdf6jz3w6ila7jgbl5mhknf2";
};
buildInputs = [ cmake ruby ];
meta = {
description = "Yet Another JSON Library";
longDescription = ''
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI
C, and a small validating JSON generator.
'';
homepage = http://lloyd.github.com/yajl/;
license = stdenv.lib.license.isc;
platforms = stdenv.lib.platforms.linux;
maintainers = with stdenv.lib.maintainers; [
z77z
];
};
}
## Instruction:
Make yajl build on Darwin.
svn path=/nixpkgs/trunk/; revision=29863
## Code After:
{stdenv, fetchurl, cmake, ruby, darwinInstallNameToolUtility}:
stdenv.mkDerivation {
name = "yajl-2.0.1";
src = fetchurl {
url = http://github.com/lloyd/yajl/tarball/2.0.1;
name = "yajl-2.0.1.tar.gz";
sha256 = "08a7bgmdpvi6w9f9bxx5f42njwmwzdf6jz3w6ila7jgbl5mhknf2";
};
buildInputs = [ cmake ruby ]
++ stdenv.lib.optional stdenv.isDarwin darwinInstallNameToolUtility;
meta = {
description = "Yet Another JSON Library";
longDescription = ''
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI
C, and a small validating JSON generator.
'';
homepage = http://lloyd.github.com/yajl/;
license = stdenv.lib.license.isc;
platforms = with stdenv.lib.platforms; [ linux darwin ];
maintainers = with stdenv.lib.maintainers; [
z77z
];
};
}
| - {stdenv, fetchurl, cmake, ruby}:
+ {stdenv, fetchurl, cmake, ruby, darwinInstallNameToolUtility}:
stdenv.mkDerivation {
name = "yajl-2.0.1";
src = fetchurl {
url = http://github.com/lloyd/yajl/tarball/2.0.1;
name = "yajl-2.0.1.tar.gz";
sha256 = "08a7bgmdpvi6w9f9bxx5f42njwmwzdf6jz3w6ila7jgbl5mhknf2";
};
- buildInputs = [ cmake ruby ];
? -
+ buildInputs = [ cmake ruby ]
+ ++ stdenv.lib.optional stdenv.isDarwin darwinInstallNameToolUtility;
meta = {
description = "Yet Another JSON Library";
longDescription = ''
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI
C, and a small validating JSON generator.
'';
homepage = http://lloyd.github.com/yajl/;
license = stdenv.lib.license.isc;
- platforms = stdenv.lib.platforms.linux;
? ^
+ platforms = with stdenv.lib.platforms; [ linux darwin ];
? +++++ ^^^^ +++++++++
maintainers = with stdenv.lib.maintainers; [
z77z
];
};
} | 7 | 0.259259 | 4 | 3 |
e2cfd6082aca2fec3d92797b0ec88d6c56182c11 | app/controllers/urls_controller.rb | app/controllers/urls_controller.rb | class UrlsController < ApplicationController
def index
@urls = Url.all
end
def show
@url = Url.find(params[:id])
end
def new
@url = Url.new
end
def edit
@url = Url.find(params[:id])
end
def create
@url = Url.new(url_params)
if @url.save
redirect_to @url, notice: 'Url was successfully created.'
else
render action: 'new'
end
end
def update
@url = Url.find(params[:id])
if @url.update_attributes(url_params)
redirect_to @url, notice: 'Url was successfully updated.'
else
render action: 'edit'
end
end
def destroy
@url = Url.find(params[:id])
@url.destroy
redirect_to urls_url
end
private
def url_params
params.require(:url).permit(:address, :viewport_width, :name, :active)
end
end
| class UrlsController < ApplicationController
def index
@urls = Url.all
end
def show
@url = Url.find(params[:id])
end
def new
@url = Url.new
end
def edit
@url = Url.find(params[:id])
end
def create
@url = Url.new(url_params)
if @url.save
redirect_to @url, notice: 'Url was successfully created.'
else
render action: 'new'
end
end
def update
@url = Url.find(params[:id])
if @url.update_attributes(url_params)
redirect_to @url, notice: 'Url was successfully updated.'
else
render action: 'edit'
end
end
def destroy
@url = Url.find(params[:id])
@url.destroy
redirect_to urls_url, notice: 'Url was successfully destroyed.'
end
private
def url_params
params.require(:url).permit(:address, :viewport_width, :name, :active)
end
end
| Add notice to redirect when destroying Urls | Add notice to redirect when destroying Urls
The create and edit action redirects have notices, so it seems
reasonable that the destroy action would have a similar notice. This
should make the app more usable.
Change-Id: Ie3c98a2952201c45858d2a8ef706be32c98ec9b0
| Ruby | mit | diffux/diffux,kalw/diffux,diffux/diffux,diffux/diffux,kalw/diffux,kalw/diffux | ruby | ## Code Before:
class UrlsController < ApplicationController
def index
@urls = Url.all
end
def show
@url = Url.find(params[:id])
end
def new
@url = Url.new
end
def edit
@url = Url.find(params[:id])
end
def create
@url = Url.new(url_params)
if @url.save
redirect_to @url, notice: 'Url was successfully created.'
else
render action: 'new'
end
end
def update
@url = Url.find(params[:id])
if @url.update_attributes(url_params)
redirect_to @url, notice: 'Url was successfully updated.'
else
render action: 'edit'
end
end
def destroy
@url = Url.find(params[:id])
@url.destroy
redirect_to urls_url
end
private
def url_params
params.require(:url).permit(:address, :viewport_width, :name, :active)
end
end
## Instruction:
Add notice to redirect when destroying Urls
The create and edit action redirects have notices, so it seems
reasonable that the destroy action would have a similar notice. This
should make the app more usable.
Change-Id: Ie3c98a2952201c45858d2a8ef706be32c98ec9b0
## Code After:
class UrlsController < ApplicationController
def index
@urls = Url.all
end
def show
@url = Url.find(params[:id])
end
def new
@url = Url.new
end
def edit
@url = Url.find(params[:id])
end
def create
@url = Url.new(url_params)
if @url.save
redirect_to @url, notice: 'Url was successfully created.'
else
render action: 'new'
end
end
def update
@url = Url.find(params[:id])
if @url.update_attributes(url_params)
redirect_to @url, notice: 'Url was successfully updated.'
else
render action: 'edit'
end
end
def destroy
@url = Url.find(params[:id])
@url.destroy
redirect_to urls_url, notice: 'Url was successfully destroyed.'
end
private
def url_params
params.require(:url).permit(:address, :viewport_width, :name, :active)
end
end
| class UrlsController < ApplicationController
def index
@urls = Url.all
end
def show
@url = Url.find(params[:id])
end
def new
@url = Url.new
end
def edit
@url = Url.find(params[:id])
end
def create
@url = Url.new(url_params)
if @url.save
redirect_to @url, notice: 'Url was successfully created.'
else
render action: 'new'
end
end
def update
@url = Url.find(params[:id])
if @url.update_attributes(url_params)
redirect_to @url, notice: 'Url was successfully updated.'
else
render action: 'edit'
end
end
def destroy
@url = Url.find(params[:id])
@url.destroy
- redirect_to urls_url
+ redirect_to urls_url, notice: 'Url was successfully destroyed.'
end
private
def url_params
params.require(:url).permit(:address, :viewport_width, :name, :active)
end
end | 2 | 0.042553 | 1 | 1 |
e4a9f9c450a55d2cd400d10b7e9892c993bbd3d8 | test/CodeGen/Generic/intrinsics.ll | test/CodeGen/Generic/intrinsics.ll | ; RUN: llc < %s
;; SQRT
declare float @llvm.sqrt.f32(float)
declare double @llvm.sqrt.f64(double)
define double @test_sqrt(float %F) {
%G = call float @llvm.sqrt.f32( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @llvm.sqrt.f64( double %H ) ; <double> [#uses=1]
ret double %I
}
; SIN
declare float @sinf(float)
declare double @sin(double)
define double @test_sin(float %F) {
%G = call float @sinf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @sin( double %H ) ; <double> [#uses=1]
ret double %I
}
; COS
declare float @cosf(float)
declare double @cos(double)
define double @test_cos(float %F) {
%G = call float @cosf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @cos( double %H ) ; <double> [#uses=1]
ret double %I
}
| ; RUN: llc < %s
;; SQRT
declare float @llvm.sqrt.f32(float)
declare double @llvm.sqrt.f64(double)
define double @test_sqrt(float %F) {
%G = call float @llvm.sqrt.f32( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @llvm.sqrt.f64( double %H ) ; <double> [#uses=1]
ret double %I
}
; SIN
declare float @sinf(float) readonly
declare double @sin(double) readonly
define double @test_sin(float %F) {
%G = call float @sinf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @sin( double %H ) ; <double> [#uses=1]
ret double %I
}
; COS
declare float @cosf(float) readonly
declare double @cos(double) readonly
define double @test_cos(float %F) {
%G = call float @cosf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @cos( double %H ) ; <double> [#uses=1]
ret double %I
}
| Declare sin & cos as readonly so they match the code in SelectionDAGBuild | Declare sin & cos as readonly so they match the code in SelectionDAGBuild
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@85853 91177308-0d34-0410-b5e6-96231b3b80d8
| LLVM | apache-2.0 | apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap | llvm | ## Code Before:
; RUN: llc < %s
;; SQRT
declare float @llvm.sqrt.f32(float)
declare double @llvm.sqrt.f64(double)
define double @test_sqrt(float %F) {
%G = call float @llvm.sqrt.f32( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @llvm.sqrt.f64( double %H ) ; <double> [#uses=1]
ret double %I
}
; SIN
declare float @sinf(float)
declare double @sin(double)
define double @test_sin(float %F) {
%G = call float @sinf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @sin( double %H ) ; <double> [#uses=1]
ret double %I
}
; COS
declare float @cosf(float)
declare double @cos(double)
define double @test_cos(float %F) {
%G = call float @cosf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @cos( double %H ) ; <double> [#uses=1]
ret double %I
}
## Instruction:
Declare sin & cos as readonly so they match the code in SelectionDAGBuild
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@85853 91177308-0d34-0410-b5e6-96231b3b80d8
## Code After:
; RUN: llc < %s
;; SQRT
declare float @llvm.sqrt.f32(float)
declare double @llvm.sqrt.f64(double)
define double @test_sqrt(float %F) {
%G = call float @llvm.sqrt.f32( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @llvm.sqrt.f64( double %H ) ; <double> [#uses=1]
ret double %I
}
; SIN
declare float @sinf(float) readonly
declare double @sin(double) readonly
define double @test_sin(float %F) {
%G = call float @sinf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @sin( double %H ) ; <double> [#uses=1]
ret double %I
}
; COS
declare float @cosf(float) readonly
declare double @cos(double) readonly
define double @test_cos(float %F) {
%G = call float @cosf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @cos( double %H ) ; <double> [#uses=1]
ret double %I
}
| ; RUN: llc < %s
;; SQRT
declare float @llvm.sqrt.f32(float)
declare double @llvm.sqrt.f64(double)
define double @test_sqrt(float %F) {
%G = call float @llvm.sqrt.f32( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @llvm.sqrt.f64( double %H ) ; <double> [#uses=1]
ret double %I
}
; SIN
- declare float @sinf(float)
+ declare float @sinf(float) readonly
? +++++++++
- declare double @sin(double)
+ declare double @sin(double) readonly
? +++++++++
define double @test_sin(float %F) {
%G = call float @sinf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @sin( double %H ) ; <double> [#uses=1]
ret double %I
}
; COS
- declare float @cosf(float)
+ declare float @cosf(float) readonly
? +++++++++
- declare double @cos(double)
+ declare double @cos(double) readonly
? +++++++++
define double @test_cos(float %F) {
%G = call float @cosf( float %F ) ; <float> [#uses=1]
%H = fpext float %G to double ; <double> [#uses=1]
%I = call double @cos( double %H ) ; <double> [#uses=1]
ret double %I
}
| 8 | 0.2 | 4 | 4 |
14ce487a289dd99eeb49fe4c6e10a577b75d4221 | CHANGELOG.md | CHANGELOG.md | - YAML model
- Web UI to add jobs, builds, global config
- Auto-detect if running in Docker, guess Docker host
- Web UI to view builds
- Git clone, checkout
- Check for git version tag, save to build
- Build the Docker image
- Run the Docker image with the `ci` command
- Success/failed/errored/running/queued statuses
- Build output archive/download
- GitHub push hook
- Builds save committer/auther info
| - Streaming console #16
- HipChat notifications #9
- Correctly tag images #13
- Any git tags acceptable, not just semver (though semver is special) #12
- Tagged builds not cleaned up #4
- Tagged builds will remove built image before replacing #12
- Version tags can not be built twice #12
- Version tag builds will never use cache #3
- Service provisioning #10
- Ability to use some Docker env vars as config #8
## v0.0.1
- YAML model
- Web UI to add jobs, builds, global config
- Auto-detect if running in Docker, guess Docker host
- Web UI to view builds
- Git clone, checkout
- Check for git version tag, save to build
- Build the Docker image
- Run the Docker image with the `ci` command
- Success/failed/errored/running/queued statuses
- Build output archive/download
- GitHub push hook
- Builds save committer/auther info
| Update change log for v0.0.2 | Update change log for v0.0.2
| Markdown | isc | RickyCook/paas-in-a-day-dockci,RickyCook/paas-in-a-day-dockci | markdown | ## Code Before:
- YAML model
- Web UI to add jobs, builds, global config
- Auto-detect if running in Docker, guess Docker host
- Web UI to view builds
- Git clone, checkout
- Check for git version tag, save to build
- Build the Docker image
- Run the Docker image with the `ci` command
- Success/failed/errored/running/queued statuses
- Build output archive/download
- GitHub push hook
- Builds save committer/auther info
## Instruction:
Update change log for v0.0.2
## Code After:
- Streaming console #16
- HipChat notifications #9
- Correctly tag images #13
- Any git tags acceptable, not just semver (though semver is special) #12
- Tagged builds not cleaned up #4
- Tagged builds will remove built image before replacing #12
- Version tags can not be built twice #12
- Version tag builds will never use cache #3
- Service provisioning #10
- Ability to use some Docker env vars as config #8
## v0.0.1
- YAML model
- Web UI to add jobs, builds, global config
- Auto-detect if running in Docker, guess Docker host
- Web UI to view builds
- Git clone, checkout
- Check for git version tag, save to build
- Build the Docker image
- Run the Docker image with the `ci` command
- Success/failed/errored/running/queued statuses
- Build output archive/download
- GitHub push hook
- Builds save committer/auther info
| + - Streaming console #16
+ - HipChat notifications #9
+ - Correctly tag images #13
+ - Any git tags acceptable, not just semver (though semver is special) #12
+ - Tagged builds not cleaned up #4
+ - Tagged builds will remove built image before replacing #12
+ - Version tags can not be built twice #12
+ - Version tag builds will never use cache #3
+ - Service provisioning #10
+ - Ability to use some Docker env vars as config #8
+
+ ## v0.0.1
- YAML model
- Web UI to add jobs, builds, global config
- Auto-detect if running in Docker, guess Docker host
- Web UI to view builds
- Git clone, checkout
- Check for git version tag, save to build
- Build the Docker image
- Run the Docker image with the `ci` command
- Success/failed/errored/running/queued statuses
- Build output archive/download
- GitHub push hook
- Builds save committer/auther info | 12 | 1 | 12 | 0 |
f4b49b4540767d90f206d8413ca42598e12f76c0 | config/kubernetes-sigs/sig-instrumentation/teams.yaml | config/kubernetes-sigs/sig-instrumentation/teams.yaml | teams:
custom-metrics-apiserver-admins:
description: Admin access to the custom-metrics-apiserver repo
members:
- brancz
- piosz
privacy: closed
custom-metrics-apiserver-maintainers:
description: Write access to the custom-metrics-apiserver repo
members:
- s-urbaniak
- serathius
privacy: closed
instrumentation-tools-admins:
description: Admin access to the instrumentation-tools repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
instrumentation-tools-maintainers:
description: Write access to the instrumentation-tools repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
metrics-server-admins:
description: Admin access to the metrics-server repo
members:
- brancz
- piosz
privacy: closed
metrics-server-maintainers:
description: Write access to the metrics-server repo
members:
- s-urbaniak
- serathius
privacy: closed
prometheus-adapter-admins:
description: Admin access to the prometheus-adapter repo
members:
- brancz
- DirectXMan12
- s-urbaniak
privacy: closed
| teams:
custom-metrics-apiserver-admins:
description: Admin access to the custom-metrics-apiserver repo
members:
- brancz
- piosz
privacy: closed
custom-metrics-apiserver-maintainers:
description: Write access to the custom-metrics-apiserver repo
members:
- s-urbaniak
- serathius
privacy: closed
instrumentation-admins:
description: Admin access to the instrumentation repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
instrumentation-tools-admins:
description: Admin access to the instrumentation-tools repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
instrumentation-tools-maintainers:
description: Write access to the instrumentation-tools repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
metrics-server-admins:
description: Admin access to the metrics-server repo
members:
- brancz
- piosz
privacy: closed
metrics-server-maintainers:
description: Write access to the metrics-server repo
members:
- s-urbaniak
- serathius
privacy: closed
prometheus-adapter-admins:
description: Admin access to the prometheus-adapter repo
members:
- brancz
- DirectXMan12
- s-urbaniak
privacy: closed
| Add GitHub team for k-sigs/instrumentation repo | Add GitHub team for k-sigs/instrumentation repo
| YAML | apache-2.0 | kubernetes/org,kubernetes/org,kubernetes/org | yaml | ## Code Before:
teams:
custom-metrics-apiserver-admins:
description: Admin access to the custom-metrics-apiserver repo
members:
- brancz
- piosz
privacy: closed
custom-metrics-apiserver-maintainers:
description: Write access to the custom-metrics-apiserver repo
members:
- s-urbaniak
- serathius
privacy: closed
instrumentation-tools-admins:
description: Admin access to the instrumentation-tools repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
instrumentation-tools-maintainers:
description: Write access to the instrumentation-tools repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
metrics-server-admins:
description: Admin access to the metrics-server repo
members:
- brancz
- piosz
privacy: closed
metrics-server-maintainers:
description: Write access to the metrics-server repo
members:
- s-urbaniak
- serathius
privacy: closed
prometheus-adapter-admins:
description: Admin access to the prometheus-adapter repo
members:
- brancz
- DirectXMan12
- s-urbaniak
privacy: closed
## Instruction:
Add GitHub team for k-sigs/instrumentation repo
## Code After:
teams:
custom-metrics-apiserver-admins:
description: Admin access to the custom-metrics-apiserver repo
members:
- brancz
- piosz
privacy: closed
custom-metrics-apiserver-maintainers:
description: Write access to the custom-metrics-apiserver repo
members:
- s-urbaniak
- serathius
privacy: closed
instrumentation-admins:
description: Admin access to the instrumentation repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
instrumentation-tools-admins:
description: Admin access to the instrumentation-tools repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
instrumentation-tools-maintainers:
description: Write access to the instrumentation-tools repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
metrics-server-admins:
description: Admin access to the metrics-server repo
members:
- brancz
- piosz
privacy: closed
metrics-server-maintainers:
description: Write access to the metrics-server repo
members:
- s-urbaniak
- serathius
privacy: closed
prometheus-adapter-admins:
description: Admin access to the prometheus-adapter repo
members:
- brancz
- DirectXMan12
- s-urbaniak
privacy: closed
| teams:
custom-metrics-apiserver-admins:
description: Admin access to the custom-metrics-apiserver repo
members:
- brancz
- piosz
privacy: closed
custom-metrics-apiserver-maintainers:
description: Write access to the custom-metrics-apiserver repo
members:
- s-urbaniak
- serathius
+ privacy: closed
+ instrumentation-admins:
+ description: Admin access to the instrumentation repo
+ members:
+ - brancz
+ - dashpole
+ - ehashman
+ - logicalhan
privacy: closed
instrumentation-tools-admins:
description: Admin access to the instrumentation-tools repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
instrumentation-tools-maintainers:
description: Write access to the instrumentation-tools repo
members:
- brancz
- dashpole
- ehashman
- logicalhan
privacy: closed
metrics-server-admins:
description: Admin access to the metrics-server repo
members:
- brancz
- piosz
privacy: closed
metrics-server-maintainers:
description: Write access to the metrics-server repo
members:
- s-urbaniak
- serathius
privacy: closed
prometheus-adapter-admins:
description: Admin access to the prometheus-adapter repo
members:
- brancz
- DirectXMan12
- s-urbaniak
privacy: closed | 8 | 0.166667 | 8 | 0 |
e1eb1d7d891c3a2885c145dbbad3fea55ba316aa | indra/resources/grounding/misgrounding_map.csv | indra/resources/grounding/misgrounding_map.csv | baz1,HGNC,13006
transforming growth factor,HGNC,11769
catenin,HGNC,2516
β3,HGNC,6287
TGF-β1 and β3,HGNC,6287
NETs,HGNC,3392
subunit C,HGNC,3279
keratinocytes,HGNC,17813
elongation,HGNC,3214
DB,HGNC,6554
myosin,HGNC,7593
signalosome,HGNC,4549
cAMP-dependent,HGNC,9382
Serine/Threonine,HGNC,11405
| baz1,HGNC,13006
transforming growth factor,HGNC,11769
catenin,HGNC,2516
β3,HGNC,6287
TGF-β1 and β3,HGNC,6287
NETs,HGNC,3392
subunit C,HGNC,3279
keratinocytes,HGNC,17813
elongation,HGNC,3214
DB,HGNC,6554
myosin,HGNC,7593
signalosome,HGNC,4549
cAMP-dependent,HGNC,9382
Serine/Threonine,HGNC,11405
gap,HGNC,9871
Gap,HGNC,9871
| Add gap/Gap to misgrounding map | Add gap/Gap to misgrounding map
| CSV | bsd-2-clause | sorgerlab/belpy,bgyori/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,sorgerlab/indra,sorgerlab/indra,bgyori/indra,sorgerlab/belpy,johnbachman/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/belpy,johnbachman/indra | csv | ## Code Before:
baz1,HGNC,13006
transforming growth factor,HGNC,11769
catenin,HGNC,2516
β3,HGNC,6287
TGF-β1 and β3,HGNC,6287
NETs,HGNC,3392
subunit C,HGNC,3279
keratinocytes,HGNC,17813
elongation,HGNC,3214
DB,HGNC,6554
myosin,HGNC,7593
signalosome,HGNC,4549
cAMP-dependent,HGNC,9382
Serine/Threonine,HGNC,11405
## Instruction:
Add gap/Gap to misgrounding map
## Code After:
baz1,HGNC,13006
transforming growth factor,HGNC,11769
catenin,HGNC,2516
β3,HGNC,6287
TGF-β1 and β3,HGNC,6287
NETs,HGNC,3392
subunit C,HGNC,3279
keratinocytes,HGNC,17813
elongation,HGNC,3214
DB,HGNC,6554
myosin,HGNC,7593
signalosome,HGNC,4549
cAMP-dependent,HGNC,9382
Serine/Threonine,HGNC,11405
gap,HGNC,9871
Gap,HGNC,9871
| baz1,HGNC,13006
transforming growth factor,HGNC,11769
catenin,HGNC,2516
β3,HGNC,6287
TGF-β1 and β3,HGNC,6287
NETs,HGNC,3392
subunit C,HGNC,3279
keratinocytes,HGNC,17813
elongation,HGNC,3214
DB,HGNC,6554
myosin,HGNC,7593
signalosome,HGNC,4549
cAMP-dependent,HGNC,9382
Serine/Threonine,HGNC,11405
+ gap,HGNC,9871
+ Gap,HGNC,9871 | 2 | 0.142857 | 2 | 0 |
d47e5260cc7e77afca78b87521f1aa8ba1e24094 | .travis.yml | .travis.yml | sudo: required
services:
- docker
language: node_js
node_js:
- "6"
env:
global:
- SERVER_TEST_IMG=entake/acuity-server:build-$TRAVIS_JOB_NUMBER
- SERVER_RELEASE_IMG=entake/acuity-server:latest
before_install:
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
install:
- docker build --pull -t $SERVER_TEST_IMG ./server
script:
- docker run $SERVER_TEST_IMG -e $COVERALLS_REPO_TOKEN npm run test-ci
after_success:
- docker push $SERVER_TEST_IMG
deploy:
provider: script
script: docker tag $SERVER_TEST_IMG $SERVER_RELEASE_IMG && docker push $SERVER_RELEASE_IMG
on:
branch: master
| sudo: required
services:
- docker
language: node_js
node_js:
- "6"
env:
global:
- SERVER_TEST_IMG=entake/acuity-server:build-$TRAVIS_JOB_NUMBER
- SERVER_RELEASE_IMG=entake/acuity-server:latest
before_install:
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
install:
- docker build --pull -t $SERVER_TEST_IMG ./server
script:
- docker run -e $COVERALLS_REPO_TOKEN $SERVER_TEST_IMG npm run test-ci
after_success:
- docker push $SERVER_TEST_IMG
deploy:
provider: script
script: docker tag $SERVER_TEST_IMG $SERVER_RELEASE_IMG && docker push $SERVER_RELEASE_IMG
on:
branch: master
| Fix docker command in script | Fix docker command in script
| YAML | mit | Entake/acuity,Entake/acuity,Entake/acuity | yaml | ## Code Before:
sudo: required
services:
- docker
language: node_js
node_js:
- "6"
env:
global:
- SERVER_TEST_IMG=entake/acuity-server:build-$TRAVIS_JOB_NUMBER
- SERVER_RELEASE_IMG=entake/acuity-server:latest
before_install:
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
install:
- docker build --pull -t $SERVER_TEST_IMG ./server
script:
- docker run $SERVER_TEST_IMG -e $COVERALLS_REPO_TOKEN npm run test-ci
after_success:
- docker push $SERVER_TEST_IMG
deploy:
provider: script
script: docker tag $SERVER_TEST_IMG $SERVER_RELEASE_IMG && docker push $SERVER_RELEASE_IMG
on:
branch: master
## Instruction:
Fix docker command in script
## Code After:
sudo: required
services:
- docker
language: node_js
node_js:
- "6"
env:
global:
- SERVER_TEST_IMG=entake/acuity-server:build-$TRAVIS_JOB_NUMBER
- SERVER_RELEASE_IMG=entake/acuity-server:latest
before_install:
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
install:
- docker build --pull -t $SERVER_TEST_IMG ./server
script:
- docker run -e $COVERALLS_REPO_TOKEN $SERVER_TEST_IMG npm run test-ci
after_success:
- docker push $SERVER_TEST_IMG
deploy:
provider: script
script: docker tag $SERVER_TEST_IMG $SERVER_RELEASE_IMG && docker push $SERVER_RELEASE_IMG
on:
branch: master
| sudo: required
services:
- docker
language: node_js
node_js:
- "6"
env:
global:
- SERVER_TEST_IMG=entake/acuity-server:build-$TRAVIS_JOB_NUMBER
- SERVER_RELEASE_IMG=entake/acuity-server:latest
before_install:
- docker login -u $DOCKER_HUB_USER -p $DOCKER_HUB_PASSWORD
install:
- docker build --pull -t $SERVER_TEST_IMG ./server
script:
- - docker run $SERVER_TEST_IMG -e $COVERALLS_REPO_TOKEN npm run test-ci
? -----------------
+ - docker run -e $COVERALLS_REPO_TOKEN $SERVER_TEST_IMG npm run test-ci
? +++++++++++++++++
after_success:
- docker push $SERVER_TEST_IMG
deploy:
provider: script
script: docker tag $SERVER_TEST_IMG $SERVER_RELEASE_IMG && docker push $SERVER_RELEASE_IMG
on:
branch: master | 2 | 0.064516 | 1 | 1 |
9d16338be180405a5ffb2ea854a69e2cde25bde9 | docs/related_tools.md | docs/related_tools.md |
Find below a few tools that are more or less similar to SciPipe that are worth worth checking out before
deciding on what tool fits you best (in approximate order of similarity to SciPipe):
- [NextFlow](http://nextflow.io)
- [Luigi](https://github.com/spotify/luigi)/[SciLuigi](https://github.com/samuell/sciluigi)
- [BPipe](https://code.google.com/p/bpipe/)
- [SnakeMake](https://bitbucket.org/johanneskoester/snakemake)
- [Cuneiform](https://github.com/joergen7/cuneiform)
|
Find below a few tools that are more or less similar to SciPipe that are worth worth checking out before
deciding on what tool fits you best (in approximate order of similarity to SciPipe):
- [NextFlow](http://nextflow.io)
- [NiPype](https://nipype.readthedocs.io/en/latest/)
- [Luigi](https://github.com/spotify/luigi)/[SciLuigi](https://github.com/samuell/sciluigi)
- [BPipe](https://code.google.com/p/bpipe/)
- [SnakeMake](https://bitbucket.org/johanneskoester/snakemake)
- [Cuneiform](https://github.com/joergen7/cuneiform)
| Add NiPype to related tools page | Add NiPype to related tools page
| Markdown | mit | samuell/scipipe,scipipe/scipipe,scipipe/scipipe | markdown | ## Code Before:
Find below a few tools that are more or less similar to SciPipe that are worth worth checking out before
deciding on what tool fits you best (in approximate order of similarity to SciPipe):
- [NextFlow](http://nextflow.io)
- [Luigi](https://github.com/spotify/luigi)/[SciLuigi](https://github.com/samuell/sciluigi)
- [BPipe](https://code.google.com/p/bpipe/)
- [SnakeMake](https://bitbucket.org/johanneskoester/snakemake)
- [Cuneiform](https://github.com/joergen7/cuneiform)
## Instruction:
Add NiPype to related tools page
## Code After:
Find below a few tools that are more or less similar to SciPipe that are worth worth checking out before
deciding on what tool fits you best (in approximate order of similarity to SciPipe):
- [NextFlow](http://nextflow.io)
- [NiPype](https://nipype.readthedocs.io/en/latest/)
- [Luigi](https://github.com/spotify/luigi)/[SciLuigi](https://github.com/samuell/sciluigi)
- [BPipe](https://code.google.com/p/bpipe/)
- [SnakeMake](https://bitbucket.org/johanneskoester/snakemake)
- [Cuneiform](https://github.com/joergen7/cuneiform)
|
Find below a few tools that are more or less similar to SciPipe that are worth worth checking out before
deciding on what tool fits you best (in approximate order of similarity to SciPipe):
- [NextFlow](http://nextflow.io)
+ - [NiPype](https://nipype.readthedocs.io/en/latest/)
- [Luigi](https://github.com/spotify/luigi)/[SciLuigi](https://github.com/samuell/sciluigi)
- [BPipe](https://code.google.com/p/bpipe/)
- [SnakeMake](https://bitbucket.org/johanneskoester/snakemake)
- [Cuneiform](https://github.com/joergen7/cuneiform) | 1 | 0.111111 | 1 | 0 |
e89e284b8ddaafe3a9d136786a2c0146cf81dab5 | tox.ini | tox.ini |
[tox]
envlist = py27, py34
[testenv]
commands = {envpython} setup.py test
deps =
mock
|
[tox]
envlist = py27, py34, py35, py36
[testenv]
commands = {envpython} setup.py test
deps =
mock
| Test with python 3.5 and 3.6 | Test with python 3.5 and 3.6
| INI | apache-2.0 | albertyw/pyziptax | ini | ## Code Before:
[tox]
envlist = py27, py34
[testenv]
commands = {envpython} setup.py test
deps =
mock
## Instruction:
Test with python 3.5 and 3.6
## Code After:
[tox]
envlist = py27, py34, py35, py36
[testenv]
commands = {envpython} setup.py test
deps =
mock
|
[tox]
- envlist = py27, py34
+ envlist = py27, py34, py35, py36
? ++++++++++++
[testenv]
commands = {envpython} setup.py test
deps =
mock | 2 | 0.25 | 1 | 1 |
1904be6938b21c40b545da717661926e133710fc | .travis.yml | .travis.yml | language: java # because we use Maven
os:
- linux
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
env:
matrix:
- SCALA_VERSION=2.10
- SCALA_VERSION=2.11
before_install:
- pwd
- wget http://histogrammar.org/m2-repository.tgz
- tar -xzvf m2-repository.tgz
- ls .m2/repository
install: mvn install -P scala-${SCALA_VERSION}
| language: java # because we use Maven
os:
- linux
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
env:
matrix:
- SCALA_VERSION=2.10
- SCALA_VERSION=2.11
before_install:
- cd /home/travis
- wget http://histogrammar.org/m2-repository.tgz
- tar -xzvf m2-repository.tgz
- cd -
- pwd
script: mvn install -P scala-${SCALA_VERSION}
| Put .m2/repository in the right directory | Put .m2/repository in the right directory
| YAML | apache-2.0 | histogrammar/histogrammar-scala | yaml | ## Code Before:
language: java # because we use Maven
os:
- linux
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
env:
matrix:
- SCALA_VERSION=2.10
- SCALA_VERSION=2.11
before_install:
- pwd
- wget http://histogrammar.org/m2-repository.tgz
- tar -xzvf m2-repository.tgz
- ls .m2/repository
install: mvn install -P scala-${SCALA_VERSION}
## Instruction:
Put .m2/repository in the right directory
## Code After:
language: java # because we use Maven
os:
- linux
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
env:
matrix:
- SCALA_VERSION=2.10
- SCALA_VERSION=2.11
before_install:
- cd /home/travis
- wget http://histogrammar.org/m2-repository.tgz
- tar -xzvf m2-repository.tgz
- cd -
- pwd
script: mvn install -P scala-${SCALA_VERSION}
| language: java # because we use Maven
os:
- linux
jdk:
- oraclejdk7
- oraclejdk8
- openjdk7
env:
matrix:
- SCALA_VERSION=2.10
- SCALA_VERSION=2.11
before_install:
- - pwd
+ - cd /home/travis
- wget http://histogrammar.org/m2-repository.tgz
- tar -xzvf m2-repository.tgz
- - ls .m2/repository
+ - cd -
+ - pwd
- install: mvn install -P scala-${SCALA_VERSION}
? ^^ ---
+ script: mvn install -P scala-${SCALA_VERSION}
? +++ ^
| 7 | 0.318182 | 4 | 3 |
b597d9ef2e8d40a995a52247f6a39780febb035c | doxygen/documentation/tutorials/pychrono/demo_vehicle.md | doxygen/documentation/tutorials/pychrono/demo_vehicle.md | Simulate vehicle dynamics in Python using PyChrono {#tutorial_pychrono_demo_vehicle}
==========================
Model a HMMWV military truck and drive it in simulation.
Uses [PyChrono](@ref pychrono_introduction), Irrlicht and Vehicle submodules.
You can:
- use one of the predefined vehicle model in PyChrono (HMMWV, Sedan or Citybus)
- Define your own model in a JSON file
Remember to change data paths in the code.
HMMWV predefined model:
\include demo_vehicle_1.py
HMMWV imported from json file:
\include demo_vehicle_2.py | Simulate vehicle dynamics in Python using PyChrono {#tutorial_pychrono_demo_vehicle}
==========================
Model a HMMWV military truck and drive it in simulation.
Uses [PyChrono](@ref pychrono_introduction), Irrlicht and Vehicle submodules.
You can:
- use one of the predefined vehicle model in PyChrono (HMMWV, Sedan or Citybus)
- Define your own model in a JSON file
Remember to change data paths in the code.
HMMWV predefined model:
\include demo_vehicle_HMMWV.py
HMMWV imported from json file:
\include demo_vehicle_HMMWV_JSON.py
| Fix names of PyChrono vehicle demos in documentation | Fix names of PyChrono vehicle demos in documentation
| Markdown | bsd-3-clause | dariomangoni/chrono,projectchrono/chrono,dariomangoni/chrono,rserban/chrono,Milad-Rakhsha/chrono,dariomangoni/chrono,projectchrono/chrono,Milad-Rakhsha/chrono,rserban/chrono,projectchrono/chrono,rserban/chrono,dariomangoni/chrono,rserban/chrono,rserban/chrono,rserban/chrono,projectchrono/chrono,dariomangoni/chrono,Milad-Rakhsha/chrono,Milad-Rakhsha/chrono,Milad-Rakhsha/chrono,dariomangoni/chrono,projectchrono/chrono,projectchrono/chrono,rserban/chrono,Milad-Rakhsha/chrono | markdown | ## Code Before:
Simulate vehicle dynamics in Python using PyChrono {#tutorial_pychrono_demo_vehicle}
==========================
Model a HMMWV military truck and drive it in simulation.
Uses [PyChrono](@ref pychrono_introduction), Irrlicht and Vehicle submodules.
You can:
- use one of the predefined vehicle model in PyChrono (HMMWV, Sedan or Citybus)
- Define your own model in a JSON file
Remember to change data paths in the code.
HMMWV predefined model:
\include demo_vehicle_1.py
HMMWV imported from json file:
\include demo_vehicle_2.py
## Instruction:
Fix names of PyChrono vehicle demos in documentation
## Code After:
Simulate vehicle dynamics in Python using PyChrono {#tutorial_pychrono_demo_vehicle}
==========================
Model a HMMWV military truck and drive it in simulation.
Uses [PyChrono](@ref pychrono_introduction), Irrlicht and Vehicle submodules.
You can:
- use one of the predefined vehicle model in PyChrono (HMMWV, Sedan or Citybus)
- Define your own model in a JSON file
Remember to change data paths in the code.
HMMWV predefined model:
\include demo_vehicle_HMMWV.py
HMMWV imported from json file:
\include demo_vehicle_HMMWV_JSON.py
| Simulate vehicle dynamics in Python using PyChrono {#tutorial_pychrono_demo_vehicle}
==========================
Model a HMMWV military truck and drive it in simulation.
Uses [PyChrono](@ref pychrono_introduction), Irrlicht and Vehicle submodules.
You can:
- use one of the predefined vehicle model in PyChrono (HMMWV, Sedan or Citybus)
- Define your own model in a JSON file
Remember to change data paths in the code.
HMMWV predefined model:
- \include demo_vehicle_1.py
? ^
+ \include demo_vehicle_HMMWV.py
? ^^^^^
HMMWV imported from json file:
- \include demo_vehicle_2.py
? ^
+ \include demo_vehicle_HMMWV_JSON.py
? ^^^^^^^^^^
| 4 | 0.2 | 2 | 2 |
ac8740aea8488cd69cb7d61a2951e7ba54358f86 | README.md | README.md | An essential part of the Cloud Playground
See the [Cloud Playground's README.md](https://github.com/GoogleCloudPlatform/cloud-playground) for more information.
| 
This project is no longer actively maintained, and remains here as an archive of this work.
# mimic
An essential part of the Cloud Playground
See the [Cloud Playground's README.md](https://github.com/GoogleCloudPlatform/cloud-playground) for more information.
| Mark project as no longer being maintained | Mark project as no longer being maintained | Markdown | apache-2.0 | googlearchive/mimic,googlearchive/mimic,googlearchive/mimic | markdown | ## Code Before:
An essential part of the Cloud Playground
See the [Cloud Playground's README.md](https://github.com/GoogleCloudPlatform/cloud-playground) for more information.
## Instruction:
Mark project as no longer being maintained
## Code After:

This project is no longer actively maintained, and remains here as an archive of this work.
# mimic
An essential part of the Cloud Playground
See the [Cloud Playground's README.md](https://github.com/GoogleCloudPlatform/cloud-playground) for more information.
| + 
+
+ This project is no longer actively maintained, and remains here as an archive of this work.
+
+
+ # mimic
An essential part of the Cloud Playground
See the [Cloud Playground's README.md](https://github.com/GoogleCloudPlatform/cloud-playground) for more information. | 6 | 2 | 6 | 0 |
bf71aeda1e7a237e0b8a0ace36aa9fc7880d757d | .travis.yml | .travis.yml | sudo: false
language: node_js
node_js:
- "0.12"
before_install:
- "npm config set spin false"
- "npm install -g npm@^2"
- "npm config set spin false"
script: npm run test-ci
install:
- node --version
- npm --version
- git --version
- npm install
after_script:
- find ./coverage/Phantom* -name "lcov.info" -exec cat {} \; | coveralls | sudo: false
language: node_js
node_js:
- "0.12"
- "4.2"
- "5"
before_install:
- "npm config set spin false"
- "npm install -g npm@^2"
- "npm config set spin false"
script: npm run test-ci
install:
- node --version
- npm --version
- git --version
- npm install
after_script:
- find ./coverage/Phantom* -name "lcov.info" -exec cat {} \; | coveralls | Test against current Node.js version on Travis CI | Test against current Node.js version on Travis CI
* 4.2.x is a LTS version
* 5.x is a stable version
| YAML | mit | bantic/pretender,pretenderjs/pretender,step2yeung/pretender,mike-north/pretender,cibernox/pretender,trek/pretender,fivetanley/pretender,pretenderjs/pretender | yaml | ## Code Before:
sudo: false
language: node_js
node_js:
- "0.12"
before_install:
- "npm config set spin false"
- "npm install -g npm@^2"
- "npm config set spin false"
script: npm run test-ci
install:
- node --version
- npm --version
- git --version
- npm install
after_script:
- find ./coverage/Phantom* -name "lcov.info" -exec cat {} \; | coveralls
## Instruction:
Test against current Node.js version on Travis CI
* 4.2.x is a LTS version
* 5.x is a stable version
## Code After:
sudo: false
language: node_js
node_js:
- "0.12"
- "4.2"
- "5"
before_install:
- "npm config set spin false"
- "npm install -g npm@^2"
- "npm config set spin false"
script: npm run test-ci
install:
- node --version
- npm --version
- git --version
- npm install
after_script:
- find ./coverage/Phantom* -name "lcov.info" -exec cat {} \; | coveralls | sudo: false
language: node_js
node_js:
- "0.12"
+ - "4.2"
+ - "5"
before_install:
- "npm config set spin false"
- "npm install -g npm@^2"
- "npm config set spin false"
script: npm run test-ci
install:
- node --version
- npm --version
- git --version
- npm install
after_script:
- find ./coverage/Phantom* -name "lcov.info" -exec cat {} \; | coveralls | 2 | 0.1 | 2 | 0 |
fd79d1bacd8be1bdb9497105563f477c38618757 | src/context.js | src/context.js | module.exports = {
title: 'Andrey Prokopyuk',
summary: [
"Hello! My name is Andrey. I'm a developer in",
'<a href="https://yandex.com" target="_blank">Yandex</a>,',
'working on Search Engine Result Page'
].join(' '),
socialNetworks: [
{
title: 'GitHub',
login: 'Andre-487',
url: 'https://github.com/Andre-487'
},
{
title: 'Twitter',
login: 'Andre_487',
url: 'https://twitter.com/Andre_487'
},
{
title: 'Facebook',
login: 'andre.487',
url: 'https://www.facebook.com/andre.487'
},
{
title: 'Instagram',
login: 'andre_487',
url: 'https://instagram.com/andre_487'
},
{
title: 'VK',
login: 'andre_dm',
url: 'https://vk.com/andre_dm'
},
{
title: 'Leprosorium',
login: 'Andre_487',
url: 'https://leprosorium.ru/users/Andre_487'
}
]
};
| module.exports = {
title: 'Andrey Prokopyuk',
summary: [
"Hello! My name is Andrey. I'm a developer in",
'<a href="https://yandex.com" target="_blank">Yandex</a>,',
'working on Search Engine Result Page'
].join(' '),
socialNetworks: [
{
title: 'GitHub',
login: 'Andre-487',
url: 'https://github.com/Andre-487'
},
{
title: 'Twitter',
login: 'Andre_487',
url: 'https://twitter.com/Andre_487'
},
{
title: 'Facebook',
login: 'andre487',
url: 'https://www.facebook.com/profile.php?id=100001722691597'
},
{
title: 'Instagram',
login: 'andre_487',
url: 'https://instagram.com/andre_487'
},
{
title: 'VK',
login: 'andre487',
url: 'https://vk.com/andre487'
},
{
title: 'Leprosorium',
login: 'Andre_487',
url: 'https://leprosorium.ru/users/Andre_487'
}
]
};
| Fix logins on VK and FB | Fix logins on VK and FB
| JavaScript | mit | Andre-487/andre.life,andre487/andre.life,Andre-487/andre.life,andre487/andre.life,andre487/andre.life | javascript | ## Code Before:
module.exports = {
title: 'Andrey Prokopyuk',
summary: [
"Hello! My name is Andrey. I'm a developer in",
'<a href="https://yandex.com" target="_blank">Yandex</a>,',
'working on Search Engine Result Page'
].join(' '),
socialNetworks: [
{
title: 'GitHub',
login: 'Andre-487',
url: 'https://github.com/Andre-487'
},
{
title: 'Twitter',
login: 'Andre_487',
url: 'https://twitter.com/Andre_487'
},
{
title: 'Facebook',
login: 'andre.487',
url: 'https://www.facebook.com/andre.487'
},
{
title: 'Instagram',
login: 'andre_487',
url: 'https://instagram.com/andre_487'
},
{
title: 'VK',
login: 'andre_dm',
url: 'https://vk.com/andre_dm'
},
{
title: 'Leprosorium',
login: 'Andre_487',
url: 'https://leprosorium.ru/users/Andre_487'
}
]
};
## Instruction:
Fix logins on VK and FB
## Code After:
module.exports = {
title: 'Andrey Prokopyuk',
summary: [
"Hello! My name is Andrey. I'm a developer in",
'<a href="https://yandex.com" target="_blank">Yandex</a>,',
'working on Search Engine Result Page'
].join(' '),
socialNetworks: [
{
title: 'GitHub',
login: 'Andre-487',
url: 'https://github.com/Andre-487'
},
{
title: 'Twitter',
login: 'Andre_487',
url: 'https://twitter.com/Andre_487'
},
{
title: 'Facebook',
login: 'andre487',
url: 'https://www.facebook.com/profile.php?id=100001722691597'
},
{
title: 'Instagram',
login: 'andre_487',
url: 'https://instagram.com/andre_487'
},
{
title: 'VK',
login: 'andre487',
url: 'https://vk.com/andre487'
},
{
title: 'Leprosorium',
login: 'Andre_487',
url: 'https://leprosorium.ru/users/Andre_487'
}
]
};
| module.exports = {
title: 'Andrey Prokopyuk',
summary: [
"Hello! My name is Andrey. I'm a developer in",
'<a href="https://yandex.com" target="_blank">Yandex</a>,',
'working on Search Engine Result Page'
].join(' '),
socialNetworks: [
{
title: 'GitHub',
login: 'Andre-487',
url: 'https://github.com/Andre-487'
},
{
title: 'Twitter',
login: 'Andre_487',
url: 'https://twitter.com/Andre_487'
},
{
title: 'Facebook',
- login: 'andre.487',
? -
+ login: 'andre487',
- url: 'https://www.facebook.com/andre.487'
? ^^^ ^^
+ url: 'https://www.facebook.com/profile.php?id=100001722691597'
? ^ ++++ ^^^^^^^^^^^^^^^^^^^^^
},
{
title: 'Instagram',
login: 'andre_487',
url: 'https://instagram.com/andre_487'
},
{
title: 'VK',
- login: 'andre_dm',
? ^^^
+ login: 'andre487',
? ^^^
- url: 'https://vk.com/andre_dm'
? ^^^
+ url: 'https://vk.com/andre487'
? ^^^
},
{
title: 'Leprosorium',
login: 'Andre_487',
url: 'https://leprosorium.ru/users/Andre_487'
}
]
}; | 8 | 0.2 | 4 | 4 |
41c5040795c036bdc64a796f97e2618edda2c534 | setup.py | setup.py | from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
# also update in nsq/version.py
version = '0.6.5'
setup(
name='pynsq',
version=version,
description='official Python client library for NSQ',
keywords='python nsq',
author='Matt Reiferson',
author_email='snakes@gmail.com',
url='http://github.com/bitly/pynsq',
download_url='https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version,
packages=['nsq'],
requires=['tornado'],
include_package_data=True,
zip_safe=False,
tests_require=['pytest', 'mock', 'tornado'],
cmdclass={'test': PyTest},
classifiers=[
'License :: OSI Approved :: MIT License'
]
)
| from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
# also update in nsq/version.py
version = '0.6.5'
setup(
name='pynsq',
version=version,
description='official Python client library for NSQ',
keywords='python nsq',
author='Matt Reiferson',
author_email='snakes@gmail.com',
url='http://github.com/bitly/pynsq',
download_url=(
'https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' %
version
),
packages=['nsq'],
requires=['tornado'],
include_package_data=True,
zip_safe=False,
tests_require=['pytest', 'mock', 'tornado'],
cmdclass={'test': PyTest},
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: Implementation :: CPython',
]
)
| Document Python 2.6, Python 2.7, CPython support. Document beta status. | Document Python 2.6, Python 2.7, CPython support. Document beta status.
| Python | mit | bitly/pynsq,goller/pynsq,nsqio/pynsq,jonmorehouse/pynsq,protoss-player/pynsq,jehiah/pynsq,mreiferson/pynsq,protoss-player/pynsq,virtuald/pynsq,mreiferson/pynsq,bitly/pynsq,jonmorehouse/pynsq,virtuald/pynsq | python | ## Code Before:
from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
# also update in nsq/version.py
version = '0.6.5'
setup(
name='pynsq',
version=version,
description='official Python client library for NSQ',
keywords='python nsq',
author='Matt Reiferson',
author_email='snakes@gmail.com',
url='http://github.com/bitly/pynsq',
download_url='https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version,
packages=['nsq'],
requires=['tornado'],
include_package_data=True,
zip_safe=False,
tests_require=['pytest', 'mock', 'tornado'],
cmdclass={'test': PyTest},
classifiers=[
'License :: OSI Approved :: MIT License'
]
)
## Instruction:
Document Python 2.6, Python 2.7, CPython support. Document beta status.
## Code After:
from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
# also update in nsq/version.py
version = '0.6.5'
setup(
name='pynsq',
version=version,
description='official Python client library for NSQ',
keywords='python nsq',
author='Matt Reiferson',
author_email='snakes@gmail.com',
url='http://github.com/bitly/pynsq',
download_url=(
'https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' %
version
),
packages=['nsq'],
requires=['tornado'],
include_package_data=True,
zip_safe=False,
tests_require=['pytest', 'mock', 'tornado'],
cmdclass={'test': PyTest},
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: Implementation :: CPython',
]
)
| from setuptools import setup
from setuptools.command.test import test as TestCommand
import sys
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
# also update in nsq/version.py
version = '0.6.5'
setup(
name='pynsq',
version=version,
description='official Python client library for NSQ',
keywords='python nsq',
author='Matt Reiferson',
author_email='snakes@gmail.com',
url='http://github.com/bitly/pynsq',
+ download_url=(
- download_url='https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' % version,
? ^^^^^^^^^^^^^ ---------
+ 'https://s3.amazonaws.com/bitly-downloads/nsq/pynsq-%s.tar.gz' %
? ^^^^
+ version
+ ),
packages=['nsq'],
requires=['tornado'],
include_package_data=True,
zip_safe=False,
tests_require=['pytest', 'mock', 'tornado'],
cmdclass={'test': PyTest},
classifiers=[
+ 'Development Status :: 4 - Beta',
- 'License :: OSI Approved :: MIT License'
+ 'License :: OSI Approved :: MIT License',
? +
+ 'Programming Language :: Python :: 2',
+ 'Programming Language :: Python :: 2.6',
+ 'Programming Language :: Python :: 2.7',
+ 'Programming Language :: Python :: Implementation :: CPython',
]
) | 12 | 0.3 | 10 | 2 |
ac8b91d779011aae89d5666fd20eda5df89b4c1b | Resources/app.nw/TODO.md | Resources/app.nw/TODO.md | + make changes to node-webkit allowing for
[this](https://github.com/rogerwang/node-webkit/issues/367)?
[lighttable's nw implements this](https://github.com/LightTable/node-webkit).
+ quiet backups =>
(into ~/Library/Application Support/Wreathe/Backups/file(date).wreath)
+ allow users to upload own sounds (ambient only? e.g. can't upload click sounds
from settings ui)
+ iCloud & file nav implementation (see that lua HN post or w/e)
(if want into App Store).
+ Add "Select Next/Prev Tab" option to Window menu, not View menu.
+ Modify Edit to use our Undo & Redo functions.
# important before release:
+ !! allow the app to check for updates on startup.
+ OWN SOUNDS
+ add a favicon for app completeness (and so nothing unexpected happens).
+ Redesign Prompt buttons such that they don't move & disrupt clicks as current.
+ Load default values into customizer (blues already selected).
+ Add some kind of satisfying visual echo on Save?
+ Drag to rearrange tabs?
+ Settings save automatically unless "Reset" is PRESSED AND CONFIRMED.
this app is about focus and writing, it's not about creating themes
(can put more advanced theme creator on website).
Get out of your own way when designing things: it's not about you.
| + make changes to node-webkit allowing for
[this](https://github.com/rogerwang/node-webkit/issues/367)?
[lighttable's nw implements this](https://github.com/LightTable/node-webkit).
+ quiet backups =>
(into ~/Library/Application Support/Wreathe/Backups/file(date).wreath)
+ allow users to upload own sounds (ambient only? e.g. can't upload click sounds
from settings ui)
+ iCloud & file nav implementation (see that lua HN post or w/e)
(if want into App Store).
+ Add "Select Next/Prev Tab" option to Window menu, not View menu.
+ Modify Edit to use our Undo & Redo functions.
# important before release:
+ !! allow the app to check for updates on startup.
+ OWN SOUNDS
+ add a favicon for app completeness (and so nothing unexpected happens).
+ Redesign Prompt buttons such that they don't move & disrupt clicks as current.
+ Add some kind of satisfying visual echo on Save?
+ Drag to rearrange tabs?
+ Settings save automatically unless "Reset" is PRESSED AND CONFIRMED.
this app is about focus and writing, it's not about creating themes
(can put more advanced theme creator on website).
Get out of your own way when designing things: it's not about you.
| Set some defaults for customizer | Set some defaults for customizer
| Markdown | mit | urlysses/wrong,urlysses/wrong | markdown | ## Code Before:
+ make changes to node-webkit allowing for
[this](https://github.com/rogerwang/node-webkit/issues/367)?
[lighttable's nw implements this](https://github.com/LightTable/node-webkit).
+ quiet backups =>
(into ~/Library/Application Support/Wreathe/Backups/file(date).wreath)
+ allow users to upload own sounds (ambient only? e.g. can't upload click sounds
from settings ui)
+ iCloud & file nav implementation (see that lua HN post or w/e)
(if want into App Store).
+ Add "Select Next/Prev Tab" option to Window menu, not View menu.
+ Modify Edit to use our Undo & Redo functions.
# important before release:
+ !! allow the app to check for updates on startup.
+ OWN SOUNDS
+ add a favicon for app completeness (and so nothing unexpected happens).
+ Redesign Prompt buttons such that they don't move & disrupt clicks as current.
+ Load default values into customizer (blues already selected).
+ Add some kind of satisfying visual echo on Save?
+ Drag to rearrange tabs?
+ Settings save automatically unless "Reset" is PRESSED AND CONFIRMED.
this app is about focus and writing, it's not about creating themes
(can put more advanced theme creator on website).
Get out of your own way when designing things: it's not about you.
## Instruction:
Set some defaults for customizer
## Code After:
+ make changes to node-webkit allowing for
[this](https://github.com/rogerwang/node-webkit/issues/367)?
[lighttable's nw implements this](https://github.com/LightTable/node-webkit).
+ quiet backups =>
(into ~/Library/Application Support/Wreathe/Backups/file(date).wreath)
+ allow users to upload own sounds (ambient only? e.g. can't upload click sounds
from settings ui)
+ iCloud & file nav implementation (see that lua HN post or w/e)
(if want into App Store).
+ Add "Select Next/Prev Tab" option to Window menu, not View menu.
+ Modify Edit to use our Undo & Redo functions.
# important before release:
+ !! allow the app to check for updates on startup.
+ OWN SOUNDS
+ add a favicon for app completeness (and so nothing unexpected happens).
+ Redesign Prompt buttons such that they don't move & disrupt clicks as current.
+ Add some kind of satisfying visual echo on Save?
+ Drag to rearrange tabs?
+ Settings save automatically unless "Reset" is PRESSED AND CONFIRMED.
this app is about focus and writing, it's not about creating themes
(can put more advanced theme creator on website).
Get out of your own way when designing things: it's not about you.
| + make changes to node-webkit allowing for
[this](https://github.com/rogerwang/node-webkit/issues/367)?
[lighttable's nw implements this](https://github.com/LightTable/node-webkit).
+ quiet backups =>
(into ~/Library/Application Support/Wreathe/Backups/file(date).wreath)
+ allow users to upload own sounds (ambient only? e.g. can't upload click sounds
from settings ui)
+ iCloud & file nav implementation (see that lua HN post or w/e)
(if want into App Store).
+ Add "Select Next/Prev Tab" option to Window menu, not View menu.
+ Modify Edit to use our Undo & Redo functions.
# important before release:
+ !! allow the app to check for updates on startup.
+ OWN SOUNDS
+ add a favicon for app completeness (and so nothing unexpected happens).
+ Redesign Prompt buttons such that they don't move & disrupt clicks as current.
- + Load default values into customizer (blues already selected).
+ Add some kind of satisfying visual echo on Save?
+ Drag to rearrange tabs?
+ Settings save automatically unless "Reset" is PRESSED AND CONFIRMED.
this app is about focus and writing, it's not about creating themes
(can put more advanced theme creator on website).
Get out of your own way when designing things: it's not about you. | 1 | 0.041667 | 0 | 1 |
0b5b58692f938f7dfe02e9ef5876258c3f216ef3 | scripts/vagrant-install-acbuild.sh | scripts/vagrant-install-acbuild.sh |
set -xe
export DEBIAN_FRONTEND=noninteractive
pushd /vagrant
./build
sudo cp -v bin/* /usr/local/bin
curl -s -q -L -o rkt.tar.gz https://github.com/coreos/rkt/releases/download/v0.9.0/rkt-v0.9.0.tar.gz -z rkt.tar.gz
tar xfv rkt.tar.gz
sudo cp -v rkt-v0.9.0/* /usr/local/bin
|
set -xe
export DEBIAN_FRONTEND=noninteractive
pushd /vagrant
./build
sudo cp -v bin/* /usr/local/bin
curl -s -q -L -o rkt.tar.gz https://github.com/coreos/rkt/releases/download/v1.1.0/rkt-v1.1.0.tar.gz -z rkt.tar.gz
tar xfv rkt.tar.gz
sudo cp -v rkt-v1.1.0/rkt /usr/local/bin
sudo cp -v rkt-v1.1.0/*.aci /usr/local/bin
sudo groupadd rkt
sudo ./rkt-v1.1.0/scripts/setup-data-dir.sh
| Update Vagrant script to use Rkt 1.1.0 | Update Vagrant script to use Rkt 1.1.0
Test Plan:
```sh
git clone https://github.com/coreos/coreos-baremetal.git
cd coreos-baremetal/contrib/dnsmasq
./get-tftp-files
sudo ./build-aci
```
| Shell | apache-2.0 | appc/acbuild,jonboulle/acbuild,dgonyeo/acbuild,appc/acbuild,containers/build,containers/build,joshix/acbuild,jonboulle/acbuild,joshix/acbuild,dgonyeo/acbuild | shell | ## Code Before:
set -xe
export DEBIAN_FRONTEND=noninteractive
pushd /vagrant
./build
sudo cp -v bin/* /usr/local/bin
curl -s -q -L -o rkt.tar.gz https://github.com/coreos/rkt/releases/download/v0.9.0/rkt-v0.9.0.tar.gz -z rkt.tar.gz
tar xfv rkt.tar.gz
sudo cp -v rkt-v0.9.0/* /usr/local/bin
## Instruction:
Update Vagrant script to use Rkt 1.1.0
Test Plan:
```sh
git clone https://github.com/coreos/coreos-baremetal.git
cd coreos-baremetal/contrib/dnsmasq
./get-tftp-files
sudo ./build-aci
```
## Code After:
set -xe
export DEBIAN_FRONTEND=noninteractive
pushd /vagrant
./build
sudo cp -v bin/* /usr/local/bin
curl -s -q -L -o rkt.tar.gz https://github.com/coreos/rkt/releases/download/v1.1.0/rkt-v1.1.0.tar.gz -z rkt.tar.gz
tar xfv rkt.tar.gz
sudo cp -v rkt-v1.1.0/rkt /usr/local/bin
sudo cp -v rkt-v1.1.0/*.aci /usr/local/bin
sudo groupadd rkt
sudo ./rkt-v1.1.0/scripts/setup-data-dir.sh
|
set -xe
export DEBIAN_FRONTEND=noninteractive
pushd /vagrant
./build
sudo cp -v bin/* /usr/local/bin
- curl -s -q -L -o rkt.tar.gz https://github.com/coreos/rkt/releases/download/v0.9.0/rkt-v0.9.0.tar.gz -z rkt.tar.gz
? ^ ^ ^ ^
+ curl -s -q -L -o rkt.tar.gz https://github.com/coreos/rkt/releases/download/v1.1.0/rkt-v1.1.0.tar.gz -z rkt.tar.gz
? ^ ^ ^ ^
tar xfv rkt.tar.gz
+ sudo cp -v rkt-v1.1.0/rkt /usr/local/bin
- sudo cp -v rkt-v0.9.0/* /usr/local/bin
? ^ ^
+ sudo cp -v rkt-v1.1.0/*.aci /usr/local/bin
? ^ ^ ++++
+ sudo groupadd rkt
+ sudo ./rkt-v1.1.0/scripts/setup-data-dir.sh | 7 | 0.636364 | 5 | 2 |
6740467a15a54d4ca0bf0a7e358e2e5c92e04344 | setup.py | setup.py | from setuptools import setup, find_packages
import re
VERSIONFILE = "openomni/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
setup(name='openomni',
version=verstr,
description='Omnipod Packet Decoding Library',
url='http://github.com/openaps/omni',
# See https://github.com/openaps/openomni/graphs/contributors for actual
# contributors...
author='Pete Schwamb',
author_email='pete@schwamb.net',
scripts=[
'openomni/bin/decode_omni',
'openomni/bin/omni_listen_rfcat',
'openomni/bin/omni_akimbo',
'openomni/bin/omni_explore',
'openomni/bin/omni_send_rfcat',
'openomni/bin/omni_forloop'],
packages=find_packages(),
install_requires=[
'crccheck',
],
zip_safe=False)
| from setuptools import setup, find_packages
import re
VERSIONFILE = "openomni/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
setup(name='openomni',
version=verstr,
description='Omnipod Packet Decoding Library',
url='http://github.com/openaps/omni',
# See https://github.com/openaps/openomni/graphs/contributors for actual
# contributors...
author='Pete Schwamb',
author_email='pete@schwamb.net',
scripts=[
'openomni/bin/decode_omni',
'openomni/bin/omni_listen_rfcat',
'openomni/bin/omni_akimbo',
'openomni/bin/omni_explore',
'openomni/bin/omni_send_rfcat',
'openomni/bin/omni_forloop'],
packages=find_packages(),
install_requires=[
'crccheck',
'enum34;python_version<"3.4"',
],
zip_safe=False)
| Install enum34 if not provided | Install enum34 if not provided
| Python | mit | openaps/openomni,openaps/openomni,openaps/openomni | python | ## Code Before:
from setuptools import setup, find_packages
import re
VERSIONFILE = "openomni/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
setup(name='openomni',
version=verstr,
description='Omnipod Packet Decoding Library',
url='http://github.com/openaps/omni',
# See https://github.com/openaps/openomni/graphs/contributors for actual
# contributors...
author='Pete Schwamb',
author_email='pete@schwamb.net',
scripts=[
'openomni/bin/decode_omni',
'openomni/bin/omni_listen_rfcat',
'openomni/bin/omni_akimbo',
'openomni/bin/omni_explore',
'openomni/bin/omni_send_rfcat',
'openomni/bin/omni_forloop'],
packages=find_packages(),
install_requires=[
'crccheck',
],
zip_safe=False)
## Instruction:
Install enum34 if not provided
## Code After:
from setuptools import setup, find_packages
import re
VERSIONFILE = "openomni/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
setup(name='openomni',
version=verstr,
description='Omnipod Packet Decoding Library',
url='http://github.com/openaps/omni',
# See https://github.com/openaps/openomni/graphs/contributors for actual
# contributors...
author='Pete Schwamb',
author_email='pete@schwamb.net',
scripts=[
'openomni/bin/decode_omni',
'openomni/bin/omni_listen_rfcat',
'openomni/bin/omni_akimbo',
'openomni/bin/omni_explore',
'openomni/bin/omni_send_rfcat',
'openomni/bin/omni_forloop'],
packages=find_packages(),
install_requires=[
'crccheck',
'enum34;python_version<"3.4"',
],
zip_safe=False)
| from setuptools import setup, find_packages
import re
VERSIONFILE = "openomni/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
setup(name='openomni',
version=verstr,
description='Omnipod Packet Decoding Library',
url='http://github.com/openaps/omni',
# See https://github.com/openaps/openomni/graphs/contributors for actual
# contributors...
author='Pete Schwamb',
author_email='pete@schwamb.net',
scripts=[
'openomni/bin/decode_omni',
'openomni/bin/omni_listen_rfcat',
'openomni/bin/omni_akimbo',
'openomni/bin/omni_explore',
'openomni/bin/omni_send_rfcat',
'openomni/bin/omni_forloop'],
packages=find_packages(),
install_requires=[
'crccheck',
+ 'enum34;python_version<"3.4"',
],
zip_safe=False) | 1 | 0.03125 | 1 | 0 |
ddd9cc30d2a38bcfb532b2f4c32e7a2bed2addb7 | .travis.yml | .travis.yml | language: ruby
rvm:
- 2.3.1
gemfile: Gemfile.ci
script: bundle exec jekyll build && htmlproofer ./_site --check-html
branches:
only:
- master
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
sudo: false # route your build to the container-based infrastructure for a faster build
| language: ruby
rvm:
- 2.3.1
gemfile: Gemfile.ci
script: bundle exec jekyll build && htmlproofer ./_site --check-html
branches:
only:
- master
addons:
apt:
packages:
- libcurl4-openssl-dev # required to avoid SSL errors
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
sudo: false # route your build to the container-based infrastructure for a faster build
| Use libcurl4-openssl-dev to prevent SSL errors. | Use libcurl4-openssl-dev to prevent SSL errors.
| YAML | mit | BetsyHamlinArt/BetsyHamlinArt.github.io,BetsyHamlinArt/BetsyHamlinArt.github.io,BetsyHamlinArt/BetsyHamlinArt.github.io | yaml | ## Code Before:
language: ruby
rvm:
- 2.3.1
gemfile: Gemfile.ci
script: bundle exec jekyll build && htmlproofer ./_site --check-html
branches:
only:
- master
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
sudo: false # route your build to the container-based infrastructure for a faster build
## Instruction:
Use libcurl4-openssl-dev to prevent SSL errors.
## Code After:
language: ruby
rvm:
- 2.3.1
gemfile: Gemfile.ci
script: bundle exec jekyll build && htmlproofer ./_site --check-html
branches:
only:
- master
addons:
apt:
packages:
- libcurl4-openssl-dev # required to avoid SSL errors
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
sudo: false # route your build to the container-based infrastructure for a faster build
| language: ruby
rvm:
- 2.3.1
gemfile: Gemfile.ci
script: bundle exec jekyll build && htmlproofer ./_site --check-html
branches:
only:
- master
+ addons:
+ apt:
+ packages:
+ - libcurl4-openssl-dev # required to avoid SSL errors
+
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true # speeds up installation of html-proofer
sudo: false # route your build to the container-based infrastructure for a faster build | 5 | 0.3125 | 5 | 0 |
2cddc19d39b0ff4d90d511230cd28c28525ab9b1 | pkgs/development/python-modules/oslo-context/default.nix | pkgs/development/python-modules/oslo-context/default.nix | { lib, buildPythonPackage, fetchPypi, debtcollector, oslotest, stestr, pbr }:
buildPythonPackage rec {
pname = "oslo.context";
version = "4.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-VarKqPrvz10M9mVJPVtqLCCKVl3Ft1y/CaBIypmagsw=";
};
postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests
# so instead of removing them one by one remove everything
rm test-requirements.txt
'';
propagatedBuildInputs = [
debtcollector
pbr
];
checkInputs = [
oslotest
stestr
];
checkPhase = ''
stestr run
'';
pythonImportsCheck = [ "oslo_context" ];
meta = with lib; {
description = "Oslo Context library";
homepage = "https://github.com/openstack/oslo.context";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}
| { lib, buildPythonPackage, fetchPypi, debtcollector, oslotest, stestr, pbr }:
buildPythonPackage rec {
pname = "oslo.context";
version = "3.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "970f96361c5de9a5dc86d48a648289d77118180ca13ba5eeb307137736ffa953";
};
postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests
# so instead of removing them one by one remove everything
rm test-requirements.txt
'';
propagatedBuildInputs = [
debtcollector
pbr
];
checkInputs = [
oslotest
stestr
];
checkPhase = ''
stestr run
'';
pythonImportsCheck = [ "oslo_context" ];
meta = with lib; {
description = "Oslo Context library";
homepage = "https://github.com/openstack/oslo.context";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}
| Revert "python310Packages.oslo-context: 3.4.0 -> 4.0.0" | Revert "python310Packages.oslo-context: 3.4.0 -> 4.0.0"
| Nix | mit | NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs | nix | ## Code Before:
{ lib, buildPythonPackage, fetchPypi, debtcollector, oslotest, stestr, pbr }:
buildPythonPackage rec {
pname = "oslo.context";
version = "4.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-VarKqPrvz10M9mVJPVtqLCCKVl3Ft1y/CaBIypmagsw=";
};
postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests
# so instead of removing them one by one remove everything
rm test-requirements.txt
'';
propagatedBuildInputs = [
debtcollector
pbr
];
checkInputs = [
oslotest
stestr
];
checkPhase = ''
stestr run
'';
pythonImportsCheck = [ "oslo_context" ];
meta = with lib; {
description = "Oslo Context library";
homepage = "https://github.com/openstack/oslo.context";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}
## Instruction:
Revert "python310Packages.oslo-context: 3.4.0 -> 4.0.0"
## Code After:
{ lib, buildPythonPackage, fetchPypi, debtcollector, oslotest, stestr, pbr }:
buildPythonPackage rec {
pname = "oslo.context";
version = "3.4.0";
src = fetchPypi {
inherit pname version;
sha256 = "970f96361c5de9a5dc86d48a648289d77118180ca13ba5eeb307137736ffa953";
};
postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests
# so instead of removing them one by one remove everything
rm test-requirements.txt
'';
propagatedBuildInputs = [
debtcollector
pbr
];
checkInputs = [
oslotest
stestr
];
checkPhase = ''
stestr run
'';
pythonImportsCheck = [ "oslo_context" ];
meta = with lib; {
description = "Oslo Context library";
homepage = "https://github.com/openstack/oslo.context";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}
| { lib, buildPythonPackage, fetchPypi, debtcollector, oslotest, stestr, pbr }:
buildPythonPackage rec {
pname = "oslo.context";
- version = "4.0.0";
? --
+ version = "3.4.0";
? ++
src = fetchPypi {
inherit pname version;
- sha256 = "sha256-VarKqPrvz10M9mVJPVtqLCCKVl3Ft1y/CaBIypmagsw=";
+ sha256 = "970f96361c5de9a5dc86d48a648289d77118180ca13ba5eeb307137736ffa953";
};
postPatch = ''
# only a small portion of the listed packages are actually needed for running the tests
# so instead of removing them one by one remove everything
rm test-requirements.txt
'';
propagatedBuildInputs = [
debtcollector
pbr
];
checkInputs = [
oslotest
stestr
];
checkPhase = ''
stestr run
'';
pythonImportsCheck = [ "oslo_context" ];
meta = with lib; {
description = "Oslo Context library";
homepage = "https://github.com/openstack/oslo.context";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
} | 4 | 0.1 | 2 | 2 |
441cccc340afeb205da75762ce6e145215a858b3 | src/zephyr/delayed_stream.py | src/zephyr/delayed_stream.py |
import threading
import collections
import itertools
import time
import zephyr
class DelayedRealTimeStream(threading.Thread):
def __init__(self, signal_collector, callbacks, delay):
threading.Thread.__init__(self)
self.signal_collector = signal_collector
self.callbacks = callbacks
self.delay = delay
self.stream_output_positions = collections.defaultdict(lambda: 0)
self.terminate_requested = False
def add_callback(self, callback):
self.callbacks.append(callback)
def terminate(self):
self.terminate_requested = True
def run(self):
while not self.terminate_requested:
delayed_current_time = zephyr.time() - self.delay
all_streams = itertools.chain(self.signal_collector.iterate_signal_stream_histories(),
self.signal_collector.iterate_event_streams())
for signal_stream_name, signal_stream_history in all_streams:
from_sample = self.stream_output_positions[signal_stream_name]
for sample in signal_stream_history.iterate_samples(from_sample, delayed_current_time):
self.stream_output_positions[signal_stream_name] += 1
for callback in self.callbacks:
callback(signal_stream_name, sample)
time.sleep(0.01)
|
import threading
import collections
import itertools
import time
import zephyr
class DelayedRealTimeStream(threading.Thread):
def __init__(self, signal_collector, callbacks, default_delay, specific_delays={}):
threading.Thread.__init__(self)
self.signal_collector = signal_collector
self.callbacks = callbacks
self.default_delay = default_delay
self.specific_delays = specific_delays
self.stream_output_positions = collections.defaultdict(lambda: 0)
self.terminate_requested = False
def add_callback(self, callback):
self.callbacks.append(callback)
def terminate(self):
self.terminate_requested = True
def run(self):
while not self.terminate_requested:
now = zephyr.time()
all_streams = itertools.chain(self.signal_collector.iterate_signal_stream_histories(),
self.signal_collector.iterate_event_streams())
for signal_stream_name, signal_stream_history in all_streams:
delay = self.specific_delays.get(signal_stream_name, self.default_delay)
delayed_current_time = now - delay
from_sample = self.stream_output_positions[signal_stream_name]
for sample in signal_stream_history.iterate_samples(from_sample, delayed_current_time):
self.stream_output_positions[signal_stream_name] += 1
for callback in self.callbacks:
callback(signal_stream_name, sample)
time.sleep(0.01)
| Split delay configuration into default_delay and specific_delays | Split delay configuration into default_delay and specific_delays | Python | bsd-2-clause | jpaalasm/zephyr-bt | python | ## Code Before:
import threading
import collections
import itertools
import time
import zephyr
class DelayedRealTimeStream(threading.Thread):
def __init__(self, signal_collector, callbacks, delay):
threading.Thread.__init__(self)
self.signal_collector = signal_collector
self.callbacks = callbacks
self.delay = delay
self.stream_output_positions = collections.defaultdict(lambda: 0)
self.terminate_requested = False
def add_callback(self, callback):
self.callbacks.append(callback)
def terminate(self):
self.terminate_requested = True
def run(self):
while not self.terminate_requested:
delayed_current_time = zephyr.time() - self.delay
all_streams = itertools.chain(self.signal_collector.iterate_signal_stream_histories(),
self.signal_collector.iterate_event_streams())
for signal_stream_name, signal_stream_history in all_streams:
from_sample = self.stream_output_positions[signal_stream_name]
for sample in signal_stream_history.iterate_samples(from_sample, delayed_current_time):
self.stream_output_positions[signal_stream_name] += 1
for callback in self.callbacks:
callback(signal_stream_name, sample)
time.sleep(0.01)
## Instruction:
Split delay configuration into default_delay and specific_delays
## Code After:
import threading
import collections
import itertools
import time
import zephyr
class DelayedRealTimeStream(threading.Thread):
def __init__(self, signal_collector, callbacks, default_delay, specific_delays={}):
threading.Thread.__init__(self)
self.signal_collector = signal_collector
self.callbacks = callbacks
self.default_delay = default_delay
self.specific_delays = specific_delays
self.stream_output_positions = collections.defaultdict(lambda: 0)
self.terminate_requested = False
def add_callback(self, callback):
self.callbacks.append(callback)
def terminate(self):
self.terminate_requested = True
def run(self):
while not self.terminate_requested:
now = zephyr.time()
all_streams = itertools.chain(self.signal_collector.iterate_signal_stream_histories(),
self.signal_collector.iterate_event_streams())
for signal_stream_name, signal_stream_history in all_streams:
delay = self.specific_delays.get(signal_stream_name, self.default_delay)
delayed_current_time = now - delay
from_sample = self.stream_output_positions[signal_stream_name]
for sample in signal_stream_history.iterate_samples(from_sample, delayed_current_time):
self.stream_output_positions[signal_stream_name] += 1
for callback in self.callbacks:
callback(signal_stream_name, sample)
time.sleep(0.01)
|
import threading
import collections
import itertools
import time
import zephyr
class DelayedRealTimeStream(threading.Thread):
- def __init__(self, signal_collector, callbacks, delay):
+ def __init__(self, signal_collector, callbacks, default_delay, specific_delays={}):
? ++++++++ ++++++++++++++++++++
threading.Thread.__init__(self)
self.signal_collector = signal_collector
self.callbacks = callbacks
- self.delay = delay
+ self.default_delay = default_delay
? ++++++++ ++++++++
+ self.specific_delays = specific_delays
self.stream_output_positions = collections.defaultdict(lambda: 0)
self.terminate_requested = False
def add_callback(self, callback):
self.callbacks.append(callback)
def terminate(self):
self.terminate_requested = True
def run(self):
while not self.terminate_requested:
+ now = zephyr.time()
- delayed_current_time = zephyr.time() - self.delay
-
all_streams = itertools.chain(self.signal_collector.iterate_signal_stream_histories(),
self.signal_collector.iterate_event_streams())
for signal_stream_name, signal_stream_history in all_streams:
+ delay = self.specific_delays.get(signal_stream_name, self.default_delay)
+
+ delayed_current_time = now - delay
+
from_sample = self.stream_output_positions[signal_stream_name]
for sample in signal_stream_history.iterate_samples(from_sample, delayed_current_time):
self.stream_output_positions[signal_stream_name] += 1
for callback in self.callbacks:
callback(signal_stream_name, sample)
time.sleep(0.01) | 12 | 0.3 | 8 | 4 |
5c41b668f1e72eee655ef52ac1c489ccb49f65f6 | dts/bindings/ethernet/nxp,kinetis-ethernet.yaml | dts/bindings/ethernet/nxp,kinetis-ethernet.yaml |
description: NXP Kinetis Ethernet
compatible: "nxp,kinetis-ethernet"
include: ethernet.yaml
properties:
reg:
required: true
interrupts:
required: true
|
description: NXP Kinetis Ethernet
compatible: "nxp,kinetis-ethernet"
include: ["ethernet.yaml", "ethernet,fixed-link.yaml"]
properties:
reg:
required: true
interrupts:
required: true
| Support 'fixed-link' property in nxp,kinetics-ethernet.yaml | dts: Support 'fixed-link' property in nxp,kinetics-ethernet.yaml
This commit enables support for parsing 'fixed-link' node when it
is added to node described in 'ethernet,fixed-link.yaml'.
Signed-off-by: Lukasz Majewski <7acbb0643e3da1a0f6f894ebd720fb3807e67dff@denx.de>
| YAML | apache-2.0 | nashif/zephyr,nashif/zephyr,galak/zephyr,finikorg/zephyr,Vudentz/zephyr,galak/zephyr,Vudentz/zephyr,Vudentz/zephyr,galak/zephyr,finikorg/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,nashif/zephyr,finikorg/zephyr,galak/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,finikorg/zephyr,finikorg/zephyr,nashif/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,nashif/zephyr | yaml | ## Code Before:
description: NXP Kinetis Ethernet
compatible: "nxp,kinetis-ethernet"
include: ethernet.yaml
properties:
reg:
required: true
interrupts:
required: true
## Instruction:
dts: Support 'fixed-link' property in nxp,kinetics-ethernet.yaml
This commit enables support for parsing 'fixed-link' node when it
is added to node described in 'ethernet,fixed-link.yaml'.
Signed-off-by: Lukasz Majewski <7acbb0643e3da1a0f6f894ebd720fb3807e67dff@denx.de>
## Code After:
description: NXP Kinetis Ethernet
compatible: "nxp,kinetis-ethernet"
include: ["ethernet.yaml", "ethernet,fixed-link.yaml"]
properties:
reg:
required: true
interrupts:
required: true
|
description: NXP Kinetis Ethernet
compatible: "nxp,kinetis-ethernet"
- include: ethernet.yaml
+ include: ["ethernet.yaml", "ethernet,fixed-link.yaml"]
properties:
reg:
required: true
interrupts:
required: true | 2 | 0.166667 | 1 | 1 |
fcee3c9f6eeb716d734b6a4aaf802d5c5ae091d1 | utility-scripts/install_node.sh | utility-scripts/install_node.sh |
rm -fR nvm
git clone https://github.com/creationix/nvm.git ./nvm && cd nvm && git checkout `git describe --abbrev=0 --tags` && cd ..
. ./nvm/nvm.sh
nvm install $1
|
rm -fR dependencies/nvm
git clone https://github.com/creationix/nvm.git ./dependencies/nvm && cd dependencies/nvm && git checkout `git describe --abbrev=0 --tags` && cd ../..
. ./dependencies/nvm/nvm.sh
nvm install $1
| Install nvm in dependencies/ so that eslint won't check it in CI | Install nvm in dependencies/ so that eslint won't check it in CI
| Shell | cc0-1.0 | redien/limbus-buildgen,redien/limbus-buildgen,redien/limbus-buildgen,redien/limbus-buildgen | shell | ## Code Before:
rm -fR nvm
git clone https://github.com/creationix/nvm.git ./nvm && cd nvm && git checkout `git describe --abbrev=0 --tags` && cd ..
. ./nvm/nvm.sh
nvm install $1
## Instruction:
Install nvm in dependencies/ so that eslint won't check it in CI
## Code After:
rm -fR dependencies/nvm
git clone https://github.com/creationix/nvm.git ./dependencies/nvm && cd dependencies/nvm && git checkout `git describe --abbrev=0 --tags` && cd ../..
. ./dependencies/nvm/nvm.sh
nvm install $1
|
- rm -fR nvm
+ rm -fR dependencies/nvm
- git clone https://github.com/creationix/nvm.git ./nvm && cd nvm && git checkout `git describe --abbrev=0 --tags` && cd ..
+ git clone https://github.com/creationix/nvm.git ./dependencies/nvm && cd dependencies/nvm && git checkout `git describe --abbrev=0 --tags` && cd ../..
? +++++++++++++ +++++++++++++ +++
- . ./nvm/nvm.sh
+ . ./dependencies/nvm/nvm.sh
nvm install $1 | 6 | 1.2 | 3 | 3 |
9715ca7ab9ae049b6e7b058c972e0ddd8aedf293 | bigtop-deploy/puppet/hieradata/bigtop/repo.yaml | bigtop-deploy/puppet/hieradata/bigtop/repo.yaml | bigtop::bigtop_repo_gpg_check: true
bigtop::bigtop_repo_apt_key: "BB95B97B18226C73CB2838D1DBBF9D42B7B4BD70"
bigtop::bigtop_repo_yum_key_url: "https://downloads.apache.org/bigtop/KEYS"
bigtop::bigtop_repo_default_version: "1.4.0"
| bigtop::bigtop_repo_gpg_check: true
bigtop::bigtop_repo_apt_key: "01621A73025BDCA30F4159C62922A48261524827"
bigtop::bigtop_repo_yum_key_url: "https://downloads.apache.org/bigtop/KEYS"
bigtop::bigtop_repo_default_version: "1.5.0"
| Update default values in hieradata for release 1.5.0 | Update default values in hieradata for release 1.5.0
| YAML | apache-2.0 | JunHe77/bigtop,sekikn/bigtop,sekikn/bigtop,apache/bigtop,apache/bigtop,JunHe77/bigtop,apache/bigtop,apache/bigtop,apache/bigtop,sekikn/bigtop,sekikn/bigtop,JunHe77/bigtop,JunHe77/bigtop,sekikn/bigtop | yaml | ## Code Before:
bigtop::bigtop_repo_gpg_check: true
bigtop::bigtop_repo_apt_key: "BB95B97B18226C73CB2838D1DBBF9D42B7B4BD70"
bigtop::bigtop_repo_yum_key_url: "https://downloads.apache.org/bigtop/KEYS"
bigtop::bigtop_repo_default_version: "1.4.0"
## Instruction:
Update default values in hieradata for release 1.5.0
## Code After:
bigtop::bigtop_repo_gpg_check: true
bigtop::bigtop_repo_apt_key: "01621A73025BDCA30F4159C62922A48261524827"
bigtop::bigtop_repo_yum_key_url: "https://downloads.apache.org/bigtop/KEYS"
bigtop::bigtop_repo_default_version: "1.5.0"
| bigtop::bigtop_repo_gpg_check: true
- bigtop::bigtop_repo_apt_key: "BB95B97B18226C73CB2838D1DBBF9D42B7B4BD70"
+ bigtop::bigtop_repo_apt_key: "01621A73025BDCA30F4159C62922A48261524827"
bigtop::bigtop_repo_yum_key_url: "https://downloads.apache.org/bigtop/KEYS"
- bigtop::bigtop_repo_default_version: "1.4.0"
? ^
+ bigtop::bigtop_repo_default_version: "1.5.0"
? ^
| 4 | 0.8 | 2 | 2 |
613c6917641d644fd91cbed4cf0e3fedb83c9c67 | src/com/urlcrawler/LineParserImpl.java | src/com/urlcrawler/LineParserImpl.java | package com.urlcrawler;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class LineParserImpl implements LineParser {
private Pattern regPattern;
private List<URL> links = new ArrayList<URL>();
public List<URL> extractUrl(String line) {
Matcher m = regPattern.matcher(line);
while (m.find()) {
try {
System.out.println("Converting string to URL: " + m.group(1));
URL url = new URL(m.group(1));
links.add(url);
} catch (MalformedURLException e) {
}
}
return links;
}
public void setRegularExpression(String regex) {
this.regPattern = Pattern.compile(regex);
}
}
| package com.urlcrawler;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class LineParserImpl implements LineParser {
private Pattern regPattern;
private List<URL> links = new ArrayList<URL>();
public List<URL> extractUrl(String line) {
links.clear();
Matcher m = regPattern.matcher(line);
while (m.find()) {
try {
System.out.println("Converting string to URL: " + m.group(1));
URL url = new URL(m.group(1));
links.add(url);
} catch (MalformedURLException e) {
}
}
return links;
}
public void setRegularExpression(String regex) {
this.regPattern = Pattern.compile(regex);
}
}
| Clean links list for each new cycle. | Clean links list for each new cycle. | Java | unlicense | yarixxx/UrlCrawler | java | ## Code Before:
package com.urlcrawler;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class LineParserImpl implements LineParser {
private Pattern regPattern;
private List<URL> links = new ArrayList<URL>();
public List<URL> extractUrl(String line) {
Matcher m = regPattern.matcher(line);
while (m.find()) {
try {
System.out.println("Converting string to URL: " + m.group(1));
URL url = new URL(m.group(1));
links.add(url);
} catch (MalformedURLException e) {
}
}
return links;
}
public void setRegularExpression(String regex) {
this.regPattern = Pattern.compile(regex);
}
}
## Instruction:
Clean links list for each new cycle.
## Code After:
package com.urlcrawler;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class LineParserImpl implements LineParser {
private Pattern regPattern;
private List<URL> links = new ArrayList<URL>();
public List<URL> extractUrl(String line) {
links.clear();
Matcher m = regPattern.matcher(line);
while (m.find()) {
try {
System.out.println("Converting string to URL: " + m.group(1));
URL url = new URL(m.group(1));
links.add(url);
} catch (MalformedURLException e) {
}
}
return links;
}
public void setRegularExpression(String regex) {
this.regPattern = Pattern.compile(regex);
}
}
| package com.urlcrawler;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class LineParserImpl implements LineParser {
private Pattern regPattern;
private List<URL> links = new ArrayList<URL>();
public List<URL> extractUrl(String line) {
+ links.clear();
Matcher m = regPattern.matcher(line);
while (m.find()) {
try {
System.out.println("Converting string to URL: " + m.group(1));
URL url = new URL(m.group(1));
links.add(url);
} catch (MalformedURLException e) {
}
}
return links;
}
public void setRegularExpression(String regex) {
this.regPattern = Pattern.compile(regex);
}
} | 1 | 0.03125 | 1 | 0 |
177de81c0a3995221970c24a0f208ea7483a4afe | us_ignite/templates/challenges/object_list.html | us_ignite/templates/challenges/object_list.html | {% extends "base.html" %}
{% block title %}Challenges - {{ block.super }}{% endblock title %}
{% block content %}
{% for object in object_list %}
{% include "challenges/object_block.html" %}
{% endfor%}
{% endblock content %}
| {% extends "includes/lists/object_list_base.html" %}
{% block title %}US Ignite Challenges - {{ block.super }}{% endblock title %}
{% block page_title %}Ignite Challenges{% endblock page_title %}
{% block top_panel %}
<div class="row panel">
<div class="small-12 columns">
<h2>Participate in a Challenge</h2>
<p>Lorem ipsum.</p>
</div>
</div>
<div class="row newsletter newsletter--primary">
<div class="small-12 medium-8 columns newsletter__column">
<h4 class="newsletter__heading"><strong>GOT A GREAT IDEA FOR AN APPLICATION?</strong> TELL US ABOUT IT...</h4>
</div>
<div class="small-12 medium-4 columns newsletter__column">
<a href="{% url 'app_add' %}" class="button alert postfix">SUBMIT YOUR APP</a>{% csrf_token %}
</div>
</div>
{% endblock top_panel %}
{% block add_to_list %}
<div class="row newsletter newsletter--primary">
<div class="small-12 medium-8 columns newsletter__column">
<h4 class="newsletter__heading"><strong>GOT A GREAT IDEA FOR AN APPLICATION?</strong> TELL US ABOUT IT...</h4>
</div>
<div class="small-12 medium-4 columns newsletter__column">
<a href="{% url 'app_add' %}" class="button alert postfix">SUBMIT YOUR APP</a>{% csrf_token %}
</div>
</div>
{% endblock add_to_list %}
{% block tags %}{% endblock tags %}
| Update listing in the challenges. | Update listing in the challenges.
| HTML | bsd-3-clause | us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite | html | ## Code Before:
{% extends "base.html" %}
{% block title %}Challenges - {{ block.super }}{% endblock title %}
{% block content %}
{% for object in object_list %}
{% include "challenges/object_block.html" %}
{% endfor%}
{% endblock content %}
## Instruction:
Update listing in the challenges.
## Code After:
{% extends "includes/lists/object_list_base.html" %}
{% block title %}US Ignite Challenges - {{ block.super }}{% endblock title %}
{% block page_title %}Ignite Challenges{% endblock page_title %}
{% block top_panel %}
<div class="row panel">
<div class="small-12 columns">
<h2>Participate in a Challenge</h2>
<p>Lorem ipsum.</p>
</div>
</div>
<div class="row newsletter newsletter--primary">
<div class="small-12 medium-8 columns newsletter__column">
<h4 class="newsletter__heading"><strong>GOT A GREAT IDEA FOR AN APPLICATION?</strong> TELL US ABOUT IT...</h4>
</div>
<div class="small-12 medium-4 columns newsletter__column">
<a href="{% url 'app_add' %}" class="button alert postfix">SUBMIT YOUR APP</a>{% csrf_token %}
</div>
</div>
{% endblock top_panel %}
{% block add_to_list %}
<div class="row newsletter newsletter--primary">
<div class="small-12 medium-8 columns newsletter__column">
<h4 class="newsletter__heading"><strong>GOT A GREAT IDEA FOR AN APPLICATION?</strong> TELL US ABOUT IT...</h4>
</div>
<div class="small-12 medium-4 columns newsletter__column">
<a href="{% url 'app_add' %}" class="button alert postfix">SUBMIT YOUR APP</a>{% csrf_token %}
</div>
</div>
{% endblock add_to_list %}
{% block tags %}{% endblock tags %}
| - {% extends "base.html" %}
+ {% extends "includes/lists/object_list_base.html" %}
- {% block title %}Challenges - {{ block.super }}{% endblock title %}
+ {% block title %}US Ignite Challenges - {{ block.super }}{% endblock title %}
? ++++++++++
- {% block content %}
+ {% block page_title %}Ignite Challenges{% endblock page_title %}
- {% for object in object_list %}
- {% include "challenges/object_block.html" %}
- {% endfor%}
+ {% block top_panel %}
+ <div class="row panel">
+ <div class="small-12 columns">
+ <h2>Participate in a Challenge</h2>
+ <p>Lorem ipsum.</p>
+ </div>
+ </div>
+ <div class="row newsletter newsletter--primary">
+ <div class="small-12 medium-8 columns newsletter__column">
+ <h4 class="newsletter__heading"><strong>GOT A GREAT IDEA FOR AN APPLICATION?</strong> TELL US ABOUT IT...</h4>
+ </div>
+ <div class="small-12 medium-4 columns newsletter__column">
+ <a href="{% url 'app_add' %}" class="button alert postfix">SUBMIT YOUR APP</a>{% csrf_token %}
+ </div>
+ </div>
- {% endblock content %}
? ^ - ^^
+ {% endblock top_panel %}
? ^ ++++ ^
+
+ {% block add_to_list %}
+ <div class="row newsletter newsletter--primary">
+ <div class="small-12 medium-8 columns newsletter__column">
+ <h4 class="newsletter__heading"><strong>GOT A GREAT IDEA FOR AN APPLICATION?</strong> TELL US ABOUT IT...</h4>
+ </div>
+ <div class="small-12 medium-4 columns newsletter__column">
+ <a href="{% url 'app_add' %}" class="button alert postfix">SUBMIT YOUR APP</a>{% csrf_token %}
+ </div>
+ </div>
+ {% endblock add_to_list %}
+
+ {% block tags %}{% endblock tags %} | 39 | 3.545455 | 32 | 7 |
39610d435c088b22291b0ca8cc57e0245ec77762 | roles/tileserver/vars/main.yml | roles/tileserver/vars/main.yml | project_name: firecares
application_name: tileserver
virtualenv_path: "/webapps/{{ application_name }}"
project_path: "{{virtualenv_path}}/tileserver"
requirements_file: "{{ project_path }}/requirements.txt"
application_log_dir: "{{ virtualenv_path }}/logs"
application_log_file: "{{ application_log_dir }}/tileserver.log"
tessera_application_log_file: "{{ application_log_dir }}/tileserver_tessera.log"
# Gunicorn settings
gunicorn_user: "{{ project_name }}"
gunicorn_group: webapps
server_root_dir: /webapps
gunicorn_max_requests: 0
nginx_server_name: "{{application_name}}"
nginx_access_log_file: "{{ application_log_dir }}/nginx_access.log"
nginx_error_log_file: "{{ application_log_dir }}/nginx_error.log"
tiles_path: "/tiles"
aws_tile_cache_bucket: "firecares-tiles-cache"
# Django Environment variables
tileserver_environment:
AWS_STORAGE_BUCKET_NAME: "{{ aws_tile_cache_bucket|default(omit) }}"
AWS_ACCESS_KEY_ID: "{{ aws_access_key_id|default(omit) }}"
AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key|default(omit) }}" | project_name: firecares
application_name: tileserver
virtualenv_path: "/webapps/{{ application_name }}"
project_path: "{{virtualenv_path}}/tileserver"
requirements_file: "{{ project_path }}/requirements.txt"
application_log_dir: "{{ virtualenv_path }}/logs"
application_log_file: "{{ application_log_dir }}/tileserver.log"
tessera_application_log_file: "{{ application_log_dir }}/tileserver_tessera.log"
git_repo: https://github.com/FireCARES/tileserver
# Gunicorn settings
gunicorn_user: "{{ project_name }}"
gunicorn_group: webapps
server_root_dir: /webapps
gunicorn_max_requests: 0
nginx_server_name: "{{application_name}}"
nginx_access_log_file: "{{ application_log_dir }}/nginx_access.log"
nginx_error_log_file: "{{ application_log_dir }}/nginx_error.log"
tiles_path: "/tiles"
aws_tile_cache_bucket: "firecares-tiles-cache"
# Django Environment variables
tileserver_environment:
AWS_STORAGE_BUCKET_NAME: "{{ aws_tile_cache_bucket|default(omit) }}"
AWS_ACCESS_KEY_ID: "{{ aws_access_key_id|default(omit) }}"
AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key|default(omit) }}" | Set the tileserver git repository | Set the tileserver git repository
| YAML | mit | meilinger/firecares-ansible,meilinger/firecares-ansible,FireCARES/firecares-ansible,FireCARES/firecares-ansible,FireCARES/firecares-ansible | yaml | ## Code Before:
project_name: firecares
application_name: tileserver
virtualenv_path: "/webapps/{{ application_name }}"
project_path: "{{virtualenv_path}}/tileserver"
requirements_file: "{{ project_path }}/requirements.txt"
application_log_dir: "{{ virtualenv_path }}/logs"
application_log_file: "{{ application_log_dir }}/tileserver.log"
tessera_application_log_file: "{{ application_log_dir }}/tileserver_tessera.log"
# Gunicorn settings
gunicorn_user: "{{ project_name }}"
gunicorn_group: webapps
server_root_dir: /webapps
gunicorn_max_requests: 0
nginx_server_name: "{{application_name}}"
nginx_access_log_file: "{{ application_log_dir }}/nginx_access.log"
nginx_error_log_file: "{{ application_log_dir }}/nginx_error.log"
tiles_path: "/tiles"
aws_tile_cache_bucket: "firecares-tiles-cache"
# Django Environment variables
tileserver_environment:
AWS_STORAGE_BUCKET_NAME: "{{ aws_tile_cache_bucket|default(omit) }}"
AWS_ACCESS_KEY_ID: "{{ aws_access_key_id|default(omit) }}"
AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key|default(omit) }}"
## Instruction:
Set the tileserver git repository
## Code After:
project_name: firecares
application_name: tileserver
virtualenv_path: "/webapps/{{ application_name }}"
project_path: "{{virtualenv_path}}/tileserver"
requirements_file: "{{ project_path }}/requirements.txt"
application_log_dir: "{{ virtualenv_path }}/logs"
application_log_file: "{{ application_log_dir }}/tileserver.log"
tessera_application_log_file: "{{ application_log_dir }}/tileserver_tessera.log"
git_repo: https://github.com/FireCARES/tileserver
# Gunicorn settings
gunicorn_user: "{{ project_name }}"
gunicorn_group: webapps
server_root_dir: /webapps
gunicorn_max_requests: 0
nginx_server_name: "{{application_name}}"
nginx_access_log_file: "{{ application_log_dir }}/nginx_access.log"
nginx_error_log_file: "{{ application_log_dir }}/nginx_error.log"
tiles_path: "/tiles"
aws_tile_cache_bucket: "firecares-tiles-cache"
# Django Environment variables
tileserver_environment:
AWS_STORAGE_BUCKET_NAME: "{{ aws_tile_cache_bucket|default(omit) }}"
AWS_ACCESS_KEY_ID: "{{ aws_access_key_id|default(omit) }}"
AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key|default(omit) }}" | project_name: firecares
application_name: tileserver
virtualenv_path: "/webapps/{{ application_name }}"
project_path: "{{virtualenv_path}}/tileserver"
requirements_file: "{{ project_path }}/requirements.txt"
application_log_dir: "{{ virtualenv_path }}/logs"
application_log_file: "{{ application_log_dir }}/tileserver.log"
tessera_application_log_file: "{{ application_log_dir }}/tileserver_tessera.log"
+
+ git_repo: https://github.com/FireCARES/tileserver
# Gunicorn settings
gunicorn_user: "{{ project_name }}"
gunicorn_group: webapps
server_root_dir: /webapps
gunicorn_max_requests: 0
nginx_server_name: "{{application_name}}"
nginx_access_log_file: "{{ application_log_dir }}/nginx_access.log"
nginx_error_log_file: "{{ application_log_dir }}/nginx_error.log"
tiles_path: "/tiles"
aws_tile_cache_bucket: "firecares-tiles-cache"
# Django Environment variables
tileserver_environment:
AWS_STORAGE_BUCKET_NAME: "{{ aws_tile_cache_bucket|default(omit) }}"
AWS_ACCESS_KEY_ID: "{{ aws_access_key_id|default(omit) }}"
AWS_SECRET_ACCESS_KEY: "{{ aws_secret_access_key|default(omit) }}" | 2 | 0.076923 | 2 | 0 |
ffc501b3333a311ac079252f61420efd35f92e74 | flutter_cache_manager/pubspec.yaml | flutter_cache_manager/pubspec.yaml | name: flutter_cache_manager
description: Generic cache manager for flutter. Saves web files on the storages of the device and saves the cache info using sqflite.
version: 3.0.0
homepage: https://github.com/Baseflow/flutter_cache_manager
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
clock: ^1.1.0
collection: ^1.15.0
file: ^6.1.0
flutter:
sdk: flutter
http: ^0.13.0
image: ^3.0.1
path: ^1.8.0
path_provider: ^2.0.0
pedantic: ^1.10.0
rxdart: ^0.26.0
sqflite: ^2.0.0+3
uuid: ^3.0.0
dev_dependencies:
build_runner: ^1.11.5
flutter_test:
sdk: flutter
mockito: ^5.0.0
| name: flutter_cache_manager
description: Generic cache manager for flutter. Saves web files on the storages of the device and saves the cache info using sqflite.
version: 3.0.0
homepage: https://github.com/Baseflow/flutter_cache_manager
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
clock: ^1.1.0
collection: ^1.15.0
file: ">=6.0.0 <7.0.0"
flutter:
sdk: flutter
http: ^0.13.0
image: ^3.0.1
path: ^1.8.0
path_provider: ^2.0.0
pedantic: ^1.10.0
rxdart: ^0.26.0
sqflite: ^2.0.0+3
uuid: ^3.0.0
dev_dependencies:
build_runner: ^1.11.5
flutter_test:
sdk: flutter
mockito: ^5.0.0
| Allow usage of file v6.0.0 | Allow usage of file v6.0.0
| YAML | mit | Baseflow/flutter_cache_manager,Baseflow/flutter_cache_manager,Baseflow/flutter_cache_manager,Baseflow/flutter_cache_manager | yaml | ## Code Before:
name: flutter_cache_manager
description: Generic cache manager for flutter. Saves web files on the storages of the device and saves the cache info using sqflite.
version: 3.0.0
homepage: https://github.com/Baseflow/flutter_cache_manager
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
clock: ^1.1.0
collection: ^1.15.0
file: ^6.1.0
flutter:
sdk: flutter
http: ^0.13.0
image: ^3.0.1
path: ^1.8.0
path_provider: ^2.0.0
pedantic: ^1.10.0
rxdart: ^0.26.0
sqflite: ^2.0.0+3
uuid: ^3.0.0
dev_dependencies:
build_runner: ^1.11.5
flutter_test:
sdk: flutter
mockito: ^5.0.0
## Instruction:
Allow usage of file v6.0.0
## Code After:
name: flutter_cache_manager
description: Generic cache manager for flutter. Saves web files on the storages of the device and saves the cache info using sqflite.
version: 3.0.0
homepage: https://github.com/Baseflow/flutter_cache_manager
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
clock: ^1.1.0
collection: ^1.15.0
file: ">=6.0.0 <7.0.0"
flutter:
sdk: flutter
http: ^0.13.0
image: ^3.0.1
path: ^1.8.0
path_provider: ^2.0.0
pedantic: ^1.10.0
rxdart: ^0.26.0
sqflite: ^2.0.0+3
uuid: ^3.0.0
dev_dependencies:
build_runner: ^1.11.5
flutter_test:
sdk: flutter
mockito: ^5.0.0
| name: flutter_cache_manager
description: Generic cache manager for flutter. Saves web files on the storages of the device and saves the cache info using sqflite.
version: 3.0.0
homepage: https://github.com/Baseflow/flutter_cache_manager
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
clock: ^1.1.0
collection: ^1.15.0
- file: ^6.1.0
+ file: ">=6.0.0 <7.0.0"
flutter:
sdk: flutter
http: ^0.13.0
image: ^3.0.1
path: ^1.8.0
path_provider: ^2.0.0
pedantic: ^1.10.0
rxdart: ^0.26.0
sqflite: ^2.0.0+3
uuid: ^3.0.0
dev_dependencies:
build_runner: ^1.11.5
flutter_test:
sdk: flutter
mockito: ^5.0.0 | 2 | 0.071429 | 1 | 1 |
701925b0df403a0eb90ff030f11ed4aa0939d617 | 3-archive-rootfs.sh | 3-archive-rootfs.sh |
TAR_EXTENSION=.tar.gz
# Check architecture and set variables
if [[ ! $check_and_set ]]; then
. 0-check-and-set.sh $1
fi
tar cfz $build_dir/$rootfs_dir$TAR_EXTENSION $build_dir/$rootfs_dir
echo
echo "$build_dir/$rootfs_dir$TAR_EXTENSION created"
|
TAR_EXTENSION=.tar.gz
# Check architecture and set variables
if [[ ! $check_and_set ]]; then
. 0-check-and-set.sh $1
fi
cd $build_dir
tar cfz $rootfs_dir$TAR_EXTENSION $rootfs_dir
cd - >/dev/null
echo
echo "$build_dir/$rootfs_dir$TAR_EXTENSION created"
| Remove subfolders in compressed tarball | Remove subfolders in compressed tarball
| Shell | mit | jubinson/debian-rootfs | shell | ## Code Before:
TAR_EXTENSION=.tar.gz
# Check architecture and set variables
if [[ ! $check_and_set ]]; then
. 0-check-and-set.sh $1
fi
tar cfz $build_dir/$rootfs_dir$TAR_EXTENSION $build_dir/$rootfs_dir
echo
echo "$build_dir/$rootfs_dir$TAR_EXTENSION created"
## Instruction:
Remove subfolders in compressed tarball
## Code After:
TAR_EXTENSION=.tar.gz
# Check architecture and set variables
if [[ ! $check_and_set ]]; then
. 0-check-and-set.sh $1
fi
cd $build_dir
tar cfz $rootfs_dir$TAR_EXTENSION $rootfs_dir
cd - >/dev/null
echo
echo "$build_dir/$rootfs_dir$TAR_EXTENSION created"
|
TAR_EXTENSION=.tar.gz
# Check architecture and set variables
if [[ ! $check_and_set ]]; then
. 0-check-and-set.sh $1
fi
+ cd $build_dir
- tar cfz $build_dir/$rootfs_dir$TAR_EXTENSION $build_dir/$rootfs_dir
? ----------- -----------
+ tar cfz $rootfs_dir$TAR_EXTENSION $rootfs_dir
+ cd - >/dev/null
echo
echo "$build_dir/$rootfs_dir$TAR_EXTENSION created" | 4 | 0.333333 | 3 | 1 |
eef40b00693e72360a6ecfbd65700e6436caa521 | .travis.yml | .travis.yml | language: ruby
cache: bundle
sudo: false
rvm:
- 1.9.3
- 2.0
- 2.1
- 2.2.0
- jruby
- jruby-head
- rbx-2
env:
global:
- JRUBY_OPTS='-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.mode=OFF -J-Djruby.compile.invokedynamic=false'
matrix:
allow_failures:
- rvm: jruby
- rvm: jruby-head
- rvm: rbx-2
gemfile:
- Gemfile
- gemfiles/Gemfile.actionpack3.2
- gemfiles/Gemfile.actionpack4.0
- gemfiles/Gemfile.actionpack4.2
script: bundle exec rake
| language: ruby
cache: bundle
sudo: false
rvm:
- 1.9.3
- 2.0
- 2.1
- 2.2.0
- jruby
- jruby-head
- rbx-2
env:
global:
- JRUBY_OPTS='-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.mode=OFF -J-Djruby.compile.invokedynamic=false'
matrix:
allow_failures:
- rvm: jruby
- rvm: jruby-head
gemfile:
- Gemfile
- gemfiles/Gemfile.actionpack3.2
- gemfiles/Gemfile.actionpack4.0
- gemfiles/Gemfile.actionpack4.2
script: bundle exec rake
| Remove Rubinius from allowed failures list | Remove Rubinius from allowed failures list
| YAML | mit | jtmarmon/lograge,roidrage/lograge,smudge/lograge,pxlpnk/lograge,steviee/lograge | yaml | ## Code Before:
language: ruby
cache: bundle
sudo: false
rvm:
- 1.9.3
- 2.0
- 2.1
- 2.2.0
- jruby
- jruby-head
- rbx-2
env:
global:
- JRUBY_OPTS='-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.mode=OFF -J-Djruby.compile.invokedynamic=false'
matrix:
allow_failures:
- rvm: jruby
- rvm: jruby-head
- rvm: rbx-2
gemfile:
- Gemfile
- gemfiles/Gemfile.actionpack3.2
- gemfiles/Gemfile.actionpack4.0
- gemfiles/Gemfile.actionpack4.2
script: bundle exec rake
## Instruction:
Remove Rubinius from allowed failures list
## Code After:
language: ruby
cache: bundle
sudo: false
rvm:
- 1.9.3
- 2.0
- 2.1
- 2.2.0
- jruby
- jruby-head
- rbx-2
env:
global:
- JRUBY_OPTS='-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.mode=OFF -J-Djruby.compile.invokedynamic=false'
matrix:
allow_failures:
- rvm: jruby
- rvm: jruby-head
gemfile:
- Gemfile
- gemfiles/Gemfile.actionpack3.2
- gemfiles/Gemfile.actionpack4.0
- gemfiles/Gemfile.actionpack4.2
script: bundle exec rake
| language: ruby
cache: bundle
sudo: false
rvm:
- 1.9.3
- 2.0
- 2.1
- 2.2.0
- jruby
- jruby-head
- rbx-2
env:
global:
- JRUBY_OPTS='-J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-Djruby.compile.mode=OFF -J-Djruby.compile.invokedynamic=false'
matrix:
allow_failures:
- rvm: jruby
- rvm: jruby-head
- - rvm: rbx-2
gemfile:
- Gemfile
- gemfiles/Gemfile.actionpack3.2
- gemfiles/Gemfile.actionpack4.0
- gemfiles/Gemfile.actionpack4.2
script: bundle exec rake | 1 | 0.04 | 0 | 1 |
6dd9710c0b672a141d6aa41a0c65d34dd1603a61 | src/state/main_menu_state.cpp | src/state/main_menu_state.cpp |
namespace Quoridor {
MainMenuState::MainMenuState()
{
}
MainMenuState::~MainMenuState()
{
}
void MainMenuState::handle_events(StateManager *stm, std::shared_ptr<UI::UIImpl> ui)
{
UI::Event ev;
if (ui->poll_event(&ev)) {
switch (ev) {
case UI::kEnter: {
std::shared_ptr<Quoridor::IState> game_state(new Quoridor::GameState());
stm->change_state(std::shared_ptr<Quoridor::IState>(game_state));
}
break;
case UI::kEsc:
stm->stop();
break;
default:
break;
}
}
}
void MainMenuState::update()
{
}
void MainMenuState::draw(std::shared_ptr<UI::UIImpl> /* ui */)
{
}
void MainMenuState::change_state()
{
}
} /* namespace Quoridor */
|
namespace Quoridor {
MainMenuState::MainMenuState()
{
}
MainMenuState::~MainMenuState()
{
}
void MainMenuState::handle_events(StateManager *stm,
std::shared_ptr<UI::UIImpl> ui)
{
UI::Event ev;
if (ui->poll_event(&ev)) {
switch (ev) {
case UI::kEnter: {
std::shared_ptr<IState> start_game_state(new StartGameState(ui));
stm->change_state(std::shared_ptr<IState>(start_game_state));
}
break;
case UI::kEsc:
stm->stop();
break;
default:
break;
}
}
}
void MainMenuState::update()
{
}
void MainMenuState::draw(std::shared_ptr<UI::UIImpl> /* ui */)
{
}
void MainMenuState::change_state()
{
}
} /* namespace Quoridor */
| Fix state switching in main menu. | Fix state switching in main menu.
| C++ | mit | sfod/quoridor | c++ | ## Code Before:
namespace Quoridor {
MainMenuState::MainMenuState()
{
}
MainMenuState::~MainMenuState()
{
}
void MainMenuState::handle_events(StateManager *stm, std::shared_ptr<UI::UIImpl> ui)
{
UI::Event ev;
if (ui->poll_event(&ev)) {
switch (ev) {
case UI::kEnter: {
std::shared_ptr<Quoridor::IState> game_state(new Quoridor::GameState());
stm->change_state(std::shared_ptr<Quoridor::IState>(game_state));
}
break;
case UI::kEsc:
stm->stop();
break;
default:
break;
}
}
}
void MainMenuState::update()
{
}
void MainMenuState::draw(std::shared_ptr<UI::UIImpl> /* ui */)
{
}
void MainMenuState::change_state()
{
}
} /* namespace Quoridor */
## Instruction:
Fix state switching in main menu.
## Code After:
namespace Quoridor {
MainMenuState::MainMenuState()
{
}
MainMenuState::~MainMenuState()
{
}
void MainMenuState::handle_events(StateManager *stm,
std::shared_ptr<UI::UIImpl> ui)
{
UI::Event ev;
if (ui->poll_event(&ev)) {
switch (ev) {
case UI::kEnter: {
std::shared_ptr<IState> start_game_state(new StartGameState(ui));
stm->change_state(std::shared_ptr<IState>(start_game_state));
}
break;
case UI::kEsc:
stm->stop();
break;
default:
break;
}
}
}
void MainMenuState::update()
{
}
void MainMenuState::draw(std::shared_ptr<UI::UIImpl> /* ui */)
{
}
void MainMenuState::change_state()
{
}
} /* namespace Quoridor */
|
namespace Quoridor {
MainMenuState::MainMenuState()
{
}
MainMenuState::~MainMenuState()
{
}
- void MainMenuState::handle_events(StateManager *stm, std::shared_ptr<UI::UIImpl> ui)
? --------------------------------
+ void MainMenuState::handle_events(StateManager *stm,
+ std::shared_ptr<UI::UIImpl> ui)
{
UI::Event ev;
if (ui->poll_event(&ev)) {
switch (ev) {
case UI::kEnter: {
- std::shared_ptr<Quoridor::IState> game_state(new Quoridor::GameState());
? ---------- ^^^ ^^^^^^
+ std::shared_ptr<IState> start_game_state(new StartGameState(ui));
? ++++++ ^^^ ^ ++
- stm->change_state(std::shared_ptr<Quoridor::IState>(game_state));
? ----------
+ stm->change_state(std::shared_ptr<IState>(start_game_state));
? ++++++
}
break;
case UI::kEsc:
stm->stop();
break;
default:
break;
}
}
}
void MainMenuState::update()
{
}
void MainMenuState::draw(std::shared_ptr<UI::UIImpl> /* ui */)
{
}
void MainMenuState::change_state()
{
}
} /* namespace Quoridor */ | 7 | 0.162791 | 4 | 3 |
c1f06e014582a4355616bd3b8a4e216ec21c600a | website/static/js/growlBox.js | website/static/js/growlBox.js | // website/static/js/growlBox.js
// Initial semicolon for safe minification
;(function (global, factory) {
// Support RequireJS/AMD or no module loader
if (typeof define === 'function' && define.amd) {
// Dependency IDs here
define(['jquery', 'vendor/bower_components/bootstrap.growl/bootstrap-growl'], factory);
} else { // No module loader, just attach to global namespace
global.GrowlBox = factory(jQuery);
}
}(this, function($) { // named dependencies here
'use strict';
// Private methods go up here
// This is the public API
// The constructor
function GrowlBox (title, message) {
var self = this;
if (typeof title === 'undefined'){
title = '';
}
self.title = title;
self.message = message;
self.init(self);
}
// Methods
GrowlBox.prototype.init = function(self) {
$.growl({
title: '<strong>' + self.title + '<strong><br />',
message: self.message
},{
type: 'danger',
delay: 0
});
};
return GrowlBox;
})); | // website/static/js/growlBox.js
// Initial semicolon for safe minification
;(function (global, factory) {
// Support RequireJS/AMD or no module loader
if (typeof define === 'function' && define.amd) {
// Dependency IDs here
define(['jquery', 'vendor/bower_components/bootstrap.growl/bootstrap-growl'], factory);
} else { // No module loader, just attach to global namespace
global.GrowlBox = factory(jQuery);
}
}(this, function($) { // named dependencies here
'use strict';
// Private methods go up here
// This is the public API
// The constructor
function GrowlBox (title, message) {
var self = this;
self.title = title;
self.message = message;
self.init(self);
}
// Methods
GrowlBox.prototype.init = function(self) {
$.growl({
title: '<strong>' + self.title + '<strong><br />',
message: self.message
},{
type: 'danger',
delay: 0
});
};
return GrowlBox;
})); | Remove option for empty title | Remove option for empty title
Looks terrible without a title. We shouldn't do it.
| JavaScript | apache-2.0 | revanthkolli/osf.io,petermalcolm/osf.io,aaxelb/osf.io,revanthkolli/osf.io,cslzchen/osf.io,MerlinZhang/osf.io,brandonPurvis/osf.io,jolene-esposito/osf.io,DanielSBrown/osf.io,ticklemepierce/osf.io,mfraezz/osf.io,sbt9uc/osf.io,jeffreyliu3230/osf.io,ZobairAlijan/osf.io,monikagrabowska/osf.io,doublebits/osf.io,haoyuchen1992/osf.io,hmoco/osf.io,fabianvf/osf.io,kwierman/osf.io,HarryRybacki/osf.io,mfraezz/osf.io,wearpants/osf.io,reinaH/osf.io,pattisdr/osf.io,jmcarp/osf.io,kch8qx/osf.io,himanshuo/osf.io,GageGaskins/osf.io,mattclark/osf.io,samanehsan/osf.io,SSJohns/osf.io,cosenal/osf.io,brianjgeiger/osf.io,petermalcolm/osf.io,amyshi188/osf.io,wearpants/osf.io,aaxelb/osf.io,GageGaskins/osf.io,Ghalko/osf.io,doublebits/osf.io,kushG/osf.io,doublebits/osf.io,mluo613/osf.io,asanfilippo7/osf.io,cldershem/osf.io,brandonPurvis/osf.io,cwisecarver/osf.io,TomBaxter/osf.io,sloria/osf.io,baylee-d/osf.io,felliott/osf.io,cslzchen/osf.io,petermalcolm/osf.io,danielneis/osf.io,chrisseto/osf.io,chrisseto/osf.io,kushG/osf.io,lyndsysimon/osf.io,binoculars/osf.io,sbt9uc/osf.io,acshi/osf.io,cldershem/osf.io,dplorimer/osf,barbour-em/osf.io,caseyrollins/osf.io,crcresearch/osf.io,HalcyonChimera/osf.io,Nesiehr/osf.io,barbour-em/osf.io,asanfilippo7/osf.io,leb2dg/osf.io,saradbowman/osf.io,acshi/osf.io,kch8qx/osf.io,monikagrabowska/osf.io,HarryRybacki/osf.io,caseyrollins/osf.io,kwierman/osf.io,samanehsan/osf.io,erinspace/osf.io,alexschiller/osf.io,brandonPurvis/osf.io,icereval/osf.io,samanehsan/osf.io,KAsante95/osf.io,billyhunt/osf.io,adlius/osf.io,caseyrygt/osf.io,GageGaskins/osf.io,kwierman/osf.io,jinluyuan/osf.io,haoyuchen1992/osf.io,zachjanicki/osf.io,mluo613/osf.io,reinaH/osf.io,TomBaxter/osf.io,acshi/osf.io,alexschiller/osf.io,haoyuchen1992/osf.io,aaxelb/osf.io,felliott/osf.io,alexschiller/osf.io,CenterForOpenScience/osf.io,abought/osf.io,TomHeatwole/osf.io,HarryRybacki/osf.io,Johnetordoff/osf.io,danielneis/osf.io,jeffreyliu3230/osf.io,jinluyuan/osf.io,jnayak1/osf.io,dplorimer/osf,brianjgeiger/osf.io,jinluyuan/osf.io,leb2dg/osf.io,brianjgeiger/osf.io,petermalcolm/osf.io,bdyetton/prettychart,dplorimer/osf,fabianvf/osf.io,ZobairAlijan/osf.io,billyhunt/osf.io,RomanZWang/osf.io,zamattiac/osf.io,abought/osf.io,cslzchen/osf.io,amyshi188/osf.io,himanshuo/osf.io,adlius/osf.io,rdhyee/osf.io,samchrisinger/osf.io,HarryRybacki/osf.io,kushG/osf.io,chennan47/osf.io,samchrisinger/osf.io,erinspace/osf.io,abought/osf.io,laurenrevere/osf.io,doublebits/osf.io,mattclark/osf.io,cosenal/osf.io,DanielSBrown/osf.io,hmoco/osf.io,samchrisinger/osf.io,ticklemepierce/osf.io,crcresearch/osf.io,chrisseto/osf.io,GageGaskins/osf.io,emetsger/osf.io,binoculars/osf.io,pattisdr/osf.io,leb2dg/osf.io,Ghalko/osf.io,ZobairAlijan/osf.io,SSJohns/osf.io,bdyetton/prettychart,rdhyee/osf.io,HalcyonChimera/osf.io,mluke93/osf.io,cwisecarver/osf.io,barbour-em/osf.io,DanielSBrown/osf.io,mattclark/osf.io,caseyrygt/osf.io,lyndsysimon/osf.io,brianjgeiger/osf.io,sbt9uc/osf.io,jnayak1/osf.io,caseyrygt/osf.io,ZobairAlijan/osf.io,amyshi188/osf.io,zkraime/osf.io,HalcyonChimera/osf.io,alexschiller/osf.io,himanshuo/osf.io,zamattiac/osf.io,Nesiehr/osf.io,MerlinZhang/osf.io,brandonPurvis/osf.io,jeffreyliu3230/osf.io,Nesiehr/osf.io,jmcarp/osf.io,KAsante95/osf.io,abought/osf.io,alexschiller/osf.io,ckc6cz/osf.io,jolene-esposito/osf.io,mluo613/osf.io,wearpants/osf.io,jnayak1/osf.io,billyhunt/osf.io,emetsger/osf.io,rdhyee/osf.io,billyhunt/osf.io,KAsante95/osf.io,Ghalko/osf.io,danielneis/osf.io,lyndsysimon/osf.io,sloria/osf.io,GaryKriebel/osf.io,ckc6cz/osf.io,GaryKriebel/osf.io,fabianvf/osf.io,felliott/osf.io,AndrewSallans/osf.io,lamdnhan/osf.io,Johnetordoff/osf.io,mluke93/osf.io,RomanZWang/osf.io,brandonPurvis/osf.io,baylee-d/osf.io,TomBaxter/osf.io,jolene-esposito/osf.io,monikagrabowska/osf.io,GageGaskins/osf.io,acshi/osf.io,emetsger/osf.io,bdyetton/prettychart,cosenal/osf.io,hmoco/osf.io,bdyetton/prettychart,binoculars/osf.io,mluo613/osf.io,jmcarp/osf.io,fabianvf/osf.io,Ghalko/osf.io,baylee-d/osf.io,cwisecarver/osf.io,felliott/osf.io,TomHeatwole/osf.io,arpitar/osf.io,lyndsysimon/osf.io,ckc6cz/osf.io,cosenal/osf.io,njantrania/osf.io,TomHeatwole/osf.io,leb2dg/osf.io,himanshuo/osf.io,caseyrygt/osf.io,mluke93/osf.io,caneruguz/osf.io,icereval/osf.io,amyshi188/osf.io,arpitar/osf.io,pattisdr/osf.io,crcresearch/osf.io,monikagrabowska/osf.io,samanehsan/osf.io,arpitar/osf.io,icereval/osf.io,reinaH/osf.io,zkraime/osf.io,saradbowman/osf.io,wearpants/osf.io,CenterForOpenScience/osf.io,DanielSBrown/osf.io,asanfilippo7/osf.io,emetsger/osf.io,TomHeatwole/osf.io,GaryKriebel/osf.io,zamattiac/osf.io,danielneis/osf.io,barbour-em/osf.io,samchrisinger/osf.io,ckc6cz/osf.io,kch8qx/osf.io,acshi/osf.io,doublebits/osf.io,lamdnhan/osf.io,zachjanicki/osf.io,zkraime/osf.io,haoyuchen1992/osf.io,MerlinZhang/osf.io,kch8qx/osf.io,billyhunt/osf.io,chennan47/osf.io,erinspace/osf.io,asanfilippo7/osf.io,hmoco/osf.io,revanthkolli/osf.io,KAsante95/osf.io,zkraime/osf.io,njantrania/osf.io,mluo613/osf.io,reinaH/osf.io,adlius/osf.io,zamattiac/osf.io,arpitar/osf.io,ticklemepierce/osf.io,jolene-esposito/osf.io,Johnetordoff/osf.io,kch8qx/osf.io,KAsante95/osf.io,RomanZWang/osf.io,lamdnhan/osf.io,CenterForOpenScience/osf.io,aaxelb/osf.io,jinluyuan/osf.io,jnayak1/osf.io,caneruguz/osf.io,mluke93/osf.io,cwisecarver/osf.io,Nesiehr/osf.io,kwierman/osf.io,CenterForOpenScience/osf.io,SSJohns/osf.io,cldershem/osf.io,caneruguz/osf.io,HalcyonChimera/osf.io,RomanZWang/osf.io,njantrania/osf.io,sloria/osf.io,mfraezz/osf.io,caseyrollins/osf.io,Johnetordoff/osf.io,cslzchen/osf.io,AndrewSallans/osf.io,monikagrabowska/osf.io,jmcarp/osf.io,SSJohns/osf.io,laurenrevere/osf.io,zachjanicki/osf.io,adlius/osf.io,sbt9uc/osf.io,cldershem/osf.io,laurenrevere/osf.io,RomanZWang/osf.io,GaryKriebel/osf.io,chrisseto/osf.io,mfraezz/osf.io,dplorimer/osf,rdhyee/osf.io,caneruguz/osf.io,kushG/osf.io,lamdnhan/osf.io,jeffreyliu3230/osf.io,njantrania/osf.io,chennan47/osf.io,revanthkolli/osf.io,ticklemepierce/osf.io,zachjanicki/osf.io,MerlinZhang/osf.io | javascript | ## Code Before:
// website/static/js/growlBox.js
// Initial semicolon for safe minification
;(function (global, factory) {
// Support RequireJS/AMD or no module loader
if (typeof define === 'function' && define.amd) {
// Dependency IDs here
define(['jquery', 'vendor/bower_components/bootstrap.growl/bootstrap-growl'], factory);
} else { // No module loader, just attach to global namespace
global.GrowlBox = factory(jQuery);
}
}(this, function($) { // named dependencies here
'use strict';
// Private methods go up here
// This is the public API
// The constructor
function GrowlBox (title, message) {
var self = this;
if (typeof title === 'undefined'){
title = '';
}
self.title = title;
self.message = message;
self.init(self);
}
// Methods
GrowlBox.prototype.init = function(self) {
$.growl({
title: '<strong>' + self.title + '<strong><br />',
message: self.message
},{
type: 'danger',
delay: 0
});
};
return GrowlBox;
}));
## Instruction:
Remove option for empty title
Looks terrible without a title. We shouldn't do it.
## Code After:
// website/static/js/growlBox.js
// Initial semicolon for safe minification
;(function (global, factory) {
// Support RequireJS/AMD or no module loader
if (typeof define === 'function' && define.amd) {
// Dependency IDs here
define(['jquery', 'vendor/bower_components/bootstrap.growl/bootstrap-growl'], factory);
} else { // No module loader, just attach to global namespace
global.GrowlBox = factory(jQuery);
}
}(this, function($) { // named dependencies here
'use strict';
// Private methods go up here
// This is the public API
// The constructor
function GrowlBox (title, message) {
var self = this;
self.title = title;
self.message = message;
self.init(self);
}
// Methods
GrowlBox.prototype.init = function(self) {
$.growl({
title: '<strong>' + self.title + '<strong><br />',
message: self.message
},{
type: 'danger',
delay: 0
});
};
return GrowlBox;
})); | // website/static/js/growlBox.js
// Initial semicolon for safe minification
;(function (global, factory) {
// Support RequireJS/AMD or no module loader
if (typeof define === 'function' && define.amd) {
// Dependency IDs here
define(['jquery', 'vendor/bower_components/bootstrap.growl/bootstrap-growl'], factory);
} else { // No module loader, just attach to global namespace
global.GrowlBox = factory(jQuery);
}
}(this, function($) { // named dependencies here
'use strict';
// Private methods go up here
// This is the public API
// The constructor
function GrowlBox (title, message) {
var self = this;
+
- if (typeof title === 'undefined'){
- title = '';
- }
self.title = title;
self.message = message;
self.init(self);
}
// Methods
GrowlBox.prototype.init = function(self) {
$.growl({
title: '<strong>' + self.title + '<strong><br />',
message: self.message
},{
type: 'danger',
delay: 0
});
};
return GrowlBox;
})); | 4 | 0.1 | 1 | 3 |
95db36749005919426136254c4b8f5315d4a5e9f | src/css/popup.css | src/css/popup.css | html,
body {
min-width: 800px;
min-height: 300px;
padding: 0;
margin: 0;
user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
overflow: hidden;
font-size: 12px;
}
#app-container {
margin: auto;
min-width: 800px;
max-width: 1024px;
}
| html,
body {
min-height: 300px;
padding: 0;
margin: 0;
user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
overflow: hidden;
font-size: 12px;
}
#app-container {
margin: auto;
min-width: 800px;
max-width: 1024px;
}
| Remove min-width from html, body | Remove min-width from html, body
| CSS | mit | xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2 | css | ## Code Before:
html,
body {
min-width: 800px;
min-height: 300px;
padding: 0;
margin: 0;
user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
overflow: hidden;
font-size: 12px;
}
#app-container {
margin: auto;
min-width: 800px;
max-width: 1024px;
}
## Instruction:
Remove min-width from html, body
## Code After:
html,
body {
min-height: 300px;
padding: 0;
margin: 0;
user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
overflow: hidden;
font-size: 12px;
}
#app-container {
margin: auto;
min-width: 800px;
max-width: 1024px;
}
| html,
body {
- min-width: 800px;
min-height: 300px;
padding: 0;
margin: 0;
user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-webkit-user-select: none;
overflow: hidden;
font-size: 12px;
}
#app-container {
margin: auto;
min-width: 800px;
max-width: 1024px;
} | 1 | 0.052632 | 0 | 1 |
dd393d5fd17887cadbd47f4f995d74914cf4403a | src/addons/simulator/vcs/_vars.mk | src/addons/simulator/vcs/_vars.mk |
ifeq ($(SYNOPSYS_HOME),)
$(error Running VCS requires SYNOPSYS_HOME to be set)
endif
ifeq ($(VCS_VERSION),)
$(error Specify a VCS version as VCS_VERSION)
endif
VCS_HOME = $(SYNOPSYS_HOME)/vcs/$(VCS_VERSION)
VCS_BIN = $(VCS_HOME)/bin/vcs
ifeq ($(wildcard $(VCS_BIN)),)
$(error Cannot find VCS at $(VCS_BIN))
endif
|
ifeq ($(SYNOPSYS_HOME),)
$(error Running VCS requires SYNOPSYS_HOME to be set)
endif
ifeq ($(VCS_VERSION),)
$(error Specify a VCS version as VCS_VERSION)
endif
ifeq ($(SNPSLMD_LICENSE_FILE),)
$(error SNPSLMD_LICENSE_FILE needs to be exported for VCS to run)
endif
VCS_HOME = $(SYNOPSYS_HOME)/vcs/$(VCS_VERSION)
VCS_BIN = $(VCS_HOME)/bin/vcs
ifeq ($(wildcard $(VCS_BIN)),)
$(error Cannot find VCS at $(VCS_BIN))
endif
| Check for a Synopsys license file before running VCS | Check for a Synopsys license file before running VCS
This gives me a slightly better (and earlier) error message.
| Makefile | bsd-3-clause | ucb-bar/plsi,ucb-bar/plsi | makefile | ## Code Before:
ifeq ($(SYNOPSYS_HOME),)
$(error Running VCS requires SYNOPSYS_HOME to be set)
endif
ifeq ($(VCS_VERSION),)
$(error Specify a VCS version as VCS_VERSION)
endif
VCS_HOME = $(SYNOPSYS_HOME)/vcs/$(VCS_VERSION)
VCS_BIN = $(VCS_HOME)/bin/vcs
ifeq ($(wildcard $(VCS_BIN)),)
$(error Cannot find VCS at $(VCS_BIN))
endif
## Instruction:
Check for a Synopsys license file before running VCS
This gives me a slightly better (and earlier) error message.
## Code After:
ifeq ($(SYNOPSYS_HOME),)
$(error Running VCS requires SYNOPSYS_HOME to be set)
endif
ifeq ($(VCS_VERSION),)
$(error Specify a VCS version as VCS_VERSION)
endif
ifeq ($(SNPSLMD_LICENSE_FILE),)
$(error SNPSLMD_LICENSE_FILE needs to be exported for VCS to run)
endif
VCS_HOME = $(SYNOPSYS_HOME)/vcs/$(VCS_VERSION)
VCS_BIN = $(VCS_HOME)/bin/vcs
ifeq ($(wildcard $(VCS_BIN)),)
$(error Cannot find VCS at $(VCS_BIN))
endif
|
ifeq ($(SYNOPSYS_HOME),)
$(error Running VCS requires SYNOPSYS_HOME to be set)
endif
ifeq ($(VCS_VERSION),)
$(error Specify a VCS version as VCS_VERSION)
endif
+ ifeq ($(SNPSLMD_LICENSE_FILE),)
+ $(error SNPSLMD_LICENSE_FILE needs to be exported for VCS to run)
+ endif
+
VCS_HOME = $(SYNOPSYS_HOME)/vcs/$(VCS_VERSION)
VCS_BIN = $(VCS_HOME)/bin/vcs
ifeq ($(wildcard $(VCS_BIN)),)
$(error Cannot find VCS at $(VCS_BIN))
endif | 4 | 0.266667 | 4 | 0 |
6c69607032278b62d4671074c160dd75ca3e20b2 | imageUtil.js | imageUtil.js | var autotrace = require('autotrace');
var gm = require('gm').subClass({imageMagick: true});
var fs = require('fs');
module.exports.composeImage = function (drawing, photo, callback) {
var width = 1875;
var height = 1275;
gm(input)
.resize(width, height).write('./temp1.png', function(err) {
if (err) callback(err);
gm().command('composite')
.in('-gravity', 'center')
.in('-background', 'none')
.in('./temp1.png')
.in(photo)
.write('out2.jpg', function(err) {
if (err) callback(err);
});
});
}
var input = './input.png';
var photo = 'matts.jpg';
| var autotrace = require('autotrace');
var gm = require('gm').subClass({imageMagick: true});
var fs = require('fs');
module.exports.composeImage = function (drawing, photo, callback) {
var rand = Math.floor(Math.random()*1000);
var width = 1875;
var height = 1275;
gm(input)
.resize(width, height).write('./temp/' + rand + '.png', function(err) {
if (err) callback(err);
gm().command('composite')
.in('-gravity', 'center')
.in('-background', 'none')
.in('./temp/' + rand + '.png')
.in(photo)
.write('./postcards/' + rand + '.jpg', function(err) {
if (err) callback(err);
fs.readFile('./postcards/' + rand + '.jpg', function(err, data) {
if (err) callback(err);
callback(null, data);
});
});
});
}
| Send back data to callback | Send back data to callback
| JavaScript | mit | SteveAdamHenryMatt/lobcard,SteveAdamHenryMatt/lobcard | javascript | ## Code Before:
var autotrace = require('autotrace');
var gm = require('gm').subClass({imageMagick: true});
var fs = require('fs');
module.exports.composeImage = function (drawing, photo, callback) {
var width = 1875;
var height = 1275;
gm(input)
.resize(width, height).write('./temp1.png', function(err) {
if (err) callback(err);
gm().command('composite')
.in('-gravity', 'center')
.in('-background', 'none')
.in('./temp1.png')
.in(photo)
.write('out2.jpg', function(err) {
if (err) callback(err);
});
});
}
var input = './input.png';
var photo = 'matts.jpg';
## Instruction:
Send back data to callback
## Code After:
var autotrace = require('autotrace');
var gm = require('gm').subClass({imageMagick: true});
var fs = require('fs');
module.exports.composeImage = function (drawing, photo, callback) {
var rand = Math.floor(Math.random()*1000);
var width = 1875;
var height = 1275;
gm(input)
.resize(width, height).write('./temp/' + rand + '.png', function(err) {
if (err) callback(err);
gm().command('composite')
.in('-gravity', 'center')
.in('-background', 'none')
.in('./temp/' + rand + '.png')
.in(photo)
.write('./postcards/' + rand + '.jpg', function(err) {
if (err) callback(err);
fs.readFile('./postcards/' + rand + '.jpg', function(err, data) {
if (err) callback(err);
callback(null, data);
});
});
});
}
| var autotrace = require('autotrace');
var gm = require('gm').subClass({imageMagick: true});
var fs = require('fs');
module.exports.composeImage = function (drawing, photo, callback) {
+ var rand = Math.floor(Math.random()*1000);
var width = 1875;
var height = 1275;
gm(input)
- .resize(width, height).write('./temp1.png', function(err) {
? ^
+ .resize(width, height).write('./temp/' + rand + '.png', function(err) {
? ^^^^^^^^^^^^^
if (err) callback(err);
gm().command('composite')
.in('-gravity', 'center')
.in('-background', 'none')
- .in('./temp1.png')
? ^
+ .in('./temp/' + rand + '.png')
? ^^^^^^^^^^^^^
.in(photo)
- .write('out2.jpg', function(err) {
? ^ ^
+ .write('./postcards/' + rand + '.jpg', function(err) {
? +++ ^ ^^^^^^^^^^^^^^^^^^
if (err) callback(err);
-
+ fs.readFile('./postcards/' + rand + '.jpg', function(err, data) {
+ if (err) callback(err);
+ callback(null, data);
+ });
});
});
}
- var input = './input.png';
- var photo = 'matts.jpg'; | 14 | 0.583333 | 8 | 6 |
ec1def7657b8dd0d4bf958e6c3fffd742d22f5d2 | metadata.rb | metadata.rb | name 'pdns'
maintainer 'Aetrion, LLC DBA DNSimple'
maintainer_email 'ops@dnsimple.com'
license 'Apache 2.0'
description 'Installs/Configures pdns'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.4.1'
source_url 'https://github.com/dnsimple/pdns' if respond_to?(:source_url)
issues_url 'https://github.com/dnsimple/pdns/issues' if respond_to?(:issues_url)
supports 'ubuntu', '= 12.04'
supports 'ubuntu', '= 14.04'
depends 'build-essential'
depends 'resolvconf'
depends 'database'
depends 'yum-epel'
| name 'pdns'
maintainer 'Aetrion, LLC DBA DNSimple'
maintainer_email 'ops@dnsimple.com'
license 'Apache 2.0'
description 'Installs/Configures PowerDNS Recursor and Authoritative server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.4.1'
source_url 'https://github.com/dnsimple/pdns' if respond_to?(:source_url)
issues_url 'https://github.com/dnsimple/pdns/issues' if respond_to?(:issues_url)
supports 'ubuntu', '= 12.04'
supports 'ubuntu', '= 14.04'
depends 'build-essential'
depends 'resolvconf'
depends 'database'
depends 'yum-epel'
| Update description with something less terse | Update description with something less terse
| Ruby | apache-2.0 | aetrion/pdns,aetrion/pdns,dnsimple/chef-pdns,aetrion/pdns,dnsimple/chef-pdns | ruby | ## Code Before:
name 'pdns'
maintainer 'Aetrion, LLC DBA DNSimple'
maintainer_email 'ops@dnsimple.com'
license 'Apache 2.0'
description 'Installs/Configures pdns'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.4.1'
source_url 'https://github.com/dnsimple/pdns' if respond_to?(:source_url)
issues_url 'https://github.com/dnsimple/pdns/issues' if respond_to?(:issues_url)
supports 'ubuntu', '= 12.04'
supports 'ubuntu', '= 14.04'
depends 'build-essential'
depends 'resolvconf'
depends 'database'
depends 'yum-epel'
## Instruction:
Update description with something less terse
## Code After:
name 'pdns'
maintainer 'Aetrion, LLC DBA DNSimple'
maintainer_email 'ops@dnsimple.com'
license 'Apache 2.0'
description 'Installs/Configures PowerDNS Recursor and Authoritative server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.4.1'
source_url 'https://github.com/dnsimple/pdns' if respond_to?(:source_url)
issues_url 'https://github.com/dnsimple/pdns/issues' if respond_to?(:issues_url)
supports 'ubuntu', '= 12.04'
supports 'ubuntu', '= 14.04'
depends 'build-essential'
depends 'resolvconf'
depends 'database'
depends 'yum-epel'
| name 'pdns'
maintainer 'Aetrion, LLC DBA DNSimple'
maintainer_email 'ops@dnsimple.com'
license 'Apache 2.0'
- description 'Installs/Configures pdns'
+ description 'Installs/Configures PowerDNS Recursor and Authoritative server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.4.1'
source_url 'https://github.com/dnsimple/pdns' if respond_to?(:source_url)
issues_url 'https://github.com/dnsimple/pdns/issues' if respond_to?(:issues_url)
supports 'ubuntu', '= 12.04'
supports 'ubuntu', '= 14.04'
depends 'build-essential'
depends 'resolvconf'
depends 'database'
depends 'yum-epel' | 2 | 0.117647 | 1 | 1 |
71555601c15560b7c2e624faaac929b16708328e | index.html | index.html | <html>
<head>
<title>documents</title>
</head>
<body>
<h1>documents</h1>
<ul>
<li><a href="pygments-dmdl/index.html">pygments-dmdl</a></li>
<li><a href="poetry-ja/index.html">poetry documents translated into Japanese</a></li>
</ul>
</body>
</html>
| <html>
<head>
<title>documents</title>
</head>
<body>
<h1>documents</h1>
<ul>
<li><a href="pygments-dmdl/index.html">pygments-dmdl</a></li>
<li>
<a href="poetry-ja/index.html">Poetry Documentation Translated Into Japanese</a>
<ul>
<li>Pythonのパッケージングと依存関係管理を簡単にする
<a href="https://poetry.eustace.io/">Poetry</a>のドキュメントの日本語訳
</li>
</ul>
</li>
</ul>
</body>
</html>
| Add description about poetry documentaions | Add description about poetry documentaions
| HTML | apache-2.0 | cocoatomo/cocoatomo.github.io,cocoatomo/cocoatomo.github.io | html | ## Code Before:
<html>
<head>
<title>documents</title>
</head>
<body>
<h1>documents</h1>
<ul>
<li><a href="pygments-dmdl/index.html">pygments-dmdl</a></li>
<li><a href="poetry-ja/index.html">poetry documents translated into Japanese</a></li>
</ul>
</body>
</html>
## Instruction:
Add description about poetry documentaions
## Code After:
<html>
<head>
<title>documents</title>
</head>
<body>
<h1>documents</h1>
<ul>
<li><a href="pygments-dmdl/index.html">pygments-dmdl</a></li>
<li>
<a href="poetry-ja/index.html">Poetry Documentation Translated Into Japanese</a>
<ul>
<li>Pythonのパッケージングと依存関係管理を簡単にする
<a href="https://poetry.eustace.io/">Poetry</a>のドキュメントの日本語訳
</li>
</ul>
</li>
</ul>
</body>
</html>
| <html>
<head>
<title>documents</title>
</head>
<body>
<h1>documents</h1>
<ul>
<li><a href="pygments-dmdl/index.html">pygments-dmdl</a></li>
+ <li>
- <li><a href="poetry-ja/index.html">poetry documents translated into Japanese</a></li>
? ^^^^ ^ ^ ^ ^ ^ -----
+ <a href="poetry-ja/index.html">Poetry Documentation Translated Into Japanese</a>
? ^^ ^ ^ ^^^^^ ^ ^
+ <ul>
+ <li>Pythonのパッケージングと依存関係管理を簡単にする
+ <a href="https://poetry.eustace.io/">Poetry</a>のドキュメントの日本語訳
+ </li>
+ </ul>
+ </li>
</ul>
</body>
</html> | 9 | 0.75 | 8 | 1 |
d1972da2d0bed30f52b7feb72e48e17787a69736 | src/Scopes/UserWithRoleScope.php | src/Scopes/UserWithRoleScope.php | <?php
namespace Orchestra\Model\Scopes;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
use Illuminate\Database\Eloquent\Builder;
class UserWithRoleScope implements Scope
{
/**
* The selected role.
*
* @var string
*/
protected $role;
/**
* Construct the scope.
*
* @param string $role
*/
public function __construct($role)
{
$this->role = $role;
}
/**
* Apply the scope to a given Eloquent query builder.
*
* @param \Illuminate\Database\Eloquent\Builder $builder
* @param \Illuminate\Database\Eloquent\Model $model
*
* @return void
*/
public function apply(Builder $builder, Model $model)
{
if (empty($this->role)) {
return;
}
$builder->whereHas('roles', function ($query) {
$query->where('name', '=', $this->role);
});
}
}
| <?php
namespace Orchestra\Model\Scopes;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
use Illuminate\Database\Eloquent\Builder;
class UserWithRoleScope implements Scope
{
/**
* The selected role.
*
* @var string|array
*/
protected $role;
/**
* Construct the scope.
*
* @param string|array $role
*/
public function __construct($role)
{
$this->role = $role;
}
/**
* Apply the scope to a given Eloquent query builder.
*
* @param \Illuminate\Database\Eloquent\Builder $builder
* @param \Illuminate\Database\Eloquent\Model $model
*
* @return void
*/
public function apply(Builder $builder, Model $model)
{
if (empty($this->role)) {
return;
}
$builder->whereHas('roles', function ($query) {
$query->whereIn('name', (array) $this->role);
});
}
}
| Use where in and cast to array. | Use where in and cast to array.
Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
| PHP | mit | orchestral/model | php | ## Code Before:
<?php
namespace Orchestra\Model\Scopes;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
use Illuminate\Database\Eloquent\Builder;
class UserWithRoleScope implements Scope
{
/**
* The selected role.
*
* @var string
*/
protected $role;
/**
* Construct the scope.
*
* @param string $role
*/
public function __construct($role)
{
$this->role = $role;
}
/**
* Apply the scope to a given Eloquent query builder.
*
* @param \Illuminate\Database\Eloquent\Builder $builder
* @param \Illuminate\Database\Eloquent\Model $model
*
* @return void
*/
public function apply(Builder $builder, Model $model)
{
if (empty($this->role)) {
return;
}
$builder->whereHas('roles', function ($query) {
$query->where('name', '=', $this->role);
});
}
}
## Instruction:
Use where in and cast to array.
Signed-off-by: crynobone <e1a543840a942eb68427510a8a483282a7bfeddf@gmail.com>
## Code After:
<?php
namespace Orchestra\Model\Scopes;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
use Illuminate\Database\Eloquent\Builder;
class UserWithRoleScope implements Scope
{
/**
* The selected role.
*
* @var string|array
*/
protected $role;
/**
* Construct the scope.
*
* @param string|array $role
*/
public function __construct($role)
{
$this->role = $role;
}
/**
* Apply the scope to a given Eloquent query builder.
*
* @param \Illuminate\Database\Eloquent\Builder $builder
* @param \Illuminate\Database\Eloquent\Model $model
*
* @return void
*/
public function apply(Builder $builder, Model $model)
{
if (empty($this->role)) {
return;
}
$builder->whereHas('roles', function ($query) {
$query->whereIn('name', (array) $this->role);
});
}
}
| <?php
namespace Orchestra\Model\Scopes;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
use Illuminate\Database\Eloquent\Builder;
class UserWithRoleScope implements Scope
{
/**
* The selected role.
*
- * @var string
+ * @var string|array
? ++++++
*/
protected $role;
/**
* Construct the scope.
*
- * @param string $role
+ * @param string|array $role
? ++++++
*/
public function __construct($role)
{
$this->role = $role;
}
/**
* Apply the scope to a given Eloquent query builder.
*
* @param \Illuminate\Database\Eloquent\Builder $builder
* @param \Illuminate\Database\Eloquent\Model $model
*
* @return void
*/
public function apply(Builder $builder, Model $model)
{
if (empty($this->role)) {
return;
}
$builder->whereHas('roles', function ($query) {
- $query->where('name', '=', $this->role);
? ^^^^
+ $query->whereIn('name', (array) $this->role);
? ++ ^^^^^^^
});
}
} | 6 | 0.130435 | 3 | 3 |
3b32287f1a2f55e0013671b7d4703be34d0904e9 | addon/components/firebase-ui-auth.js | addon/components/firebase-ui-auth.js | /** @module emberfire-utils */
import { scheduleOnce } from 'ember-runloop';
import Component from 'ember-component';
import inject from 'ember-service/inject';
import FirebaseUi from 'firebaseui';
import layout from '../templates/components/firebase-ui-auth';
/**
* `<firebase-ui-auth>`
*
* API Reference:
* * `@uiConfig` - Object
*
* @class FirebaseUiAuth
* @namespace Component
* @extends Ember.Component
*/
export default Component.extend({
layout,
/**
* @type Ember.Service
* @readOnly
*/
firebaseApp: inject(),
/**
* @type {string}
* @readonly
*/
elementId: 'firebaseui-auth-container',
/**
* @type {FirebaseUi}
* @default
*/
ui: null,
/**
* Component hook.
*
* - Renders the FirebaseUI auth widget
*/
didInsertElement() {
this._super(...arguments);
scheduleOnce('afterRender', () => {
let auth = this.get('firebaseApp').auth();
let ui = new FirebaseUi.auth.AuthUI(auth);
ui.start('#firebaseui-auth-container', this.getAttr('uiConfig'));
this.set('ui', ui);
});
},
/**
* Component hook.
*
* - Dispose the FirebaseUI auth widget
*/
willDestroyElement() {
this._super(...arguments);
this.get('ui').reset();
},
});
| /** @module emberfire-utils */
import { scheduleOnce } from 'ember-runloop';
import Component from 'ember-component';
import inject from 'ember-service/inject';
import FirebaseUi from 'firebaseui';
import firebase from 'firebase';
import layout from '../templates/components/firebase-ui-auth';
/**
* `<firebase-ui-auth>`
*
* API Reference:
* * `@uiConfig` - Object
*
* @class FirebaseUiAuth
* @namespace Component
* @extends Ember.Component
*/
export default Component.extend({
layout,
/**
* @type Ember.Service
* @readOnly
*/
firebaseApp: inject(),
/**
* @type {string}
* @readonly
*/
elementId: 'firebaseui-auth-container',
/**
* @type {FirebaseUi}
* @default
*/
ui: null,
/**
* Component hook.
*
* - Renders the FirebaseUI auth widget
*/
didInsertElement() {
this._super(...arguments);
scheduleOnce('afterRender', () => {
// Workaround for when the firebase asset is an AMD module
window.firebase = firebase;
let auth = this.get('firebaseApp').auth();
let ui = new FirebaseUi.auth.AuthUI(auth);
ui.start('#firebaseui-auth-container', this.getAttr('uiConfig'));
this.set('ui', ui);
});
},
/**
* Component hook.
*
* - Dispose the FirebaseUI auth widget
*/
willDestroyElement() {
this._super(...arguments);
this.get('ui').reset();
},
});
| Fix bug in FirebaseUI for when Firebase is an AMD module | Fix bug in FirebaseUI for when Firebase is an AMD module
| JavaScript | mit | rmmmp/emberfire-utils,rmmmp/emberfire-utils | javascript | ## Code Before:
/** @module emberfire-utils */
import { scheduleOnce } from 'ember-runloop';
import Component from 'ember-component';
import inject from 'ember-service/inject';
import FirebaseUi from 'firebaseui';
import layout from '../templates/components/firebase-ui-auth';
/**
* `<firebase-ui-auth>`
*
* API Reference:
* * `@uiConfig` - Object
*
* @class FirebaseUiAuth
* @namespace Component
* @extends Ember.Component
*/
export default Component.extend({
layout,
/**
* @type Ember.Service
* @readOnly
*/
firebaseApp: inject(),
/**
* @type {string}
* @readonly
*/
elementId: 'firebaseui-auth-container',
/**
* @type {FirebaseUi}
* @default
*/
ui: null,
/**
* Component hook.
*
* - Renders the FirebaseUI auth widget
*/
didInsertElement() {
this._super(...arguments);
scheduleOnce('afterRender', () => {
let auth = this.get('firebaseApp').auth();
let ui = new FirebaseUi.auth.AuthUI(auth);
ui.start('#firebaseui-auth-container', this.getAttr('uiConfig'));
this.set('ui', ui);
});
},
/**
* Component hook.
*
* - Dispose the FirebaseUI auth widget
*/
willDestroyElement() {
this._super(...arguments);
this.get('ui').reset();
},
});
## Instruction:
Fix bug in FirebaseUI for when Firebase is an AMD module
## Code After:
/** @module emberfire-utils */
import { scheduleOnce } from 'ember-runloop';
import Component from 'ember-component';
import inject from 'ember-service/inject';
import FirebaseUi from 'firebaseui';
import firebase from 'firebase';
import layout from '../templates/components/firebase-ui-auth';
/**
* `<firebase-ui-auth>`
*
* API Reference:
* * `@uiConfig` - Object
*
* @class FirebaseUiAuth
* @namespace Component
* @extends Ember.Component
*/
export default Component.extend({
layout,
/**
* @type Ember.Service
* @readOnly
*/
firebaseApp: inject(),
/**
* @type {string}
* @readonly
*/
elementId: 'firebaseui-auth-container',
/**
* @type {FirebaseUi}
* @default
*/
ui: null,
/**
* Component hook.
*
* - Renders the FirebaseUI auth widget
*/
didInsertElement() {
this._super(...arguments);
scheduleOnce('afterRender', () => {
// Workaround for when the firebase asset is an AMD module
window.firebase = firebase;
let auth = this.get('firebaseApp').auth();
let ui = new FirebaseUi.auth.AuthUI(auth);
ui.start('#firebaseui-auth-container', this.getAttr('uiConfig'));
this.set('ui', ui);
});
},
/**
* Component hook.
*
* - Dispose the FirebaseUI auth widget
*/
willDestroyElement() {
this._super(...arguments);
this.get('ui').reset();
},
});
| /** @module emberfire-utils */
import { scheduleOnce } from 'ember-runloop';
import Component from 'ember-component';
import inject from 'ember-service/inject';
import FirebaseUi from 'firebaseui';
+ import firebase from 'firebase';
import layout from '../templates/components/firebase-ui-auth';
/**
* `<firebase-ui-auth>`
*
* API Reference:
* * `@uiConfig` - Object
*
* @class FirebaseUiAuth
* @namespace Component
* @extends Ember.Component
*/
export default Component.extend({
layout,
/**
* @type Ember.Service
* @readOnly
*/
firebaseApp: inject(),
/**
* @type {string}
* @readonly
*/
elementId: 'firebaseui-auth-container',
/**
* @type {FirebaseUi}
* @default
*/
ui: null,
/**
* Component hook.
*
* - Renders the FirebaseUI auth widget
*/
didInsertElement() {
this._super(...arguments);
scheduleOnce('afterRender', () => {
+ // Workaround for when the firebase asset is an AMD module
+ window.firebase = firebase;
+
let auth = this.get('firebaseApp').auth();
let ui = new FirebaseUi.auth.AuthUI(auth);
ui.start('#firebaseui-auth-container', this.getAttr('uiConfig'));
this.set('ui', ui);
});
},
/**
* Component hook.
*
* - Dispose the FirebaseUI auth widget
*/
willDestroyElement() {
this._super(...arguments);
this.get('ui').reset();
},
}); | 4 | 0.058824 | 4 | 0 |
bfbdac2de31516a8cc234aac3ce096eb455408a7 | .travis-generate-docs.sh | .travis-generate-docs.sh |
echo "Generating docs with doxygen..."
doxygen
mkdir -p ~/.ssh
chmod 0600 ~/znc-docs-key
cat <<EOF >> ~/.ssh/config
Host znc-docs
HostName github.com
User git
IdentityFile ~/znc-docs-key
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
EOF
cd "$HOME"
git config --global user.email "travis@travis-ci.org"
git config --global user.name "travis-ci"
git clone --branch=gh-pages znc-docs:znc/docs.git gh-pages || exit 1
cd gh-pages
git rm -rf .
cp -rf "$TRAVIS_BUILD_DIR"/doc/html/* ./ || exit 1
echo docs.znc.in > CNAME
git add .
git commit -F- <<EOF
Latest docs on successful travis build $TRAVIS_BUILD_NUMBER
ZNC commit $TRAVIS_COMMIT
EOF
git push origin gh-pages
echo "Published docs to gh-pages."
|
echo "Generating docs with doxygen..."
doxygen
mkdir -p ~/.ssh
chmod 0600 ~/znc-docs-key
cat <<EOF >> ~/.ssh/config
Host znc-docs
HostName github.com
User git
IdentityFile ~/znc-docs-key
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
EOF
cd "$HOME"
git config --global user.email "travis-ci@znc.in"
git config --global user.name "znc-travis"
git clone --branch=gh-pages znc-docs:znc/docs.git gh-pages || exit 1
cd gh-pages
git rm -rf .
cp -rf "$TRAVIS_BUILD_DIR"/doc/html/* ./ || exit 1
echo docs.znc.in > CNAME
git add .
git commit -F- <<EOF
Latest docs on successful travis build $TRAVIS_BUILD_NUMBER
ZNC commit $TRAVIS_COMMIT
EOF
git push origin gh-pages
echo "Published docs to gh-pages."
| Fix travis mail in commits to docs. | Fix travis mail in commits to docs.
| Shell | apache-2.0 | psychon/znc,ollie27/znc,GLolol/znc,Zarthus/znc,Kriechi/znc,badloop/znc,Kriechi/znc,Kriechi/nobnc,TuffLuck/znc,badloop/znc,Mkaysi/znc,jpnurmi/znc,wolfy1339/znc,Hasimir/znc,jreese/znc,dgw/znc,Mikaela/znc,Phansa/znc,TuffLuck/znc,reedloden/znc,Adam-/znc,kashike/znc,aarondunlap/znc,Hasimir/znc,aarondunlap/znc,Hasimir/znc,elyscape/znc,KielBNC/znc,jpnurmi/znc,markusj/znc,Kriechi/nobnc,Zarthus/znc,evilnet/znc,Mikaela/znc,GLolol/znc,markusj/znc,ollie27/znc,elyscape/znc,BtbN/znc,kashike/znc,anthonyryan1/znc,dgw/znc,Phansa/znc,Mkaysi/znc,badloop/znc,wolfy1339/znc,aarondunlap/znc,Mkaysi/znc,DarthGandalf/znc,YourBNC/znc,znc/znc,ollie27/znc,TuffLuck/znc,elyscape/znc,kashike/znc,markusj/znc,markusj/znc,psychon/znc,badloop/znc,znc/znc,Zarthus/znc,GLolol/znc,markusj/znc,Hasimir/znc,anthonyryan1/znc,psychon/znc,KielBNC/znc,Adam-/znc,badloop/znc,Zarthus/znc,aarondunlap/znc,psychon/znc,jpnurmi/znc,dgw/znc,BtbN/znc,KielBNC/znc,jpnurmi/znc,BtbN/znc,evilnet/znc,YourBNC/znc,ollie27/znc,Hasimir/znc,DarthGandalf/znc,Adam-/znc,Mikaela/znc,TuffLuck/znc,wolfy1339/znc,KiNgMaR/znc,reedloden/znc,Mikaela/znc,Phansa/znc,psychon/znc,evilnet/znc,Phansa/znc,jpnurmi/znc,reedloden/znc,wolfy1339/znc,Mkaysi/znc,kashike/znc,Kriechi/znc,KielBNC/znc,anthonyryan1/znc,dgw/znc,Kriechi/znc,anthonyryan1/znc,jreese/znc,Hasimir/znc,DarthGandalf/znc,aarondunlap/znc,Kriechi/znc,Zarthus/znc,anthonyryan1/znc,Mkaysi/znc,jreese/znc,Kriechi/znc,evilnet/znc,Mikaela/znc,elyscape/znc,aarondunlap/znc,znc/znc,YourBNC/znc,Mkaysi/znc,KielBNC/znc,wolfy1339/znc,GLolol/znc,Adam-/znc,znc/znc,TuffLuck/znc,Phansa/znc,TuffLuck/znc,Kriechi/nobnc,dgw/znc,kashike/znc,BtbN/znc,DarthGandalf/znc,DarthGandalf/znc,anthonyryan1/znc,TuffLuck/znc,ollie27/znc,Mikaela/znc,dgw/znc,markusj/znc,jreese/znc,reedloden/znc,GLolol/znc,znc/znc,Adam-/znc,elyscape/znc,badloop/znc,KiNgMaR/znc,znc/znc,Phansa/znc,aarondunlap/znc,KiNgMaR/znc,YourBNC/znc,evilnet/znc,Adam-/znc,KielBNC/znc,jreese/znc,YourBNC/znc,KiNgMaR/znc,jreese/znc,Hasimir/znc,psychon/znc,reedloden/znc,BtbN/znc,evilnet/znc,KiNgMaR/znc,Mkaysi/znc,jpnurmi/znc,wolfy1339/znc,Mikaela/znc,jpnurmi/znc,kashike/znc,anthonyryan1/znc,GLolol/znc,BtbN/znc,DarthGandalf/znc,reedloden/znc,Zarthus/znc,YourBNC/znc,KiNgMaR/znc,elyscape/znc,badloop/znc,ollie27/znc,Adam-/znc | shell | ## Code Before:
echo "Generating docs with doxygen..."
doxygen
mkdir -p ~/.ssh
chmod 0600 ~/znc-docs-key
cat <<EOF >> ~/.ssh/config
Host znc-docs
HostName github.com
User git
IdentityFile ~/znc-docs-key
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
EOF
cd "$HOME"
git config --global user.email "travis@travis-ci.org"
git config --global user.name "travis-ci"
git clone --branch=gh-pages znc-docs:znc/docs.git gh-pages || exit 1
cd gh-pages
git rm -rf .
cp -rf "$TRAVIS_BUILD_DIR"/doc/html/* ./ || exit 1
echo docs.znc.in > CNAME
git add .
git commit -F- <<EOF
Latest docs on successful travis build $TRAVIS_BUILD_NUMBER
ZNC commit $TRAVIS_COMMIT
EOF
git push origin gh-pages
echo "Published docs to gh-pages."
## Instruction:
Fix travis mail in commits to docs.
## Code After:
echo "Generating docs with doxygen..."
doxygen
mkdir -p ~/.ssh
chmod 0600 ~/znc-docs-key
cat <<EOF >> ~/.ssh/config
Host znc-docs
HostName github.com
User git
IdentityFile ~/znc-docs-key
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
EOF
cd "$HOME"
git config --global user.email "travis-ci@znc.in"
git config --global user.name "znc-travis"
git clone --branch=gh-pages znc-docs:znc/docs.git gh-pages || exit 1
cd gh-pages
git rm -rf .
cp -rf "$TRAVIS_BUILD_DIR"/doc/html/* ./ || exit 1
echo docs.znc.in > CNAME
git add .
git commit -F- <<EOF
Latest docs on successful travis build $TRAVIS_BUILD_NUMBER
ZNC commit $TRAVIS_COMMIT
EOF
git push origin gh-pages
echo "Published docs to gh-pages."
|
echo "Generating docs with doxygen..."
doxygen
mkdir -p ~/.ssh
chmod 0600 ~/znc-docs-key
cat <<EOF >> ~/.ssh/config
Host znc-docs
HostName github.com
User git
IdentityFile ~/znc-docs-key
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
EOF
cd "$HOME"
- git config --global user.email "travis@travis-ci.org"
? ------- ^^^
+ git config --global user.email "travis-ci@znc.in"
? ++++ ^^
- git config --global user.name "travis-ci"
? ---
+ git config --global user.name "znc-travis"
? ++++
git clone --branch=gh-pages znc-docs:znc/docs.git gh-pages || exit 1
cd gh-pages
git rm -rf .
cp -rf "$TRAVIS_BUILD_DIR"/doc/html/* ./ || exit 1
echo docs.znc.in > CNAME
git add .
git commit -F- <<EOF
Latest docs on successful travis build $TRAVIS_BUILD_NUMBER
ZNC commit $TRAVIS_COMMIT
EOF
git push origin gh-pages
echo "Published docs to gh-pages." | 4 | 0.111111 | 2 | 2 |
352c1e28f540c3306f1cdfb0b9121274662a6c2b | source/_stylesheet_snippet.html.erb | source/_stylesheet_snippet.html.erb | <div class="snippet">
<a href="#" class="copy-source">Copy</a>
<pre><code class='language-scss'><% File.readlines(file_path).each do |line| %><%= line %><% end %></code></pre>
</div>
| <div class="snippet">
<a href="#" class="copy-source">Copy</a>
<pre><code class='language-scss'><%= File.read(file_path) %></code></pre>
</div>
| Remove unnecessary iteration over lines | Remove unnecessary iteration over lines
| HTML+ERB | mit | tranc99/refills,dydx/refills,cllns/refills,dydx/refills,smithdamen/refills,mehdroid/refills,mehdroid/refills,tranc99/refills,cllns/refills,mehdroid/refills,hlogmans/refills,thoughtbot/refills,thoughtbot/refills,cllns/refills,DropsOfSerenity/refills,hlogmans/refills,tranc99/refills,DropsOfSerenity/refills,greyhwndz/refills,smithdamen/refills,hlogmans/refills,greyhwndz/refills,thoughtbot/refills,hlogmans/refills,DropsOfSerenity/refills,tranc99/refills,thoughtbot/refills,DropsOfSerenity/refills,mehdroid/refills,smithdamen/refills,dydx/refills,greyhwndz/refills,smithdamen/refills,greyhwndz/refills,dydx/refills,cllns/refills | html+erb | ## Code Before:
<div class="snippet">
<a href="#" class="copy-source">Copy</a>
<pre><code class='language-scss'><% File.readlines(file_path).each do |line| %><%= line %><% end %></code></pre>
</div>
## Instruction:
Remove unnecessary iteration over lines
## Code After:
<div class="snippet">
<a href="#" class="copy-source">Copy</a>
<pre><code class='language-scss'><%= File.read(file_path) %></code></pre>
</div>
| <div class="snippet">
<a href="#" class="copy-source">Copy</a>
- <pre><code class='language-scss'><% File.readlines(file_path).each do |line| %><%= line %><% end %></code></pre>
? ----- -----------------------------------
+ <pre><code class='language-scss'><%= File.read(file_path) %></code></pre>
? +
</div> | 2 | 0.5 | 1 | 1 |
78c22bd987aa947312f989bb4845cce24d294f37 | README.md | README.md |
An Arduino project to play pacman.
In my opinion, the Arduino IDE doesn't work that well so I use the "Bare Arduino Project" which provides make-files for building and uploading. Many thanks to guys who developed it. Check it out on: https://travis-ci.org/ladislas/Bare-Arduino-Project.
This project uses a cheap 3.5 inch touch screen module for Arduino. Unfortunaly, the screen contain the ILI9481 driver IC that is not really well supported by the adafruit TFT screen driver. Therefore, I am using a driver solely developed for the ILI9481 but it lacks some nice features of the Adafruit driver. |
An Arduino project to play pacman.
In my opinion, the Arduino IDE doesn't work that well so I use the "Bare Arduino Project" which provides make-files for building and uploading. Many thanks to guys who developed it. Check it out on: https://github.com/ladislas/Bare-Arduino-Project.
This project uses a cheap 3.5 inch touch screen module for Arduino. Unfortunaly, the screen contain the ILI9481 driver IC that is not really well supported by the adafruit TFT screen driver. Therefore, I am using a driver solely developed for the ILI9481 but it lacks some nice features of the Adafruit driver. | Correct link to the Bare Arduino project inserted | Correct link to the Bare Arduino project inserted
| Markdown | mit | jorritnutma/pacmanArduino,jorritnutma/pacmanArduino,jorritnutma/pacmanArduino | markdown | ## Code Before:
An Arduino project to play pacman.
In my opinion, the Arduino IDE doesn't work that well so I use the "Bare Arduino Project" which provides make-files for building and uploading. Many thanks to guys who developed it. Check it out on: https://travis-ci.org/ladislas/Bare-Arduino-Project.
This project uses a cheap 3.5 inch touch screen module for Arduino. Unfortunaly, the screen contain the ILI9481 driver IC that is not really well supported by the adafruit TFT screen driver. Therefore, I am using a driver solely developed for the ILI9481 but it lacks some nice features of the Adafruit driver.
## Instruction:
Correct link to the Bare Arduino project inserted
## Code After:
An Arduino project to play pacman.
In my opinion, the Arduino IDE doesn't work that well so I use the "Bare Arduino Project" which provides make-files for building and uploading. Many thanks to guys who developed it. Check it out on: https://github.com/ladislas/Bare-Arduino-Project.
This project uses a cheap 3.5 inch touch screen module for Arduino. Unfortunaly, the screen contain the ILI9481 driver IC that is not really well supported by the adafruit TFT screen driver. Therefore, I am using a driver solely developed for the ILI9481 but it lacks some nice features of the Adafruit driver. |
An Arduino project to play pacman.
- In my opinion, the Arduino IDE doesn't work that well so I use the "Bare Arduino Project" which provides make-files for building and uploading. Many thanks to guys who developed it. Check it out on: https://travis-ci.org/ladislas/Bare-Arduino-Project.
? ^^^^^^^^^^^^^
+ In my opinion, the Arduino IDE doesn't work that well so I use the "Bare Arduino Project" which provides make-files for building and uploading. Many thanks to guys who developed it. Check it out on: https://github.com/ladislas/Bare-Arduino-Project.
? ^^^^^^^^^^
This project uses a cheap 3.5 inch touch screen module for Arduino. Unfortunaly, the screen contain the ILI9481 driver IC that is not really well supported by the adafruit TFT screen driver. Therefore, I am using a driver solely developed for the ILI9481 but it lacks some nice features of the Adafruit driver. | 2 | 0.333333 | 1 | 1 |
ac725f0d96cfe6ef989d3377e5e7ed9e339fe7e5 | djangoautoconf/auth/ldap_backend_wrapper.py | djangoautoconf/auth/ldap_backend_wrapper.py | from django_auth_ldap.backend import LDAPBackend
class LDAPBackendWrapper(LDAPBackend):
# def authenticate(self, identification, password, **kwargs):
# return super(LDAPBackendWrapper, self).authenticate(identification, password, **kwargs)
def authenticate(self, **kwargs):
if "username" in kwargs:
username = kwargs["username"]
del kwargs["username"]
elif "identification" in kwargs:
username = kwargs["identification"]
del kwargs["identification"]
password = kwargs["password"]
del kwargs["password"]
return super(LDAPBackendWrapper, self).authenticate(username, password, **kwargs)
# return None
| from django_auth_ldap.backend import LDAPBackend
class LDAPBackendWrapper(LDAPBackend):
# def authenticate(self, identification, password, **kwargs):
# return super(LDAPBackendWrapper, self).authenticate(identification, password, **kwargs)
def authenticate(self, **kwargs):
if "username" in kwargs:
username = kwargs["username"]
del kwargs["username"]
elif "identification" in kwargs:
username = kwargs["identification"]
del kwargs["identification"]
password = kwargs["password"]
del kwargs["password"]
return super(LDAPBackendWrapper, self).authenticate(username=username, password=password, **kwargs)
# return None
| Update codes for ldap wrapper so the username and password are passed to authenticate correctly. | Update codes for ldap wrapper so the username and password are passed to authenticate correctly.
| Python | bsd-3-clause | weijia/djangoautoconf,weijia/djangoautoconf | python | ## Code Before:
from django_auth_ldap.backend import LDAPBackend
class LDAPBackendWrapper(LDAPBackend):
# def authenticate(self, identification, password, **kwargs):
# return super(LDAPBackendWrapper, self).authenticate(identification, password, **kwargs)
def authenticate(self, **kwargs):
if "username" in kwargs:
username = kwargs["username"]
del kwargs["username"]
elif "identification" in kwargs:
username = kwargs["identification"]
del kwargs["identification"]
password = kwargs["password"]
del kwargs["password"]
return super(LDAPBackendWrapper, self).authenticate(username, password, **kwargs)
# return None
## Instruction:
Update codes for ldap wrapper so the username and password are passed to authenticate correctly.
## Code After:
from django_auth_ldap.backend import LDAPBackend
class LDAPBackendWrapper(LDAPBackend):
# def authenticate(self, identification, password, **kwargs):
# return super(LDAPBackendWrapper, self).authenticate(identification, password, **kwargs)
def authenticate(self, **kwargs):
if "username" in kwargs:
username = kwargs["username"]
del kwargs["username"]
elif "identification" in kwargs:
username = kwargs["identification"]
del kwargs["identification"]
password = kwargs["password"]
del kwargs["password"]
return super(LDAPBackendWrapper, self).authenticate(username=username, password=password, **kwargs)
# return None
| from django_auth_ldap.backend import LDAPBackend
class LDAPBackendWrapper(LDAPBackend):
# def authenticate(self, identification, password, **kwargs):
# return super(LDAPBackendWrapper, self).authenticate(identification, password, **kwargs)
def authenticate(self, **kwargs):
if "username" in kwargs:
username = kwargs["username"]
del kwargs["username"]
elif "identification" in kwargs:
username = kwargs["identification"]
del kwargs["identification"]
-
password = kwargs["password"]
del kwargs["password"]
- return super(LDAPBackendWrapper, self).authenticate(username, password, **kwargs)
+ return super(LDAPBackendWrapper, self).authenticate(username=username, password=password, **kwargs)
? +++++++++ +++++++++
# return None | 3 | 0.166667 | 1 | 2 |
c3f8fe4d027b006aa558cdd7589e30810c3e860c | app/views/application/js_templates/_sticky_message.html.slim | app/views/application/js_templates/_sticky_message.html.slim | - utm = { utm_source: "annict", utm_medium: "components", utm_campaign: "sticky-message", utm_content: page_category }
script#t-sticky-message type="x-template"
.c-sticky-message.position-fixed.w-100.p-3 v-if="appLoaded"
.c-sticky-message__container.row.align-items-center.mx-auto
.col.row.align-items-center
.col.col-auto.pl-0
= link_to root_path(utm) do
= image_tag asset_pack_path("images/logos/color-mizuho.png"), size: "25x30", alt: "Annict"
.col
| {{ messageBody }}
div
= link_to about_path(utm) do
= t "messages._components.sticky_message.about"
.col.col-auto.text-center.pr-0
= link_to new_user_registration_path(utm), class: "btn btn-primary" do
= icon "rocket", class: "mr-1"
= t "messages._components.sticky_message.sign_up" | - utm = { utm_source: "annict", utm_medium: "components", utm_campaign: "sticky-message", utm_content: page_category }
script#t-sticky-message type="x-template"
.c-sticky-message.position-fixed.w-100.p-3 v-if="appLoaded && isDisplayable()"
.c-sticky-message__container.row.align-items-center.mx-auto
.col.row.align-items-center
.col.col-auto.pl-0
= link_to root_path(utm) do
= image_tag asset_pack_path("images/logos/color-mizuho.png"), size: "25x30", alt: "Annict"
.col
| {{ messageBody }}
div
= link_to about_path(utm) do
= t "messages._components.sticky_message.about"
.col.col-auto.text-center.pr-0
= link_to new_user_registration_path(utm), class: "btn btn-primary" do
= icon "rocket", class: "mr-1"
= t "messages._components.sticky_message.sign_up" | Hide sticky message component if user signed in | Hide sticky message component if user signed in
| Slim | apache-2.0 | annict/annict,annict/annict,annict/annict,annict/annict | slim | ## Code Before:
- utm = { utm_source: "annict", utm_medium: "components", utm_campaign: "sticky-message", utm_content: page_category }
script#t-sticky-message type="x-template"
.c-sticky-message.position-fixed.w-100.p-3 v-if="appLoaded"
.c-sticky-message__container.row.align-items-center.mx-auto
.col.row.align-items-center
.col.col-auto.pl-0
= link_to root_path(utm) do
= image_tag asset_pack_path("images/logos/color-mizuho.png"), size: "25x30", alt: "Annict"
.col
| {{ messageBody }}
div
= link_to about_path(utm) do
= t "messages._components.sticky_message.about"
.col.col-auto.text-center.pr-0
= link_to new_user_registration_path(utm), class: "btn btn-primary" do
= icon "rocket", class: "mr-1"
= t "messages._components.sticky_message.sign_up"
## Instruction:
Hide sticky message component if user signed in
## Code After:
- utm = { utm_source: "annict", utm_medium: "components", utm_campaign: "sticky-message", utm_content: page_category }
script#t-sticky-message type="x-template"
.c-sticky-message.position-fixed.w-100.p-3 v-if="appLoaded && isDisplayable()"
.c-sticky-message__container.row.align-items-center.mx-auto
.col.row.align-items-center
.col.col-auto.pl-0
= link_to root_path(utm) do
= image_tag asset_pack_path("images/logos/color-mizuho.png"), size: "25x30", alt: "Annict"
.col
| {{ messageBody }}
div
= link_to about_path(utm) do
= t "messages._components.sticky_message.about"
.col.col-auto.text-center.pr-0
= link_to new_user_registration_path(utm), class: "btn btn-primary" do
= icon "rocket", class: "mr-1"
= t "messages._components.sticky_message.sign_up" | - utm = { utm_source: "annict", utm_medium: "components", utm_campaign: "sticky-message", utm_content: page_category }
script#t-sticky-message type="x-template"
- .c-sticky-message.position-fixed.w-100.p-3 v-if="appLoaded"
+ .c-sticky-message.position-fixed.w-100.p-3 v-if="appLoaded && isDisplayable()"
? +++++++++++++++++++
.c-sticky-message__container.row.align-items-center.mx-auto
.col.row.align-items-center
.col.col-auto.pl-0
= link_to root_path(utm) do
= image_tag asset_pack_path("images/logos/color-mizuho.png"), size: "25x30", alt: "Annict"
.col
| {{ messageBody }}
div
= link_to about_path(utm) do
= t "messages._components.sticky_message.about"
.col.col-auto.text-center.pr-0
= link_to new_user_registration_path(utm), class: "btn btn-primary" do
= icon "rocket", class: "mr-1"
= t "messages._components.sticky_message.sign_up" | 2 | 0.111111 | 1 | 1 |
e3e695c6aa4af058c94d9f5851a81012ecfb3843 | app/serializers/trade/shipment_api_from_view_serializer.rb | app/serializers/trade/shipment_api_from_view_serializer.rb | class Trade::ShipmentApiFromViewSerializer < ActiveModel::Serializer
attributes :id , :year, :appendix, :taxon, :class, :order, :family, :genus,
:term, :importer_reported_quantity, :exporter_reported_quantity,
:unit, :importer, :importer_iso, :exporter, :exporter_iso, :origin, :purpose, :source,
:import_permit, :export_permit, :origin_permit, :issue_type,
:compliance_type_taxonomic_rank
def importer_reported_quantity
object.attributes['importer_reported_quantity'] || object.attributes['importer_quantity']
end
def exporter_reported_quantity
object.attributes['exporter_reported_quantity'] || object.attributes['exporter_quantity']
end
end
| class Trade::ShipmentApiFromViewSerializer < ActiveModel::Serializer
attributes :id , :year, :appendix, :taxon, :klass, :order, :family, :genus,
:term, :importer_reported_quantity, :exporter_reported_quantity,
:unit, :importer, :importer_iso, :exporter, :exporter_iso, :origin, :purpose, :source,
:import_permit, :export_permit, :origin_permit, :issue_type,
:compliance_type_taxonomic_rank
def importer
object.importer || object.attributes["importer"]
end
def exporter
object.exporter || object.attributes["exporter"]
end
def origin
object.origin || object.attributes["origin"]
end
def term
object.term || object.attributes["term"]
end
def unit
object.unit || object.attributes["unit"]
end
def source
object.source || object.attributes["source"]
end
def purpose
object.purpose || object.attributes["purpose"]
end
def klass
object.attributes["class"]
end
def importer_reported_quantity
object.attributes['importer_reported_quantity'] || object.attributes['importer_quantity']
end
def exporter_reported_quantity
object.attributes['exporter_reported_quantity'] || object.attributes['exporter_quantity']
end
end
| Add missing fields and fix existing ones | Add missing fields and fix existing ones
| Ruby | bsd-3-clause | unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI | ruby | ## Code Before:
class Trade::ShipmentApiFromViewSerializer < ActiveModel::Serializer
attributes :id , :year, :appendix, :taxon, :class, :order, :family, :genus,
:term, :importer_reported_quantity, :exporter_reported_quantity,
:unit, :importer, :importer_iso, :exporter, :exporter_iso, :origin, :purpose, :source,
:import_permit, :export_permit, :origin_permit, :issue_type,
:compliance_type_taxonomic_rank
def importer_reported_quantity
object.attributes['importer_reported_quantity'] || object.attributes['importer_quantity']
end
def exporter_reported_quantity
object.attributes['exporter_reported_quantity'] || object.attributes['exporter_quantity']
end
end
## Instruction:
Add missing fields and fix existing ones
## Code After:
class Trade::ShipmentApiFromViewSerializer < ActiveModel::Serializer
attributes :id , :year, :appendix, :taxon, :klass, :order, :family, :genus,
:term, :importer_reported_quantity, :exporter_reported_quantity,
:unit, :importer, :importer_iso, :exporter, :exporter_iso, :origin, :purpose, :source,
:import_permit, :export_permit, :origin_permit, :issue_type,
:compliance_type_taxonomic_rank
def importer
object.importer || object.attributes["importer"]
end
def exporter
object.exporter || object.attributes["exporter"]
end
def origin
object.origin || object.attributes["origin"]
end
def term
object.term || object.attributes["term"]
end
def unit
object.unit || object.attributes["unit"]
end
def source
object.source || object.attributes["source"]
end
def purpose
object.purpose || object.attributes["purpose"]
end
def klass
object.attributes["class"]
end
def importer_reported_quantity
object.attributes['importer_reported_quantity'] || object.attributes['importer_quantity']
end
def exporter_reported_quantity
object.attributes['exporter_reported_quantity'] || object.attributes['exporter_quantity']
end
end
| class Trade::ShipmentApiFromViewSerializer < ActiveModel::Serializer
- attributes :id , :year, :appendix, :taxon, :class, :order, :family, :genus,
? ^
+ attributes :id , :year, :appendix, :taxon, :klass, :order, :family, :genus,
? ^
:term, :importer_reported_quantity, :exporter_reported_quantity,
:unit, :importer, :importer_iso, :exporter, :exporter_iso, :origin, :purpose, :source,
:import_permit, :export_permit, :origin_permit, :issue_type,
:compliance_type_taxonomic_rank
+
+
+ def importer
+ object.importer || object.attributes["importer"]
+ end
+
+ def exporter
+ object.exporter || object.attributes["exporter"]
+ end
+
+ def origin
+ object.origin || object.attributes["origin"]
+ end
+
+ def term
+ object.term || object.attributes["term"]
+ end
+
+ def unit
+ object.unit || object.attributes["unit"]
+ end
+
+ def source
+ object.source || object.attributes["source"]
+ end
+
+ def purpose
+ object.purpose || object.attributes["purpose"]
+ end
+
+ def klass
+ object.attributes["class"]
+ end
def importer_reported_quantity
object.attributes['importer_reported_quantity'] || object.attributes['importer_quantity']
end
def exporter_reported_quantity
object.attributes['exporter_reported_quantity'] || object.attributes['exporter_quantity']
end
end | 35 | 2.1875 | 34 | 1 |
2f67880e777c9efa5192f5c34ce5fc7d71fc0f08 | partner_communication_switzerland/wizards/end_contract_wizard.py | partner_communication_switzerland/wizards/end_contract_wizard.py |
from odoo import models, fields, api
class EndContractWizard(models.TransientModel):
_inherit = 'end.contract.wizard'
generate_communication = fields.Boolean(
'Create depart communication')
@api.multi
def end_contract(self):
self.ensure_one()
child = self.child_id
if self.generate_communication:
exit_config = self.env.ref(
'partner_communication_switzerland.'
'lifecycle_child_unplanned_exit')
self.contract_id.with_context(
default_object_ids=child.id,
default_auto_send=False).send_communication(exit_config)
return super(EndContractWizard, self).end_contract()
|
from odoo import models, fields, api
class EndContractWizard(models.TransientModel):
_inherit = 'end.contract.wizard'
generate_communication = fields.Boolean(
'Create depart communication')
@api.multi
def end_contract(self):
self.ensure_one()
if self.generate_communication:
exit_config = self.env.ref(
'partner_communication_switzerland.'
'lifecycle_child_unplanned_exit')
self.contract_id.with_context(
default_object_ids=self.contract_id.id,
default_auto_send=False).send_communication(exit_config)
return super(EndContractWizard, self).end_contract()
| FIX end contract depart letter generation | FIX end contract depart letter generation
| Python | agpl-3.0 | eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,ecino/compassion-switzerland,ecino/compassion-switzerland,ecino/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland | python | ## Code Before:
from odoo import models, fields, api
class EndContractWizard(models.TransientModel):
_inherit = 'end.contract.wizard'
generate_communication = fields.Boolean(
'Create depart communication')
@api.multi
def end_contract(self):
self.ensure_one()
child = self.child_id
if self.generate_communication:
exit_config = self.env.ref(
'partner_communication_switzerland.'
'lifecycle_child_unplanned_exit')
self.contract_id.with_context(
default_object_ids=child.id,
default_auto_send=False).send_communication(exit_config)
return super(EndContractWizard, self).end_contract()
## Instruction:
FIX end contract depart letter generation
## Code After:
from odoo import models, fields, api
class EndContractWizard(models.TransientModel):
_inherit = 'end.contract.wizard'
generate_communication = fields.Boolean(
'Create depart communication')
@api.multi
def end_contract(self):
self.ensure_one()
if self.generate_communication:
exit_config = self.env.ref(
'partner_communication_switzerland.'
'lifecycle_child_unplanned_exit')
self.contract_id.with_context(
default_object_ids=self.contract_id.id,
default_auto_send=False).send_communication(exit_config)
return super(EndContractWizard, self).end_contract()
|
from odoo import models, fields, api
class EndContractWizard(models.TransientModel):
_inherit = 'end.contract.wizard'
generate_communication = fields.Boolean(
'Create depart communication')
@api.multi
def end_contract(self):
self.ensure_one()
- child = self.child_id
-
if self.generate_communication:
exit_config = self.env.ref(
'partner_communication_switzerland.'
'lifecycle_child_unplanned_exit')
self.contract_id.with_context(
- default_object_ids=child.id,
? ^ -
+ default_object_ids=self.contract_id.id,
? +++++ ^^^^^^^^
default_auto_send=False).send_communication(exit_config)
return super(EndContractWizard, self).end_contract() | 4 | 0.166667 | 1 | 3 |
fd0e8eb702efe0c65a110dc7b9ef5774274aaeb6 | README.md | README.md | A simple JavaScript wrapper for the PokéAPI (v2)
| A simple JavaScript wrapper for the PokéAPI (v2)
## General
This is a simple wraper for the [PokéAPI](pokeapi.co) by [Paul Hallett](phalt.co). It is written in JavaScript and uses modern technologies like fetch and promises. This may not be the best to use if you want to support ancient browsers like IE6. Here's a compatibility list for you if that's the case. Be warned that I can not guarantee that it is correct.
## Compatibility
### pokeapi.js
* Firefox: 43+
* Chrome: 42+
* Opera: 35+
* Chrome for Android: 49+
* Android Browser: 47+
### pokeapi.js + [fetch polyfill](https://github.com/github/fetch)
* Firefox: 29+
* Chrome: 33+
* Opera: 35+
* IE: 10+
* Edge: 13+
* Safari: 9+
* Chrome for Android: 49+
* Android Browser: 4.4.4+
* iOS Safari: 8.4+
### pokeapi.js + [fetch polyfill](https://github.com/github/fetch) + [es6-promise polyfill](https://github.com/stefanpenner/es6-promise)
* Firefox: 1+
* Chrome: 1+
* Opera: 11+ (at least)
* IE: 7+ (at least)
* Edge: 11+
* Safari: 1.2+
* Chrome for Android: 1+
* Android Browser: 4.4.4+ (at least)
* iOS Safari: 8.4+ (at least)
| Add compatibility info to readme | Add compatibility info to readme | Markdown | apache-2.0 | 16patsle/pokeapi.js,16patsle/pokeapi.js | markdown | ## Code Before:
A simple JavaScript wrapper for the PokéAPI (v2)
## Instruction:
Add compatibility info to readme
## Code After:
A simple JavaScript wrapper for the PokéAPI (v2)
## General
This is a simple wraper for the [PokéAPI](pokeapi.co) by [Paul Hallett](phalt.co). It is written in JavaScript and uses modern technologies like fetch and promises. This may not be the best to use if you want to support ancient browsers like IE6. Here's a compatibility list for you if that's the case. Be warned that I can not guarantee that it is correct.
## Compatibility
### pokeapi.js
* Firefox: 43+
* Chrome: 42+
* Opera: 35+
* Chrome for Android: 49+
* Android Browser: 47+
### pokeapi.js + [fetch polyfill](https://github.com/github/fetch)
* Firefox: 29+
* Chrome: 33+
* Opera: 35+
* IE: 10+
* Edge: 13+
* Safari: 9+
* Chrome for Android: 49+
* Android Browser: 4.4.4+
* iOS Safari: 8.4+
### pokeapi.js + [fetch polyfill](https://github.com/github/fetch) + [es6-promise polyfill](https://github.com/stefanpenner/es6-promise)
* Firefox: 1+
* Chrome: 1+
* Opera: 11+ (at least)
* IE: 7+ (at least)
* Edge: 11+
* Safari: 1.2+
* Chrome for Android: 1+
* Android Browser: 4.4.4+ (at least)
* iOS Safari: 8.4+ (at least)
| A simple JavaScript wrapper for the PokéAPI (v2)
+ ## General
+ This is a simple wraper for the [PokéAPI](pokeapi.co) by [Paul Hallett](phalt.co). It is written in JavaScript and uses modern technologies like fetch and promises. This may not be the best to use if you want to support ancient browsers like IE6. Here's a compatibility list for you if that's the case. Be warned that I can not guarantee that it is correct.
+ ## Compatibility
+ ### pokeapi.js
+ * Firefox: 43+
+ * Chrome: 42+
+ * Opera: 35+
+
+ * Chrome for Android: 49+
+ * Android Browser: 47+
+
+ ### pokeapi.js + [fetch polyfill](https://github.com/github/fetch)
+ * Firefox: 29+
+ * Chrome: 33+
+ * Opera: 35+
+ * IE: 10+
+ * Edge: 13+
+ * Safari: 9+
+
+ * Chrome for Android: 49+
+ * Android Browser: 4.4.4+
+ * iOS Safari: 8.4+
+
+ ### pokeapi.js + [fetch polyfill](https://github.com/github/fetch) + [es6-promise polyfill](https://github.com/stefanpenner/es6-promise)
+ * Firefox: 1+
+ * Chrome: 1+
+ * Opera: 11+ (at least)
+ * IE: 7+ (at least)
+ * Edge: 11+
+ * Safari: 1.2+
+
+ * Chrome for Android: 1+
+ * Android Browser: 4.4.4+ (at least)
+ * iOS Safari: 8.4+ (at least) | 34 | 34 | 34 | 0 |
4a9c81499df4c1c818dc42e3142d102d905ccae3 | NotiSync/res/layout/profile_list_item.xml | NotiSync/res/layout/profile_list_item.xml | <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:holo="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dip" >
<RelativeLayout
android:id="@+id/switch_wrapper"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:padding="5dip" >
<org.jraf.android.backport.switchwidget.Switch
android:id="@+id/profile_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false" />
</RelativeLayout>
<TextView
android:id="@+id/profile_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginRight="15dip"
android:layout_toLeftOf="@id/profile_switch"
android:textColor="@color/profile_list_item_title"
android:textIsSelectable="false"
android:textSize="24sp"
android:textStyle="bold" />
</RelativeLayout> | <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:holo="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dip" >
<TextView
android:id="@+id/profile_name"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginRight="10dip"
android:layout_weight="1"
android:textColor="@color/profile_list_item_title"
android:textIsSelectable="false"
android:textSize="24sp"
android:textStyle="bold" />
<RelativeLayout
android:id="@+id/switch_wrapper"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip" >
<org.jraf.android.backport.switchwidget.Switch
android:id="@+id/profile_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false" />
</RelativeLayout>
</LinearLayout> | Fix the profile list item layout a bit | Fix the profile list item layout a bit | XML | apache-2.0 | mattprecious/notisync,mattprecious/notisync | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:holo="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dip" >
<RelativeLayout
android:id="@+id/switch_wrapper"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:padding="5dip" >
<org.jraf.android.backport.switchwidget.Switch
android:id="@+id/profile_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false" />
</RelativeLayout>
<TextView
android:id="@+id/profile_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginRight="15dip"
android:layout_toLeftOf="@id/profile_switch"
android:textColor="@color/profile_list_item_title"
android:textIsSelectable="false"
android:textSize="24sp"
android:textStyle="bold" />
</RelativeLayout>
## Instruction:
Fix the profile list item layout a bit
## Code After:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:holo="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="10dip" >
<TextView
android:id="@+id/profile_name"
android:layout_width="0dip"
android:layout_height="wrap_content"
android:layout_marginRight="10dip"
android:layout_weight="1"
android:textColor="@color/profile_list_item_title"
android:textIsSelectable="false"
android:textSize="24sp"
android:textStyle="bold" />
<RelativeLayout
android:id="@+id/switch_wrapper"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dip" >
<org.jraf.android.backport.switchwidget.Switch
android:id="@+id/profile_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false" />
</RelativeLayout>
</LinearLayout> | <?xml version="1.0" encoding="utf-8"?>
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
? ^ - ^^^^
+ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
? ^^^ ^
xmlns:holo="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:orientation="horizontal"
android:padding="10dip" >
+
+ <TextView
+ android:id="@+id/profile_name"
+ android:layout_width="0dip"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="10dip"
+ android:layout_weight="1"
+ android:textColor="@color/profile_list_item_title"
+ android:textIsSelectable="false"
+ android:textSize="24sp"
+ android:textStyle="bold" />
<RelativeLayout
android:id="@+id/switch_wrapper"
android:layout_width="wrap_content"
- android:layout_height="match_parent"
? ^ ------
+ android:layout_height="wrap_content"
? ^^ +++++
- android:layout_alignParentRight="true"
- android:layout_alignParentTop="true"
android:padding="5dip" >
<org.jraf.android.backport.switchwidget.Switch
android:id="@+id/profile_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:focusable="false"
android:focusableInTouchMode="false" />
</RelativeLayout>
+ </LinearLayout>
- <TextView
- android:id="@+id/profile_name"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_alignParentLeft="true"
- android:layout_alignParentTop="true"
- android:layout_marginRight="15dip"
- android:layout_toLeftOf="@id/profile_switch"
- android:textColor="@color/profile_list_item_title"
- android:textIsSelectable="false"
- android:textSize="24sp"
- android:textStyle="bold" />
-
- </RelativeLayout> | 33 | 0.891892 | 15 | 18 |
0cc261aacdfa00d083cc53b6c1146893119d52a7 | heart/themes/default/info.php | heart/themes/default/info.php | <?php
return array(
'name' => 'Stupid Reborn Admin Theme',
'description' => 'Flat Design Admin theme for the Reborn CMS',
'author' => 'Reborn Development Team',
'website' => 'http://www.reborncms.com',
'version' => 1.0,
'min-require' => 2.0
);
| <?php
return array(
'name' => 'Reborn Admin Default Theme',
'description' => 'Flat Design Admin theme for the Reborn CMS',
'author' => 'Reborn Development Team',
'website' => 'http://www.reborncms.com',
'version' => 1.0,
'min-require' => 2.0
);
| Update Admin Panel Theme Info. | Update Admin Panel Theme Info.
| PHP | mit | reborncms/reborn,reborncms/reborn,reborncms/reborn,reborncms/reborn | php | ## Code Before:
<?php
return array(
'name' => 'Stupid Reborn Admin Theme',
'description' => 'Flat Design Admin theme for the Reborn CMS',
'author' => 'Reborn Development Team',
'website' => 'http://www.reborncms.com',
'version' => 1.0,
'min-require' => 2.0
);
## Instruction:
Update Admin Panel Theme Info.
## Code After:
<?php
return array(
'name' => 'Reborn Admin Default Theme',
'description' => 'Flat Design Admin theme for the Reborn CMS',
'author' => 'Reborn Development Team',
'website' => 'http://www.reborncms.com',
'version' => 1.0,
'min-require' => 2.0
);
| <?php
return array(
- 'name' => 'Stupid Reborn Admin Theme',
? -------
+ 'name' => 'Reborn Admin Default Theme',
? ++++++++
'description' => 'Flat Design Admin theme for the Reborn CMS',
'author' => 'Reborn Development Team',
'website' => 'http://www.reborncms.com',
'version' => 1.0,
'min-require' => 2.0
); | 2 | 0.2 | 1 | 1 |
dde7ac815fd0e6eff9cff1d366d0d170b4445c51 | spec/support/helpers.rb | spec/support/helpers.rb | require_relative "../../spec/support/helpers/omniauth"
RSpec.configure do |config|
config.include Omniauth::TestHelpers
config.include ThirdPartyMocks
end
OmniAuth.config.test_mode = true
| require_relative "../../spec/support/helpers/omniauth"
require_relative "../../spec/support/helpers/third_party_mocks"
RSpec.configure do |config|
config.include Omniauth::TestHelpers
config.include ThirdPartyMocks
end
OmniAuth.config.test_mode = true
| Fix test by explicity requiring test helper | Fix test by explicity requiring test helper
| Ruby | mit | tsubery/quantifier,tsubery/quantifier,tsubery/quantifier | ruby | ## Code Before:
require_relative "../../spec/support/helpers/omniauth"
RSpec.configure do |config|
config.include Omniauth::TestHelpers
config.include ThirdPartyMocks
end
OmniAuth.config.test_mode = true
## Instruction:
Fix test by explicity requiring test helper
## Code After:
require_relative "../../spec/support/helpers/omniauth"
require_relative "../../spec/support/helpers/third_party_mocks"
RSpec.configure do |config|
config.include Omniauth::TestHelpers
config.include ThirdPartyMocks
end
OmniAuth.config.test_mode = true
| require_relative "../../spec/support/helpers/omniauth"
+ require_relative "../../spec/support/helpers/third_party_mocks"
RSpec.configure do |config|
config.include Omniauth::TestHelpers
config.include ThirdPartyMocks
end
OmniAuth.config.test_mode = true | 1 | 0.142857 | 1 | 0 |
4884e44865022986a42192a1331ebe3e446608b2 | zsh.d/aliases.zsh | zsh.d/aliases.zsh | if [[ `uname` == "FreeBSD" ]]; then
alias ls='ls -F'
else
alias ls='ls -F --color=auto'
fi
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias ll='ls -ltrh'
alias mv='mv -iv'
alias cp='cp -iva'
alias vi='vim'
alias scp='scp -o cipher=blowfish'
alias find='noglob find'
alias slocate='noglob slocate'
alias locate='noglob locate'
alias mlocate='noglob mlocate'
alias top='htop'
alias vimm='vim -c NotMuch'
# }}}
# {{{ shortcuts
alias burn='cdrecord -v speed=4 dev=/dev/cdrom'
# }}}
# {{{ Global aliases
alias -g L='|less'
alias -g G='|grep'
alias -g T='|tail'
# }}}
# {{{ functions
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# }}}
| if ls --color=auto >&/dev/null; then
alias ls='ls -F --color=auto'
else
alias ls='ls -F'
fi
alias ll='ls -ltrh'
if grep --color=auto >&/dev/null; then
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
fi
if which vim > /dev/null; then
alias vi='vim'
fi
alias find='noglob find'
# {{{ functions
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# }}}
| Check for --color=auto support before aliasing | [zsh] Check for --color=auto support before aliasing
Also, cleanup the alias file a bit.
| Shell | mit | koenwtje/dotfiles | shell | ## Code Before:
if [[ `uname` == "FreeBSD" ]]; then
alias ls='ls -F'
else
alias ls='ls -F --color=auto'
fi
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias ll='ls -ltrh'
alias mv='mv -iv'
alias cp='cp -iva'
alias vi='vim'
alias scp='scp -o cipher=blowfish'
alias find='noglob find'
alias slocate='noglob slocate'
alias locate='noglob locate'
alias mlocate='noglob mlocate'
alias top='htop'
alias vimm='vim -c NotMuch'
# }}}
# {{{ shortcuts
alias burn='cdrecord -v speed=4 dev=/dev/cdrom'
# }}}
# {{{ Global aliases
alias -g L='|less'
alias -g G='|grep'
alias -g T='|tail'
# }}}
# {{{ functions
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# }}}
## Instruction:
[zsh] Check for --color=auto support before aliasing
Also, cleanup the alias file a bit.
## Code After:
if ls --color=auto >&/dev/null; then
alias ls='ls -F --color=auto'
else
alias ls='ls -F'
fi
alias ll='ls -ltrh'
if grep --color=auto >&/dev/null; then
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
fi
if which vim > /dev/null; then
alias vi='vim'
fi
alias find='noglob find'
# {{{ functions
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# }}}
| - if [[ `uname` == "FreeBSD" ]]; then
+ if ls --color=auto >&/dev/null; then
+ alias ls='ls -F --color=auto'
+ else
alias ls='ls -F'
- else
- alias ls='ls -F --color=auto'
fi
- alias grep='grep --color=auto'
- alias egrep='egrep --color=auto'
alias ll='ls -ltrh'
- alias mv='mv -iv'
- alias cp='cp -iva'
+
+ if grep --color=auto >&/dev/null; then
+ alias grep='grep --color=auto'
+ alias egrep='egrep --color=auto'
+ fi
+
+ if which vim > /dev/null; then
- alias vi='vim'
+ alias vi='vim'
? ++
- alias scp='scp -o cipher=blowfish'
+ fi
alias find='noglob find'
- alias slocate='noglob slocate'
- alias locate='noglob locate'
- alias mlocate='noglob mlocate'
-
- alias top='htop'
-
- alias vimm='vim -c NotMuch'
- # }}}
-
- # {{{ shortcuts
- alias burn='cdrecord -v speed=4 dev=/dev/cdrom'
- # }}}
-
- # {{{ Global aliases
- alias -g L='|less'
- alias -g G='|grep'
- alias -g T='|tail'
- # }}}
# {{{ functions
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}
# }}} | 39 | 0.709091 | 12 | 27 |
09705e779e1ed1420e479200cc5ad17ded2ff781 | app/config/routing.yml | app/config/routing.yml | backend:
path: /private/{_locale}/{module}/{action}
defaults:
_controller: ApplicationRouting::backendController
_locale: ~
module: ~
action: ~
backend_ajax:
path: /src/Backend/Ajax.php
defaults:
_controller: ApplicationRouting::backendAjaxController
backend_cronjob:
path: /src/Backend/Cronjob.php
defaults:
_controller: ApplicationRouting::backendCronjobController
frontend_ajax:
path: /src/Frontend/Ajax.php
defaults:
_controller: ApplicationRouting::frontendAjaxController
install:
path: /install
defaults:
_controller: ApplicationRouting::installController
api:
path: /api
defaults:
_controller: ApplicationRouting::apiController
frontend:
path: /{route}
defaults:
_controller: ApplicationRouting::frontendController
route: ~
requirements:
route: (.*)
| backend:
path: /private/{_locale}/{module}/{action}
defaults:
_controller: ApplicationRouting::backendController
_locale: ~
module: ~
action: ~
backend_ajax:
path: /src/Backend/Ajax.php
defaults:
_controller: ApplicationRouting::backendAjaxController
backend_cronjob:
path: /src/Backend/Cronjob.php
defaults:
_controller: ApplicationRouting::backendCronjobController
frontend_ajax:
path: /src/Frontend/Ajax.php
defaults:
_controller: ApplicationRouting::frontendAjaxController
install:
path: /install
defaults:
_controller: ApplicationRouting::installController
api:
path: /api/{version}
defaults:
_controller: ApplicationRouting::apiController
version: ~
frontend:
path: /{route}
defaults:
_controller: ApplicationRouting::frontendController
route: ~
requirements:
route: (.*)
| Allow a version parameter in the api route | Allow a version parameter in the api route
| YAML | mit | dmoerman/forkcms,vytsci/forkcms,ikoene/forkcms,sumocoders/forkcms,vytenizs/forkcms,Katrienvh/forkcms,jessedobbelaere/forkcms,mathiashelin/forkcms,carakas/forkcms,jonasdekeukelaere/forkcms,tommyvdv/forkcms,tommyvdv/forkcms,dmoerman/forkcms,nosnickid/forkcms,jacob-v-dam/forkcms,jacob-v-dam/forkcms,DegradationOfMankind/forkcms,justcarakas/forkcms,jonasdekeukelaere/forkcms,matthiasmullie/forkcms,Katrienvh/forkcms,sumocoders/forkcms,DegradationOfMankind/forkcms,carakas/forkcms,jessedobbelaere/forkcms,riadvice/forkcms,vytsci/forkcms,Thijzer/forkcms,jonasdekeukelaere/forkcms,jacob-v-dam/forkcms,Thijzer/forkcms,riadvice/forkcms,jeroendesloovere/forkcms,mathiashelin/forkcms,jeroendesloovere/forkcms,jeroendesloovere/forkcms,riadvice/forkcms,jessedobbelaere/forkcms,carakas/forkcms,WouterSioen/forkcms,jonasdekeukelaere/forkcms,forkcms/forkcms,riadvice/forkcms,justcarakas/forkcms,vytsci/forkcms,matthiasmullie/forkcms,carakas/forkcms,DegradationOfMankind/forkcms,jeroendesloovere/forkcms,forkcms/forkcms,Saxithon/gh-pages,WouterSioen/forkcms,bartdc/forkcms,DegradationOfMankind/forkcms,carakas/forkcms,nosnickid/forkcms,Katrienvh/forkcms,jonasdekeukelaere/forkcms,bartdc/forkcms,Saxithon/gh-pages,sumocoders/forkcms,ikoene/forkcms,wengyulin/forkcms,sumocoders/forkcms,dmoerman/forkcms,jessedobbelaere/forkcms,tommyvdv/forkcms,tommyvdv/forkcms,sumocoders/forkcms,Thijzer/forkcms,forkcms/forkcms,Katrienvh/forkcms,mathiashelin/forkcms,wengyulin/forkcms,justcarakas/forkcms,forkcms/forkcms,mathiashelin/forkcms,jacob-v-dam/forkcms,bartdc/forkcms,vytenizs/forkcms,matthiasmullie/forkcms,ikoene/forkcms,vytenizs/forkcms,nosnickid/forkcms,wengyulin/forkcms | yaml | ## Code Before:
backend:
path: /private/{_locale}/{module}/{action}
defaults:
_controller: ApplicationRouting::backendController
_locale: ~
module: ~
action: ~
backend_ajax:
path: /src/Backend/Ajax.php
defaults:
_controller: ApplicationRouting::backendAjaxController
backend_cronjob:
path: /src/Backend/Cronjob.php
defaults:
_controller: ApplicationRouting::backendCronjobController
frontend_ajax:
path: /src/Frontend/Ajax.php
defaults:
_controller: ApplicationRouting::frontendAjaxController
install:
path: /install
defaults:
_controller: ApplicationRouting::installController
api:
path: /api
defaults:
_controller: ApplicationRouting::apiController
frontend:
path: /{route}
defaults:
_controller: ApplicationRouting::frontendController
route: ~
requirements:
route: (.*)
## Instruction:
Allow a version parameter in the api route
## Code After:
backend:
path: /private/{_locale}/{module}/{action}
defaults:
_controller: ApplicationRouting::backendController
_locale: ~
module: ~
action: ~
backend_ajax:
path: /src/Backend/Ajax.php
defaults:
_controller: ApplicationRouting::backendAjaxController
backend_cronjob:
path: /src/Backend/Cronjob.php
defaults:
_controller: ApplicationRouting::backendCronjobController
frontend_ajax:
path: /src/Frontend/Ajax.php
defaults:
_controller: ApplicationRouting::frontendAjaxController
install:
path: /install
defaults:
_controller: ApplicationRouting::installController
api:
path: /api/{version}
defaults:
_controller: ApplicationRouting::apiController
version: ~
frontend:
path: /{route}
defaults:
_controller: ApplicationRouting::frontendController
route: ~
requirements:
route: (.*)
| backend:
path: /private/{_locale}/{module}/{action}
defaults:
_controller: ApplicationRouting::backendController
_locale: ~
module: ~
action: ~
backend_ajax:
path: /src/Backend/Ajax.php
defaults:
_controller: ApplicationRouting::backendAjaxController
backend_cronjob:
path: /src/Backend/Cronjob.php
defaults:
_controller: ApplicationRouting::backendCronjobController
frontend_ajax:
path: /src/Frontend/Ajax.php
defaults:
_controller: ApplicationRouting::frontendAjaxController
install:
path: /install
defaults:
_controller: ApplicationRouting::installController
api:
- path: /api
+ path: /api/{version}
defaults:
_controller: ApplicationRouting::apiController
+ version: ~
frontend:
path: /{route}
defaults:
_controller: ApplicationRouting::frontendController
route: ~
requirements:
route: (.*) | 3 | 0.088235 | 2 | 1 |
da97f6c9ac7b9993a4be16d267c76505d47a4d15 | integrations/newrelic.md | integrations/newrelic.md | ---
title: New Relic Integration
tags: [integrations list]
permalink: newrelic.html
summary: Learn about the Wavefront New Relic Integration.
---
## New Relic Integration
The New Relic integration is a native integration offering agent less data ingestion of metrics from the New Relic SaaS service.
### Metrics Configuration
This integration can be configured to pull all application metrics from New Relic. If you want to pull only certain application metrics, configure filters while setting up the integration.
Metrics that originate from New Relic are prefixed with `newrelic.apps.` in Wavefront. After you set up the integration, you can browse the available metrics in the metrics browser.
## New Relic Integration
[[newrelicSetup]]
| ---
title: New Relic Integration
tags: [integrations list]
permalink: newrelic.html
summary: Learn about the Wavefront New Relic Integration.
---
## New Relic Integration
The New Relic integration is a native integration offering agent less data ingestion of metrics from the New Relic SaaS service.
### Metrics Configuration
This integration can be configured to pull all application metrics from New Relic. If you want to pull only certain application metrics, configure filters while setting up the integration.
Metrics that originate from New Relic are prefixed with `newrelic.apps.` in Wavefront. After you set up the integration, you can browse the available metrics in the metrics browser.
## New Relic Integration Setup
To set up the integration, give Wavefront read-only access to your New Relic account.
then configure Wavefront to continually load application data.
1. Navigate to New Relic API Key generator
2. Generate a key
3. Give Wavefront read-only access to your New Relic account.
4. Copy the key and paste it into the **API Key** field on the right.
3. (Optional) Add Source Filters and Metric Filters.
| Update New Relic integration - script isn't doing it correctly, missing help file. | Update New Relic integration - script isn't doing it correctly, missing help file.
| Markdown | apache-2.0 | wavefrontHQ/docs,wavefrontHQ/docs,wavefrontHQ/docs | markdown | ## Code Before:
---
title: New Relic Integration
tags: [integrations list]
permalink: newrelic.html
summary: Learn about the Wavefront New Relic Integration.
---
## New Relic Integration
The New Relic integration is a native integration offering agent less data ingestion of metrics from the New Relic SaaS service.
### Metrics Configuration
This integration can be configured to pull all application metrics from New Relic. If you want to pull only certain application metrics, configure filters while setting up the integration.
Metrics that originate from New Relic are prefixed with `newrelic.apps.` in Wavefront. After you set up the integration, you can browse the available metrics in the metrics browser.
## New Relic Integration
[[newrelicSetup]]
## Instruction:
Update New Relic integration - script isn't doing it correctly, missing help file.
## Code After:
---
title: New Relic Integration
tags: [integrations list]
permalink: newrelic.html
summary: Learn about the Wavefront New Relic Integration.
---
## New Relic Integration
The New Relic integration is a native integration offering agent less data ingestion of metrics from the New Relic SaaS service.
### Metrics Configuration
This integration can be configured to pull all application metrics from New Relic. If you want to pull only certain application metrics, configure filters while setting up the integration.
Metrics that originate from New Relic are prefixed with `newrelic.apps.` in Wavefront. After you set up the integration, you can browse the available metrics in the metrics browser.
## New Relic Integration Setup
To set up the integration, give Wavefront read-only access to your New Relic account.
then configure Wavefront to continually load application data.
1. Navigate to New Relic API Key generator
2. Generate a key
3. Give Wavefront read-only access to your New Relic account.
4. Copy the key and paste it into the **API Key** field on the right.
3. (Optional) Add Source Filters and Metric Filters.
| ---
title: New Relic Integration
tags: [integrations list]
permalink: newrelic.html
summary: Learn about the Wavefront New Relic Integration.
---
## New Relic Integration
The New Relic integration is a native integration offering agent less data ingestion of metrics from the New Relic SaaS service.
### Metrics Configuration
This integration can be configured to pull all application metrics from New Relic. If you want to pull only certain application metrics, configure filters while setting up the integration.
Metrics that originate from New Relic are prefixed with `newrelic.apps.` in Wavefront. After you set up the integration, you can browse the available metrics in the metrics browser.
- ## New Relic Integration
+ ## New Relic Integration Setup
? ++++++
-
-
- [[newrelicSetup]]
-
+ To set up the integration, give Wavefront read-only access to your New Relic account.
+ then configure Wavefront to continually load application data.
+ 1. Navigate to New Relic API Key generator
+ 2. Generate a key
+ 3. Give Wavefront read-only access to your New Relic account.
+ 4. Copy the key and paste it into the **API Key** field on the right.
+ 3. (Optional) Add Source Filters and Metric Filters. | 13 | 0.619048 | 8 | 5 |
2782adc92f11af17e62eca0ee3f6df2f88a9f0c8 | .eslintrc.js | .eslintrc.js | module.exports = {
parser: "babel-eslint",
env: {
es6: true,
node: true,
},
extends: "eslint:recommended",
parserOptions: {
sourceType: "module",
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
},
globals: {
atom: true,
},
rules: {
"comma-dangle": [0],
"no-this-before-super": [2],
"constructor-super": [2],
indent: [2, 2],
"linebreak-style": [2, "unix"],
"no-var": [1],
"prefer-const": [1],
"no-const-assign": [2],
"no-unused-vars": [2],
semi: [2, "never"],
"no-extra-semi": [0],
},
}
| module.exports = {
parser: "babel-eslint",
env: {
es6: true,
node: true,
},
extends: "eslint:recommended",
parserOptions: {
sourceType: "module",
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
},
globals: {
atom: true,
},
rules: {
"comma-dangle": [0],
"no-this-before-super": [2],
"constructor-super": [2],
// prettier handles indentation, and they disagree on some of the code in
// find-destination-spec.jw
// indent: [2, 2],
"linebreak-style": [2, "unix"],
"no-var": [1],
"prefer-const": [1],
"no-const-assign": [2],
"no-unused-vars": [2],
semi: [2, "never"],
"no-extra-semi": [0],
},
}
| Disable the indent rule in eslint | Disable the indent rule in eslint
| JavaScript | mit | AsaAyers/js-hyperclick,AsaAyers/js-hyperclick | javascript | ## Code Before:
module.exports = {
parser: "babel-eslint",
env: {
es6: true,
node: true,
},
extends: "eslint:recommended",
parserOptions: {
sourceType: "module",
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
},
globals: {
atom: true,
},
rules: {
"comma-dangle": [0],
"no-this-before-super": [2],
"constructor-super": [2],
indent: [2, 2],
"linebreak-style": [2, "unix"],
"no-var": [1],
"prefer-const": [1],
"no-const-assign": [2],
"no-unused-vars": [2],
semi: [2, "never"],
"no-extra-semi": [0],
},
}
## Instruction:
Disable the indent rule in eslint
## Code After:
module.exports = {
parser: "babel-eslint",
env: {
es6: true,
node: true,
},
extends: "eslint:recommended",
parserOptions: {
sourceType: "module",
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
},
globals: {
atom: true,
},
rules: {
"comma-dangle": [0],
"no-this-before-super": [2],
"constructor-super": [2],
// prettier handles indentation, and they disagree on some of the code in
// find-destination-spec.jw
// indent: [2, 2],
"linebreak-style": [2, "unix"],
"no-var": [1],
"prefer-const": [1],
"no-const-assign": [2],
"no-unused-vars": [2],
semi: [2, "never"],
"no-extra-semi": [0],
},
}
| module.exports = {
parser: "babel-eslint",
env: {
es6: true,
node: true,
},
extends: "eslint:recommended",
parserOptions: {
sourceType: "module",
ecmaFeatures: {
experimentalObjectRestSpread: true,
},
},
globals: {
atom: true,
},
rules: {
"comma-dangle": [0],
"no-this-before-super": [2],
"constructor-super": [2],
+ // prettier handles indentation, and they disagree on some of the code in
+ // find-destination-spec.jw
- indent: [2, 2],
+ // indent: [2, 2],
? +++
"linebreak-style": [2, "unix"],
"no-var": [1],
"prefer-const": [1],
"no-const-assign": [2],
"no-unused-vars": [2],
semi: [2, "never"],
"no-extra-semi": [0],
},
} | 4 | 0.133333 | 3 | 1 |
78ed087c0ef35db2dc3f70a3e6df6ac08f9da210 | README.md | README.md | various config files
Actual config files are in the repository. The script `makelinks.sh` creates
soft links to them in the appropriate locations.
Use the `-f` option `./makelinks.sh -f` to remove existing files before
linking.
## Vim stuff
The `wombat256` color scheme for Vim can be found here:
http://www.vim.org/scripts/script.php?script_id=2465
The supertab plugin can be found here:
http://www.vim.org/scripts/script.php?script_id=1643
| various config files
Actual config files are in the repository. The script `makelinks.sh` creates
soft links to them in the appropriate locations.
Use the `-f` option `./makelinks.sh -f` to remove existing files before
linking.
## Zsh stuff
Configure your terminal to use the recommended font here:
https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k
Powerlevel10k is cloned/pulled by `./makelinks.sh`.
## Vim stuff
The `wombat256` color scheme for Vim can be found here:
http://www.vim.org/scripts/script.php?script_id=2465
The supertab plugin can be found here:
http://www.vim.org/scripts/script.php?script_id=1643
| Add notes abput zsh stuff in readme | Add notes abput zsh stuff in readme
| Markdown | mit | amorison/configs | markdown | ## Code Before:
various config files
Actual config files are in the repository. The script `makelinks.sh` creates
soft links to them in the appropriate locations.
Use the `-f` option `./makelinks.sh -f` to remove existing files before
linking.
## Vim stuff
The `wombat256` color scheme for Vim can be found here:
http://www.vim.org/scripts/script.php?script_id=2465
The supertab plugin can be found here:
http://www.vim.org/scripts/script.php?script_id=1643
## Instruction:
Add notes abput zsh stuff in readme
## Code After:
various config files
Actual config files are in the repository. The script `makelinks.sh` creates
soft links to them in the appropriate locations.
Use the `-f` option `./makelinks.sh -f` to remove existing files before
linking.
## Zsh stuff
Configure your terminal to use the recommended font here:
https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k
Powerlevel10k is cloned/pulled by `./makelinks.sh`.
## Vim stuff
The `wombat256` color scheme for Vim can be found here:
http://www.vim.org/scripts/script.php?script_id=2465
The supertab plugin can be found here:
http://www.vim.org/scripts/script.php?script_id=1643
| various config files
Actual config files are in the repository. The script `makelinks.sh` creates
soft links to them in the appropriate locations.
Use the `-f` option `./makelinks.sh -f` to remove existing files before
linking.
+ ## Zsh stuff
+
+ Configure your terminal to use the recommended font here:
+ https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k
+
+ Powerlevel10k is cloned/pulled by `./makelinks.sh`.
+
## Vim stuff
The `wombat256` color scheme for Vim can be found here:
http://www.vim.org/scripts/script.php?script_id=2465
The supertab plugin can be found here:
http://www.vim.org/scripts/script.php?script_id=1643 | 7 | 0.466667 | 7 | 0 |
305927b4f380412c4fbd8a99a4e2d659a3c3fe63 | grails-app/conf/BuildConfig.groovy | grails-app/conf/BuildConfig.groovy | grails.project.dependency.resolution = {
inherits("global") {
}
log "warn"
plugins{
test "org.grails.plugins:code-coverage:1.2.4"
test "org.grails.plugins:spock:0.5-groovy-1.7"
}
repositories {
mavenLocal()
mavenCentral()
grailsPlugins()
grailsHome()
grailsCentral()
}
dependencies {
compile("org.codehaus.groovy.modules.http-builder:http-builder:0.5.0") {
excludes 'groovy', 'xml-apis', 'xercesImpl', 'commons-lang'
}
runtime 'commons-httpclient:commons-httpclient:3.0.1'
runtime 'xerces:xerces:2.4.0'
}
}
| grails.project.dependency.resolution = {
inherits("global") {
}
log "warn"
plugins{
test "org.grails.plugins:code-coverage:1.2.4" { export = false }
test "org.grails.plugins:spock:0.5-groovy-1.7" { export = false }
}
repositories {
mavenLocal()
mavenCentral()
grailsPlugins()
grailsHome()
grailsCentral()
}
dependencies {
compile("org.codehaus.groovy.modules.http-builder:http-builder:0.5.0") {
excludes 'groovy', 'xml-apis', 'xercesImpl', 'commons-lang'
}
runtime 'commons-httpclient:commons-httpclient:3.0.1'
runtime 'xerces:xerces:2.4.0'
}
}
| Add { export = false } to avoid problems in Gails 2.0.1 with wrong dependencies on spock and groovy 1.7.x | Add { export = false } to avoid problems in Gails 2.0.1 with wrong dependencies on spock and groovy 1.7.x | Groovy | apache-2.0 | domix/avatarplugin | groovy | ## Code Before:
grails.project.dependency.resolution = {
inherits("global") {
}
log "warn"
plugins{
test "org.grails.plugins:code-coverage:1.2.4"
test "org.grails.plugins:spock:0.5-groovy-1.7"
}
repositories {
mavenLocal()
mavenCentral()
grailsPlugins()
grailsHome()
grailsCentral()
}
dependencies {
compile("org.codehaus.groovy.modules.http-builder:http-builder:0.5.0") {
excludes 'groovy', 'xml-apis', 'xercesImpl', 'commons-lang'
}
runtime 'commons-httpclient:commons-httpclient:3.0.1'
runtime 'xerces:xerces:2.4.0'
}
}
## Instruction:
Add { export = false } to avoid problems in Gails 2.0.1 with wrong dependencies on spock and groovy 1.7.x
## Code After:
grails.project.dependency.resolution = {
inherits("global") {
}
log "warn"
plugins{
test "org.grails.plugins:code-coverage:1.2.4" { export = false }
test "org.grails.plugins:spock:0.5-groovy-1.7" { export = false }
}
repositories {
mavenLocal()
mavenCentral()
grailsPlugins()
grailsHome()
grailsCentral()
}
dependencies {
compile("org.codehaus.groovy.modules.http-builder:http-builder:0.5.0") {
excludes 'groovy', 'xml-apis', 'xercesImpl', 'commons-lang'
}
runtime 'commons-httpclient:commons-httpclient:3.0.1'
runtime 'xerces:xerces:2.4.0'
}
}
| grails.project.dependency.resolution = {
inherits("global") {
}
log "warn"
plugins{
- test "org.grails.plugins:code-coverage:1.2.4"
+ test "org.grails.plugins:code-coverage:1.2.4" { export = false }
? +++++++++++++++++++
- test "org.grails.plugins:spock:0.5-groovy-1.7"
+ test "org.grails.plugins:spock:0.5-groovy-1.7" { export = false }
? +++++++++++++++++++
}
repositories {
mavenLocal()
mavenCentral()
grailsPlugins()
grailsHome()
grailsCentral()
}
dependencies {
compile("org.codehaus.groovy.modules.http-builder:http-builder:0.5.0") {
excludes 'groovy', 'xml-apis', 'xercesImpl', 'commons-lang'
}
runtime 'commons-httpclient:commons-httpclient:3.0.1'
runtime 'xerces:xerces:2.4.0'
}
} | 4 | 0.173913 | 2 | 2 |
5c171c5eec654217cd761c0683ba5c45ccb15a30 | lib/aliases.zsh | lib/aliases.zsh | alias pu='pushd'
alias po='popd'
# Super user
alias _='sudo'
alias gr='grep -in'
# Show history
alias history='fc -l 1'
# List direcory contents
alias lsa='ls -lahF'
alias l='ls -lA1'
alias ll='ls -l'
alias la='ls -lA'
alias rm='rm -i'
alias du='du -h'
# Use the keyboard shortcut, dummy
alias cl='echo "No! Use CTRL+L!"'
alias clear='echo "No! Use CTRL+L!"'
alias cp='cp -i'
alias mv='mv -i'
alias tf='tail -f'
alias ssr='ssh -l root'
alias gvim='/usr/local/bin/mvim'
alias afind='ack-grep -il'
if [[ `which cdf` == '/usr/local/bin/cdf' ]]; then
alias df='cdf -h'
else
alias df='df -h'
fi
| alias pu='pushd'
alias po='popd'
# Super user
alias _='sudo'
alias gr='grep -in'
# Show history
alias history='fc -l 1'
# List direcory contents
alias lsa='ls -lahF'
alias lsal='ls -lahF|less'
alias l='ls -lA1'
alias ll='ls -l'
alias la='ls -lA'
alias rm='rm -i'
alias du='du -h'
# Use the keyboard shortcut, dummy
alias cl='echo "No! Use CTRL+L!"'
alias clear='echo "No! Use CTRL+L!"'
alias cp='cp -i'
alias mv='mv -i'
alias tf='tail -f'
alias ssr='ssh -l root'
alias gvim='/usr/local/bin/mvim'
alias afind='ack-grep -il'
if [[ `which cdf` == '/usr/local/bin/cdf' ]]; then
alias df='cdf -h'
else
alias df='df -h'
fi
| Add new lsal alias to less lsa output | Add new lsal alias to less lsa output
| Shell | mit | devnall/oh-my-zsh,devnall/oh-my-zsh,devnall/oh-my-zsh,devnall/oh-my-zsh | shell | ## Code Before:
alias pu='pushd'
alias po='popd'
# Super user
alias _='sudo'
alias gr='grep -in'
# Show history
alias history='fc -l 1'
# List direcory contents
alias lsa='ls -lahF'
alias l='ls -lA1'
alias ll='ls -l'
alias la='ls -lA'
alias rm='rm -i'
alias du='du -h'
# Use the keyboard shortcut, dummy
alias cl='echo "No! Use CTRL+L!"'
alias clear='echo "No! Use CTRL+L!"'
alias cp='cp -i'
alias mv='mv -i'
alias tf='tail -f'
alias ssr='ssh -l root'
alias gvim='/usr/local/bin/mvim'
alias afind='ack-grep -il'
if [[ `which cdf` == '/usr/local/bin/cdf' ]]; then
alias df='cdf -h'
else
alias df='df -h'
fi
## Instruction:
Add new lsal alias to less lsa output
## Code After:
alias pu='pushd'
alias po='popd'
# Super user
alias _='sudo'
alias gr='grep -in'
# Show history
alias history='fc -l 1'
# List direcory contents
alias lsa='ls -lahF'
alias lsal='ls -lahF|less'
alias l='ls -lA1'
alias ll='ls -l'
alias la='ls -lA'
alias rm='rm -i'
alias du='du -h'
# Use the keyboard shortcut, dummy
alias cl='echo "No! Use CTRL+L!"'
alias clear='echo "No! Use CTRL+L!"'
alias cp='cp -i'
alias mv='mv -i'
alias tf='tail -f'
alias ssr='ssh -l root'
alias gvim='/usr/local/bin/mvim'
alias afind='ack-grep -il'
if [[ `which cdf` == '/usr/local/bin/cdf' ]]; then
alias df='cdf -h'
else
alias df='df -h'
fi
| alias pu='pushd'
alias po='popd'
# Super user
alias _='sudo'
alias gr='grep -in'
# Show history
alias history='fc -l 1'
# List direcory contents
alias lsa='ls -lahF'
+ alias lsal='ls -lahF|less'
alias l='ls -lA1'
alias ll='ls -l'
alias la='ls -lA'
alias rm='rm -i'
alias du='du -h'
# Use the keyboard shortcut, dummy
alias cl='echo "No! Use CTRL+L!"'
alias clear='echo "No! Use CTRL+L!"'
alias cp='cp -i'
alias mv='mv -i'
alias tf='tail -f'
alias ssr='ssh -l root'
alias gvim='/usr/local/bin/mvim'
alias afind='ack-grep -il'
if [[ `which cdf` == '/usr/local/bin/cdf' ]]; then
alias df='cdf -h'
else
alias df='df -h'
fi | 1 | 0.025 | 1 | 0 |
23deb11563542f916e5cb141d95f5e0329371124 | lib/json_key_transformer_middleware/outgoing_json_formatter.rb | lib/json_key_transformer_middleware/outgoing_json_formatter.rb | require 'oj'
module JsonKeyTransformerMiddleware
class OutgoingJsonFormatter < Middleware
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
new_body = self.class.build_new_body(body)
[status, headers, new_body]
end
private
def self.build_new_body(body)
Enumerator.new do |yielder|
body.each do |body_part|
yielder << transform_outgoing_body_part(body_part)
end
end
end
def self.transform_outgoing_body_part(body_part)
begin
Oj.dump(
deep_transform_hash_keys(
Oj.load(body_part), :underscore_to_camel))
rescue
body_part
end
end
end
end
| require 'oj'
module JsonKeyTransformerMiddleware
class OutgoingJsonFormatter < Middleware
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
new_body = build_new_body(body)
[status, headers, new_body]
end
private
def build_new_body(body)
Enumerator.new do |yielder|
body.each do |body_part|
yielder << transform_outgoing_body_part(body_part)
end
end
end
def transform_outgoing_body_part(body_part)
begin
Oj.dump(
deep_transform_hash_keys(
Oj.load(body_part), :underscore_to_camel))
rescue
body_part
end
end
end
end
| Fix issue introduced by using class methods | Fix issue introduced by using class methods
| Ruby | apache-2.0 | kevinrood/json_key_transformer_middleware | ruby | ## Code Before:
require 'oj'
module JsonKeyTransformerMiddleware
class OutgoingJsonFormatter < Middleware
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
new_body = self.class.build_new_body(body)
[status, headers, new_body]
end
private
def self.build_new_body(body)
Enumerator.new do |yielder|
body.each do |body_part|
yielder << transform_outgoing_body_part(body_part)
end
end
end
def self.transform_outgoing_body_part(body_part)
begin
Oj.dump(
deep_transform_hash_keys(
Oj.load(body_part), :underscore_to_camel))
rescue
body_part
end
end
end
end
## Instruction:
Fix issue introduced by using class methods
## Code After:
require 'oj'
module JsonKeyTransformerMiddleware
class OutgoingJsonFormatter < Middleware
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
new_body = build_new_body(body)
[status, headers, new_body]
end
private
def build_new_body(body)
Enumerator.new do |yielder|
body.each do |body_part|
yielder << transform_outgoing_body_part(body_part)
end
end
end
def transform_outgoing_body_part(body_part)
begin
Oj.dump(
deep_transform_hash_keys(
Oj.load(body_part), :underscore_to_camel))
rescue
body_part
end
end
end
end
| require 'oj'
module JsonKeyTransformerMiddleware
class OutgoingJsonFormatter < Middleware
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
- new_body = self.class.build_new_body(body)
? -----------
+ new_body = build_new_body(body)
[status, headers, new_body]
end
private
- def self.build_new_body(body)
? -----
+ def build_new_body(body)
Enumerator.new do |yielder|
body.each do |body_part|
yielder << transform_outgoing_body_part(body_part)
end
end
end
- def self.transform_outgoing_body_part(body_part)
? -----
+ def transform_outgoing_body_part(body_part)
begin
Oj.dump(
deep_transform_hash_keys(
Oj.load(body_part), :underscore_to_camel))
rescue
body_part
end
end
end
end | 6 | 0.146341 | 3 | 3 |
e39bcde813d35c8079743fbed7e77f2c8e4b4596 | examples/mainwindow.py | examples/mainwindow.py | import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
uic.loadUi(_UI, self)
@Slot()
def on_pushButton_clicked(self):
self.close()
@Slot()
def closeEvent(self, event):
reply = QMessageBox.question(self, 'Exit', 'Do you want to exit?')
if reply == QMessageBox.Yes:
event.accept()
else:
event.ignore()
if __name__ == '__main__':
app = QApplication(sys.argv)
qtmodern.styles.dark(app)
mw = qtmodern.windows.ModernWindow(MainWindow())
mw.show()
sys.exit(app.exec_())
| import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
self.ui = uic.loadUi(_UI, self)
self.ui.actionLight.triggered.connect(self.lightTheme)
self.ui.actionDark.triggered.connect(self.darkTheme)
def lightTheme(self):
qtmodern.styles.light(QApplication.instance())
def darkTheme(self):
qtmodern.styles.dark(QApplication.instance())
@Slot()
def on_pushButton_clicked(self):
self.close()
@Slot()
def closeEvent(self, event):
reply = QMessageBox.question(self, 'Exit', 'Do you want to exit?')
if reply == QMessageBox.Yes:
event.accept()
else:
event.ignore()
if __name__ == '__main__':
app = QApplication(sys.argv)
qtmodern.styles.dark(app)
mw = qtmodern.windows.ModernWindow(MainWindow())
mw.show()
sys.exit(app.exec_())
| Update example to switch between light and dark themes | Update example to switch between light and dark themes | Python | mit | gmarull/qtmodern | python | ## Code Before:
import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
uic.loadUi(_UI, self)
@Slot()
def on_pushButton_clicked(self):
self.close()
@Slot()
def closeEvent(self, event):
reply = QMessageBox.question(self, 'Exit', 'Do you want to exit?')
if reply == QMessageBox.Yes:
event.accept()
else:
event.ignore()
if __name__ == '__main__':
app = QApplication(sys.argv)
qtmodern.styles.dark(app)
mw = qtmodern.windows.ModernWindow(MainWindow())
mw.show()
sys.exit(app.exec_())
## Instruction:
Update example to switch between light and dark themes
## Code After:
import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
self.ui = uic.loadUi(_UI, self)
self.ui.actionLight.triggered.connect(self.lightTheme)
self.ui.actionDark.triggered.connect(self.darkTheme)
def lightTheme(self):
qtmodern.styles.light(QApplication.instance())
def darkTheme(self):
qtmodern.styles.dark(QApplication.instance())
@Slot()
def on_pushButton_clicked(self):
self.close()
@Slot()
def closeEvent(self, event):
reply = QMessageBox.question(self, 'Exit', 'Do you want to exit?')
if reply == QMessageBox.Yes:
event.accept()
else:
event.ignore()
if __name__ == '__main__':
app = QApplication(sys.argv)
qtmodern.styles.dark(app)
mw = qtmodern.windows.ModernWindow(MainWindow())
mw.show()
sys.exit(app.exec_())
| import sys
from os.path import join, dirname, abspath
from qtpy import uic
from qtpy.QtCore import Slot
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox
import qtmodern.styles
import qtmodern.windows
_UI = join(dirname(abspath(__file__)), 'mainwindow.ui')
class MainWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self)
- uic.loadUi(_UI, self)
+ self.ui = uic.loadUi(_UI, self)
? ++++++++++
+
+ self.ui.actionLight.triggered.connect(self.lightTheme)
+ self.ui.actionDark.triggered.connect(self.darkTheme)
+
+ def lightTheme(self):
+ qtmodern.styles.light(QApplication.instance())
+
+ def darkTheme(self):
+ qtmodern.styles.dark(QApplication.instance())
@Slot()
def on_pushButton_clicked(self):
self.close()
@Slot()
def closeEvent(self, event):
reply = QMessageBox.question(self, 'Exit', 'Do you want to exit?')
if reply == QMessageBox.Yes:
event.accept()
else:
event.ignore()
if __name__ == '__main__':
app = QApplication(sys.argv)
qtmodern.styles.dark(app)
mw = qtmodern.windows.ModernWindow(MainWindow())
mw.show()
sys.exit(app.exec_()) | 11 | 0.261905 | 10 | 1 |
114b39b356dc2400b65eb39052564c9c08633ce8 | branch.sql | branch.sql | BEGIN;
CREATE TABLE emails
( id serial PRIMARY KEY
, address text NOT NULL
, verified boolean DEFAULT NULL
CONSTRAINT verified_cant_be_false
-- Only use TRUE and NULL, so that the unique
-- constraint below functions properly.
CHECK (verified IS NOT FALSE)
, nonce text
, ctime timestamp with time zone NOT NULL
DEFAULT CURRENT_TIMESTAMP
, mtime timestamp with time zone
, participant text NOT NULL
REFERENCES participants
ON UPDATE CASCADE
ON DELETE RESTRICT
, UNIQUE (address, verified) -- A verified email address can't be linked to multiple
-- participants. However, an *un*verified address *can*
-- be linked to multiple participants. We implement this
-- by using NULL instead of FALSE for the unverified
-- state, hence the check constraint on verified.
, UNIQUE (participant, address)
);
-- The participants table currently has an `email` attribute of type
-- email_address_with confirmation. This should be deleted in the future,
-- once the emails are migrated. The column we're going to replace it with
-- is named `email_address`. This is only for **verified** emails. All
-- unverified email stuff happens in the emails table and won't touch this
-- attribute.
ALTER TABLE participants ADD COLUMN email_address text UNIQUE,
ADD COLUMN email_lang text;
UPDATE events
SET payload = replace(replace( payload::text, '"set"', '"add"')
, '"current_email"'
, '"email"'
)::json
WHERE payload->>'action' = 'set'
AND (payload->'values'->'current_email') IS NOT NULL;
END;
| BEGIN;
CREATE TABLE emails
( id serial PRIMARY KEY
, address text NOT NULL
, verified boolean DEFAULT NULL
CONSTRAINT verified_cant_be_false
-- Only use TRUE and NULL, so that the
-- unique constraint below functions
-- properly.
CHECK (verified IS NOT FALSE)
, nonce text
, ctime timestamp with time zone NOT NULL
DEFAULT CURRENT_TIMESTAMP
, mtime timestamp with time zone
, participant text NOT NULL
REFERENCES participants
ON UPDATE CASCADE
ON DELETE RESTRICT
, UNIQUE (address, verified) -- A verified email address can't be linked to multiple
-- participants. However, an *un*verified address *can*
-- be linked to multiple participants. We implement this
-- by using NULL instead of FALSE for the unverified
-- state, hence the check constraint on verified.
, UNIQUE (participant, address)
);
-- The participants table currently has an `email` attribute of type
-- email_address_with confirmation. This should be deleted in the future,
-- once the emails are migrated. The column we're going to replace it with
-- is named `email_address`. This is only for **verified** emails. All
-- unverified email stuff happens in the emails table and won't touch this
-- attribute.
ALTER TABLE participants ADD COLUMN email_address text UNIQUE,
ADD COLUMN email_lang text;
UPDATE events
SET payload = replace(replace( payload::text, '"set"', '"add"')
, '"current_email"'
, '"email"'
)::json
WHERE payload->>'action' = 'set'
AND (payload->'values'->'current_email') IS NOT NULL;
END;
| Make room for longer field names | Make room for longer field names
| SQL | mit | mccolgst/www.gittip.com,eXcomm/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,studio666/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,studio666/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,studio666/gratipay.com,mccolgst/www.gittip.com,mccolgst/www.gittip.com | sql | ## Code Before:
BEGIN;
CREATE TABLE emails
( id serial PRIMARY KEY
, address text NOT NULL
, verified boolean DEFAULT NULL
CONSTRAINT verified_cant_be_false
-- Only use TRUE and NULL, so that the unique
-- constraint below functions properly.
CHECK (verified IS NOT FALSE)
, nonce text
, ctime timestamp with time zone NOT NULL
DEFAULT CURRENT_TIMESTAMP
, mtime timestamp with time zone
, participant text NOT NULL
REFERENCES participants
ON UPDATE CASCADE
ON DELETE RESTRICT
, UNIQUE (address, verified) -- A verified email address can't be linked to multiple
-- participants. However, an *un*verified address *can*
-- be linked to multiple participants. We implement this
-- by using NULL instead of FALSE for the unverified
-- state, hence the check constraint on verified.
, UNIQUE (participant, address)
);
-- The participants table currently has an `email` attribute of type
-- email_address_with confirmation. This should be deleted in the future,
-- once the emails are migrated. The column we're going to replace it with
-- is named `email_address`. This is only for **verified** emails. All
-- unverified email stuff happens in the emails table and won't touch this
-- attribute.
ALTER TABLE participants ADD COLUMN email_address text UNIQUE,
ADD COLUMN email_lang text;
UPDATE events
SET payload = replace(replace( payload::text, '"set"', '"add"')
, '"current_email"'
, '"email"'
)::json
WHERE payload->>'action' = 'set'
AND (payload->'values'->'current_email') IS NOT NULL;
END;
## Instruction:
Make room for longer field names
## Code After:
BEGIN;
CREATE TABLE emails
( id serial PRIMARY KEY
, address text NOT NULL
, verified boolean DEFAULT NULL
CONSTRAINT verified_cant_be_false
-- Only use TRUE and NULL, so that the
-- unique constraint below functions
-- properly.
CHECK (verified IS NOT FALSE)
, nonce text
, ctime timestamp with time zone NOT NULL
DEFAULT CURRENT_TIMESTAMP
, mtime timestamp with time zone
, participant text NOT NULL
REFERENCES participants
ON UPDATE CASCADE
ON DELETE RESTRICT
, UNIQUE (address, verified) -- A verified email address can't be linked to multiple
-- participants. However, an *un*verified address *can*
-- be linked to multiple participants. We implement this
-- by using NULL instead of FALSE for the unverified
-- state, hence the check constraint on verified.
, UNIQUE (participant, address)
);
-- The participants table currently has an `email` attribute of type
-- email_address_with confirmation. This should be deleted in the future,
-- once the emails are migrated. The column we're going to replace it with
-- is named `email_address`. This is only for **verified** emails. All
-- unverified email stuff happens in the emails table and won't touch this
-- attribute.
ALTER TABLE participants ADD COLUMN email_address text UNIQUE,
ADD COLUMN email_lang text;
UPDATE events
SET payload = replace(replace( payload::text, '"set"', '"add"')
, '"current_email"'
, '"email"'
)::json
WHERE payload->>'action' = 'set'
AND (payload->'values'->'current_email') IS NOT NULL;
END;
| BEGIN;
CREATE TABLE emails
- ( id serial PRIMARY KEY
+ ( id serial PRIMARY KEY
? ++++++++
- , address text NOT NULL
+ , address text NOT NULL
? ++++++++
- , verified boolean DEFAULT NULL
+ , verified boolean DEFAULT NULL
? ++++++++
- CONSTRAINT verified_cant_be_false
+ CONSTRAINT verified_cant_be_false
? ++++++++
- -- Only use TRUE and NULL, so that the unique
? -------
+ -- Only use TRUE and NULL, so that the
? ++++++++
- -- constraint below functions properly.
? ----------
+ -- unique constraint below functions
? ++++++++ +++++++
+ -- properly.
- CHECK (verified IS NOT FALSE)
+ CHECK (verified IS NOT FALSE)
? ++++++++
- , nonce text
+ , nonce text
? ++++++++
- , ctime timestamp with time zone NOT NULL
+ , ctime timestamp with time zone NOT NULL
? ++++++++
- DEFAULT CURRENT_TIMESTAMP
+ DEFAULT CURRENT_TIMESTAMP
? ++++++++
- , mtime timestamp with time zone
+ , mtime timestamp with time zone
? ++++++++
- , participant text NOT NULL
+ , participant text NOT NULL
? ++++++++
- REFERENCES participants
+ REFERENCES participants
? ++++++++
- ON UPDATE CASCADE
+ ON UPDATE CASCADE
? ++++++++
- ON DELETE RESTRICT
+ ON DELETE RESTRICT
? ++++++++
, UNIQUE (address, verified) -- A verified email address can't be linked to multiple
-- participants. However, an *un*verified address *can*
-- be linked to multiple participants. We implement this
-- by using NULL instead of FALSE for the unverified
-- state, hence the check constraint on verified.
, UNIQUE (participant, address)
);
-- The participants table currently has an `email` attribute of type
-- email_address_with confirmation. This should be deleted in the future,
-- once the emails are migrated. The column we're going to replace it with
-- is named `email_address`. This is only for **verified** emails. All
-- unverified email stuff happens in the emails table and won't touch this
-- attribute.
ALTER TABLE participants ADD COLUMN email_address text UNIQUE,
ADD COLUMN email_lang text;
UPDATE events
SET payload = replace(replace( payload::text, '"set"', '"add"')
, '"current_email"'
, '"email"'
)::json
WHERE payload->>'action' = 'set'
AND (payload->'values'->'current_email') IS NOT NULL;
END; | 31 | 0.688889 | 16 | 15 |
3baa9e431a86994170deb88839517dae6e5fa6ef | chrome/app/chrome_watcher_command_line_unittest_win.cc | chrome/app/chrome_watcher_command_line_unittest_win.cc | // Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/app/chrome_watcher_command_line_win.h"
#include <windows.h>
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/process/process.h"
#include "base/win/scoped_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(ChromeWatcherCommandLineTest, BasicTest) {
base::Process current = base::Process::Open(base::GetCurrentProcId());
ASSERT_TRUE(current.IsValid());
HANDLE event = ::CreateEvent(nullptr, FALSE, FALSE, nullptr);
base::CommandLine cmd_line = GenerateChromeWatcherCommandLine(
base::FilePath(L"example.exe"), current.Handle(), event);
base::win::ScopedHandle current_result;
base::win::ScopedHandle event_result;
ASSERT_TRUE(InterpretChromeWatcherCommandLine(cmd_line, ¤t_result,
&event_result));
ASSERT_EQ(current.Handle(), current_result.Get());
ASSERT_EQ(event, event_result.Get());
}
| // Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/app/chrome_watcher_command_line_win.h"
#include <windows.h>
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/process/process_handle.h"
#include "base/win/scoped_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(ChromeWatcherCommandLineTest, BasicTest) {
// Ownership of these handles is passed to the ScopedHandles below via
// InterpretChromeWatcherCommandLine().
base::ProcessHandle current =
::OpenProcess(PROCESS_QUERY_INFORMATION | SYNCHRONIZE,
TRUE, // Inheritable
::GetCurrentProcessId());
ASSERT_NE(nullptr, current);
HANDLE event = ::CreateEvent(nullptr, FALSE, FALSE, nullptr);
ASSERT_NE(nullptr, event);
base::CommandLine cmd_line = GenerateChromeWatcherCommandLine(
base::FilePath(L"example.exe"), current, event);
base::win::ScopedHandle current_result;
base::win::ScopedHandle event_result;
ASSERT_TRUE(InterpretChromeWatcherCommandLine(cmd_line, ¤t_result,
&event_result));
ASSERT_EQ(current, current_result.Get());
ASSERT_EQ(event, event_result.Get());
}
| Fix a unittest that was leaking a HANDLE due to base::Process refactoring. | Fix a unittest that was leaking a HANDLE due to base::Process refactoring.
BUG=
Review URL: https://codereview.chromium.org/920483003
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#317407}
| C++ | bsd-3-clause | TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,ltilve/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,fujunwei/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,Chilledheart/chromium,Chilledheart/chromium,ltilve/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Chilledheart/chromium,Fireblend/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,ltilve/chromium,hgl888/chromium-crosswalk | c++ | ## Code Before:
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/app/chrome_watcher_command_line_win.h"
#include <windows.h>
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/process/process.h"
#include "base/win/scoped_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(ChromeWatcherCommandLineTest, BasicTest) {
base::Process current = base::Process::Open(base::GetCurrentProcId());
ASSERT_TRUE(current.IsValid());
HANDLE event = ::CreateEvent(nullptr, FALSE, FALSE, nullptr);
base::CommandLine cmd_line = GenerateChromeWatcherCommandLine(
base::FilePath(L"example.exe"), current.Handle(), event);
base::win::ScopedHandle current_result;
base::win::ScopedHandle event_result;
ASSERT_TRUE(InterpretChromeWatcherCommandLine(cmd_line, ¤t_result,
&event_result));
ASSERT_EQ(current.Handle(), current_result.Get());
ASSERT_EQ(event, event_result.Get());
}
## Instruction:
Fix a unittest that was leaking a HANDLE due to base::Process refactoring.
BUG=
Review URL: https://codereview.chromium.org/920483003
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#317407}
## Code After:
// Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/app/chrome_watcher_command_line_win.h"
#include <windows.h>
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/process/process_handle.h"
#include "base/win/scoped_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(ChromeWatcherCommandLineTest, BasicTest) {
// Ownership of these handles is passed to the ScopedHandles below via
// InterpretChromeWatcherCommandLine().
base::ProcessHandle current =
::OpenProcess(PROCESS_QUERY_INFORMATION | SYNCHRONIZE,
TRUE, // Inheritable
::GetCurrentProcessId());
ASSERT_NE(nullptr, current);
HANDLE event = ::CreateEvent(nullptr, FALSE, FALSE, nullptr);
ASSERT_NE(nullptr, event);
base::CommandLine cmd_line = GenerateChromeWatcherCommandLine(
base::FilePath(L"example.exe"), current, event);
base::win::ScopedHandle current_result;
base::win::ScopedHandle event_result;
ASSERT_TRUE(InterpretChromeWatcherCommandLine(cmd_line, ¤t_result,
&event_result));
ASSERT_EQ(current, current_result.Get());
ASSERT_EQ(event, event_result.Get());
}
| // Copyright (c) 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/app/chrome_watcher_command_line_win.h"
#include <windows.h>
#include "base/command_line.h"
#include "base/files/file_path.h"
- #include "base/process/process.h"
+ #include "base/process/process_handle.h"
? +++++++
#include "base/win/scoped_handle.h"
#include "testing/gtest/include/gtest/gtest.h"
TEST(ChromeWatcherCommandLineTest, BasicTest) {
- base::Process current = base::Process::Open(base::GetCurrentProcId());
- ASSERT_TRUE(current.IsValid());
+ // Ownership of these handles is passed to the ScopedHandles below via
+ // InterpretChromeWatcherCommandLine().
+ base::ProcessHandle current =
+ ::OpenProcess(PROCESS_QUERY_INFORMATION | SYNCHRONIZE,
+ TRUE, // Inheritable
+ ::GetCurrentProcessId());
+ ASSERT_NE(nullptr, current);
+
HANDLE event = ::CreateEvent(nullptr, FALSE, FALSE, nullptr);
+ ASSERT_NE(nullptr, event);
base::CommandLine cmd_line = GenerateChromeWatcherCommandLine(
- base::FilePath(L"example.exe"), current.Handle(), event);
? ---------
+ base::FilePath(L"example.exe"), current, event);
base::win::ScopedHandle current_result;
base::win::ScopedHandle event_result;
ASSERT_TRUE(InterpretChromeWatcherCommandLine(cmd_line, ¤t_result,
&event_result));
- ASSERT_EQ(current.Handle(), current_result.Get());
? ---------
+ ASSERT_EQ(current, current_result.Get());
ASSERT_EQ(event, event_result.Get());
} | 17 | 0.586207 | 12 | 5 |
4576a0781af3001cf5caea2f332cea325e534067 | src/darwinports1.0/Makefile | src/darwinports1.0/Makefile | SRCS= darwinports.tcl darwinports_dlist.tcl
INSTALLDIR= ${TCL_PACKAGE_DIR}/darwinports1.0
include ../../Mk/dports.mk
include ../../Mk/dports.autoconf.mk
all:
clean:
distclean: clean
install:
@mkdir -p ${INSTALLDIR}
@set -x; for file in ${SRCS}; do \
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
done
@../pkg_mkindex.tcl ${INSTALLDIR}
| SRCS= darwinports.tcl darwinports_dlist.tcl
INSTALLDIR= ${TCL_PACKAGE_DIR}/darwinports1.0
DARWIN_OLD_PKGINDEX=${TCL_PACKAGE_DIR}/8.3/darwinports1.0/pkgIndex.tcl
include ../../Mk/dports.mk
include ../../Mk/dports.autoconf.mk
all:
clean:
distclean: clean
install:
@mkdir -p ${INSTALLDIR}
@set -x; for file in ${SRCS}; do \
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
done
@../pkg_mkindex.tcl ${INSTALLDIR}
# XXX Prior installations of dports on Darwin installed darwinports1.0 in a version-specific Tcl path
@if test ${TCL_PACKAGE_DIR} -ef "/System/Library/Tcl" ; then \
if test -f ${DARWIN_OLD_PKGINDEX}; then \
set -x; \
rm ${DARWIN_OLD_PKGINDEX}; \
fi \
fi
| Remove pkgIndex file version-specific installed darwinports1.0 packages, easing upgrade woes. | Remove pkgIndex file version-specific installed darwinports1.0 packages, easing upgrade woes.
git-svn-id: 620571fa9b4bd0cbce9a0cf901e91ef896adbf27@2789 d073be05-634f-4543-b044-5fe20cf6d1d6
| unknown | bsd-3-clause | neverpanic/macports-base,macports/macports-base,danchr/macports-base,macports/macports-base,neverpanic/macports-base,danchr/macports-base | unknown | ## Code Before:
SRCS= darwinports.tcl darwinports_dlist.tcl
INSTALLDIR= ${TCL_PACKAGE_DIR}/darwinports1.0
include ../../Mk/dports.mk
include ../../Mk/dports.autoconf.mk
all:
clean:
distclean: clean
install:
@mkdir -p ${INSTALLDIR}
@set -x; for file in ${SRCS}; do \
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
done
@../pkg_mkindex.tcl ${INSTALLDIR}
## Instruction:
Remove pkgIndex file version-specific installed darwinports1.0 packages, easing upgrade woes.
git-svn-id: 620571fa9b4bd0cbce9a0cf901e91ef896adbf27@2789 d073be05-634f-4543-b044-5fe20cf6d1d6
## Code After:
SRCS= darwinports.tcl darwinports_dlist.tcl
INSTALLDIR= ${TCL_PACKAGE_DIR}/darwinports1.0
DARWIN_OLD_PKGINDEX=${TCL_PACKAGE_DIR}/8.3/darwinports1.0/pkgIndex.tcl
include ../../Mk/dports.mk
include ../../Mk/dports.autoconf.mk
all:
clean:
distclean: clean
install:
@mkdir -p ${INSTALLDIR}
@set -x; for file in ${SRCS}; do \
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
done
@../pkg_mkindex.tcl ${INSTALLDIR}
# XXX Prior installations of dports on Darwin installed darwinports1.0 in a version-specific Tcl path
@if test ${TCL_PACKAGE_DIR} -ef "/System/Library/Tcl" ; then \
if test -f ${DARWIN_OLD_PKGINDEX}; then \
set -x; \
rm ${DARWIN_OLD_PKGINDEX}; \
fi \
fi
| SRCS= darwinports.tcl darwinports_dlist.tcl
INSTALLDIR= ${TCL_PACKAGE_DIR}/darwinports1.0
+ DARWIN_OLD_PKGINDEX=${TCL_PACKAGE_DIR}/8.3/darwinports1.0/pkgIndex.tcl
include ../../Mk/dports.mk
include ../../Mk/dports.autoconf.mk
all:
clean:
distclean: clean
install:
@mkdir -p ${INSTALLDIR}
@set -x; for file in ${SRCS}; do \
$(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 444 $$file ${INSTALLDIR}; \
done
@../pkg_mkindex.tcl ${INSTALLDIR}
+ # XXX Prior installations of dports on Darwin installed darwinports1.0 in a version-specific Tcl path
+ @if test ${TCL_PACKAGE_DIR} -ef "/System/Library/Tcl" ; then \
+ if test -f ${DARWIN_OLD_PKGINDEX}; then \
+ set -x; \
+ rm ${DARWIN_OLD_PKGINDEX}; \
+ fi \
+ fi | 8 | 0.444444 | 8 | 0 |
ed28ee9d594c4adbff6919c00d902b43ee8db1d6 | engines/synergy/app/helpers/synergy/pages_helper.rb | engines/synergy/app/helpers/synergy/pages_helper.rb | module Synergy
module PagesHelper
def node_path(node)
'/synergy' + node.path
end
def node_html(node)
if node.content
if node.content['body']
node.content['body']['value']
end
end
end
def tree_view(label_method = :to_s, node = nil, level = -1)
if node.nil?
puts "root"
nodes = roots
else
label = "|_ #{node.send(label_method)}"
if level == 0
puts " #{label}"
else
puts " |#{" "*level}#{label}"
end
nodes = node.children
end
nodes.each do |child|
tree_view(label_method, child, level+1)
end
end
end
end
| module Synergy
module PagesHelper
def node_path(node)
'/synergy' + node.path
end
def node_html(node)
if node.content
if node.content['body']
node.content['body']['value']
elsif node.content['extra']
node.content['extra']['value']
end
end
end
end
end
| Add content extra to node display | Add content extra to node display
| Ruby | mit | AusDTO/gov-au-beta,AusDTO/gov-au-beta,AusDTO/gov-au-beta,AusDTO/gov-au-beta,AusDTO/gov-au-beta | ruby | ## Code Before:
module Synergy
module PagesHelper
def node_path(node)
'/synergy' + node.path
end
def node_html(node)
if node.content
if node.content['body']
node.content['body']['value']
end
end
end
def tree_view(label_method = :to_s, node = nil, level = -1)
if node.nil?
puts "root"
nodes = roots
else
label = "|_ #{node.send(label_method)}"
if level == 0
puts " #{label}"
else
puts " |#{" "*level}#{label}"
end
nodes = node.children
end
nodes.each do |child|
tree_view(label_method, child, level+1)
end
end
end
end
## Instruction:
Add content extra to node display
## Code After:
module Synergy
module PagesHelper
def node_path(node)
'/synergy' + node.path
end
def node_html(node)
if node.content
if node.content['body']
node.content['body']['value']
elsif node.content['extra']
node.content['extra']['value']
end
end
end
end
end
| module Synergy
module PagesHelper
def node_path(node)
'/synergy' + node.path
end
def node_html(node)
if node.content
if node.content['body']
node.content['body']['value']
+ elsif node.content['extra']
+ node.content['extra']['value']
end
end
end
- def tree_view(label_method = :to_s, node = nil, level = -1)
- if node.nil?
- puts "root"
- nodes = roots
- else
- label = "|_ #{node.send(label_method)}"
- if level == 0
- puts " #{label}"
- else
- puts " |#{" "*level}#{label}"
- end
- nodes = node.children
- end
- nodes.each do |child|
- tree_view(label_method, child, level+1)
- end
- end
-
end
end | 20 | 0.571429 | 2 | 18 |
4c3dd0c9d27af0f186f81c4fed0003a9190b4d9e | jal_stats/stats/serializers.py | jal_stats/stats/serializers.py | from rest_framework import serializers
from .models import Activity, Stat
class StatSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Stat
fields = ('id', 'activity', 'reps', 'date')
def create(self, validated_data):
validated_data['activity'] = self.context['activity']
stat = Stat.objects.create(**validated_data)
return stat
class ActivitySerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Activity
fields = ('id', 'full_description', 'units', 'url')
class ActivityListSerializer(ActivitySerializer):
stats = StatSerializer(many=True, read_only=True)
class Meta:
model = Activity
fields = tuple(list(ActivitySerializer.Meta.fields) + ['stats'])
# class UserSerializer(serializers.HyperlinkedModelSerializer):
#
# class Meta:
# model = User
# fields = ('id', 'username', 'email', 'activities')
| from rest_framework import serializers
from .models import Activity, Stat
class StatAddSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Stat
fields = ('id', 'reps', 'date')
class StatSerializer(StatAddSerializer):
class Meta:
model = Stat
fields = tuple(list(StatAddSerializer.Meta.fields) + ['activity'])
def create(self, validated_data):
validated_data['activity'] = self.context['activity']
stat = Stat.objects.create(**validated_data)
return stat
class ActivitySerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Activity
fields = ('id', 'full_description', 'units', 'url')
class ActivityListSerializer(ActivitySerializer):
stats = StatSerializer(many=True, read_only=True)
class Meta:
model = Activity
fields = tuple(list(ActivitySerializer.Meta.fields) + ['stats'])
# class UserSerializer(serializers.HyperlinkedModelSerializer):
#
# class Meta:
# model = User
# fields = ('id', 'username', 'email', 'activities')
| Add new serializer for StatAdd that doesn't have activity | Add new serializer for StatAdd that doesn't have activity
| Python | mit | jal-stats/django | python | ## Code Before:
from rest_framework import serializers
from .models import Activity, Stat
class StatSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Stat
fields = ('id', 'activity', 'reps', 'date')
def create(self, validated_data):
validated_data['activity'] = self.context['activity']
stat = Stat.objects.create(**validated_data)
return stat
class ActivitySerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Activity
fields = ('id', 'full_description', 'units', 'url')
class ActivityListSerializer(ActivitySerializer):
stats = StatSerializer(many=True, read_only=True)
class Meta:
model = Activity
fields = tuple(list(ActivitySerializer.Meta.fields) + ['stats'])
# class UserSerializer(serializers.HyperlinkedModelSerializer):
#
# class Meta:
# model = User
# fields = ('id', 'username', 'email', 'activities')
## Instruction:
Add new serializer for StatAdd that doesn't have activity
## Code After:
from rest_framework import serializers
from .models import Activity, Stat
class StatAddSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Stat
fields = ('id', 'reps', 'date')
class StatSerializer(StatAddSerializer):
class Meta:
model = Stat
fields = tuple(list(StatAddSerializer.Meta.fields) + ['activity'])
def create(self, validated_data):
validated_data['activity'] = self.context['activity']
stat = Stat.objects.create(**validated_data)
return stat
class ActivitySerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Activity
fields = ('id', 'full_description', 'units', 'url')
class ActivityListSerializer(ActivitySerializer):
stats = StatSerializer(many=True, read_only=True)
class Meta:
model = Activity
fields = tuple(list(ActivitySerializer.Meta.fields) + ['stats'])
# class UserSerializer(serializers.HyperlinkedModelSerializer):
#
# class Meta:
# model = User
# fields = ('id', 'username', 'email', 'activities')
| from rest_framework import serializers
from .models import Activity, Stat
- class StatSerializer(serializers.HyperlinkedModelSerializer):
+ class StatAddSerializer(serializers.HyperlinkedModelSerializer):
? +++
class Meta:
model = Stat
- fields = ('id', 'activity', 'reps', 'date')
? ------------
+ fields = ('id', 'reps', 'date')
+
+
+ class StatSerializer(StatAddSerializer):
+
+ class Meta:
+ model = Stat
+ fields = tuple(list(StatAddSerializer.Meta.fields) + ['activity'])
def create(self, validated_data):
validated_data['activity'] = self.context['activity']
stat = Stat.objects.create(**validated_data)
return stat
class ActivitySerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = Activity
fields = ('id', 'full_description', 'units', 'url')
class ActivityListSerializer(ActivitySerializer):
stats = StatSerializer(many=True, read_only=True)
class Meta:
model = Activity
fields = tuple(list(ActivitySerializer.Meta.fields) + ['stats'])
# class UserSerializer(serializers.HyperlinkedModelSerializer):
#
# class Meta:
# model = User
# fields = ('id', 'username', 'email', 'activities') | 11 | 0.305556 | 9 | 2 |
4a4ef988a1798e7da780e9ab51a576fc89c8fed9 | app/transmute.js | app/transmute.js | 'use strict';
// Load settings
const settings = require('./libs/settings');
// Run CLI and get arguments
const cli = require('./libs/cli'),
options = cli.input();
// Load required files
const task = require('./libs/task'),
queue = require('./libs/queue'),
logger = require('./libs/log');
// Load tasks from file
task.load('./config/tasks.json').then((tasks) => {
// Extract jobs from tasks
let jobs = [];
tasks.forEach((t) => { t.jobs.forEach((j, i) => { jobs.push(j); }); });
// Add jobs into queue and convert
return queue.add({jobs: jobs});
// Conversion queue complete
}).then((complete) => {
logger.info('End of queue.');
process.exit(0);
// Catch any errors that bubble up
}).catch((err) => {
console.log(err);
process.exit(1);
});
| 'use strict';
// Helper to avoid a lot of directory traversing
global.__base = __dirname + '/';
require('./libs/setup').then(() => {
// Load settings
const settings = require('./libs/settings');
// Run CLI and get arguments
const cli = require('./libs/cli'),
options = cli.start().input();
// Load required files
const task = require('./libs/task'),
queue = require('./libs/queue'),
logger = require('./libs/log');
// Load tasks from file
task.load(settings.directory + '/tasks.json').then((tasks) => {
// Extract jobs from tasks
let jobs = [];
tasks.forEach((t) => { t.jobs.forEach((j, i) => { jobs.push(j); }); });
// Add jobs into queue and convert
return queue.add({jobs: jobs});
// Conversion queue complete
}).then((complete) => {
logger.info('End of queue.');
process.exit(0);
// Catch any errors that bubble up
}).catch((err) => {
console.log(err);
process.exit(1);
});
}).catch((err) => {
console.log(err);
process.exit(1);
});
| Refactor entry point to do setup | Refactor entry point to do setup
| JavaScript | apache-2.0 | transmutejs/core | javascript | ## Code Before:
'use strict';
// Load settings
const settings = require('./libs/settings');
// Run CLI and get arguments
const cli = require('./libs/cli'),
options = cli.input();
// Load required files
const task = require('./libs/task'),
queue = require('./libs/queue'),
logger = require('./libs/log');
// Load tasks from file
task.load('./config/tasks.json').then((tasks) => {
// Extract jobs from tasks
let jobs = [];
tasks.forEach((t) => { t.jobs.forEach((j, i) => { jobs.push(j); }); });
// Add jobs into queue and convert
return queue.add({jobs: jobs});
// Conversion queue complete
}).then((complete) => {
logger.info('End of queue.');
process.exit(0);
// Catch any errors that bubble up
}).catch((err) => {
console.log(err);
process.exit(1);
});
## Instruction:
Refactor entry point to do setup
## Code After:
'use strict';
// Helper to avoid a lot of directory traversing
global.__base = __dirname + '/';
require('./libs/setup').then(() => {
// Load settings
const settings = require('./libs/settings');
// Run CLI and get arguments
const cli = require('./libs/cli'),
options = cli.start().input();
// Load required files
const task = require('./libs/task'),
queue = require('./libs/queue'),
logger = require('./libs/log');
// Load tasks from file
task.load(settings.directory + '/tasks.json').then((tasks) => {
// Extract jobs from tasks
let jobs = [];
tasks.forEach((t) => { t.jobs.forEach((j, i) => { jobs.push(j); }); });
// Add jobs into queue and convert
return queue.add({jobs: jobs});
// Conversion queue complete
}).then((complete) => {
logger.info('End of queue.');
process.exit(0);
// Catch any errors that bubble up
}).catch((err) => {
console.log(err);
process.exit(1);
});
}).catch((err) => {
console.log(err);
process.exit(1);
});
| 'use strict';
- // Load settings
- const settings = require('./libs/settings');
+ // Helper to avoid a lot of directory traversing
+ global.__base = __dirname + '/';
+ require('./libs/setup').then(() => {
- // Run CLI and get arguments
- const cli = require('./libs/cli'),
- options = cli.input();
- // Load required files
+ // Load settings
- const task = require('./libs/task'),
? ^ - ^ - ^
+ const settings = require('./libs/settings');
? ++ ++ ^^^^ ++ ^^^^ ^
- queue = require('./libs/queue'),
- logger = require('./libs/log');
+ // Run CLI and get arguments
+ const cli = require('./libs/cli'),
+ options = cli.start().input();
- // Load tasks from file
- task.load('./config/tasks.json').then((tasks) => {
-
- // Extract jobs from tasks
- let jobs = [];
- tasks.forEach((t) => { t.jobs.forEach((j, i) => { jobs.push(j); }); });
- // Add jobs into queue and convert
- return queue.add({jobs: jobs});
+ // Load required files
+ const task = require('./libs/task'),
+ queue = require('./libs/queue'),
+ logger = require('./libs/log');
- // Conversion queue complete
- }).then((complete) => {
- logger.info('End of queue.');
- process.exit(0);
+ // Load tasks from file
+ task.load(settings.directory + '/tasks.json').then((tasks) => {
+
+ // Extract jobs from tasks
+ let jobs = [];
+ tasks.forEach((t) => { t.jobs.forEach((j, i) => { jobs.push(j); }); });
+ // Add jobs into queue and convert
+ return queue.add({jobs: jobs});
+
+ // Conversion queue complete
+ }).then((complete) => {
+ logger.info('End of queue.');
+ process.exit(0);
+
- // Catch any errors that bubble up
+ // Catch any errors that bubble up
? ++
+ }).catch((err) => {
+ console.log(err);
+ process.exit(1);
+ });
+
}).catch((err) => {
console.log(err);
process.exit(1);
}); | 54 | 1.588235 | 32 | 22 |
c54a25fe6d48c98812a1eddeeca9ae14b5ffbbf2 | contribulator.gemspec | contribulator.gemspec | require File.join([File.dirname(__FILE__),'lib','contribulator_version.rb'])
spec = Gem::Specification.new do |s|
s.name = 'contribulator'
s.version = Contribulator.version
s.author = 'Matt Simpson'
s.email = 'matt.simpson@asolutions.com'
s.homepage = 'http://github.com/ionicmobile/contribulator'
s.platform = Gem::Platform::RUBY
s.summary = 'Publish changes from one repo to another'
# Add your other files here if you make them
s.files = %w(
bin/contribulator
)
s.require_paths << 'lib'
s.bindir = 'bin'
s.executables << 'contribulator'
s.add_dependency('gli')
s.add_development_dependency('rake')
s.add_development_dependency('bundler')
end
| require File.join([File.dirname(__FILE__),'lib','contribulator_version.rb'])
spec = Gem::Specification.new do |s|
s.name = 'contribulator'
s.version = Contribulator.version
s.author = 'Matt Simpson'
s.email = 'matt.simpson@asolutions.com'
s.homepage = 'http://github.com/ionicmobile/contribulator'
s.platform = Gem::Platform::RUBY
s.summary = 'Publish changes from one repo to another'
# Add your other files here if you make them
s.files = %w(
bin/contribulator
lib/contribulator_version.rb
)
s.require_paths << 'lib'
s.bindir = 'bin'
s.executables << 'contribulator'
s.add_dependency('gli')
s.add_development_dependency('rake')
s.add_development_dependency('bundler')
end
| Update gemspec to include version | Update gemspec to include version
| Ruby | apache-2.0 | ionicmobile/contribulator | ruby | ## Code Before:
require File.join([File.dirname(__FILE__),'lib','contribulator_version.rb'])
spec = Gem::Specification.new do |s|
s.name = 'contribulator'
s.version = Contribulator.version
s.author = 'Matt Simpson'
s.email = 'matt.simpson@asolutions.com'
s.homepage = 'http://github.com/ionicmobile/contribulator'
s.platform = Gem::Platform::RUBY
s.summary = 'Publish changes from one repo to another'
# Add your other files here if you make them
s.files = %w(
bin/contribulator
)
s.require_paths << 'lib'
s.bindir = 'bin'
s.executables << 'contribulator'
s.add_dependency('gli')
s.add_development_dependency('rake')
s.add_development_dependency('bundler')
end
## Instruction:
Update gemspec to include version
## Code After:
require File.join([File.dirname(__FILE__),'lib','contribulator_version.rb'])
spec = Gem::Specification.new do |s|
s.name = 'contribulator'
s.version = Contribulator.version
s.author = 'Matt Simpson'
s.email = 'matt.simpson@asolutions.com'
s.homepage = 'http://github.com/ionicmobile/contribulator'
s.platform = Gem::Platform::RUBY
s.summary = 'Publish changes from one repo to another'
# Add your other files here if you make them
s.files = %w(
bin/contribulator
lib/contribulator_version.rb
)
s.require_paths << 'lib'
s.bindir = 'bin'
s.executables << 'contribulator'
s.add_dependency('gli')
s.add_development_dependency('rake')
s.add_development_dependency('bundler')
end
| require File.join([File.dirname(__FILE__),'lib','contribulator_version.rb'])
spec = Gem::Specification.new do |s|
s.name = 'contribulator'
s.version = Contribulator.version
s.author = 'Matt Simpson'
s.email = 'matt.simpson@asolutions.com'
s.homepage = 'http://github.com/ionicmobile/contribulator'
s.platform = Gem::Platform::RUBY
s.summary = 'Publish changes from one repo to another'
# Add your other files here if you make them
s.files = %w(
bin/contribulator
+ lib/contribulator_version.rb
)
s.require_paths << 'lib'
s.bindir = 'bin'
s.executables << 'contribulator'
s.add_dependency('gli')
s.add_development_dependency('rake')
s.add_development_dependency('bundler')
end | 1 | 0.05 | 1 | 0 |
91bf604aaa07cb27df9ff63ea8304d090f5e1350 | docker/build-filter-wrappers.sh | docker/build-filter-wrappers.sh |
IMAGEID="$1"
# If we run in an ephemeral docker container, we can
# safely clobber the filters we find.
for filter in /usr/local/share/diamond/filters/* ; do
cat > $filter << EOF
#!/bin/sh
exec docker run --rm -i --log-driver=none -v/dev/null:/dev/raw1394 --entrypoint=$filter $IMAGEID "\$@"
EOF
done
# Now tar things up and export it through a volume
# mounted at /artifacts.
cd /usr/local/share
tar -cvzf /artifacts/diamond-docker-filters.tgz diamond
|
IMAGEID="$1"
cd /usr/local/share
# tar up 'native' filters and export through a volume
# mounted at /artifacts.
tar -cvzf /artifacts/diamond-native-filters.tgz diamond
# As long as we run in an ephemeral docker container, we
# can safely clobber any files we find.
for filter in diamond/filters/* ; do
cat > $filter << EOF
#!/bin/sh
exec docker run --rm -i --log-driver=none -v/dev/null:/dev/raw1394 --entrypoint=$filter $IMAGEID "\$@"
EOF
done
# Now tar up the docker wrapped filters and export.
tar -cvzf /artifacts/diamond-docker-filters.tgz diamond
| Make build-filter wrappers export 'native' filters too | Make build-filter wrappers export 'native' filters too
| Shell | epl-1.0 | cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond,cmusatyalab/opendiamond | shell | ## Code Before:
IMAGEID="$1"
# If we run in an ephemeral docker container, we can
# safely clobber the filters we find.
for filter in /usr/local/share/diamond/filters/* ; do
cat > $filter << EOF
#!/bin/sh
exec docker run --rm -i --log-driver=none -v/dev/null:/dev/raw1394 --entrypoint=$filter $IMAGEID "\$@"
EOF
done
# Now tar things up and export it through a volume
# mounted at /artifacts.
cd /usr/local/share
tar -cvzf /artifacts/diamond-docker-filters.tgz diamond
## Instruction:
Make build-filter wrappers export 'native' filters too
## Code After:
IMAGEID="$1"
cd /usr/local/share
# tar up 'native' filters and export through a volume
# mounted at /artifacts.
tar -cvzf /artifacts/diamond-native-filters.tgz diamond
# As long as we run in an ephemeral docker container, we
# can safely clobber any files we find.
for filter in diamond/filters/* ; do
cat > $filter << EOF
#!/bin/sh
exec docker run --rm -i --log-driver=none -v/dev/null:/dev/raw1394 --entrypoint=$filter $IMAGEID "\$@"
EOF
done
# Now tar up the docker wrapped filters and export.
tar -cvzf /artifacts/diamond-docker-filters.tgz diamond
|
IMAGEID="$1"
+ cd /usr/local/share
+
+ # tar up 'native' filters and export through a volume
+ # mounted at /artifacts.
+ tar -cvzf /artifacts/diamond-native-filters.tgz diamond
+
- # If we run in an ephemeral docker container, we can
? ^^ ----
+ # As long as we run in an ephemeral docker container, we
? ^^^^^^^^^^
- # safely clobber the filters we find.
? ^^^ - -
+ # can safely clobber any files we find.
? ++++ ^^^
- for filter in /usr/local/share/diamond/filters/* ; do
? -----------------
+ for filter in diamond/filters/* ; do
cat > $filter << EOF
#!/bin/sh
exec docker run --rm -i --log-driver=none -v/dev/null:/dev/raw1394 --entrypoint=$filter $IMAGEID "\$@"
EOF
done
+ # Now tar up the docker wrapped filters and export.
- # Now tar things up and export it through a volume
- # mounted at /artifacts.
- cd /usr/local/share
tar -cvzf /artifacts/diamond-docker-filters.tgz diamond | 16 | 1 | 10 | 6 |
b8ec7503c71c43de8168a7d22cec4c2842382f2d | augur/datasources/downloads/test_downloads_routes.py | augur/datasources/downloads/test_downloads_routes.py | import os
import pytest
import requests
import augur.server
@pytest.fixture(scope="module")
def downloads_routes():
pass
| import os
import pytest
import requests
@pytest.fixture(scope="module")
def downloads_routes():
pass
| Remove uneccesary import in downloads API test | Remove uneccesary import in downloads API test
The test_downloads_routes.py module was uneccessarily importing augur.server
due to the remnants of the previous testing architecture. This import
was causing the build to error out, so it's been removed.
Signed-off-by: Carter Landis <ffc486ac0b21a34cfd7d1170183ed86b0f1b04a2@gmail.com>
| Python | mit | OSSHealth/ghdata,OSSHealth/ghdata,OSSHealth/ghdata | python | ## Code Before:
import os
import pytest
import requests
import augur.server
@pytest.fixture(scope="module")
def downloads_routes():
pass
## Instruction:
Remove uneccesary import in downloads API test
The test_downloads_routes.py module was uneccessarily importing augur.server
due to the remnants of the previous testing architecture. This import
was causing the build to error out, so it's been removed.
Signed-off-by: Carter Landis <ffc486ac0b21a34cfd7d1170183ed86b0f1b04a2@gmail.com>
## Code After:
import os
import pytest
import requests
@pytest.fixture(scope="module")
def downloads_routes():
pass
| import os
import pytest
import requests
- import augur.server
@pytest.fixture(scope="module")
def downloads_routes():
pass | 1 | 0.125 | 0 | 1 |
ec79f1f6763e097df152649353bea5f08ffa2023 | .travis.yml | .travis.yml | sudo: required
services:
- docker
language: python
python: 3.6
before_install:
- docker-compose -v
- docker -v
matrix:
include:
- name: Test
script: tox -e py36
- name: Black
script: tox -e black
- name: Basic Docker
script: sh tests/test_docker.sh
- name: Docker with Celery
script: sh tests/test_docker.sh use_celery=y
install:
- pip install tox
notifications:
email:
on_success: change
on_failure: always
| sudo: required
services:
- docker
language: python
python: 3.6
before_install:
- docker-compose -v
- docker -v
matrix:
include:
- name: Tox Test
script: tox -e py36
- name: Black template
script: tox -e black
- name: Basic Docker
script: sh tests/test_docker.sh
- name: Docker with Celery
script: sh tests/test_docker.sh use_celery=y
install:
- pip install tox
notifications:
email:
on_success: change
on_failure: always
| Rename test phases in Travis build matrix | Rename test phases in Travis build matrix
| YAML | bsd-3-clause | ad-m/cookiecutter-django,luzfcb/cookiecutter-django,ryankanno/cookiecutter-django,Parbhat/cookiecutter-django-foundation,pydanny/cookiecutter-django,trungdong/cookiecutter-django,ryankanno/cookiecutter-django,ad-m/cookiecutter-django,ad-m/cookiecutter-django,pydanny/cookiecutter-django,Parbhat/cookiecutter-django-foundation,Parbhat/cookiecutter-django-foundation,trungdong/cookiecutter-django,pydanny/cookiecutter-django,ryankanno/cookiecutter-django,luzfcb/cookiecutter-django,Parbhat/cookiecutter-django-foundation,luzfcb/cookiecutter-django,luzfcb/cookiecutter-django,ryankanno/cookiecutter-django,trungdong/cookiecutter-django,ad-m/cookiecutter-django,pydanny/cookiecutter-django,trungdong/cookiecutter-django | yaml | ## Code Before:
sudo: required
services:
- docker
language: python
python: 3.6
before_install:
- docker-compose -v
- docker -v
matrix:
include:
- name: Test
script: tox -e py36
- name: Black
script: tox -e black
- name: Basic Docker
script: sh tests/test_docker.sh
- name: Docker with Celery
script: sh tests/test_docker.sh use_celery=y
install:
- pip install tox
notifications:
email:
on_success: change
on_failure: always
## Instruction:
Rename test phases in Travis build matrix
## Code After:
sudo: required
services:
- docker
language: python
python: 3.6
before_install:
- docker-compose -v
- docker -v
matrix:
include:
- name: Tox Test
script: tox -e py36
- name: Black template
script: tox -e black
- name: Basic Docker
script: sh tests/test_docker.sh
- name: Docker with Celery
script: sh tests/test_docker.sh use_celery=y
install:
- pip install tox
notifications:
email:
on_success: change
on_failure: always
| sudo: required
services:
- docker
language: python
python: 3.6
before_install:
- docker-compose -v
- docker -v
matrix:
include:
- - name: Test
+ - name: Tox Test
? ++++
script: tox -e py36
- - name: Black
+ - name: Black template
? +++++++++
script: tox -e black
- name: Basic Docker
script: sh tests/test_docker.sh
- name: Docker with Celery
script: sh tests/test_docker.sh use_celery=y
install:
- pip install tox
notifications:
email:
on_success: change
on_failure: always | 4 | 0.129032 | 2 | 2 |
9ff974b702411e3e17447216ae9b49309d698add | client/views/msg_unhandled.tpl | client/views/msg_unhandled.tpl | <div class="msg msg-{{slugify command}} {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" data-time="{{time}}">
<span class="time tooltipped tooltipped-e" aria-label="{{localetime time}}">
{{tz time}}
</span>
<span class="from">[{{command}}]</span>
<span class="content">
{{#each params}}
<span>{{this}}</span>
{{/each}}
</span>
</div>
| <div class="msg msg-{{slugify command}} {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" id="msg-{{id}}" data-time="{{time}}">
<span class="time tooltipped tooltipped-e" aria-label="{{localetime time}}">
{{tz time}}
</span>
<span class="from">[{{command}}]</span>
<span class="content">
{{#each params}}
<span>{{this}}</span>
{{/each}}
</span>
</div>
| Fix missing attributes on unhandled messages | Fix missing attributes on unhandled messages
| Smarty | mit | thelounge/lounge,MaxLeiter/lounge,MaxLeiter/lounge,realies/lounge,ScoutLink/lounge,williamboman/lounge,MaxLeiter/lounge,FryDay/lounge,FryDay/lounge,ScoutLink/lounge,ScoutLink/lounge,williamboman/lounge,williamboman/lounge,FryDay/lounge,realies/lounge,thelounge/lounge,realies/lounge | smarty | ## Code Before:
<div class="msg msg-{{slugify command}} {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" data-time="{{time}}">
<span class="time tooltipped tooltipped-e" aria-label="{{localetime time}}">
{{tz time}}
</span>
<span class="from">[{{command}}]</span>
<span class="content">
{{#each params}}
<span>{{this}}</span>
{{/each}}
</span>
</div>
## Instruction:
Fix missing attributes on unhandled messages
## Code After:
<div class="msg msg-{{slugify command}} {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" id="msg-{{id}}" data-time="{{time}}">
<span class="time tooltipped tooltipped-e" aria-label="{{localetime time}}">
{{tz time}}
</span>
<span class="from">[{{command}}]</span>
<span class="content">
{{#each params}}
<span>{{this}}</span>
{{/each}}
</span>
</div>
| - <div class="msg msg-{{slugify command}} {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" data-time="{{time}}">
+ <div class="msg msg-{{slugify command}} {{type}}{{#if self}} self{{/if}}{{#if highlight}} highlight{{/if}}" id="msg-{{id}}" data-time="{{time}}">
? ++++++++++++++++
<span class="time tooltipped tooltipped-e" aria-label="{{localetime time}}">
{{tz time}}
</span>
<span class="from">[{{command}}]</span>
<span class="content">
{{#each params}}
<span>{{this}}</span>
{{/each}}
</span>
</div> | 2 | 0.181818 | 1 | 1 |
82a5c2175503cd117af85445665f246c97611222 | locales/hu/copyright-email1.properties | locales/hu/copyright-email1.properties | copyright_email1_itstime=Itt az ideje, hogy a szerzői jogi törvények a 21. századba kerüljenek. Írja alá a petíciót most.
| copyright_email1_itstime=Itt az ideje, hogy a szerzői jogi törvények a 21. századba kerüljenek. Írja alá a petíciót most.
photographing_the_eiffel_tower=Az Eiffel-torony éjszakai fényeinek fényképezése, egy dal átdolgozása, egy mém készítése. Lehet, hogy meglepő, de ezek mind illegálisak lehetnek.
The_EUs_copyright_laws=Az EU szerzői jogi törvényei jelenleg egy jó, rossz és elavult szabályozásokból álló fércművet alkotnak. Jelenleg néhány nagy cég – mint például kiadók és médiavállalatok – azon dolgozik, hogy fenntartsa ezeket a megkötéseket, vagy még szorosabbá tegye őket. Pénzzel nem győzhetjük le ezeket a túlbuzgó szerzői jogi agitátorokat – de győzhetünk az Önhöz hasonló emberek segítségével, és józan észt követő reformokkal.
Mozilla_Team=A Mozilla csapat
Subject_lineA=Innováció engedély nélkül
Subject_lineB=Ez (szigorúan véve) illegális
| Update Hungarian (hu) localization of Mozilla Advocacy | Pontoon: Update Hungarian (hu) localization of Mozilla Advocacy
Localization authors:
- Balázs Meskó <meskobalazs@gmail.com>
| INI | mpl-2.0 | mozilla/advocacy.mozilla.org | ini | ## Code Before:
copyright_email1_itstime=Itt az ideje, hogy a szerzői jogi törvények a 21. századba kerüljenek. Írja alá a petíciót most.
## Instruction:
Pontoon: Update Hungarian (hu) localization of Mozilla Advocacy
Localization authors:
- Balázs Meskó <meskobalazs@gmail.com>
## Code After:
copyright_email1_itstime=Itt az ideje, hogy a szerzői jogi törvények a 21. századba kerüljenek. Írja alá a petíciót most.
photographing_the_eiffel_tower=Az Eiffel-torony éjszakai fényeinek fényképezése, egy dal átdolgozása, egy mém készítése. Lehet, hogy meglepő, de ezek mind illegálisak lehetnek.
The_EUs_copyright_laws=Az EU szerzői jogi törvényei jelenleg egy jó, rossz és elavult szabályozásokból álló fércművet alkotnak. Jelenleg néhány nagy cég – mint például kiadók és médiavállalatok – azon dolgozik, hogy fenntartsa ezeket a megkötéseket, vagy még szorosabbá tegye őket. Pénzzel nem győzhetjük le ezeket a túlbuzgó szerzői jogi agitátorokat – de győzhetünk az Önhöz hasonló emberek segítségével, és józan észt követő reformokkal.
Mozilla_Team=A Mozilla csapat
Subject_lineA=Innováció engedély nélkül
Subject_lineB=Ez (szigorúan véve) illegális
| copyright_email1_itstime=Itt az ideje, hogy a szerzői jogi törvények a 21. századba kerüljenek. Írja alá a petíciót most.
+ photographing_the_eiffel_tower=Az Eiffel-torony éjszakai fényeinek fényképezése, egy dal átdolgozása, egy mém készítése. Lehet, hogy meglepő, de ezek mind illegálisak lehetnek.
+ The_EUs_copyright_laws=Az EU szerzői jogi törvényei jelenleg egy jó, rossz és elavult szabályozásokból álló fércművet alkotnak. Jelenleg néhány nagy cég – mint például kiadók és médiavállalatok – azon dolgozik, hogy fenntartsa ezeket a megkötéseket, vagy még szorosabbá tegye őket. Pénzzel nem győzhetjük le ezeket a túlbuzgó szerzői jogi agitátorokat – de győzhetünk az Önhöz hasonló emberek segítségével, és józan észt követő reformokkal.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Mozilla_Team=A Mozilla csapat
+ Subject_lineA=Innováció engedély nélkül
+ Subject_lineB=Ez (szigorúan véve) illegális
+
+
+
+
+
+ | 28 | 28 | 28 | 0 |
aa51371c1055284ef3e2859f4577f428751a9f63 | less/base.less | less/base.less | html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
// Alignment
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.clearfix {
.clearfix;
}
| html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
// Alignment
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-hide { font: 0/0 a; color: transparent; text-shadow: none;}
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.hide { display: none !important; }
.show { display: block !important; }
.invisible { visibility: hidden; }
.clearfix {
.clearfix;
}
| Add text-hide, hide, show, and invisible. | Feat($less): Add text-hide, hide, show, and invisible.
| Less | mit | NEURS/GridIron | less | ## Code Before:
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
// Alignment
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.clearfix {
.clearfix;
}
## Instruction:
Feat($less): Add text-hide, hide, show, and invisible.
## Code After:
html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
// Alignment
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-hide { font: 0/0 a; color: transparent; text-shadow: none;}
.pull-left { float: left !important; }
.pull-right { float: right !important; }
.center-block { display: block; margin-left: auto; margin-right: auto; }
.hide { display: none !important; }
.show { display: block !important; }
.invisible { visibility: hidden; }
.clearfix {
.clearfix;
}
| html {
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
// Alignment
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
+ .text-hide { font: 0/0 a; color: transparent; text-shadow: none;}
+
- .pull-left { float: left !important; }
+ .pull-left { float: left !important; }
? +
- .pull-right { float: right !important; }
+ .pull-right { float: right !important; }
? +
- .center-block { display: block; margin-left: auto; margin-right: auto; }
+ .center-block { display: block; margin-left: auto; margin-right: auto; }
? +
+
+ .hide { display: none !important; }
+ .show { display: block !important; }
+ .invisible { visibility: hidden; }
.clearfix {
.clearfix;
} | 12 | 0.631579 | 9 | 3 |
0800673f97793f88693b5cfa03626336c249a5aa | src/main/java/top/quantic/sentry/discord/core/CommandContext.java | src/main/java/top/quantic/sentry/discord/core/CommandContext.java | package top.quantic.sentry.discord.core;
import joptsimple.OptionSet;
import sx.blah.discord.handle.obj.IMessage;
public class CommandContext {
private IMessage message;
private String prefix;
private Command command;
private String[] args;
private OptionSet optionSet;
public IMessage getMessage() {
return message;
}
public void setMessage(IMessage message) {
this.message = message;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public Command getCommand() {
return command;
}
public void setCommand(Command command) {
this.command = command;
}
public String[] getArgs() {
return args;
}
public void setArgs(String[] args) {
this.args = args;
}
public OptionSet getOptionSet() {
return optionSet;
}
public void setOptionSet(OptionSet optionSet) {
this.optionSet = optionSet;
}
public String getContentAfterPrefix() {
if (message == null || prefix == null) {
return null;
}
String content = message.getContent();
if (!content.contains(prefix)) {
return content;
}
return content.substring(prefix.length());
}
public String getContentAfterCommand() {
String withCommand = getContentAfterPrefix();
return withCommand.contains(" ") ? withCommand.split(" ", 2)[1] : "";
}
}
| package top.quantic.sentry.discord.core;
import joptsimple.OptionSet;
import sx.blah.discord.handle.obj.IMessage;
public class CommandContext {
private IMessage message;
private String prefix;
private Command command;
private String[] args;
private OptionSet optionSet;
public IMessage getMessage() {
return message;
}
public void setMessage(IMessage message) {
this.message = message;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public Command getCommand() {
return command;
}
public void setCommand(Command command) {
this.command = command;
}
public String[] getArgs() {
return args;
}
public void setArgs(String[] args) {
this.args = args;
}
public OptionSet getOptionSet() {
return optionSet;
}
public void setOptionSet(OptionSet optionSet) {
this.optionSet = optionSet;
}
public String getContentAfterPrefix() {
if (message == null || prefix == null) {
return null;
}
String content = message.getContent();
if (!content.contains(prefix)) {
return content;
}
return content.substring(prefix.length());
}
public String getContentAfterCommand() {
String withCommand = getContentAfterPrefix();
if (withCommand == null) {
return "";
}
return withCommand.contains(" ") ? withCommand.split(" ", 2)[1] : "";
}
}
| Fix potential NPE with command context | Fix potential NPE with command context
| Java | apache-2.0 | quanticc/sentry,quanticc/sentry,quanticc/sentry | java | ## Code Before:
package top.quantic.sentry.discord.core;
import joptsimple.OptionSet;
import sx.blah.discord.handle.obj.IMessage;
public class CommandContext {
private IMessage message;
private String prefix;
private Command command;
private String[] args;
private OptionSet optionSet;
public IMessage getMessage() {
return message;
}
public void setMessage(IMessage message) {
this.message = message;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public Command getCommand() {
return command;
}
public void setCommand(Command command) {
this.command = command;
}
public String[] getArgs() {
return args;
}
public void setArgs(String[] args) {
this.args = args;
}
public OptionSet getOptionSet() {
return optionSet;
}
public void setOptionSet(OptionSet optionSet) {
this.optionSet = optionSet;
}
public String getContentAfterPrefix() {
if (message == null || prefix == null) {
return null;
}
String content = message.getContent();
if (!content.contains(prefix)) {
return content;
}
return content.substring(prefix.length());
}
public String getContentAfterCommand() {
String withCommand = getContentAfterPrefix();
return withCommand.contains(" ") ? withCommand.split(" ", 2)[1] : "";
}
}
## Instruction:
Fix potential NPE with command context
## Code After:
package top.quantic.sentry.discord.core;
import joptsimple.OptionSet;
import sx.blah.discord.handle.obj.IMessage;
public class CommandContext {
private IMessage message;
private String prefix;
private Command command;
private String[] args;
private OptionSet optionSet;
public IMessage getMessage() {
return message;
}
public void setMessage(IMessage message) {
this.message = message;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public Command getCommand() {
return command;
}
public void setCommand(Command command) {
this.command = command;
}
public String[] getArgs() {
return args;
}
public void setArgs(String[] args) {
this.args = args;
}
public OptionSet getOptionSet() {
return optionSet;
}
public void setOptionSet(OptionSet optionSet) {
this.optionSet = optionSet;
}
public String getContentAfterPrefix() {
if (message == null || prefix == null) {
return null;
}
String content = message.getContent();
if (!content.contains(prefix)) {
return content;
}
return content.substring(prefix.length());
}
public String getContentAfterCommand() {
String withCommand = getContentAfterPrefix();
if (withCommand == null) {
return "";
}
return withCommand.contains(" ") ? withCommand.split(" ", 2)[1] : "";
}
}
| package top.quantic.sentry.discord.core;
import joptsimple.OptionSet;
import sx.blah.discord.handle.obj.IMessage;
public class CommandContext {
private IMessage message;
private String prefix;
private Command command;
private String[] args;
private OptionSet optionSet;
public IMessage getMessage() {
return message;
}
public void setMessage(IMessage message) {
this.message = message;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
public Command getCommand() {
return command;
}
public void setCommand(Command command) {
this.command = command;
}
public String[] getArgs() {
return args;
}
public void setArgs(String[] args) {
this.args = args;
}
public OptionSet getOptionSet() {
return optionSet;
}
public void setOptionSet(OptionSet optionSet) {
this.optionSet = optionSet;
}
public String getContentAfterPrefix() {
if (message == null || prefix == null) {
return null;
}
String content = message.getContent();
if (!content.contains(prefix)) {
return content;
}
return content.substring(prefix.length());
}
public String getContentAfterCommand() {
String withCommand = getContentAfterPrefix();
+ if (withCommand == null) {
+ return "";
+ }
return withCommand.contains(" ") ? withCommand.split(" ", 2)[1] : "";
}
} | 3 | 0.043478 | 3 | 0 |
2eb5cb50c69f7286730f97a6a7c9963bc89dcb12 | .travis.yml | .travis.yml | language: node_js
before_install:
- sudo apt-get install build-essential
- curl -sL https://github.com/Itseez/opencv/archive/2.4.6.2.zip > opencv.zip
- unzip opencv.zip
- rm opencv.zip
- mkdir opencv-build
- cd opencv-build/
- cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DWITH_OPENEXR=OFF ../opencv-2.4.6.2/
- sudo make install
- cd ..
| language: node_js
before_install:
- sudo apt-get install build-essential
- curl -sL https://github.com/Itseez/opencv/archive/2.4.6.2.zip > opencv.zip
- unzip opencv.zip
- rm opencv.zip
- mkdir opencv-build
- cd opencv-build/
- cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_java=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DWITH_OPENEXR=OFF -DBUILD_PNG=ON -DWITH_PNG=ON -DWITH_TIFF=OFF -DWITH_WEBP=OFF -DWITH_JPEG=ON -DBUILD_JPEG=ON ../opencv-2.4.6.2/
- sudo make install
- cd ..
| Disable WebP, TIFF, Java, Jasper, 3rd party libs like zlib, PNG and JPEG codecs will be build from scratch | Disable WebP, TIFF, Java, Jasper, 3rd party libs like zlib, PNG and JPEG codecs will be build from scratch
| YAML | bsd-3-clause | BloodAxe/CloudCVBackend,BloodAxe/CloudCVBackend,BloodAxe/CloudCVBackend | yaml | ## Code Before:
language: node_js
before_install:
- sudo apt-get install build-essential
- curl -sL https://github.com/Itseez/opencv/archive/2.4.6.2.zip > opencv.zip
- unzip opencv.zip
- rm opencv.zip
- mkdir opencv-build
- cd opencv-build/
- cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DWITH_OPENEXR=OFF ../opencv-2.4.6.2/
- sudo make install
- cd ..
## Instruction:
Disable WebP, TIFF, Java, Jasper, 3rd party libs like zlib, PNG and JPEG codecs will be build from scratch
## Code After:
language: node_js
before_install:
- sudo apt-get install build-essential
- curl -sL https://github.com/Itseez/opencv/archive/2.4.6.2.zip > opencv.zip
- unzip opencv.zip
- rm opencv.zip
- mkdir opencv-build
- cd opencv-build/
- cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_java=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DWITH_OPENEXR=OFF -DBUILD_PNG=ON -DWITH_PNG=ON -DWITH_TIFF=OFF -DWITH_WEBP=OFF -DWITH_JPEG=ON -DBUILD_JPEG=ON ../opencv-2.4.6.2/
- sudo make install
- cd ..
| language: node_js
before_install:
- sudo apt-get install build-essential
- curl -sL https://github.com/Itseez/opencv/archive/2.4.6.2.zip > opencv.zip
- unzip opencv.zip
- rm opencv.zip
- mkdir opencv-build
- cd opencv-build/
- - cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DWITH_OPENEXR=OFF ../opencv-2.4.6.2/
+ - cmake -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_java=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DWITH_OPENEXR=OFF -DBUILD_PNG=ON -DWITH_PNG=ON -DWITH_TIFF=OFF -DWITH_WEBP=OFF -DWITH_JPEG=ON -DBUILD_JPEG=ON ../opencv-2.4.6.2/
? ++++++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- sudo make install
- cd .. | 2 | 0.181818 | 1 | 1 |
c6cdf543f6bfd0049594eeb530551371bf21bae4 | test/test_scraping.py | test/test_scraping.py | from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
self.assertIs(type(time), datetime)
if sys.version_info[0] == 2:
# python2.x
assert type(msgId) in (str, unicode)
assert type(user) in (str, unicode)
assert type(text) in (str, unicode)
else:
# python3.x
self.assertIs(type(msgId), str)
self.assertIs(type(user), str)
self.assertIs(type(text), str)
if __name__ == '__main__':
unittest.main()
| from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
assert type(time) is datetime
if sys.version_info[0] == 2:
# python2.x
assert type(msgId) in (str, unicode)
assert type(user) in (str, unicode)
assert type(text) in (str, unicode)
else:
# python3.x
self.assertIs(type(msgId), str)
self.assertIs(type(user), str)
self.assertIs(type(text), str)
if __name__ == '__main__':
unittest.main()
| Fix for assertIs method not being present in Python 2.6. | Fix for assertIs method not being present in Python 2.6.
| Python | mit | lromanov/tidex-api,CodeReclaimers/btce-api,alanmcintyre/btce-api | python | ## Code Before:
from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
self.assertIs(type(time), datetime)
if sys.version_info[0] == 2:
# python2.x
assert type(msgId) in (str, unicode)
assert type(user) in (str, unicode)
assert type(text) in (str, unicode)
else:
# python3.x
self.assertIs(type(msgId), str)
self.assertIs(type(user), str)
self.assertIs(type(text), str)
if __name__ == '__main__':
unittest.main()
## Instruction:
Fix for assertIs method not being present in Python 2.6.
## Code After:
from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
assert type(time) is datetime
if sys.version_info[0] == 2:
# python2.x
assert type(msgId) in (str, unicode)
assert type(user) in (str, unicode)
assert type(text) in (str, unicode)
else:
# python3.x
self.assertIs(type(msgId), str)
self.assertIs(type(user), str)
self.assertIs(type(text), str)
if __name__ == '__main__':
unittest.main()
| from datetime import datetime
import sys
import unittest
import btceapi
class TestScraping(unittest.TestCase):
def test_scrape_main_page(self):
mainPage = btceapi.scrapeMainPage()
for message in mainPage.messages:
msgId, user, time, text = message
- self.assertIs(type(time), datetime)
? ----- ^^^ ^ -
+ assert type(time) is datetime
? ^ ^^^
if sys.version_info[0] == 2:
# python2.x
assert type(msgId) in (str, unicode)
assert type(user) in (str, unicode)
assert type(text) in (str, unicode)
else:
# python3.x
self.assertIs(type(msgId), str)
self.assertIs(type(user), str)
self.assertIs(type(text), str)
if __name__ == '__main__':
unittest.main() | 2 | 0.074074 | 1 | 1 |
31aa429a86abbec426316fd9a489e85361ecdb00 | test/cypress/support/index.js | test/cypress/support/index.js | /* eslint-disable */
import '@cypress/code-coverage/support'
require('./commands')
| /* eslint-disable */
import '@cypress/code-coverage/support'
require('./commands')
Cypress.Keyboard.defaults({
keystrokeDelay: 5,
})
| Increase typing speed when filling out forms x2 | Increase typing speed when filling out forms x2
| JavaScript | mit | uktrade/data-hub-fe-beta2,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-frontend | javascript | ## Code Before:
/* eslint-disable */
import '@cypress/code-coverage/support'
require('./commands')
## Instruction:
Increase typing speed when filling out forms x2
## Code After:
/* eslint-disable */
import '@cypress/code-coverage/support'
require('./commands')
Cypress.Keyboard.defaults({
keystrokeDelay: 5,
})
| /* eslint-disable */
import '@cypress/code-coverage/support'
require('./commands')
+
+ Cypress.Keyboard.defaults({
+ keystrokeDelay: 5,
+ }) | 4 | 1.333333 | 4 | 0 |
757442dfa5fefa5b5b0387fe82f7a2e4fb3dcc06 | lib/flor/unit/taskers.rb | lib/flor/unit/taskers.rb |
module Flor
class BasicTasker
attr_reader :ganger, :conf, :message
def initialize(ganger, conf, message)
@ganger = ganger
@conf = conf
@message = message
end
protected
def return(force=false)
@ganger.return(@message) if force || @ganger
end
alias reply return
def exid; @message['exid']; end
def nid; @message['nid']; end
def execution
@ganger.unit.execution(exid)
end
# For domain taskers
#
def route(name)
if name == false
[
Flor.dup_and_merge(
@message,
'routed' => false)
]
else
[
Flor.dup_and_merge(
@message,
'tasker' => name, 'original_tasker' => @message['tasker'],
'routed' => true)
]
end
end
end
end
|
module Flor
class BasicTasker
attr_reader :ganger, :conf, :message
def initialize(ganger, conf, message)
@ganger = ganger
@conf = conf
@message = message
end
protected
def return(force=false)
@ganger.return(@message) if force || @ganger
end
alias reply return
def exid; @message['exid']; end
def nid; @message['nid']; end
def payload; @message['payload']; end
alias fields payload
def tasker; @message['tasker']; end
def taskname; @message['taskname']; end
alias task_name taskname
def vars; @message['vars']; end
def execution
@ganger.unit.execution(exid)
end
# For domain taskers
#
def route(name)
if name == false
[
Flor.dup_and_merge(
@message,
'routed' => false)
]
else
[
Flor.dup_and_merge(
@message,
'tasker' => name, 'original_tasker' => @message['tasker'],
'routed' => true)
]
end
end
end
end
| Bring in helper methods to BasicTasker | Bring in helper methods to BasicTasker
| Ruby | mit | floraison/flor,dmicky0419/flor,flon-io/flor,floraison/flor,floraison/flor,dmicky0419/flor,dmicky0419/flor | ruby | ## Code Before:
module Flor
class BasicTasker
attr_reader :ganger, :conf, :message
def initialize(ganger, conf, message)
@ganger = ganger
@conf = conf
@message = message
end
protected
def return(force=false)
@ganger.return(@message) if force || @ganger
end
alias reply return
def exid; @message['exid']; end
def nid; @message['nid']; end
def execution
@ganger.unit.execution(exid)
end
# For domain taskers
#
def route(name)
if name == false
[
Flor.dup_and_merge(
@message,
'routed' => false)
]
else
[
Flor.dup_and_merge(
@message,
'tasker' => name, 'original_tasker' => @message['tasker'],
'routed' => true)
]
end
end
end
end
## Instruction:
Bring in helper methods to BasicTasker
## Code After:
module Flor
class BasicTasker
attr_reader :ganger, :conf, :message
def initialize(ganger, conf, message)
@ganger = ganger
@conf = conf
@message = message
end
protected
def return(force=false)
@ganger.return(@message) if force || @ganger
end
alias reply return
def exid; @message['exid']; end
def nid; @message['nid']; end
def payload; @message['payload']; end
alias fields payload
def tasker; @message['tasker']; end
def taskname; @message['taskname']; end
alias task_name taskname
def vars; @message['vars']; end
def execution
@ganger.unit.execution(exid)
end
# For domain taskers
#
def route(name)
if name == false
[
Flor.dup_and_merge(
@message,
'routed' => false)
]
else
[
Flor.dup_and_merge(
@message,
'tasker' => name, 'original_tasker' => @message['tasker'],
'routed' => true)
]
end
end
end
end
|
module Flor
class BasicTasker
attr_reader :ganger, :conf, :message
def initialize(ganger, conf, message)
@ganger = ganger
@conf = conf
@message = message
end
protected
def return(force=false)
@ganger.return(@message) if force || @ganger
end
alias reply return
def exid; @message['exid']; end
def nid; @message['nid']; end
+
+ def payload; @message['payload']; end
+ alias fields payload
+
+ def tasker; @message['tasker']; end
+ def taskname; @message['taskname']; end
+ alias task_name taskname
+
+ def vars; @message['vars']; end
def execution
@ganger.unit.execution(exid)
end
# For domain taskers
#
def route(name)
if name == false
[
Flor.dup_and_merge(
@message,
'routed' => false)
]
else
[
Flor.dup_and_merge(
@message,
'tasker' => name, 'original_tasker' => @message['tasker'],
'routed' => true)
]
end
end
end
end
| 9 | 0.163636 | 9 | 0 |
d4d3cee54f57442c2166bead54a8c20d2be0274d | public/lib/feathers/feathers-client.js | public/lib/feathers/feathers-client.js | import feathers from 'feathers/client';
import io from 'steal-socket.io';
import socketio from 'feathers-socketio/client';
import auth from 'feathers-authentication/client';
import hooks from 'feathers-hooks';
var socket = io({
transports: ['websocket']
});
const app = feathers()
.configure(socketio(socket))
.configure(hooks())
.configure(auth());
export default app;
| import feathers from 'feathers/client';
import io from 'socket.io-client/dist/socket.io';
import socketio from 'feathers-socketio/client';
import auth from 'feathers-authentication/client';
import hooks from 'feathers-hooks';
var socket = io({
transports: ['websocket']
});
const app = feathers()
.configure(socketio(socket))
.configure(hooks())
.configure(auth());
export default app;
| Use socket.io-client in place of steal-socket.io | Use socket.io-client in place of steal-socket.io
| JavaScript | mit | donejs/bitcentive,donejs/bitcentive | javascript | ## Code Before:
import feathers from 'feathers/client';
import io from 'steal-socket.io';
import socketio from 'feathers-socketio/client';
import auth from 'feathers-authentication/client';
import hooks from 'feathers-hooks';
var socket = io({
transports: ['websocket']
});
const app = feathers()
.configure(socketio(socket))
.configure(hooks())
.configure(auth());
export default app;
## Instruction:
Use socket.io-client in place of steal-socket.io
## Code After:
import feathers from 'feathers/client';
import io from 'socket.io-client/dist/socket.io';
import socketio from 'feathers-socketio/client';
import auth from 'feathers-authentication/client';
import hooks from 'feathers-hooks';
var socket = io({
transports: ['websocket']
});
const app = feathers()
.configure(socketio(socket))
.configure(hooks())
.configure(auth());
export default app;
| import feathers from 'feathers/client';
- import io from 'steal-socket.io';
+ import io from 'socket.io-client/dist/socket.io';
import socketio from 'feathers-socketio/client';
import auth from 'feathers-authentication/client';
import hooks from 'feathers-hooks';
var socket = io({
transports: ['websocket']
});
const app = feathers()
.configure(socketio(socket))
.configure(hooks())
.configure(auth());
export default app; | 2 | 0.133333 | 1 | 1 |
bc08bee5f1af11e4acf5ae2dcb9ffd66de48e414 | .github/workflows/integration.yml | .github/workflows/integration.yml | name: Integration Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x]
steps:
- name: Checkout yeoman-test
uses: actions/checkout@v2
with:
repository: yeoman/yeoman-test
path: yeoman-test
- name: Checkout yeoman-generator
uses: actions/checkout@v2
with:
path: yeoman-generator
- name: Checkout yeoman-environment
uses: actions/checkout@v2
with:
repository: yeoman/environment
path: yeoman-environment
- uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}
- name: Run yeoman-test test
run: |
cd $GITHUB_WORKSPACE/yeoman-test
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
npm install yeoman/environment#master
npm test
- name: Run yeoman-generator test
run: |
cd $GITHUB_WORKSPACE/yeoman-generator
npm ci
npm install yeoman/yeoman-test#master
npm install yeoman/environment#master
npm test
- name: Run yeoman-environment test
run: |
cd $GITHUB_WORKSPACE/yeoman-environment
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
npm install yeoman/yeoman-test#master
npm test
| name: Integration Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x]
steps:
- name: Checkout yeoman-test
uses: actions/checkout@v2
with:
repository: yeoman/yeoman-test
path: yeoman-test
- name: Checkout yeoman-generator
uses: actions/checkout@v2
with:
path: yeoman-generator
- name: Checkout yeoman-environment
uses: actions/checkout@v2
with:
repository: yeoman/environment
path: yeoman-environment
- uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}
- name: Run yeoman-test test
run: |
cd $GITHUB_WORKSPACE/yeoman-test
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
npm install yeoman/environment#main
npm test
- name: Run yeoman-generator test
run: |
cd $GITHUB_WORKSPACE/yeoman-generator
npm ci
npm install yeoman/yeoman-test#main
npm install yeoman/environment#main
npm test
- name: Run yeoman-environment test
run: |
cd $GITHUB_WORKSPACE/yeoman-environment
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
npm install yeoman/yeoman-test#main
npm test
| Change from master to main. | Change from master to main. | YAML | bsd-2-clause | yeoman/generator,yeoman/generator | yaml | ## Code Before:
name: Integration Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x]
steps:
- name: Checkout yeoman-test
uses: actions/checkout@v2
with:
repository: yeoman/yeoman-test
path: yeoman-test
- name: Checkout yeoman-generator
uses: actions/checkout@v2
with:
path: yeoman-generator
- name: Checkout yeoman-environment
uses: actions/checkout@v2
with:
repository: yeoman/environment
path: yeoman-environment
- uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}
- name: Run yeoman-test test
run: |
cd $GITHUB_WORKSPACE/yeoman-test
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
npm install yeoman/environment#master
npm test
- name: Run yeoman-generator test
run: |
cd $GITHUB_WORKSPACE/yeoman-generator
npm ci
npm install yeoman/yeoman-test#master
npm install yeoman/environment#master
npm test
- name: Run yeoman-environment test
run: |
cd $GITHUB_WORKSPACE/yeoman-environment
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
npm install yeoman/yeoman-test#master
npm test
## Instruction:
Change from master to main.
## Code After:
name: Integration Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x]
steps:
- name: Checkout yeoman-test
uses: actions/checkout@v2
with:
repository: yeoman/yeoman-test
path: yeoman-test
- name: Checkout yeoman-generator
uses: actions/checkout@v2
with:
path: yeoman-generator
- name: Checkout yeoman-environment
uses: actions/checkout@v2
with:
repository: yeoman/environment
path: yeoman-environment
- uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}
- name: Run yeoman-test test
run: |
cd $GITHUB_WORKSPACE/yeoman-test
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
npm install yeoman/environment#main
npm test
- name: Run yeoman-generator test
run: |
cd $GITHUB_WORKSPACE/yeoman-generator
npm ci
npm install yeoman/yeoman-test#main
npm install yeoman/environment#main
npm test
- name: Run yeoman-environment test
run: |
cd $GITHUB_WORKSPACE/yeoman-environment
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
npm install yeoman/yeoman-test#main
npm test
| name: Integration Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [12.x]
steps:
- name: Checkout yeoman-test
uses: actions/checkout@v2
with:
repository: yeoman/yeoman-test
path: yeoman-test
- name: Checkout yeoman-generator
uses: actions/checkout@v2
with:
path: yeoman-generator
- name: Checkout yeoman-environment
uses: actions/checkout@v2
with:
repository: yeoman/environment
path: yeoman-environment
- uses: actions/setup-node@v2.1.2
with:
node-version: ${{ matrix.node-version }}
- name: Run yeoman-test test
run: |
cd $GITHUB_WORKSPACE/yeoman-test
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
- npm install yeoman/environment#master
? ^^^^
+ npm install yeoman/environment#main
? ^^
npm test
- name: Run yeoman-generator test
run: |
cd $GITHUB_WORKSPACE/yeoman-generator
npm ci
- npm install yeoman/yeoman-test#master
? ^^^^
+ npm install yeoman/yeoman-test#main
? ^^
- npm install yeoman/environment#master
? ^^^^
+ npm install yeoman/environment#main
? ^^
npm test
- name: Run yeoman-environment test
run: |
cd $GITHUB_WORKSPACE/yeoman-environment
npm ci
npm install ${{ github.repository }}#$GITHUB_SHA
- npm install yeoman/yeoman-test#master
? ^^^^
+ npm install yeoman/yeoman-test#main
? ^^
npm test | 8 | 0.135593 | 4 | 4 |
dbe5e67d2685083769e7d154926e6a1a234fa3c4 | src/livestreamer/stream.py | src/livestreamer/stream.py | from livestreamer.utils import urlopen
import pbs
class StreamError(Exception):
pass
class Stream(object):
def open(self):
raise NotImplementedError
class RTMPStream(Stream):
def __init__(self, params):
self.params = params or {}
def open(self):
try:
rtmpdump = pbs.rtmpdump
except pbs.CommandNotFound:
raise StreamError("Unable to find 'rtmpdump' command")
self.params["flv"] = "-"
self.params["_bg"] = True
stream = rtmpdump(**self.params)
return stream.process.stdout
class HTTPStream(Stream):
def __init__(self, url):
self.url = url
def open(self):
return urlopen(self.url)
| from livestreamer.utils import urlopen
import os
import pbs
class StreamError(Exception):
pass
class Stream(object):
def open(self):
raise NotImplementedError
class RTMPStream(Stream):
def __init__(self, params):
self.params = params or {}
def open(self):
try:
rtmpdump = pbs.rtmpdump
except pbs.CommandNotFound:
raise StreamError("Unable to find 'rtmpdump' command")
self.params["flv"] = "-"
self.params["_bg"] = True
self.params["_err"] = open(os.devnull, "w")
stream = rtmpdump(**self.params)
return stream.process.stdout
class HTTPStream(Stream):
def __init__(self, url):
self.url = url
def open(self):
return urlopen(self.url)
| Fix rtmpdump locking up when stderr buffer is filled. | Fix rtmpdump locking up when stderr buffer is filled.
| Python | bsd-2-clause | charmander/livestreamer,sbstp/streamlink,wolftankk/livestreamer,bastimeyer/streamlink,caorong/livestreamer,breunigs/livestreamer,lyhiving/livestreamer,breunigs/livestreamer,okaywit/livestreamer,derrod/livestreamer,fishscene/streamlink,back-to/streamlink,streamlink/streamlink,wlerin/streamlink,melmorabity/streamlink,sbstp/streamlink,Dobatymo/livestreamer,streamlink/streamlink,back-to/streamlink,intact/livestreamer,Masaz-/livestreamer,ethanhlc/streamlink,charmander/livestreamer,blxd/livestreamer,programming086/livestreamer,blxd/livestreamer,derrod/livestreamer,caorong/livestreamer,flijloku/livestreamer,mmetak/streamlink,javiercantero/streamlink,lyhiving/livestreamer,melmorabity/streamlink,chhe/streamlink,Klaudit/livestreamer,Feverqwe/livestreamer,chhe/livestreamer,beardypig/streamlink,beardypig/streamlink,gravyboat/streamlink,Feverqwe/livestreamer,chhe/livestreamer,chrisnicholls/livestreamer,wlerin/streamlink,intact/livestreamer,bastimeyer/streamlink,wolftankk/livestreamer,chrippa/livestreamer,Saturn/livestreamer,chhe/streamlink,Dobatymo/livestreamer,programming086/livestreamer,gtmanfred/livestreamer,chrippa/livestreamer,asermax/livestreamer,mmetak/streamlink,hmit/livestreamer,gravyboat/streamlink,javiercantero/streamlink,Saturn/livestreamer,Klaudit/livestreamer,hmit/livestreamer,fishscene/streamlink,gtmanfred/livestreamer,jtsymon/livestreamer,ethanhlc/streamlink,Masaz-/livestreamer,okaywit/livestreamer,jtsymon/livestreamer,flijloku/livestreamer | python | ## Code Before:
from livestreamer.utils import urlopen
import pbs
class StreamError(Exception):
pass
class Stream(object):
def open(self):
raise NotImplementedError
class RTMPStream(Stream):
def __init__(self, params):
self.params = params or {}
def open(self):
try:
rtmpdump = pbs.rtmpdump
except pbs.CommandNotFound:
raise StreamError("Unable to find 'rtmpdump' command")
self.params["flv"] = "-"
self.params["_bg"] = True
stream = rtmpdump(**self.params)
return stream.process.stdout
class HTTPStream(Stream):
def __init__(self, url):
self.url = url
def open(self):
return urlopen(self.url)
## Instruction:
Fix rtmpdump locking up when stderr buffer is filled.
## Code After:
from livestreamer.utils import urlopen
import os
import pbs
class StreamError(Exception):
pass
class Stream(object):
def open(self):
raise NotImplementedError
class RTMPStream(Stream):
def __init__(self, params):
self.params = params or {}
def open(self):
try:
rtmpdump = pbs.rtmpdump
except pbs.CommandNotFound:
raise StreamError("Unable to find 'rtmpdump' command")
self.params["flv"] = "-"
self.params["_bg"] = True
self.params["_err"] = open(os.devnull, "w")
stream = rtmpdump(**self.params)
return stream.process.stdout
class HTTPStream(Stream):
def __init__(self, url):
self.url = url
def open(self):
return urlopen(self.url)
| from livestreamer.utils import urlopen
+ import os
import pbs
class StreamError(Exception):
pass
class Stream(object):
def open(self):
raise NotImplementedError
class RTMPStream(Stream):
def __init__(self, params):
self.params = params or {}
def open(self):
try:
rtmpdump = pbs.rtmpdump
except pbs.CommandNotFound:
raise StreamError("Unable to find 'rtmpdump' command")
self.params["flv"] = "-"
self.params["_bg"] = True
+ self.params["_err"] = open(os.devnull, "w")
stream = rtmpdump(**self.params)
return stream.process.stdout
class HTTPStream(Stream):
def __init__(self, url):
self.url = url
def open(self):
return urlopen(self.url)
| 2 | 0.057143 | 2 | 0 |
8f0654969a25b46fc519df8171fca0dde58e44c1 | manifest.json | manifest.json | {
"manifest_version": 2,
"name": "playfullist",
"version": "0.0.1",
"description": "Toggles a panel for playing all embedded Youtube videos on a Wordpress blog",
"browser_action": {
"name": "Play all embedded Youtube videos",
"default_icon": "i/luna.png"
},
"content_scripts": [{
"matches": ["https://willcampo.wordpress.com/*", "http://willcampo.wordpress.com/*"],
"js": ["js/makeYoutubeList.js", "js/iframe_api.js", "js/www-widgetapi.js"]
}],
"background": {
"scripts": ["js/background.js"]
},
"permissions": ["activeTab"],
"icons": {"128": "i/luna.png"}
}
| {
"manifest_version": 2,
"name": "playfullist",
"version": "0.0.1",
"description": "Toggles a panel for playing all embedded Youtube videos on a Wordpress blog",
"browser_action": {
"name": "Play all embedded Youtube videos",
"default_icon": "i/luna.png"
},
"content_scripts": [{
"matches": ["https://*/*", "http://*/*"],
"js": ["js/makeYoutubeList.js", "js/iframe_api.js", "js/www-widgetapi.js"]
}],
"background": {
"scripts": ["js/background.js"]
},
"permissions": ["activeTab"],
"icons": {"128": "i/luna.png"}
}
| Make extension work for all domains | Make extension work for all domains
| JSON | mit | maxpblum/playfullist | json | ## Code Before:
{
"manifest_version": 2,
"name": "playfullist",
"version": "0.0.1",
"description": "Toggles a panel for playing all embedded Youtube videos on a Wordpress blog",
"browser_action": {
"name": "Play all embedded Youtube videos",
"default_icon": "i/luna.png"
},
"content_scripts": [{
"matches": ["https://willcampo.wordpress.com/*", "http://willcampo.wordpress.com/*"],
"js": ["js/makeYoutubeList.js", "js/iframe_api.js", "js/www-widgetapi.js"]
}],
"background": {
"scripts": ["js/background.js"]
},
"permissions": ["activeTab"],
"icons": {"128": "i/luna.png"}
}
## Instruction:
Make extension work for all domains
## Code After:
{
"manifest_version": 2,
"name": "playfullist",
"version": "0.0.1",
"description": "Toggles a panel for playing all embedded Youtube videos on a Wordpress blog",
"browser_action": {
"name": "Play all embedded Youtube videos",
"default_icon": "i/luna.png"
},
"content_scripts": [{
"matches": ["https://*/*", "http://*/*"],
"js": ["js/makeYoutubeList.js", "js/iframe_api.js", "js/www-widgetapi.js"]
}],
"background": {
"scripts": ["js/background.js"]
},
"permissions": ["activeTab"],
"icons": {"128": "i/luna.png"}
}
| {
"manifest_version": 2,
"name": "playfullist",
"version": "0.0.1",
"description": "Toggles a panel for playing all embedded Youtube videos on a Wordpress blog",
"browser_action": {
"name": "Play all embedded Youtube videos",
"default_icon": "i/luna.png"
},
"content_scripts": [{
- "matches": ["https://willcampo.wordpress.com/*", "http://willcampo.wordpress.com/*"],
+ "matches": ["https://*/*", "http://*/*"],
"js": ["js/makeYoutubeList.js", "js/iframe_api.js", "js/www-widgetapi.js"]
}],
"background": {
"scripts": ["js/background.js"]
},
"permissions": ["activeTab"],
"icons": {"128": "i/luna.png"}
} | 2 | 0.105263 | 1 | 1 |
96d99784ba6459abfdfc8365c17dd8d74db0aaf2 | tests/src/test/java/com/orientechnologies/orient/test/database/base/DeleteDirectory.java | tests/src/test/java/com/orientechnologies/orient/test/database/base/DeleteDirectory.java | /*
* Copyright 2010-2012 Luca Garulli (l.garulli--at--orientechnologies.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.orientechnologies.orient.test.database.base;
import java.io.File;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@Test
public class DeleteDirectory {
@Parameters(value = "path")
public DeleteDirectory(String iPath) {
final File f = new File(iPath);
if (f.exists())
deleteDirectory(f);
else
System.err.println("Directory: " + f.getAbsolutePath() + " not found");
}
private void deleteDirectory(File iDirectory) {
if (iDirectory.isDirectory())
for (File f : iDirectory.listFiles()) {
if (f.isDirectory())
deleteDirectory(f);
else
f.delete();
}
}
}
| /*
* Copyright 2010-2012 Luca Garulli (l.garulli--at--orientechnologies.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.orientechnologies.orient.test.database.base;
import java.io.File;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
import com.orientechnologies.orient.core.exception.OConfigurationException;
@Test
public class DeleteDirectory {
@Parameters(value = "path")
public DeleteDirectory(String iPath) {
final File f = new File(iPath);
if (f.exists())
deleteDirectory(f);
else
System.err.println("Directory: " + f.getAbsolutePath() + " not found");
}
private void deleteDirectory(File iDirectory) {
if (iDirectory.isDirectory())
for (File f : iDirectory.listFiles()) {
if (f.isDirectory())
deleteDirectory(f);
else if (!f.delete())
throw new OConfigurationException("Can't delete the file: " + f);
}
}
}
| Delete database of tests now stops if a file can't be deleted | Delete database of tests now stops if a file can't be deleted
| Java | apache-2.0 | cstamas/orientdb,mbhulin/orientdb,allanmoso/orientdb,allanmoso/orientdb,wyzssw/orientdb,tempbottle/orientdb,orientechnologies/orientdb,tempbottle/orientdb,mmacfadden/orientdb,giastfader/orientdb,giastfader/orientdb,rprabhat/orientdb,mbhulin/orientdb,mbhulin/orientdb,joansmith/orientdb,orientechnologies/orientdb,tempbottle/orientdb,allanmoso/orientdb,cstamas/orientdb,sanyaade-g2g-repos/orientdb,sanyaade-g2g-repos/orientdb,wouterv/orientdb,wouterv/orientdb,wyzssw/orientdb,wouterv/orientdb,mbhulin/orientdb,intfrr/orientdb,cstamas/orientdb,alonsod86/orientdb,orientechnologies/orientdb,wouterv/orientdb,sanyaade-g2g-repos/orientdb,intfrr/orientdb,jdillon/orientdb,mmacfadden/orientdb,intfrr/orientdb,jdillon/orientdb,mmacfadden/orientdb,orientechnologies/orientdb,allanmoso/orientdb,alonsod86/orientdb,rprabhat/orientdb,joansmith/orientdb,giastfader/orientdb,intfrr/orientdb,alonsod86/orientdb,mmacfadden/orientdb,alonsod86/orientdb,wyzssw/orientdb,joansmith/orientdb,sanyaade-g2g-repos/orientdb,jdillon/orientdb,tempbottle/orientdb,giastfader/orientdb,joansmith/orientdb,rprabhat/orientdb,rprabhat/orientdb,wyzssw/orientdb,cstamas/orientdb | java | ## Code Before:
/*
* Copyright 2010-2012 Luca Garulli (l.garulli--at--orientechnologies.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.orientechnologies.orient.test.database.base;
import java.io.File;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@Test
public class DeleteDirectory {
@Parameters(value = "path")
public DeleteDirectory(String iPath) {
final File f = new File(iPath);
if (f.exists())
deleteDirectory(f);
else
System.err.println("Directory: " + f.getAbsolutePath() + " not found");
}
private void deleteDirectory(File iDirectory) {
if (iDirectory.isDirectory())
for (File f : iDirectory.listFiles()) {
if (f.isDirectory())
deleteDirectory(f);
else
f.delete();
}
}
}
## Instruction:
Delete database of tests now stops if a file can't be deleted
## Code After:
/*
* Copyright 2010-2012 Luca Garulli (l.garulli--at--orientechnologies.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.orientechnologies.orient.test.database.base;
import java.io.File;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
import com.orientechnologies.orient.core.exception.OConfigurationException;
@Test
public class DeleteDirectory {
@Parameters(value = "path")
public DeleteDirectory(String iPath) {
final File f = new File(iPath);
if (f.exists())
deleteDirectory(f);
else
System.err.println("Directory: " + f.getAbsolutePath() + " not found");
}
private void deleteDirectory(File iDirectory) {
if (iDirectory.isDirectory())
for (File f : iDirectory.listFiles()) {
if (f.isDirectory())
deleteDirectory(f);
else if (!f.delete())
throw new OConfigurationException("Can't delete the file: " + f);
}
}
}
| /*
* Copyright 2010-2012 Luca Garulli (l.garulli--at--orientechnologies.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.orientechnologies.orient.test.database.base;
import java.io.File;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
+ import com.orientechnologies.orient.core.exception.OConfigurationException;
+
@Test
public class DeleteDirectory {
- @Parameters(value = "path")
? ^
+ @Parameters(value = "path")
? ^^
- public DeleteDirectory(String iPath) {
? ^
+ public DeleteDirectory(String iPath) {
? ^^
- final File f = new File(iPath);
? ^^
+ final File f = new File(iPath);
? ^^^^
- if (f.exists())
? ^^
+ if (f.exists())
? ^^^^
- deleteDirectory(f);
? ^^^
+ deleteDirectory(f);
? ^^^^^^
- else
+ else
- System.err.println("Directory: " + f.getAbsolutePath() + " not found");
? ^^^
+ System.err.println("Directory: " + f.getAbsolutePath() + " not found");
? ^^^^^^
- }
+ }
- private void deleteDirectory(File iDirectory) {
? ^
+ private void deleteDirectory(File iDirectory) {
? ^^
- if (iDirectory.isDirectory())
? ^^
+ if (iDirectory.isDirectory())
? ^^^^
- for (File f : iDirectory.listFiles()) {
? ^^^
+ for (File f : iDirectory.listFiles()) {
? ^^^^^^
- if (f.isDirectory())
? ^^^^
+ if (f.isDirectory())
? ^^^^^^^^
- deleteDirectory(f);
- else
- f.delete();
- }
+ deleteDirectory(f);
+ else if (!f.delete())
+ throw new OConfigurationException("Can't delete the file: " + f);
+ }
- }
+ }
} | 36 | 0.8 | 19 | 17 |
8ebbf80acd589295cbd887ae74a45f868d274573 | app/views/sulten/closed_periods/_form.html.haml | app/views/sulten/closed_periods/_form.html.haml | = semantic_form_for @closed_period do |f|
= f.inputs do
= f.input :message_no
= f.input :message_en
= f.input :closed_from, as: :string,
input_html: { class: "datepicker", value: f.object.closed_from.to_date }
= f.input :closed_to, as: :string,
input_html: { class: "datepicker", value: f.object.closed_to.to_date }
= f.actions
| = semantic_form_for @closed_period do |f|
= f.inputs do
= f.input :closed_from, as: :string,
input_html: { class: "datepicker", value: f.object.closed_from.to_date }
= f.input :closed_to, as: :string,
input_html: { class: "datepicker", value: f.object.closed_to.to_date }
= f.input :message_no
= f.input :message_en
= f.actions
| Move message to the bottom of Sulten::ClosedPeriod form | Move message to the bottom of Sulten::ClosedPeriod form
| Haml | mit | Samfundet/Samfundet,Samfundet/Samfundet,Samfundet/Samfundet,Samfundet/Samfundet | haml | ## Code Before:
= semantic_form_for @closed_period do |f|
= f.inputs do
= f.input :message_no
= f.input :message_en
= f.input :closed_from, as: :string,
input_html: { class: "datepicker", value: f.object.closed_from.to_date }
= f.input :closed_to, as: :string,
input_html: { class: "datepicker", value: f.object.closed_to.to_date }
= f.actions
## Instruction:
Move message to the bottom of Sulten::ClosedPeriod form
## Code After:
= semantic_form_for @closed_period do |f|
= f.inputs do
= f.input :closed_from, as: :string,
input_html: { class: "datepicker", value: f.object.closed_from.to_date }
= f.input :closed_to, as: :string,
input_html: { class: "datepicker", value: f.object.closed_to.to_date }
= f.input :message_no
= f.input :message_en
= f.actions
| = semantic_form_for @closed_period do |f|
= f.inputs do
- = f.input :message_no
- = f.input :message_en
= f.input :closed_from, as: :string,
input_html: { class: "datepicker", value: f.object.closed_from.to_date }
= f.input :closed_to, as: :string,
input_html: { class: "datepicker", value: f.object.closed_to.to_date }
+ = f.input :message_no
+ = f.input :message_en
= f.actions | 4 | 0.444444 | 2 | 2 |
19b7cd065aa1d220a0646fee083893847091858e | doc/project/jigsaw.quick.start.with.junit/src/org.astro/test/java/org/astro/WorldTests.java | doc/project/jigsaw.quick.start.with.junit/src/org.astro/test/java/org/astro/WorldTests.java | package org.astro;
public class WorldTests {
static {
if (!World.PACKAGE_PRIVATE_FIELD.equals("World")) throw new AssertionError(")-:");
new test.base.Tester();
}
}
| package org.astro;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.junit.jupiter.api.DisplayNameGeneration;
import org.junit.jupiter.api.Test;
import test.base.PrependModuleName;
@DisplayNameGeneration(PrependModuleName.class)
class WorldTests {
@Test
void test() {
assertEquals("World", World.PACKAGE_PRIVATE_FIELD);
assertNotNull(new test.base.Tester().toString());
}
}
| Transform into JUnit Jupiter test | Transform into JUnit Jupiter test
| Java | mit | sormuras/bach,sormuras/bach | java | ## Code Before:
package org.astro;
public class WorldTests {
static {
if (!World.PACKAGE_PRIVATE_FIELD.equals("World")) throw new AssertionError(")-:");
new test.base.Tester();
}
}
## Instruction:
Transform into JUnit Jupiter test
## Code After:
package org.astro;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import org.junit.jupiter.api.DisplayNameGeneration;
import org.junit.jupiter.api.Test;
import test.base.PrependModuleName;
@DisplayNameGeneration(PrependModuleName.class)
class WorldTests {
@Test
void test() {
assertEquals("World", World.PACKAGE_PRIVATE_FIELD);
assertNotNull(new test.base.Tester().toString());
}
}
| package org.astro;
+ import static org.junit.jupiter.api.Assertions.assertEquals;
+ import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+ import org.junit.jupiter.api.DisplayNameGeneration;
+ import org.junit.jupiter.api.Test;
+ import test.base.PrependModuleName;
+
+ @DisplayNameGeneration(PrependModuleName.class)
- public class WorldTests {
? -------
+ class WorldTests {
- static {
- if (!World.PACKAGE_PRIVATE_FIELD.equals("World")) throw new AssertionError(")-:");
- new test.base.Tester();
+ @Test
+ void test() {
+ assertEquals("World", World.PACKAGE_PRIVATE_FIELD);
+ assertNotNull(new test.base.Tester().toString());
}
} | 17 | 2.125 | 13 | 4 |
24691615300e2452ce1d371d377ee75d66b37445 | styles/index.scss | styles/index.scss | @import "_variables.scss";
.donate-ask {
text-align: center;
a {
display: block;
color: white;
background-color: $primary-color;
padding: 20px 40px;
margin: $vertical-spacer auto;
width: 250px;
border: 0 none;
-webkit-border-radius: 5px;
border-radius: 5px;
text-decoration: none;
font-size: 1.3em;
}
a:hover {
color: white;
background-color: $darker-primary-color;
}
}
.bottom-shadow {
padding-bottom: $vertical-spacer;
box-shadow: 0 1px 0 $secondary-color;
}
.about {
img {
width: 100%;
}
}
@include susy-breakpoint($wide, $wideLayout) {
.about {
@include span(6);
}
}
@include susy-breakpoint($narrow, $narrowLayout) {
.about {
@include span(1);
}
}
| @import "_variables.scss";
h1 a {
text-decoration: none;
}
.donate-ask {
text-align: center;
a {
display: block;
color: white;
background-color: $primary-color;
padding: 20px 40px;
margin: $vertical-spacer auto;
width: 250px;
border: 0 none;
-webkit-border-radius: 5px;
border-radius: 5px;
text-decoration: none;
font-size: 1.3em;
}
a:hover {
color: white;
background-color: $darker-primary-color;
}
}
.bottom-shadow {
padding-bottom: $vertical-spacer;
box-shadow: 0 1px 0 $secondary-color;
}
.about {
img {
width: 100%;
}
}
@include susy-breakpoint($wide, $wideLayout) {
.about {
@include span(6);
}
}
@include susy-breakpoint($narrow, $narrowLayout) {
.about {
@include span(1);
}
}
| Remove underlines from phone numbers | Remove underlines from phone numbers
| SCSS | mit | TransLifeline/translifeline-home,TransLifeline/translifeline-home | scss | ## Code Before:
@import "_variables.scss";
.donate-ask {
text-align: center;
a {
display: block;
color: white;
background-color: $primary-color;
padding: 20px 40px;
margin: $vertical-spacer auto;
width: 250px;
border: 0 none;
-webkit-border-radius: 5px;
border-radius: 5px;
text-decoration: none;
font-size: 1.3em;
}
a:hover {
color: white;
background-color: $darker-primary-color;
}
}
.bottom-shadow {
padding-bottom: $vertical-spacer;
box-shadow: 0 1px 0 $secondary-color;
}
.about {
img {
width: 100%;
}
}
@include susy-breakpoint($wide, $wideLayout) {
.about {
@include span(6);
}
}
@include susy-breakpoint($narrow, $narrowLayout) {
.about {
@include span(1);
}
}
## Instruction:
Remove underlines from phone numbers
## Code After:
@import "_variables.scss";
h1 a {
text-decoration: none;
}
.donate-ask {
text-align: center;
a {
display: block;
color: white;
background-color: $primary-color;
padding: 20px 40px;
margin: $vertical-spacer auto;
width: 250px;
border: 0 none;
-webkit-border-radius: 5px;
border-radius: 5px;
text-decoration: none;
font-size: 1.3em;
}
a:hover {
color: white;
background-color: $darker-primary-color;
}
}
.bottom-shadow {
padding-bottom: $vertical-spacer;
box-shadow: 0 1px 0 $secondary-color;
}
.about {
img {
width: 100%;
}
}
@include susy-breakpoint($wide, $wideLayout) {
.about {
@include span(6);
}
}
@include susy-breakpoint($narrow, $narrowLayout) {
.about {
@include span(1);
}
}
| @import "_variables.scss";
+
+ h1 a {
+ text-decoration: none;
+ }
.donate-ask {
text-align: center;
a {
display: block;
color: white;
background-color: $primary-color;
padding: 20px 40px;
margin: $vertical-spacer auto;
width: 250px;
border: 0 none;
-webkit-border-radius: 5px;
border-radius: 5px;
text-decoration: none;
font-size: 1.3em;
}
a:hover {
color: white;
background-color: $darker-primary-color;
}
}
.bottom-shadow {
padding-bottom: $vertical-spacer;
box-shadow: 0 1px 0 $secondary-color;
}
.about {
img {
width: 100%;
}
}
@include susy-breakpoint($wide, $wideLayout) {
.about {
@include span(6);
}
}
@include susy-breakpoint($narrow, $narrowLayout) {
.about {
@include span(1);
}
} | 4 | 0.085106 | 4 | 0 |
51247ce0a67e4154b1ba24ed48f758a6c6fc6c18 | templates/mixins/rows.jade | templates/mixins/rows.jade | include columns
mixin row(list, colums, item)
tr(id=item.id)
if !list.get('nodelete') && item.id !== user.id
td.control: a(href='/keystone/' + list.path + '?delete=' + item.id + csrf_query).control-delete
else if !list.get('nodelete')
td.control
if sortable
td.control: a(href=js).control-sort
each col, i in columns
td
+column(list, col, item)
| include columns
mixin row(list, colums, item)
tr(id=item.id)
if !list.get('nodelete') && item.id !== user.id
td.control: a(href='/keystone/' + list.path + '?delete=' + item.id + csrf_query).control-delete
else if !list.get('nodelete')
td.control
if sortable
td.control: a(href=js).control-sort
each col, i in columns
td(style=list.style && typeof list.style === 'function' ? list.style(list, col, item) : '')
+column(list, col, item)
| Allow model to specify style for each list item. | Allow model to specify style for each list item.
| Jade | mit | frontyard/keystone,frontyard/keystone,frontyard/keystone | jade | ## Code Before:
include columns
mixin row(list, colums, item)
tr(id=item.id)
if !list.get('nodelete') && item.id !== user.id
td.control: a(href='/keystone/' + list.path + '?delete=' + item.id + csrf_query).control-delete
else if !list.get('nodelete')
td.control
if sortable
td.control: a(href=js).control-sort
each col, i in columns
td
+column(list, col, item)
## Instruction:
Allow model to specify style for each list item.
## Code After:
include columns
mixin row(list, colums, item)
tr(id=item.id)
if !list.get('nodelete') && item.id !== user.id
td.control: a(href='/keystone/' + list.path + '?delete=' + item.id + csrf_query).control-delete
else if !list.get('nodelete')
td.control
if sortable
td.control: a(href=js).control-sort
each col, i in columns
td(style=list.style && typeof list.style === 'function' ? list.style(list, col, item) : '')
+column(list, col, item)
| include columns
mixin row(list, colums, item)
tr(id=item.id)
if !list.get('nodelete') && item.id !== user.id
td.control: a(href='/keystone/' + list.path + '?delete=' + item.id + csrf_query).control-delete
else if !list.get('nodelete')
td.control
if sortable
td.control: a(href=js).control-sort
each col, i in columns
- td
+ td(style=list.style && typeof list.style === 'function' ? list.style(list, col, item) : '')
+column(list, col, item) | 2 | 0.153846 | 1 | 1 |
6bd7c5f22f53d8cb7423b438a627a11b4980c3b9 | strawberry_notes/build_gdal.sh | strawberry_notes/build_gdal.sh | export ST_PERL=/c/berrybrew/5.24.0_64_PDL
export GDAL_ROOT=/c/gdal_builds/gdal-2.1.2
export PATH=${ST_PERL}/c/bin:${ST_PERL}/perl/bin:${GDAL_ROOT}:${PATH}
export LIBRARY_PATH=${ST_PERL}/perl/lib/CORE:${ST_PERL}/c/lib:${GDAL_ROOT}
export CPATH=${ST_PERL}/c/include:${ST_PERL}/perl/lib/CORE:${GDAL_ROOT}/port:${GDAL_ROOT}/gcore:${GDAL_ROOT}/ogr:${GDAL_ROOT}/alg:${GDAL_ROOT}/apps
cd ${GDAL_ROOT}
./configure --with-curl=no
make -j4
cd -
| export ST_PERL=/c/berrybrew/5.24.0_64_PDL
export GDAL_ROOT=/c/gdal_builds/gdal-2.1.2
export PATH=${ST_PERL}/c/bin:${ST_PERL}/perl/bin:${GDAL_ROOT}:${PATH}
export LIBRARY_PATH=${ST_PERL}/perl/lib/CORE:${ST_PERL}/c/lib:${GDAL_ROOT}
export CPATH=${ST_PERL}/c/include:${ST_PERL}/perl/lib/CORE:${GDAL_ROOT}/port:${GDAL_ROOT}/gcore:${GDAL_ROOT}/ogr:${GDAL_ROOT}/alg:${GDAL_ROOT}/apps
cd ${GDAL_ROOT}
# curl causes issues in the Geo::GDAL build - prob just needs extra library paths to be added above
./configure --with-curl=no
make -j4
cd -
| Add comment to clarify argument | Add comment to clarify argument
| Shell | artistic-2.0 | shawnlaffan/bd_travis_experiment,shawnlaffan/bd_travis_experiment | shell | ## Code Before:
export ST_PERL=/c/berrybrew/5.24.0_64_PDL
export GDAL_ROOT=/c/gdal_builds/gdal-2.1.2
export PATH=${ST_PERL}/c/bin:${ST_PERL}/perl/bin:${GDAL_ROOT}:${PATH}
export LIBRARY_PATH=${ST_PERL}/perl/lib/CORE:${ST_PERL}/c/lib:${GDAL_ROOT}
export CPATH=${ST_PERL}/c/include:${ST_PERL}/perl/lib/CORE:${GDAL_ROOT}/port:${GDAL_ROOT}/gcore:${GDAL_ROOT}/ogr:${GDAL_ROOT}/alg:${GDAL_ROOT}/apps
cd ${GDAL_ROOT}
./configure --with-curl=no
make -j4
cd -
## Instruction:
Add comment to clarify argument
## Code After:
export ST_PERL=/c/berrybrew/5.24.0_64_PDL
export GDAL_ROOT=/c/gdal_builds/gdal-2.1.2
export PATH=${ST_PERL}/c/bin:${ST_PERL}/perl/bin:${GDAL_ROOT}:${PATH}
export LIBRARY_PATH=${ST_PERL}/perl/lib/CORE:${ST_PERL}/c/lib:${GDAL_ROOT}
export CPATH=${ST_PERL}/c/include:${ST_PERL}/perl/lib/CORE:${GDAL_ROOT}/port:${GDAL_ROOT}/gcore:${GDAL_ROOT}/ogr:${GDAL_ROOT}/alg:${GDAL_ROOT}/apps
cd ${GDAL_ROOT}
# curl causes issues in the Geo::GDAL build - prob just needs extra library paths to be added above
./configure --with-curl=no
make -j4
cd -
| export ST_PERL=/c/berrybrew/5.24.0_64_PDL
export GDAL_ROOT=/c/gdal_builds/gdal-2.1.2
export PATH=${ST_PERL}/c/bin:${ST_PERL}/perl/bin:${GDAL_ROOT}:${PATH}
export LIBRARY_PATH=${ST_PERL}/perl/lib/CORE:${ST_PERL}/c/lib:${GDAL_ROOT}
export CPATH=${ST_PERL}/c/include:${ST_PERL}/perl/lib/CORE:${GDAL_ROOT}/port:${GDAL_ROOT}/gcore:${GDAL_ROOT}/ogr:${GDAL_ROOT}/alg:${GDAL_ROOT}/apps
cd ${GDAL_ROOT}
+ # curl causes issues in the Geo::GDAL build - prob just needs extra library paths to be added above
./configure --with-curl=no
make -j4
cd - | 1 | 0.111111 | 1 | 0 |
e1e181fad1a73e9dee38a2bd74518e1b8d446930 | src/test/fuzz/kitchen_sink.cpp | src/test/fuzz/kitchen_sink.cpp | // Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
(void)TransactionErrorString(transaction_error);
}
| // Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <rpc/util.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
(void)JSONRPCTransactionError(transaction_error);
(void)RPCErrorFromTransactionError(transaction_error);
(void)TransactionErrorString(transaction_error);
}
| Add fuzzing coverage for JSONRPCTransactionError(...) and RPCErrorFromTransactionError(...) | tests: Add fuzzing coverage for JSONRPCTransactionError(...) and RPCErrorFromTransactionError(...)
| C++ | mit | rnicoll/bitcoin,practicalswift/bitcoin,particl/particl-core,fanquake/bitcoin,instagibbs/bitcoin,EthanHeilman/bitcoin,jlopp/statoshi,pataquets/namecoin-core,yenliangl/bitcoin,EthanHeilman/bitcoin,alecalve/bitcoin,bitcoinsSG/bitcoin,domob1812/bitcoin,EthanHeilman/bitcoin,GroestlCoin/bitcoin,mm-s/bitcoin,midnightmagic/bitcoin,kallewoof/bitcoin,GroestlCoin/GroestlCoin,namecoin/namecoin-core,alecalve/bitcoin,andreaskern/bitcoin,jlopp/statoshi,instagibbs/bitcoin,dscotese/bitcoin,AkioNak/bitcoin,mruddy/bitcoin,dscotese/bitcoin,AkioNak/bitcoin,fujicoin/fujicoin,JeremyRubin/bitcoin,achow101/bitcoin,apoelstra/bitcoin,bitcoinknots/bitcoin,bitcoin/bitcoin,sipsorcery/bitcoin,particl/particl-core,GroestlCoin/bitcoin,Xekyo/bitcoin,qtumproject/qtum,GroestlCoin/bitcoin,practicalswift/bitcoin,Sjors/bitcoin,instagibbs/bitcoin,apoelstra/bitcoin,jonasschnelli/bitcoin,midnightmagic/bitcoin,rnicoll/bitcoin,particl/particl-core,jamesob/bitcoin,cdecker/bitcoin,bitcoin/bitcoin,apoelstra/bitcoin,GroestlCoin/GroestlCoin,prusnak/bitcoin,sstone/bitcoin,andreaskern/bitcoin,MarcoFalke/bitcoin,domob1812/namecore,jambolo/bitcoin,rnicoll/dogecoin,jlopp/statoshi,jambolo/bitcoin,alecalve/bitcoin,bitcoinsSG/bitcoin,jamesob/bitcoin,qtumproject/qtum,achow101/bitcoin,jambolo/bitcoin,namecoin/namecore,kallewoof/bitcoin,dscotese/bitcoin,andreaskern/bitcoin,EthanHeilman/bitcoin,pstratem/bitcoin,practicalswift/bitcoin,qtumproject/qtum,jnewbery/bitcoin,n1bor/bitcoin,sstone/bitcoin,domob1812/bitcoin,practicalswift/bitcoin,jlopp/statoshi,MarcoFalke/bitcoin,fanquake/bitcoin,domob1812/namecore,litecoin-project/litecoin,tecnovert/particl-core,midnightmagic/bitcoin,ajtowns/bitcoin,jnewbery/bitcoin,bitcoin/bitcoin,lateminer/bitcoin,mruddy/bitcoin,pstratem/bitcoin,bitcoinsSG/bitcoin,qtumproject/qtum,apoelstra/bitcoin,litecoin-project/litecoin,mm-s/bitcoin,bitcoinknots/bitcoin,MarcoFalke/bitcoin,bitcoinsSG/bitcoin,kallewoof/bitcoin,rnicoll/dogecoin,AkioNak/bitcoin,fujicoin/fujicoin,achow101/bitcoin,ajtowns/bitcoin,qtumproject/qtum,sipsorcery/bitcoin,domob1812/namecore,practicalswift/bitcoin,Xekyo/bitcoin,n1bor/bitcoin,ajtowns/bitcoin,GroestlCoin/bitcoin,cdecker/bitcoin,sstone/bitcoin,MarcoFalke/bitcoin,n1bor/bitcoin,yenliangl/bitcoin,ElementsProject/elements,achow101/bitcoin,MeshCollider/bitcoin,jnewbery/bitcoin,domob1812/namecore,pstratem/bitcoin,alecalve/bitcoin,ElementsProject/elements,rnicoll/bitcoin,lateminer/bitcoin,bitcoinsSG/bitcoin,ajtowns/bitcoin,yenliangl/bitcoin,yenliangl/bitcoin,andreaskern/bitcoin,litecoin-project/litecoin,pataquets/namecoin-core,sipsorcery/bitcoin,namecoin/namecoin-core,bitcoin/bitcoin,MarcoFalke/bitcoin,yenliangl/bitcoin,bitcoin/bitcoin,ElementsProject/elements,mruddy/bitcoin,yenliangl/bitcoin,anditto/bitcoin,JeremyRubin/bitcoin,sstone/bitcoin,cdecker/bitcoin,domob1812/namecore,Xekyo/bitcoin,achow101/bitcoin,bitcoinsSG/bitcoin,namecoin/namecoin-core,GroestlCoin/GroestlCoin,MeshCollider/bitcoin,fujicoin/fujicoin,prusnak/bitcoin,lateminer/bitcoin,domob1812/namecore,particl/particl-core,cdecker/bitcoin,particl/particl-core,namecoin/namecore,n1bor/bitcoin,instagibbs/bitcoin,MeshCollider/bitcoin,anditto/bitcoin,ElementsProject/elements,ElementsProject/elements,domob1812/bitcoin,namecoin/namecore,GroestlCoin/bitcoin,sipsorcery/bitcoin,Sjors/bitcoin,jonasschnelli/bitcoin,litecoin-project/litecoin,mm-s/bitcoin,mm-s/bitcoin,fanquake/bitcoin,prusnak/bitcoin,jamesob/bitcoin,domob1812/bitcoin,jonasschnelli/bitcoin,namecoin/namecore,lateminer/bitcoin,andreaskern/bitcoin,MarcoFalke/bitcoin,rnicoll/bitcoin,fanquake/bitcoin,midnightmagic/bitcoin,fanquake/bitcoin,cdecker/bitcoin,GroestlCoin/GroestlCoin,mruddy/bitcoin,prusnak/bitcoin,JeremyRubin/bitcoin,ajtowns/bitcoin,Xekyo/bitcoin,MeshCollider/bitcoin,n1bor/bitcoin,jambolo/bitcoin,bitcoinknots/bitcoin,jamesob/bitcoin,mruddy/bitcoin,namecoin/namecoin-core,Sjors/bitcoin,ElementsProject/elements,litecoin-project/litecoin,alecalve/bitcoin,sstone/bitcoin,namecoin/namecoin-core,qtumproject/qtum,midnightmagic/bitcoin,EthanHeilman/bitcoin,JeremyRubin/bitcoin,tecnovert/particl-core,sipsorcery/bitcoin,prusnak/bitcoin,rnicoll/dogecoin,lateminer/bitcoin,GroestlCoin/GroestlCoin,JeremyRubin/bitcoin,pataquets/namecoin-core,tecnovert/particl-core,fanquake/bitcoin,AkioNak/bitcoin,rnicoll/dogecoin,anditto/bitcoin,mm-s/bitcoin,practicalswift/bitcoin,MeshCollider/bitcoin,rnicoll/bitcoin,midnightmagic/bitcoin,EthanHeilman/bitcoin,apoelstra/bitcoin,Xekyo/bitcoin,pstratem/bitcoin,jonasschnelli/bitcoin,tecnovert/particl-core,Sjors/bitcoin,instagibbs/bitcoin,lateminer/bitcoin,achow101/bitcoin,mruddy/bitcoin,JeremyRubin/bitcoin,bitcoin/bitcoin,mm-s/bitcoin,anditto/bitcoin,pataquets/namecoin-core,jlopp/statoshi,jambolo/bitcoin,GroestlCoin/GroestlCoin,kallewoof/bitcoin,jonasschnelli/bitcoin,dscotese/bitcoin,pataquets/namecoin-core,MeshCollider/bitcoin,AkioNak/bitcoin,jamesob/bitcoin,instagibbs/bitcoin,litecoin-project/litecoin,tecnovert/particl-core,anditto/bitcoin,Xekyo/bitcoin,rnicoll/dogecoin,sipsorcery/bitcoin,particl/particl-core,fujicoin/fujicoin,apoelstra/bitcoin,kallewoof/bitcoin,pstratem/bitcoin,Sjors/bitcoin,jamesob/bitcoin,fujicoin/fujicoin,namecoin/namecoin-core,tecnovert/particl-core,prusnak/bitcoin,bitcoinknots/bitcoin,kallewoof/bitcoin,jlopp/statoshi,ajtowns/bitcoin,n1bor/bitcoin,andreaskern/bitcoin,fujicoin/fujicoin,AkioNak/bitcoin,sstone/bitcoin,namecoin/namecore,rnicoll/bitcoin,qtumproject/qtum,alecalve/bitcoin,dscotese/bitcoin,namecoin/namecore,anditto/bitcoin,jnewbery/bitcoin,cdecker/bitcoin,jambolo/bitcoin,bitcoinknots/bitcoin,GroestlCoin/bitcoin,domob1812/bitcoin,jnewbery/bitcoin,pataquets/namecoin-core,pstratem/bitcoin,dscotese/bitcoin,domob1812/bitcoin | c++ | ## Code Before:
// Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
(void)TransactionErrorString(transaction_error);
}
## Instruction:
tests: Add fuzzing coverage for JSONRPCTransactionError(...) and RPCErrorFromTransactionError(...)
## Code After:
// Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <rpc/util.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
(void)JSONRPCTransactionError(transaction_error);
(void)RPCErrorFromTransactionError(transaction_error);
(void)TransactionErrorString(transaction_error);
}
| // Copyright (c) 2020 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+ #include <rpc/util.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
#include <util/error.h>
#include <cstdint>
#include <vector>
// The fuzzing kitchen sink: Fuzzing harness for functions that need to be
// fuzzed but a.) don't belong in any existing fuzzing harness file, and
// b.) are not important enough to warrant their own fuzzing harness file.
void test_one_input(const std::vector<uint8_t>& buffer)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const TransactionError transaction_error = fuzzed_data_provider.PickValueInArray<TransactionError>({TransactionError::OK, TransactionError::MISSING_INPUTS, TransactionError::ALREADY_IN_CHAIN, TransactionError::P2P_DISABLED, TransactionError::MEMPOOL_REJECTED, TransactionError::MEMPOOL_ERROR, TransactionError::INVALID_PSBT, TransactionError::PSBT_MISMATCH, TransactionError::SIGHASH_MISMATCH, TransactionError::MAX_FEE_EXCEEDED});
+ (void)JSONRPCTransactionError(transaction_error);
+ (void)RPCErrorFromTransactionError(transaction_error);
(void)TransactionErrorString(transaction_error);
} | 3 | 0.136364 | 3 | 0 |
53c8131650f95c5a64586c05eead9e859d96278d | application/common/models/EventLog.php | application/common/models/EventLog.php | <?php
namespace common\models;
use common\helpers\Utils;
use yii\helpers\ArrayHelper;
use yii\helpers\Json;
class EventLog extends EventLogBase
{
/**
* @return array
*/
public function rules()
{
return ArrayHelper::merge(
[
[
['created'], 'default', 'value' => Utils::getDatetime(),
],
],
parent::rules()
);
}
/**
* Create new EventLog entry
* @param string $topic
* @param string|array $details
* @param integer|null $userId
* @throws \Exception
*/
public static function log($topic, $details, $userId = null)
{
$eventLog = new EventLog();
$eventLog->user_id = $userId;
$eventLog->topic = $topic;
$eventLog->details = is_array($details) ? Json::encode($details) : $details;
/*
* Save event to LogEntries
*/
try {
$user = User::findOne(['id' => $userId]);
if ($user !== null) {
\Yii::warning([
'action' => 'eventlog',
'user' => $user->email,
'topic' => $topic,
'details' => $details,
]);
}
} catch (\Exception $ex) {
}
if ( ! $eventLog->save()) {
throw new \Exception('Unable to save event log entry', 1461182172);
}
}
} | <?php
namespace common\models;
use common\helpers\Utils;
use yii\helpers\ArrayHelper;
use yii\helpers\Json;
class EventLog extends EventLogBase
{
/**
* @return array
*/
public function rules()
{
return ArrayHelper::merge(
[
[
['created'], 'default', 'value' => Utils::getDatetime(),
],
],
parent::rules()
);
}
/**
* Create new EventLog entry
* @param string $topic
* @param string|array $details
* @param integer|null $userId
* @throws \Exception
*/
public static function log($topic, $details, $userId = null)
{
$eventLog = new EventLog();
$eventLog->user_id = $userId;
$eventLog->topic = $topic;
$eventLog->details = is_array($details) ? Json::encode($details) : $details;
/*
* Save event to LogEntries
*/
try {
$user = User::findOne(['id' => $userId]);
if ($user !== null) {
\Yii::warning([
'action' => 'eventlog',
'user' => $user->email,
'topic' => $topic,
'details' => $details,
]);
}
} catch (\Exception $ex) {
/*
* ignore exception to continue execution in this function
*/
}
if ( ! $eventLog->save()) {
throw new \Exception('Unable to save event log entry', 1461182172);
}
}
} | Address Scrutinizer issue on empty catch block. | Address Scrutinizer issue on empty catch block.
| PHP | mit | silinternational/idp-pw-api,silinternational/idp-pw-api | php | ## Code Before:
<?php
namespace common\models;
use common\helpers\Utils;
use yii\helpers\ArrayHelper;
use yii\helpers\Json;
class EventLog extends EventLogBase
{
/**
* @return array
*/
public function rules()
{
return ArrayHelper::merge(
[
[
['created'], 'default', 'value' => Utils::getDatetime(),
],
],
parent::rules()
);
}
/**
* Create new EventLog entry
* @param string $topic
* @param string|array $details
* @param integer|null $userId
* @throws \Exception
*/
public static function log($topic, $details, $userId = null)
{
$eventLog = new EventLog();
$eventLog->user_id = $userId;
$eventLog->topic = $topic;
$eventLog->details = is_array($details) ? Json::encode($details) : $details;
/*
* Save event to LogEntries
*/
try {
$user = User::findOne(['id' => $userId]);
if ($user !== null) {
\Yii::warning([
'action' => 'eventlog',
'user' => $user->email,
'topic' => $topic,
'details' => $details,
]);
}
} catch (\Exception $ex) {
}
if ( ! $eventLog->save()) {
throw new \Exception('Unable to save event log entry', 1461182172);
}
}
}
## Instruction:
Address Scrutinizer issue on empty catch block.
## Code After:
<?php
namespace common\models;
use common\helpers\Utils;
use yii\helpers\ArrayHelper;
use yii\helpers\Json;
class EventLog extends EventLogBase
{
/**
* @return array
*/
public function rules()
{
return ArrayHelper::merge(
[
[
['created'], 'default', 'value' => Utils::getDatetime(),
],
],
parent::rules()
);
}
/**
* Create new EventLog entry
* @param string $topic
* @param string|array $details
* @param integer|null $userId
* @throws \Exception
*/
public static function log($topic, $details, $userId = null)
{
$eventLog = new EventLog();
$eventLog->user_id = $userId;
$eventLog->topic = $topic;
$eventLog->details = is_array($details) ? Json::encode($details) : $details;
/*
* Save event to LogEntries
*/
try {
$user = User::findOne(['id' => $userId]);
if ($user !== null) {
\Yii::warning([
'action' => 'eventlog',
'user' => $user->email,
'topic' => $topic,
'details' => $details,
]);
}
} catch (\Exception $ex) {
/*
* ignore exception to continue execution in this function
*/
}
if ( ! $eventLog->save()) {
throw new \Exception('Unable to save event log entry', 1461182172);
}
}
} | <?php
namespace common\models;
use common\helpers\Utils;
use yii\helpers\ArrayHelper;
use yii\helpers\Json;
class EventLog extends EventLogBase
{
/**
* @return array
*/
public function rules()
{
return ArrayHelper::merge(
[
[
['created'], 'default', 'value' => Utils::getDatetime(),
],
],
parent::rules()
);
}
/**
* Create new EventLog entry
* @param string $topic
* @param string|array $details
* @param integer|null $userId
* @throws \Exception
*/
public static function log($topic, $details, $userId = null)
{
$eventLog = new EventLog();
$eventLog->user_id = $userId;
$eventLog->topic = $topic;
$eventLog->details = is_array($details) ? Json::encode($details) : $details;
/*
* Save event to LogEntries
*/
try {
$user = User::findOne(['id' => $userId]);
if ($user !== null) {
\Yii::warning([
'action' => 'eventlog',
'user' => $user->email,
'topic' => $topic,
'details' => $details,
]);
}
} catch (\Exception $ex) {
-
+ /*
+ * ignore exception to continue execution in this function
+ */
}
if ( ! $eventLog->save()) {
throw new \Exception('Unable to save event log entry', 1461182172);
}
}
} | 4 | 0.063492 | 3 | 1 |
523c5e633f94a1d0f889798ee4fde4b07c233f05 | src/Kaloa/Util/TypeSafety/TypeSafetyTrait.php | src/Kaloa/Util/TypeSafety/TypeSafetyTrait.php | <?php
namespace Kaloa\Util\TypeSafety;
use IllegalArgumentException;
trait TypeSafetyTrait
{
/**
* @param string $types
* @param array $args
*/
private function ensure($types, array $args)
{
if (!is_string($types)) {
throw new IllegalArgumentException('string expected');
}
$cnt = count($args);
if (strlen($types) !== $cnt) {
throw new IllegalArgumentException('type count does not match argument count');
}
for ($i = 0; $i < $cnt; $i++) {
switch ($types[$i]) {
case 'b':
if (!is_bool($args[$i])) {
throw new IllegalArgumentException('bool expected');
}
break;
case 'f':
if (!is_float($args[$i])) {
throw new IllegalArgumentException('float expected');
}
break;
case 'i':
if (!is_int($args[$i])) {
throw new IllegalArgumentException('int expected');
}
break;
case 'r':
if (!is_resource($args[$i])) {
throw new IllegalArgumentException('resource expected');
}
break;
case 's':
if (!is_string($args[$i])) {
throw new IllegalArgumentException('string expected');
}
break;
case '-':
/* skip */
break;
default:
throw new IllegalArgumentException('Unknown type at offset ' . $i . '. One of [bfirs-] expected');
break;
}
}
}
}
| <?php
namespace Kaloa\Util\TypeSafety;
use IllegalArgumentException;
trait TypeSafetyTrait
{
/**
* @param string $types
* @param array $args
*/
private function ensure($types, array $args)
{
if (!is_string($types)) {
throw new IllegalArgumentException('Type list must be of type string');
}
$cnt = count($args);
if (strlen($types) !== $cnt) {
throw new IllegalArgumentException('Type list length does not match argument count');
}
$i = 0;
foreach ($args as $arg) {
switch ($types[$i]) {
case 'b':
if (!is_bool($arg)) {
throw new IllegalArgumentException('bool expected');
}
break;
case 'f':
if (!is_float($arg)) {
throw new IllegalArgumentException('float expected');
}
break;
case 'i':
if (!is_int($arg)) {
throw new IllegalArgumentException('int expected');
}
break;
case 'r':
if (!is_resource($arg)) {
throw new IllegalArgumentException('resource expected');
}
break;
case 's':
if (!is_string($arg)) {
throw new IllegalArgumentException('string expected');
}
break;
case '-':
/* skip */
break;
default:
throw new IllegalArgumentException('Unknown type at offset ' . $i . '. One of [bfirs-] expected');
break;
}
$i++;
}
}
}
| Support non-zero-indexed arrays in ensure(). Improve phrasing of Exception messages | TypeSafety: Support non-zero-indexed arrays in ensure(). Improve phrasing of Exception messages
| PHP | mit | mermshaus/kaloa-util | php | ## Code Before:
<?php
namespace Kaloa\Util\TypeSafety;
use IllegalArgumentException;
trait TypeSafetyTrait
{
/**
* @param string $types
* @param array $args
*/
private function ensure($types, array $args)
{
if (!is_string($types)) {
throw new IllegalArgumentException('string expected');
}
$cnt = count($args);
if (strlen($types) !== $cnt) {
throw new IllegalArgumentException('type count does not match argument count');
}
for ($i = 0; $i < $cnt; $i++) {
switch ($types[$i]) {
case 'b':
if (!is_bool($args[$i])) {
throw new IllegalArgumentException('bool expected');
}
break;
case 'f':
if (!is_float($args[$i])) {
throw new IllegalArgumentException('float expected');
}
break;
case 'i':
if (!is_int($args[$i])) {
throw new IllegalArgumentException('int expected');
}
break;
case 'r':
if (!is_resource($args[$i])) {
throw new IllegalArgumentException('resource expected');
}
break;
case 's':
if (!is_string($args[$i])) {
throw new IllegalArgumentException('string expected');
}
break;
case '-':
/* skip */
break;
default:
throw new IllegalArgumentException('Unknown type at offset ' . $i . '. One of [bfirs-] expected');
break;
}
}
}
}
## Instruction:
TypeSafety: Support non-zero-indexed arrays in ensure(). Improve phrasing of Exception messages
## Code After:
<?php
namespace Kaloa\Util\TypeSafety;
use IllegalArgumentException;
trait TypeSafetyTrait
{
/**
* @param string $types
* @param array $args
*/
private function ensure($types, array $args)
{
if (!is_string($types)) {
throw new IllegalArgumentException('Type list must be of type string');
}
$cnt = count($args);
if (strlen($types) !== $cnt) {
throw new IllegalArgumentException('Type list length does not match argument count');
}
$i = 0;
foreach ($args as $arg) {
switch ($types[$i]) {
case 'b':
if (!is_bool($arg)) {
throw new IllegalArgumentException('bool expected');
}
break;
case 'f':
if (!is_float($arg)) {
throw new IllegalArgumentException('float expected');
}
break;
case 'i':
if (!is_int($arg)) {
throw new IllegalArgumentException('int expected');
}
break;
case 'r':
if (!is_resource($arg)) {
throw new IllegalArgumentException('resource expected');
}
break;
case 's':
if (!is_string($arg)) {
throw new IllegalArgumentException('string expected');
}
break;
case '-':
/* skip */
break;
default:
throw new IllegalArgumentException('Unknown type at offset ' . $i . '. One of [bfirs-] expected');
break;
}
$i++;
}
}
}
| <?php
namespace Kaloa\Util\TypeSafety;
use IllegalArgumentException;
trait TypeSafetyTrait
{
/**
* @param string $types
* @param array $args
*/
private function ensure($types, array $args)
{
if (!is_string($types)) {
- throw new IllegalArgumentException('string expected');
? ---------
+ throw new IllegalArgumentException('Type list must be of type string');
? ++++++++++++++++++++++++++
}
$cnt = count($args);
if (strlen($types) !== $cnt) {
- throw new IllegalArgumentException('type count does not match argument count');
? ^ ^^^
+ throw new IllegalArgumentException('Type list length does not match argument count');
? ^ ^^^^^^^ + +
}
- for ($i = 0; $i < $cnt; $i++) {
+ $i = 0;
+
+ foreach ($args as $arg) {
switch ($types[$i]) {
case 'b':
- if (!is_bool($args[$i])) {
? -----
+ if (!is_bool($arg)) {
throw new IllegalArgumentException('bool expected');
}
break;
case 'f':
- if (!is_float($args[$i])) {
? -----
+ if (!is_float($arg)) {
throw new IllegalArgumentException('float expected');
}
break;
case 'i':
- if (!is_int($args[$i])) {
? -----
+ if (!is_int($arg)) {
throw new IllegalArgumentException('int expected');
}
break;
case 'r':
- if (!is_resource($args[$i])) {
? -----
+ if (!is_resource($arg)) {
throw new IllegalArgumentException('resource expected');
}
break;
case 's':
- if (!is_string($args[$i])) {
? -----
+ if (!is_string($arg)) {
throw new IllegalArgumentException('string expected');
}
break;
case '-':
/* skip */
break;
default:
throw new IllegalArgumentException('Unknown type at offset ' . $i . '. One of [bfirs-] expected');
break;
}
+
+ $i++;
}
}
} | 20 | 0.298507 | 12 | 8 |
15146344826a9d72ac1c018cb72de35f0059bebd | README.md | README.md | YTemplater
==========
[](https://travis-ci.org/orionhealth/ytemplater)
Node.js utility for precompiling templates for use with YUI's Y.Template.
## Work in Progress
Still working towards an 0.1.0 release. See the [Path to 0.1.0](https://github.com/orionhealth/ytemplater/issues/1) for a list of what's left to do.
## Building
YTemplater is built with [gulp.js](http://gulpjs.com/).
First, install the `gulp` CLI:
$ npm install -g gulp
Run `gulp` to lint, test and watch for changes:
$ gulp
## License
Copyright (c) 2014 Orion Health MIT License (enclosed)
| YTemplater
==========
[](https://travis-ci.org/orionhealth/ytemplater)
[](https://gemnasium.com/orionhealth/ytemplater)
Node.js utility for precompiling templates for use with YUI's Y.Template.
## Work in Progress
Still working towards an 0.1.0 release. See the [Path to 0.1.0](https://github.com/orionhealth/ytemplater/issues/1) for a list of what's left to do.
## Building
YTemplater is built with [gulp.js](http://gulpjs.com/).
First, install the `gulp` CLI:
$ npm install -g gulp
Run `gulp` to lint, test and watch for changes:
$ gulp
## License
Copyright (c) 2014 Orion Health MIT License (enclosed)
| Add dependency status badge with gemnasium. | Add dependency status badge with gemnasium.
| Markdown | mit | orionhealth/ytemplater | markdown | ## Code Before:
YTemplater
==========
[](https://travis-ci.org/orionhealth/ytemplater)
Node.js utility for precompiling templates for use with YUI's Y.Template.
## Work in Progress
Still working towards an 0.1.0 release. See the [Path to 0.1.0](https://github.com/orionhealth/ytemplater/issues/1) for a list of what's left to do.
## Building
YTemplater is built with [gulp.js](http://gulpjs.com/).
First, install the `gulp` CLI:
$ npm install -g gulp
Run `gulp` to lint, test and watch for changes:
$ gulp
## License
Copyright (c) 2014 Orion Health MIT License (enclosed)
## Instruction:
Add dependency status badge with gemnasium.
## Code After:
YTemplater
==========
[](https://travis-ci.org/orionhealth/ytemplater)
[](https://gemnasium.com/orionhealth/ytemplater)
Node.js utility for precompiling templates for use with YUI's Y.Template.
## Work in Progress
Still working towards an 0.1.0 release. See the [Path to 0.1.0](https://github.com/orionhealth/ytemplater/issues/1) for a list of what's left to do.
## Building
YTemplater is built with [gulp.js](http://gulpjs.com/).
First, install the `gulp` CLI:
$ npm install -g gulp
Run `gulp` to lint, test and watch for changes:
$ gulp
## License
Copyright (c) 2014 Orion Health MIT License (enclosed)
| YTemplater
==========
[](https://travis-ci.org/orionhealth/ytemplater)
+ [](https://gemnasium.com/orionhealth/ytemplater)
Node.js utility for precompiling templates for use with YUI's Y.Template.
## Work in Progress
Still working towards an 0.1.0 release. See the [Path to 0.1.0](https://github.com/orionhealth/ytemplater/issues/1) for a list of what's left to do.
## Building
YTemplater is built with [gulp.js](http://gulpjs.com/).
First, install the `gulp` CLI:
$ npm install -g gulp
Run `gulp` to lint, test and watch for changes:
$ gulp
## License
Copyright (c) 2014 Orion Health MIT License (enclosed) | 1 | 0.037037 | 1 | 0 |
5cf6a87ae2ef0ac6ea91cd0fbc8d4e0ac3f55b82 | vp_to_ki.rb | vp_to_ki.rb |
require 'rubygems'
require 'nokogiri'
require 'erubis'
require 'lib/state'
require 'lib/transition'
require 'lib/printer'
if ARGV.size < 1
puts "Usage: #{$0} XML-FILE"
exit
end
File.open(ARGV[0]) do |file|
$doc = Nokogiri::XML(file)
$project_name = $doc.>('Project').first['name']
root_state = State.new($doc.>('Project').first, nil, 0) # recursively builds state tree
Transition.find_transitions
Printer.print_statechart(root_state)
end
|
require 'rubygems'
require 'nokogiri'
require 'erubis'
require_relative 'lib/state'
require_relative 'lib/transition'
require_relative 'lib/printer'
if ARGV.size < 1
puts "Usage: #{$0} XML-FILE"
exit
end
File.open(ARGV[0]) do |file|
$doc = Nokogiri::XML(file)
$project_name = $doc.>('Project').first['name']
root_state = State.new($doc.>('Project').first, nil, 0) # recursively builds state tree
Transition.find_transitions
Printer.print_statechart(root_state)
end
| Use require_relative for Ruby 1.9 (no more 1.8!) | Use require_relative for Ruby 1.9 (no more 1.8!) | Ruby | mit | noklesta/vp_to_ki | ruby | ## Code Before:
require 'rubygems'
require 'nokogiri'
require 'erubis'
require 'lib/state'
require 'lib/transition'
require 'lib/printer'
if ARGV.size < 1
puts "Usage: #{$0} XML-FILE"
exit
end
File.open(ARGV[0]) do |file|
$doc = Nokogiri::XML(file)
$project_name = $doc.>('Project').first['name']
root_state = State.new($doc.>('Project').first, nil, 0) # recursively builds state tree
Transition.find_transitions
Printer.print_statechart(root_state)
end
## Instruction:
Use require_relative for Ruby 1.9 (no more 1.8!)
## Code After:
require 'rubygems'
require 'nokogiri'
require 'erubis'
require_relative 'lib/state'
require_relative 'lib/transition'
require_relative 'lib/printer'
if ARGV.size < 1
puts "Usage: #{$0} XML-FILE"
exit
end
File.open(ARGV[0]) do |file|
$doc = Nokogiri::XML(file)
$project_name = $doc.>('Project').first['name']
root_state = State.new($doc.>('Project').first, nil, 0) # recursively builds state tree
Transition.find_transitions
Printer.print_statechart(root_state)
end
|
require 'rubygems'
require 'nokogiri'
require 'erubis'
- require 'lib/state'
+ require_relative 'lib/state'
? +++++++++
- require 'lib/transition'
+ require_relative 'lib/transition'
? +++++++++
- require 'lib/printer'
+ require_relative 'lib/printer'
? +++++++++
if ARGV.size < 1
puts "Usage: #{$0} XML-FILE"
exit
end
File.open(ARGV[0]) do |file|
$doc = Nokogiri::XML(file)
$project_name = $doc.>('Project').first['name']
root_state = State.new($doc.>('Project').first, nil, 0) # recursively builds state tree
Transition.find_transitions
Printer.print_statechart(root_state)
end
| 6 | 0.272727 | 3 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.