commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201
values | license stringclasses 13
values | repos stringlengths 6 116k | config stringclasses 201
values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c20461f187c8a34d1a983b51f281446d88e44d5b | back/src/main/java/org/crunchytorch/coddy/snippet/service/SnippetService.java | back/src/main/java/org/crunchytorch/coddy/snippet/service/SnippetService.java | package org.crunchytorch.coddy.snippet.service;
import org.crunchytorch.coddy.application.exception.EntityNotFoundException;
import org.crunchytorch.coddy.application.service.AbstractService;
import org.crunchytorch.coddy.snippet.elasticsearch.entity.SnippetEntity;
import org.crunchytorch.coddy.snippet.elasticsearch.r... | package org.crunchytorch.coddy.snippet.service;
import org.crunchytorch.coddy.application.exception.EntityNotFoundException;
import org.crunchytorch.coddy.application.service.AbstractService;
import org.crunchytorch.coddy.snippet.elasticsearch.entity.SnippetEntity;
import org.crunchytorch.coddy.snippet.elasticsearch.r... | Use login instead of user's name. | Use login instead of user's name.
| Java | mit | Crunchy-Torch/coddy,Crunchy-Torch/coddy,Crunchy-Torch/coddy,Crunchy-Torch/coddy,Crunchy-Torch/coddy | java | ## Code Before:
package org.crunchytorch.coddy.snippet.service;
import org.crunchytorch.coddy.application.exception.EntityNotFoundException;
import org.crunchytorch.coddy.application.service.AbstractService;
import org.crunchytorch.coddy.snippet.elasticsearch.entity.SnippetEntity;
import org.crunchytorch.coddy.snippet... | package org.crunchytorch.coddy.snippet.service;
import org.crunchytorch.coddy.application.exception.EntityNotFoundException;
import org.crunchytorch.coddy.application.service.AbstractService;
import org.crunchytorch.coddy.snippet.elasticsearch.entity.SnippetEntity;
import org.crunchytorch.coddy.snippet.ela... | 3 | 0.071429 | 2 | 1 |
142e8a3f54d19856770946c0ccbeebbb5b55908e | app/assets/stylesheets/english_tea/typography/_fonts.scss | app/assets/stylesheets/english_tea/typography/_fonts.scss | // ==========================================================================
// Shorthand font family declaration classes
// ==========================================================================
.f
{
font-family: $type-font-body;
font-weight: $type-weight-normal;
letter-spacing: normal;
text-transform: $type... | // ==========================================================================
// Shorthand font family declaration classes
// ==========================================================================
.f
{
font-family: $type-font-body;
font-weight: $type-weight-normal;
letter-spacing: normal;
text-transform: $type... | Adjust letter spacing when using .no-caps with title/status fonts | Adjust letter spacing when using .no-caps with title/status fonts
| SCSS | mit | workingnotworking/english_tea,workingnotworking/english_tea | scss | ## Code Before:
// ==========================================================================
// Shorthand font family declaration classes
// ==========================================================================
.f
{
font-family: $type-font-body;
font-weight: $type-weight-normal;
letter-spacing: normal;
text-... | // ==========================================================================
// Shorthand font family declaration classes
// ==========================================================================
.f
{
font-family: $type-font-body;
font-weight: $type-weight-normal;
letter-spacing: normal;
t... | 8 | 0.186047 | 8 | 0 |
79a1b9dee64362cb151c24c6513b908509806070 | .travis.yml | .travis.yml | language: go
go_import_path: github.com/grokify/gotilla
go:
- "1.11.x"
- "1.10.x"
- "1.9.x"
- "1.8.x"
- master
matrix:
allow_failures:
- go: "1.8.x"
- go: master
sudo: true
before_install:
- sudo apt-get update -qq > apt-get.out 2>&1 || (cat apt-get.out && exit 1)
- sudo apt-get install libgmp-... | language: go
go_import_path: github.com/grokify/gotilla
go:
- "1.12.x"
- "1.11.x"
- "1.10.x"
- "1.9.x"
- "1.8.x"
- master
matrix:
allow_failures:
- go: "1.8.x"
- go: master
sudo: true
before_install:
- sudo apt-get update -qq > apt-get.out 2>&1 || (cat apt-get.out && exit 1)
- sudo apt-get in... | Support Go 1.12 on CI | Support Go 1.12 on CI
| YAML | mit | grokify/gotilla,grokify/gotilla | yaml | ## Code Before:
language: go
go_import_path: github.com/grokify/gotilla
go:
- "1.11.x"
- "1.10.x"
- "1.9.x"
- "1.8.x"
- master
matrix:
allow_failures:
- go: "1.8.x"
- go: master
sudo: true
before_install:
- sudo apt-get update -qq > apt-get.out 2>&1 || (cat apt-get.out && exit 1)
- sudo apt-get... | language: go
go_import_path: github.com/grokify/gotilla
go:
+ - "1.12.x"
- "1.11.x"
- "1.10.x"
- "1.9.x"
- "1.8.x"
- master
matrix:
allow_failures:
- go: "1.8.x"
- go: master
sudo: true
before_install:
- sudo apt-get update -qq > apt-get.out 2>&1 || (cat apt-get.ou... | 1 | 0.041667 | 1 | 0 |
b47718024df7cade6cb5fb72b7a2470e7633f95f | kjots/icons/CMakeLists.txt | kjots/icons/CMakeLists.txt |
install( FILES filedel.png DESTINATION ${DATA_INSTALL_DIR}/kjots/pics)
kde4_install_icons( ${ICON_INSTALL_DIR} hicolor )
#original Makefile.am contents follow:
#
#pics_DATA = filedel.png
#picsdir = $(kde_datadir)/kjots/pics
#
#KDE_ICON = kjots
#
|
install( FILES filedel.png DESTINATION ${DATA_INSTALL_DIR}/kjots/pics)
kde4_install_icons( ${ICON_INSTALL_DIR} hicolor )
| Clean cmakelists.txt use cmake variable and not just lib name | Clean cmakelists.txt
use cmake variable and not just lib name
svn path=/trunk/KDE/kdeutils/kjots/icons/; revision=565104
| Text | lgpl-2.1 | lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi | text | ## Code Before:
install( FILES filedel.png DESTINATION ${DATA_INSTALL_DIR}/kjots/pics)
kde4_install_icons( ${ICON_INSTALL_DIR} hicolor )
#original Makefile.am contents follow:
#
#pics_DATA = filedel.png
#picsdir = $(kde_datadir)/kjots/pics
#
#KDE_ICON = kjots
#
## Instruction:
Clean cmakelists.txt
use cmake v... |
install( FILES filedel.png DESTINATION ${DATA_INSTALL_DIR}/kjots/pics)
kde4_install_icons( ${ICON_INSTALL_DIR} hicolor )
-
-
- #original Makefile.am contents follow:
-
- #
- #pics_DATA = filedel.png
- #picsdir = $(kde_datadir)/kjots/pics
- #
- #KDE_ICON = kjots
- # | 10 | 0.625 | 0 | 10 |
b9cfe30985a23fdbc866355f8da8ad6bf11f9409 | app.rb | app.rb |
require "base64"
require "multi_json"
require "open-uri"
require "sass"
require "sinatra"
require "sinatra/json"
require "sinatra/reloader" if development?
# Credentials -----------------------------------------------------------------
set :email, ""
set :password, ""
set :app_key, ""
# Configuration --------------... |
require "base64"
require "multi_json"
require "open-uri"
require "sass"
require "sinatra"
require "sinatra/json"
require "sinatra/reloader" if development?
# Credentials -----------------------------------------------------------------
set :email, ENV["PINGDOM_EMAIL"]
set :password, ENV["PINGDOM_PASSWORD"]
set :app_... | Use environment variables for Pingdom credentials, by default. | Use environment variables for Pingdom credentials, by default.
| Ruby | mit | jsmecham/pingdom-status-board-widget | ruby | ## Code Before:
require "base64"
require "multi_json"
require "open-uri"
require "sass"
require "sinatra"
require "sinatra/json"
require "sinatra/reloader" if development?
# Credentials -----------------------------------------------------------------
set :email, ""
set :password, ""
set :app_key, ""
# Configuratio... |
require "base64"
require "multi_json"
require "open-uri"
require "sass"
require "sinatra"
require "sinatra/json"
require "sinatra/reloader" if development?
# Credentials -----------------------------------------------------------------
- set :email, ""
- set :password, ""
+ set :email, ENV["PIN... | 4 | 0.095238 | 2 | 2 |
4041887607286f2302caaa16b1dd762c546f5876 | Classes/Sandstorm/Newsletter/Domain/Model/JsonReceiverSource.php | Classes/Sandstorm/Newsletter/Domain/Model/JsonReceiverSource.php | <?php
/**
* Created by IntelliJ IDEA.
* User: sebastian
* Date: 27.05.15
* Time: 13:15
*/
namespace Sandstorm\Newsletter\Domain\Model;
use Doctrine\Common\Collections\ArrayCollection;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Persistence\PersistenceManagerInterface;
use Doctrine\ORM\Mapping as ORM;
/**... | <?php
/**
* Created by IntelliJ IDEA.
* User: sebastian
* Date: 27.05.15
* Time: 13:15
*/
namespace Sandstorm\Newsletter\Domain\Model;
use Doctrine\Common\Collections\ArrayCollection;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Persistence\PersistenceManagerInterface;
use Doctrine\ORM\Mapping as ORM;
/**... | Add support for relative source file in ReceiverSource | TASK: Add support for relative source file in ReceiverSource
| PHP | mit | sandstorm/Newsletter,sandstorm/Newsletter,sandstorm/Newsletter | php | ## Code Before:
<?php
/**
* Created by IntelliJ IDEA.
* User: sebastian
* Date: 27.05.15
* Time: 13:15
*/
namespace Sandstorm\Newsletter\Domain\Model;
use Doctrine\Common\Collections\ArrayCollection;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Persistence\PersistenceManagerInterface;
use Doctrine\ORM\Mapp... | <?php
/**
* Created by IntelliJ IDEA.
* User: sebastian
* Date: 27.05.15
* Time: 13:15
*/
namespace Sandstorm\Newsletter\Domain\Model;
use Doctrine\Common\Collections\ArrayCollection;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Persistence\PersistenceManagerInterface;
use Doctr... | 7 | 0.134615 | 6 | 1 |
40726da5b9de46a4b0c0fa25326fd0dc9822c59b | src/land_registry_elements/language-switcher/template.html | src/land_registry_elements/language-switcher/template.html | {% macro language_switcher(lang) %}
<div class="language-switcher {% if not lang=='en' %}language-switcher-invert{% endif %}">
<form method="get">
{% if lang=='en' %}
<span class="language-switcher-current">
<span class="visuallyhidden">Current language:</span> English
</span>
... | {% macro language_switcher(lang) %}
<div class="language-switcher {% if not lang=='en' %}language-switcher-invert{% endif %}">
<form method="get">
{% for key in request.args %}
{% if key != 'language' %}
<input type="hidden" name="{{key}}" value="{{request.args[key]}}" />
{% endif ... | Fix language switcher logic to pass get params across | Fix language switcher logic to pass get params across | HTML | mit | LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements,LandRegistry/land-registry-elements | html | ## Code Before:
{% macro language_switcher(lang) %}
<div class="language-switcher {% if not lang=='en' %}language-switcher-invert{% endif %}">
<form method="get">
{% if lang=='en' %}
<span class="language-switcher-current">
<span class="visuallyhidden">Current language:</span> English
... | {% macro language_switcher(lang) %}
<div class="language-switcher {% if not lang=='en' %}language-switcher-invert{% endif %}">
<form method="get">
+ {% for key in request.args %}
+ {% if key != 'language' %}
+ <input type="hidden" name="{{key}}" value="{{request.args[key]}}" />
+ ... | 6 | 0.222222 | 6 | 0 |
cb93e8579790aea01ec89d0de19eb214e13fb21c | app/views/homePage.scala.html | app/views/homePage.scala.html | @*
* Copyright 2010-2014 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | @*
* Copyright 2010-2014 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agre... | Change coming soon to just released on the home page. | Change coming soon to just released on the home page.
| HTML | apache-2.0 | scalatest/scalactic-website,scalatest/scalactic-website | html | ## Code Before:
@*
* Copyright 2010-2014 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applic... | @*
* Copyright 2010-2014 Artima, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | 2 | 0.064516 | 1 | 1 |
4785a5e8d639dea1a9cf767d2c77f6bd9dbe2433 | leapp/cli/upgrade/__init__.py | leapp/cli/upgrade/__init__.py | from leapp.utils.clicmd import command, command_opt
from leapp.repository.scan import find_and_scan_repositories
from leapp.config import get_config
from leapp.logger import configure_logger
def load_repositories_from(name, repo_path, manager=None):
if get_config().has_option('repositories', name):
repo_p... | from leapp.utils.clicmd import command, command_opt
from leapp.repository.scan import find_and_scan_repositories
from leapp.config import get_config
from leapp.logger import configure_logger
def load_repositories_from(name, repo_path, manager=None):
if get_config().has_option('repositories', name):
repo_p... | Add back missing manager creation | leapp: Add back missing manager creation
| Python | lgpl-2.1 | leapp-to/prototype,vinzenz/prototype,leapp-to/prototype,vinzenz/prototype,vinzenz/prototype,leapp-to/prototype,vinzenz/prototype,leapp-to/prototype | python | ## Code Before:
from leapp.utils.clicmd import command, command_opt
from leapp.repository.scan import find_and_scan_repositories
from leapp.config import get_config
from leapp.logger import configure_logger
def load_repositories_from(name, repo_path, manager=None):
if get_config().has_option('repositories', name)... | from leapp.utils.clicmd import command, command_opt
from leapp.repository.scan import find_and_scan_repositories
from leapp.config import get_config
from leapp.logger import configure_logger
def load_repositories_from(name, repo_path, manager=None):
if get_config().has_option('repositories', name)... | 2 | 0.08 | 1 | 1 |
f3efa6b7847a1e0c6b3997bc74b7b910963a6b2a | .travis.yml | .travis.yml | language: c
sudo: required
dist: trusty
compiler:
- gcc
# - clang
env:
- PGVERSION1=10
- PGVERSION2=10
addons:
apt:
packages:
- libperl-dev
# install PostgreSQL
# if PGVERSION1 != PGVERSION2, install both versions
before_install:
- curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt... | language: c
sudo: required
dist: trusty
compiler:
- gcc
# - clang
env:
- PGVERSION1=10
- PGVERSION2=10
addons:
apt:
packages:
- libperl-dev
# install PostgreSQL
# if PGVERSION1 != PGVERSION2, install both versions
before_install:
- curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt... | Remove old PostgreSQL version installed by default | Remove old PostgreSQL version installed by default
| YAML | bsd-3-clause | eulerto/pgquarrel,eulerto/pgquarrel | yaml | ## Code Before:
language: c
sudo: required
dist: trusty
compiler:
- gcc
# - clang
env:
- PGVERSION1=10
- PGVERSION2=10
addons:
apt:
packages:
- libperl-dev
# install PostgreSQL
# if PGVERSION1 != PGVERSION2, install both versions
before_install:
- curl https://www.postgresql.org/media/keys/ACCC4CF... | language: c
sudo: required
dist: trusty
compiler:
- gcc
# - clang
env:
- PGVERSION1=10
- PGVERSION2=10
addons:
apt:
packages:
- libperl-dev
# install PostgreSQL
# if PGVERSION1 != PGVERSION2, install both versions
before_install:
- curl https://www.postgresql.... | 2 | 0.058824 | 2 | 0 |
827ce06b74ae3e284cfefe811df6853d093ace7d | protonj2-client-examples/README.md | protonj2-client-examples/README.md | ----------------------------------------------
Use maven to build the module, and additionally copy the dependencies
alongside their output:
mvn clean package dependency:copy-dependencies -DincludeScope=runtime -DskipTests
Now you can run the examples using commands of the format:
Linux: java -cp "target/... | ----------------------------------------------
Use maven to build the module, and additionally copy the dependencies
alongside their output:
mvn clean package dependency:copy-dependencies -DincludeScope=runtime -DskipTests
Now you can run the examples using commands of the format:
Linux: java -cp "target/... | Remove some leftover notes that refer to JNDI and not supported here | Remove some leftover notes that refer to JNDI and not supported here | Markdown | apache-2.0 | tabish121/proton4j | markdown | ## Code Before:
----------------------------------------------
Use maven to build the module, and additionally copy the dependencies
alongside their output:
mvn clean package dependency:copy-dependencies -DincludeScope=runtime -DskipTests
Now you can run the examples using commands of the format:
Linux: j... | ----------------------------------------------
Use maven to build the module, and additionally copy the dependencies
alongside their output:
mvn clean package dependency:copy-dependencies -DincludeScope=runtime -DskipTests
Now you can run the examples using commands of the format:
Linux:... | 4 | 0.129032 | 0 | 4 |
8cd5087b9dd2e34ef074fd843fff4043ff39421a | src/extension/decorations/flutter_icon_decorations_lsp.ts | src/extension/decorations/flutter_icon_decorations_lsp.ts | import { FlutterOutline } from "../../shared/analysis/lsp/custom_protocol";
import { Logger } from "../../shared/interfaces";
import { fsPath } from "../../shared/utils/fs";
import { IconRangeComputerLsp } from "../../shared/vscode/icon_range_computer";
import { LspAnalyzer } from "../analysis/analyzer_lsp";
import { F... | import * as vs from "vscode";
import { FlutterOutline } from "../../shared/analysis/lsp/custom_protocol";
import { Logger } from "../../shared/interfaces";
import { fsPath } from "../../shared/utils/fs";
import { IconRangeComputerLsp } from "../../shared/vscode/icon_range_computer";
import { LspAnalyzer } from "../anal... | Fix Flutter icon previews not detecting incoming outlines correctly due to URI in string | Fix Flutter icon previews not detecting incoming outlines correctly due to URI in string
Fixes #3081.
| TypeScript | mit | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | typescript | ## Code Before:
import { FlutterOutline } from "../../shared/analysis/lsp/custom_protocol";
import { Logger } from "../../shared/interfaces";
import { fsPath } from "../../shared/utils/fs";
import { IconRangeComputerLsp } from "../../shared/vscode/icon_range_computer";
import { LspAnalyzer } from "../analysis/analyzer_... | + import * as vs from "vscode";
import { FlutterOutline } from "../../shared/analysis/lsp/custom_protocol";
import { Logger } from "../../shared/interfaces";
import { fsPath } from "../../shared/utils/fs";
import { IconRangeComputerLsp } from "../../shared/vscode/icon_range_computer";
import { LspAnalyzer } f... | 3 | 0.085714 | 2 | 1 |
96ff3e44d9dcd2c0f9830c5cef5aedb0b1cda946 | README.md | README.md |
Database Handler for PostgreSQL writer upon pg and bluebird.
## Usage
## Developing
### Tools
|
[](http://travis-ci.org/sapienlab/dbh-pg)
Database Handler for PostgreSQL writer upon pg and bluebird.
## Usage
## Developing
### Tools
| Add travis Build Status image | Add travis Build Status image
| Markdown | mit | sapienlab/dbh-pg,roro89/dbh-pg | markdown | ## Code Before:
Database Handler for PostgreSQL writer upon pg and bluebird.
## Usage
## Developing
### Tools
## Instruction:
Add travis Build Status image
## Code After:
[](http://travis-ci.org/sapienlab/dbh-pg)
Database Handler for Postgre... | +
+ [](http://travis-ci.org/sapienlab/dbh-pg)
Database Handler for PostgreSQL writer upon pg and bluebird.
## Usage
## Developing
### Tools | 2 | 0.153846 | 2 | 0 |
045fa8964f9c0ad0960f3bc0d9a536a1b1072c11 | install.bat | install.bat |
set PIP_FIND_LINKS="https://whls.blob.core.windows.net/unstable/index.html"
pip install lytest simphony sax jax sklearn klayout
pip install "jax[cpu]===0.3.7" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
pip install gdsfactory==5.38.0
gf tool install
if exist "%USERPROFIL... |
set PIP_FIND_LINKS="https://whls.blob.core.windows.net/unstable/index.html"
pip install lytest simphony sax jax sklearn klayout
pip install "jaxlib[cuda111]" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
pip install gdsfactory==5.38.0
gf tool install
if exist "%USERPROFILE... | Set to gpu version by default and remove version number | Set to gpu version by default and remove version number
| Batchfile | mit | gdsfactory/gdsfactory,gdsfactory/gdsfactory | batchfile | ## Code Before:
set PIP_FIND_LINKS="https://whls.blob.core.windows.net/unstable/index.html"
pip install lytest simphony sax jax sklearn klayout
pip install "jax[cpu]===0.3.7" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
pip install gdsfactory==5.38.0
gf tool install
if ex... |
set PIP_FIND_LINKS="https://whls.blob.core.windows.net/unstable/index.html"
pip install lytest simphony sax jax sklearn klayout
- pip install "jax[cpu]===0.3.7" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver
? - --------
+ pip install "jaxlib[cuda11... | 2 | 0.153846 | 1 | 1 |
d525ae3c17a93ad64f6ca97181c3a7aba64679be | app/views/tags/show.html.erb | app/views/tags/show.html.erb | <h3>Tag <%= @tag %></h3>
<p>
<b>Tomatoes:</b>
<%= pluralize(@tomatoes.size, 'tomato') %>
</p>
<%= link_to 'Back', tags_path %>
| <h3>Tag <%= @tag %></h3>
<p>
<b>Tomatoes:</b>
<%= pluralize(@tomatoes.size, 'tomato') %>
</p>
<p>
<b>Total duration:</b>
<%= humanize(@tomatoes.size*Tomato::DURATION) %>
</p>
<%= link_to 'Back', tags_path %>
| Add total duration detail to tag show | Add total duration detail to tag show
| HTML+ERB | mit | tomatoes-app/tomatoes,potomak/tomatoes,potomak/tomatoes,tomatoes-app/tomatoes,tomatoes-app/tomatoes,potomak/tomatoes,tomatoes-app/tomatoes | html+erb | ## Code Before:
<h3>Tag <%= @tag %></h3>
<p>
<b>Tomatoes:</b>
<%= pluralize(@tomatoes.size, 'tomato') %>
</p>
<%= link_to 'Back', tags_path %>
## Instruction:
Add total duration detail to tag show
## Code After:
<h3>Tag <%= @tag %></h3>
<p>
<b>Tomatoes:</b>
<%= pluralize(@tomatoes.size, 'tomato') %>
</p>
... | <h3>Tag <%= @tag %></h3>
<p>
<b>Tomatoes:</b>
<%= pluralize(@tomatoes.size, 'tomato') %>
</p>
+ <p>
+ <b>Total duration:</b>
+ <%= humanize(@tomatoes.size*Tomato::DURATION) %>
+ </p>
+
<%= link_to 'Back', tags_path %> | 5 | 0.625 | 5 | 0 |
6f5b000e3dffacb2a627c8f094749a68e50b26ea | .travis.yml | .travis.yml | language: haskell
before_install:
# Uncomment whenever hackage is down.
# - mkdir -p ~/.cabal && cp travis/config ~/.cabal/config && cabal update
- cabal update
# Try installing some of the build-deps with apt-get for speed.
- travis/cabal-apt-install $mode
install:
- cabal configure -flib-Werror $mode
... | language: haskell
env:
- GHCVER=7.4.2
- GHCVER=7.6.3
# - >
# GHCVER=7.4.2
# MODE="-fsafe"
before_install:
# If $GHCVER is the one travis has, don't bother reinstalling it.
# We can also have faster builds by installing some libraries with
# `apt`. If it isn't, install the GHC we want from hvr's PP... | Build on Travis with hvr's GHC versions PPA. | Build on Travis with hvr's GHC versions PPA.
Preserve other environment variables for travis.
I didn't really think about what would happen with $mode and $script.
>.>
Install dependencies for travis in the `install` step.
Rewrite the .travis.yml almost completely.
This .travis.yml allows us to specify versions mo... | YAML | bsd-3-clause | Icelandjack/lens,omefire/lens,hvr/lens,cdepillabout/lens,rpglover64/lens,hvr/lens,timjb/lens,Fuuzetsu/lens,danidiaz/lens,Gabriel439/lens,cchalmers/lens,ddssff/lens | yaml | ## Code Before:
language: haskell
before_install:
# Uncomment whenever hackage is down.
# - mkdir -p ~/.cabal && cp travis/config ~/.cabal/config && cabal update
- cabal update
# Try installing some of the build-deps with apt-get for speed.
- travis/cabal-apt-install $mode
install:
- cabal configure -flib... | language: haskell
+
+ env:
+ - GHCVER=7.4.2
+ - GHCVER=7.6.3
+ # - >
+ # GHCVER=7.4.2
+ # MODE="-fsafe"
+
before_install:
+ # If $GHCVER is the one travis has, don't bother reinstalling it.
+ # We can also have faster builds by installing some libraries with
+ # `apt`. If it isn't, install the... | 45 | 1.5 | 31 | 14 |
c2598058722531662aab8831640fc367689d2a43 | tests/utils/test_process_word_vectors.py | tests/utils/test_process_word_vectors.py | import inspect
import os
import pytest
import numpy as np
from subprocess import call
from utils.preprocess_text_word_vectors import txtvec2npy
def test_text_word2vec2npy():
# check whether files are present in folder
vectors_name = 'wiki.fiu_vro.vec'
path = os.path.dirname(inspect.getfile(inspect.current... | import inspect
import os
import pytest
import numpy as np
from subprocess import call
from utils.preprocess_text_word_vectors import txtvec2npy
def test_text_word2vec2npy():
# check whether files are present in folder
vectors_name = 'wiki.fiu_vro.vec'
path = os.path.dirname(inspect.getfile(inspect.current... | Update Fasttext pretrained vectors location | Update Fasttext pretrained vectors location
| Python | mit | lvapeab/nmt-keras,lvapeab/nmt-keras | python | ## Code Before:
import inspect
import os
import pytest
import numpy as np
from subprocess import call
from utils.preprocess_text_word_vectors import txtvec2npy
def test_text_word2vec2npy():
# check whether files are present in folder
vectors_name = 'wiki.fiu_vro.vec'
path = os.path.dirname(inspect.getfile... | import inspect
import os
import pytest
import numpy as np
from subprocess import call
from utils.preprocess_text_word_vectors import txtvec2npy
def test_text_word2vec2npy():
# check whether files are present in folder
vectors_name = 'wiki.fiu_vro.vec'
path = os.path.dirname(inspect... | 2 | 0.08 | 1 | 1 |
07a196be3dca5125454262bb96967d5895081c56 | app/views/admin/application_settings/_repository_storage.html.haml | app/views/admin/application_settings/_repository_storage.html.haml | = form_for @application_setting, url: admin_application_settings_path(anchor: 'js-repository-storage-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.sub-section
.form-group
.form-check
= f.check_box :hashed_storage_enabled, class: 'form... | = form_for @application_setting, url: admin_application_settings_path(anchor: 'js-repository-storage-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.sub-section
.form-group
.form-check
= f.check_box :hashed_storage_enabled, class: 'form... | Remove "Experimental" text from Hashed Storage settings page | Remove "Experimental" text from Hashed Storage settings page
| Haml | mit | mmkassem/gitlabhq,stoplightio/gitlabhq,axilleas/gitlabhq,axilleas/gitlabhq,axilleas/gitlabhq,mmkassem/gitlabhq,stoplightio/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,iiet/iiet-git,mmkassem/gitlabhq,stoplightio/gitlabhq,iiet/iiet-git,mmkassem/gitlabhq,axilleas/gitlabhq,iiet/iiet-git | haml | ## Code Before:
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-repository-storage-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.sub-section
.form-group
.form-check
= f.check_box :hashed_storage_enabl... | = form_for @application_setting, url: admin_application_settings_path(anchor: 'js-repository-storage-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
%fieldset
.sub-section
.form-group
.form-check
= f.check_box :hashed_storage_enabl... | 1 | 0.041667 | 0 | 1 |
f790c4d0300b448d97303a43d5a9a8d65e69bdb9 | tests/TestCase.php | tests/TestCase.php | <?php
use Mockery\Adapter\PHPUnit\MockeryTestCase;
abstract class TestCase extends MockeryTestCase
{
}
| <?php
abstract class TestCase extends \PHPUnit\Framework\TestCase
{
}
| Test - reverted mockery adapter usage. | IHF: Test - reverted mockery adapter usage.
| PHP | mit | dmitry-ivanov/laravel-helper-functions | php | ## Code Before:
<?php
use Mockery\Adapter\PHPUnit\MockeryTestCase;
abstract class TestCase extends MockeryTestCase
{
}
## Instruction:
IHF: Test - reverted mockery adapter usage.
## Code After:
<?php
abstract class TestCase extends \PHPUnit\Framework\TestCase
{
}
| <?php
- use Mockery\Adapter\PHPUnit\MockeryTestCase;
-
- abstract class TestCase extends MockeryTestCase
? ^ ^ ^^^
+ abstract class TestCase extends \PHPUnit\Framework\TestCase
? ^^^^^^^^^^^^^^^ ^ ^
{
} | 4 | 0.571429 | 1 | 3 |
83f761e1bafa07f1998bb845caa69c95d80a0235 | src/admin/redux/modules/letter.js | src/admin/redux/modules/letter.js | /* @flow */
import { FETCHED_MEMBER } from '../../../shared/redux/modules/member.js'
import { mergeAll, converge, unapply, compose, objOf, prop } from 'ramda'
import type { Action, Reducer } from 'redux'
type State = {}
const reducer: Reducer<State, Action> =
(state = { id: 0, address: [], name: '' }, { type, payl... | /* @flow */
import { FETCHED_MEMBER } from '../../../shared/redux/modules/member.js'
import { mergeAll, converge, unapply, compose, objOf, prop } from 'ramda'
import type { Action, Reducer } from 'redux'
type State = {}
const reducer: Reducer<State, Action> =
(state = { id: 0, address: [], name: '' }, { type, payl... | Fix bug that meant member details not displaying if no first name had been entered. | Fix bug that meant member details not displaying if no first name had been entered.
| JavaScript | mit | foundersandcoders/sail-back,foundersandcoders/sail-back | javascript | ## Code Before:
/* @flow */
import { FETCHED_MEMBER } from '../../../shared/redux/modules/member.js'
import { mergeAll, converge, unapply, compose, objOf, prop } from 'ramda'
import type { Action, Reducer } from 'redux'
type State = {}
const reducer: Reducer<State, Action> =
(state = { id: 0, address: [], name: ''... | /* @flow */
import { FETCHED_MEMBER } from '../../../shared/redux/modules/member.js'
import { mergeAll, converge, unapply, compose, objOf, prop } from 'ramda'
import type { Action, Reducer } from 'redux'
type State = {}
const reducer: Reducer<State, Action> =
(state = { id: 0, address: [], name... | 10 | 0.232558 | 7 | 3 |
3e1ea8337814b5730a0af9b3de7797e054abbf99 | hyde/tests/templates/jinja2/index.html | hyde/tests/templates/jinja2/index.html | {% extends "layout.html" %}
{% from "helpers.html" import input_field, textarea, form %}
{% block page_title %}Index Page{% endblock %}
{% block body %}
{%- for article in articles if article.published %}
<div class="article">
<h2><a href="{{ article.href|e }}">{{ article.title|e }}</a></h2>
<p class="meta"... | {% extends "layout.html" %}
{% from "helpers.html" import input_field, textarea, form %}
{% block page_title %}Index Page{% endblock %}
{% block body %}
{%- for article in articles if article.published %}
<div class="article">
<h2><a href="{{ article.href|e }}">{{ article.title|e }}</a></h2>
<p class="meta"... | Fix the use of unknown dateformat filter dateformat in tests. | Fix the use of unknown dateformat filter dateformat in tests.
Use strftime instead. There seems to be no dateformat filter in jinja
documentation.
| HTML | mit | 0111001101111010/hyde,JeNeSuisPasDave/hyde,jngeist/hyde,stiell/hyde,printerpam/hyde,hyde/hyde,jd/hyde,hyde/hyde,JeNeSuisPasDave/hyde,bheesham/hyde,Valloric/hyde,bheesham/hyde,bheesham/hyde,jd/hyde,printerpam/hyde,hyde/hyde,0111001101111010/hyde,jd/hyde,netzverweigerer/hyde,netzverweigerer/hyde,Ali-Razmjoo/hyde,jngeist/... | html | ## Code Before:
{% extends "layout.html" %}
{% from "helpers.html" import input_field, textarea, form %}
{% block page_title %}Index Page{% endblock %}
{% block body %}
{%- for article in articles if article.published %}
<div class="article">
<h2><a href="{{ article.href|e }}">{{ article.title|e }}</a></h2>
... | {% extends "layout.html" %}
{% from "helpers.html" import input_field, textarea, form %}
{% block page_title %}Index Page{% endblock %}
{% block body %}
{%- for article in articles if article.published %}
<div class="article">
<h2><a href="{{ article.href|e }}">{{ article.title|e }}</a></h2>
... | 2 | 0.068966 | 1 | 1 |
90ec10018b9c3e7505306a1f6f874006681419e8 | libraries/provider_docker_service.rb | libraries/provider_docker_service.rb | class Chef
class Provider
class DockerService < Chef::Provider::LWRPBase
# Create a run_context for provider instances.
# Each provider action becomes an isolated recipe
# with its own compile/converger cycle.
use_inline_resources
# Because we're using convergent Chef resources to m... | class Chef
class Provider
class DockerService < Chef::Provider::LWRPBase
# Create a run_context for provider instances.
# Each provider action becomes an isolated recipe
# with its own compile/converger cycle.
use_inline_resources
# Because we're using convergent Chef resources to m... | Remove nonexistent action :enable from docker_service | Remove nonexistent action :enable from docker_service
| Ruby | apache-2.0 | chef-cookbooks/docker,chef-cookbooks/docker,fxposter/chef-docker,fxposter/chef-docker,fxposter/chef-docker,chef-cookbooks/docker | ruby | ## Code Before:
class Chef
class Provider
class DockerService < Chef::Provider::LWRPBase
# Create a run_context for provider instances.
# Each provider action becomes an isolated recipe
# with its own compile/converger cycle.
use_inline_resources
# Because we're using convergent Che... | class Chef
class Provider
class DockerService < Chef::Provider::LWRPBase
# Create a run_context for provider instances.
# Each provider action becomes an isolated recipe
# with its own compile/converger cycle.
use_inline_resources
# Because we're using convergent C... | 3 | 0.051724 | 0 | 3 |
62b8457f802dd66329fa11c26da109b9e36c7502 | advent-of-code/day1/day1.rkt | advent-of-code/day1/day1.rkt |
(define (f2n c)
(match c
[#\( 1]
[#\) -1]
[_ 0]))
(define (calculate-floor s)
(sum (map f2n (string->list s))))
(define (read-floor input-port)
(let ([char (read-char input-port)])
(if (eof-object? char)
char
(f2n char))))
(define (sum lst) (foldl + 0 lst))
(displayln (sum (port-... |
(define (f2n c)
(match c
[#\( 1]
[#\) -1]
[_ 0]))
(define (read-floor input-port)
(let ([char (read-char input-port)])
(if (eof-object? char)
char
(f2n char))))
(define (follow lst value #:index [index 0] #:accumulator [accumulator 0])
(if (null? lst)
#f
(begin
... | Complete part 2 of day 1 | Complete part 2 of day 1
| Racket | mit | winny-/practice,winny-/practice,winny-/practice,winny-/practice | racket | ## Code Before:
(define (f2n c)
(match c
[#\( 1]
[#\) -1]
[_ 0]))
(define (calculate-floor s)
(sum (map f2n (string->list s))))
(define (read-floor input-port)
(let ([char (read-char input-port)])
(if (eof-object? char)
char
(f2n char))))
(define (sum lst) (foldl + 0 lst))
(displ... |
(define (f2n c)
(match c
[#\( 1]
[#\) -1]
[_ 0]))
+
- (define (calculate-floor s)
- (sum (map f2n (string->list s))))
(define (read-floor input-port)
(let ([char (read-char input-port)])
(if (eof-object? char)
char
(f2n char))))
- (define (sum lst) (foldl + ... | 19 | 1.1875 | 15 | 4 |
94091bb4e66f1d0a8767382e172dd81d63218601 | clients/android/NewsBlur/res/layout/fragment_itemlist.xml | clients/android/NewsBlur/res/layout/fragment_itemlist.xml | <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="?itemBackground"
android:orientation="vertical" >
<TextView
android:id="@+id/empty_view"
... | <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="?itemBackground"
android:orientation="vertical" >
<RelativeLayout
android:id="@+id/empty_view"
... | Add a loading throbber to the empty-list-view that matches the footer throbber. | Add a loading throbber to the empty-list-view that matches the footer throbber.
| XML | mit | manderson23/NewsBlur,AlphaCluster/NewsBlur,Suninus/NewsBlur,manderson23/NewsBlur,youprofit/NewsBlur,epiphany27/NewsBlur,petecummings/NewsBlur,AlphaCluster/NewsBlur,canwe/NewsBlur,slava-sh/NewsBlur,nriley/NewsBlur,samuelclay/NewsBlur,epiphany27/NewsBlur,mihaip/NewsBlur,waltharius/NewsBlur,Suninus/NewsBlur,waltharius/New... | xml | ## Code Before:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="?itemBackground"
android:orientation="vertical" >
<TextView
android:id="@+id/empt... | <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
style="?itemBackground"
android:orientation="vertical" >
- <TextView
+ <RelativeLayout
... | 29 | 1.115385 | 21 | 8 |
f53bba244fef1584630071c66ca36de606b17ddc | metadata/cat.pantsu.nyaapantsu.txt | metadata/cat.pantsu.nyaapantsu.txt | Categories:Multimedia
License:MIT
Web Site:https://nyaa.pantsu.cat
Source Code:https://github.com/NyaaPantsu/NyaaPantsu-android-app
Issue Tracker:https://github.com/NyaaPantsu/NyaaPantsu-android-app/issues
Summary:An app interface interacting with NyaaPantsu
Description:
This app is providing the ability to search on ... | Categories:Multimedia
License:MIT
Web Site:https://nyaa.pantsu.cat
Source Code:https://github.com/NyaaPantsu/NyaaPantsu-android-app
Issue Tracker:https://github.com/NyaaPantsu/NyaaPantsu-android-app/issues
Auto Name:NyaaPantsu
Summary:An app interface interacting with NyaaPantsu
Description:
This app is providing the ... | Update CV of NyaaPantsu to 1.1 (2) | Update CV of NyaaPantsu to 1.1 (2)
| Text | agpl-3.0 | f-droid/fdroid-data,f-droid/fdroiddata,f-droid/fdroiddata | text | ## Code Before:
Categories:Multimedia
License:MIT
Web Site:https://nyaa.pantsu.cat
Source Code:https://github.com/NyaaPantsu/NyaaPantsu-android-app
Issue Tracker:https://github.com/NyaaPantsu/NyaaPantsu-android-app/issues
Summary:An app interface interacting with NyaaPantsu
Description:
This app is providing the abili... | Categories:Multimedia
License:MIT
Web Site:https://nyaa.pantsu.cat
Source Code:https://github.com/NyaaPantsu/NyaaPantsu-android-app
Issue Tracker:https://github.com/NyaaPantsu/NyaaPantsu-android-app/issues
+ Auto Name:NyaaPantsu
Summary:An app interface interacting with NyaaPantsu
Description:
This a... | 5 | 0.2 | 3 | 2 |
62634879192e51b9f938da301534b08cf49d2e85 | methodMang.py | methodMang.py | from methods import output, data
import tokenz
import interpreter
intp = interpreter.Interpreter()
class UndefinedFunctionError(Exception): pass
class Call:
def __init__(self, method, args):
self.method = method
self.a = args
self.vals = []
for t in self.a:
self.va... | from methods import io, data
import tokenz
import interpreter
intp = interpreter.Interpreter()
class UndefinedFunctionError(Exception): pass
def reg(it, c):
it.valid = it.valid + [(c().methods, c())]
class Call:
def __init__(self, method, args):
self.method = method
self.a = args
s... | Rename Output + smaller Register | Rename Output + smaller Register
| Python | mit | Icelys/Scotch-Language | python | ## Code Before:
from methods import output, data
import tokenz
import interpreter
intp = interpreter.Interpreter()
class UndefinedFunctionError(Exception): pass
class Call:
def __init__(self, method, args):
self.method = method
self.a = args
self.vals = []
for t in self.a:
... | - from methods import output, data
? -----
+ from methods import io, data
? +
import tokenz
import interpreter
intp = interpreter.Interpreter()
class UndefinedFunctionError(Exception): pass
+ def reg(it, c):
+ it.valid = it.valid + [(c().methods, c())]
... | 10 | 0.232558 | 6 | 4 |
b5348fda99b1ae3fb056dd53f23e96d29e9c335b | _config.php | _config.php | <?php
Object::add_extension('SiteTree', 'AccessKeyExtension');
Object::add_extension("Page_Controller","AccessKeyExtension");
?> | <?php
Object::add_extension('SiteTree', 'AccessKeyExtension');
Object::add_extension("Page_Controller","AccessKeysControllerExtension");
DataObject::add_extension('SiteConfig', 'AccessKeysSiteConfig');
?> | Add extension to site config | ENHANCEMENT: Add extension to site config
| PHP | mit | gordonbanderson/weboftalent-access-keys | php | ## Code Before:
<?php
Object::add_extension('SiteTree', 'AccessKeyExtension');
Object::add_extension("Page_Controller","AccessKeyExtension");
?>
## Instruction:
ENHANCEMENT: Add extension to site config
## Code After:
<?php
Object::add_extension('SiteTree', 'AccessKeyExtension');
Object::add_extension("Page_Control... | <?php
Object::add_extension('SiteTree', 'AccessKeyExtension');
- Object::add_extension("Page_Controller","AccessKeyExtension");
+ Object::add_extension("Page_Controller","AccessKeysControllerExtension");
? +++++++++++
+ DataObject::add_extension('SiteConfig', 'Acc... | 3 | 0.75 | 2 | 1 |
21319fc8d22469911c1cbcc41ec7320b1d6141e9 | powerline/bindings/i3/powerline-i3.py | powerline/bindings/i3/powerline-i3.py |
from powerline import Powerline
from powerline.lib.monotonic import monotonic
import sys
import time
import i3
from threading import Lock
name = 'wm'
if len( sys.argv ) > 1:
name = sys.argv[1]
powerline = Powerline(name, renderer_module='i3bgbar')
powerline.update_renderer()
interval = 0.5
print '{"version": 1, "... |
from powerline import Powerline
from powerline.lib.monotonic import monotonic
import sys
import time
import i3
from threading import Lock
name = 'wm'
if len( sys.argv ) > 1:
name = sys.argv[1]
powerline = Powerline(name, renderer_module='i3bgbar')
powerline.update_renderer()
interval = 0.5
print '{"version": 1, "... | Use 'with' instead of lock.acquire/release() | Use 'with' instead of lock.acquire/release()
| Python | mit | DoctorJellyface/powerline,bartvm/powerline,areteix/powerline,russellb/powerline,seanfisk/powerline,s0undt3ch/powerline,IvanAli/powerline,cyrixhero/powerline,blindFS/powerline,keelerm84/powerline,kenrachynski/powerline,IvanAli/powerline,darac/powerline,xfumihiro/powerline,Liangjianghao/powerline,darac/powerline,QuLogic/... | python | ## Code Before:
from powerline import Powerline
from powerline.lib.monotonic import monotonic
import sys
import time
import i3
from threading import Lock
name = 'wm'
if len( sys.argv ) > 1:
name = sys.argv[1]
powerline = Powerline(name, renderer_module='i3bgbar')
powerline.update_renderer()
interval = 0.5
print '... |
from powerline import Powerline
from powerline.lib.monotonic import monotonic
import sys
import time
import i3
from threading import Lock
name = 'wm'
if len( sys.argv ) > 1:
name = sys.argv[1]
powerline = Powerline(name, renderer_module='i3bgbar')
powerline.update_renderer()
interva... | 11 | 0.289474 | 5 | 6 |
49d93c51b42214e4ac7160f4fb9e2b6e3f03a614 | src/server/index.js | src/server/index.js | const config = require('./config');
if (config.isProduction || require('piping')(config.piping)) {
if (!process.env.NODE_ENV)
throw new Error('Environment variable NODE_ENV must be set.');
// Load and use polyfill for ECMA-402.
if (!global.Intl)
global.Intl = require('intl');
require('babel/register'... | const config = require('./config');
if (config.isProduction || require('piping')(config.piping)) {
if (!process.env.NODE_ENV)
throw new Error('Environment variable NODE_ENV isn\'t set. Remember it\'s up your production enviroment to set NODE_ENV and maybe other variables. To run app locally in production mode, u... | Improve error message for npm start without NODE_ENV. | Improve error message for npm start without NODE_ENV.
| JavaScript | mit | skyuplam/debt_mgmt,christophediprima/este,XeeD/este,GarrettSmith/schizophrenia,SidhNor/este-cordova-starter-kit,zanj2006/este,skallet/este,estaub/my-este,neozhangthe1/framedrop-web,TheoMer/Gyms-Of-The-World,glaserp/Maturita-Project,AlesJiranek/este,GarrettSmith/schizophrenia,nason/este,puzzfuzz/othello-redux,XeeD/test,... | javascript | ## Code Before:
const config = require('./config');
if (config.isProduction || require('piping')(config.piping)) {
if (!process.env.NODE_ENV)
throw new Error('Environment variable NODE_ENV must be set.');
// Load and use polyfill for ECMA-402.
if (!global.Intl)
global.Intl = require('intl');
require(... | const config = require('./config');
if (config.isProduction || require('piping')(config.piping)) {
if (!process.env.NODE_ENV)
- throw new Error('Environment variable NODE_ENV must be set.');
+ throw new Error('Environment variable NODE_ENV isn\'t set. Remember it\'s up your production enviroment to s... | 2 | 0.105263 | 1 | 1 |
e859feaed2e814ea26b19179f706f365323523d7 | conda.recipe/build.sh | conda.recipe/build.sh | if [ "$(uname)" == "Darwin" ]; then
# C++11 finagling for Mac OSX
export CC=clang
export CXX=clang++
export MACOSX_VERSION_MIN="10.9"
CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}"
CXXFLAGS="${CXXFLAGS} -Wno-error=unused-command-line-argument"
export LDFLAGS="${LDFLAGS} -mmacosx-versio... | if [ "$(uname)" == "Darwin" ]; then
# C++11 finagling for Mac OSX
export CC=clang
export CXX=clang++
export MACOSX_VERSION_MIN="10.9"
CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}"
CXXFLAGS="${CXXFLAGS} -Wno-error=unused-command-line-argument"
export LDFLAGS="${LDFLAGS} -mmacosx-versio... | Add the deepdive util dir to PATH for the conda env | Add the deepdive util dir to PATH for the conda env
| Shell | apache-2.0 | sky-xu/deepdive,sky-xu/deepdive,HazyResearch/deepdive,HazyResearch/deepdive,HazyResearch/deepdive,shahin/deepdive,shahin/deepdive,HazyResearch/deepdive | shell | ## Code Before:
if [ "$(uname)" == "Darwin" ]; then
# C++11 finagling for Mac OSX
export CC=clang
export CXX=clang++
export MACOSX_VERSION_MIN="10.9"
CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}"
CXXFLAGS="${CXXFLAGS} -Wno-error=unused-command-line-argument"
export LDFLAGS="${LDFLAGS}... | if [ "$(uname)" == "Darwin" ]; then
# C++11 finagling for Mac OSX
export CC=clang
export CXX=clang++
export MACOSX_VERSION_MIN="10.9"
CXXFLAGS="${CXXFLAGS} -mmacosx-version-min=${MACOSX_VERSION_MIN}"
CXXFLAGS="${CXXFLAGS} -Wno-error=unused-command-line-argument"
export LDFLAGS="${LDFLAGS}... | 22 | 1.047619 | 22 | 0 |
77cfd5da14031b537de654f60e4c333162069a50 | common/docker-compose.yml | common/docker-compose.yml | sns:
image: alicefuzier/fake-sns
ports:
- "9292:9292"
sqs:
image: s12v/elasticmq
ports:
- "9324:9324"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
ports:
- "9200:9200"
- "9300:9300"
environment:
- "http.host=0.0.0.0"
- "transport.host=0.0.0.0"
- "cl... | dynamodb:
image: peopleperhour/dynamodb
ports:
- "45678:8000"
sns:
image: alicefuzier/fake-sns
ports:
- "9292:9292"
sqs:
image: s12v/elasticmq
ports:
- "9324:9324"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
ports:
- "9200:9200"
- "9300:9300"
environme... | Add dynamo docker image to common so that tests for common pass | Add dynamo docker image to common so that tests for common pass
| YAML | mit | wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api | yaml | ## Code Before:
sns:
image: alicefuzier/fake-sns
ports:
- "9292:9292"
sqs:
image: s12v/elasticmq
ports:
- "9324:9324"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
ports:
- "9200:9200"
- "9300:9300"
environment:
- "http.host=0.0.0.0"
- "transport.host=0.... | + dynamodb:
+ image: peopleperhour/dynamodb
+ ports:
+ - "45678:8000"
sns:
image: alicefuzier/fake-sns
ports:
- "9292:9292"
sqs:
image: s12v/elasticmq
ports:
- "9324:9324"
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.4.0
ports:
- "9200:920... | 4 | 0.235294 | 4 | 0 |
4d148f4ecafa89b45a747e16920e258161d476e6 | deployment/puppet/osnailyfacter/modular/keystone/tasks.yaml | deployment/puppet/osnailyfacter/modular/keystone/tasks.yaml | - id: keystone
type: puppet
groups: [primary-controller, controller]
required_for: [openstack-controller]
requires: [openstack-haproxy, database]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/keystone/keystone.pp
puppet_modules: /etc/puppet/modules
timeout: 3600
test_pre... | - id: keystone
type: puppet
groups: [primary-controller, controller]
required_for: [openstack-controller]
requires: [openstack-haproxy, database, rabbitmq]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/keystone/keystone.pp
puppet_modules: /etc/puppet/modules
timeout: 3600
... | Add dependencies for keystone installation task | Add dependencies for keystone installation task
Change-Id: Ie6f3464659fd6645b3e774e1316db3e3ab55d199
Closes-Bug: #1452793
| YAML | apache-2.0 | stackforge/fuel-library,eayunstack/fuel-library,xarses/fuel-library,xarses/fuel-library,ddepaoli3/fuel-library-dev,eayunstack/fuel-library,stackforge/fuel-library,huntxu/fuel-library,xarses/fuel-library,stackforge/fuel-library,xarses/fuel-library,ddepaoli3/fuel-library-dev,eayunstack/fuel-library,huntxu/fuel-library,ea... | yaml | ## Code Before:
- id: keystone
type: puppet
groups: [primary-controller, controller]
required_for: [openstack-controller]
requires: [openstack-haproxy, database]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/keystone/keystone.pp
puppet_modules: /etc/puppet/modules
timeout:... | - id: keystone
type: puppet
groups: [primary-controller, controller]
required_for: [openstack-controller]
- requires: [openstack-haproxy, database]
+ requires: [openstack-haproxy, database, rabbitmq]
? ++++++++++
parameters:
puppet_manifest: /etc/pupp... | 2 | 0.153846 | 1 | 1 |
2fd30735d9c678ab81d812b29a95bd1780ed7324 | stylesheets/_mixin.media-queries.scss | stylesheets/_mixin.media-queries.scss | @mixin respond-min($width) {
@if $ie-version < 9 {
@content;
}
@else {
@media screen and (min-width: $width) {
@content;
}
}
}
@mixin respond-max($width) {
@if $ie-version < 9 {
@if $width >= $screen-medium {
@content;
}
}
@els... | @mixin respond-min($width) {
@if $ie-version < 9 {
@content;
}
@else {
@media screen and (min-width: $width) {
@content;
}
}
}
@mixin respond-max($width) {
@if $ie-version < 9 {
@if $width >= $screen-medium {
@content;
}
}
@els... | Add mixin for min-width and max-width MQs. | Add mixin for min-width and max-width MQs.
| SCSS | mit | jadu/pulsar,jadu/pulsar,jadu/pulsar | scss | ## Code Before:
@mixin respond-min($width) {
@if $ie-version < 9 {
@content;
}
@else {
@media screen and (min-width: $width) {
@content;
}
}
}
@mixin respond-max($width) {
@if $ie-version < 9 {
@if $width >= $screen-medium {
@content;
... | @mixin respond-min($width) {
@if $ie-version < 9 {
@content;
}
@else {
@media screen and (min-width: $width) {
@content;
}
}
}
@mixin respond-max($width) {
@if $ie-version < 9 {
@if $width >= $screen-medium {
@con... | 13 | 0.565217 | 13 | 0 |
9d25c9b73f5b37b68324a504a908368944174319 | tools/ci/test.sh | tools/ci/test.sh |
set -ex -o pipefail
echo 'travis_fold:start:TEST'
# used by xvfb that is used by Chrome
export DISPLAY=:99.0
# Used by karma and karma-chrome-launcher
export CHROME_BIN=/usr/bin/google-chrome
echo 'travis_fold:start:test.run'
sh -e /etc/init.d/xvfb start
npm run lint
if [[ $TRAVIS_BRANCH = master ]]; then
./no... |
set -ex -o pipefail
echo 'travis_fold:start:TEST'
# used by xvfb that is used by Chrome
export DISPLAY=:99.0
# Used by karma and karma-chrome-launcher
export CHROME_BIN=/usr/bin/google-chrome
echo 'travis_fold:start:test.run'
sh -e /etc/init.d/xvfb start
npm run lint
if [[ $TRAVIS_BRANCH = master ]]; then
./no... | Add --single-run to karma coverage | Add --single-run to karma coverage
| Shell | mit | ivijs/ivi,ivijs/ivi | shell | ## Code Before:
set -ex -o pipefail
echo 'travis_fold:start:TEST'
# used by xvfb that is used by Chrome
export DISPLAY=:99.0
# Used by karma and karma-chrome-launcher
export CHROME_BIN=/usr/bin/google-chrome
echo 'travis_fold:start:test.run'
sh -e /etc/init.d/xvfb start
npm run lint
if [[ $TRAVIS_BRANCH = master... |
set -ex -o pipefail
echo 'travis_fold:start:TEST'
# used by xvfb that is used by Chrome
export DISPLAY=:99.0
# Used by karma and karma-chrome-launcher
export CHROME_BIN=/usr/bin/google-chrome
echo 'travis_fold:start:test.run'
sh -e /etc/init.d/xvfb start
npm run lint
if [[ $TRAV... | 2 | 0.068966 | 1 | 1 |
45b1e360bc01175efcf83170d116aaa1243ca33f | Sources/ZamzamUI/Views/UIKit/Extensions/UIBarButtonItem.swift | Sources/ZamzamUI/Views/UIKit/Extensions/UIBarButtonItem.swift | //
// UIBarButtonItem.swift
// ZamzamUI
//
// Created by Basem Emara on 5/3/16.
// Copyright © 2016 Zamzam Inc. All rights reserved.
//
#if os(iOS)
import UIKit
public extension UIBarButtonItem {
/// Initializes a UIBarButtonItem with an image more conveniently.
///
/// - Parameters:
/// - imag... | //
// UIBarButtonItem.swift
// ZamzamUI
//
// Created by Basem Emara on 5/3/16.
// Copyright © 2016 Zamzam Inc. All rights reserved.
//
#if os(iOS)
import UIKit
public extension UIBarButtonItem {
/// Initializes a `UIBarButtonItem` with an image more conveniently.
///
/// - Parameters:
/// - im... | Add bacck bar button factory | Add bacck bar button factory
| Swift | mit | ZamzamInc/ZamzamKit | swift | ## Code Before:
//
// UIBarButtonItem.swift
// ZamzamUI
//
// Created by Basem Emara on 5/3/16.
// Copyright © 2016 Zamzam Inc. All rights reserved.
//
#if os(iOS)
import UIKit
public extension UIBarButtonItem {
/// Initializes a UIBarButtonItem with an image more conveniently.
///
/// - Parameters:
... | //
// UIBarButtonItem.swift
// ZamzamUI
//
// Created by Basem Emara on 5/3/16.
// Copyright © 2016 Zamzam Inc. All rights reserved.
//
#if os(iOS)
import UIKit
public extension UIBarButtonItem {
- /// Initializes a UIBarButtonItem with an image more conveniently.
+ /// Initiali... | 10 | 0.30303 | 9 | 1 |
c6dfebff50e3789b6d1b81948a9239cc565b71c8 | www/templates/default/html/EventListing.tpl.php | www/templates/default/html/EventListing.tpl.php | <table>
<thead>
<tr>
<th scope="col" class="date">Time</th>
<th scope="col" class="title">Event Title</th>
</tr>
</thead>
<tbody class="vcalendar">
<?php
$oddrow = false;
foreach ($context as $eventinstance) {
//Start building an ar... | <table>
<thead>
<tr>
<th scope="col" class="date">Time</th>
<th scope="col" class="title">Event Title</th>
</tr>
</thead>
<tbody class="vcalendar">
<?php
$oddrow = false;
foreach ($context as $eventinstance) {
//Start building an ar... | Add helper classes to the event row | Add helper classes to the event row
| PHP | bsd-3-clause | unl/UNL_UCBCN_System,unl/UNL_UCBCN_System,unl/UNL_UCBCN_System,unl/UNL_UCBCN_System,unl/UNL_UCBCN_System | php | ## Code Before:
<table>
<thead>
<tr>
<th scope="col" class="date">Time</th>
<th scope="col" class="title">Event Title</th>
</tr>
</thead>
<tbody class="vcalendar">
<?php
$oddrow = false;
foreach ($context as $eventinstance) {
//Star... | <table>
<thead>
<tr>
<th scope="col" class="date">Time</th>
<th scope="col" class="title">Event Title</th>
</tr>
</thead>
<tbody class="vcalendar">
<?php
$oddrow = false;
foreach ($context as $eventinstance) {
... | 12 | 0.307692 | 12 | 0 |
2c371923e5e609b885edf65c91c1036faeef4c2b | README.md | README.md |
Basis is a simple and extendable WordPress theme that makes it easy to build an online store with Schema.
Schema is a cloud platform and API to build and scale ecommerce. Create a free account at https://schema.io.
## Status
This theme is currently in development. Take a look at `functions.php` to get a head start.... |
Basis is a simple WordPress theme that makes it easy to build an online store with Schema.
Schema is a cloud ecommerce platform and API. Learn more at https://schema.io.
## Status
This theme is currently in development. Take a look at `functions.php` to get a head start.
## Setup
1. Edit `functions.php` and repla... | Update readme with setup info | Update readme with setup info
| Markdown | mit | schemaio/schema-wp-basis | markdown | ## Code Before:
Basis is a simple and extendable WordPress theme that makes it easy to build an online store with Schema.
Schema is a cloud platform and API to build and scale ecommerce. Create a free account at https://schema.io.
## Status
This theme is currently in development. Take a look at `functions.php` to g... |
- Basis is a simple and extendable WordPress theme that makes it easy to build an online store with Schema.
? ---------------
+ Basis is a simple WordPress theme that makes it easy to build an online store with Schema.
- Schema is a cloud platform and API to build and scale ecommerce. Create a fre... | 10 | 0.625 | 8 | 2 |
6f992bda1747d8dd23dd03f1ae3679c00f2fc977 | marketpulse/geo/lookup.py | marketpulse/geo/lookup.py | from urlparse import urljoin
from django.conf import settings
from django_countries import countries
import requests
COUNTRY_CODES = {key: value for (value, key) in list(countries)}
def reverse_geocode(lat, lng):
"""Query Mapbox API to get data for lat, lng"""
query = '{0},{1}.json'.format(lng, lat)
... | from urlparse import urljoin
from django.conf import settings
from django_countries import countries
import requests
COUNTRY_CODES = {key: value for (value, key) in list(countries)}
def reverse_geocode(lat, lng):
"""Query Mapbox API to get data for lat, lng"""
query = '{0},{1}.json'.format(lng, lat)
... | Handle errors in case of a country mismatch. | Handle errors in case of a country mismatch.
| Python | mpl-2.0 | mozilla/marketpulse,akatsoulas/marketpulse,akatsoulas/marketpulse,akatsoulas/marketpulse,mozilla/marketpulse,mozilla/marketpulse,akatsoulas/marketpulse,mozilla/marketpulse | python | ## Code Before:
from urlparse import urljoin
from django.conf import settings
from django_countries import countries
import requests
COUNTRY_CODES = {key: value for (value, key) in list(countries)}
def reverse_geocode(lat, lng):
"""Query Mapbox API to get data for lat, lng"""
query = '{0},{1}.json'.forma... | from urlparse import urljoin
from django.conf import settings
from django_countries import countries
import requests
COUNTRY_CODES = {key: value for (value, key) in list(countries)}
def reverse_geocode(lat, lng):
"""Query Mapbox API to get data for lat, lng"""
query = '{0},{... | 5 | 0.142857 | 4 | 1 |
1a7ad0dfa0065b3eac2004354bc4752590d8fc1b | script.js | script.js | (function(){
colors = ['#eeeeee', '#d6e685', '#8cc665', '#44a340', '#1e6823'];
days = document.getElementsByClassName('day');
Array.prototype.forEach.call(days, function(element) {
element.addEventListener('click', function(event){
event.stopPropagation()
currentColor = element.getAttribute('fill'... | (function(){
colors = ['#eeeeee', '#d6e685', '#8cc665', '#44a340', '#1e6823'];
days = document.getElementsByClassName('day');
Array.prototype.forEach.call(days, function(element) {
element.addEventListener('click', function(event) {
event.stopPropagation();
});
element.addEventListener('mouseent... | Make to draw by dragging | Make to draw by dragging
| JavaScript | mit | ueokande/github-pseudo-contributions,iBenza/github-pseudo-contributions | javascript | ## Code Before:
(function(){
colors = ['#eeeeee', '#d6e685', '#8cc665', '#44a340', '#1e6823'];
days = document.getElementsByClassName('day');
Array.prototype.forEach.call(days, function(element) {
element.addEventListener('click', function(event){
event.stopPropagation()
currentColor = element.get... | (function(){
colors = ['#eeeeee', '#d6e685', '#8cc665', '#44a340', '#1e6823'];
days = document.getElementsByClassName('day');
Array.prototype.forEach.call(days, function(element) {
- element.addEventListener('click', function(event){
+ element.addEventListener('click', function(event) {
? ... | 15 | 1.25 | 11 | 4 |
7e2481ac5ec169e628d517e2916775bf2a1ff73d | .travis.yml | .travis.yml | language: android
android:
components:
# https://github.com/travis-ci/travis-ci/issues/5036
- tools
- platform-tools
- build-tools-23.0.3
- android-23
- extra-android-m2repository
- extra-google-m2repository
# Necessary because otherwise Gradle will OOM durin... | language: android
jdk: oraclejdk8
# Container builds don't have enough memory to reliably finish without being
# killed, so pretend sudo is required so we don't use the container infra.
# See: https://github.com/travis-ci/travis-ci/issues/5582
sudo: required
android:
components:
# https://github.com/travis-... | Mark sudo as required to fix Travis | Mark sudo as required to fix Travis
Thanks @SUPERCILEX for the help (#39)!
| YAML | apache-2.0 | googlearchive/firebase-jobdispatcher-android | yaml | ## Code Before:
language: android
android:
components:
# https://github.com/travis-ci/travis-ci/issues/5036
- tools
- platform-tools
- build-tools-23.0.3
- android-23
- extra-android-m2repository
- extra-google-m2repository
# Necessary because otherwise Gradl... | language: android
+ jdk: oraclejdk8
+ # Container builds don't have enough memory to reliably finish without being
+ # killed, so pretend sudo is required so we don't use the container infra.
+ # See: https://github.com/travis-ci/travis-ci/issues/5582
+ sudo: required
android:
components:
# https://... | 18 | 0.642857 | 8 | 10 |
b9c175059f0f2f3321ffd495fd46c6f5770afd22 | bluebottle/payouts_dorado/adapters.py | bluebottle/payouts_dorado/adapters.py | import json
import requests
from django.core.exceptions import ImproperlyConfigured
from django.db import connection
from requests.exceptions import MissingSchema
from bluebottle.clients import properties
class PayoutValidationError(Exception):
pass
class PayoutCreationError(Exception):
pass
class Dorad... | import json
import requests
from django.core.exceptions import ImproperlyConfigured
from django.db import connection
from requests.exceptions import MissingSchema
from bluebottle.clients import properties
class PayoutValidationError(Exception):
pass
class PayoutCreationError(Exception):
pass
class Dorad... | Set the payout status to created BEFORE we call out to dorado. This way we do not override that status that dorado set. | Set the payout status to created BEFORE we call out to dorado. This way
we do not override that status that dorado set.
BB-9471 #resolve
| Python | bsd-3-clause | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | python | ## Code Before:
import json
import requests
from django.core.exceptions import ImproperlyConfigured
from django.db import connection
from requests.exceptions import MissingSchema
from bluebottle.clients import properties
class PayoutValidationError(Exception):
pass
class PayoutCreationError(Exception):
pa... | import json
import requests
from django.core.exceptions import ImproperlyConfigured
from django.db import connection
from requests.exceptions import MissingSchema
from bluebottle.clients import properties
class PayoutValidationError(Exception):
pass
class PayoutCreationError(Exce... | 6 | 0.122449 | 3 | 3 |
dc5e8a8df5e68653857e6d70d73bc817cf3f7403 | _plugins/jekyll_slideshow.rb | _plugins/jekyll_slideshow.rb | require 'RMagick'
require 'nokogiri'
include Magick
module Jekyll
class ThumbGenerator < Generator
safe true
def generate(site)
site.static_files.each do |file|
if File.extname(file.path).downcase == ('.jpg' || '.png') && file.path.index("-thumb") == nil
img = Magick::Image::... | require 'RMagick'
require 'nokogiri'
include Magick
module Jekyll
class ThumbGenerator < Generator
safe true
def generate(site)
config = Jekyll.configuration({})['slideshow']
site.static_files.each do |file|
if File.extname(file.path).downcase == ('.jpg' || '.png') && file.path.ind... | Set thumbnail size based on config | Set thumbnail size based on config
| Ruby | mit | matthewowen/jekyll-slideshow,matthewowen/jekyll-slideshow | ruby | ## Code Before:
require 'RMagick'
require 'nokogiri'
include Magick
module Jekyll
class ThumbGenerator < Generator
safe true
def generate(site)
site.static_files.each do |file|
if File.extname(file.path).downcase == ('.jpg' || '.png') && file.path.index("-thumb") == nil
img =... | require 'RMagick'
require 'nokogiri'
include Magick
module Jekyll
class ThumbGenerator < Generator
safe true
def generate(site)
+ config = Jekyll.configuration({})['slideshow']
site.static_files.each do |file|
if File.extname(file.path).downcase == ('.jpg'... | 3 | 0.075 | 2 | 1 |
7a172a7fe98223fd20a4bb5d497aa17653b8a13b | dev_tools/coverage_runner.py | dev_tools/coverage_runner.py |
import os
import sys
from os.path import join, realpath
# Third Party modules
import nose
import coverage
cov = coverage.coverage(branch=True)
cov.start()
result = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c")))
cov.stop()
cov.save()
if result == 0:
# If we are in CI environment, don't write... |
import os
import sys
from os.path import join, realpath
# Third Party modules
import nose
import coverage
cov = coverage.coverage(branch=True)
cov.start()
success = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c")))
cov.stop()
cov.save()
if success:
# If we are in CI environment, don't write an ... | Correct the usage of nose.run. | [TRAVIS] Correct the usage of nose.run.
nose.run returns whether the test run was sucessful or not.
| Python | bsd-3-clause | pradyunsg/Py2C,pradyunsg/Py2C | python | ## Code Before:
import os
import sys
from os.path import join, realpath
# Third Party modules
import nose
import coverage
cov = coverage.coverage(branch=True)
cov.start()
result = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c")))
cov.stop()
cov.save()
if result == 0:
# If we are in CI environm... |
import os
import sys
from os.path import join, realpath
# Third Party modules
import nose
import coverage
cov = coverage.coverage(branch=True)
cov.start()
- result = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c")))
? ^ ^^^
+ success = nose.run(defaultTest=realpath(join(__... | 7 | 0.291667 | 3 | 4 |
10f5a21b3a479adc814204f2169b3b324c9a175f | spec/chek_spec.rb | spec/chek_spec.rb | require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__)))
describe Chek do
it "normal require" do
expect { require 'foobar-can-not-require' }.to raise_error(LoadError)
expect { require 'foobar-normal' }.to_not raise_error(LoadError)
FoobarNorm... | require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__)))
describe Chek do
it "normal require" do
expect { require 'foobar-can-not-require' }.to raise_error(LoadError)
expect { require 'foobar-normal' }.not_to raise_error(LoadError)
FoobarNorm... | Fix for newer rspec version | Fix for newer rspec version
| Ruby | mit | togusafish/tobynet-_-chek,tobynet/chek | ruby | ## Code Before:
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__)))
describe Chek do
it "normal require" do
expect { require 'foobar-can-not-require' }.to raise_error(LoadError)
expect { require 'foobar-normal' }.to_not raise_error(LoadError... | require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__)))
describe Chek do
it "normal require" do
expect { require 'foobar-can-not-require' }.to raise_error(LoadError)
- expect { require 'foobar-normal' }.to_not raise_error(LoadError)
... | 8 | 0.296296 | 4 | 4 |
80167ef3d5b62fa747f3df0edfc0b7c2c9d2d4ec | app/models/asset_file.rb | app/models/asset_file.rb | class AssetFile < ActiveRecord::Base
attr_protected :id
belongs_to :account
scope :with_query, lambda { |s| where('name LIKE ? OR file_name LIKE ?', "%#{s}%", "%#{s}%") }
def datastore
return nil unless file
@datastore ||= file.app.datastore
end
def object_url(opts = {})
expires... | class AssetFile < ActiveRecord::Base
attr_protected :id
belongs_to :account
scope :with_query, lambda { |s| where('name LIKE ? OR file_name LIKE ?', "%#{s}%", "%#{s}%") }
def datastore
return nil unless file
@datastore ||= file.app.datastore
end
def object_url(opts = {})
expires... | Add a safe file name method | Add a safe file name method
| Ruby | mit | mateomurphy/app_frame_assets,mateomurphy/app_frame_assets | ruby | ## Code Before:
class AssetFile < ActiveRecord::Base
attr_protected :id
belongs_to :account
scope :with_query, lambda { |s| where('name LIKE ? OR file_name LIKE ?', "%#{s}%", "%#{s}%") }
def datastore
return nil unless file
@datastore ||= file.app.datastore
end
def object_url(opts =... | class AssetFile < ActiveRecord::Base
attr_protected :id
belongs_to :account
scope :with_query, lambda { |s| where('name LIKE ? OR file_name LIKE ?', "%#{s}%", "%#{s}%") }
def datastore
return nil unless file
@datastore ||= file.app.datastore
end
def objec... | 4 | 0.081633 | 4 | 0 |
4384facfcbc5f1ea91918f520e5262a44550dd3f | lisp/editor.el | lisp/editor.el | ;; set your desired tab width
(setq-default indent-tabs-mode nil)
;; enable y/n answers
(fset 'yes-or-no-p 'y-or-n-p)
;; highlight matching parens
(show-paren-mode t)
;; highlight current line
(add-hook 'after-change-major-mode-hook 'hl-line-mode)
;; show line numbers in programming modes
(add-hook 'prog-mode-hook ... | ;; set your desired tab width
(setq-default indent-tabs-mode nil)
;; enable y/n answers
(fset 'yes-or-no-p 'y-or-n-p)
;; highlight matching parens
(show-paren-mode t)
;; highlight current line
(add-hook 'after-change-major-mode-hook 'hl-line-mode)
;; show line numbers in programming modes
(add-hook 'prog-mode-hook ... | Enable follow-mode for programming modes, for multi-column editing. | Enable follow-mode for programming modes, for multi-column editing.
| Emacs Lisp | bsd-2-clause | danielfm/dotfiles-emacs | emacs-lisp | ## Code Before:
;; set your desired tab width
(setq-default indent-tabs-mode nil)
;; enable y/n answers
(fset 'yes-or-no-p 'y-or-n-p)
;; highlight matching parens
(show-paren-mode t)
;; highlight current line
(add-hook 'after-change-major-mode-hook 'hl-line-mode)
;; show line numbers in programming modes
(add-hook ... | ;; set your desired tab width
(setq-default indent-tabs-mode nil)
;; enable y/n answers
(fset 'yes-or-no-p 'y-or-n-p)
;; highlight matching parens
(show-paren-mode t)
;; highlight current line
(add-hook 'after-change-major-mode-hook 'hl-line-mode)
;; show line numbers in programming modes
... | 5 | 0.15625 | 4 | 1 |
e681b012d9746fff0ee77226054c336178ef6879 | README.md | README.md |
The introduction of Promises and Generators in ECMAScript presents an opportunity to dramatically improve the language-level model for writing asynchronous code in ECMAScript. The spec text can be found [here](https://tc39.github.io/ecmascript-asyncawait).
This proposal is implemented in a [regenerator](https://gith... |
The introduction of Promises and Generators in ECMAScript presents an opportunity to dramatically improve the language-level model for writing asynchronous code in ECMAScript. The spec text can be found [here](https://tc39.github.io/ecmascript-asyncawait).
This proposal is implemented in a [regenerator](https://gith... | Remove debatable syntax and semantics | Remove debatable syntax and semantics
This proposal is done and baked. People should not come to this repo and be under the impression there are open questions. | Markdown | apache-2.0 | tc39/ecmascript-asyncawait,lukehoban/ecmascript-asyncawait,tc39/ecmascript-asyncawait,lukehoban/ecmascript-asyncawait | markdown | ## Code Before:
The introduction of Promises and Generators in ECMAScript presents an opportunity to dramatically improve the language-level model for writing asynchronous code in ECMAScript. The spec text can be found [here](https://tc39.github.io/ecmascript-asyncawait).
This proposal is implemented in a [regenerat... |
The introduction of Promises and Generators in ECMAScript presents an opportunity to dramatically improve the language-level model for writing asynchronous code in ECMAScript. The spec text can be found [here](https://tc39.github.io/ecmascript-asyncawait).
This proposal is implemented in a [regenerator](ht... | 12 | 0.5 | 0 | 12 |
bc19f46d193037a1f44bf322e492d117ae158b30 | app/partials/include/tumor-extent.jade | app/partials/include/tumor-extent.jade | .qi-subtable-title Tumor Extent
.qi-panel.qi-nested(ng-controller='TumorExtentCtrl')
.qi-ver-space
table.table.qi-table
tr
th Length
td {{ extent.length }} mm
tr
th Width
td {{ extent.width }} mm
tr
th Depth
td {{ extent.depth }} mm
| .qi-subtable-title Tumor Extent
.qi-panel.qi-nested(ng-controller='TumorExtentCtrl')
.qi-ver-space
table.table.qi-table
tr(ng-show="extent.length != null")
th Length
td {{ extent.length }} mm
tr(ng-show="extent.width != null")
th Width
td {{ extent.width }} mm
tr... | Hide rows with null values in tumor extent panel. | Hide rows with null values in tumor extent panel.
| Jade | bsd-2-clause | ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile,ohsu-qin/qiprofile | jade | ## Code Before:
.qi-subtable-title Tumor Extent
.qi-panel.qi-nested(ng-controller='TumorExtentCtrl')
.qi-ver-space
table.table.qi-table
tr
th Length
td {{ extent.length }} mm
tr
th Width
td {{ extent.width }} mm
tr
th Depth
td {{ extent.depth }} m... | .qi-subtable-title Tumor Extent
.qi-panel.qi-nested(ng-controller='TumorExtentCtrl')
.qi-ver-space
table.table.qi-table
- tr
+ tr(ng-show="extent.length != null")
th Length
td {{ extent.length }} mm
- tr
+ tr(ng-show="extent.width != null")
th Width... | 6 | 0.428571 | 3 | 3 |
c16422676ee1d4b7abe4fa41ff357f0bbe263b47 | src/Artsy/Router/Utils/findCurrentRoute.tsx | src/Artsy/Router/Utils/findCurrentRoute.tsx | import { Match, RouteConfig } from "found"
export const findCurrentRoute = ({
routes,
routeIndices,
}: Match & { route?: RouteConfig }) => {
let remainingRouteIndicies = [...routeIndices]
let route: RouteConfig = routes[remainingRouteIndicies.shift()]
while (remainingRouteIndicies.length > 0) {
route = ... | import { Match, RouteConfig } from "found"
export const findCurrentRoute = ({
route: baseRoute,
routes,
routeIndices,
}: Match & { route?: RouteConfig }) => {
if (!routeIndices || routeIndices.length === 0) {
return baseRoute
}
let remainingRouteIndicies = [...routeIndices]
let route: RouteConfig = r... | Add fallback logic if routeIndicies aren't present | Add fallback logic if routeIndicies aren't present
| TypeScript | mit | artsy/reaction-force,artsy/reaction-force,artsy/reaction,artsy/reaction,artsy/reaction | typescript | ## Code Before:
import { Match, RouteConfig } from "found"
export const findCurrentRoute = ({
routes,
routeIndices,
}: Match & { route?: RouteConfig }) => {
let remainingRouteIndicies = [...routeIndices]
let route: RouteConfig = routes[remainingRouteIndicies.shift()]
while (remainingRouteIndicies.length > 0... | import { Match, RouteConfig } from "found"
export const findCurrentRoute = ({
+ route: baseRoute,
routes,
routeIndices,
}: Match & { route?: RouteConfig }) => {
+ if (!routeIndices || routeIndices.length === 0) {
+ return baseRoute
+ }
let remainingRouteIndicies = [...routeIndices]
le... | 4 | 0.266667 | 4 | 0 |
d6881528efe425ad059f513701f8891a940f6d3c | README.rst | README.rst | This is an initial prototype for redesigning Peer Grading and general Open Ended
Submission Evaluation. This project is in the early stages of development and is
not ready for general use.
Installation
============
The intent of this project is to be installed as Django apps that will be
included in `edx-platform <ht... | .. image:: https://travis-ci.org/edx/edx-tim.png?branch=master
:alt: Travis build status
This is an initial prototype for redesigning Peer Grading and general Open Ended
Submission Evaluation. This project is in the early stages of development and is
not ready for general use.
Installation
============
The inten... | Add Travis build status badge | Add Travis build status badge
| reStructuredText | agpl-3.0 | eestay/edx-ora2,vasyarv/edx-ora2,singingwolfboy/edx-ora2,EDUlib/edx-ora2,vasyarv/edx-ora2,ubc/edx-ora2,eestay/edx-ora2,nttks/edx-ora2,singingwolfboy/edx-ora2,Edraak/edx-ora2,Stanford-Online/edx-ora2,edx/edx-ora2,miptliot/edx-ora2,singingwolfboy/edx-ora2,ubc/edx-ora2,eestay/edx-ora2,eestay/edx-ora2,Edraak/edx-ora2,Lekto... | restructuredtext | ## Code Before:
This is an initial prototype for redesigning Peer Grading and general Open Ended
Submission Evaluation. This project is in the early stages of development and is
not ready for general use.
Installation
============
The intent of this project is to be installed as Django apps that will be
included in `... | + .. image:: https://travis-ci.org/edx/edx-tim.png?branch=master
+ :alt: Travis build status
+
This is an initial prototype for redesigning Peer Grading and general Open Ended
Submission Evaluation. This project is in the early stages of development and is
not ready for general use.
Installation
=====... | 3 | 0.069767 | 3 | 0 |
443fed801c814c05cafa2f07c0067619630b49c9 | src/main/scala/com/ftchinese/jobs/database/AnalyticDataSource.scala | src/main/scala/com/ftchinese/jobs/database/AnalyticDataSource.scala | package com.ftchinese.jobs.database
import java.sql.Connection
import com.zaxxer.hikari.HikariDataSource
/**
* Analytic database source
* Created by GWB on 2014/12/11.
*/
class AnalyticDataSource {
private val ds = new HikariDataSource()
ds.setMaximumPoolSize(10)
def setUrl(url: String): Unit ={
... | package com.ftchinese.jobs.database
import java.sql.Connection
import com.zaxxer.hikari.HikariDataSource
/**
* Analytic database source
* Created by GWB on 2014/12/11.
*/
class AnalyticDataSource {
private val ds = new HikariDataSource()
ds.setMinimumIdle(1)
ds.setMaximumPoolSize(10)
def setUrl(... | Switch to new connection pool. | Switch to new connection pool.
| Scala | mit | FTChinese/push,FTChinese/push,FTChinese/push | scala | ## Code Before:
package com.ftchinese.jobs.database
import java.sql.Connection
import com.zaxxer.hikari.HikariDataSource
/**
* Analytic database source
* Created by GWB on 2014/12/11.
*/
class AnalyticDataSource {
private val ds = new HikariDataSource()
ds.setMaximumPoolSize(10)
def setUrl(url: Stri... | package com.ftchinese.jobs.database
import java.sql.Connection
import com.zaxxer.hikari.HikariDataSource
/**
* Analytic database source
* Created by GWB on 2014/12/11.
*/
class AnalyticDataSource {
private val ds = new HikariDataSource()
+ ds.setMinimumIdle(1)
ds.setMaximu... | 1 | 0.034483 | 1 | 0 |
308cbf1f62e254643a0ad47db8ad55eb63e1c888 | argonauts/testutils.py | argonauts/testutils.py | import json
import functools
from django.conf import settings
from django.test import Client, TestCase
__all__ = ['JsonTestClient', 'JsonTestCase']
class JsonTestClient(Client):
def _json_request(self, method, url, data=None, *args, **kwargs):
method_func = getattr(super(JsonTestClient, self), method)
... | import json
import functools
from django.conf import settings
from django.test import Client, TestCase
__all__ = ['JsonTestClient', 'JsonTestMixin', 'JsonTestCase']
class JsonTestClient(Client):
def _json_request(self, method, url, data=None, *args, **kwargs):
method_func = getattr(super(JsonTestClient,... | Make the TestCase a mixin | Make the TestCase a mixin
| Python | bsd-2-clause | fusionbox/django-argonauts | python | ## Code Before:
import json
import functools
from django.conf import settings
from django.test import Client, TestCase
__all__ = ['JsonTestClient', 'JsonTestCase']
class JsonTestClient(Client):
def _json_request(self, method, url, data=None, *args, **kwargs):
method_func = getattr(super(JsonTestClient, ... | import json
import functools
from django.conf import settings
from django.test import Client, TestCase
- __all__ = ['JsonTestClient', 'JsonTestCase']
+ __all__ = ['JsonTestClient', 'JsonTestMixin', 'JsonTestCase']
? +++++++++++++++++
class JsonTestClient(Clie... | 7 | 0.184211 | 5 | 2 |
2bd449678d34187efdf3e4ca92daa28ea1d9fa48 | imagemodal/mixins/fragment.py | imagemodal/mixins/fragment.py | from __future__ import absolute_import
from django.template.context import Context
from xblock.fragment import Fragment
class XBlockFragmentBuilderMixin(object):
"""
Create a default XBlock fragment builder
"""
def build_fragment(
self,
template='',
context=None,
... | from __future__ import absolute_import
from django.template.context import Context
from xblock.fragment import Fragment
class XBlockFragmentBuilderMixin(object):
"""
Create a default XBlock fragment builder
"""
def build_fragment(
self,
template='',
context=None,
... | Fix bug to make template optional | Fix bug to make template optional
| Python | agpl-3.0 | Stanford-Online/xblock-image-modal,Stanford-Online/xblock-image-modal,Stanford-Online/xblock-image-modal | python | ## Code Before:
from __future__ import absolute_import
from django.template.context import Context
from xblock.fragment import Fragment
class XBlockFragmentBuilderMixin(object):
"""
Create a default XBlock fragment builder
"""
def build_fragment(
self,
template='',
... | from __future__ import absolute_import
from django.template.context import Context
from xblock.fragment import Fragment
class XBlockFragmentBuilderMixin(object):
"""
Create a default XBlock fragment builder
"""
def build_fragment(
self,
template='',
... | 2 | 0.042553 | 1 | 1 |
aaf8d27c7b0d42d60356de6816f64958025ac360 | docker-compose.yml | docker-compose.yml | version: '2'
services:
django:
extends:
file: ./docker/compose-common.yml
service: django
links:
- db
environment:
- DJANGO_SETTINGS_MODULE=pyconcz_2016.settings_dev
webpack:
build:
context: .
dockerfile: ./docker/webpack.docker
ports:
- "8001:8001"
... | version: '2'
services:
django:
extends:
file: ./docker/compose-common.yml
service: django
links:
- db
environment:
- DJANGO_SETTINGS_MODULE=pyconcz_2016.settings_dev
webpack:
build:
context: .
dockerfile: ./docker/webpack.docker
ports:
- "8001:8001"
... | Fix webpack volume mounting clearing node_modules inside container | Fix webpack volume mounting clearing node_modules inside container
Mounting . to /app inside the container will replace everything under /app
in there, including /app/node_modules. By adding a separate volume for
/app/node_modules, Docker will keep everything under /app/node_modules
intact (even if we don't mount anyt... | YAML | mit | benabraham/cz.pycon.org-2017,pyvec/cz.pycon.org-2016,pyvec/cz.pycon.org-2017,benabraham/cz.pycon.org-2017,pyvec/cz.pycon.org-2017,pyvec/cz.pycon.org-2016,pyvec/cz.pycon.org-2017,pyvec/cz.pycon.org-2016,benabraham/cz.pycon.org-2017 | yaml | ## Code Before:
version: '2'
services:
django:
extends:
file: ./docker/compose-common.yml
service: django
links:
- db
environment:
- DJANGO_SETTINGS_MODULE=pyconcz_2016.settings_dev
webpack:
build:
context: .
dockerfile: ./docker/webpack.docker
ports:
-... | version: '2'
services:
django:
extends:
file: ./docker/compose-common.yml
service: django
links:
- db
environment:
- DJANGO_SETTINGS_MODULE=pyconcz_2016.settings_dev
webpack:
build:
context: .
dockerfile: ./docker/webpack.docker
... | 1 | 0.041667 | 1 | 0 |
c1a6937c6084c3f64b1199785015f212ae59f6a8 | static/js/microblogging.js | static/js/microblogging.js | jQuery(document).ready(function($) {
function update_chars_left() {
var max_len = 140;
var textarea = $('#new_tweet')[0];
var tweet_len = textarea.value.length;
if (tweet_len >= max_len) {
textarea.value = textarea.value.substring(0, max_len); // truncate
$('#... | jQuery(document).ready(function($) {
if ($('#new_tweet').length) {
function update_chars_left() {
var max_len = 140;
var textarea = $('#new_tweet')[0];
var tweet_len = textarea.value.length;
if (tweet_len >= max_len) {
textarea.value = textarea.value.subst... | Fix js error on touite input when not authenticated | Fix js error on touite input when not authenticated
| JavaScript | mit | amarandon/smeuhsocial,amarandon/smeuhsocial,amarandon/smeuhsocial,fgirault/smeuhsocial,fgirault/smeuhsocial,fgirault/smeuhsocial | javascript | ## Code Before:
jQuery(document).ready(function($) {
function update_chars_left() {
var max_len = 140;
var textarea = $('#new_tweet')[0];
var tweet_len = textarea.value.length;
if (tweet_len >= max_len) {
textarea.value = textarea.value.substring(0, max_len); // truncate
... | jQuery(document).ready(function($) {
+ if ($('#new_tweet').length) {
- function update_chars_left() {
+ function update_chars_left() {
? ++
- var max_len = 140;
+ var max_len = 140;
? ++
- var textarea = $('#new_tweet')[0];
+ var textarea = $('#new_tweet')[0];
? ++
... | 32 | 1.684211 | 17 | 15 |
9b41f311f99c53221c57efeb4afb1aa742375b83 | README.markdown | README.markdown | Paradox
=======
Paradox is a markdown documentation tool for software projects.
**Paradox is NOT supported under the Lightbend subscription.**
See [Paradox docs](http://developer.lightbend.com/docs/paradox/latest/) for details.
| Paradox [![scaladex-badge][]][scaladex] [![travis-badge][]][travis] [![gitter-badge][]][gitter]
=======
[scaladex]: https://index.scala-lang.org/lightbend/paradox
[scaladex-badge]: https://index.scala-lang.org/lightbend/paradox/paradox/latest.svg
[travis]: https://travis-ci.org/lightbend/paradox
[... | Add a badge to gitter community and others | Add a badge to gitter community and others
Fixes #155
| Markdown | apache-2.0 | lightbend/paradox,lightbend/paradox,lightbend/paradox | markdown | ## Code Before:
Paradox
=======
Paradox is a markdown documentation tool for software projects.
**Paradox is NOT supported under the Lightbend subscription.**
See [Paradox docs](http://developer.lightbend.com/docs/paradox/latest/) for details.
## Instruction:
Add a badge to gitter community and others
Fixes #155
... | - Paradox
+ Paradox [![scaladex-badge][]][scaladex] [![travis-badge][]][travis] [![gitter-badge][]][gitter]
=======
+
+ [scaladex]: https://index.scala-lang.org/lightbend/paradox
+ [scaladex-badge]: https://index.scala-lang.org/lightbend/paradox/paradox/latest.svg
+ [travis]: https://travis-ci.o... | 9 | 1.125 | 8 | 1 |
cf6c4796764e1b0a652e2962a962263fc8beabe2 | app/views/users/index.html.erb | app/views/users/index.html.erb | <h1>Users</h1>
<table class="table table-condensed">
<thead>
<tr>
<th>ID</th>
<th>Email</th>
<th>Role</th>
<th>School</th>
<th>Sign in count</th>
<th>Access locked</th>
<th></th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<td><%= ... | <h1>Users</h1>
<table class="table table-condensed">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Email</th>
<th>Role</th>
<th>School</th>
<th>Sign in count</th>
<th>Access locked</th>
<th></th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr... | Add names to user list | Add names to user list
| HTML+ERB | mit | BathHacked/energy-sparks,BathHacked/energy-sparks,BathHacked/energy-sparks,BathHacked/energy-sparks | html+erb | ## Code Before:
<h1>Users</h1>
<table class="table table-condensed">
<thead>
<tr>
<th>ID</th>
<th>Email</th>
<th>Role</th>
<th>School</th>
<th>Sign in count</th>
<th>Access locked</th>
<th></th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
... | <h1>Users</h1>
<table class="table table-condensed">
<thead>
<tr>
<th>ID</th>
+ <th>Name</th>
<th>Email</th>
<th>Role</th>
<th>School</th>
<th>Sign in count</th>
<th>Access locked</th>
<th></th>
</tr>
</thead>
<tbody>
<% ... | 2 | 0.057143 | 2 | 0 |
51f912033b9d2eb7b667cea855bc71c123730883 | spec/models/spree/payment_method_spec.rb | spec/models/spree/payment_method_spec.rb | require 'spec_helper'
module Spree
describe PaymentMethod do
it "orders payment methods by name" do
pm1 = create(:payment_method, name: 'ZZ')
pm2 = create(:payment_method, name: 'AA')
pm3 = create(:payment_method, name: 'BB')
PaymentMethod.by_name.should == [pm2, pm3, pm1]
end
i... | require 'spec_helper'
module Spree
describe PaymentMethod do
it "orders payment methods by name" do
pm1 = create(:payment_method, name: 'ZZ')
pm2 = create(:payment_method, name: 'AA')
pm3 = create(:payment_method, name: 'BB')
PaymentMethod.by_name.should == [pm2, pm3, pm1]
end
i... | Remove test for PayPalExpress UK which does not exist anymore | Remove test for PayPalExpress UK which does not exist anymore
| Ruby | agpl-3.0 | lin-d-hop/openfoodnetwork,stveep/openfoodnetwork,ecocitycore/openfoodnetwork,MikeiLL/openfoodnetwork,openfoodfoundation/openfoodnetwork,MikeiLL/openfoodnetwork,levent/openfoodnetwork,mkllnk/openfoodnetwork,lin-d-hop/openfoodnetwork,ltrls/openfoodnetwork,RohanM/openfoodnetwork,stveep/openfoodnetwork,folklabs/openfoodnet... | ruby | ## Code Before:
require 'spec_helper'
module Spree
describe PaymentMethod do
it "orders payment methods by name" do
pm1 = create(:payment_method, name: 'ZZ')
pm2 = create(:payment_method, name: 'AA')
pm3 = create(:payment_method, name: 'BB')
PaymentMethod.by_name.should == [pm2, pm3, pm1... | require 'spec_helper'
module Spree
describe PaymentMethod do
it "orders payment methods by name" do
pm1 = create(:payment_method, name: 'ZZ')
pm2 = create(:payment_method, name: 'AA')
pm3 = create(:payment_method, name: 'BB')
PaymentMethod.by_name.should == [pm2, pm3,... | 1 | 0.034483 | 0 | 1 |
d9fc2cfdcfaf13f2e8491ace60680f3c94ad5c83 | tests/test_async.py | tests/test_async.py | try:
import asyncio
loop = asyncio.get_event_loop()
except ImportError:
asyncio = None
import pexpect
import unittest
@unittest.skipIf(asyncio is None, "Requires asyncio")
class AsyncTests(unittest.TestCase):
def test_simple_expect(self):
p = pexpect.spawn('cat')
p.sendline('Hello asyn... | try:
import asyncio
except ImportError:
asyncio = None
import pexpect
import unittest
def run(coro):
return asyncio.get_event_loop().run_until_complete(coro)
@unittest.skipIf(asyncio is None, "Requires asyncio")
class AsyncTests(unittest.TestCase):
def test_simple_expect(self):
p = pexpect.sp... | Expand tests for async expect | Expand tests for async expect
| Python | isc | dongguangming/pexpect,quatanium/pexpect,crdoconnor/pexpect,Depado/pexpect,crdoconnor/pexpect,dongguangming/pexpect,crdoconnor/pexpect,Wakeupbuddy/pexpect,nodish/pexpect,Wakeupbuddy/pexpect,blink1073/pexpect,nodish/pexpect,quatanium/pexpect,bangi123/pexpect,dongguangming/pexpect,bangi123/pexpect,quatanium/pexpect,Depado... | python | ## Code Before:
try:
import asyncio
loop = asyncio.get_event_loop()
except ImportError:
asyncio = None
import pexpect
import unittest
@unittest.skipIf(asyncio is None, "Requires asyncio")
class AsyncTests(unittest.TestCase):
def test_simple_expect(self):
p = pexpect.spawn('cat')
p.send... | try:
import asyncio
- loop = asyncio.get_event_loop()
except ImportError:
asyncio = None
import pexpect
import unittest
+ def run(coro):
+ return asyncio.get_event_loop().run_until_complete(coro)
+
@unittest.skipIf(asyncio is None, "Requires asyncio")
class AsyncTests(unittest.Tes... | 37 | 1.608696 | 28 | 9 |
1264a8926c889a1d0f8a3dc5c1710d25d0a2fc92 | app/views/shared/_video.html.erb | app/views/shared/_video.html.erb | <%= f.input :video_url,
:label => "Video URL",
:hint => 'Put the YouTube URL in here if it exists',
:input_html => { :class => 'col-md-7' , :disabled => @resource.locked_for_edits? } %>
<%= f.input :video_summary,
:as => :text,
:label => "Video Summary",
... | <div class="row">
<div class="col-md-7">
<%= f.input :video_url,
:label => "Video URL",
:hint => 'Put the YouTube URL in here if it exists',
:input_html => { :disabled => @resource.locked_for_edits? } %>
<%= f.input :video_summary,
:as => :text,
:label => "... | Add bootstrap 3 grid wrappers to video form | Add bootstrap 3 grid wrappers to video form
* Use grid wrappers instead of input classes for video form
| HTML+ERB | mit | telekomatrix/publisher,telekomatrix/publisher,telekomatrix/publisher,telekomatrix/publisher,leftees/publisher,leftees/publisher,leftees/publisher,alphagov/publisher,leftees/publisher,alphagov/publisher,alphagov/publisher | html+erb | ## Code Before:
<%= f.input :video_url,
:label => "Video URL",
:hint => 'Put the YouTube URL in here if it exists',
:input_html => { :class => 'col-md-7' , :disabled => @resource.locked_for_edits? } %>
<%= f.input :video_summary,
:as => :text,
:label => "Vide... | + <div class="row">
+ <div class="col-md-7">
<%= f.input :video_url,
:label => "Video URL",
:hint => 'Put the YouTube URL in here if it exists',
- :input_html => { :class => 'col-md-7' , :disabled => @resource.locked_for_edits? } %>
? -------------... | 8 | 0.888889 | 6 | 2 |
ce6ce4822426e87dbca0c64791c0a789e7a44cec | lib/troo.rb | lib/troo.rb | $LOAD_PATH << File.expand_path(File.dirname(__FILE__) + '/../lib')
require_relative 'troo/troo'
require_relative 'troo/version'
module Troo
InvalidAccessToken = Class.new(StandardError)
EndpointNotFound = Class.new(StandardError)
def self.configuration(file = Dir.home + '/.trooconf', env = :default)
@con... | $LOAD_PATH << File.expand_path(File.dirname(__FILE__) + '/../lib')
require_relative 'troo/troo'
require_relative 'troo/version'
module Troo
InvalidAccessToken = Class.new(StandardError)
EndpointNotFound = Class.new(StandardError)
def self.configuration(file = Dir.home + '/.trooconf', env = :default)
@con... | Reset stdin, stdout and stderr before exiting. | Reset stdin, stdout and stderr before exiting. | Ruby | mit | gavinlaking/troo,gavinlaking/troo | ruby | ## Code Before:
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + '/../lib')
require_relative 'troo/troo'
require_relative 'troo/version'
module Troo
InvalidAccessToken = Class.new(StandardError)
EndpointNotFound = Class.new(StandardError)
def self.configuration(file = Dir.home + '/.trooconf', env = :d... | $LOAD_PATH << File.expand_path(File.dirname(__FILE__) + '/../lib')
require_relative 'troo/troo'
require_relative 'troo/version'
module Troo
InvalidAccessToken = Class.new(StandardError)
EndpointNotFound = Class.new(StandardError)
def self.configuration(file = Dir.home + '/.trooconf', env ... | 9 | 0.160714 | 4 | 5 |
e93c4aedf2e8b4e72452cfe17568a3c094fd8d3f | source/MasterDevs.CoolWhip/MasterDevs.CoolWhip/NugetPackage/tools/templates/nuspecTemplate.txt | source/MasterDevs.CoolWhip/MasterDevs.CoolWhip/NugetPackage/tools/templates/nuspecTemplate.txt | <?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<licenseUrl></licenseUrl>
<projectUrl></projectUrl>
<iconUrl></iconUrl>
<requireLicenseAcceptance>false</requireLicen... | <?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<!--
<licenseUrl></licenseUrl>
<projectUrl></projectUrl>
<iconUrl></iconUrl>
-->
<requireLicenseAcceptance>false</r... | Comment out fields w/out logical defaults | Comment out fields w/out logical defaults
| Text | mit | MasterDevs/CoolWhip | text | ## Code Before:
<?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
<licenseUrl></licenseUrl>
<projectUrl></projectUrl>
<iconUrl></iconUrl>
<requireLicenseAcceptance>fal... | <?xml version="1.0"?>
<package >
<metadata>
<id>$id$</id>
<version>$version$</version>
<title>$title$</title>
<authors>$author$</authors>
<owners>$author$</owners>
+ <!--
<licenseUrl></licenseUrl>
<projectUrl></projectUrl>
<iconUrl></iconUrl>
+ -->
<requi... | 2 | 0.117647 | 2 | 0 |
e0cac3a840adc0e36b2246b26d6aec8b0eebaa09 | 2.7/Dockerfile | 2.7/Dockerfile | FROM python:2.7-slim
RUN apt-get update && apt-get install -y \
gcc \
gettext \
mysql-client libmysqlclient-dev \
postgresql-client libpq-dev \
sqlite3 \
--no-install-recommends && rm -rf /var/lib/apt/lists/*
ENV DJANGO_VERSION 1.9.4
RUN pip install mysqlclient psycopg2 django=="$DJANGO_VERSION"
| FROM alpine:3.3
RUN apk add --update \
gcc musl-dev python-dev py-pip \
mariadb-dev \
postgresql-dev \
sqlite && \
rm -rf /var/cache/apk/*
ENV DJANGO_VERSION 1.9.4
RUN pip install mysqlclient psycopg2 django=="$DJANGO_VERSION"
| Use Alpine 3.3 as base for 2.7 image. | Use Alpine 3.3 as base for 2.7 image.
| unknown | mit | rvernica/Dockerfile,rvernica/docker-library,rvernica/docker-library | unknown | ## Code Before:
FROM python:2.7-slim
RUN apt-get update && apt-get install -y \
gcc \
gettext \
mysql-client libmysqlclient-dev \
postgresql-client libpq-dev \
sqlite3 \
--no-install-recommends && rm -rf /var/lib/apt/lists/*
ENV DJANGO_VERSION 1.9.4
RUN pip install mysqlclient psycopg2 django=="$DJANGO_VE... | - FROM python:2.7-slim
+ FROM alpine:3.3
+ RUN apk add --update \
+ gcc musl-dev python-dev py-pip \
+ mariadb-dev \
+ postgresql-dev \
+ sqlite && \
+ rm -rf /var/cache/apk/*
- RUN apt-get update && apt-get install -y \
- gcc \
- gettext \
- ... | 15 | 1.153846 | 7 | 8 |
ca9019bb42f532a47272c8e8f00485afe7f787fa | test/smoke/source/source_test.rb | test/smoke/source/source_test.rb | describe processes('exabgp') do
it { should exist }
end
| describe directory('/usr/src/exabgp') do
it { should exist }
end
describe file('/etc/exabgp-default/exabgp.conf') do
it { should exist }
end
| Change from process to file/dir check | Change from process to file/dir check
| Ruby | apache-2.0 | aetrion/exabgp-cookbook,aetrion/exabgp-cookbook,aetrion/exabgp-cookbook | ruby | ## Code Before:
describe processes('exabgp') do
it { should exist }
end
## Instruction:
Change from process to file/dir check
## Code After:
describe directory('/usr/src/exabgp') do
it { should exist }
end
describe file('/etc/exabgp-default/exabgp.conf') do
it { should exist }
end
| - describe processes('exabgp') do
+ describe directory('/usr/src/exabgp') do
it { should exist }
end
+
+ describe file('/etc/exabgp-default/exabgp.conf') do
+ it { should exist }
+ end | 6 | 2 | 5 | 1 |
4ca4a8caae287b389c0905c1bcbe52b4011c5fcc | src/middleware/error-responder.js | src/middleware/error-responder.js | import http from 'http';
import _ from 'lodash';
// This reponder is assuming that all <500 errors are safe to be responded
// with their .message attribute.
// DO NOT write sensitive data into error messages.
function createErrorResponder(opts) {
opts = _.merge({
isErrorSafeToRespond: function(status) {
r... | import http from 'http';
import _ from 'lodash';
// This reponder is assuming that all <500 errors are safe to be responded
// with their .message attribute.
// DO NOT write sensitive data into error messages.
function createErrorResponder(opts) {
opts = _.merge({
isErrorSafeToRespond: function(status) {
r... | Add user messages to errors | Add user messages to errors
| JavaScript | mit | futurice/wappuapp-backend,kaupunki-apina/prahapp-backend,futurice/wappuapp-backend,kaupunki-apina/prahapp-backend | javascript | ## Code Before:
import http from 'http';
import _ from 'lodash';
// This reponder is assuming that all <500 errors are safe to be responded
// with their .message attribute.
// DO NOT write sensitive data into error messages.
function createErrorResponder(opts) {
opts = _.merge({
isErrorSafeToRespond: function(s... | import http from 'http';
import _ from 'lodash';
// This reponder is assuming that all <500 errors are safe to be responded
// with their .message attribute.
// DO NOT write sensitive data into error messages.
function createErrorResponder(opts) {
opts = _.merge({
isErrorSafeToRespond: function... | 10 | 0.30303 | 7 | 3 |
81dd127b05af6d179bf3afe58268a9fb4d0df5ad | .travis.yml | .travis.yml | language: java
jdk: openjdk7
script:
- mvn verify
- mvn clean compile assembly:single
cache:
directories:
- $HOME/.m2 | language: java
jdk: openjdk7
script:
- mvn verify
- mvn clean compile assembly:single
- ls -l target/
cache:
directories:
- $HOME/.m2 | Add ls to Travis output | Add ls to Travis output
| YAML | mit | krishnakanthpps/lightning,automatictester/lightning,automatictester/lightning,krishnakanthpps/lightning | yaml | ## Code Before:
language: java
jdk: openjdk7
script:
- mvn verify
- mvn clean compile assembly:single
cache:
directories:
- $HOME/.m2
## Instruction:
Add ls to Travis output
## Code After:
language: java
jdk: openjdk7
script:
- mvn verify
- mvn clean compile assembly:single
- ls -l target/
cache:
directorie... | language: java
jdk: openjdk7
script:
- mvn verify
- mvn clean compile assembly:single
+ - ls -l target/
cache:
directories:
- $HOME/.m2 | 1 | 0.125 | 1 | 0 |
f3aee123ec7fb77091b8df4e3bea4f4da11d7d52 | lib/arel/nodes/extract.rb | lib/arel/nodes/extract.rb | module Arel
module Nodes
class Extract < Arel::Nodes::Unary
include Arel::AliasPredication
include Arel::Predications
attr_accessor :field
def initialize expr, field
super(expr)
@field = field
end
def hash
super ^ [@field, @alias].hash
end
... | module Arel
module Nodes
class Extract < Arel::Nodes::Unary
include Arel::AliasPredication
include Arel::Predications
attr_accessor :field
def initialize expr, field
super(expr)
@field = field
end
def hash
super ^ @field.hash
end
def eql?... | Remove unused @alias, being referenced in hashing. | Remove unused @alias, being referenced in hashing.
| Ruby | mit | tacid/arel,Envek/rails,yawboakye/rails,printercu/rails,yawboakye/rails,baerjam/rails,georgeclaghorn/rails,fabianoleittes/rails,assain/rails,utilum/rails,EmmaB/rails-1,assain/rails,yawboakye/rails,MSP-Greg/rails,kmcphillips/rails,notapatch/rails,betesh/rails,Edouard-chin/rails,deraru/rails,zeckalpha/arel,maclover7/arel,... | ruby | ## Code Before:
module Arel
module Nodes
class Extract < Arel::Nodes::Unary
include Arel::AliasPredication
include Arel::Predications
attr_accessor :field
def initialize expr, field
super(expr)
@field = field
end
def hash
super ^ [@field, @alias].hash... | module Arel
module Nodes
class Extract < Arel::Nodes::Unary
include Arel::AliasPredication
include Arel::Predications
attr_accessor :field
def initialize expr, field
super(expr)
@field = field
end
def hash
- super ^ [@field... | 2 | 0.08 | 1 | 1 |
1ddc5a460f17ae56e3b6b24763f888f1573fd446 | shuffle.rb | shuffle.rb | require 'sinatra'
require 'httparty'
require 'yaml'
data = YAML.load_file(File.expand_path("./data.yml"))
post('/') do
team = data['team_members'].shuffle
HTTParty.post(data['url'], body: { text: team, channel: "\##{params['channel_name']}" }.to_json )
end
| require 'sinatra'
require 'httparty'
require 'yaml'
require 'pry'
data = YAML.load_file(File.expand_path("./data.yml"))
post('/') do
HTTParty.post(data['url'], body: { text: data['team_members'].shuffle.join(', '), channel: "\##{params['channel_name']}" }.to_json )
end
| Remove unnecessary variable and return list joined | Remove unnecessary variable and return list joined
| Ruby | mit | romulomachado/slack-shuffle | ruby | ## Code Before:
require 'sinatra'
require 'httparty'
require 'yaml'
data = YAML.load_file(File.expand_path("./data.yml"))
post('/') do
team = data['team_members'].shuffle
HTTParty.post(data['url'], body: { text: team, channel: "\##{params['channel_name']}" }.to_json )
end
## Instruction:
Remove unnecessary vari... | require 'sinatra'
require 'httparty'
require 'yaml'
+ require 'pry'
data = YAML.load_file(File.expand_path("./data.yml"))
post('/') do
- team = data['team_members'].shuffle
-
- HTTParty.post(data['url'], body: { text: team, channel: "\##{params['channel_name']}" }.to_json )
+ HTTParty.post(data['... | 5 | 0.454545 | 2 | 3 |
c140c1a6d32c2caaf9f0e5a87efd219b9573608a | shub/tool.py | shub/tool.py | import click, importlib
from shub.utils import missing_modules
def missingmod_cmd(modules):
modlist = ", ".join(modules)
@click.command(help="*DISABLED* - requires %s" % modlist)
@click.pass_context
def cmd(ctx):
click.echo("Error: '%s' command requires %s" % (ctx.info_name, modlist))
c... | import click, importlib
from shub.utils import missing_modules
def missingmod_cmd(modules):
modlist = ", ".join(modules)
@click.command(help="*DISABLED* - requires %s" % modlist)
@click.pass_context
def cmd(ctx):
click.echo("Error: '%s' command requires %s" % (ctx.info_name, modlist))
c... | Use hifens instead of underscore for command names | Use hifens instead of underscore for command names
| Python | bsd-3-clause | scrapinghub/shub | python | ## Code Before:
import click, importlib
from shub.utils import missing_modules
def missingmod_cmd(modules):
modlist = ", ".join(modules)
@click.command(help="*DISABLED* - requires %s" % modlist)
@click.pass_context
def cmd(ctx):
click.echo("Error: '%s' command requires %s" % (ctx.info_name, mod... | import click, importlib
from shub.utils import missing_modules
def missingmod_cmd(modules):
modlist = ", ".join(modules)
@click.command(help="*DISABLED* - requires %s" % modlist)
@click.pass_context
def cmd(ctx):
click.echo("Error: '%s' command requires %s" % (ctx.info_name, m... | 1 | 0.034483 | 1 | 0 |
7e0a0f27dd76bdca5114a8f6f71f62faef8e7a56 | app/Console/Commands/MarkPastEventsDeleted.php | app/Console/Commands/MarkPastEventsDeleted.php | <?php
namespace App\Console\Commands;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class MarkPastEventsDeleted extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature... | <?php
namespace App\Console\Commands;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class MarkPastEventsDeleted extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature... | Improve soft-deleting of past events | Improve soft-deleting of past events
| PHP | mit | jwcobb/tevo-harvester,jwcobb/tevo-harvester | php | ## Code Before:
<?php
namespace App\Console\Commands;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class MarkPastEventsDeleted extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
prot... | <?php
namespace App\Console\Commands;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\DB;
class MarkPastEventsDeleted extends Command
{
/**
* The name and signature of the console command.
*
* @var string
... | 7 | 0.132075 | 5 | 2 |
eb61e5c989cda3f5e021150f91561a88ba6db73e | setuptools/tests/py26compat.py | setuptools/tests/py26compat.py | import sys
import unittest
import tarfile
try:
# provide skipIf for Python 2.4-2.6
skipIf = unittest.skipIf
except AttributeError:
def skipIf(condition, reason):
def skipper(func):
def skip(*args, **kwargs):
return
if condition:
return skip
return func
return skipper
def _tarfile_open_ex(*args... | import sys
import unittest
import tarfile
import contextlib
try:
# provide skipIf for Python 2.4-2.6
skipIf = unittest.skipIf
except AttributeError:
def skipIf(condition, reason):
def skipper(func):
def skip(*args, **kwargs):
return
if condition:
return skip
return func
return skipper
def _tar... | Use contextlib.closing on tarfile compat shim | Use contextlib.closing on tarfile compat shim
| Python | mit | pypa/setuptools,pypa/setuptools,pypa/setuptools | python | ## Code Before:
import sys
import unittest
import tarfile
try:
# provide skipIf for Python 2.4-2.6
skipIf = unittest.skipIf
except AttributeError:
def skipIf(condition, reason):
def skipper(func):
def skip(*args, **kwargs):
return
if condition:
return skip
return func
return skipper
def _tarfi... | import sys
import unittest
import tarfile
+ import contextlib
try:
# provide skipIf for Python 2.4-2.6
skipIf = unittest.skipIf
except AttributeError:
def skipIf(condition, reason):
def skipper(func):
def skip(*args, **kwargs):
return
if condition:
return skip
return... | 6 | 0.222222 | 2 | 4 |
367d5d6196c3c21e2d1353b258801e6d5e14e602 | xos/core/models/node.py | xos/core/models/node.py | import os
from django.db import models
from core.models import PlCoreBase
from core.models.plcorebase import StrippedCharField
from core.models import Site, SiteDeployment, SitePrivilege
from core.models import Tag
from django.contrib.contenttypes import generic
# Create your models here.
class Node(PlCoreBase):
... | import os
from django.db import models
from core.models import PlCoreBase
from core.models.plcorebase import StrippedCharField
from core.models import Site, SiteDeployment, SitePrivilege
from core.models import Tag
from django.contrib.contenttypes import generic
# Create your models here.
class Node(PlCoreBase):
... | Make Node syncs a noop | Make Node syncs a noop
| Python | apache-2.0 | jermowery/xos,cboling/xos,cboling/xos,cboling/xos,jermowery/xos,cboling/xos,xmaruto/mcord,jermowery/xos,xmaruto/mcord,xmaruto/mcord,cboling/xos,jermowery/xos,xmaruto/mcord | python | ## Code Before:
import os
from django.db import models
from core.models import PlCoreBase
from core.models.plcorebase import StrippedCharField
from core.models import Site, SiteDeployment, SitePrivilege
from core.models import Tag
from django.contrib.contenttypes import generic
# Create your models here.
class Node(P... | import os
from django.db import models
from core.models import PlCoreBase
from core.models.plcorebase import StrippedCharField
from core.models import Site, SiteDeployment, SitePrivilege
from core.models import Tag
from django.contrib.contenttypes import generic
# Create your models here.
class ... | 4 | 0.153846 | 4 | 0 |
4ce98c2768ccc3674f5c51df6e9674a076aa18ab | spec/stack_master/template_compilers/yaml_spec.rb | spec/stack_master/template_compilers/yaml_spec.rb | RSpec.describe StackMaster::TemplateCompilers::Yaml do
describe '.compile' do
def compile
described_class.compile(template_file_path)
end
context 'valid YAML template' do
let(:template_file_path) { 'spec/fixtures/templates/yml/valid_myapp_vpc.yml' }
it 'produces valid JSON' do
... | RSpec.describe StackMaster::TemplateCompilers::Yaml do
describe '.compile' do
def compile
described_class.compile(template_file_path)
end
context 'valid YAML template' do
let(:template_file_path) { 'spec/fixtures/templates/yml/valid_myapp_vpc.yml' }
it 'produces valid JSON' do
... | Make yml_template spec less fragile | Make yml_template spec less fragile
When we compare generated JSON strings, the comparison can fail because
of whitespace differences. But this doesn’t necessarily indicate
incorrect JSON. So compare the parsed Hashs.
Also this allows us to have pretty human readable JSON in our fixtures
while generating plain JSON i... | Ruby | mit | bulletproofnetworks/stack_master,envato/stack_master,envato/stack_master,bulletproofnetworks/stack_master,bulletproofnetworks/stack_master | ruby | ## Code Before:
RSpec.describe StackMaster::TemplateCompilers::Yaml do
describe '.compile' do
def compile
described_class.compile(template_file_path)
end
context 'valid YAML template' do
let(:template_file_path) { 'spec/fixtures/templates/yml/valid_myapp_vpc.yml' }
it 'produces valid J... | RSpec.describe StackMaster::TemplateCompilers::Yaml do
describe '.compile' do
def compile
described_class.compile(template_file_path)
end
context 'valid YAML template' do
let(:template_file_path) { 'spec/fixtures/templates/yml/valid_myapp_vpc.yml' }
it 'produces val... | 4 | 0.166667 | 3 | 1 |
418357ead146a98f2318af6c76323e2705b79cec | cvloop/__init__.py | cvloop/__init__.py | """Provides cvloop, a ready to use OpenCV VideoCapture mapper, designed for jupyter notebooks."""
import sys
OPENCV_FOUND = False
OPENCV_VERSION_COMPATIBLE = False
try:
import cv2
OPENCV_FOUND = True
except Exception as e:
# print ("Error:", e)
print('OpenCV is not found (tried importing cv2).', file=... | """Provides cvloop, a ready to use OpenCV VideoCapture mapper, designed for jupyter notebooks."""
import sys
OPENCV_FOUND = False
OPENCV_VERSION_COMPATIBLE = False
try:
import cv2
OPENCV_FOUND = True
except ModuleNotFoundError:
print('OpenCV is not found (tried importing cv2).', file=sys.stderr)
print... | Revert unnecessary change to original | Revert unnecessary change to original
| Python | mit | shoeffner/cvloop | python | ## Code Before:
"""Provides cvloop, a ready to use OpenCV VideoCapture mapper, designed for jupyter notebooks."""
import sys
OPENCV_FOUND = False
OPENCV_VERSION_COMPATIBLE = False
try:
import cv2
OPENCV_FOUND = True
except Exception as e:
# print ("Error:", e)
print('OpenCV is not found (tried importi... | """Provides cvloop, a ready to use OpenCV VideoCapture mapper, designed for jupyter notebooks."""
import sys
OPENCV_FOUND = False
OPENCV_VERSION_COMPATIBLE = False
try:
import cv2
OPENCV_FOUND = True
+ except ModuleNotFoundError:
- except Exception as e:
- # print ("Error:", e)
pri... | 3 | 0.088235 | 1 | 2 |
a78a54ac8c31f926e80d0c6724eaef97362f1315 | README.md | README.md | argg
====
A poor man's test runner for [tap](https://github.com/isaacs/node-tap), [tape](https://github.com/substack/tape), or similar, that also can be used with [istanbul](https://github.com/gotwarlost/istanbul). It's just three lines of code to `require` pathnames from the command line. Shell globbing test runner, i... | argg
====
A poor man's test runner for [tap](https://github.com/isaacs/node-tap), [tape](https://github.com/substack/tape), or similar, that also can be used with [istanbul](https://github.com/gotwarlost/istanbul). It's just three lines of code to `require` pathnames from the command line. Shell globbing test runner, i... | Add note that argg is now obselete | Add note that argg is now obselete | Markdown | mit | isao/argg | markdown | ## Code Before:
argg
====
A poor man's test runner for [tap](https://github.com/isaacs/node-tap), [tape](https://github.com/substack/tape), or similar, that also can be used with [istanbul](https://github.com/gotwarlost/istanbul). It's just three lines of code to `require` pathnames from the command line. Shell globbin... | argg
====
A poor man's test runner for [tap](https://github.com/isaacs/node-tap), [tape](https://github.com/substack/tape), or similar, that also can be used with [istanbul](https://github.com/gotwarlost/istanbul). It's just three lines of code to `require` pathnames from the command line. Shell globbing test run... | 2 | 0.068966 | 2 | 0 |
31dbae6478740c7651f6be44a5c921ea53baa877 | app/views/layouts/application.html.erb | app/views/layouts/application.html.erb | <!DOCTYPE html>
<html>
<head><%= render 'layouts/head' %></head>
<body>
<script type="text/javascript">
// a function to use in .html.erb view to run jquery query when it was loaded
function defer(method) {
if (window.jQuery)
method();
else
setTimeout(function() { defer... | <!DOCTYPE html>
<html>
<head><%= render 'layouts/head' %></head>
<body>
<script type="text/javascript">
// a function to use in .html.erb view to run jquery query when it was loaded
function defer(method) {
if (window.jQuery)
method();
else
setTimeout(function() { defer... | Correct first css error loading | Correct first css error loading
| HTML+ERB | mit | madeindjs/raspberry_cook,RaspberryCook/website,madeindjs/raspberry_cook,RaspberryCook/website,RaspberryCook/website,madeindjs/raspberry_cook | html+erb | ## Code Before:
<!DOCTYPE html>
<html>
<head><%= render 'layouts/head' %></head>
<body>
<script type="text/javascript">
// a function to use in .html.erb view to run jquery query when it was loaded
function defer(method) {
if (window.jQuery)
method();
else
setTimeout(fu... | <!DOCTYPE html>
<html>
<head><%= render 'layouts/head' %></head>
<body>
<script type="text/javascript">
// a function to use in .html.erb view to run jquery query when it was loaded
function defer(method) {
if (window.jQuery)
method();
else
setTime... | 4 | 0.121212 | 2 | 2 |
38844f28ec6b27f3507a46fe44ce9a045a0f5d79 | .travis.yml | .travis.yml | sudo: required
language: bash
services:
- docker
env:
- PHP_RUNTIME='php:7.1-cli'
- PHP_RUNTIME='php:7.2-cli' PHPUNIT_OPTS='--coverage-text --coverage-clover=coverage.clover'
- PHP_RUNTIME='hhvm/hhvm:nightly'
matrix:
allow_failures:
- env: PHP_RUNTIME='hhvm/hhvm:nightly'
fast_finish: true
install:
... | sudo: required
language: bash
services:
- docker
env:
- PHP_RUNTIME='php:7.1-cli'
- PHP_RUNTIME='php:7.2-cli' PHPUNIT_OPTS='--coverage-text --coverage-clover=coverage.clover'
- PHP_RUNTIME='hhvm/hhvm:nightly'
matrix:
allow_failures:
- env: PHP_RUNTIME='hhvm/hhvm:nightly'
fast_finish: true
install:
... | Fix scrutinizer fails parsing a coverage file | Fix scrutinizer fails parsing a coverage file
| YAML | mit | rybakit/msgpack.php,rybakit/msgpack.php | yaml | ## Code Before:
sudo: required
language: bash
services:
- docker
env:
- PHP_RUNTIME='php:7.1-cli'
- PHP_RUNTIME='php:7.2-cli' PHPUNIT_OPTS='--coverage-text --coverage-clover=coverage.clover'
- PHP_RUNTIME='hhvm/hhvm:nightly'
matrix:
allow_failures:
- env: PHP_RUNTIME='hhvm/hhvm:nightly'
fast_finish:... | sudo: required
language: bash
services:
- docker
env:
- PHP_RUNTIME='php:7.1-cli'
- PHP_RUNTIME='php:7.2-cli' PHPUNIT_OPTS='--coverage-text --coverage-clover=coverage.clover'
- PHP_RUNTIME='hhvm/hhvm:nightly'
matrix:
allow_failures:
- env: PHP_RUNTIME='hhvm/hhvm:nightly'
... | 2 | 0.071429 | 1 | 1 |
6ea8681b9224beb02aed1b7d0b61ad00880517c5 | index.js | index.js | 'use strict';
var objectToString = Object.prototype.toString;
var ERROR_TYPE = '[object Error]';
module.exports = isError;
function isError(err) {
return objectToString.call(err) === ERROR_TYPE;
}
| 'use strict';
var objectToString = Object.prototype.toString;
var getPrototypeOf = Object.getPrototypeOf;
var ERROR_TYPE = '[object Error]';
module.exports = isError;
function isError(err) {
while (err) {
if (objectToString.call(err) === ERROR_TYPE) {
return true;
}
err = getP... | Fix for all combinations of foreign and inherited | Fix for all combinations of foreign and inherited
| JavaScript | mit | Raynos/is-error | javascript | ## Code Before:
'use strict';
var objectToString = Object.prototype.toString;
var ERROR_TYPE = '[object Error]';
module.exports = isError;
function isError(err) {
return objectToString.call(err) === ERROR_TYPE;
}
## Instruction:
Fix for all combinations of foreign and inherited
## Code After:
'use strict';
va... | 'use strict';
var objectToString = Object.prototype.toString;
+ var getPrototypeOf = Object.getPrototypeOf;
var ERROR_TYPE = '[object Error]';
module.exports = isError;
function isError(err) {
+ while (err) {
- return objectToString.call(err) === ERROR_TYPE;
? ------ ... | 9 | 0.9 | 8 | 1 |
e289089052968b838b895e0d9f1df984772970b5 | orm/model_map.go | orm/model_map.go | package orm
import (
"github.com/go-pg/pg/v10/types"
)
type mapModel struct {
hookStubs
ptr *map[string]interface{}
m map[string]interface{}
}
var _ Model = (*mapModel)(nil)
func newMapModel(ptr *map[string]interface{}) *mapModel {
return &mapModel{
ptr: ptr,
}
}
func (mapModel) Init() error {
return ni... | package orm
import (
"github.com/go-pg/pg/v10/types"
)
type mapModel struct {
hookStubs
ptr *map[string]interface{}
m map[string]interface{}
}
var _ Model = (*mapModel)(nil)
func newMapModel(ptr *map[string]interface{}) *mapModel {
model := &mapModel{
ptr: ptr,
}
if ptr != nil {
model.m = *ptr
}
retu... | Fix map update and insert | Fix map update and insert
| Go | bsd-2-clause | go-pg/pg,vmihailenco/pg,go-pg/pg | go | ## Code Before:
package orm
import (
"github.com/go-pg/pg/v10/types"
)
type mapModel struct {
hookStubs
ptr *map[string]interface{}
m map[string]interface{}
}
var _ Model = (*mapModel)(nil)
func newMapModel(ptr *map[string]interface{}) *mapModel {
return &mapModel{
ptr: ptr,
}
}
func (mapModel) Init() er... | package orm
import (
"github.com/go-pg/pg/v10/types"
)
type mapModel struct {
hookStubs
ptr *map[string]interface{}
m map[string]interface{}
}
var _ Model = (*mapModel)(nil)
func newMapModel(ptr *map[string]interface{}) *mapModel {
- return &mapModel{
+ model := &mapModel{
... | 10 | 0.2 | 7 | 3 |
3fcc8a1217de1f163431aeb235ca6a819e5a683a | test/browser/nightwatch.json | test/browser/nightwatch.json | {
"src_folders": ["."],
"output_folder": "./reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"globals_path": "",
"selenium": {
"start_process": false,
"server_path": "",
"log_path": "",
"host": "127.0.0.1",
"port": 4444,
"cli_ar... | {
"src_folders": ["."],
"output_folder": "./reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"globals_path": "",
"selenium": {
"start_process": false,
"server_path": "",
"log_path": "",
"host": "127.0.0.1",
"port": 4444,
"cli_ar... | Add build number for Sauce Labs | Add build number for Sauce Labs
| JSON | apache-2.0 | ilkkao/mas,ilkkao/mas,ilkkao/mas,ilkkao/mas | json | ## Code Before:
{
"src_folders": ["."],
"output_folder": "./reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"globals_path": "",
"selenium": {
"start_process": false,
"server_path": "",
"log_path": "",
"host": "127.0.0.1",
"port": 4444,... | {
"src_folders": ["."],
"output_folder": "./reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"globals_path": "",
"selenium": {
"start_process": false,
"server_path": "",
"log_path": "",
"host": "127.0.0.1",
"po... | 3 | 0.054545 | 2 | 1 |
0a8a271ba720287686bc2a57bf618655c4487626 | app/views/drones/show.html.erb | app/views/drones/show.html.erb | <div id=top-bar>
<div class=help-status id=help-not-connected>
No one watching...
</div>
</div>
<div id="main-content no-bottom">
<div id="walk-button">
Walk <!-- placeholder for button to hit to keep walking -->
</div>
<div id="home-safely">
Safe <!-- need proper route -->
</div>
</div... | <div id=top-bar>
<div class=help-status id=help-not-connected>
No one watching...
</div>
</div>
<div id="main-content no-bottom">
<div id="walk-button">
Walk <!-- placeholder for button to hit to keep walking -->
</div>
<div class="spinner" id=hidden-div>
<i class="fa fa-spinner fa-pulse fa-3x ... | Add spinner div under walk button | Add spinner div under walk button
| HTML+ERB | mit | ShawnTe/guardian,ShawnTe/guardian,ShawnTe/guardian | html+erb | ## Code Before:
<div id=top-bar>
<div class=help-status id=help-not-connected>
No one watching...
</div>
</div>
<div id="main-content no-bottom">
<div id="walk-button">
Walk <!-- placeholder for button to hit to keep walking -->
</div>
<div id="home-safely">
Safe <!-- need proper route --... | <div id=top-bar>
-
+
<div class=help-status id=help-not-connected>
No one watching...
</div>
-
+
</div>
- <div id="main-content no-bottom">
? --
+ <div id="main-content no-bottom">
<div id="walk-button">
Walk <!-- placeholder for button to hit t... | 10 | 0.227273 | 7 | 3 |
0d78aa85a045385e71e55d2401f48f7517d653cd | tests/TemplateOverrideExtensionTest.php | tests/TemplateOverrideExtensionTest.php | <?php
class TemplateOverrideExtensionTest extends SapphireTest {
protected static $fixture_file = 'template-override/tests/pages.yml';
public function setUpOnce() {
parent::setupOnce();
}
public function testUpdateCMSFields() {
$page = $this->objFromFixture('Page', 'page1');
$fields = $page->getCMSFields... | <?php
class TemplateOverrideExtensionTest extends SapphireTest {
protected static $fixture_file = 'template-override/tests/pages.yml';
public function testUpdateCMSFields() {
$page = $this->objFromFixture('Page', 'page1');
$fields = $page->getCMSFields();
$tab = $fields->findOrMakeTab('Root.Template');
$fi... | Remove setup method that was not showing in coverage tests | MINOR: Remove setup method that was not showing in coverage tests
| PHP | bsd-3-clause | gordonbanderson/template-override | php | ## Code Before:
<?php
class TemplateOverrideExtensionTest extends SapphireTest {
protected static $fixture_file = 'template-override/tests/pages.yml';
public function setUpOnce() {
parent::setupOnce();
}
public function testUpdateCMSFields() {
$page = $this->objFromFixture('Page', 'page1');
$fields = $pa... | <?php
class TemplateOverrideExtensionTest extends SapphireTest {
protected static $fixture_file = 'template-override/tests/pages.yml';
-
- public function setUpOnce() {
- parent::setupOnce();
- }
-
public function testUpdateCMSFields() {
$page = $this->objFromFixture('Page', 'page1');
$... | 5 | 0.208333 | 0 | 5 |
6fbdecb3e5d5d82fe5753cfef35c2a1cbc7a94c6 | locales/kab/event-resources.properties | locales/kab/event-resources.properties | host_maker_party=Suddes Maker Party
| host_maker_party=Suddes Maker Party
host_maker_party_paragraph=Suddes tadyant inek Maker Party s useqdec n ifecka akked urmud ilaqen. Sendeh udiɣ selmed tamezdagnut inek akken ad tesnulfu. Ak-d-mudd tiɣbula ilaqen i usɣiwes, tuddsa akked ummeslay ɣef tedyant inek udiɣ ak-d-mudd afus di yal amecwaṛ.
maker_party_activiti... | Update Kabyle (kab) localization of Mozilla Learning Network | Pontoon: Update Kabyle (kab) localization of Mozilla Learning Network
Localization authors:
- belkacem77 <belkacem77@gmail.com>
| INI | mpl-2.0 | mozilla/teach.webmaker.org,mozilla/learning.mozilla.org,mozilla/teach.webmaker.org,mozilla/teach.mozilla.org,mozilla/teach.mozilla.org | ini | ## Code Before:
host_maker_party=Suddes Maker Party
## Instruction:
Pontoon: Update Kabyle (kab) localization of Mozilla Learning Network
Localization authors:
- belkacem77 <belkacem77@gmail.com>
## Code After:
host_maker_party=Suddes Maker Party
host_maker_party_paragraph=Suddes tadyant inek Maker Party s useqdec n... | host_maker_party=Suddes Maker Party
+ host_maker_party_paragraph=Suddes tadyant inek Maker Party s useqdec n ifecka akked urmud ilaqen. Sendeh udiɣ selmed tamezdagnut inek akken ad tesnulfu. Ak-d-mudd tiɣbula ilaqen i usɣiwes, tuddsa akked ummeslay ɣef tedyant inek udiɣ ak-d-mudd afus di yal amecwaṛ.
+ maker_party_ac... | 7 | 7 | 7 | 0 |
552c1bb3dec2fc1ac270be9a219f8fb50ca1510d | src/mmw/js/src/modeling/templates/scenarioTabPanel.html | src/mmw/js/src/modeling/templates/scenarioTabPanel.html | <a href="#{{ cid }}" data-scenario-cid="{{ cid }}" aria-controls="home" role="tab" data-toggle="tab" class="tab-name"><span>{{ name }}</span></a>
<div class="scenario-btn-dropdown">
<div class="dropdown">
<button class="btn btn-sm btn-icon dark dropdown-toggle" type="button" data-toggle="dropdown" aria-expa... | <a href="#{{ cid }}" data-scenario-cid="{{ cid }}" aria-controls="home" role="tab" data-toggle="tab" class="tab-name"><span>{{ name }}</span></a>
{% if active %}
<div class="scenario-btn-dropdown">
<div class="dropdown">
<button class="btn btn-sm btn-icon dark dropdown-toggle" type="button" data... | Hide dropdown button on inactive scenario tabs | Hide dropdown button on inactive scenario tabs
This is more in line with conventions of Google Sheets, and allows us to
be more confident in the assumption that the current URL (used in the
Share modal) is of the active scenario.
Refs #378
| HTML | apache-2.0 | WikiWatershed/model-my-watershed,lliss/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,kdeloach/model-my-watershed,lliss/model-my-watershed,mmcfarland/model-my-watershed,project-icp/bee-pollinator-app,lliss/model-my-watershed,WikiWatershed/model-my-watershed,mmcfarland/model-my-watershed,Wiki... | html | ## Code Before:
<a href="#{{ cid }}" data-scenario-cid="{{ cid }}" aria-controls="home" role="tab" data-toggle="tab" class="tab-name"><span>{{ name }}</span></a>
<div class="scenario-btn-dropdown">
<div class="dropdown">
<button class="btn btn-sm btn-icon dark dropdown-toggle" type="button" data-toggle="dro... | <a href="#{{ cid }}" data-scenario-cid="{{ cid }}" aria-controls="home" role="tab" data-toggle="tab" class="tab-name"><span>{{ name }}</span></a>
+ {% if active %}
- <div class="scenario-btn-dropdown">
+ <div class="scenario-btn-dropdown">
? ++++
- <div class="dropdown">
+ <div class="dropdown">
? ++... | 36 | 1.714286 | 19 | 17 |
f0649ac71ba84a5fbbda2a0076a289cc4fc220d7 | lib/webfontloader/demo/public/fontdeck.html | lib/webfontloader/demo/public/fontdeck.html | <!doctype html>
<html>
<head>
<link href="/basic.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/webfont.js"></script>
<script type="text/javascript">
WebFont.load({
fontdeck: {
id: '161',
fonts: "Fertigo Pro Regular"
}
});
</script>
<style type=... | <!doctype html>
<html>
<head>
<link href="/basic.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/webfont.js"></script>
<script type="text/javascript">
WebFont.load({
fontdeck: {
id: '161',
api: 'http://dev.int.fontdeck.com/api/v1/project-info?'
}
});... | Use dev API at the moment, until in production. | Use dev API at the moment, until in production.
| HTML | apache-2.0 | sapics/webfontloader,Monotype/webfontloader,zeixcom/webfontloader,zeixcom/webfontloader,kevinrodbe/webfontloader,sapics/webfontloader,joelrich/webfontloader,digideskio/webfontloader,exsodus3249/webfontloader,omo/webfontloader,ahmadruhaifi/webfontloader,omo/webfontloader,sapics/webfontloader,digideskio/webfontloader,JBu... | html | ## Code Before:
<!doctype html>
<html>
<head>
<link href="/basic.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/webfont.js"></script>
<script type="text/javascript">
WebFont.load({
fontdeck: {
id: '161',
fonts: "Fertigo Pro Regular"
}
});
</script... | <!doctype html>
<html>
<head>
<link href="/basic.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="/webfont.js"></script>
<script type="text/javascript">
WebFont.load({
fontdeck: {
id: '161',
- fonts: "Fertigo Pro Regular"
+ api: 'http:/... | 4 | 0.105263 | 2 | 2 |
36d6fbdd774d314c6e37dc0c8f9233e42ac8a59f | resources/create-module/templates/module_template.html | resources/create-module/templates/module_template.html | <!DOCTYPE html>
<html>
<head>
<script src="../../build/yui/yui.js" type="text/javascript"></script>
<script src="../../build/aui-base/aui-base.js" type="text/javascript"></script>
<link rel="stylesheet" href="../../build/aui-skins/core/css/main.css" type="text/css" media="screen" title="no title" charset="utf-8" /... | <!DOCTYPE html>
<html>
<head>
<script src="../../build/yui/yui.js" type="text/javascript"></script>
<script src="../../build/aui-base/aui-base.js" type="text/javascript"></script>
<link rel="stylesheet" href="../../build/aui-skins/core/css/main.css" type="text/css" media="screen" title="no title" charset="utf-8" /... | Add class instantiation on the module template html | Add class instantiation on the module template html
git-svn-id: eaac6977d0b6fa3343c402860739874625caf655@46499 05bdf26c-840f-0410-9ced-eb539d925f36
| HTML | bsd-3-clause | giros/alloy-ui,giros/alloy-ui,giros/alloy-ui,giros/alloy-ui | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<script src="../../build/yui/yui.js" type="text/javascript"></script>
<script src="../../build/aui-base/aui-base.js" type="text/javascript"></script>
<link rel="stylesheet" href="../../build/aui-skins/core/css/main.css" type="text/css" media="screen" title="no title" c... | <!DOCTYPE html>
<html>
<head>
<script src="../../build/yui/yui.js" type="text/javascript"></script>
<script src="../../build/aui-base/aui-base.js" type="text/javascript"></script>
<link rel="stylesheet" href="../../build/aui-skins/core/css/main.css" type="text/css" media="screen" title="no title" c... | 7 | 0.179487 | 7 | 0 |
352ec1ebbeb0f9e96e72ce7ae50c67b2e935aab6 | app/assets/javascripts/lib/models/gquery.coffee | app/assets/javascripts/lib/models/gquery.coffee | class @Gquery extends Backbone.Model
initialize : ->
window.gqueries.add(this)
@references = 1
future_value: -> @get('future')
present_value: -> @get 'present'
safe_present_value: =>
x = @present_value()
# if @get('key') == 'chp_heat_and_electricity_from_wet_biomass'
# return (if @is_acc... | class @Gquery extends Backbone.Model
initialize : ->
window.gqueries.add(this)
@references = 1
future_value: -> @get('future')
present_value: -> @get 'present'
safe_present_value: =>
x = @present_value()
if @is_acceptable_value(x) then x else 0
safe_future_value: =>
x = @future_value()
... | Remove commented code from Gquery | Remove commented code from Gquery
| CoffeeScript | mit | quintel/etmodel,quintel/etmodel,quintel/etmodel,quintel/etmodel | coffeescript | ## Code Before:
class @Gquery extends Backbone.Model
initialize : ->
window.gqueries.add(this)
@references = 1
future_value: -> @get('future')
present_value: -> @get 'present'
safe_present_value: =>
x = @present_value()
# if @get('key') == 'chp_heat_and_electricity_from_wet_biomass'
# re... | class @Gquery extends Backbone.Model
initialize : ->
window.gqueries.add(this)
@references = 1
future_value: -> @get('future')
present_value: -> @get 'present'
safe_present_value: =>
x = @present_value()
- # if @get('key') == 'chp_heat_and_electricity_from_wet_biomass'
- ... | 2 | 0.037736 | 0 | 2 |
f1a7775cec1e4614de38262e63e8cbe337cf05b2 | .travis/before_install.sh | .travis/before_install.sh |
set -ev
composer global require friendsofphp/php-cs-fixer
export PATH="${PATH}:${HOME}/.composer/vendor/bin" |
set -ev
composer global require friendsofphp/php-cs-fixer
export PATH="$PATH:$HOME/.config/composer/vendor/bin:$HOME/.composer/vendor/bin" | Add composer bin to PATH | Add composer bin to PATH
| Shell | mit | leroy0211/Slim-Symfony-Dependency-Injection-Bridge,leroy0211/Slim-Symfony-Dependency-Injection-Bridge | shell | ## Code Before:
set -ev
composer global require friendsofphp/php-cs-fixer
export PATH="${PATH}:${HOME}/.composer/vendor/bin"
## Instruction:
Add composer bin to PATH
## Code After:
set -ev
composer global require friendsofphp/php-cs-fixer
export PATH="$PATH:$HOME/.config/composer/vendor/bin:$HOME/.composer/vendo... |
set -ev
composer global require friendsofphp/php-cs-fixer
- export PATH="${PATH}:${HOME}/.composer/vendor/bin"
+ export PATH="$PATH:$HOME/.config/composer/vendor/bin:$HOME/.composer/vendor/bin" | 2 | 0.333333 | 1 | 1 |
b94c79fce89abe8eb182c2fb92c7df0007cb196c | circle.yml | circle.yml | test:
override:
- tox
dependencies:
override:
- pip install tox tox-pyenv
- export PY_V='from platform import python_version as v; print(v())'
- pyenv local $(python2.7 -c "$PY_V") $(python3.5 -c "$PY_V")
| test:
override:
- tox
dependencies:
override:
- pip install tox tox-pyenv
- pyenv local 2.7.12 3.5.2
| Revert "Automate pyenv version detection" | Revert "Automate pyenv version detection"
This reverts commit 210beb632385e2cd65b74eb054b2f452d578556b.
| YAML | apache-2.0 | kislyuk/aegea,wholebiome/aegea,wholebiome/aegea,kislyuk/aegea,kislyuk/aegea,wholebiome/aegea | yaml | ## Code Before:
test:
override:
- tox
dependencies:
override:
- pip install tox tox-pyenv
- export PY_V='from platform import python_version as v; print(v())'
- pyenv local $(python2.7 -c "$PY_V") $(python3.5 -c "$PY_V")
## Instruction:
Revert "Automate pyenv version detection"
This reverts commi... | test:
override:
- tox
dependencies:
override:
- pip install tox tox-pyenv
+ - pyenv local 2.7.12 3.5.2
- - export PY_V='from platform import python_version as v; print(v())'
- - pyenv local $(python2.7 -c "$PY_V") $(python3.5 -c "$PY_V") | 3 | 0.333333 | 1 | 2 |
6d36617c74af0fbd3b8a0f69ebf9d78c9c004029 | app/models/import/central_heat_network_builder.rb | app/models/import/central_heat_network_builder.rb | class Import
class CentralHeatNetworkBuilder
TECHNOLOGIES = %w(central_heat_network_dispatchable
central_heat_network_must_run)
ATTRIBUTES = Hash[
[ CentralHeatNetworkDispatchableCapacityAttribute,
CentralHeatNetworkMustRunHeatProductionAttribute].map do |attr|
[... | class Import
class CentralHeatNetworkBuilder
TECHNOLOGIES = %w(
central_heat_network_dispatchable
central_heat_network_must_run
).freeze
ATTRIBUTES = Hash[
[ CentralHeatNetworkDispatchableCapacityAttribute,
CentralHeatNetworkMustRunHeatProductionAttribute].map do |attr|
... | Adjust central heat builder per RuboCop | Adjust central heat builder per RuboCop
| Ruby | mit | quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses,quintel/etmoses | ruby | ## Code Before:
class Import
class CentralHeatNetworkBuilder
TECHNOLOGIES = %w(central_heat_network_dispatchable
central_heat_network_must_run)
ATTRIBUTES = Hash[
[ CentralHeatNetworkDispatchableCapacityAttribute,
CentralHeatNetworkMustRunHeatProductionAttribute].map do |a... | class Import
class CentralHeatNetworkBuilder
+ TECHNOLOGIES = %w(
- TECHNOLOGIES = %w(central_heat_network_dispatchable
? ------------ - ---
+ central_heat_network_dispatchable
- central_heat_network_must_run)
? ---------------- -
+ ... | 12 | 0.218182 | 7 | 5 |
9cdaaa37c68472b496f804cf5d9b72bc4e57981d | bot/bot.go | bot/bot.go | package bot
import (
"regexp"
)
type Bot struct {
adapter Adapter
Handlers map[*regexp.Regexp]func(msg *Message)
}
func New(adapter Adapter) *Bot {
return &Bot{
adapter,
map[*regexp.Regexp]func(msg *Message){},
}
}
func (b *Bot) Handle(expr string, handler func(msg *Message)) {
b.Handlers[regexp.MustComp... | package bot
import (
"regexp"
)
type Bot struct {
adapter Adapter
Handlers map[*regexp.Regexp]func(msg *Message)
}
func New(adapter Adapter) *Bot {
return &Bot{
adapter,
map[*regexp.Regexp]func(msg *Message){},
}
}
func (b *Bot) Handle(expr string, handler func(msg *Message)) {
b.Handlers[regexp.MustComp... | Make handlers expr case insensitive | Make handlers expr case insensitive
| Go | mit | esoui/lexicon,esoui/lexicon | go | ## Code Before:
package bot
import (
"regexp"
)
type Bot struct {
adapter Adapter
Handlers map[*regexp.Regexp]func(msg *Message)
}
func New(adapter Adapter) *Bot {
return &Bot{
adapter,
map[*regexp.Regexp]func(msg *Message){},
}
}
func (b *Bot) Handle(expr string, handler func(msg *Message)) {
b.Handlers... | package bot
import (
"regexp"
)
type Bot struct {
adapter Adapter
Handlers map[*regexp.Regexp]func(msg *Message)
}
func New(adapter Adapter) *Bot {
return &Bot{
adapter,
map[*regexp.Regexp]func(msg *Message){},
}
}
func (b *Bot) Handle(expr string, handler func(msg *M... | 6 | 0.162162 | 3 | 3 |
fc3e3937f52da79d8e394ff24ee89ee881f159ba | app/assets/stylesheets/spree/frontend/spree_static_content.css | app/assets/stylesheets/spree/frontend/spree_static_content.css | /*
*= require spree/frontend
*/
/* Sidebar - .list-group-item styles */
.pages-list.list-group > li:last-child {
margin-bottom: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.pages-list.list-group > li {
position: relative;
display: block;
padding: 10px 15px;
margin-bottom: -1px... | /* Sidebar - .list-group-item styles */
.pages-list.list-group > li:last-child {
margin-bottom: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.pages-list.list-group > li {
position: relative;
display: block;
padding: 10px 15px;
margin-bottom: -1px;
background-color: #FFF;
bord... | Remove the "require spree/frontend" directive from the main css. This will allow Spree applications that use different front end stylesheet to install the extension | Remove the "require spree/frontend" directive from the main css.
This will allow Spree applications that use different front end stylesheet to install the extension
| CSS | bsd-3-clause | adavanisanti/spree_static_content,srna/spree_static_content,dgross881/spree_static_content,adavanisanti/spree_static_content,Whelton/spree_static_content,macmm/spree_static_content,macmm/spree_static_content,APohio/spree_static_content,firmanm/spree_static_content,moneyspyder/spree_static_content,srna/spree_static_cont... | css | ## Code Before:
/*
*= require spree/frontend
*/
/* Sidebar - .list-group-item styles */
.pages-list.list-group > li:last-child {
margin-bottom: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.pages-list.list-group > li {
position: relative;
display: block;
padding: 10px 15px;
mar... | - /*
- *= require spree/frontend
- */
-
/* Sidebar - .list-group-item styles */
.pages-list.list-group > li:last-child {
margin-bottom: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
.pages-list.list-group > li {
position: relative;
display: block;
padding: 10... | 4 | 0.210526 | 0 | 4 |
7c8bbe32fab41051e8b0eb5a3ca15053bbc800dc | test/Tests.hx | test/Tests.hx | package ;
import buddy.Buddy;
class Tests implements Buddy<[BaseTest, InheritanceTest, InlineTest, MetaTest, SignalTest, TestProperty, ChainBindTest, ExprBindTest]> {} | package ;
import buddy.BuddySuite;
import buddy.SuitesRunner;
@:build(buddy.GenerateMain.withSuites([
new BaseTest(),
new InheritanceTest(),
new InlineTest(),
new MetaTest(),
new SignalTest(),
new TestProperty(),
new ChainBindTest(),
new ExprBindTest(),
]))
class Tests extends BuddySui... | Revert "buddy tests file fix" | Revert "buddy tests file fix"
This reverts commit e972488062f7e18a8302bfce08e8155851aaf4ee.
| Haxe | mit | profelis/bindx2 | haxe | ## Code Before:
package ;
import buddy.Buddy;
class Tests implements Buddy<[BaseTest, InheritanceTest, InlineTest, MetaTest, SignalTest, TestProperty, ChainBindTest, ExprBindTest]> {}
## Instruction:
Revert "buddy tests file fix"
This reverts commit e972488062f7e18a8302bfce08e8155851aaf4ee.
## Code After:
package ;... | package ;
- import buddy.Buddy;
+ import buddy.BuddySuite;
? +++++
+ import buddy.SuitesRunner;
- class Tests implements Buddy<[BaseTest, InheritanceTest, InlineTest, MetaTest, SignalTest, TestProperty, ChainBindTest, ExprBindTest]> {}
+ @:build(buddy.GenerateMain.withSuites([
+ new BaseT... | 15 | 3 | 13 | 2 |
7ecab2d7891686a748e5d1245f216ac3fcbf9a79 | README.md | README.md |
My dotfiles.
|
These are my dotfiles.
What used to be a fork of [holman/dotfiles](https://github.com/holman/dotfiles) has now become a standalone set, rebuilt from scratch.
## what do we have here?
Lots of stuff, but the core is zsh, vim, and tmux.
## how does it work?
Inspired by Zach Holman's structure, my dotfiles are organi... | Update readme with basic info | Update readme with basic info
| Markdown | mit | redhotvengeance/dotfiles | markdown | ## Code Before:
My dotfiles.
## Instruction:
Update readme with basic info
## Code After:
These are my dotfiles.
What used to be a fork of [holman/dotfiles](https://github.com/holman/dotfiles) has now become a standalone set, rebuilt from scratch.
## what do we have here?
Lots of stuff, but the core is zsh, vim,... |
+ These are my dotfiles.
+
+ What used to be a fork of [holman/dotfiles](https://github.com/holman/dotfiles) has now become a standalone set, rebuilt from scratch.
+
+ ## what do we have here?
+
+ Lots of stuff, but the core is zsh, vim, and tmux.
+
+ ## how does it work?
+
+ Inspired by Zach Holman's structure... | 43 | 21.5 | 42 | 1 |
9b4e2dbe974f6759f7922ea68e3ded4292122393 | coding/emacs/NOTES.txt | coding/emacs/NOTES.txt | ________________________________________________________________________
This file is part of Logtalk <http://logtalk.org/>
Logtalk is free software. You can redistribute it and/or modify it under
the terms of the FSF GNU General Public License 3 (plus some additional
terms per section 7). Consult the `LICE... | ________________________________________________________________________
This file is part of Logtalk <http://logtalk.org/>
Logtalk is free software. You can redistribute it and/or modify it under
the terms of the FSF GNU General Public License 3 (plus some additional
terms per section 7). Consult the `LICE... | Add note on Emacs regular expression limitations for syntax coloring | Add note on Emacs regular expression limitations for syntax coloring
| Text | apache-2.0 | LogtalkDotOrg/logtalk3,LogtalkDotOrg/logtalk3,LogtalkDotOrg/logtalk3,LogtalkDotOrg/logtalk3,LogtalkDotOrg/logtalk3,LogtalkDotOrg/logtalk3,LogtalkDotOrg/logtalk3 | text | ## Code Before:
________________________________________________________________________
This file is part of Logtalk <http://logtalk.org/>
Logtalk is free software. You can redistribute it and/or modify it under
the terms of the FSF GNU General Public License 3 (plus some additional
terms per section 7). C... | ________________________________________________________________________
This file is part of Logtalk <http://logtalk.org/>
Logtalk is free software. You can redistribute it and/or modify it under
the terms of the FSF GNU General Public License 3 (plus some additional
terms per section 7). Con... | 6 | 0.26087 | 3 | 3 |
88045d0d3641dc5236a7696b4b40379169134ccb | docs/source/tips.rst | docs/source/tips.rst | Tips and FAQs
=============
| Tips and FAQs
=============
It takes too long time to compile a computational graph. Can I skip it?
-----------------------------------------------------------------------
Chainer does not compile computational graphs, so you cannot skip it, or, I mean, you have already skipped it :).
It seems you have actually seen... | Add a faq on compilation time | Add a faq on compilation time
| reStructuredText | mit | keisuke-umezawa/chainer,wkentaro/chainer,kashif/chainer,niboshi/chainer,muupan/chainer,cemoody/chainer,ktnyt/chainer,truongdq/chainer,tigerneil/chainer,ytoyama/yans_chainer_hackathon,minhpqn/chainer,jnishi/chainer,1986ks/chainer,cupy/cupy,ktnyt/chainer,Kaisuke5/chainer,benob/chainer,tkerola/chainer,aonotas/chainer,hvy/... | restructuredtext | ## Code Before:
Tips and FAQs
=============
## Instruction:
Add a faq on compilation time
## Code After:
Tips and FAQs
=============
It takes too long time to compile a computational graph. Can I skip it?
-----------------------------------------------------------------------
Chainer does not compile computational ... | Tips and FAQs
=============
+
+ It takes too long time to compile a computational graph. Can I skip it?
+ -----------------------------------------------------------------------
+
+ Chainer does not compile computational graphs, so you cannot skip it, or, I mean, you have already skipped it :).
+
+ It seems you ... | 17 | 8.5 | 17 | 0 |
7fcd118c1db1580d09af3cbff2f8d0cd392127dd | docker-compose.yml | docker-compose.yml | version: '2.1'
services:
web:
image: "ket4yii/php-censor:web"
ports:
- "80:80"
networks:
- default
depends_on:
psql:
condition: service_healthy
queue:
condition: service_started
env_file:
- ./env/phpcensor.env
worker:
image: "ket4yii/php-censor:worker... | version: '2.1'
services:
web:
image: "ket4yii/php-censor:web"
ports:
- "80:80"
depends_on:
- db
- queue
env_file:
- ./env/phpcensor.env
worker:
image: "ket4yii/php-censor:worker"
depends_on:
- db
- queue
env_file:
- ./env/phpcensor.env
db:
image: "postgr... | Delete healthchecks. Delete redundant things | [compose] Delete healthchecks. Delete redundant things
| YAML | mit | ket4yii/docker-php-censor | yaml | ## Code Before:
version: '2.1'
services:
web:
image: "ket4yii/php-censor:web"
ports:
- "80:80"
networks:
- default
depends_on:
psql:
condition: service_healthy
queue:
condition: service_started
env_file:
- ./env/phpcensor.env
worker:
image: "ket4yii/p... | version: '2.1'
services:
web:
image: "ket4yii/php-censor:web"
ports:
- "80:80"
- networks:
- - default
depends_on:
+ - db
- psql:
- condition: service_healthy
- queue:
? ^ -
+ - queue
? ^
- condition: service_started
env_f... | 27 | 0.574468 | 5 | 22 |
81fecc378da0a39ea87b75be0323b028349de792 | app/views/downloads/download_linux.html.erb | app/views/downloads/download_linux.html.erb | <%- @section = "downloads" %>
<%- @subsection = "" %>
<div id="main">
<h1>Download for Linux and Unix</h1>
<p>It is easiest to install Git on Linux using the preferred package manager of your Linux distribution.</p>
<h3>Debian/Ubuntu</h3>
<code>$ apt-get install git</code>
<h3>Fedora</h3>
<code>$ yum ins... | <%- @section = "downloads" %>
<%- @subsection = "" %>
<div id="main">
<h1>Download for Linux and Unix</h1>
<p>It is easiest to install Git on Linux using the preferred package manager of your Linux distribution.</p>
<h3>Debian/Ubuntu</h3>
<code>$ apt-get install git</code>
<h3>Fedora</h3>
<code>$ yum ins... | Add install instructions for Slitaz | Add install instructions for Slitaz
| HTML+ERB | mit | Mokolea/git-scm.com,mosoft521/gitscm-next,jasonlong/git-scm.com,mosoft521/gitscm-next,git/git-scm.com,git/git-scm.com,jasonlong/git-scm.com,jasonlong/git-scm.com,Mokolea/git-scm.com,Mokolea/git-scm.com,git/git-scm.com,git/git-scm.com,mosoft521/gitscm-next,mosoft521/gitscm-next,Mokolea/git-scm.com,jasonlong/git-scm.com | html+erb | ## Code Before:
<%- @section = "downloads" %>
<%- @subsection = "" %>
<div id="main">
<h1>Download for Linux and Unix</h1>
<p>It is easiest to install Git on Linux using the preferred package manager of your Linux distribution.</p>
<h3>Debian/Ubuntu</h3>
<code>$ apt-get install git</code>
<h3>Fedora</h3>
... | <%- @section = "downloads" %>
<%- @subsection = "" %>
<div id="main">
<h1>Download for Linux and Unix</h1>
<p>It is easiest to install Git on Linux using the preferred package manager of your Linux distribution.</p>
<h3>Debian/Ubuntu</h3>
<code>$ apt-get install git</code>
<h3>Fedora<... | 3 | 0.090909 | 3 | 0 |
44f1116cdc412225d04203e3ecec75ebe65ecbea | django_olcc/olcc/templates/olcc/store_list.html | django_olcc/olcc/templates/olcc/store_list.html | {% extends 'site_base.html' %}
{% load i18n %}
{% block title %}
Stores
{% endblock %}
{% block content %}
<h2>Found {{ stores.count }} store{{ stores|pluralize }} in {{ county|capfirst }} county</h2>
{% for s in stores %}
<section class="store">
<div class="details">
... | {% extends 'site_base.html' %}
{% load i18n %}
{% block title %}
Stores
{% endblock %}
{% block content %}
<h2>Found {{ stores.count }} store{{ stores|pluralize }} in {{ county|capfirst }} county</h2>
{% for s in stores %}
<section class="store">
<div class="details">
... | Update the store list template to link to Google Maps with directions for each map link. | Update the store list template to link to Google Maps with directions for each map link.
| HTML | mit | twaddington/django-olcc,twaddington/django-olcc,twaddington/django-olcc | html | ## Code Before:
{% extends 'site_base.html' %}
{% load i18n %}
{% block title %}
Stores
{% endblock %}
{% block content %}
<h2>Found {{ stores.count }} store{{ stores|pluralize }} in {{ county|capfirst }} county</h2>
{% for s in stores %}
<section class="store">
<div class="details">
... | {% extends 'site_base.html' %}
{% load i18n %}
{% block title %}
Stores
{% endblock %}
{% block content %}
<h2>Found {{ stores.count }} store{{ stores|pluralize }} in {{ county|capfirst }} county</h2>
{% for s in stores %}
<section class="store">
<div class="... | 2 | 0.05 | 1 | 1 |
ccf6ce4c719bcea0cb3d951f6dc992baed6ce7c4 | metadata/com.frozendevs.cache.cleaner.txt | metadata/com.frozendevs.cache.cleaner.txt | Categories:System
License:MIT
Web Site:http://www.frozendevs.com
Source Code:https://github.com/Frozen-Developers/android-cache-cleaner
Issue Tracker:https://github.com/Frozen-Developers/android-cache-cleaner/issues
Auto Name:Cache Cleaner
Summary:Clean the cache
Description:
Cache cleaning tool which does not require... | Categories:System
License:MIT
Web Site:http://www.frozendevs.com
Source Code:https://github.com/Frozen-Developers/android-cache-cleaner
Issue Tracker:https://github.com/Frozen-Developers/android-cache-cleaner/issues
Auto Name:Cache Cleaner
Summary:Clean the cache
Description:
Cache cleaning tool which does not require... | Update Cache Cleaner to 1.1.8 (11) | Update Cache Cleaner to 1.1.8 (11)
| Text | agpl-3.0 | f-droid/fdroid-data,f-droid/fdroiddata,f-droid/fdroiddata | text | ## Code Before:
Categories:System
License:MIT
Web Site:http://www.frozendevs.com
Source Code:https://github.com/Frozen-Developers/android-cache-cleaner
Issue Tracker:https://github.com/Frozen-Developers/android-cache-cleaner/issues
Auto Name:Cache Cleaner
Summary:Clean the cache
Description:
Cache cleaning tool which ... | Categories:System
License:MIT
Web Site:http://www.frozendevs.com
Source Code:https://github.com/Frozen-Developers/android-cache-cleaner
Issue Tracker:https://github.com/Frozen-Developers/android-cache-cleaner/issues
Auto Name:Cache Cleaner
Summary:Clean the cache
Description:
Cache cleaning tool wh... | 9 | 0.346154 | 7 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.