commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 5 4.84k | subject stringlengths 15 778 | message stringlengths 16 6.86k | lang stringlengths 1 30 | license stringclasses 13
values | repos stringlengths 5 116k | config stringlengths 1 30 | content stringlengths 105 8.72k |
|---|---|---|---|---|---|---|---|---|---|---|---|
daa89751125bd9d00502f80fbae96fcd032092e2 | webpack.config.js | webpack.config.js | var version = require('./package.json').version;
module.exports = {
entry: './lib',
output: {
filename: './dist/index.js',
library: ['jupyter', 'services'],
libraryTarget: 'umd',
publicPath: 'https://npmcdn.com/jupyter-js-services@' + version + '/dist/'
},
devtool: 'sour... | var version = require('./package.json').version;
module.exports = {
entry: './lib',
output: {
filename: './dist/index.js',
library: 'jupyter-js-services',
libraryTarget: 'umd',
umdNamedDefine: true,
publicPath: 'https://npmcdn.com/jupyter-js-services@' + version + '/dist... | Unify the library name and export the amd name | Unify the library name and export the amd name
| JavaScript | bsd-3-clause | jupyterlab/services,blink1073/jupyter-js-services,blink1073/services,jupyterlab/services,jupyter/jupyter-js-services,blink1073/services,blink1073/jupyter-js-services,blink1073/jupyter-js-services,blink1073/services,jupyter/jupyter-js-services,blink1073/services,jupyter/jupyter-js-services,jupyterlab/services,jupyter/ju... | javascript | ## Code Before:
var version = require('./package.json').version;
module.exports = {
entry: './lib',
output: {
filename: './dist/index.js',
library: ['jupyter', 'services'],
libraryTarget: 'umd',
publicPath: 'https://npmcdn.com/jupyter-js-services@' + version + '/dist/'
},
... |
ed52198dccc6129788003bcff5c07b701135d9f3 | app-template/index.html | app-template/index.html | <!doctype html>
<html lang="en">
<head ng-controller="headController">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<meta name="msapplication-tap-high... | <!doctype html>
<html lang="en">
<head ng-controller="headController">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<meta name="msapplication-tap-high... | Fix nwjs autofill and handleopenurl | Fix nwjs autofill and handleopenurl
| HTML | mit | ObsidianCryptoVault/copay,Kirvx/copay,cmgustavo/copay,Groestlcoin/GroestlPay,bitchk-wallet/copay,gabrielbazan7/copay,msalcala11/copay,msalcala11/copay,bitjson/copay,cobit-wallet/cobit,bitchk-wallet/copay,ObsidianCryptoVault/copay,matiu/copay,gabrielbazan7/copay,bitchk-wallet/copay,janko33bd/copay,janko33bd/copay,Groest... | html | ## Code Before:
<!doctype html>
<html lang="en">
<head ng-controller="headController">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<meta name="msappl... |
df68b821807d25d204f43d7b1805da6c25f42b43 | src/lib/pagination.py | src/lib/pagination.py | from collections import OrderedDict
from django.utils.translation import ugettext_lazy as _
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
class LegacyPaginator(PageNumberPagination):
"""
A legacy paginator that mocks the one from Eve Python
"""
... | from collections import OrderedDict
from django.utils.translation import ugettext_lazy as _
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
class LegacyPaginator(PageNumberPagination):
"""
A legacy paginator that mocks the one from Eve Python
"""
... | Set a maximum to the number of elements that may be requested | Set a maximum to the number of elements that may be requested
| Python | agpl-3.0 | lafranceinsoumise/api-django,lafranceinsoumise/api-django,lafranceinsoumise/api-django,lafranceinsoumise/api-django | python | ## Code Before:
from collections import OrderedDict
from django.utils.translation import ugettext_lazy as _
from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
class LegacyPaginator(PageNumberPagination):
"""
A legacy paginator that mocks the one from Eve Py... |
57d83d6b0e6e2008db40218d4dba310c9bb46459 | updater.rb | updater.rb | require 'open-uri'
NO_DOWNLOAD_ENV = 'UPDATER_OFF'
NO_DOWNLOAD_VALUE = 'true'
NO_DOWNLOAD_ERROR_MESSAGE = "ENV Manual Override #{NO_DOWNLOAD_ENV}=#{NO_DOWNLOAD_VALUE}"
ERROR_ENV = 'UPDATER_ERROR'
DESTINATION_FILE = 'bots.rb'
SOURCE_FILE = 'v2.rb'
DOWNLOAD_URI = 'https://raw.githubusercontent.com/Stawberri/twitter_dboo... | require 'open-uri'
NO_DOWNLOAD_ENV = 'UPDATER_OFF'
NO_DOWNLOAD_VALUE = 'true'
NO_DOWNLOAD_ERROR_MESSAGE = "ENV Manual Override #{NO_DOWNLOAD_ENV}=#{NO_DOWNLOAD_VALUE}"
ERROR_ENV = 'UPDATER_ERROR'
DESTINATION_FILE = 'bots.rb'
SOURCE_FILE = 'v2.rb'
DOWNLOAD_URI = 'https://raw.githubusercontent.com/Stawberri/twitter_dboo... | Delete downloaded file after running complete | Delete downloaded file after running complete
This line really has no effect on anything whatsoever, and I'm just
adding it because I keep accidentally editing bots.rb instead of v2.rb
in my development environment.
Also moved a line inside begin statement so everything could be
contained inside. Feels cleaner.
| Ruby | mit | Stawberri/twitter_dbooks | ruby | ## Code Before:
require 'open-uri'
NO_DOWNLOAD_ENV = 'UPDATER_OFF'
NO_DOWNLOAD_VALUE = 'true'
NO_DOWNLOAD_ERROR_MESSAGE = "ENV Manual Override #{NO_DOWNLOAD_ENV}=#{NO_DOWNLOAD_VALUE}"
ERROR_ENV = 'UPDATER_ERROR'
DESTINATION_FILE = 'bots.rb'
SOURCE_FILE = 'v2.rb'
DOWNLOAD_URI = 'https://raw.githubusercontent.com/Stawbe... |
9efd8bb69ef98429ea58efe61c3a66e666c943f9 | lib/http_eventstore/api/connection.rb | lib/http_eventstore/api/connection.rb | module HttpEventstore
module Api
class Connection
APP_JSON = 'application/json'.freeze
def initialize(endpoint)
@endpoint = endpoint
end
def call
Faraday.new(
url: endpoint.url,
headers: {
accept: APP_JSON,
content_t... | module HttpEventstore
module Api
class Connection
APP_JSON = 'application/json'.freeze
def initialize(endpoint)
@endpoint = endpoint
end
def call
Faraday.new(
url: endpoint.url,
headers: {
accept: APP_JSON,
content_t... | Use the Faraday retry plugin to ameliorate possible ES performance problems | Use the Faraday retry plugin to ameliorate possible ES performance problems
| Ruby | mit | arkency/http_eventstore,obsidian-btc/http_eventstore,obsidian-btc/http_eventstore,arkency/http_event_store | ruby | ## Code Before:
module HttpEventstore
module Api
class Connection
APP_JSON = 'application/json'.freeze
def initialize(endpoint)
@endpoint = endpoint
end
def call
Faraday.new(
url: endpoint.url,
headers: {
accept: APP_JSON,
... |
c48526c68abb09893215c3451fc65d1a7ff345c8 | README.md | README.md |
Get a new Mac up and running.
## Usage
Run `./up`.
## Checklist (for manual changes)
- [ ] Three-finger drag
- [ ] Keyboard repeat and delay rate
- [ ] Ctrl+scroll gesture for zooming
|
Get a new Mac up and running.
## Usage
Run `./up`.
## Checklist (for manual changes)
- [ ] Three-finger drag
- [ ] Keyboard repeat and delay rate
- [ ] Ctrl+scroll gesture for zooming
- [ ] Show battery percentage in menu bar
- [ ] Show volume control in the menu bar
| Add more items to the checklist | Add more items to the checklist | Markdown | mit | spinningarrow/up,spinningarrow/up | markdown | ## Code Before:
Get a new Mac up and running.
## Usage
Run `./up`.
## Checklist (for manual changes)
- [ ] Three-finger drag
- [ ] Keyboard repeat and delay rate
- [ ] Ctrl+scroll gesture for zooming
## Instruction:
Add more items to the checklist
## Code After:
Get a new Mac up and running.
## Usage
Run `./up... |
f060a42ab06a299ed937ec4953a5c2da47fed6b9 | js/application.js | js/application.js | (function(stopwatch){
if (!stopwatch) { throw new Error('stopwatch namespace not found'); }
console.log('Ready to play!');
var game = new stopwatch.Game(5);
new stopwatch.GameView(game, document.getElementById('stopwatch'));
window.game = game;
})(stopwatch);
| (function(stopwatch){
if (!stopwatch) { throw new Error('stopwatch namespace not found'); }
console.log('Ready to play!');
var game = new stopwatch.Game(5);
var view = new stopwatch.GameView(game, document.getElementById('stopwatch'));
function loop(){
view.update();
requestAnimati... | Update Game view on each animation frame | Update Game view on each animation frame
| JavaScript | mit | dvberkel/StopWatch,dvberkel/StopWatch | javascript | ## Code Before:
(function(stopwatch){
if (!stopwatch) { throw new Error('stopwatch namespace not found'); }
console.log('Ready to play!');
var game = new stopwatch.Game(5);
new stopwatch.GameView(game, document.getElementById('stopwatch'));
window.game = game;
})(stopwatch);
## Instruction:
Updat... |
1e2660fc45c582e51a2680c4c9e8423a9cb1e990 | mkdocs.yml | mkdocs.yml | %YAML 1.2
---
site_name: "MarkdownEditing"
repo_url: "https://github.com/SublimeText-Markdown/MarkdownEditing"
docs_dir: "docs"
nav:
- Home: "index.md"
- Installation: "install.md"
- Usage: "usage.md"
- Linting: "linting.md"
- Configuration: "config.md"
- Troubleshooting: "troubleshooting.md"
... | %YAML 1.2
---
site_name: "MarkdownEditing"
repo_url: "https://github.com/SublimeText-Markdown/MarkdownEditing"
docs_dir: "docs"
nav:
- Home: "index.md"
- Installation: "install.md"
- Usage: "usage.md"
- Linting: "linting.md"
- Configuration: "config.md"
- Troubleshooting: "troubleshooting.md"
... | Fix strike-through not being rendered | Docs: Fix strike-through not being rendered
| YAML | mit | SublimeText-Markdown/MarkdownEditing | yaml | ## Code Before:
%YAML 1.2
---
site_name: "MarkdownEditing"
repo_url: "https://github.com/SublimeText-Markdown/MarkdownEditing"
docs_dir: "docs"
nav:
- Home: "index.md"
- Installation: "install.md"
- Usage: "usage.md"
- Linting: "linting.md"
- Configuration: "config.md"
- Troubleshooting: "troub... |
4d4ff539edcf0b6abf760be74243f461e2c855a2 | src/Djebbz/TicketBundle/Tests/Controller/DefaultControllerTest.php | src/Djebbz/TicketBundle/Tests/Controller/DefaultControllerTest.php | <?php
namespace Djebbz\TicketBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/hello/Fabien');
$this->as... | <?php
namespace Djebbz\TicketBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$browser = $client->request('GET', '/home');
$this->assertTrue... | Test home route for 200 response code | Test home route for 200 response code
| PHP | mit | DjebbZ/symfony-playground | php | ## Code Before:
<?php
namespace Djebbz\TicketBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/hello/Fabien');
... |
9467cfc4fa3f0bd2c269f3d7b61460ddc6851f9f | tests/test_dfw_uncomparables.py | tests/test_dfw_uncomparables.py | """Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def test_sample_phr... | """Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def test_sample_phr... | Add test for exception to uncomparable check | Add test for exception to uncomparable check
| Python | bsd-3-clause | jstewmon/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint,amperser/proselint | python | ## Code Before:
"""Test dfw.uncomparables."""
from check import Check
from proselint.checks.wallace import uncomparables as chk
class TestCheck(Check):
"""The test class for dfw.uncomparables."""
__test__ = True
@property
def this_check(self):
"""Bolierplate."""
return chk
def... |
285d4e7116f1b7349d5eade6e9a256ef60952b9b | app/helpers/mailer_helper.rb | app/helpers/mailer_helper.rb | module MailerHelper
def delete_account_url_for(user)
delete_confirmation_user_url host: organic_domain_for(user), token: user.delete_account_token
end
private
def organic_domain_for(user)
Mumukit::Platform.laboratory.organic_domain(user.last_organization)
end
end
| module MailerHelper
def delete_account_url_for(user)
@organization.url_for("/user/delete_confirmation?token=#{user.delete_account_token}")
end
end
| Fix url generation for mailer | Fix url generation for mailer
| Ruby | agpl-3.0 | mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory,mumuki/mumuki-laboratory | ruby | ## Code Before:
module MailerHelper
def delete_account_url_for(user)
delete_confirmation_user_url host: organic_domain_for(user), token: user.delete_account_token
end
private
def organic_domain_for(user)
Mumukit::Platform.laboratory.organic_domain(user.last_organization)
end
end
## Instruction:
Fix... |
85c0af1746fd4ce46774317979504207074c51b8 | defaults/main.yml | defaults/main.yml | patroni_pg_default_service: "postgresql-{{ postgres_version }}"
patroni_pg_path: /usr/pgsql-9.6/bin
patroni_pg_max_connections: 500
patroni_postgres_port: 5432
patroni_archive_command: "mkdir -p ../wal_archive && test ! -f ../wal_archive/%f && cp %p ../wal_archive/%f"
patroni_version: "v1.5.4"
| patroni_pg_default_service: "postgresql-{{ postgres_version }}"
patroni_pg_path: /usr/pgsql-9.6/bin
patroni_pg_max_connections: 500
patroni_postgres_port: 5432
patroni_archive_command: "mkdir -p ../wal_archive && test ! -f ../wal_archive/%f && cp %p ../wal_archive/%f"
patroni_version: "v1.5.4"
patroni_ip: "{{ ansible_d... | Allow to set Patroni IP explicitly | Allow to set Patroni IP explicitly
| YAML | mit | kofonfor/ansible-role-patroni,gitinsky/ansible-role-patroni,gitinsky/ansible-role-patroni,kofonfor/ansible-role-patroni | yaml | ## Code Before:
patroni_pg_default_service: "postgresql-{{ postgres_version }}"
patroni_pg_path: /usr/pgsql-9.6/bin
patroni_pg_max_connections: 500
patroni_postgres_port: 5432
patroni_archive_command: "mkdir -p ../wal_archive && test ! -f ../wal_archive/%f && cp %p ../wal_archive/%f"
patroni_version: "v1.5.4"
## Instr... |
a4c79bbeb56413b7973dae6c6e2373a7da4d6730 | lib/calyx/production/concat.rb | lib/calyx/production/concat.rb | module Calyx
module Production
class Concat
EXPRESSION = /(\{[A-Za-z0-9_@\.]+\})/.freeze
START_TOKEN = '{'.freeze
END_TOKEN = '}'.freeze
DEREF_TOKEN = '.'.freeze
def self.parse(production, registry)
expansion = production.split(EXPRESSION).map do |atom|
if atom.is_... | module Calyx
module Production
class Concat
EXPRESSION = /(\{[A-Za-z0-9_@\.]+\})/.freeze
START_TOKEN = '{'.freeze
END_TOKEN = '}'.freeze
DEREF_TOKEN = '.'.freeze
# Parses an interpolated string into fragments combining terminal strings
# and non-terminal rules.
#
#... | Add method comments to `Production::Concat` source | Add method comments to `Production::Concat` source
| Ruby | mit | maetl/calyx | ruby | ## Code Before:
module Calyx
module Production
class Concat
EXPRESSION = /(\{[A-Za-z0-9_@\.]+\})/.freeze
START_TOKEN = '{'.freeze
END_TOKEN = '}'.freeze
DEREF_TOKEN = '.'.freeze
def self.parse(production, registry)
expansion = production.split(EXPRESSION).map do |atom|
... |
15d16b570e0639078a84636c64334fa7d9d66ce3 | Cargo.toml | Cargo.toml | [package]
name = "glitter"
version = "0.1.0"
authors = ["Kyle Lacy <kylewlacy@me.com>"]
[dependencies]
bitflags = "0.3.2"
gl = "0.0.12"
[dependencies.cgmath]
version = "^0.3.1"
optional = true
| [package]
name = "glitter"
version = "0.1.0"
authors = ["Kyle Lacy <kylewlacy@me.com>"]
[features]
default = ["cgmath"]
[dependencies]
bitflags = "0.3.2"
gl = "0.0.12"
[dependencies.cgmath]
version = "^0.3.1"
optional = true
| Enable `cgmath` feature be default | Enable `cgmath` feature be default
| TOML | apache-2.0 | kylewlacy/glitter,kylewlacy/glitter | toml | ## Code Before:
[package]
name = "glitter"
version = "0.1.0"
authors = ["Kyle Lacy <kylewlacy@me.com>"]
[dependencies]
bitflags = "0.3.2"
gl = "0.0.12"
[dependencies.cgmath]
version = "^0.3.1"
optional = true
## Instruction:
Enable `cgmath` feature be default
## Code After:
[package]
name = "glitter"
version = "0.1... |
dbef1360230c8172711be291d18febe9788de748 | pitest/src/main/java/org/pitest/coverage/execute/ErrorListener.java | pitest/src/main/java/org/pitest/coverage/execute/ErrorListener.java | package org.pitest.coverage.execute;
import org.pitest.testapi.Description;
import org.pitest.testapi.TestListener;
import org.pitest.testapi.TestResult;
public class ErrorListener implements TestListener {
@Override
public void onRunStart() {
}
@Override
public void onTestStart(final Description d) {
}... | package org.pitest.coverage.execute;
import org.pitest.testapi.Description;
import org.pitest.testapi.TestListener;
import org.pitest.testapi.TestResult;
import org.pitest.util.Log;
import java.util.logging.Level;
import java.util.logging.Logger;
public class ErrorListener implements TestListener {
private static ... | Make the stack trace visible in the logs when a test fails without mutation | Make the stack trace visible in the logs when a test fails without mutation
| Java | apache-2.0 | hcoles/pitest,hcoles/pitest | java | ## Code Before:
package org.pitest.coverage.execute;
import org.pitest.testapi.Description;
import org.pitest.testapi.TestListener;
import org.pitest.testapi.TestResult;
public class ErrorListener implements TestListener {
@Override
public void onRunStart() {
}
@Override
public void onTestStart(final Desc... |
31ee9a0f07323a0a49311d8255258f7acbe9ffcb | cpp/cpp_odbc/Library/CMakeLists.txt | cpp/cpp_odbc/Library/CMakeLists.txt | if (WIN32)
include (GenerateExportHeader)
endif()
file(GLOB_RECURSE LIBRARY_FILES "src/*.cpp")
add_library(cpp_odbc ${LIBRARY_FILES})
add_dependencies(cpp_odbc
refresh_cmake_configuration
)
target_link_libraries(cpp_odbc
${Odbc_LIBRARIES}
)
IF(WIN32)
add_custom_command(TARGET cpp_odbc POST_BUILD
... | if (WIN32)
include (GenerateExportHeader)
endif()
file(GLOB_RECURSE LIBRARY_FILES "src/*.cpp")
add_library(cpp_odbc ${LIBRARY_FILES})
add_dependencies(cpp_odbc
refresh_cmake_configuration
)
target_link_libraries(cpp_odbc
${Boost_LIBRARIES}
${Odbc_LIBRARIES}
)
IF(WIN32)
add_custom_command(TARGET cpp... | Add boost to linked libraries | Add boost to linked libraries
| Text | mit | blue-yonder/turbodbc,blue-yonder/turbodbc,blue-yonder/turbodbc,blue-yonder/turbodbc | text | ## Code Before:
if (WIN32)
include (GenerateExportHeader)
endif()
file(GLOB_RECURSE LIBRARY_FILES "src/*.cpp")
add_library(cpp_odbc ${LIBRARY_FILES})
add_dependencies(cpp_odbc
refresh_cmake_configuration
)
target_link_libraries(cpp_odbc
${Odbc_LIBRARIES}
)
IF(WIN32)
add_custom_command(TARGET cpp_odbc P... |
02c031ef898416d35dde89e4d3993653c0b3613b | app/styles/less/mixins/_clearfix.less | app/styles/less/mixins/_clearfix.less | // Clearfix
.clearfix() {
&::after {
content: "";
display: table;
clear: both;
}
}
| // Clearfix
.clearfix() {
&::after {
display: table;
clear: both;
content: "";
}
}
| Sort properties in clearfix mixin | Sort properties in clearfix mixin
| Less | mit | mrmlnc/rwk,mrmlnc/rwk | less | ## Code Before:
// Clearfix
.clearfix() {
&::after {
content: "";
display: table;
clear: both;
}
}
## Instruction:
Sort properties in clearfix mixin
## Code After:
// Clearfix
.clearfix() {
&::after {
display: table;
clear: both;
content: "";
}
}
|
8e1d1b951eb405ce5d289b48aed6121d025763ca | lisp/init-exec-path.el | lisp/init-exec-path.el | (require-package 'exec-path-from-shell)
(after-load 'exec-path-from-shell
(dolist (var '("SSH_AUTH_SOCK" "SSH_AGENT_PID" "GPG_AGENT_INFO" "LANG" "LC_CTYPE"))
(add-to-list 'exec-path-from-shell-variables var)))
(when (memq window-system '(mac ns x))
(setq-default exec-path-from-shell-arguments nil)
(exec-pa... | (require-package 'exec-path-from-shell)
(after-load 'exec-path-from-shell
(dolist (var '("SSH_AUTH_SOCK" "SSH_AGENT_PID" "GPG_AGENT_INFO" "LANG" "LC_CTYPE"))
(add-to-list 'exec-path-from-shell-variables var)))
(when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize))
(provide 'init-exec-path... | Revert "Run exec-path-from-shell in strict mode, requiring optimal shell config" | Revert "Run exec-path-from-shell in strict mode, requiring optimal shell config"
This reverts commit c01ca45ff5a3c4d6312e7d85e5c1fea2f42f95c2.
| Emacs Lisp | bsd-2-clause | emuio/emacs.d | emacs-lisp | ## Code Before:
(require-package 'exec-path-from-shell)
(after-load 'exec-path-from-shell
(dolist (var '("SSH_AUTH_SOCK" "SSH_AGENT_PID" "GPG_AGENT_INFO" "LANG" "LC_CTYPE"))
(add-to-list 'exec-path-from-shell-variables var)))
(when (memq window-system '(mac ns x))
(setq-default exec-path-from-shell-arguments... |
965a78a662f9883d57ea36d6f608d7cc75df94b1 | definitions/constraints/string_constraints.yml | definitions/constraints/string_constraints.yml | description: |
A string answer.
**UI hints:** texfield, multilinetext.
required:
- dataType
allOf:
- $ref: ./constraints.yml
- properties:
minLength:
type: integer
description: The minimum number of characters that should be allowed.
maxLength:
t... | description: |
A string answer.
**UI hints:** texfield, multilinetext.
required:
- dataType
allOf:
- $ref: ./constraints.yml
- properties:
minLength:
type: integer
description: The minimum number of characters that should be allowed.
maxLength:
t... | Fix the model browser and add the patternErrorMessage/patternPlaceholder fields on string constraints. | Fix the model browser and add the patternErrorMessage/patternPlaceholder fields on string constraints.
| YAML | apache-2.0 | Sage-Bionetworks/BridgeJavaSDK,DwayneJengSage/BridgeJavaSDK,Sage-Bionetworks/BridgeJavaSDK,alxdarksage/BridgeJavaSDK,alxdarksage/BridgeJavaSDK,DwayneJengSage/BridgeJavaSDK | yaml | ## Code Before:
description: |
A string answer.
**UI hints:** texfield, multilinetext.
required:
- dataType
allOf:
- $ref: ./constraints.yml
- properties:
minLength:
type: integer
description: The minimum number of characters that should be allowed.
maxLengt... |
32bc88dc8f44ad0cb7db5655d3daca6f41a6d778 | README.md | README.md | dotfiles
========
A heavily opinionated set of dotfiles.
> These are my dotfiles. There are many like them, but these ones are mine. […]
Requirements
------------
* `make`
* `bash`
Usage
-----
~~~
$ git clone https://github.com/sebastianmarkow/dotfiles.git
$ cd dotfiles
$ make help
~~~
__Warning:__ `make dotfile... | dotfiles
========
A heavily opinionated set of dotfiles.
> These are my dotfiles. There are many like them, but these ones are mine. […]
Requirements
------------
### To bootstrap
* `make`
* `bash`
* `brew`
Usage
-----
~~~
$ git clone https://github.com/sebastianmarkow/dotfiles.git
$ cd dotfiles
$ make help
~~~
... | Add brew to readme as a requirement | Add brew to readme as a requirement
| Markdown | mit | sebastianmarkow/dotfiles | markdown | ## Code Before:
dotfiles
========
A heavily opinionated set of dotfiles.
> These are my dotfiles. There are many like them, but these ones are mine. […]
Requirements
------------
* `make`
* `bash`
Usage
-----
~~~
$ git clone https://github.com/sebastianmarkow/dotfiles.git
$ cd dotfiles
$ make help
~~~
__Warning:... |
fea795f0981733788aa9945b2e0ccc4db9faca5d | bower.json | bower.json | {
"name": "owning-a-home",
"version": "0.0.1",
"dependencies": {
"html5shiv": "latest",
"jquery": "~1.11.0",
"normalize-css": "~3.0.1",
"cf-buttons": "git://github.com/cfpb/cf-buttons.git",
"cf-colors": "git://github.com/cfpb/cf-colors.git",
"cf-expandables": "git://github.com/cfpb/cf-expa... | {
"name": "owning-a-home",
"version": "0.0.1",
"dependencies": {
"html5shiv": "latest",
"jquery": "~1.11.0",
"normalize-css": "~3.0.1",
"cf-buttons": "git://github.com/cfpb/cf-buttons.git",
"cf-colors": "git://github.com/cfpb/cf-colors.git",
"cf-expandables": "git://github.com/cfpb/cf-expa... | Add new range slider dep | Add new range slider dep
| JSON | cc0-1.0 | fassake/bdd-security,contolini/owning-a-home,virginiacc/owning-a-home,fna/owning-a-home,Scotchester/owning-a-home,cfarm/owning-a-home,CapeSepias/owning-a-home,imuchnik/owning-a-home,OrlandoSoto/owning-a-home,OrlandoSoto/owning-a-home,cfarm/owning-a-home,Scotchester/owning-a-home,contolini/owning-a-home,CapeSepias/ownin... | json | ## Code Before:
{
"name": "owning-a-home",
"version": "0.0.1",
"dependencies": {
"html5shiv": "latest",
"jquery": "~1.11.0",
"normalize-css": "~3.0.1",
"cf-buttons": "git://github.com/cfpb/cf-buttons.git",
"cf-colors": "git://github.com/cfpb/cf-colors.git",
"cf-expandables": "git://github.... |
55553527d49150f9b462925c6fa2b43b07ceef0a | product/toolbars/miq_report_schedule_center_tb.yaml | product/toolbars/miq_report_schedule_center_tb.yaml | ---
:model: MiqSchedule
:button_groups:
- :name: miq_schedule_vmdb
:items:
- :buttonSelect: miq_schedule_vmdb_choice
:image: vmdb
:title: Configuration
:text: Configuration
:items:
- :button: miq_report_schedule_edit
:image: edit
:text: "Edit this Schedule"
:title:... | ---
:model: MiqSchedule
:button_groups:
- :name: miq_schedule_vmdb
:items:
- :buttonSelect: miq_schedule_vmdb_choice
:image: vmdb
:title: Configuration
:text: Configuration
:items:
- :button: miq_report_schedule_edit
:image: edit
:text: "Edit this Schedule"
:title:... | Change label for delete option in detail schedule page | Change label for delete option in detail schedule page
https://bugzilla.redhat.com/show_bug.cgi?id=1276107
| YAML | apache-2.0 | hstastna/manageiq,gerikis/manageiq,NaNi-Z/manageiq,maas-ufcg/manageiq,skateman/manageiq,mresti/manageiq,israel-hdez/manageiq,jvlcek/manageiq,branic/manageiq,branic/manageiq,agrare/manageiq,maas-ufcg/manageiq,d-m-u/manageiq,aufi/manageiq,durandom/manageiq,israel-hdez/manageiq,skateman/manageiq,NickLaMuro/manageiq,gmccul... | yaml | ## Code Before:
---
:model: MiqSchedule
:button_groups:
- :name: miq_schedule_vmdb
:items:
- :buttonSelect: miq_schedule_vmdb_choice
:image: vmdb
:title: Configuration
:text: Configuration
:items:
- :button: miq_report_schedule_edit
:image: edit
:text: "Edit this Schedule"
:tit... |
ff095a4fa6078d264209eeed07e52e60fa30fad8 | .travis.yml | .travis.yml | language: java
jdk:
- oraclejdk8
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V
after_success:
mvn test jacoco:report coveralls:report
sudo: false
addons:
apt:
packages:
- oracle-java8-installer
| language: java
jdk:
- openjdk8
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V
after_success:
mvn test jacoco:report coveralls:report
sudo: false
| Update to OpenJDK 8 instead of Oracle JDK 8 for Travis CI | build: Update to OpenJDK 8 instead of Oracle JDK 8 for Travis CI
| YAML | apache-2.0 | BuaBook/http-common | yaml | ## Code Before:
language: java
jdk:
- oraclejdk8
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgpg.skip=true -B -V
after_success:
mvn test jacoco:report coveralls:report
sudo: false
addons:
apt:
packages:
- oracle-java8-installer
## Instruction:
build: Update to Ope... |
63686265cea5db1cb63dce4e32fd347ca6736cf8 | php-classes/Emergence/Site/RequestHandler.php | php-classes/Emergence/Site/RequestHandler.php | <?php
namespace Emergence\Site;
abstract class RequestHandler extends \RequestHandler implements IRequestHandler
{
protected static function sendResponse(IResponse $response)
{
return static::respond($response->getId(), $response->getPayload(), $response->getMode());
}
} | <?php
namespace Emergence\Site;
abstract class RequestHandler extends \RequestHandler implements IRequestHandler
{
public static function sendResponse(IResponse $response, $templatePrefix = null)
{
$templateId = $response->getId();
if ($templatePrefix) {
$templateId = trim($templ... | Make sendRequest public and add $templatePrefix option | Make sendRequest public and add $templatePrefix option
| PHP | mit | JarvusInnovations/Emergence-Skeleton,JarvusInnovations/Emergence-Skeleton,JarvusInnovations/Emergence-Skeleton,JarvusInnovations/Emergence-Skeleton | php | ## Code Before:
<?php
namespace Emergence\Site;
abstract class RequestHandler extends \RequestHandler implements IRequestHandler
{
protected static function sendResponse(IResponse $response)
{
return static::respond($response->getId(), $response->getPayload(), $response->getMode());
}
}
## Instru... |
7d037d69fd22ce2356ba5275cb70efb79d4038ff | app/views/home/index.slim | app/views/home/index.slim | doctype html
html
head
title
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"
= csrf_meta_tags
body.home.mdl-grid ... | doctype html
html
head
title
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"
= csrf_meta_tags
body.home.mdl-grid ... | Remove ripple from the login button | Remove ripple from the login button
| Slim | mit | MindLeaps/tracker,MindLeaps/tracker,MindLeaps/tracker,MindLeaps/tracker,MindLeaps/tracker | slim | ## Code Before:
doctype html
html
head
title
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet"
= csrf_meta_tags
bod... |
9acfa71c9ea754b2d63a54a3cde13a5bb83a90e6 | app/views/categories/_category.html.erb | app/views/categories/_category.html.erb | <h2 id="<%= dom_id(category) %>"><%= category.name_with_code %></h2>
<p><%= category.description.html_safe %></p>
<p class="clearfix see-proposals">
<%= link_to t('categories.filter'), category.proposals_path %>
</p>
<%= render partial: 'subcategory', collection: category.subcategories %>
| <h2 id="<%= dom_id(category) %>"><%= category.name_with_code %></h2>
<p><%= category.description.html_safe %></p>
<%= render partial: 'subcategory', collection: category.subcategories %>
| Remove view proposals from category in documents | Remove view proposals from category in documents
| HTML+ERB | agpl-3.0 | AjuntamentdeBarcelona/decidim.barcelona-legacy,AjuntamentdeBarcelona/decidim.barcelona-legacy,AjuntamentdeBarcelona/decidimbcn,AjuntamentdeBarcelona/decidim.barcelona,AjuntamentdeBarcelona/decidim.barcelona-legacy,AjuntamentdeBarcelona/decidimbcn,AjuntamentdeBarcelona/decidim.barcelona,AjuntamentdeBarcelona/barcelona-p... | html+erb | ## Code Before:
<h2 id="<%= dom_id(category) %>"><%= category.name_with_code %></h2>
<p><%= category.description.html_safe %></p>
<p class="clearfix see-proposals">
<%= link_to t('categories.filter'), category.proposals_path %>
</p>
<%= render partial: 'subcategory', collection: category.subcategories %>
## Instru... |
8c0ceadc047fe0762df6cdfeaca84bff0b4a46e5 | lib/extensions/ar_number_of.rb | lib/extensions/ar_number_of.rb | module ActiveRecord
class Base
def number_of(assoc)
@number_of ||= {}
@number_of[assoc.to_sym] ||= send(assoc).size
end
end
end
| module ActiveRecord
class Base
def number_of(assoc)
@number_of ||= {}
@number_of[assoc.to_sym] ||= send(assoc).try!(:size) || 0
end
end
end
| Handle gracefully missing number_of nil | Handle gracefully missing number_of nil
Handle gracefully missing number_of nil, which can occur when
we delegate association and the receiving object is nil.4
Fixes BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1364458
| Ruby | apache-2.0 | aufi/manageiq,matobet/manageiq,KevinLoiseau/manageiq,ailisp/manageiq,skateman/manageiq,juliancheal/manageiq,romaintb/manageiq,jvlcek/manageiq,d-m-u/manageiq,syncrou/manageiq,andyvesel/manageiq,billfitzgerald0120/manageiq,mresti/manageiq,yaacov/manageiq,israel-hdez/manageiq,tzumainn/manageiq,djberg96/manageiq,ailisp/man... | ruby | ## Code Before:
module ActiveRecord
class Base
def number_of(assoc)
@number_of ||= {}
@number_of[assoc.to_sym] ||= send(assoc).size
end
end
end
## Instruction:
Handle gracefully missing number_of nil
Handle gracefully missing number_of nil, which can occur when
we delegate association and the ... |
1360ecacbfcef1106430413ad26e24181815dae4 | README.md | README.md | CGA themed arcade style game, entry for June 2017 onegameamonth
| CGA themed arcade style game, entry for June 2017 onegameamonth
play in browser: https://armen138.github.io/galaxorz/
mac installer: https://www.dropbox.com/s/jjdgi4lywxajwa5/galaxorz-1.0.1.dmg?dl=0
windows installer: https://www.dropbox.com/s/m8vderhv3iy4mcn/galaxorz%20Setup%201.0.1.exe?dl=0
| Add play and install links to readme | Add play and install links to readme | Markdown | mit | Armen138/galaxorz,Armen138/galaxorz,Armen138/galaxorz | markdown | ## Code Before:
CGA themed arcade style game, entry for June 2017 onegameamonth
## Instruction:
Add play and install links to readme
## Code After:
CGA themed arcade style game, entry for June 2017 onegameamonth
play in browser: https://armen138.github.io/galaxorz/
mac installer: https://www.dropbox.com/s/jjdgi4lywxa... |
79b6b802b069e3360b81783bb92033af6217ec5a | scripts/update-llvm.sh | scripts/update-llvm.sh | set -o nounset
set -o errexit
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
LLVM_DIR="${ROOT_DIR}/third_party/llvm"
CLANG_DIR="${LLVM_DIR}/tools/clang"
LLVM_SHA=644d8eaae43035481913aa898626305c59343f85
CLANG_SHA=e90410ed3ac353b1bbc98970b2954ffeff65ab16
fetch_or_clone() {
local... | set -o nounset
set -o errexit
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
LLVM_DIR="${ROOT_DIR}/third_party/llvm"
CLANG_DIR="${LLVM_DIR}/tools/clang"
DEPTH=5000
LLVM_SHA=644d8eaae43035481913aa898626305c59343f85
CLANG_SHA=e90410ed3ac353b1bbc98970b2954ffeff65ab16
fetch_or_clone(... | Extend clone depth of LLVM to 5000 | Extend clone depth of LLVM to 5000
| Shell | apache-2.0 | binji/wasm-e2e,WebAssembly/wasm-e2e,WebAssembly/wasm-e2e,binji/wasm-e2e,binji/wasm-e2e,binji/wasm-e2e,WebAssembly/wasm-e2e,WebAssembly/wasm-e2e,WebAssembly/wasm-e2e | shell | ## Code Before:
set -o nounset
set -o errexit
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
LLVM_DIR="${ROOT_DIR}/third_party/llvm"
CLANG_DIR="${LLVM_DIR}/tools/clang"
LLVM_SHA=644d8eaae43035481913aa898626305c59343f85
CLANG_SHA=e90410ed3ac353b1bbc98970b2954ffeff65ab16
fetch_or_c... |
010941181c50c0c78c4fa02111036fde54efdb3f | dev/crypto/README.md | dev/crypto/README.md |
* [HMAC vs simple MD5 Hash](http://stackoverflow.com/questions/5051529/hmac-vs-simple-md5-hash)
|
* [HMAC vs simple MD5 Hash](http://stackoverflow.com/questions/5051529/hmac-vs-simple-md5-hash)
* [Hash-based message authentication code(HMAC)](https://en.wikipedia.org/wiki/Hash-based_message_authentication_code)
| Add Hash-based message authentication code | Add Hash-based message authentication code
| Markdown | mit | northbright/bookmarks,northbright/bookmarks,northbright/bookmarks | markdown | ## Code Before:
* [HMAC vs simple MD5 Hash](http://stackoverflow.com/questions/5051529/hmac-vs-simple-md5-hash)
## Instruction:
Add Hash-based message authentication code
## Code After:
* [HMAC vs simple MD5 Hash](http://stackoverflow.com/questions/5051529/hmac-vs-simple-md5-hash)
* [Hash-based message authenticati... |
2106cfa5b5905945ae2899441995c6c6451717ab | src/apps/interactions/macros/kind-form.js | src/apps/interactions/macros/kind-form.js | module.exports = function ({
returnLink,
errors = [],
}) {
return {
buttonText: 'Continue',
errors,
children: [
{
macroName: 'MultipleChoiceField',
type: 'radio',
label: 'What would you like to record?',
name: 'kind',
options: [{
value: 'interact... | module.exports = function ({
returnLink,
errors = [],
}) {
return {
buttonText: 'Continue',
errors,
children: [{
macroName: 'MultipleChoiceField',
type: 'radio',
label: 'What would you like to record?',
name: 'kind',
options: [{
value: 'interaction',
label... | Enable policy feedback in interaction creation selection | Enable policy feedback in interaction creation selection | JavaScript | mit | uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend,uktrade/data-hub-frontend,uktrade/data-hub-fe-beta2,uktrade/data-hub-frontend | javascript | ## Code Before:
module.exports = function ({
returnLink,
errors = [],
}) {
return {
buttonText: 'Continue',
errors,
children: [
{
macroName: 'MultipleChoiceField',
type: 'radio',
label: 'What would you like to record?',
name: 'kind',
options: [{
... |
411407250f19d78b988be5c4642954b35a2413ae | opencog/scm/opencog/atom-types.scm | opencog/scm/opencog/atom-types.scm | ;
; Opencog atom-types module
;
(define-module (opencog atom-types))
; Alternately, we could also have
; (define-module (opencog atomtypes nlp-types))
; (define-module (opencog atomtypes spacetime-types))
; and so on, but I don't see the point of that, at the moment...
; XXX Python bug work-around -- python is unable... | ;
; Opencog atom-types module
;
(define-module (opencog atom-types))
; Alternately, we could also have
; (define-module (opencog atomtypes nlp-types))
; (define-module (opencog atomtypes spacetime-types))
; and so on, but I don't see the point of that, at the moment...
; Load the C libraries that actually call the cl... | Revert hacky python bug work-around | Revert hacky python bug work-around
| Scheme | agpl-3.0 | cosmoharrigan/opencog,yantrabuddhi/opencog,inflector/opencog,yantrabuddhi/opencog,rodsol/opencog,andre-senna/opencog,cosmoharrigan/opencog,rodsol/opencog,shujingke/opencog,andre-senna/opencog,ruiting/opencog,AmeBel/opencog,williampma/opencog,ArvinPan/opencog,inflector/opencog,yantrabuddhi/opencog,inflector/opencog,andr... | scheme | ## Code Before:
;
; Opencog atom-types module
;
(define-module (opencog atom-types))
; Alternately, we could also have
; (define-module (opencog atomtypes nlp-types))
; (define-module (opencog atomtypes spacetime-types))
; and so on, but I don't see the point of that, at the moment...
; XXX Python bug work-around -- ... |
d2bf875ce53160bab7fa0b44f8e8ccd0f22db85e | cluster/images/kubemark/build-kubemark.sh | cluster/images/kubemark/build-kubemark.sh | apt-get update
apt-get install -y wget vim rsync ca-certificates
update-ca-certificates
chmod a+x /kubemark.sh
tar xzf /tmp/kubemark.tar.gz
cp kubernetes/server/bin/hyperkube /
cp kubernetes/server/bin/kubemark /
cp kubernetes/server/bin/kubectl /
rm -rf /tmp/*
apt-get remove -y build-essential
apt-get clean -y
apt-... | apt-get update
apt-get install -y wget vim rsync ca-certificates
update-ca-certificates
chmod a+x /kubemark.sh
tar xzf /tmp/kubemark.tar.gz
cp kubernetes/server/bin/kubemark /
rm -rf /tmp/*
apt-get clean -y
apt-get autoremove -y
| Make kubemark docker image a bit smaller | Make kubemark docker image a bit smaller
| Shell | apache-2.0 | erikmcc/kubernetes,fgimenez/kubernetes,williamsandrew/kubernetes,justinsb/kubernetes,mbohlool/kubernetes,ursuad/kubernetes,danehans/kubernetes,andrewstuart/kubernetes,streamnsight/kubernetes,ajohnstone/kubernetes,Defensative/kubernetes,abdasgupta/kubernetes,sjenning/kubernetes,crawford/kubernetes,DirectXMan12/kubernete... | shell | ## Code Before:
apt-get update
apt-get install -y wget vim rsync ca-certificates
update-ca-certificates
chmod a+x /kubemark.sh
tar xzf /tmp/kubemark.tar.gz
cp kubernetes/server/bin/hyperkube /
cp kubernetes/server/bin/kubemark /
cp kubernetes/server/bin/kubectl /
rm -rf /tmp/*
apt-get remove -y build-essential
apt-g... |
640f1657189b5a65dbd52f73cb69aad63801df07 | client/admin/lib/views/members/teammemberscommonview.coffee | client/admin/lib/views/members/teammemberscommonview.coffee | kd = require 'kd'
KDView = kd.View
KDListItemView = kd.ListItemView
KDCustomHTMLView = kd.CustomHTMLView
KDListViewController = kd.ListViewController
module.exports = class TeamMembersCommonView extends KDView
constructor: (options = {}, data) ->
options.noItemFoundWi... | kd = require 'kd'
KDView = kd.View
MemberItemView = require './memberitemview'
KDListItemView = kd.ListItemView
KDCustomHTMLView = kd.CustomHTMLView
KDListViewController = kd.ListViewController
module.exports = class TeamMembersCommonView extends KDView
constructor: ... | Implement base fetch and listing flow. | TeamMembersCommonView: Implement base fetch and listing flow.
| CoffeeScript | agpl-3.0 | andrewjcasal/koding,sinan/koding,szkl/koding,cihangir/koding,cihangir/koding,jack89129/koding,andrewjcasal/koding,sinan/koding,jack89129/koding,kwagdy/koding-1,sinan/koding,koding/koding,drewsetski/koding,koding/koding,rjeczalik/koding,drewsetski/koding,alex-ionochkin/koding,rjeczalik/koding,kwagdy/koding-1,szkl/koding... | coffeescript | ## Code Before:
kd = require 'kd'
KDView = kd.View
KDListItemView = kd.ListItemView
KDCustomHTMLView = kd.CustomHTMLView
KDListViewController = kd.ListViewController
module.exports = class TeamMembersCommonView extends KDView
constructor: (options = {}, data) ->
optio... |
a57ad591e6c25a501c984db543116ada39ec57ea | src/store/modules/editor/getters.js | src/store/modules/editor/getters.js | export default {
// Get an array specifying the tools included in the current step.
getStepTools: state => {
if (state.steps && state.steps[state.activeStep].tools) {
return state.steps[state.activeStep].tools
} else {
return ['pan', 'circle', 'rectangle', 'path', 'pencil', 'move', 'node', 'coun... | export default {
// Get an array specifying the tools included in the current step.
getStepTools: state => {
if (state.steps && state.steps[state.activeStep].tools) {
return state.steps[state.activeStep].tools
} else {
return ['pan', 'circle', 'rectangle', 'path', 'pencil', 'polygon', 'move', 'n... | Add polygon tool to default set | Add polygon tool to default set
| JavaScript | mit | alanaberdeen/AIDA,alanaberdeen/annotate,alanaberdeen/AIDA,alanaberdeen/annotate | javascript | ## Code Before:
export default {
// Get an array specifying the tools included in the current step.
getStepTools: state => {
if (state.steps && state.steps[state.activeStep].tools) {
return state.steps[state.activeStep].tools
} else {
return ['pan', 'circle', 'rectangle', 'path', 'pencil', 'move... |
3d9880d5f52c4c37e3b658abc607a13f3c3d9545 | examples/CMakeLists.txt | examples/CMakeLists.txt | cmake_minimum_required(VERSION 2.8)
project(AnisotropicDiffusionLBR_Examples)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
add_executable(CoherenceEnhancingDiffusion
CoherenceEnhancingDiffusion.cxx)
target_link_libraries(CoherenceEnhancingDiffusion
${ITK_LIBRARIES})
enable_testing()
find_path(INPUT_DAT... | cmake_minimum_required(VERSION 2.8)
project(AnisotropicDiffusionLBR_Examples)
find_package(ITK REQUIRED
COMPONENTS
AnisotropicDiffusionLBR
ITKIOPNG
)
include(${ITK_USE_FILE})
add_executable(CoherenceEnhancingDiffusion
CoherenceEnhancingDiffusion.cxx)
target_link_libraries(CoherenceEnhancingDiffusion... | Add missing COMPONENTS to find_package example call | COMP: Add missing COMPONENTS to find_package example call
We need to explicitly specify the module in the COMPONENTS argument to
find_package(ITK when it is a remote module.
Addresses:
Cannot open include file: 'CoherenceEnhancingDiffusionFilter.h'
| Text | apache-2.0 | InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR,InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR,InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR | text | ## Code Before:
cmake_minimum_required(VERSION 2.8)
project(AnisotropicDiffusionLBR_Examples)
find_package(ITK REQUIRED)
include(${ITK_USE_FILE})
add_executable(CoherenceEnhancingDiffusion
CoherenceEnhancingDiffusion.cxx)
target_link_libraries(CoherenceEnhancingDiffusion
${ITK_LIBRARIES})
enable_testing()
fin... |
ea5de7cfbdfc55b95e84679e16c977b6f5ff4f39 | app/controllers/ideas_controller.rb | app/controllers/ideas_controller.rb | class IdeasController < ApplicationController
# GET /ideas/new
def new
@idea = Idea.new
end
# POST /ideas
def create
@idea = Idea.new(idea_params)
@idea.save
redirect_to idea_path(@idea.id)
end
# GET /ideas/1
def show
@idea = Idea.find(params[:id])
respond_to do |format|
... | class IdeasController < ApplicationController
# GET /ideas/new
def new
@idea = Idea.new
end
# POST /ideas
def create
@idea = Idea.new(idea_params)
if params[:idea][:tag_names]
@idea.tags += params[:idea][:tag_names].map{ |tag| Tag.from_string(tag) }.flatten
puts @idea.tags
put... | Add Tag creation to Idea controller create action | Add Tag creation to Idea controller create action
Tags will need to be created from the strings passed from the new idea
form.
| Ruby | agpl-3.0 | robinsonj/P4IdeaX,robinsonj/P4IdeaX | ruby | ## Code Before:
class IdeasController < ApplicationController
# GET /ideas/new
def new
@idea = Idea.new
end
# POST /ideas
def create
@idea = Idea.new(idea_params)
@idea.save
redirect_to idea_path(@idea.id)
end
# GET /ideas/1
def show
@idea = Idea.find(params[:id])
respond_to ... |
7c16bcd1f943b8fefe01738cc2121e1a1df3d7a4 | config/initializers/stripe.rb | config/initializers/stripe.rb | Rails.configuration.stripe = {
:publishable_key => ENV['STRIPE_TEST_PUBLISHABLE_KEY'],
:secret_key => ENV['STRIPE_TEST_SECRET_KEY']
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]
| if Rails.env.production?
Rails.configuration.stripe = {
:publishable_key => ENV['STRIPE_PUBLISHABLE_KEY'],
:secret_key => ENV['STRIPE_SECRET_KEY']
}
else
Rails.configuration.stripe = {
:publishable_key => ENV['STRIPE_TEST_PUBLISHABLE_KEY'],
:secret_key => ENV['STRIPE_TEST_SECRET_KEY']
... | Set Rails to use the real Stripe api keys on production | Set Rails to use the real Stripe api keys on production
| Ruby | mit | rasnom/sorryyoufeelthatway,rasnom/sorryyoufeelthatway,rasnom/sorryyoufeelthatway | ruby | ## Code Before:
Rails.configuration.stripe = {
:publishable_key => ENV['STRIPE_TEST_PUBLISHABLE_KEY'],
:secret_key => ENV['STRIPE_TEST_SECRET_KEY']
}
Stripe.api_key = Rails.configuration.stripe[:secret_key]
## Instruction:
Set Rails to use the real Stripe api keys on production
## Code After:
if Rails.env.p... |
6b5723d7e8486f95bdf9fbb7a523115c537e2bfc | Kwf/Util/Https.php | Kwf/Util/Https.php | <?php
class Kwf_Util_Https
{
/**
* Returns if the current request is https
*/
public static function supportsHttps()
{
return isset($_SERVER['HTTPS']);
}
/**
* Returns if the current request would support https and ensureHttps() would redirect to https
*/
public stat... | <?php
class Kwf_Util_Https
{
/**
* Returns if the current request is https
*/
public static function supportsHttps()
{
return isset($_SERVER['HTTPS']);
}
/**
* Returns if the current request would support https and ensureHttps() would redirect to https
*/
public stat... | Add support for wildcard in server.httpsDomains | Add support for wildcard in server.httpsDomains
| PHP | bsd-2-clause | kaufmo/koala-framework,kaufmo/koala-framework,kaufmo/koala-framework,koala-framework/koala-framework,koala-framework/koala-framework | php | ## Code Before:
<?php
class Kwf_Util_Https
{
/**
* Returns if the current request is https
*/
public static function supportsHttps()
{
return isset($_SERVER['HTTPS']);
}
/**
* Returns if the current request would support https and ensureHttps() would redirect to https
*/... |
f258c6988a13bd12f9e4f057c462640cdfa3f959 | .travis.yml | .travis.yml | language: ruby
rvm:
- 2.2
- 2.1
- 2.0
- 1.9.3
- jruby-9000
- jruby-19mode
env:
- PARSE_APPLICATION_ID=Slw1ACyMSVguo79pWvfIq15pkUjfwTLNPpL4984b PARSE_REST_API_KEY=qJKM8CGOAn70WOyR16f16YbyKWM0nBJCEbbtAMOm
sudo: false
| language: ruby
rvm:
- 2.3
- 2.2
- 2.1
- 2.0.0
- 1.9.3
- jruby
- jruby-1.7
env:
- PARSE_APPLICATION_ID=Slw1ACyMSVguo79pWvfIq15pkUjfwTLNPpL4984b PARSE_REST_API_KEY=qJKM8CGOAn70WOyR16f16YbyKWM0nBJCEbbtAMOm
sudo: false
| Test against the latest releases of each Ruby version | Test against the latest releases of each Ruby version
| YAML | mit | nickuya/parse-ruby-client,adelevie/parse-ruby-client,nickuya/parse-ruby-client,adelevie/parse-ruby-client | yaml | ## Code Before:
language: ruby
rvm:
- 2.2
- 2.1
- 2.0
- 1.9.3
- jruby-9000
- jruby-19mode
env:
- PARSE_APPLICATION_ID=Slw1ACyMSVguo79pWvfIq15pkUjfwTLNPpL4984b PARSE_REST_API_KEY=qJKM8CGOAn70WOyR16f16YbyKWM0nBJCEbbtAMOm
sudo: false
## Instruction:
Test against the latest releases of each Ruby version
## C... |
4050b1227db37f531aea5a20995dcff5edca2eb8 | centralna-banka/src/main/java/com/centralnabanka/model/Bank.java | centralna-banka/src/main/java/com/centralnabanka/model/Bank.java | package com.centralnabanka.model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import java.math.BigDecimal;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Entity
public class Bank extends Base {
private String name;
pr... | package com.centralnabanka.model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import java.math.BigDecimal;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Entity
public class Bank extends Base {
private String name;
pr... | Add URL to bank model | Add URL to bank model
| Java | mit | SasaFerenc/payment-system,SasaFerenc/payment-system,SasaFerenc/payment-system,SasaFerenc/payment-system | java | ## Code Before:
package com.centralnabanka.model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import javax.persistence.Entity;
import java.math.BigDecimal;
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Entity
public class Bank extends Base {
private Str... |
80e38a426c019945ca4d85fdb7d9ea4fd4fe43cf | config/database.yml | config/database.yml | default: &default
adapter: postgresql
encoding: unicode
pool: 5
development:
<<: *default
host: localhost
database: energy_sparks_development
username: postgres
password: pgdev
test: &test
<<: *default
host: localhost
database: energy_sparks_test
username: postgres
password: pgdev
staging:
... | default: &default
adapter: postgresql
encoding: unicode
pool: 5
development:
<<: *default
host: localhost
database: energy_sparks_development
test: &test
<<: *default
host: localhost
database: energy_sparks_test
staging:
<<: *default
database: <%= ENV['STAGING_DB_NAME'] %>
host: <%= ENV['STAG... | Remove hardcoded username and password for dev and test Most default environments authenticate postgres as the operating system user so don't require username and password being set | Remove hardcoded username and password for dev and test
Most default environments authenticate postgres as the operating system
user so don't require username and password being set
| YAML | mit | BathHacked/energy-sparks,BathHacked/energy-sparks,BathHacked/energy-sparks,BathHacked/energy-sparks | yaml | ## Code Before:
default: &default
adapter: postgresql
encoding: unicode
pool: 5
development:
<<: *default
host: localhost
database: energy_sparks_development
username: postgres
password: pgdev
test: &test
<<: *default
host: localhost
database: energy_sparks_test
username: postgres
password: ... |
a45da03e7e351e8dd4de5471ec62eb2c4751de90 | webroot/img/flags/ajp.svg | webroot/img/flags/ajp.svg | <?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="20"><image xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAUCAMAAACtdX32AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAA/UExURQB7OmcCC+gKJOgAHQB1MUlJSUihds8IIQAAAP///wCIPWdDLcgAA9cAD+... | <?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" width="30" height="20" viewBox="0 0 4.5 3"><path fill="#007a3d" d="M0 0h4.5v3H0z"/><path fill="#fff" d="M0 0h4.5v2H0z"/><path d="M0 0h4.5v1H0z"/><path fill="#ce1126" d="M0 0l1.5 1.5L0 3z"/></svg>
| Use pure SVG flag for South Levantine Arabic | Use pure SVG flag for South Levantine Arabic
Downloaded from https://commons.wikimedia.org/wiki/File:Flag_of_Palestine_(3-2).svg
Refs #2444.
| SVG | agpl-3.0 | Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2,Tatoeba/tatoeba2 | svg | ## Code Before:
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="20"><image xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAUCAMAAACtdX32AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAA/UExURQB7OmcCC+gKJOgAHQB1MUlJSUihds8IIQAAAP///w... |
3bb1209ce698009a18e38caf1cb0d206b0e37f05 | app/views/layout/application.html.haml | app/views/layout/application.html.haml | !!!
%html
%head
%title
One Click Organisations
= css_include_tag :one_click
%body
%div.control_bar
- if current_user
=link_to 'profile', url(:controller => :members, :action => :edit, :id => current_user.id)
|
=link_to 'logout', url('logout')
%div#doc
%div#h... | !!!
%html
%head
%title
One Click Organisations
= css_include_tag :one_click
%body
%div.control_bar
- if current_user
= h current_user.name
|
=link_to 'my settings', url(:controller => :members, :action => :edit, :id => current_user.id)
|
=link_to 'logo... | Change secondary nav to include current user's name, and 'my settings' instead of 'profile'. | Change secondary nav to include current user's name, and 'my settings' instead of 'profile'.
| Haml | agpl-3.0 | oneclickorgs/one-click-orgs-deployment,oneclickorgs/one-click-orgs,oneclickorgs/one-click-orgs-deployment,emmapersky/one-click-orgs,oneclickorgs/one-click-orgs,oneclickorgs/one-click-orgs-deployment,oneclickorgs/one-click-orgs,oneclickorgs/one-click-orgs,emmapersky/one-click-orgs | haml | ## Code Before:
!!!
%html
%head
%title
One Click Organisations
= css_include_tag :one_click
%body
%div.control_bar
- if current_user
=link_to 'profile', url(:controller => :members, :action => :edit, :id => current_user.id)
|
=link_to 'logout', url('logout')
%div#... |
3972e46177f177c5b31cdacdff2e9b11832ef9c4 | src/app/library/Util.scala | src/app/library/Util.scala | package library
import play.Play
import java.io.File
object Util {
def getUnameFromSubdomain(subdomain: String) = subdomain.split('.')(0)
def calcUniquifiedFilePath(originalPath: String) = {
def makeNewFileCandidate(dirName: String, fileBaseName: String, fileExtName: String, prefixNum: Integer): String = {
... | package library
import play.Play
import java.io.File
object Util {
// this function is obsolete and will be removed later (because it's migrated from webnikki.jp)
def getUnameFromSubdomain(subdomain: String) = subdomain.split('.')(0)
def getUnameFromPath(path: String) =
path.indexOf("/", 1) match {
c... | Add getUnameFromPath() for new URL structure. | Add getUnameFromPath() for new URL structure.
| Scala | mit | mahata/webnikki,mahata/webnikki,mahata/webnikki,mahata/webnikki | scala | ## Code Before:
package library
import play.Play
import java.io.File
object Util {
def getUnameFromSubdomain(subdomain: String) = subdomain.split('.')(0)
def calcUniquifiedFilePath(originalPath: String) = {
def makeNewFileCandidate(dirName: String, fileBaseName: String, fileExtName: String, prefixNum: Intege... |
39d5e9f4be50ba9ec8ca0bff4138c26e8ddeefe8 | lib/archive-tree.js | lib/archive-tree.js | module.exports = {
sortChildren (data) {
data.forEach((el) => {
if (el.parent) {
this.findNestedObject(data, el.parent[0].admin.uid).children.push(el);
}
});
return this.arrangeChildren(data[0]);
},
findNestedObject (objects, id) {
var found;
for (var i = 0; i < objects.le... | module.exports = {
sortChildren (data) {
data.forEach((el) => {
if (el.parent) {
if (this.findNestedObject(data, el.parent[0].admin.uid)) {
this.findNestedObject(data, el.parent[0].admin.uid).children.push(el);
}
}
});
return this.arrangeChildren(data[0]);
},
fin... | Check for element before tryign to retrive an attibiute of that element | Check for element before tryign to retrive an attibiute of that element
| JavaScript | mit | TheScienceMuseum/collectionsonline,TheScienceMuseum/collectionsonline | javascript | ## Code Before:
module.exports = {
sortChildren (data) {
data.forEach((el) => {
if (el.parent) {
this.findNestedObject(data, el.parent[0].admin.uid).children.push(el);
}
});
return this.arrangeChildren(data[0]);
},
findNestedObject (objects, id) {
var found;
for (var i = 0... |
f49082a1a516b8fd696fd4c2f04ad5aa9784de67 | templates/teams/_actions.html | templates/teams/_actions.html | {% load i18n teams_tags %}
<div class="join">
{% if not team|is_team_member:user %}
{% if user.is_authenticated %}
{% if team.is_open %}
{% render_team_join team %}
{% endif %}
{% if team.is_by_application %}
{% if not team|has_applicant:user %}
{% in... | {% load i18n teams_tags %}
<div class="join">
{% if not team|is_team_member:user %}
{% if user.is_authenticated %}
{% if team.is_open %}
{% render_team_join team %}
{% endif %}
{% if team.is_by_application %}
{% if not team|has_applicant:user %}
{% in... | Change "Sign in to Join Team" to just "Join Team" | Change "Sign in to Join Team" to just "Join Team"
https://unisubs.sifterapp.com/issue/769 | HTML | agpl-3.0 | wevoice/wesub,ReachingOut/unisubs,ReachingOut/unisubs,wevoice/wesub,ReachingOut/unisubs,eloquence/unisubs,ujdhesa/unisubs,wevoice/wesub,ofer43211/unisubs,eloquence/unisubs,eloquence/unisubs,eloquence/unisubs,pculture/unisubs,norayr/unisubs,ujdhesa/unisubs,norayr/unisubs,norayr/unisubs,norayr/unisubs,ReachingOut/unisubs... | html | ## Code Before:
{% load i18n teams_tags %}
<div class="join">
{% if not team|is_team_member:user %}
{% if user.is_authenticated %}
{% if team.is_open %}
{% render_team_join team %}
{% endif %}
{% if team.is_by_application %}
{% if not team|has_applicant:user %}
... |
d40c3d2fb8db0ca3764ef54972cacfab98da77eb | app/controllers/data_sources_controller.rb | app/controllers/data_sources_controller.rb | class DataSourcesController < ApplicationController
permits :name, :description, :adapter, :host, :port, :dbname, :user, :password, :encoding
DUMMY_PASSWORD = "__DUMMY__"
def index
@data_sources = DataSource.all
end
def new
@data_source = DataSource.new
end
def create(data_source)
DataSour... | class DataSourcesController < ApplicationController
permits :name, :description, :adapter, :host, :port, :dbname, :user, :password, :encoding
DUMMY_PASSWORD = "__DUMMY__"
def index
@data_sources = DataSource.all
end
def new
@data_source = DataSource.new
end
def create(data_source)
DataSour... | Reset data source table class before update | Reset data source table class before update
| Ruby | mit | hogelog/dmemo,hogelog/dmemo,hogelog/dmemo,hogelog/dmemo | ruby | ## Code Before:
class DataSourcesController < ApplicationController
permits :name, :description, :adapter, :host, :port, :dbname, :user, :password, :encoding
DUMMY_PASSWORD = "__DUMMY__"
def index
@data_sources = DataSource.all
end
def new
@data_source = DataSource.new
end
def create(data_sour... |
3835bf23795aca8f2a60ea2c0d7b4674e3802c7b | src/plugins/edit-form/edit-form.component.ts | src/plugins/edit-form/edit-form.component.ts | import { Component, Optional, Input, OnInit, OnDestroy } from '@angular/core';
import { RootService } from '../../infrastructure/component/index';
import { PluginComponent } from '../plugin.component';
import { EditFormView } from 'ng2-qgrid/plugin/edit-form/edit.form.view';
import { FormGroup } from '@angular/forms';
... | import { Component, Optional, Input, OnInit, OnDestroy } from '@angular/core';
import { RootService } from '../../infrastructure/component/index';
import { PluginComponent } from '../plugin.component';
import { EditFormView } from 'ng2-qgrid/plugin/edit-form/edit.form.view';
import { FormGroup } from '@angular/forms';
... | Define getKey as a class member | Define getKey as a class member
| TypeScript | mit | azkurban/ng2,qgrid/ng2,qgrid/ng2,qgrid/ng2,azkurban/ng2,azkurban/ng2 | typescript | ## Code Before:
import { Component, Optional, Input, OnInit, OnDestroy } from '@angular/core';
import { RootService } from '../../infrastructure/component/index';
import { PluginComponent } from '../plugin.component';
import { EditFormView } from 'ng2-qgrid/plugin/edit-form/edit.form.view';
import { FormGroup } from '@... |
678586b3d38cd0ed59dd832123669b178510a927 | gulpfile.js | gulpfile.js | /**
* Created by Serge on 9/20/15.
*/
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
var connect = require('gulp-connect');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
gulp.task('connect', function () {
connect.server({
root: 'public',
... | /**
* Created by Serge on 9/20/15.
*/
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
var connect = require('gulp-connect');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
gulp.task('connect', function () {
connect.server({
root: 'public',
... | Adjust port for Heroku's sake. | Adjust port for Heroku's sake.
| JavaScript | isc | Dejital/films,Dejital/films | javascript | ## Code Before:
/**
* Created by Serge on 9/20/15.
*/
var gulp = require('gulp');
var sass = require('gulp-ruby-sass');
var connect = require('gulp-connect');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
gulp.task('connect', function () {
connect.server({
root: 'p... |
f3902aa26fca509e4c0fdf2f13859b6f9029c038 | source/patterns/00-atoms/button/docs/button.example.js | source/patterns/00-atoms/button/docs/button.example.js | import React from 'react';
import {Button} from 'apparena-patterns-react';
export default function ButtonExample() {
return (
<div>
<Button type="primary">
Primary
</Button>
<Button type="secondary">
Secondary
</Button>
... | import React from 'react';
import {Button} from 'apparena-patterns-react';
export default function ButtonExample() {
return (
<div>
<Button type="primary">
Primary
</Button>
<Button type="secondary">
Secondary
</Button>
... | Add an id attribute to the button component | [patch][Button] Add an id attribute to the button component
| JavaScript | mit | apparena/patterns,apparena/patterns,apparena/patterns,apparena/patterns | javascript | ## Code Before:
import React from 'react';
import {Button} from 'apparena-patterns-react';
export default function ButtonExample() {
return (
<div>
<Button type="primary">
Primary
</Button>
<Button type="secondary">
Secondary
<... |
ff17eb393a5d72b8795632d0e7d257d6e34567aa | README.md | README.md |
Common configuration files and handy scripts to use when setting up or improving a shell environment.
## Configuration Files
### `vimrc`
Configuration to improve the user experience of `VIM`. No fancy macros, just good highlighting and native settings along with some position history.
### `gitconfig`
Configuratio... |
Common configuration files and handy scripts to use when setting up or improving a shell environment.
## Configuration Files
### `vimrc`
Configuration to improve the user experience of `VIM`. No fancy macros, just good highlighting and native settings along with some position history.
### `gitconfig`
Configuratio... | Add blurb about hushlogin file | Add blurb about hushlogin file
| Markdown | mit | daneah/dotfiles,daneah/dotfiles,daneah/dotfiles | markdown | ## Code Before:
Common configuration files and handy scripts to use when setting up or improving a shell environment.
## Configuration Files
### `vimrc`
Configuration to improve the user experience of `VIM`. No fancy macros, just good highlighting and native settings along with some position history.
### `gitconfi... |
7e5a958759b17750ab8b4a3e6eda84549bae7ac7 | test/test_faker_number.rb | test/test_faker_number.rb | require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
class TestFakerNumber < Test::Unit::TestCase
def setup
@tester = Faker::Number
end
def test_number
assert @tester.number(10).match(/[0-9]{10}/)
end
def test_decimal
assert @tester.decimal(2).match(/[0-9]{2}\.[0-9]{2}/)
... | require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
class TestFakerNumber < Test::Unit::TestCase
def setup
@tester = Faker::Number
end
def test_number
assert @tester.number(10).match(/[0-9]{10}/)
10.times do |digits|
digits += 1
assert @tester.number(digits).match(/^[0-... | Test correct number of digits | Test correct number of digits
Added test from https://github.com/stympy/faker/pull/147 that verifies
behavior in 722041c
| Ruby | mit | sibevin/faker,kovpack/faker,kovpack/faker,pacso/faker,dkniffin/faker,moh-alsheikh/faker,salexzee/faker,nicolasleger/faker,kkirsche/faker,aboutjon/faker,rnavaneeth/faker,dahal/faker,vuchau/faker-1,gniemira/faker,nicolasleger/faker,bradherman/faker,kubapol/faker,pokka/faker,qq99/faker,eibay/faker,benpolinsky/faker,sibevi... | ruby | ## Code Before:
require File.expand_path(File.dirname(__FILE__) + '/test_helper.rb')
class TestFakerNumber < Test::Unit::TestCase
def setup
@tester = Faker::Number
end
def test_number
assert @tester.number(10).match(/[0-9]{10}/)
end
def test_decimal
assert @tester.decimal(2).match(/[0-9]{2}\... |
5f795694f18e3a8aade4bfc623c49dc493268fae | static/select_seats.css | static/select_seats.css | section.select-seats {
display: flex;
flex-direction: row;
}
div.seat-info div {
border: 1px dotted;
padding: 0.5rem;
}
.theater-seat-map svg {
max-width: 520px;
max-height: 620px;
}
.theater-seat-map svg rect.stage {
stroke-width: 1;
fill: none;
stroke: #000;
}
.theater-seat-map... | section.select-seats {
display: flex;
flex-direction: row;
}
div.seat-info div {
border: 1px dotted;
padding: 0.5rem;
}
.theater-seat-map svg {
border: 1px solid black;
}
.theater-seat-map svg rect.stage {
stroke-width: 1;
fill: none;
stroke: #000;
}
.theater-seat-map svg text.stage-... | Remove magic numbers from select.seats.css | Remove magic numbers from select.seats.css
| CSS | mit | Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet,Karspexet/Karspexet | css | ## Code Before:
section.select-seats {
display: flex;
flex-direction: row;
}
div.seat-info div {
border: 1px dotted;
padding: 0.5rem;
}
.theater-seat-map svg {
max-width: 520px;
max-height: 620px;
}
.theater-seat-map svg rect.stage {
stroke-width: 1;
fill: none;
stroke: #000;
}
.... |
6c0da9a9cb934e48e64c20951116f054a91a0fb9 | src/main/java/foodtruck/geolocation/YahooResource.java | src/main/java/foodtruck/geolocation/YahooResource.java | package foodtruck.geolocation;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.sun.jersey.api.client.WebResource;
import org.codehaus.jettison.json.JSONObject;
import foodtruck.util.ServiceException;
/**
* Extracting out the resource for easier testing
* @author aviolette@gmail.co... | package foodtruck.geolocation;
import com.google.inject.Inject;
import com.sun.jersey.api.client.WebResource;
import org.codehaus.jettison.json.JSONObject;
import foodtruck.dao.ConfigurationDAO;
import foodtruck.util.ServiceException;
/**
* Extracting out the resource for easier testing
* @author aviolette@gmail.... | Use configuration setting to determine Yahoo App ID | Use configuration setting to determine Yahoo App ID
| Java | mit | aviolette/foodtrucklocator,aviolette/foodtrucklocator,aviolette/foodtrucklocator,aviolette/foodtrucklocator | java | ## Code Before:
package foodtruck.geolocation;
import com.google.inject.Inject;
import com.google.inject.name.Named;
import com.sun.jersey.api.client.WebResource;
import org.codehaus.jettison.json.JSONObject;
import foodtruck.util.ServiceException;
/**
* Extracting out the resource for easier testing
* @author av... |
8af05067ccb67e139fabfdd9cf0d0c69b6cde84c | src/ggrc/assets/mustache/custom_attributes/info.mustache | src/ggrc/assets/mustache/custom_attributes/info.mustache | {{!
Copyright (C) 2016 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
}}
<custom-attributes instance="instance">
{{#if instance.custom_attribute_definitions.length}}
{{#iterate_by_two items}}
<div class="row-fluid wrap-row">
{{#list}}
<div... | {{!
Copyright (C) 2016 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
}}
<custom-attributes instance="instance">
{{#if instance.custom_attribute_definitions.length}}
{{#iterate_by_two items}}
<div class="row-fluid wrap-row">
{{#list}}
<div... | Disable editing GCA for snapshots | Disable editing GCA for snapshots
| HTML+Django | apache-2.0 | VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,plamut/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,VinnieJohns/... | html+django | ## Code Before:
{{!
Copyright (C) 2016 Google Inc.
Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
}}
<custom-attributes instance="instance">
{{#if instance.custom_attribute_definitions.length}}
{{#iterate_by_two items}}
<div class="row-fluid wrap-row">
{{#lis... |
8e9fb037c73057e0bd3693858fc1854f0525f6cf | lib/ext/promise/_array.js | lib/ext/promise/_array.js | // Used by promise extensions that are based on array extensions.
'use strict';
var callable = require('es5-ext/lib/Object/valid-callable')
, deferred = require('../../deferred')
module.exports = function (name, ext) {
deferred.extend(name, function (cb) {
var def;
(cb == null) || callable(cb);
if (!this.pe... | // Used by promise extensions that are based on array extensions.
'use strict';
var callable = require('es5-ext/lib/Object/valid-callable')
, deferred = require('../../deferred')
module.exports = function (name, ext) {
deferred.extend(name, function (cb) {
var def;
(cb == null) || callable(cb);
if (!this.pe... | Fix length of arguments in promise extensions | Fix length of arguments in promise extensions
| JavaScript | isc | medikoo/deferred | javascript | ## Code Before:
// Used by promise extensions that are based on array extensions.
'use strict';
var callable = require('es5-ext/lib/Object/valid-callable')
, deferred = require('../../deferred')
module.exports = function (name, ext) {
deferred.extend(name, function (cb) {
var def;
(cb == null) || callable(cb)... |
50fa164c4b09845bfa262c2f6959a3c5dfd6f76b | fluentcheck/classes/is_cls.py | fluentcheck/classes/is_cls.py | from typing import Any
from ..assertions_is.booleans import __IsBool
from ..assertions_is.collections import __IsCollections
from ..assertions_is.dicts import __IsDicts
from ..assertions_is.emptiness import __IsEmptiness
from ..assertions_is.geo import __IsGeo
from ..assertions_is.numbers import __IsNumbers
from ..ass... | from typing import Any
from ..assertions_is.booleans import __IsBool
from ..assertions_is.collections import __IsCollections
from ..assertions_is.dicts import __IsDicts
from ..assertions_is.emptiness import __IsEmptiness
from ..assertions_is.geo import __IsGeo
from ..assertions_is.numbers import __IsNumbers
from ..ass... | Remove methods with unnecessary super delegation. | Remove methods with unnecessary super delegation. | Python | mit | csparpa/check | python | ## Code Before:
from typing import Any
from ..assertions_is.booleans import __IsBool
from ..assertions_is.collections import __IsCollections
from ..assertions_is.dicts import __IsDicts
from ..assertions_is.emptiness import __IsEmptiness
from ..assertions_is.geo import __IsGeo
from ..assertions_is.numbers import __IsNu... |
810e3a962b24bbdb3d0816afb0cb6c39ab41057b | .travis.yml | .travis.yml | language: java
jdk:
- oraclejdk7
before_script:
- "echo $JAVA_OPTS"
- "echo $MAVEN_OPTS"
- "export JAVA_OPTS=-Xmx2g"
- "export MAVEN_OPTS=-Xmx2g"
install: mvn -q install -DskipTests=true
| language: java
jdk:
- oraclejdk7
before_script:
- "echo $JAVA_OPTS"
- "echo $MAVEN_OPTS"
install: mvn install -DskipTests=true
| Update to experiment with heap sizes | Update to experiment with heap sizes
| YAML | apache-2.0 | ikawaha/kuromoji,atilika/kuromoji,makigumo/kuromoji,yodasantu/kuromoji,gerryhocks/kuromoji,cmoen/kuromoji,sevenno7/kuromoji | yaml | ## Code Before:
language: java
jdk:
- oraclejdk7
before_script:
- "echo $JAVA_OPTS"
- "echo $MAVEN_OPTS"
- "export JAVA_OPTS=-Xmx2g"
- "export MAVEN_OPTS=-Xmx2g"
install: mvn -q install -DskipTests=true
## Instruction:
Update to experiment with heap sizes
## Code After:
language: java
jdk:
- oraclejdk7
be... |
8125ff00d05ee6fed17e02e17802ca92ad99d26a | README.md | README.md | fuzzy-happiness
===============
A SQL database anonymization tool
| fuzzy-happiness
===============
A SQL database anonymization tool
Setting up a test environment
=============================
Do something like this:
sudo apt-get install virtualenvwrapper
source /etc/bash_completion.d/virtualenvwrapper
mkvirtualenv fh
toggleglobalsitepackages
python setup.up develop
fh... | Add a sample setup to the readme | Add a sample setup to the readme
| Markdown | apache-2.0 | rcbau/fuzzy-happiness | markdown | ## Code Before:
fuzzy-happiness
===============
A SQL database anonymization tool
## Instruction:
Add a sample setup to the readme
## Code After:
fuzzy-happiness
===============
A SQL database anonymization tool
Setting up a test environment
=============================
Do something like this:
sudo apt-get in... |
0f114a144268bb611ff00db9917756a8c02f84b9 | project/api/signals.py | project/api/signals.py | from django.db.models.signals import pre_delete
from django.db.models.signals import pre_save
from django.dispatch import receiver
from django.conf import settings
# Local
from .models import User
from .tasks import delete_account
@receiver(pre_delete, sender=User)
def user_pre_delete(sender, instance, **kwargs):
... | from django.db.models.signals import pre_delete
from django.db.models.signals import pre_save
from django.dispatch import receiver
from django.conf import settings
# Local
from .models import User
from .tasks import activate_user
from .tasks import delete_account
@receiver(pre_delete, sender=User)
def user_pre_delet... | Connect person to user account | Connect person to user account
| Python | bsd-2-clause | barberscore/barberscore-api,dbinetti/barberscore-django,barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,dbinetti/barberscore,barberscore/barberscore-api | python | ## Code Before:
from django.db.models.signals import pre_delete
from django.db.models.signals import pre_save
from django.dispatch import receiver
from django.conf import settings
# Local
from .models import User
from .tasks import delete_account
@receiver(pre_delete, sender=User)
def user_pre_delete(sender, instanc... |
f00f0caf6486ffcc110e04b36da793f7b95601e7 | .travis.yml | .travis.yml | language: go
go:
- tip
- 1.2
install:
- export GOPATH="$HOME/gopath"
- mkdir -p "$GOPATH/src/zombiezen.com/go"
- mv "$TRAVIS_BUILD_DIR" "$GOPATH/src/zombiezen.com/go/capnproto"
- go get -v -t -d zombiezen.com/go/capnproto
script:
- go test -v zombiezen.com/go/capnproto/...
| language: go
go:
- tip
- 1.2
install:
# Install capnp
- cd "$HOME"
- wget -O capnproto.tar.gz https://capnproto.org/capnproto-c++-0.5.1.2.tar.gz
- cd capnproto-c++-0.5.1.2
- ./configure
- make -j6 check
- sudo make install
# Install go-capnproto
- export GOPATH="$HOME/gopath"
- mkdir -p "$GOPATH/src/zombiezen.com/go"... | Add step in Travis config to install capnp | Add step in Travis config to install capnp
| YAML | mit | zombiezen/go-capnproto,zombiezen/go-capnproto2,zombiezen/go-capnproto2,hodduc/go-capnproto2,zombiezen/go-capnproto,hodduc/go-capnproto2 | yaml | ## Code Before:
language: go
go:
- tip
- 1.2
install:
- export GOPATH="$HOME/gopath"
- mkdir -p "$GOPATH/src/zombiezen.com/go"
- mv "$TRAVIS_BUILD_DIR" "$GOPATH/src/zombiezen.com/go/capnproto"
- go get -v -t -d zombiezen.com/go/capnproto
script:
- go test -v zombiezen.com/go/capnproto/...
## Instruction:
Add step i... |
35eebec7e40214f6d5c441c2ce64c880a3d1b9e5 | api/EventListener/JsonRequestListener.php | api/EventListener/JsonRequestListener.php | <?php
/*
* This file is part of Contao Manager.
*
* (c) Contao Association
*
* @license LGPL-3.0-or-later
*/
namespace Contao\ManagerApi\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\KernelEvent;
use Symfony\Component\HttpKernel\Exception\... | <?php
/*
* This file is part of Contao Manager.
*
* (c) Contao Association
*
* @license LGPL-3.0-or-later
*/
namespace Contao\ManagerApi\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\KernelEvent;
use Symfony\Component\HttpKernel\Exception\... | Allow a controller to accept non-json data by setting route attribute | Allow a controller to accept non-json data by setting route attribute
| PHP | mit | contao/package-manager | php | ## Code Before:
<?php
/*
* This file is part of Contao Manager.
*
* (c) Contao Association
*
* @license LGPL-3.0-or-later
*/
namespace Contao\ManagerApi\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\KernelEvent;
use Symfony\Component\HttpK... |
a08c6469525bb1d182cda606bbe2bdeb155d591b | core/app/assets/config/refinery_core_manifest.js | core/app/assets/config/refinery_core_manifest.js | //= link_tree ../images
//= link refinery/refinery.js
//= link admin.js
//= link modernizr-min.js
//= link refinery/refinery.css
//= link refinery/formatting.css
//= link refinery/site_bar.css
//= link refinery/theme.css | //= link_tree ../images
//= link refinery/refinery.js
//= link refinery/sortable_list.js
//= link refinery/nestedsortables.js
//= link refinery/serializelist.js
//= link refinery/tree.js
//= link admin.js
//= link modernizr-min.js
//= link refinery/refinery.css
//= link refinery/formatting.css
//= link refinery/site_... | Add missing js assets in core manifest | Add missing js assets in core manifest
| JavaScript | mit | anitagraham/refinerycms,refinery/refinerycms,anitagraham/refinerycms,refinery/refinerycms,anitagraham/refinerycms,refinery/refinerycms | javascript | ## Code Before:
//= link_tree ../images
//= link refinery/refinery.js
//= link admin.js
//= link modernizr-min.js
//= link refinery/refinery.css
//= link refinery/formatting.css
//= link refinery/site_bar.css
//= link refinery/theme.css
## Instruction:
Add missing js assets in core manifest
## Code After:
//= link_t... |
5b057575255fc56845c37bae3289da0a72fe93a4 | src/routerViewPort.js | src/routerViewPort.js | import {TemplateDirective, View, ViewPort, ViewFactory, InitAttrs} from 'templating';
import {Injector, Inject} from 'di';
@TemplateDirective({selector: 'router-view-port'})
export class RouterViewPort {
@Inject(ViewFactory, ViewPort, 'executionContext', Injector, InitAttrs)
constructor(viewFactory, viewPort, exec... | import {TemplateDirective, View, ViewPort, ViewFactory, InitAttrs} from 'templating';
import {Injector, Inject} from 'di';
@TemplateDirective({selector: 'router-view-port'})
export class RouterViewPort {
@Inject(ViewFactory, ViewPort, 'executionContext', Injector, InitAttrs)
constructor(viewFactory, viewPort, exec... | Update the newest templating API | chore(templating): Update the newest templating API | JavaScript | apache-2.0 | shangyilim/router,JanPietrzyk/router,rakeshbhavsar/router,excellalabs/router,shangyilim/router,loomio/router,kyroskoh/router,angular/router,excellalabs/router,JanPietrzyk/router,kyroskoh/router,IgorMinar/router,AyogoHealth/router,rakeshbhavsar/router,AyogoHealth/router,shangyilim/router,IgorMinar/router,IgorMinar/route... | javascript | ## Code Before:
import {TemplateDirective, View, ViewPort, ViewFactory, InitAttrs} from 'templating';
import {Injector, Inject} from 'di';
@TemplateDirective({selector: 'router-view-port'})
export class RouterViewPort {
@Inject(ViewFactory, ViewPort, 'executionContext', Injector, InitAttrs)
constructor(viewFactory... |
47088dd1ed69207e6e74af98c1f6a4124493ed0c | forum/forms.py | forum/forms.py | from django.forms import ModelForm,Textarea,TextInput
from .models import Post
class PostForm(ModelForm):
class Meta:
model = Post
fields = ('subject','body')
widgets = {
'subject': TextInput(attrs={'autofocus':'autofocus'}),
'body': Textarea(
... | from django.forms import ModelForm,Textarea,TextInput
from .models import Post
class PostForm(ModelForm):
class Meta:
model = Post
fields = ('subject','body')
widgets = {
'subject': TextInput(attrs={'autofocus':'autofocus'}),
'body': Textarea(
... | Use Octicons in Markdown editor | Use Octicons in Markdown editor
| Python | mit | Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters,Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters | python | ## Code Before:
from django.forms import ModelForm,Textarea,TextInput
from .models import Post
class PostForm(ModelForm):
class Meta:
model = Post
fields = ('subject','body')
widgets = {
'subject': TextInput(attrs={'autofocus':'autofocus'}),
'body': Textar... |
7daa30c1f9116882c449f243848bfb3369c0dc1f | package.json | package.json | {
"name": "linter-julia",
"main": "./lib/index.js",
"version": "0.7.2",
"description": "Lint.jl support for Atom using the linter package",
"keywords": [
"Julia",
"julia",
"Lint.jl",
"linter",
"linter-julia"
],
"repository": "https://github.com/TeroFrondelius/linter-julia.git",
"lice... | {
"name": "linter-julia",
"main": "./lib/index.js",
"version": "0.7.2",
"description": "Lint.jl support for Atom using the linter package",
"keywords": [
"Julia",
"julia",
"Lint.jl",
"linter",
"linter-julia"
],
"repository": "https://github.com/TeroFrondelius/linter-julia.git",
"lice... | Add devDeps and configSchema in manifest | :new: Add devDeps and configSchema in manifest
| JSON | mit | TeroFrondelius/linter-julia | json | ## Code Before:
{
"name": "linter-julia",
"main": "./lib/index.js",
"version": "0.7.2",
"description": "Lint.jl support for Atom using the linter package",
"keywords": [
"Julia",
"julia",
"Lint.jl",
"linter",
"linter-julia"
],
"repository": "https://github.com/TeroFrondelius/linter-jul... |
ae36dec159a005b97edb95589438c4ff3886dc2a | test/Analysis/osobjectcstylecastchecker_test.cpp | test/Analysis/osobjectcstylecastchecker_test.cpp | // RUN: %clang_analyze_cc1 -analyzer-checker=optin.osx.OSObjectCStyleCast %s -verify
#include "os_object_base.h"
struct OSArray : public OSObject {
unsigned getCount();
};
struct A {
int x;
};
struct B : public A {
unsigned getCount();
};
unsigned warn_on_explicit_downcast(OSObject * obj) {
OSArray *a = (OSA... | // RUN: %clang_analyze_cc1 -analyzer-checker=optin.osx.OSObjectCStyleCast %s -verify
#include "os_object_base.h"
struct OSArray : public OSObject {
unsigned getCount();
};
struct A {
int x;
};
struct B : public A {
unsigned getCount();
};
unsigned warn_on_explicit_downcast(OSObject * obj) {
OSArray *a = (OSA... | Fix test to pass on LLP64 targets | Fix test to pass on LLP64 targets
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@353654 91177308-0d34-0410-b5e6-96231b3b80d8
| C++ | apache-2.0 | llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/cl... | c++ | ## Code Before:
// RUN: %clang_analyze_cc1 -analyzer-checker=optin.osx.OSObjectCStyleCast %s -verify
#include "os_object_base.h"
struct OSArray : public OSObject {
unsigned getCount();
};
struct A {
int x;
};
struct B : public A {
unsigned getCount();
};
unsigned warn_on_explicit_downcast(OSObject * obj) {
O... |
667439418eb9e08e9a7cc03686689f00672cf919 | src/components/App.js | src/components/App.js | import React, {PropTypes} from 'react';
import LeftSidebar from "./views/leftsidebar/LeftSidebar";
import {appComponents} from "./ConfigMap";
import AppController from "./controller/AppController";
class App extends React.Component {
render(){
return (
<div className="app-wrapper ">
<div className="row ... | import React, {PropTypes} from 'react';
import LeftSidebar from "./views/leftsidebar/LeftSidebar";
import {appComponents} from "./ConfigMap";
import AppController from "./controller/AppController";
class App extends React.Component {
render(){
return (
<div className="app-wrapper ">
<div className="row vis... | Add text for mobile devices | Add text for mobile devices
| JavaScript | mit | DataKind-BLR/antara,DataKind-BLR/antara,DataKind-BLR/antara | javascript | ## Code Before:
import React, {PropTypes} from 'react';
import LeftSidebar from "./views/leftsidebar/LeftSidebar";
import {appComponents} from "./ConfigMap";
import AppController from "./controller/AppController";
class App extends React.Component {
render(){
return (
<div className="app-wrapper ">
<div... |
0d34aa78b7803a39c9bd4cdb53e9a04a9356405f | src/_variables.scss | src/_variables.scss | $loader-color: #0052ec;
$loader-size: 56px;
$loader-height: 20px;
$loader-border-size: 8px;
$loader-gap: 12px;
$loader-animation-duration: 1s;
| $loader-color: #0052ec !default;
$loader-size: 56px !default;
$loader-height: 20px !default;
$loader-border-size: 8px !default;
$loader-gap: 12px !default;
$loader-animation-duration: 1s !default;
| Add the `!default` flag to variables so that they can be overriden | Add the `!default` flag to variables so that they can be overriden
| SCSS | mit | MatejKustec/SpinThatShit | scss | ## Code Before:
$loader-color: #0052ec;
$loader-size: 56px;
$loader-height: 20px;
$loader-border-size: 8px;
$loader-gap: 12px;
$loader-animation-duration: 1s;
## Instruction:
Add the `!default` flag to variables so that they can be overriden
## ... |
e28a8281bf0ef2c55acdababed95af3867b74c01 | johannes-code-generator/src/main/java/ch/johannes/FileUtil.java | johannes-code-generator/src/main/java/ch/johannes/FileUtil.java | package ch.johannes;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class FileUtil {
public static String readFileInPackage(Object instanceOfPackage, String filename) {
try {
Package aPackage = instanceO... | package ch.johannes;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class FileUtil {
public static String readFileInPackage(Object instanceOfPackage, String filename) {
Package aPackage = instanceOfPackage.getClass(... | Use new style try finally to close resources | Use new style try finally to close resources
| Java | mit | tschoenti/johannes | java | ## Code Before:
package ch.johannes;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class FileUtil {
public static String readFileInPackage(Object instanceOfPackage, String filename) {
try {
Package aPac... |
f12ae51bc77ff48bb461a27e54e91bae00d7c6c6 | Tests/VisualRecognitionV3Tests/createClassifier.sh | Tests/VisualRecognitionV3Tests/createClassifier.sh |
API_KEY="your-api-key-here"
VERSION=2018-03-19
curl -X POST \
-F "car_positive_examples=@Classes/cars.zip" \
-F "negative_examples=@Classes/trucks.zip" \
-F "name=CarsVsTrucks - do not delete" \
"https://gateway-a.watsonplatform.net/visual-recognition/api/v3/classifiers?api_key=${API_KEY}&version=${VE... |
API_KEY="your-api-key-here"
VERSION=2018-03-19
curl -X POST \
-F "car_positive_examples=@Resources/cars.zip" \
-F "negative_examples=@Resources/trucks.zip" \
-F "name=CarsVsTrucks - do not delete" \
"https://gateway-a.watsonplatform.net/visual-recognition/api/v3/classifiers?api_key=${API_KEY}&version=... | Fix createClassifer script for reorganized test resources | Fix createClassifer script for reorganized test resources
| Shell | apache-2.0 | watson-developer-cloud/ios-sdk,watson-developer-cloud/ios-sdk,watson-developer-cloud/ios-sdk,watson-developer-cloud/ios-sdk,watson-developer-cloud/ios-sdk | shell | ## Code Before:
API_KEY="your-api-key-here"
VERSION=2018-03-19
curl -X POST \
-F "car_positive_examples=@Classes/cars.zip" \
-F "negative_examples=@Classes/trucks.zip" \
-F "name=CarsVsTrucks - do not delete" \
"https://gateway-a.watsonplatform.net/visual-recognition/api/v3/classifiers?api_key=${API_K... |
b28487ac600398ba652b547b9b4e3c6f1a1d2741 | ensembl/htdocs/ssi/species/Capra_hircus_assembly.html | ensembl/htdocs/ssi/species/Capra_hircus_assembly.html | <p>The CVASU_BBG_1.0 assembly was submitted by Bangladesh Goat Genome Consortium (BGGC) on March 2019. The assembly is on chromosome level, consisting of 3,696,314 contigs assembled into 3,972 scaffolds. From these sequences, 29 chromosomes have been built. The N50 size is the length such that 50% of the assembled geno... | <p>The ARS1 assembly was submitted by USDA ARS on 24/08/2016. The assembly is on the chromosome level, consisting of 30,399 contigs assembled into 29,907 scaffolds. The N50 size is the length such that 50% of the assembled genome lies in blocks of the N50 size or longer. The N50 length for the contigs is 26,244,591 bp ... | Revert assembly information to ARS1 | Revert assembly information to ARS1
| HTML | apache-2.0 | Ensembl/public-plugins,Ensembl/public-plugins,Ensembl/public-plugins | html | ## Code Before:
<p>The CVASU_BBG_1.0 assembly was submitted by Bangladesh Goat Genome Consortium (BGGC) on March 2019. The assembly is on chromosome level, consisting of 3,696,314 contigs assembled into 3,972 scaffolds. From these sequences, 29 chromosomes have been built. The N50 size is the length such that 50% of th... |
42547eeee13514da9b8720bdc3821d192f78bbda | doc/InstallationOnWindows.md | doc/InstallationOnWindows.md |
<div id="container">
<p>
<a href="https://github.com/cpmech/gosl/blob/master/doc/InstallationOnWindows.md"><img src="icon-windows.png"></a>
</p>
</div>
## Quick Install
1. Install *Python(x,y)-2.7.10.0.exe* from http://python-xy.github.io/downloads.html
2. Install *Git+Bash* from https://git-scm.com/download/win **I... |
<div id="container">
<p>
<a href="https://github.com/cpmech/gosl/blob/master/doc/InstallationOnWindows.md"><img src="icon-windows.png"></a>
</p>
</div>
## Quick Install
1. Install *Python(x,y)-2.7.10.0.exe* from http://python-xy.github.io/downloads.html
2. Install *Git+Bash* from https://git-scm.com/download/win **I... | Add information of testing after installation on Windows | Add information of testing after installation on Windows
| Markdown | bsd-3-clause | cpmech/gosl,cpmech/gosl,cpmech/gosl,cpmech/gosl,cpmech/gosl | markdown | ## Code Before:
<div id="container">
<p>
<a href="https://github.com/cpmech/gosl/blob/master/doc/InstallationOnWindows.md"><img src="icon-windows.png"></a>
</p>
</div>
## Quick Install
1. Install *Python(x,y)-2.7.10.0.exe* from http://python-xy.github.io/downloads.html
2. Install *Git+Bash* from https://git-scm.com/... |
833d603b411693d910a5bbaf8902035e4cbddbe5 | asm64/amd64.masm/Tsc.asm | asm64/amd64.masm/Tsc.asm | ;
; Copyright Mehdi Sotoodeh. All rights reserved.
; <mehdisotoodeh@gmail.com>
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that source code retains the
; above copyright notice and following disclaimer.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT ... | ;
; Copyright Mehdi Sotoodeh. All rights reserved.
; <mehdisotoodeh@gmail.com>
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that source code retains the
; above copyright notice and following disclaimer.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT ... | Include upper 32-bits of tsc. | Include upper 32-bits of tsc.
| Assembly | mit | jl777/curve25519,msotoodeh/curve25519,msotoodeh/curve25519 | assembly | ## Code Before:
;
; Copyright Mehdi Sotoodeh. All rights reserved.
; <mehdisotoodeh@gmail.com>
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that source code retains the
; above copyright notice and following disclaimer.
;
; THIS SOFTWARE IS PROVIDED B... |
37a5f22a0150d9c728d64012de1be9bc3fccd5b7 | CMakeLists.txt | CMakeLists.txt | cmake_minimum_required(VERSION 2.8.9)
project(ShapeVariationAnalyzer)
#-----------------------------------------------------------------------------
# Extension meta-information
set(EXTENSION_HOMEPAGE "http://slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/ShapeViarationAnalyzer")
set(EXTENSION_CATEG... | cmake_minimum_required(VERSION 2.8.9)
project(ShapeVariationAnalyzer)
#-----------------------------------------------------------------------------
# Extension meta-information
set(EXTENSION_HOMEPAGE "http://slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/ShapeVariationAnalyzer")
set(EXTENSION_CATEG... | Update metadata for Slicer extension | BUG: Update metadata for Slicer extension
| Text | apache-2.0 | DCBIA-OrthoLab/ShapeVariationAnalyzer,pdedumast/ShapeVariationAnalyzer,DCBIA-OrthoLab/ShapeVariationAnalyzer,pdedumast/ShapeVariationAnalyzer,DCBIA-OrthoLab/ShapeVariationAnalyzer | text | ## Code Before:
cmake_minimum_required(VERSION 2.8.9)
project(ShapeVariationAnalyzer)
#-----------------------------------------------------------------------------
# Extension meta-information
set(EXTENSION_HOMEPAGE "http://slicer.org/slicerWiki/index.php/Documentation/Nightly/Extensions/ShapeViarationAnalyzer")
set... |
711a1e2eb2f333ef488533b5884c159a7bc57b38 | .travis.yml | .travis.yml | language: haskell
script:
- cabal configure --enable-tests && cabal build && cabal test
- cabal sdist
| language: haskell
ghc:
- 7.8
- 7.6
script:
- cabal configure --enable-tests && cabal build && cabal test
- cabal sdist
| Build with both 7.6 and 7.8 | Build with both 7.6 and 7.8
| YAML | bsd-2-clause | supki/meep | yaml | ## Code Before:
language: haskell
script:
- cabal configure --enable-tests && cabal build && cabal test
- cabal sdist
## Instruction:
Build with both 7.6 and 7.8
## Code After:
language: haskell
ghc:
- 7.8
- 7.6
script:
- cabal configure --enable-tests && cabal build && cabal test
- cabal s... |
690c8a068ede844f55bed0fc1b4ddba65f6cb68d | frontend/src/styles/assembly/components/article.scss | frontend/src/styles/assembly/components/article.scss | article {
p {
font-weight: 400;
}
a {
color: #4a9a16;
text-decoration: underline;
}
ul {
padding-left: 15px;
display: block;
margin-bottom: 24px;
}
li {
margin: 5px 0;
padding: 5px 0;
list-style: square;
list-style-position: inside;
font-weight: 400;
line... | article {
p {
font-weight: 400;
}
a {
text-decoration: underline;
color: #4a9a16;
}
ul, ol {
margin-bottom: 24px;
padding-left: 15px;
display: block;
}
li {
margin: 5px 0;
padding: 5px 0;
list-style: square inside;
font-weight: 400;
line-height: 1.4;
// ... | Fix AW-33: numeroitu lista ei toimi. | Fix AW-33: numeroitu lista ei toimi.
| SCSS | mit | Karolain/cms,Assembly-WebCrew/cms,Karolain/cms,Assembly-WebCrew/cms,rubiesonthesky/cms,rubiesonthesky/cms,rubiesonthesky/cms,Assembly-WebCrew/cms,Karolain/cms,Karolain/cms,Assembly-WebCrew/cms,rubiesonthesky/cms | scss | ## Code Before:
article {
p {
font-weight: 400;
}
a {
color: #4a9a16;
text-decoration: underline;
}
ul {
padding-left: 15px;
display: block;
margin-bottom: 24px;
}
li {
margin: 5px 0;
padding: 5px 0;
list-style: square;
list-style-position: inside;
font-weigh... |
e271437f2d52cf239adb7fd41f259e72c9f151a3 | lib/lightchef/resources/directory.rb | lib/lightchef/resources/directory.rb | require 'lightchef'
module Lightchef
module Resources
class Directory < Base
define_option :action, default: :create
define_option :path, type: String, default_name: true
define_option :mode, type: String
define_option :owner, type: String
define_option :group, type: String
d... | require 'lightchef'
module Lightchef
module Resources
class Directory < Base
define_option :action, default: :create
define_option :path, type: String, default_name: true
define_option :mode, type: String
define_option :owner, type: String
define_option :group, type: String
d... | Use change_file_mode and change_file_owner instead of calling run_command directly | Use change_file_mode and change_file_owner instead of calling
run_command directly
| Ruby | mit | sue445/itamae,itamae-kitchen/itamae,maruware/itamae,k0kubun/itamae,k0kubun/itamae,hfm/itamae,hanazuki/itamae,maruware/itamae,KitaitiMakoto/itamae,glensc/itamae,hfm/itamae,uroesch/itamae,tacahilo/itamae,hanazuki/itamae,Rudolph-Miller/itamae,sue445/itamae,itamae-kitchen/itamae,uroesch/itamae,Rudolph-Miller/itamae,Kitaiti... | ruby | ## Code Before:
require 'lightchef'
module Lightchef
module Resources
class Directory < Base
define_option :action, default: :create
define_option :path, type: String, default_name: true
define_option :mode, type: String
define_option :owner, type: String
define_option :group, type:... |
4b90b25f46c4f692ecd15169103ba1ac5b1b9a8c | comp-shell.bash | comp-shell.bash |
if ! kubectl get pod | grep install-r | grep Running > /dev/null 2>&1; then
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: install-r
spec:
replicas: 1
selector:
matchLabels:
app: install-r
template:
metadata:
labels:
app: install-r
spec:
... |
if [ "$1" == "-h" ] || [ "$1" == "--help" ] || [ $# -gt 1 ]; then
echo "Open shell in container image"
echo "Usage: $0 [IMAGE]"
exit 0
fi
image=${1:-comp-20.04-r-deps}
name="comp-shell"
if ! kubectl get pod | grep $name | grep Running > /dev/null 2>&1; then
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
... | Allow shell to other images | Allow shell to other images
| Shell | mit | chipster/chipster-tools,chipster/chipster-tools,chipster/chipster-tools,chipster/chipster-tools | shell | ## Code Before:
if ! kubectl get pod | grep install-r | grep Running > /dev/null 2>&1; then
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
name: install-r
spec:
replicas: 1
selector:
matchLabels:
app: install-r
template:
metadata:
labels:
app: instal... |
1dc3cb759f9ee3873c7f162f1409389c4ddced4a | test/person_test.js | test/person_test.js | describe('person', function() {
var Person = require('../lib/Person').Person;
before(function(done) {
var databank = require('databank'),
DatabankObject = databank.DatabankObject,
Databank = databank.Databank,
db = Databank.get("memory", {});
db.connect({}, function(err)... | var assert = require("assert");
describe('person', function() {
var Person = require('../lib/Person').Person,
Identifier = require('../lib/Identifier').Identifier;
before(function(done) {
var databank = require('databank'),
DatabankObject = databank.DatabankObject,
Databank = data... | Add a create and get test | Add a create and get test
| JavaScript | apache-2.0 | evanp/openfollow | javascript | ## Code Before:
describe('person', function() {
var Person = require('../lib/Person').Person;
before(function(done) {
var databank = require('databank'),
DatabankObject = databank.DatabankObject,
Databank = databank.Databank,
db = Databank.get("memory", {});
db.connect({... |
63300c151084697a4f7cded16ecb82369044afc7 | spec/shorten_spec.rb | spec/shorten_spec.rb | describe '...' do
before do
stub_request(:post, /api\.github.com\/gists\?access_token=.*/).to_return(:body => '{"html_url": "http://github.com/"}')
stub_request(:post, "http://git.io/").to_return(:status => 201, :headers => { 'Location' => 'http://git.io/XXXXXX' })
end
it "should return a shortened versi... | describe '...' do
before do
stub_request(:post, /api\.github.com\/gists/).to_return(:body => '{"html_url": "http://github.com/"}')
stub_request(:post, "http://git.io/").to_return(:status => 201, :headers => { 'Location' => 'http://git.io/XXXXXX' })
end
it "should return a shortened version of the URL" do... | Fix specs when not logged in | Fix specs when not logged in
| Ruby | mit | dLobatog/gist,zmwangx/gist,mofodox/gist,roxyboy/gist,retrography/gist,eLobato/gist,ryanbradynd05/gist,roxyboy/jist,bchase/gist,defunkt/gist,ConradIrwin/jist | ruby | ## Code Before:
describe '...' do
before do
stub_request(:post, /api\.github.com\/gists\?access_token=.*/).to_return(:body => '{"html_url": "http://github.com/"}')
stub_request(:post, "http://git.io/").to_return(:status => 201, :headers => { 'Location' => 'http://git.io/XXXXXX' })
end
it "should return a... |
e23ac51c39b74fba1dc6cd90b5bfbb36e0f11851 | app/views/advancements/show.html.erb | app/views/advancements/show.html.erb | <div class="container">
<div class="row">
<p id="notice"><%= notice %></p>
</div>
<div class="row">
<div class="col-xs-12 text-center">
<h3><%= @advancement.user.name %>'s Advancements</h3>
</div>
</div>
<hr>
<div class="row">
<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 co... | <div class="container">
<div class="row">
<p id="notice"><%= notice %></p>
</div>
<div class="row">
<div class="col-xs-12 text-center">
<h3><%= @advancement.user.name %>'s Advancements</h3>
</div>
</div>
<hr>
<div class="row">
<div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 co... | Add homepage link to show page | Add homepage link to show page
| HTML+ERB | mit | dnguyensr/advancements,dnguyensr/advancements,dnguyensr/advancements | html+erb | ## Code Before:
<div class="container">
<div class="row">
<p id="notice"><%= notice %></p>
</div>
<div class="row">
<div class="col-xs-12 text-center">
<h3><%= @advancement.user.name %>'s Advancements</h3>
</div>
</div>
<hr>
<div class="row">
<div class="col-xs-12 col-sm-10 col-sm-offs... |
429e7e694c94011f09abb693926da8d10feda2e9 | .travis.yml | .travis.yml | language: python
python:
- "2.7"
virtualenv:
system_site_packages: true
before_install:
- sudo apt-get update -qq
- sudo apt-get install git build-essential gfortran python-dev liblapack-dev python-openbabel python-setuptools python-pip
- sudo apt-get install python-rdkit librdkit-dev librdkit1 rdkit-data
... | language: python
python:
- "2.7"
virtualenv:
system_site_packages: true
before_install:
- sudo apt-get update -qq
- sudo apt-get install git build-essential gfortran python-dev liblapack-dev python-openbabel python-setuptools python-pip
- sudo apt-get install python-rdkit librdkit-dev librdkit1 rdkit-data
... | Remove redundant parts from Travis config file. | Remove redundant parts from Travis config file.
--use-mirrors has been deprecated, and pip install . likely isn't needed
| YAML | mit | nickvandewiele/RMG-Py,nyee/RMG-Py,chatelak/RMG-Py,KEHANG/RMG-Py,nyee/RMG-Py,pierrelb/RMG-Py,enochd/RMG-Py,faribas/RMG-Py,enochd/RMG-Py,pierrelb/RMG-Py,nickvandewiele/RMG-Py,KEHANG/RMG-Py,faribas/RMG-Py,comocheng/RMG-Py,comocheng/RMG-Py,chatelak/RMG-Py | yaml | ## Code Before:
language: python
python:
- "2.7"
virtualenv:
system_site_packages: true
before_install:
- sudo apt-get update -qq
- sudo apt-get install git build-essential gfortran python-dev liblapack-dev python-openbabel python-setuptools python-pip
- sudo apt-get install python-rdkit librdkit-dev librdk... |
4b20ca901eb69880532b8417542946be7a45bf58 | scripts/vagrant-debian.sh | scripts/vagrant-debian.sh |
apt-get -y install postgresql
apt-get -y install postgresql-contrib # pg_stat_statements, pg_trgm
apt-get -y install libpq-dev
apt-get -y install python-dev # for building psycopg2
apt-get -y install g++ # for libsass
apt-get -y install git # release.sh and commit process
apt-get -y install npm # for jstests
apt-... |
apt-get -y install postgresql
apt-get -y install postgresql-contrib # pg_stat_statements, pg_trgm
apt-get -y install libpq-dev
apt-get -y install python-dev # for building psycopg2
apt-get -y install g++ # for libsass
apt-get -y install git # release.sh and commit process
apt-get -y install npm # for jstests
apt-... | Install Java for running jstests (selenium) | Install Java for running jstests (selenium)
| Shell | mit | eXcomm/gratipay.com,gratipay/gratipay.com,studio666/gratipay.com,gratipay/gratipay.com,eXcomm/gratipay.com,eXcomm/gratipay.com,studio666/gratipay.com,mccolgst/www.gittip.com,studio666/gratipay.com,studio666/gratipay.com,eXcomm/gratipay.com,gratipay/gratipay.com,mccolgst/www.gittip.com,gratipay/gratipay.com,mccolgst/www... | shell | ## Code Before:
apt-get -y install postgresql
apt-get -y install postgresql-contrib # pg_stat_statements, pg_trgm
apt-get -y install libpq-dev
apt-get -y install python-dev # for building psycopg2
apt-get -y install g++ # for libsass
apt-get -y install git # release.sh and commit process
apt-get -y install npm # ... |
8dd56592b4ba29142b5b2c77ecea77ccedd5190d | .travis.yml | .travis.yml | branches:
only:
- master
jdk:
- openjdk6
- openjdk7
- oraclejdk7
- oraclejdk8
language: clojure
sudo: false
| branches:
only:
- master
jdk:
- openjdk7
- openjdk8
language: clojure
sudo: false
| Test on OpenJDK 7 & 8 | Test on OpenJDK 7 & 8
| YAML | apache-2.0 | maddenp/nml | yaml | ## Code Before:
branches:
only:
- master
jdk:
- openjdk6
- openjdk7
- oraclejdk7
- oraclejdk8
language: clojure
sudo: false
## Instruction:
Test on OpenJDK 7 & 8
## Code After:
branches:
only:
- master
jdk:
- openjdk7
- openjdk8
language: clojure
sudo: false
|
172bba395dc12acc068d632eedb9e0db70bd28c7 | tutor/src/helpers/notifications.coffee | tutor/src/helpers/notifications.coffee | {NotificationActions} = require 'shared'
Router = require './router'
module.exports =
start: (bootstrapData) ->
NotificationActions.startPolling()
for level, message of (bootstrapData.flash or {})
NotificationActions.display({message, level})
buildCallbackHandlers: (comp) ->
router = comp.cont... | {NotificationActions} = require 'shared'
module.exports =
start: (bootstrapData) ->
NotificationActions.startPolling()
for level, message of (bootstrapData.flash or {})
NotificationActions.display({message, level})
buildCallbackHandlers: (comp) ->
# Require router here because requiring it in g... | Move require inside method to fix hot module reloading | Move require inside method to fix hot module reloading
helpers/notifications.coffee is required from the main index file so it
can call Notifications.start()
This was in turn requiring Router outside the HMR <Application> scope, so any file
that also used Router would fail to hot reload
| CoffeeScript | agpl-3.0 | openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js,openstax/tutor-js | coffeescript | ## Code Before:
{NotificationActions} = require 'shared'
Router = require './router'
module.exports =
start: (bootstrapData) ->
NotificationActions.startPolling()
for level, message of (bootstrapData.flash or {})
NotificationActions.display({message, level})
buildCallbackHandlers: (comp) ->
ro... |
9f47d1a3b83e058f92feeffafae68f5838e2d0df | recipes/_package_rhel.rb | recipes/_package_rhel.rb | include_recipe 'yum'
case node['platform_version'].to_f
when 6.4, 6.5
remote_file '/tmp/epel.rpm' do
source 'http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm'
action :create_if_missing
end
package 'epel' do
source '/tmp/epel.rpm'
provider Chef::Provider::P... | include_recipe 'yum'
case node['platform_version'].to_f
when 6.4, 6.5, 6.6, 6.7
remote_file '/tmp/epel.rpm' do
source 'http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm'
action :create_if_missing
end
package 'epel' do
source '/tmp/epel.rpm'
provider Chef::... | Add support for Centos 6.6 and 6.7 | Add support for Centos 6.6 and 6.7
This will indeed work with Centos 6.6 and 6.7 it turns out. | Ruby | mit | dieend/hhvm-cookbook,jubianchi/hhvm-cookbook,aaam/hhvm-cookbook | ruby | ## Code Before:
include_recipe 'yum'
case node['platform_version'].to_f
when 6.4, 6.5
remote_file '/tmp/epel.rpm' do
source 'http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm'
action :create_if_missing
end
package 'epel' do
source '/tmp/epel.rpm'
provider C... |
77e9d92e040b60cc5e894a59ecfde0a91a8f1f8c | coop_cms/apps/email_auth/forms.py | coop_cms/apps/email_auth/forms.py |
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=_(u"Email"))
password = forms.CharField(label=_("Password"), widget=forms.PasswordInput)
def __init__(sel... |
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _, ugettext_lazy as __
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=__(u"Email"))
password = forms.CharField(label=__("Password"), widget=forms.PasswordInput... | Fix translation issue on EmailAuthForm | Fix translation issue on EmailAuthForm
| Python | bsd-3-clause | ljean/coop_cms,ljean/coop_cms,ljean/coop_cms | python | ## Code Before:
from django import forms
from django.contrib.auth import authenticate
from django.utils.translation import ugettext as _
class EmailAuthForm(forms.Form):
email = forms.EmailField(required=True, label=_(u"Email"))
password = forms.CharField(label=_("Password"), widget=forms.PasswordInput)
... |
2220ea3e3349a7f8886503e9bfcdce75b56643a6 | travis/deploy-docs.sh | travis/deploy-docs.sh |
set -euf -o pipefail
target=devdocs
if [ $# -eq 1 ] && [ "$1" == 'release' ];
then
echo 'Deploying docs in RELEASE mode'
target=docs
fi
echo 'Cleaning any existing gh-pages directory'
rm -rf gh-pages
echo 'Cloning gh-pages branch'
git clone -b gh-pages --depth 1 -- git@github.com:CoraleStudios/Colore.git g... |
set -euf -o pipefail
target=devdocs
if [ $# -eq 1 ] && [ "$1" == 'release' ];
then
echo 'Deploying docs in RELEASE mode'
target=docs
fi
echo 'Cleaning any existing gh-pages directory'
rm -rf gh-pages
echo 'Cloning gh-pages branch'
git clone -b gh-pages --depth 1 -- git@github.com:CoraleStudios/Colore.git g... | Use quoted string instead of heredoc in deploy script | Use quoted string instead of heredoc in deploy script
| Shell | mit | CoraleStudios/Colore | shell | ## Code Before:
set -euf -o pipefail
target=devdocs
if [ $# -eq 1 ] && [ "$1" == 'release' ];
then
echo 'Deploying docs in RELEASE mode'
target=docs
fi
echo 'Cleaning any existing gh-pages directory'
rm -rf gh-pages
echo 'Cloning gh-pages branch'
git clone -b gh-pages --depth 1 -- git@github.com:CoraleStud... |
90328191233bb5621e4bc2c941bf887fcc6a2ccf | lib/feeder/concerns/controllers/items_controller.rb | lib/feeder/concerns/controllers/items_controller.rb | module Feeder
module Concerns::Controllers::ItemsController
extend ActiveSupport::Concern
included do
include AuthorizationHelper
respond_to :html, :json
before_action :set_item, only: [:recommend, :unrecommend]
def index
@items = Item.order(sticky: :desc)
Feeder.c... | module Feeder
module Concerns::Controllers::ItemsController
extend ActiveSupport::Concern
included do
include AuthorizationHelper
respond_to :html, :json
before_action :set_item, only: [:recommend, :unrecommend]
helper_method :can_recommend?
def index
@items = Item.o... | Make `can_recommend?` available as a view helper | Make `can_recommend?` available as a view helper
| Ruby | mit | hyperoslo/feeder,hyperoslo/feeder | ruby | ## Code Before:
module Feeder
module Concerns::Controllers::ItemsController
extend ActiveSupport::Concern
included do
include AuthorizationHelper
respond_to :html, :json
before_action :set_item, only: [:recommend, :unrecommend]
def index
@items = Item.order(sticky: :desc)
... |
cfd73fb16a7557047a980a2ab218325e6e6bbe7f | killjack.sh | killjack.sh |
STARTTIME=$(date +%s)
duration () {
expr $(date +%s) - $STARTTIME
}
GOT_JACKD=0
GOT_JACKDMP=0
# Try for 10 seconds.
while [ $(duration) -lt 10 ] ; do
if ! killall -9 jackd ; then
echo "finished killing jackd"
GOT_JACKD=1
fi
if ! killall -9 jackdmp ; then
echo "fi... |
STARTTIME=$(date +%s)
duration () {
expr $(date +%s) - $STARTTIME
}
GOT_JACKD=0
GOT_JACKDMP=0
# Try for 10 seconds.
while [ $(duration) -lt 10 ] ; do
if ! killall -9 jackd ; then
echo "finished killing jackd"
GOT_JACKD=1
else
GOT_JACKD=0 # maybe it reappared?
fi
... | Work even if jack has started while running the script. | Work even if jack has started while running the script.
| Shell | mit | kmatheussen/KillJack,kmatheussen/KillJack | shell | ## Code Before:
STARTTIME=$(date +%s)
duration () {
expr $(date +%s) - $STARTTIME
}
GOT_JACKD=0
GOT_JACKDMP=0
# Try for 10 seconds.
while [ $(duration) -lt 10 ] ; do
if ! killall -9 jackd ; then
echo "finished killing jackd"
GOT_JACKD=1
fi
if ! killall -9 jackdmp ; then
... |
de785337dc36aeb3e752d0db3c210142a94b79bf | setup/debian/desktop-env.sh | setup/debian/desktop-env.sh |
set -e
export PATH="$HOME/.yarn/bin:$PATH"
# Set i3 style
i3-style flat-gray -o ~/.config/i3/config --reload
# Set gtk theme
gtk-theme-switch2 /usr/share/themes/Numix
|
set -e
export PATH="$HOME/.yarn/bin:$PATH"
# Set i3 style
i3-style flat-gray -o ~/.config/i3/config --reload
# Set gtk theme
gtk-theme-switch2 /usr/share/themes/Numix || echo "No X11 session running!"
# German keyboard layout
sudo localectl set-x11-keymap de
| Set keyboard layout and don't crash if X11 isn't running | Set keyboard layout and don't crash if X11 isn't running
| Shell | mit | PhilipTrauner/dotfiles,PhilipTrauner/dotfiles | shell | ## Code Before:
set -e
export PATH="$HOME/.yarn/bin:$PATH"
# Set i3 style
i3-style flat-gray -o ~/.config/i3/config --reload
# Set gtk theme
gtk-theme-switch2 /usr/share/themes/Numix
## Instruction:
Set keyboard layout and don't crash if X11 isn't running
## Code After:
set -e
export PATH="$HOME/.yarn/bin:$PAT... |
359955ff20dad96a5d2ed7b53d59f0e1a845a49e | app/views/lives/show.json.jbuilder | app/views/lives/show.json.jbuilder | json.cache! @live do
json.partial! 'lives/live', live: @live
json.songs @live.songs, partial: 'songs/song', as: :song
end
| json.cache! @live do
json.partial! 'lives/live', live: @live
json.songs @live.songs.played_order, partial: 'songs/song', as: :song
end
| Fix the order of songs | Fix the order of songs
| Ruby | mit | sankichi92/LiveLog,sankichi92/LiveLog,sankichi92/LiveLog,sankichi92/LiveLog | ruby | ## Code Before:
json.cache! @live do
json.partial! 'lives/live', live: @live
json.songs @live.songs, partial: 'songs/song', as: :song
end
## Instruction:
Fix the order of songs
## Code After:
json.cache! @live do
json.partial! 'lives/live', live: @live
json.songs @live.songs.played_order, partial: 'songs/song... |
3bc9e7ab0b941f907167a95ca662ee5e742dd869 | src/app/wizard-equipment-panel/wizard-equipment-panel.component.html | src/app/wizard-equipment-panel/wizard-equipment-panel.component.html | <div class="panel-heading">Equipment </div>
<div class="panel-body">
<button class="btn btn-primary" data-toggle="modal" data-target="#itemModal"><span class="glyphicon glyphicon-plus"></span> Add Item</button><span class="pull-right">Item Slots Available: ({{userMage.openItemSlots}})</span>
<table class="table ta... | <div class="panel-heading">Equipment </div>
<div class="panel-body">
<button class="btn btn-primary pull pull-right" data-toggle="modal" data-target="#itemModal"><span class="glyphicon glyphicon-plus"></span> Add Item</button><span>Item Slots Available: ({{userMage.openItemSlots}})</span>
<table class="table table... | Fix for out of design button placement | Fix for out of design button placement
Fix for out of design button placement
| HTML | mit | ChargerIIC/Frostgrave-WarRoster,ChargerIIC/Frostgrave-WarRoster,ChargerIIC/Frostgrave-WarRoster | html | ## Code Before:
<div class="panel-heading">Equipment </div>
<div class="panel-body">
<button class="btn btn-primary" data-toggle="modal" data-target="#itemModal"><span class="glyphicon glyphicon-plus"></span> Add Item</button><span class="pull-right">Item Slots Available: ({{userMage.openItemSlots}})</span>
<table... |
ddef78334095acf3b240a4fd23b595e876f16b32 | config/initializers/secret_token.rb | config/initializers/secret_token.rb | Marblerun::Application.config.secret_token = '27685cb6fe0e341cadc051456952b33b19a4e17c15fb6275af56b4958c918707ab20d814d942dc6447d32cc03bf6d20e573a2228427534524368b5666a757780'
| Marblerun::Application.config.secret_token = ENV.fetch('SECRET_TOKEN')
| Move secret token to an environment variable | Move secret token to an environment variable
| Ruby | mit | MathiasPaumgarten/marblerun,MathiasPaumgarten/marblerun,MathiasPaumgarten/marblerun | ruby | ## Code Before:
Marblerun::Application.config.secret_token = '27685cb6fe0e341cadc051456952b33b19a4e17c15fb6275af56b4958c918707ab20d814d942dc6447d32cc03bf6d20e573a2228427534524368b5666a757780'
## Instruction:
Move secret token to an environment variable
## Code After:
Marblerun::Application.config.secret_token = ENV.f... |
b447eff6ab022ab2a71e3e227ebac08b907b828e | docs/intro.md | docs/intro.md | The *react-dash-boilerplate* project provides a starter project and a development environment for doing react-dash development. It's a good place to start.
* Make sure that you have npm installed on your system
* Install the react-dashboard-boilerplate project and its dependencies:
```
git clone https://github.com... | The *react-dash-boilerplate* project provides a starter project and a development environment for doing react-dash development. It's a good place to start.
* Make sure that you have npm installed on your system
* Install the react-dashboard-boilerplate project and its dependencies:
```
git clone https://github.com... | Fix link to dev guide - 2 | Fix link to dev guide - 2
| Markdown | mit | NuCivic/react-dashboard,NuCivic/react-dash,NuCivic/react-dashboard,NuCivic/react-dashboard,NuCivic/react-dash,NuCivic/react-dash | markdown | ## Code Before:
The *react-dash-boilerplate* project provides a starter project and a development environment for doing react-dash development. It's a good place to start.
* Make sure that you have npm installed on your system
* Install the react-dashboard-boilerplate project and its dependencies:
```
git clone ht... |
341f58e6d9a4928c50a645540ba33aee6402af8b | manifest-pcf.yml | manifest-pcf.yml | ---
instances: 1
memory: 1024M
applications:
- name: fortune-service
host: fortunes
path: fortune-teller-fortune-service/target/fortune-teller-fortune-service-0.0.1-SNAPSHOT.jar
services:
- fortunes-db
- config-server
- service-registry
- name: fortune-ui
host: fortunes-ui
path: fortune-teller-ui/target... | ---
instances: 1
memory: 1024M
applications:
- name: fortune-service
host: fortunes
path: fortune-teller-fortune-service/target/fortune-teller-fortune-service-0.0.1-SNAPSHOT.jar
services:
- fortunes-db
- config-server
- service-registry
- name: fortune-ui
host: fortunes-ui
path: fortune-teller-ui/target... | Add comment about updating CF_TARGET | Add comment about updating CF_TARGET
| YAML | apache-2.0 | spring-cloud-services-samples/fortune-teller,spring-cloud-services-samples/fortune-teller,spring-cloud-services-samples/fortune-teller,spring-cloud-services-samples/fortune-teller,spring-cloud-services-samples/fortune-teller | yaml | ## Code Before:
---
instances: 1
memory: 1024M
applications:
- name: fortune-service
host: fortunes
path: fortune-teller-fortune-service/target/fortune-teller-fortune-service-0.0.1-SNAPSHOT.jar
services:
- fortunes-db
- config-server
- service-registry
- name: fortune-ui
host: fortunes-ui
path: fortune-... |
3ac4772cbd0b2e5be70da24f8edaa5891ffa1c95 | start.sh | start.sh |
rm -rf /var/run/*
rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid"
mkdir -p /var/run/dbus
chown messagebus:messagebus /var/run/dbus
dbus-uuidgen --ensure
dbus-daemon --system --fork
sleep 1
avahi-daemon -D
sleep 1
HOME=/config start_pms &
sleep 5
tail -f /config/Library/Application... |
rm -rf /var/run/*
rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid"
mkdir -p /var/run/dbus
chown messagebus:messagebus /var/run/dbus
dbus-uuidgen --ensure
dbus-daemon --system --fork
sleep 1
avahi-daemon -D
sleep 1
if [ -f /config/Library/Application\ Support/Plex\ Media\ Server/Pref... | Make container exit after generating new configuration, as noted in README | Make container exit after generating new configuration, as noted in README
| Shell | mit | ecliptik/docker-plex | shell | ## Code Before:
rm -rf /var/run/*
rm -f "/config/Library/Application Support/Plex Media Server/plexmediaserver.pid"
mkdir -p /var/run/dbus
chown messagebus:messagebus /var/run/dbus
dbus-uuidgen --ensure
dbus-daemon --system --fork
sleep 1
avahi-daemon -D
sleep 1
HOME=/config start_pms &
sleep 5
tail -f /config/Lib... |
fff3036979f900a7909b0e05be2c42bbb0057401 | content/software/qualpalr/index.md | content/software/qualpalr/index.md | +++
# Project title.
title = "qualpalr"
# Date this page was created.
date = 2016-04-27T00:00:00
# Project summary to display on homepage.
summary = "Automatic Generation of Qualitative Color Palettes."
# Tags: can be used for filtering projects.
tags = ["R"]
# Optional external URL for project (replaces project de... | +++
# Project title.
title = "qualpalr"
# Date this page was created.
date = 2016-04-27T00:00:00
# Project summary to display on homepage.
summary = "Automatic Generation of Qualitative Color Palettes."
# Tags: can be used for filtering projects.
tags = ["R", "qualpalr", "Color Science"]
# Optional external URL for... | Add a few tags and change URL to pkgdown site | Add a few tags and change URL to pkgdown site
| Markdown | mit | jolars/larssonjohan.com,jolars/larssonjohan.com | markdown | ## Code Before:
+++
# Project title.
title = "qualpalr"
# Date this page was created.
date = 2016-04-27T00:00:00
# Project summary to display on homepage.
summary = "Automatic Generation of Qualitative Color Palettes."
# Tags: can be used for filtering projects.
tags = ["R"]
# Optional external URL for project (rep... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.