commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 5 4.84k | subject stringlengths 15 778 | message stringlengths 16 6.86k | lang stringlengths 1 30 | license stringclasses 13
values | repos stringlengths 5 116k | config stringlengths 1 30 | content stringlengths 105 8.72k |
|---|---|---|---|---|---|---|---|---|---|---|---|
4c9aedd1239f8848c48e885b1bac78e75f6c42bf | options.js | options.js | function restore() {
var nurls = 0;
for (var k in localStorage) {
if (k.match(/^http:/)) {
nurls++;
var tr = document.createElement('tr');
var info = JSON.parse(localStorage[k]);
tr.innerHTML = '<td>' + k + '</td><td><a href="' +
info['long... | function restore() {
var nurls = 0;
for (var k in localStorage) {
if (k.match(/^http:/)) {
nurls++;
var tr = document.createElement('tr');
var info = JSON.parse(localStorage[k]);
tr.innerHTML = '<td>' + k + '</td><td><a href="' +
info['long... | Replace undefined/null with something human-readable | Replace undefined/null with something human-readable
| JavaScript | mit | decklin/explode | javascript | ## Code Before:
function restore() {
var nurls = 0;
for (var k in localStorage) {
if (k.match(/^http:/)) {
nurls++;
var tr = document.createElement('tr');
var info = JSON.parse(localStorage[k]);
tr.innerHTML = '<td>' + k + '</td><td><a href="' +
... |
a0043fd5b81ab51c57c22e27892abd1e173b04cb | zsh/functions.zsh | zsh/functions.zsh | cprint() {
numRegex='[0-9]+$'
usrFile=$1
usrTime=$2
defLen=15
defTime=3
# Command line argument processing
if [[ $usrTime =~ $numRegex ]]; then
# A valid number of lines and refresh rate were passed in
else
# Invalid or no lines and refresh rate were provided
# so instead, using defaults instead.
usrLe... | function cprint() {
numRegex='[0-9]+$'
usrFile=$1
usrTime=$2
defLen=15
defTime=3
# Command line argument processing
if [[ $usrTime =~ $numRegex ]]; then
# A valid number of lines and refresh rate were passed in
else
# Invalid or no lines and refresh rate were provided
# so instead, using defaults instead... | Use function keyword on cprint, remove todo(), add download() | Use function keyword on cprint, remove todo(), add download()
| Shell | mit | obstschale/dotfiles,obstschale/dotfiles,obstschale/dotfiles | shell | ## Code Before:
cprint() {
numRegex='[0-9]+$'
usrFile=$1
usrTime=$2
defLen=15
defTime=3
# Command line argument processing
if [[ $usrTime =~ $numRegex ]]; then
# A valid number of lines and refresh rate were passed in
else
# Invalid or no lines and refresh rate were provided
# so instead, using defaults ... |
c83bd0c306aea84f51006ad99a2edc1636da92f2 | lib/code_corps/services/project.ex | lib/code_corps/services/project.ex | defmodule CodeCorps.Services.ProjectService do
@moduledoc """
Handles special CRUD operations for `CodeCorps.Project`.
"""
import Ecto.Query
alias CodeCorps.{Project, Repo, StripeConnectPlan, StripeConnectSubscription}
def update_project_totals(%Project{stripe_connect_plan: %StripeConnectPlan{id: plan_id... | defmodule CodeCorps.Services.ProjectService do
@moduledoc """
Handles special CRUD operations for `CodeCorps.Project`.
"""
import Ecto.Query
alias CodeCorps.{Project, Repo, StripeConnectPlan, StripeConnectSubscription}
def update_project_totals(%Project{stripe_connect_plan: %StripeConnectPlan{id: plan_id... | Fix duplicate declaration credo warning | Fix duplicate declaration credo warning
| Elixir | mit | code-corps/code-corps-api,crodriguez1a/code-corps-api,code-corps/code-corps-api,crodriguez1a/code-corps-api | elixir | ## Code Before:
defmodule CodeCorps.Services.ProjectService do
@moduledoc """
Handles special CRUD operations for `CodeCorps.Project`.
"""
import Ecto.Query
alias CodeCorps.{Project, Repo, StripeConnectPlan, StripeConnectSubscription}
def update_project_totals(%Project{stripe_connect_plan: %StripeConnect... |
73e8864e745ca75c2ea327b53244c9f2f4183e1a | lambda_function.py | lambda_function.py | from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx
)
def s3_contacts(contacts, bucket, key):
s3 = boto3.client('s3')
o = StringIO()
if key.endswith('.csv'):
t = 'text/csv'
write_co... | from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx,
)
from dmrx_most_heard_n0gsg import (
get_users as get_most_heard,
write_n0gsg_csv,
)
def s3_contacts(contacts, bucket, key):
s3 = boto3.clien... | Add N0GSG DMRX MostHeard to AWS Lambda function | Add N0GSG DMRX MostHeard to AWS Lambda function
| Python | apache-2.0 | ajorg/DMR_contacts | python | ## Code Before:
from StringIO import StringIO
import boto3
from dmr_marc_users_cs750 import (
get_users, get_groups,
write_contacts_csv,
write_contacts_xlsx
)
def s3_contacts(contacts, bucket, key):
s3 = boto3.client('s3')
o = StringIO()
if key.endswith('.csv'):
t = 'text/csv'
... |
f1dfdf9d62613db65392c6eac97d4b367f9f9826 | packages/platform-express/src/services/PlatformExpressRouter.ts | packages/platform-express/src/services/PlatformExpressRouter.ts | import {InjectorService, PLATFORM_ROUTER_OPTIONS, PlatformHandler, PlatformRouter, PlatformStaticsOptions} from "@tsed/common";
import {Configuration, Inject} from "@tsed/di";
import * as Express from "express";
import {RouterOptions} from "express";
import {staticsMiddleware} from "../middlewares/staticsMiddleware";
... | import {PLATFORM_ROUTER_OPTIONS, PlatformHandler, PlatformRouter, PlatformStaticsOptions} from "@tsed/common";
import {Configuration, Inject} from "@tsed/di";
import * as Express from "express";
import {RouterOptions} from "express";
import {staticsMiddleware} from "../middlewares/staticsMiddleware";
declare global {
... | Set mergeStatic to true by default for express | fix(platform-express): Set mergeStatic to true by default for express
| TypeScript | mit | Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators,Romakita/ts-express-decorators | typescript | ## Code Before:
import {InjectorService, PLATFORM_ROUTER_OPTIONS, PlatformHandler, PlatformRouter, PlatformStaticsOptions} from "@tsed/common";
import {Configuration, Inject} from "@tsed/di";
import * as Express from "express";
import {RouterOptions} from "express";
import {staticsMiddleware} from "../middlewares/stati... |
9260ae76dba730555f71ea839d4c42cfe9d5393e | index.js | index.js | var express = require("express"),
mongoose = require("mongoose"),
app = express();
mongoose.connect("mongodb://localhost/test", function (err) {
if (!err) {
console.log("Connected to MongoDB");
} else {
console.error(err);
}
});
app.get("/", function (req, res) {
res.send("Hey buddy!");
});
v... | var express = require("express"),
mongoose = require("mongoose"),
app = express();
mongoose.connect("mongodb://localhost/test", function (err) {
if (!err) {
console.log("Connected to MongoDB");
} else {
console.error(err);
}
});
app.get("/", function (req, res) {
res.send("Hey buddy!");
});
v... | Use callbacks to ensure save is completed before returning a result | Use callbacks to ensure save is completed before returning a result
| JavaScript | mit | shippableSamples/sample_node_mongo,pranaypareek/sample_node_mongo,samples-org-read/sample_node_mongo,a-murphy/sample_node_mongo,navneetjo/sample_node_mongo,buildsample/sample_node_mongo,a-murphy/sample_node_mongo,vidyar/sample_node_mongo | javascript | ## Code Before:
var express = require("express"),
mongoose = require("mongoose"),
app = express();
mongoose.connect("mongodb://localhost/test", function (err) {
if (!err) {
console.log("Connected to MongoDB");
} else {
console.error(err);
}
});
app.get("/", function (req, res) {
res.send("Hey ... |
ac088c3278e509bfaf6fa7b86af1831c7fbb010d | argyle/postgres.py | argyle/postgres.py | from argyle.base import upload_template
from fabric.api import sudo, task
@task
def create_db_user(username, password=None, flags=None):
"""Create a databse user."""
flags = flags or u'-D -A -R'
sudo(u'createuser %s %s' % (flags, username), user=u'postgres')
if password:
change_db_user_passwo... | from argyle.base import upload_template
from fabric.api import sudo, task
@task
def create_db_user(username, password=None, flags=None):
"""Create a databse user."""
flags = flags or u'-D -A -R'
sudo(u'createuser %s %s' % (flags, username), user=u'postgres')
if password:
change_db_user_passwo... | Use sudo to change db user password. | Use sudo to change db user password.
| Python | bsd-2-clause | mlavin/argyle,mlavin/argyle,mlavin/argyle | python | ## Code Before:
from argyle.base import upload_template
from fabric.api import sudo, task
@task
def create_db_user(username, password=None, flags=None):
"""Create a databse user."""
flags = flags or u'-D -A -R'
sudo(u'createuser %s %s' % (flags, username), user=u'postgres')
if password:
chang... |
f473cc24e0f2a41699ed9e684b400cb5cb562ce6 | go_contacts/backends/utils.py | go_contacts/backends/utils.py | from vumi.persist.model import VumiRiakError
from go_api.collections.errors import CollectionUsageError
from go_api.queue import PausingQueueCloseMarker
from twisted.internet.defer import inlineCallbacks, returnValue
@inlineCallbacks
def _get_page_of_keys(model_proxy, user_account_key, max_results, cursor):
try:
... | from vumi.persist.model import VumiRiakError
from go_api.collections.errors import CollectionUsageError
from go_api.queue import PausingQueueCloseMarker
from twisted.internet.defer import inlineCallbacks, returnValue
@inlineCallbacks
def _get_page_of_keys(model_proxy, user_account_key, max_results, cursor):
try:
... | Change to more generic variable names in _fill_queue | Change to more generic variable names in _fill_queue
| Python | bsd-3-clause | praekelt/go-contacts-api,praekelt/go-contacts-api | python | ## Code Before:
from vumi.persist.model import VumiRiakError
from go_api.collections.errors import CollectionUsageError
from go_api.queue import PausingQueueCloseMarker
from twisted.internet.defer import inlineCallbacks, returnValue
@inlineCallbacks
def _get_page_of_keys(model_proxy, user_account_key, max_results, cu... |
8a763f11616eb415aac6b42f8e8bde72402979b5 | packages/le/lens-family-th.yaml | packages/le/lens-family-th.yaml | homepage: http://github.com/DanBurton/lens-family-th#readme
changelog-type: ''
hash: 000f9a41fb0673e6de577c3ff8eba37d33ea9ecc26e36563fb3aef65854043ca
test-bench-deps: {}
maintainer: danburton.email@gmail.com
synopsis: Generate lens-family style lenses
changelog: ''
basic-deps:
base: ==4.*
template-haskell: ! '>=2.5... | homepage: http://github.com/DanBurton/lens-family-th#readme
changelog-type: ''
hash: 13c96ddf2d410ec4e6671c8412710b7cdbbfc837ff5be1d09a6dbb9ecdb9285d
test-bench-deps: {}
maintainer: danburton.email@gmail.com
synopsis: Generate lens-family style lenses
changelog: ''
basic-deps:
base: ==4.*
template-haskell: ! '>=2.7... | Update from Hackage at 2015-05-31T09:40:04+0000 | Update from Hackage at 2015-05-31T09:40:04+0000
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: http://github.com/DanBurton/lens-family-th#readme
changelog-type: ''
hash: 000f9a41fb0673e6de577c3ff8eba37d33ea9ecc26e36563fb3aef65854043ca
test-bench-deps: {}
maintainer: danburton.email@gmail.com
synopsis: Generate lens-family style lenses
changelog: ''
basic-deps:
base: ==4.*
template-h... |
528061262c88236bc522fef5d1650fc37e66d019 | phpunit.xml.dist | phpunit.xml.dist | <phpunit colors="true" bootstrap="tests/bootstrap.php">
<testsuites>
<testsuite>
<directory>tests/tests</directory>
</testsuite>
</testsuites>
<filter>
<blacklist>
<file>tests/bootstrap.php</file>
<directory suffix=".php">tests/classes/</directory>
<directory suffix=".php">vendor/</directory>
</b... | <phpunit colors="true" bootstrap="tests/bootstrap.php">
<testsuites>
<testsuite>
<directory>tests/tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory>lib</directory>
</whitelist>
<blacklist>
<file>tests/bootstrap.php</file>
<directory suffix=".php">tests/classes/</direc... | Improve PHPUnit XML configuration for code coverate reporting | Improve PHPUnit XML configuration for code coverate reporting
| unknown | bsd-3-clause | OpenBuildings/monetary | unknown | ## Code Before:
<phpunit colors="true" bootstrap="tests/bootstrap.php">
<testsuites>
<testsuite>
<directory>tests/tests</directory>
</testsuite>
</testsuites>
<filter>
<blacklist>
<file>tests/bootstrap.php</file>
<directory suffix=".php">tests/classes/</directory>
<directory suffix=".php">vendor/</... |
92870401217facba33ec5f0d22d1db3b24da6847 | releasenotes/source/old_relnotes.rst | releasenotes/source/old_relnotes.rst | =================
Old Release Notes
=================
2.2.2
-----
* improved support for listing a large number of filtered subnets
* add --endpoint-type and OS_ENDPOINT_TYPE to shell client
* made the publicURL the default endpoint instead of adminURL
* add ability to update security group name (requires 2013.2-Hava... | =================
Old Release Notes
=================
2.2.2
-----
* improved support for listing a large number of filtered subnets
* add --endpoint-type and OS_ENDPOINT_TYPE to shell client
* made the publicURL the default endpoint instead of adminURL
* add ability to update security group name (requires 2013.2-Hava... | Remove unnecessary entry from old relnotes | Remove unnecessary entry from old relnotes
commit a97f28f18729a55f3cdc0c7c21d6a183d6b01a1c
accidentally added a new entry to the old release note.
This commit drops it.
Change-Id: I686760d69828e4fdb7b47b30fef09394222c5c56
| reStructuredText | apache-2.0 | openstack/python-neutronclient,noironetworks/python-neutronclient,eayunstack/python-neutronclient,rackerlabs/rackspace-python-neutronclient,openstack/python-neutronclient,noironetworks/python-neutronclient,huntxu/python-neutronclient,rackerlabs/rackspace-python-neutronclient,huntxu/python-neutronclient,eayunstack/pytho... | restructuredtext | ## Code Before:
=================
Old Release Notes
=================
2.2.2
-----
* improved support for listing a large number of filtered subnets
* add --endpoint-type and OS_ENDPOINT_TYPE to shell client
* made the publicURL the default endpoint instead of adminURL
* add ability to update security group name (requ... |
8906b61663e2d0d1074c58b24120a9e6ce3c7140 | lib/identity/cookie_coder.rb | lib/identity/cookie_coder.rb | require "base64"
module Identity
# CookieCoder encodes and decodes payload before setting it to cookie
# Different from FernetCookieCoder, it converts Ruby objects to JSON
# format before encrypting using HMAC with Fernet. The encrypted cookie
# is meant to consumed by other programming languages other than Ru... | require "base64"
module Identity
# CookieCoder encodes and decodes payload before setting it to cookie
# Different from FernetCookieCoder, it converts Ruby objects to JSON
# format before encrypting using HMAC with Fernet. The encrypted cookie
# is meant to consumed by other programming languages other than Ru... | Return nil when verifier is invalid | Return nil when verifier is invalid
| Ruby | mit | heroku/identity,heroku/identity | ruby | ## Code Before:
require "base64"
module Identity
# CookieCoder encodes and decodes payload before setting it to cookie
# Different from FernetCookieCoder, it converts Ruby objects to JSON
# format before encrypting using HMAC with Fernet. The encrypted cookie
# is meant to consumed by other programming languag... |
8880f836f5f328fe24e175fef6b5e275aa15e784 | gattaca/Controller/Home/CHome.swift | gattaca/Controller/Home/CHome.swift | import UIKit
class CHome:Controller<VHome, MHome>
{
deinit
{
NotificationCenter.default.removeObserver(self)
}
override func modelRefresh()
{
DispatchQueue.main.async
{ [weak self] in
self?.asyncRefresh()
}
}
override func v... | import UIKit
class CHome:Controller<VHome, MHome>
{
deinit
{
NotificationCenter.default.removeObserver(self)
}
override func modelRefresh()
{
DispatchQueue.main.async
{ [weak self] in
self?.asyncRefresh()
}
}
override func v... | Validate if home is top vc | Validate if home is top vc
| Swift | mit | turingcorp/gattaca,turingcorp/gattaca | swift | ## Code Before:
import UIKit
class CHome:Controller<VHome, MHome>
{
deinit
{
NotificationCenter.default.removeObserver(self)
}
override func modelRefresh()
{
DispatchQueue.main.async
{ [weak self] in
self?.asyncRefresh()
}
}
... |
4dbf745ed9e938cee5479c5bca2db6c35ecc8639 | _config.yml | _config.yml | highlighter: pygments
permalink: pretty
markdown: kramdown
title: Neovim
description: "vim's rebirth for the 21st century"
news:
name: Neovim Newsletter
authors: Neovim Community
url: http://neovim.org/news
feed: /news.xml
url: "http://neovim.org"
gems:
- jekyll-redirect-from
- jekyll-mentio... | highlighter: pygments
permalink: pretty
markdown: kramdown
title: Neovim
description: "vim's rebirth for the 21st century"
news:
name: Neovim Newsletter
authors: Neovim Community
url: http://neovim.org/news
feed: /news.xml
url: "http://neovim.org"
gems:
- jekyll-redirect-from
- jekyll-mentio... | Exclude Gemfile, CNAME in Jekyll config. | Exclude Gemfile, CNAME in Jekyll config.
| YAML | mit | ZyX-I/neovim.github.io,pygeek/neovim.github.io,dev0x/neovim.github.io,pygeek/neovim.github.io,pygeek/neovim.github.io,neovim/neovim.github.io,ZyX-I/neovim.github.io,dev0x/neovim.github.io,neovim/neovim.github.io,ZyX-I/neovim.github.io,neovim/neovim.github.io,dev0x/neovim.github.io | yaml | ## Code Before:
highlighter: pygments
permalink: pretty
markdown: kramdown
title: Neovim
description: "vim's rebirth for the 21st century"
news:
name: Neovim Newsletter
authors: Neovim Community
url: http://neovim.org/news
feed: /news.xml
url: "http://neovim.org"
gems:
- jekyll-redirect-from
... |
fd5a6fdb0f0161fbd05ae2a967068b5384e03708 | salt/vector/install.sls | salt/vector/install.sls | ensure_package_prerequisite_installations:
pkg.installed:
- pkgs:
- debian-keyring
- debian-archive-keyring
- apt-transport-https
- ca-certificates
- gnupg
install_vector_repo_key:
cmd.run:
- name: curl -1sLf "https://repositories.timber.io/public/vector/cfg/gpg/gpg.... | ensure_package_prerequisite_installations:
pkg.installed:
- pkgs:
- debian-keyring
- debian-archive-keyring
- apt-transport-https
- ca-certificates
- gnupg
install_vector_repo_key:
cmd.run:
- name: curl -1sLf "https://repositories.timber.io/public/vector/cfg/gpg/gpg.... | Fix state name in "require" | Fix state name in "require"
| SaltStack | bsd-3-clause | mitodl/salt-ops,mitodl/salt-ops | saltstack | ## Code Before:
ensure_package_prerequisite_installations:
pkg.installed:
- pkgs:
- debian-keyring
- debian-archive-keyring
- apt-transport-https
- ca-certificates
- gnupg
install_vector_repo_key:
cmd.run:
- name: curl -1sLf "https://repositories.timber.io/public/vec... |
f15545aa0a8abdb6457e7fbc09897454cd185ed3 | rules.json | rules.json | {
"rules": {
"songs": {
".read": true,
".indexOn": ["createdBy"],
"$id": {
".write": "auth != null"
}
},
"users": {
".read": true,
"$uid": {
".write": "auth != null && auth.uid == $uid"
}
}
}
}
| {
"rules": {
"songs": {
".read": true,
".indexOn": ["createdBy"],
"$id": {
".write": "auth != null && (!data.exists() || data.child('createdBy').val() === auth.uid)"
}
},
"users": {
".read": true,
"$uid": {
".write": "auth != null && auth.uid == $uid"
... | Allow to edit song only for its creator. | Allow to edit song only for its creator.
| JSON | mit | steida/songary | json | ## Code Before:
{
"rules": {
"songs": {
".read": true,
".indexOn": ["createdBy"],
"$id": {
".write": "auth != null"
}
},
"users": {
".read": true,
"$uid": {
".write": "auth != null && auth.uid == $uid"
}
}
}
}
## Instruction:
Allow to edit s... |
88263748a1ec742e514b6f321002d06e6e79b36e | plim/adapters/babelplugin.py | plim/adapters/babelplugin.py | """gettext message extraction via Babel: http://babel.edgewall.org/"""
from mako.ext.babelplugin import extract as _extract_mako
from .. import lexer
from ..util import StringIO
def extract(fileobj, keywords, comment_tags, options):
"""Extract messages from Plim templates.
:param fileobj: the file-like obj... | """gettext message extraction via Babel: http://babel.edgewall.org/"""
from mako.ext.babelplugin import extract as _extract_mako
from .. import lexer
from ..util import StringIO, PY3K
def extract(fileobj, keywords, comment_tags, options):
"""Extract messages from Plim templates.
:param fileobj: the file-lik... | Fix Babel plugin in Python3 environment | Fix Babel plugin in Python3 environment
| Python | mit | kxxoling/Plim | python | ## Code Before:
"""gettext message extraction via Babel: http://babel.edgewall.org/"""
from mako.ext.babelplugin import extract as _extract_mako
from .. import lexer
from ..util import StringIO
def extract(fileobj, keywords, comment_tags, options):
"""Extract messages from Plim templates.
:param fileobj: t... |
0fcf80a0bfa27bdacf81864023084cd6cafc98da | data/install-instructions-noimg.txt | data/install-instructions-noimg.txt | How to install the Big Custom Box:
1. In Cockatrice's “Card Database” menu, select “Open custom sets folder”.
2. In Cockatrice's “Card Database” menu, select “Open custom image folder”.
3. Close Cockatrice.
4. Delete all the files in the custom sets folder you opened in step 1 or move them somewhere else.
5. Move all ... | How to install the Big Custom Box:
1. In Cockatrice's “Card Database” menu, select “Open custom sets folder”.
2. In Cockatrice's “Card Database” menu, select “Open custom image folder”.
3. Close Cockatrice.
4. Delete all the files in the custom sets folder you opened in step 1 or move them somewhere else.
5. Move all ... | Fix install instructions for bcb-noimg | Fix install instructions for bcb-noimg
| Text | mit | fenhl/lore-seeker,fenhl/lore-seeker,fenhl/lore-seeker,fenhl/lore-seeker,fenhl/lore-seeker | text | ## Code Before:
How to install the Big Custom Box:
1. In Cockatrice's “Card Database” menu, select “Open custom sets folder”.
2. In Cockatrice's “Card Database” menu, select “Open custom image folder”.
3. Close Cockatrice.
4. Delete all the files in the custom sets folder you opened in step 1 or move them somewhere el... |
e5bb8f721b282cf25cf6ed016c60e7cb66e5cf5d | Resources/templates/CommonAdmin/ListTemplate/filters.php.twig | Resources/templates/CommonAdmin/ListTemplate/filters.php.twig | {% block list_filters %}
{{ echo_block('list_filters') }}
<form action="{{ echo_path(namespace_prefix ~ '_' ~ bundle_name ~ "_filters" ) }}" method="post" {{ echo_twig("form_enctype(form)") }}>
<fieldset class="form_block form_fieldset_NONE">
{{ echo_twig("form_errors(form)") }}
{% for field in buil... | {% block list_filters %}
{{ echo_block('list_filters') }}
<form action="{{ echo_path(namespace_prefix ~ '_' ~ bundle_name ~ "_filters" ) }}" method="post" {{ echo_twig("form_enctype(form)") }}>
<fieldset class="form_block form_fieldset_NONE">
{{ echo_twig("form_errors(form)") }}
{% for field in buil... | Fix rendering filters when display is ~ | Fix rendering filters when display is ~
| Twig | mit | SoCloz/AdmingeneratorOldThemeBundle,SoCloz/AdmingeneratorOldThemeBundle | twig | ## Code Before:
{% block list_filters %}
{{ echo_block('list_filters') }}
<form action="{{ echo_path(namespace_prefix ~ '_' ~ bundle_name ~ "_filters" ) }}" method="post" {{ echo_twig("form_enctype(form)") }}>
<fieldset class="form_block form_fieldset_NONE">
{{ echo_twig("form_errors(form)") }}
{% f... |
6c711425721d113512ddc07cb00177c38618e61a | MashupClient/app/src/main/java/cvut/arenaq/mashup/AlchemyApi/GetRankedTaxonomy.java | MashupClient/app/src/main/java/cvut/arenaq/mashup/AlchemyApi/GetRankedTaxonomy.java | package cvut.arenaq.mashup.AlchemyApi;
import java.util.List;
public class GetRankedTaxonomy {
private String status;
private String language;
private List<Taxonomy> taxonomy;
public String getStatus() {
return status;
}
public String getLanguage() {
return lang... | package cvut.arenaq.mashup.AlchemyApi;
import java.util.List;
public class GetRankedTaxonomy {
private String status;
private String statusInfo;
private String language;
private List<Taxonomy> taxonomy;
public String getStatus() {
return status;
}
public String getS... | Add additional field to result model class of Alchemy api | Add additional field to result model class of Alchemy api
| Java | mit | arenaq/via-mashup | java | ## Code Before:
package cvut.arenaq.mashup.AlchemyApi;
import java.util.List;
public class GetRankedTaxonomy {
private String status;
private String language;
private List<Taxonomy> taxonomy;
public String getStatus() {
return status;
}
public String getLanguage() {
return la... |
f12a4ef32def5048c83da786097f4d8055f03315 | views/index.erb | views/index.erb | <div class="grid">
<div class="unit whole">
What is this? <a href="https://jekyllrb.com/news/2016/03/10/making-it-easier-to-contribute-to-jekyll/">@benbalter explains on the Jekyll blog.</a>
</div>
<% teams.each_with_index do |team, index| %>
<div class="unit one-third">
<h2>The "<%= team.... | <div class="grid">
<% teams.each_with_index do |team, index| %>
<div class="unit one-third">
<h2>The "<%= team.name %>" Team</h2>
<p><%= team.description %> Mention with <code>@<%= org_id %>/<%= team.slug %></code></p>
<a href="/join/<%= team.slug %>">Join the <%= team.name %> team</a>
... | Remove link from Index -- put it on every one :) | Remove link from Index -- put it on every one :) | HTML+ERB | mit | jekyll/teams,jekyll/teams | html+erb | ## Code Before:
<div class="grid">
<div class="unit whole">
What is this? <a href="https://jekyllrb.com/news/2016/03/10/making-it-easier-to-contribute-to-jekyll/">@benbalter explains on the Jekyll blog.</a>
</div>
<% teams.each_with_index do |team, index| %>
<div class="unit one-third">
<h... |
3329631b2e394863fe69b3ddc8cfd18c980a9cc3 | app/views/calendar/_calendar_head.html.erb | app/views/calendar/_calendar_head.html.erb | <% content_for :title, @calendar.title %>
<% content_for :head do %>
<meta name="description" content="<%= @calendar.description %>">
<link rel="alternate" type="application/json" href="<%= calendar_path(@calendar, :format => :json) %>" />
<% @calendar.divisions.each do |division| %>
<link rel="alternate" ty... | <% content_for :title, @calendar.title %>
<% content_for :head do %>
<meta name="description" content="<%= @calendar.description %>">
<link rel="alternate" type="application/json" href="<%= calendar_path(@calendar, :format => :json) %>" />
<% @calendar.divisions.each do |division| %>
<link rel="alternate" ty... | Add schema.org data via the new component | Add schema.org data via the new component
This uses the new component built in
https://github.com/alphagov/govuk_publishing_components/pull/318.
https://trello.com/c/RLQI1IUV
| HTML+ERB | mit | alphagov/calendars,alphagov/calendars,alphagov/calendars,alphagov/calendars | html+erb | ## Code Before:
<% content_for :title, @calendar.title %>
<% content_for :head do %>
<meta name="description" content="<%= @calendar.description %>">
<link rel="alternate" type="application/json" href="<%= calendar_path(@calendar, :format => :json) %>" />
<% @calendar.divisions.each do |division| %>
<link re... |
2807a5214f4a3608e6860217df0505ad03be1e4d | README.md | README.md | A microservice framework for Go
| [](https://drone.io/github.com/achilleasa/usrv/latest)
[](https://coveralls.io/github/achilleasa/usrv)
A microservice framework for Go
| Add drone.io and coveralls.io integration badges | Add drone.io and coveralls.io integration badges
| Markdown | mit | achilleasa/usrv,achilleasa/usrv | markdown | ## Code Before:
A microservice framework for Go
## Instruction:
Add drone.io and coveralls.io integration badges
## Code After:
[](https://drone.io/github.com/achilleasa/usrv/latest)
[
# This comented lines only for testing purposes
#set(CMAKE_C_COMPILER "clang" )
#set(CMAKE_CXX_COMPILER "clang++" )
#add_definitions(-D__STRICT_ANSI__)
#set(CMAKE_C_COMPILER "gcc-4.8" )
#set(CMAKE_CXX_COMPILER "g++-4.8" )
#set(CMAKE_C_COMPILER "gcc-4.9" )
#set(CMAKE_CXX_... | cmake_minimum_required(VERSION ${CMAKE_VERSION})
# This comented lines only for testing purposes
#set(CMAKE_C_COMPILER "clang" )
#set(CMAKE_CXX_COMPILER "clang++" )
#add_definitions(-D__STRICT_ANSI__)
#set(CMAKE_C_COMPILER "gcc-4.8" )
#set(CMAKE_CXX_COMPILER "g++-4.8" )
#set(CMAKE_C_COMPILER "gcc-4.9" )
#set(CMAKE_CXX_... | Remove include for boost. Needed to be improved | Remove include for boost. Needed to be improved
| Text | mit | redradist/Inter-Component-Communication,redradist/Inter-Component-Communication,redradist/Inter-Component-Communication | text | ## Code Before:
cmake_minimum_required(VERSION ${CMAKE_VERSION})
# This comented lines only for testing purposes
#set(CMAKE_C_COMPILER "clang" )
#set(CMAKE_CXX_COMPILER "clang++" )
#add_definitions(-D__STRICT_ANSI__)
#set(CMAKE_C_COMPILER "gcc-4.8" )
#set(CMAKE_CXX_COMPILER "g++-4.8" )
#set(CMAKE_C_COMPILER "gcc-4.9" )... |
a64f4e6d368aba835f3491f3a0bd7403bdce7320 | yuzhouwan-hacker/src/main/scala/com/yuzhouwan/hacker/base/CurryingExample.scala | yuzhouwan-hacker/src/main/scala/com/yuzhouwan/hacker/base/CurryingExample.scala | package com.yuzhouwan.hacker.base
/**
* Copyright @ 2018 yuzhouwan.com
* All right reserved.
* Function: Currying
*
* @author Benedict Jin
* @since 2016/8/8
*/
object CurryingExample {
val addTwoNumbers: (Int, Int) => Unit = (x: Int, y: Int) => println(x + " + " + y + " = " + (x + y))
def main(args... | package com.yuzhouwan.hacker.base
/**
* Copyright @ 2018 yuzhouwan.com
* All right reserved.
* Function: Currying
*
* @author Benedict Jin
* @since 2016/8/8
*/
object CurryingExample {
val addTwoNumbers: (Int, Int) => Unit = (x: Int, y: Int) => println(x + " + " + y + " = " + (x + y))
def main(args... | Add more docs for scala curry example | Add more docs for scala curry example
| Scala | apache-2.0 | asdf2014/yuzhouwan,asdf2014/yuzhouwan,asdf2014/yuzhouwan,asdf2014/yuzhouwan,asdf2014/yuzhouwan,asdf2014/yuzhouwan,asdf2014/yuzhouwan | scala | ## Code Before:
package com.yuzhouwan.hacker.base
/**
* Copyright @ 2018 yuzhouwan.com
* All right reserved.
* Function: Currying
*
* @author Benedict Jin
* @since 2016/8/8
*/
object CurryingExample {
val addTwoNumbers: (Int, Int) => Unit = (x: Int, y: Int) => println(x + " + " + y + " = " + (x + y))
... |
540b7b22fdd26a827572c6e05adce8a16c387e40 | google_configs/dhcp/google_hostname.sh | google_configs/dhcp/google_hostname.sh |
gce_config() {
set_hostname
}
gce_restore() {
:
}
|
google_hostname_config() {
set_hostname
}
google_hostname_restore() {
:
}
| Fix hostname config for EL7. | Fix hostname config for EL7.
| Shell | apache-2.0 | Sarsate/compute-image-packages,Sarsate/compute-image-packages,GoogleCloudPlatform/compute-image-packages,illfelder/compute-image-packages,wrigri/compute-image-packages,wrigri/compute-image-packages,wrigri/compute-image-packages,illfelder/compute-image-packages,wrigri/compute-image-packages,rjschwei/compute-image-packag... | shell | ## Code Before:
gce_config() {
set_hostname
}
gce_restore() {
:
}
## Instruction:
Fix hostname config for EL7.
## Code After:
google_hostname_config() {
set_hostname
}
google_hostname_restore() {
:
}
|
82670a1ec9df1840a96b88f95c4d1292e0c8ef22 | spec/lib/client_spec.rb | spec/lib/client_spec.rb | require "minitest_helper"
describe EasyGeoIP::Client do
let(:url) { "https://www.quandl.com/api/v3/datasets/GOOG/NASDAQ_GOOG.json?rows=1" }
let(:response) { stub(body: "{\"a\": \"b\"}") }
describe ".get" do
it "delegates to Faraday::Connection" do
Faraday::Connection.any_instance.stubs(:get).
... | require "minitest_helper"
describe EasyGeoIP::Client do
let(:url) { "http://jsonip.com" }
let(:response) { stub(body: "{\"a\": \"b\"}") }
describe ".get" do
it "delegates to Faraday::Connection" do
Faraday::Connection.any_instance.stubs(:get).
with(url).returns(response)
EasyGeoIP:... | Use another test URL due to limits on Quandl | Use another test URL due to limits on Quandl
| Ruby | mit | gchan/easy_geoip,gchan/easy_geoip | ruby | ## Code Before:
require "minitest_helper"
describe EasyGeoIP::Client do
let(:url) { "https://www.quandl.com/api/v3/datasets/GOOG/NASDAQ_GOOG.json?rows=1" }
let(:response) { stub(body: "{\"a\": \"b\"}") }
describe ".get" do
it "delegates to Faraday::Connection" do
Faraday::Connection.any_instance.... |
95bddf5a6e1956a2bd6ac1c0831568447e512560 | formfields/GACodeField.php | formfields/GACodeField.php | <?php
/**
* Class GACodeField
*/
class GACodeField extends TextField
{
/**
* @return string
*/
public function Type()
{
return 'text';
}
/**
* Simple validation to make sure the input matches the expected pattern.
*
* @param $validator
* @return bool
*/... | <?php
/**
* Class GACodeField
*/
class GACodeField extends TextField
{
/**
* @return string
*/
public function Type()
{
return 'text';
}
/**
* Simple validation to make sure the input matches the expected pattern.
*
* @param $validator
* @return bool
*/... | Allow no tag to be set | Allow no tag to be set
| PHP | apache-2.0 | peavers/silverstripe-google-analytics,peavers/silverstripe-google-analytics | php | ## Code Before:
<?php
/**
* Class GACodeField
*/
class GACodeField extends TextField
{
/**
* @return string
*/
public function Type()
{
return 'text';
}
/**
* Simple validation to make sure the input matches the expected pattern.
*
* @param $validator
* @ret... |
a19b05f8139754069fdd2bf0387b6111f92905ac | src/utils/RenderDebouncer.ts | src/utils/RenderDebouncer.ts | import { ITerminal, IDisposable } from '../Interfaces';
/**
* Debounces calls to render terminal rows using animation frames.
*/
export class RenderDebouncer implements IDisposable {
private _rowStart: number;
private _rowEnd: number;
private _animationFrame: number = null;
constructor(
private _termina... | import { ITerminal, IDisposable } from '../Interfaces';
/**
* Debounces calls to render terminal rows using animation frames.
*/
export class RenderDebouncer implements IDisposable {
private _rowStart: number;
private _rowEnd: number;
private _animationFrame: number = null;
constructor(
private _termina... | Fix bad type check that caused rows to not refresh | Fix bad type check that caused rows to not refresh
| TypeScript | mit | xtermjs/xterm.js,akalipetis/xterm.js,sourcelair/xterm.js,Tyriar/xterm.js,akalipetis/xterm.js,sourcelair/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,xtermjs/xterm.js,sourcelair/xterm.js,xtermjs/xterm.js,akalipetis/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,Tyriar/xterm.js,akalipetis/xterm.js,xtermjs/xter... | typescript | ## Code Before:
import { ITerminal, IDisposable } from '../Interfaces';
/**
* Debounces calls to render terminal rows using animation frames.
*/
export class RenderDebouncer implements IDisposable {
private _rowStart: number;
private _rowEnd: number;
private _animationFrame: number = null;
constructor(
... |
d05adc89faba2708c1dfb13af61e0449e2cc22f3 | tools/build_adafruit_bins.sh | tools/build_adafruit_bins.sh | rm -rf atmel-samd/build*
rm -rf esp8266/build*
ATMEL_BOARDS="cplay_m0_flash feather_m0_basic feather_m0_adalogger feather_m0_flash metro_m0_flash trinket_m0 gemma_m0"
for board in $ATMEL_BOARDS; do
make -C atmel-samd BOARD=$board
done
make -C esp8266 BOARD=feather_huzzah
version=`git describe --tags --exact-matc... | rm -rf atmel-samd/build*
rm -rf esp8266/build*
ATMEL_BOARDS="arduino_zero cplay_m0_flash feather_m0_basic feather_m0_adalogger feather_m0_flash metro_m0_flash trinket_m0 gemma_m0"
for board in $ATMEL_BOARDS; do
make -C atmel-samd BOARD=$board
done
make -C esp8266 BOARD=feather_huzzah
version=`git describe --tags... | Add arduino zero to default builder and change name to circuitpython. | Add arduino zero to default builder and change name to circuitpython.
| Shell | mit | adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython,adafruit/circuitpython,adafruit/circuitpython | shell | ## Code Before:
rm -rf atmel-samd/build*
rm -rf esp8266/build*
ATMEL_BOARDS="cplay_m0_flash feather_m0_basic feather_m0_adalogger feather_m0_flash metro_m0_flash trinket_m0 gemma_m0"
for board in $ATMEL_BOARDS; do
make -C atmel-samd BOARD=$board
done
make -C esp8266 BOARD=feather_huzzah
version=`git describe --t... |
3561e1abd475ac6b1d3a48076b9f5d8a5ebaf3f1 | src/components/Facets/FacetsGroup.js | src/components/Facets/FacetsGroup.js | import React, { Component } from 'react'
import Facet from './Facet'
import { isActive } from '../../helpers/manageFilters'
const styles = {
type: {
textTransform: 'capitalize',
fontSize: '1em',
fontWeight: 400,
marginBottom: '1em',
},
group: {
marginBottom: '1em',
}
}
class FacetsGroup ex... | import React, { Component } from 'react'
import Facet from './Facet'
import { isActive } from '../../helpers/manageFilters'
const styles = {
type: {
textTransform: 'capitalize',
fontSize: '1em',
fontWeight: 400,
marginBottom: '1em',
},
group: {
marginBottom: '1em',
}
}
class FacetsGroup ex... | Hide facet if no filters are still inactive inside | Hide facet if no filters are still inactive inside
| JavaScript | mit | sgmap/inspire,sgmap/inspire | javascript | ## Code Before:
import React, { Component } from 'react'
import Facet from './Facet'
import { isActive } from '../../helpers/manageFilters'
const styles = {
type: {
textTransform: 'capitalize',
fontSize: '1em',
fontWeight: 400,
marginBottom: '1em',
},
group: {
marginBottom: '1em',
}
}
clas... |
c82864d15770a5878ebf1b1106281822b5164f26 | tests/unit/helpers/number-format-test.js | tests/unit/helpers/number-format-test.js | import { numberFormat } from 'preprint-service/helpers/number-format';
import { module, test } from 'qunit';
module('Unit | Helper | number format');
test('transforms 4 digit number', function(assert) {
let result = numberFormat([3500]);
assert.equal(result, '3,500');
});
test('transforms 10 digit number', funct... | import { numberFormat } from 'preprint-service/helpers/number-format';
import { module, test } from 'qunit';
module('Unit | Helper | number format');
// Works in Chrome but doesn't work in terminal
// test('transforms 4 digit number', function(assert) {
// let result = numberFormat([3500]);
// assert.equal(result... | Comment out tests for now. | Comment out tests for now.
| JavaScript | apache-2.0 | baylee-d/ember-preprints,CenterForOpenScience/ember-preprints,caneruguz/ember-preprints,baylee-d/ember-preprints,laurenrevere/ember-preprints,caneruguz/ember-preprints,laurenrevere/ember-preprints,CenterForOpenScience/ember-preprints | javascript | ## Code Before:
import { numberFormat } from 'preprint-service/helpers/number-format';
import { module, test } from 'qunit';
module('Unit | Helper | number format');
test('transforms 4 digit number', function(assert) {
let result = numberFormat([3500]);
assert.equal(result, '3,500');
});
test('transforms 10 digi... |
44a7dd5876b5f205e0d11ad7475e472210b203ba | spec/lib/roo/excelx_spec.rb | spec/lib/roo/excelx_spec.rb | require 'spec_helper'
describe Roo::Excelx do
describe '.new' do
subject {
Roo::Excelx.new('test/files/numbers1.xlsx')
}
it 'creates an instance' do
expect(subject).to be_a(Roo::Excelx)
end
end
end
| require 'spec_helper'
describe Roo::Excelx do
describe '.new' do
subject {
Roo::Excelx.new('test/files/numbers1.xlsx')
}
it 'creates an instance' do
expect(subject).to be_a(Roo::Excelx)
end
it 'correctly parses files that dont have a spans attribute on rows' do
parsed = Roo::E... | Add test proving it works w/ files that don't supply spans attribute on rowns | Add test proving it works w/ files that don't supply spans attribute on rowns
| Ruby | mit | OpenGov/roo,OpenGov/roo,OpenGov/roo | ruby | ## Code Before:
require 'spec_helper'
describe Roo::Excelx do
describe '.new' do
subject {
Roo::Excelx.new('test/files/numbers1.xlsx')
}
it 'creates an instance' do
expect(subject).to be_a(Roo::Excelx)
end
end
end
## Instruction:
Add test proving it works w/ files that don't supply s... |
766c7e3932e639fe8674c114e923c0f9e149112f | src/Mgate/SuiviBundle/Resources/views/layout.html.twig | src/Mgate/SuiviBundle/Resources/views/layout.html.twig | {% extends "::layout.html.twig" %}
{% block title %}{{ 'suivi.suivi'|trans({}, 'suivi') }}:{% endblock %}
{% block content %}
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">
{% block content_title %}
{{ 'suivi.suivi... | {% extends "::layout.html.twig" %}
{% block title %}{{ 'suivi.suivi'|trans({}, 'suivi') }}:{% endblock %}
{% block content %}
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">
{% block content_title %}
{{ 'suivi.suivi... | Add breadcrumb block to Suivi layout | Add breadcrumb block to Suivi layout
Makes breadcrumb easier to manage
| Twig | agpl-3.0 | M-GaTE/Jeyser,n7consulting/Incipio,N7-Consulting/Incipio,N7-Consulting/Incipio,N7-Consulting/Incipio,N7-Consulting/Incipio,n7consulting/Incipio,n7consulting/Incipio,M-GaTE/Jeyser,M-GaTE/Jeyser,M-GaTE/Jeyser | twig | ## Code Before:
{% extends "::layout.html.twig" %}
{% block title %}{{ 'suivi.suivi'|trans({}, 'suivi') }}:{% endblock %}
{% block content %}
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">
{% block content_title %}
... |
aff435942104dc443fdc6a68741d6eb5402d22ec | index.js | index.js | var extend = require('extend')
var fs = require('fs')
var Handlebars = require('handlebars')
module.exports = plugin
function plugin (options) {
options = extend({
directory: 'helpers'
}, options || {})
return function (files, metalsmith, done) {
fs.readdir(metalsmith.path(options.directory), function ... | var extend = require('extend')
var fs = require('fs')
var Handlebars = require('handlebars')
module.exports = plugin
function plugin (options) {
options = extend({
directory: 'helpers'
}, options || {})
return function (files, metalsmith, done) {
fs.readdir(metalsmith.path(options.directory), function ... | Change preferred templateName to helper methods name | Change preferred templateName to helper methods name
| JavaScript | mit | losttype/metalsmith-register-helpers | javascript | ## Code Before:
var extend = require('extend')
var fs = require('fs')
var Handlebars = require('handlebars')
module.exports = plugin
function plugin (options) {
options = extend({
directory: 'helpers'
}, options || {})
return function (files, metalsmith, done) {
fs.readdir(metalsmith.path(options.direc... |
4b16ef27769403b56516233622505b822f7572d5 | src/codechicken/lib/render/PlaceholderTexture.java | src/codechicken/lib/render/PlaceholderTexture.java | package codechicken.lib.render;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.util.ResourceLocation;
public class PlaceholderTexture extends TextureAtlasSprite
{
protected PlaceholderTexture(String par1)
{
... | package codechicken.lib.render;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.util.ResourceLocation;
public class PlaceholderTexture extends TextureAtlasSprite
{
protected PlaceholderTexture(String par1) {
supe... | Fix texture not found exceptions in console when using placeholder texture | Fix texture not found exceptions in console when using placeholder texture
| Java | lgpl-2.1 | KJ4IPS/CodeChickenLib,alexbegt/CodeChickenLib,TheCBProject/CodeChickenLib,Chicken-Bones/CodeChickenLib | java | ## Code Before:
package codechicken.lib.render;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.util.ResourceLocation;
public class PlaceholderTexture extends TextureAtlasSprite
{
protected PlaceholderTexture(String par1... |
3ca93281531d945643fa303c288d75c27c1eb9e9 | app/workers/mal_import_worker.rb | app/workers/mal_import_worker.rb | require 'nokogiri'
require 'open-uri'
class MALImportWorker
include Sidekiq::Worker
def perform(mal_username, staged_import_id)
staged_import = StagedImport.find(staged_import_id)
username = mal_username
watchlist = MalImport.fetch_watchlist_from_remote(mal_username) rescue []
reviews = MalImport... | require 'nokogiri'
require 'open-uri'
class MALImportWorker
include Sidekiq::Worker
def perform(mal_username, staged_import_id)
staged_import = StagedImport.find(staged_import_id)
return if staged_import.nil?
username = mal_username
watchlist = MalImport.fetch_watchlist_from_remote(mal_usern... | Reduce the number of unnecessary retries. | Reduce the number of unnecessary retries.
| Ruby | apache-2.0 | cybrox/hummingbird,wlads/hummingbird,qgustavor/hummingbird,xhocquet/hummingbird,erengy/hummingbird,NuckChorris/hummingbird,saintsantos/hummingbird,wlads/hummingbird,saintsantos/hummingbird,Snitzle/hummingbird,synthtech/hummingbird,sidaga/hummingbird,erengy/hummingbird,astraldragon/hummingbird,astraldragon/hummingbird,x... | ruby | ## Code Before:
require 'nokogiri'
require 'open-uri'
class MALImportWorker
include Sidekiq::Worker
def perform(mal_username, staged_import_id)
staged_import = StagedImport.find(staged_import_id)
username = mal_username
watchlist = MalImport.fetch_watchlist_from_remote(mal_username) rescue []
rev... |
4aabf7bf11f0044b2ee8550530efd346d30daba1 | README.md | README.md |
Contains a number of helpers for Drupal development. |
Contains a number of helpers for Drupal development.
## Requirements:
* Drush
* Install drush: `brew install drush` | Add mention of drush as a requirement | Add mention of drush as a requirement
| Markdown | mit | shrop/drupal.chocmixin | markdown | ## Code Before:
Contains a number of helpers for Drupal development.
## Instruction:
Add mention of drush as a requirement
## Code After:
Contains a number of helpers for Drupal development.
## Requirements:
* Drush
* Install drush: `brew install drush` |
8f9737a551807974a261c4afa1a1c48f0eedf2a3 | app/assets/javascripts/helpers/prop_types.js | app/assets/javascripts/helpers/prop_types.js | (function() {
window.shared || (window.shared = {});
// Allow a prop to be null, if the prop type explicitly allows this.
// Then fall back to another validator if a value is passed.
var nullable = function(validator) {
return function(props, propName, componentName) {
if (props[propName] === null) r... | (function() {
window.shared || (window.shared = {});
// Allow a prop to be null, if the prop type explicitly allows this.
// Then fall back to another validator if a value is passed.
var nullable = function(validator) {
return function(props, propName, componentName) {
if (props[propName] === null) r... | Remove deprecated notes from PropTypes helper | Remove deprecated notes from PropTypes helper
| JavaScript | mit | erose/studentinsights,erose/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,jhilde/studentinsights,studentinsights/studentinsights,erose/studentinsights,studentinsights/studentinsights,studentinsights/studentinsights,jhilde/studentinsights,jhilde/studentinsights,erose/studentinsights | javascript | ## Code Before:
(function() {
window.shared || (window.shared = {});
// Allow a prop to be null, if the prop type explicitly allows this.
// Then fall back to another validator if a value is passed.
var nullable = function(validator) {
return function(props, propName, componentName) {
if (props[propN... |
9b19623b5334c1f803bd81c99e48a8826e9e46ba | README.md | README.md | [](https://circleci.com/gh/Soliah/chef-nginx)
# chef-nginx
Installs the [nginx](http://nginx.org) web server. This has been heavily modified from [upstream](phlipper/chef-nginx) for my needs.
## Requirements
Only tested to be working on the follow... | [](https://circleci.com/gh/Soliah/chef-nginx)
# chef-nginx
Installs the [nginx](http://nginx.org) web server. This has been heavily modified from [upstream](phlipper/chef-nginx) for my needs.
## Requirements
Only tested to be working on the follow... | Remove Ubuntu 12.04 from readme. | Remove Ubuntu 12.04 from readme.
| Markdown | mit | kinesisptyltd/chef-nginx,kinesisptyltd/chef-nginx | markdown | ## Code Before:
[](https://circleci.com/gh/Soliah/chef-nginx)
# chef-nginx
Installs the [nginx](http://nginx.org) web server. This has been heavily modified from [upstream](phlipper/chef-nginx) for my needs.
## Requirements
Only tested to be worki... |
2461f9e47c6f553faf04f7385c7417b3e9f3365d | Sources/MIMEResolver.swift | Sources/MIMEResolver.swift | //
// MIMEResolver.swift
// MIMEResolver
//
// Created by Jakub Petrík on 10/15/16.
// Copyright © 2016 Inloop, s.r.o. All rights reserved.
//
public final class MIMEResolver {
private var registeredTypes = [String: MIME]()
public static let `default` = MIMEResolver()
public func register(mimeType: M... | //
// MIMEResolver.swift
// MIMEResolver
//
// Created by Jakub Petrík on 10/15/16.
// Copyright © 2016 Inloop, s.r.o. All rights reserved.
//
public final class MIMEResolver {
private var registeredTypes = [String: MIME]()
public static let `default` = MIMEResolver()
public func register(mimeType: M... | Add stubs for unregister and resolve funcs | Add stubs for unregister and resolve funcs
| Swift | mit | inloop/MIMEResolver,inloop/MIMEResolver | swift | ## Code Before:
//
// MIMEResolver.swift
// MIMEResolver
//
// Created by Jakub Petrík on 10/15/16.
// Copyright © 2016 Inloop, s.r.o. All rights reserved.
//
public final class MIMEResolver {
private var registeredTypes = [String: MIME]()
public static let `default` = MIMEResolver()
public func regi... |
cbd82fe7c45e0bd8e731471e1573b3acfeb07bca | app/views/devise/registrations/new.html.erb | app/views/devise/registrations/new.html.erb | <% @target_url = registration_path(resource_name)
@signup = true
%>
<%= render 'devise/shared/auth', locals: {
signup: @signup,
resource: @resource,
resource_name: @resource_name,
target_url: @target_url
} %>
<%= flash[:recaptcha_error] %>
<%= recaptcha_tags %>
| <% @target_url = registration_path(resource_name)
@signup = true
%>
<%= render 'devise/shared/auth', locals: {
signup: @signup,
resource: @resource,
resource_name: @resource_name,
target_url: @target_url
} %>
<div class="text--center">
<div class="the-badge mt sans-serif">
<%= flash[:reca... | Add css for the captcha | Add css for the captcha
| HTML+ERB | mit | rubymonsters/speakerinnen_liste,BriocheBerlin/speakerinnen_liste,1000miles/speakerinnen_liste,1000miles/speakerinnen_liste,BriocheBerlin/speakerinnen_liste,1000miles/speakerinnen_liste,BriocheBerlin/speakerinnen_liste,rubymonsters/speakerinnen_liste,rubymonsters/speakerinnen_liste | html+erb | ## Code Before:
<% @target_url = registration_path(resource_name)
@signup = true
%>
<%= render 'devise/shared/auth', locals: {
signup: @signup,
resource: @resource,
resource_name: @resource_name,
target_url: @target_url
} %>
<%= flash[:recaptcha_error] %>
<%= recaptcha_tags %>
## Instr... |
ddeef0257a6d6ced37b864dc6f280b9ed87c9565 | .travis.yml | .travis.yml | language: python
dist: focal
cache:
directories:
- $HOME/.cache/pip
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "pypy3"
install:
- sudo apt-get update && sudo apt-get install -y pigz
- pip install --upgrade coverage codecov
- pip install .
script:
- python setup.py --version # Detect encodin... | language: python
dist: focal
cache:
directories:
- $HOME/.cache/pip
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "pypy3"
install:
- sudo apt-get update && sudo apt-get install -y pigz
- pip install --upgrade coverage codecov
- pip install .
script:
- python setup.py --version # Detect encodin... | Add igzip to test phase | Add igzip to test phase
| YAML | mit | marcelm/xopen | yaml | ## Code Before:
language: python
dist: focal
cache:
directories:
- $HOME/.cache/pip
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "pypy3"
install:
- sudo apt-get update && sudo apt-get install -y pigz
- pip install --upgrade coverage codecov
- pip install .
script:
- python setup.py --version ... |
a01a51bcb63e71f8556f8c82b9fd9df3c99eec1c | template/package.json | template/package.json | {
"name": "%name%",
"version": "1.0.0",
"description": "%description%",
"engines": {
"node": ">=%node_version%"
},
"leanixReport": {
"id": "%id%",
"title": "%title%",
"defaultConfig": {}
},
"scripts": {
"build": "lxr build",
"start": "lxr start",
"upload": "lxr upload",
"... | {
"name": "%name%",
"version": "1.0.0",
"description": "%description%",
"engines": {
"node": ">=%node_version%"
},
"leanixReport": {
"id": "%id%",
"title": "%title%",
"defaultConfig": {}
},
"scripts": {
"build": "lxr build",
"start": "lxr start",
"upload": "lxr upload",
"... | Update @leanix/reporting library to 0.3.3 and remove jquery | Update @leanix/reporting library to 0.3.3 and remove jquery
| JSON | apache-2.0 | leanix/leanix-reporting-cli,leanix/leanix-reporting-cli | json | ## Code Before:
{
"name": "%name%",
"version": "1.0.0",
"description": "%description%",
"engines": {
"node": ">=%node_version%"
},
"leanixReport": {
"id": "%id%",
"title": "%title%",
"defaultConfig": {}
},
"scripts": {
"build": "lxr build",
"start": "lxr start",
"upload": "lx... |
8a79503bfd52ca3f9e6e5db25b23824688023814 | application/schema/type/install.sql | application/schema/type/install.sql | @&&run_dir_begin
prompt Creating type QUILT_REPORT_PROCESS_TYPE
@@quilt_report_process.tps
prompt Creating type QUILT_REPORT_TYPE
@@quilt_report_type.tps
prompt Creating type body QUILT_REPORT_PROCESS
@@quilt_report_process.tpb
prompt Creating type QUILT_OBJECT_TYPE
@@quilt_object_type.tps
prompt Creating type QU... | @&&run_dir_begin
prompt Creating type QUILT_REPORT_PROCESS_TYPE
@@quilt_report_process_type.tps
prompt Creating type QUILT_REPORT_TYPE
@@quilt_report_type.tps
prompt Creating type body QUILT_REPORT_PROCESS_TYPE
@@quilt_report_process_type.tpb
prompt Creating type QUILT_OBJECT_TYPE
@@quilt_object_type.tps
prompt C... | Rename typu - oprava SQL skriptu pro nasazeni typu | Rename typu - oprava SQL skriptu pro nasazeni typu
| SQL | mit | s-oravec/quilt,s-oravec/quilt | sql | ## Code Before:
@&&run_dir_begin
prompt Creating type QUILT_REPORT_PROCESS_TYPE
@@quilt_report_process.tps
prompt Creating type QUILT_REPORT_TYPE
@@quilt_report_type.tps
prompt Creating type body QUILT_REPORT_PROCESS
@@quilt_report_process.tpb
prompt Creating type QUILT_OBJECT_TYPE
@@quilt_object_type.tps
prompt ... |
d7252f21755347ea7cc6a650d950e14ffe3440e8 | README.md | README.md |
This is `fiinch`, the **FI**le **IN**tegrity **CH**ecker. `fiinch`'s ultimate goal is to run a variety of tests against a directory tree. It can be invoked like this:
```
fiinch <directoryname1> <directoryname2> ...
```
It will recursively check all the files in each directory provided, in turn. If any file doesn'... |
This is `fiinch`, the **FI**le **IN**tegrity **CH**ecker. `fiinch`'s ultimate goal is to run a variety of tests against a directory tree. It can be invoked like this:
```
fiinch <directoryname1> <directoryname2> ...
```
It will recursively check all the files in each directory provided, in turn. If any file doesn'... | Add comment about dependent modules. | Add comment about dependent modules.
| Markdown | mit | andrewferrier/fiinch | markdown | ## Code Before:
This is `fiinch`, the **FI**le **IN**tegrity **CH**ecker. `fiinch`'s ultimate goal is to run a variety of tests against a directory tree. It can be invoked like this:
```
fiinch <directoryname1> <directoryname2> ...
```
It will recursively check all the files in each directory provided, in turn. If... |
38fdaa34df2383b3af00ba1149a8f60b0f0c3ab6 | lib/Spark/Controller/Base.php | lib/Spark/Controller/Base.php | <?php
namespace Spark\Controller;
use Silex\Application;
use Symfony\Component\HttpFoundation\Response;
use Spark\Core\ApplicationAware;
abstract class Base implements ApplicationAware
{
use ActionHelper\Filters;
use ActionHelper\Redirect;
use ActionHelper\Layout;
protected $application;
protect... | <?php
namespace Spark\Controller;
use Silex\Application;
use Symfony\Component\HttpFoundation\Response;
use Spark\Core\ApplicationAware;
abstract class Base implements ApplicationAware
{
use ActionHelper\Filters;
use ActionHelper\Redirect;
use ActionHelper\Layout;
protected $application;
protect... | Add option 'response' to render | Add option 'response' to render
| PHP | mit | sparkframework/spark | php | ## Code Before:
<?php
namespace Spark\Controller;
use Silex\Application;
use Symfony\Component\HttpFoundation\Response;
use Spark\Core\ApplicationAware;
abstract class Base implements ApplicationAware
{
use ActionHelper\Filters;
use ActionHelper\Redirect;
use ActionHelper\Layout;
protected $applicat... |
ce54c5c29f49e32dd6adeb2e1ace9dcf889d5603 | packages/get-random-values/index.js | packages/get-random-values/index.js | const getRandomValues = (buf) => {
if (typeof process !== 'undefined') {
const nodeCrypto = require('crypto');
const bytes = nodeCrypto.randomBytes(buf.length);
buf.set(bytes);
return buf;
}
if (window.crypto && window.crypto.getRandomValues) {
return window.crypto.getRandomValues(buf);
}
... | const getRandomValues = (buf) => {
if (typeof process !== 'undefined') {
const nodeCrypto = require('crypto');
const bytes = nodeCrypto.randomBytes(buf.length);
buf.set(bytes);
return buf;
}
if (typeof crypto !== 'undefined') {
return crypto.getRandomValues(buf);
}
if (window.crypto && w... | Support generating random values in web worker without window | Support generating random values in web worker without window
| JavaScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | javascript | ## Code Before:
const getRandomValues = (buf) => {
if (typeof process !== 'undefined') {
const nodeCrypto = require('crypto');
const bytes = nodeCrypto.randomBytes(buf.length);
buf.set(bytes);
return buf;
}
if (window.crypto && window.crypto.getRandomValues) {
return window.crypto.getRandomVa... |
79e4f951968faed957918f5b86f4983027733b07 | src/main/resources/META-INF/lint-rules/all-dependency.properties | src/main/resources/META-INF/lint-rules/all-dependency.properties |
includes=unused-exclude-by-conf,unused-exclude-by-dep,unused-dependency,duplicate-dependency-class,overridden-dependency-version |
includes=unused-exclude-by-conf,unused-exclude-by-dep,unused-dependency,duplicate-dependency-class,transitive-duplicate-dependency-class,overridden-dependency-version | Add transitive duplicate dependency class rule to all rule | Add transitive duplicate dependency class rule to all rule
| INI | apache-2.0 | nebula-plugins/gradle-lint-plugin,nebula-plugins/gradle-lint-plugin | ini | ## Code Before:
includes=unused-exclude-by-conf,unused-exclude-by-dep,unused-dependency,duplicate-dependency-class,overridden-dependency-version
## Instruction:
Add transitive duplicate dependency class rule to all rule
## Code After:
includes=unused-exclude-by-conf,unused-exclude-by-dep,unused-dependency,duplicate-... |
41e5e7fcff622ccdc2cbf18d5046f844860d375b | app/js/components/dashboard_panel/dashboard_panel.jsx | app/js/components/dashboard_panel/dashboard_panel.jsx | import React, { PropTypes } from 'react'
import { TABLEAU_HOST } from '../../constants/app_constants'
import './dashboard_panel.scss'
const DashboardPanel = ({leftHandNavVisible, dashboard, token}) => {
return token && dashboard
? <div className={`dashboard-panel ${leftHandNavVisible ? 'collapsed' : 'expanded'... | import React, { PropTypes } from 'react'
import { TABLEAU_HOST } from '../../constants/app_constants'
import './dashboard_panel.scss'
const DashboardPanel = ({ leftHandNavVisible, dashboard, token, userId }) => {
return dashboard && token
? <div className={`dashboard-panel ${leftHandNavVisible ? 'collapsed' : ... | Add userId to UUID param in iframe URL | Add userId to UUID param in iframe URL
| JSX | mit | reevoo/client_portal-analytics_frontend,reevoo/client_portal-analytics_frontend,reevoo/client_portal-analytics_frontend,reevoo/client_portal-analytics_frontend | jsx | ## Code Before:
import React, { PropTypes } from 'react'
import { TABLEAU_HOST } from '../../constants/app_constants'
import './dashboard_panel.scss'
const DashboardPanel = ({leftHandNavVisible, dashboard, token}) => {
return token && dashboard
? <div className={`dashboard-panel ${leftHandNavVisible ? 'collaps... |
8b17519bcd20f691f94019be636eb474f6a1f706 | server/options-handler.js | server/options-handler.js | var fs = require('fs');
var path = require('path');
var argv = require('optimist').argv;
// Load options into JS object.
exports.options = JSON.parse(fs.readFileSync(path.resolve(__dirname,'../'+argv.optionsFile)));
| var fs = require('fs');
var path = require('path');
var argv = require('optimist').argv;
// Load options into JS object.
exports.options = JSON.parse(fs.readFileSync(argv.optionsFile));
| Change options handler to use filepath instead of filename. | Change options handler to use filepath instead of filename.
| JavaScript | mit | MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave,MisterTea/TidalWave | javascript | ## Code Before:
var fs = require('fs');
var path = require('path');
var argv = require('optimist').argv;
// Load options into JS object.
exports.options = JSON.parse(fs.readFileSync(path.resolve(__dirname,'../'+argv.optionsFile)));
## Instruction:
Change options handler to use filepath instead of filename.
## Code ... |
ab1a77facf8a5f0d34e1ef61e8abce65ccfe772f | src/components/republia-times.js | src/components/republia-times.js | var React = require( "react" );
var MorningScreen = require( "./morning-screen" );
var PlayScreen = require( "./play-screen" );
module.exports = React.createClass({
displayName: "RepubliaTimes",
getInitialState() {
return {
day: 1,
screen: "morning"
};
},
changeToScreen( newScreen ) {
this.setState({... | var React = require( "react" );
var MorningScreen = require( "./morning-screen" );
var PlayScreen = require( "./play-screen" );
module.exports = React.createClass({
displayName: "RepubliaTimes",
getInitialState() {
return {
day: 1,
screen: "morning"
};
},
changeToScreen( newScreen ) {
this.setState({... | Use an arrow function instead | Use an arrow function instead
| JavaScript | isc | bjohn465/republia-times,bjohn465/republia-times | javascript | ## Code Before:
var React = require( "react" );
var MorningScreen = require( "./morning-screen" );
var PlayScreen = require( "./play-screen" );
module.exports = React.createClass({
displayName: "RepubliaTimes",
getInitialState() {
return {
day: 1,
screen: "morning"
};
},
changeToScreen( newScreen ) {
... |
dbe056b8b46fdee2b615d85c69e1de62c601ac5c | Casks/tower-beta.rb | Casks/tower-beta.rb | cask :v1 => 'tower-beta' do
version '2.2.3-285'
sha256 'c9d79a6a8bfc298f38a2d7dbe724d71468f86c1de09fabd1d9da754fd8a40f74'
# amazonaws.com is the official download host per the vendor homepage
url "https://fournova-app-updates.s3.amazonaws.com/apps/tower2-mac/285-e057eb4f/Tower-2-#{version}.zip"
appcast 'http... | cask :v1 => 'tower-beta' do
version '2.3.0-290'
sha256 '5afc0f512f198782070973f12f93f5ca600b18c97032a1a81ef4670f2e5a8c45'
# amazonaws.com is the official download host per the vendor homepage
url "https://fournova-app-updates.s3.amazonaws.com/apps/tower2-mac/290-bfbb31e4/Tower-2-#{version}.zip"
appcast 'http... | Update Tower Beta to version 2.3.0 | Update Tower Beta to version 2.3.0
This commit updates the version, sha256 and url stanzas.
| Ruby | bsd-2-clause | yurikoles/homebrew-versions,zorosteven/homebrew-versions,wickedsp1d3r/homebrew-versions,gcds/homebrew-versions,404NetworkError/homebrew-versions,bondezbond/homebrew-versions,peterjosling/homebrew-versions,danielbayley/homebrew-versions,pkq/homebrew-versions,wickedsp1d3r/homebrew-versions,victorpopkov/homebrew-versions,... | ruby | ## Code Before:
cask :v1 => 'tower-beta' do
version '2.2.3-285'
sha256 'c9d79a6a8bfc298f38a2d7dbe724d71468f86c1de09fabd1d9da754fd8a40f74'
# amazonaws.com is the official download host per the vendor homepage
url "https://fournova-app-updates.s3.amazonaws.com/apps/tower2-mac/285-e057eb4f/Tower-2-#{version}.zip"... |
cea028fd6a55bf013b926d94fd93934e4fe10607 | .travis.yml | .travis.yml | language: ruby
dist: precise
branches:
only:
- master
- ruby_jit
rvm:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
env:
- RUBYOPT="--jit"
- ""
matrix:
exclude:
- rvm: 2.2
env: RUBYOPT="--jit"
- rvm: 2.3
env: RUBYOPT="--jit"
- rvm: 2.4
env: RUBYOPT="--jit"
- rvm: 2.5
... | language: ruby
dist: precise
branches:
only:
- master
- ruby_jit
rvm:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
env:
- RUBYOPT="--jit"
- ""
matrix:
exclude:
- rvm: 2.2
env: RUBYOPT="--jit"
- rvm: 2.3
env: RUBYOPT="--jit"
- rvm: 2.4
env: RUBYOPT="--jit"
- rvm: 2.5
... | Allow --jit jobs to fail without marking the whole build as a fail. | Allow --jit jobs to fail without marking the whole build as a fail.
| YAML | mit | grosser/parallel | yaml | ## Code Before:
language: ruby
dist: precise
branches:
only:
- master
- ruby_jit
rvm:
- 2.2
- 2.3
- 2.4
- 2.5
- 2.6
env:
- RUBYOPT="--jit"
- ""
matrix:
exclude:
- rvm: 2.2
env: RUBYOPT="--jit"
- rvm: 2.3
env: RUBYOPT="--jit"
- rvm: 2.4
env: RUBYOPT="--jit"
... |
00bb631437fdf45c7a067da43aa042f8b1f6ef8e | osf_models/models/tag.py | osf_models/models/tag.py | from django.db import models
from .base import BaseModel
class Tag(BaseModel):
_id = models.CharField(max_length=1024)
lower = models.CharField(max_length=1024)
system = models.BooleanField(default=False)
| from django.db import models
from .base import BaseModel
class Tag(BaseModel):
_id = models.CharField(max_length=1024)
lower = models.CharField(max_length=1024)
system = models.BooleanField(default=False)
class Meta:
unique_together = ('_id', 'system')
| Add unique together on _id and system | Add unique together on _id and system
| Python | apache-2.0 | Nesiehr/osf.io,adlius/osf.io,erinspace/osf.io,CenterForOpenScience/osf.io,felliott/osf.io,crcresearch/osf.io,caneruguz/osf.io,caseyrollins/osf.io,laurenrevere/osf.io,Nesiehr/osf.io,baylee-d/osf.io,leb2dg/osf.io,acshi/osf.io,monikagrabowska/osf.io,monikagrabowska/osf.io,cslzchen/osf.io,chrisseto/osf.io,chennan47/osf.io,... | python | ## Code Before:
from django.db import models
from .base import BaseModel
class Tag(BaseModel):
_id = models.CharField(max_length=1024)
lower = models.CharField(max_length=1024)
system = models.BooleanField(default=False)
## Instruction:
Add unique together on _id and system
## Code After:
from django.d... |
6daf407cfe5a4ca4b68941ae60862d178685596d | Jenkinsfiles/demo.groovy | Jenkinsfiles/demo.groovy | stage('Build & push images') {
sh 'make build-kuma push-kuma'
}
stage('Deploy') {
env.KUBECONFIG = "${env.HOME}/.kube/virginia.kubeconfig"
env.DEIS_PROFILE = 'virginia'
env.DEIS_BIN = 'deis2'
env.DEIS_APP = 'mdn-demo-' + env.BRANCH_NAME
env.DJANGO_SETTINGS_MODULE = 'kuma.settings.prod'
assert env.BRANCH_... | stage('Build & push images') {
sh 'make build-kuma push-kuma'
}
stage('Deploy') {
env.KUBECONFIG = "${env.HOME}/.kube/virginia.kubeconfig"
env.DEIS_PROFILE = 'virginia'
env.DEIS_BIN = 'deis2'
env.DEIS_APP = 'mdn-demo-' + env.BRANCH_NAME
env.DJANGO_SETTINGS_MODULE = 'kuma.settings.prod'
assert env.BRANCH_... | Rework kubectl apply to work around namespace issue | Rework kubectl apply to work around namespace issue
| Groovy | mpl-2.0 | Elchi3/kuma,jwhitlock/kuma,a2sheppy/kuma,mozilla/kuma,SphinxKnight/kuma,mozilla/kuma,escattone/kuma,escattone/kuma,a2sheppy/kuma,jwhitlock/kuma,Elchi3/kuma,jwhitlock/kuma,a2sheppy/kuma,SphinxKnight/kuma,mozilla/kuma,a2sheppy/kuma,SphinxKnight/kuma,a2sheppy/kuma,SphinxKnight/kuma,SphinxKnight/kuma,escattone/kuma,jwhitlo... | groovy | ## Code Before:
stage('Build & push images') {
sh 'make build-kuma push-kuma'
}
stage('Deploy') {
env.KUBECONFIG = "${env.HOME}/.kube/virginia.kubeconfig"
env.DEIS_PROFILE = 'virginia'
env.DEIS_BIN = 'deis2'
env.DEIS_APP = 'mdn-demo-' + env.BRANCH_NAME
env.DJANGO_SETTINGS_MODULE = 'kuma.settings.prod'
as... |
facc5b8500d95fe23f0b8581fdbb9b8614073bdf | recipes/ppa.rb | recipes/ppa.rb |
apt_repository 'ubiquiti_unifi' do
uri 'http://www.ubnt.com/downloads/unifi/debian'
components %w(stable ubiquiti)
keyserver 'keyserver.ubuntu.com'
key 'C0A52C50'
end
|
apt_repository 'ubiquiti_unifi' do
uri 'http://www.ubnt.com/downloads/unifi/debian'
components %w(stable ubiquiti)
distribution nil
keyserver 'keyserver.ubuntu.com'
key 'C0A52C50'
end
| Support the new version of the apt cookbook | Support the new version of the apt cookbook
| Ruby | apache-2.0 | tas50/unifi | ruby | ## Code Before:
apt_repository 'ubiquiti_unifi' do
uri 'http://www.ubnt.com/downloads/unifi/debian'
components %w(stable ubiquiti)
keyserver 'keyserver.ubuntu.com'
key 'C0A52C50'
end
## Instruction:
Support the new version of the apt cookbook
## Code After:
apt_repository 'ubiquiti_unifi' do
uri 'http://w... |
f37ff79341427ed2a2043d00ea9a6589afe23686 | application/models/sample.php | application/models/sample.php | <?php
/**
* PunyApp:
* The puny developer framework for rapid compiling.
*/
class SampleModel extends PunyApp_Model {
public function addUser($user_id, $email, $pass) {
if ($this->isUserId($user_id)) {
return false;
}
return $this->insert(array(
'userId' => ':userId',
'email' => ... | <?php
/**
* PunyApp:
* The puny developer framework for rapid compiling.
*/
class SampleModel extends PunyApp_Model {
public function addUser($userid, $email, $pass) {
if ($this->isUserId($userid)) {
return false;
}
$sample = $this->newInstance();
$sample->userid = $userid;
$sample->... | Add Model::newInstance() and create() methods example. | Add Model::newInstance() and create() methods example.
| PHP | mit | polygonplanet/PunyApp | php | ## Code Before:
<?php
/**
* PunyApp:
* The puny developer framework for rapid compiling.
*/
class SampleModel extends PunyApp_Model {
public function addUser($user_id, $email, $pass) {
if ($this->isUserId($user_id)) {
return false;
}
return $this->insert(array(
'userId' => ':userId',
... |
fd23b69edb277130bd9254529e74e420f5be84cf | README.md | README.md |
A simple Python script to generate a template of journal entries for a month.
```
# by default it prints dates for this month
$ journal_dates
Deník 2015/08
1.8.2015 (So)
2.8.2015 (Ne)
[...]
30.8.2015 (Ne)
31.8.2015 (Po)
# year and month specified
$ journal_dates 2015 9
Deník 2015/08
1.8.2015 (So)
2.8.2015 (Ne)
[..... |
[](https://pypi.python.org/pypi/journal_dates)


A simple Python script to generate a template of journal ent... | Add install instruction and some PyPI badges. | Add install instruction and some PyPI badges.
| Markdown | mit | bzamecnik/journal_dates | markdown | ## Code Before:
A simple Python script to generate a template of journal entries for a month.
```
# by default it prints dates for this month
$ journal_dates
Deník 2015/08
1.8.2015 (So)
2.8.2015 (Ne)
[...]
30.8.2015 (Ne)
31.8.2015 (Po)
# year and month specified
$ journal_dates 2015 9
Deník 2015/08
1.8.2015 (So)
2... |
7a4b00b06b10b9d8381326e73b69b28cdf2d716a | .travis.yml | .travis.yml | reference: http://www.objc.io/issue-6/travis-ci.html
language: objective-c
cache: bundler
script:
- xctool test -workspace Example/EPSNameFormatter.xcworkspace -scheme EPSNameFormatter -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
| reference: http://www.objc.io/issue-6/travis-ci.html
language: objective-c
cache: bundler
before_install:
- gem install cocoapods -v '0.33.1'
script:
- xctool test -workspace Example/EPSNameFormatter.xcworkspace -scheme EPSNameFormatter -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
| Make sure cocoapods is up to date. | Make sure cocoapods is up to date.
| YAML | mit | ElectricPeelSoftware/EPSNameFormatter | yaml | ## Code Before:
reference: http://www.objc.io/issue-6/travis-ci.html
language: objective-c
cache: bundler
script:
- xctool test -workspace Example/EPSNameFormatter.xcworkspace -scheme EPSNameFormatter -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO
## Instruction:
Make sure cocoapods is up to date.
## Code After:
reference:... |
fa72c0202c2e5eacfc9120df0e1c5713c7e88232 | README.md | README.md | twitchtv-items
==============
Managing twitch.tv items.
| twitchtv-items
==============
Managing twitch.tv items.
Sorting Tips:
* `LC_COLLATE=C sort -u unsorted.txt > sorted.txt`
* `split --lines 50000 --numeric-suffixes sorted.txt things-`
| Add sorting tips as a reminder to myself. | readme: Add sorting tips as a reminder to myself.
| Markdown | unlicense | ArchiveTeam/twitchtv-items | markdown | ## Code Before:
twitchtv-items
==============
Managing twitch.tv items.
## Instruction:
readme: Add sorting tips as a reminder to myself.
## Code After:
twitchtv-items
==============
Managing twitch.tv items.
Sorting Tips:
* `LC_COLLATE=C sort -u unsorted.txt > sorted.txt`
* `split --lines 50000 --numeric-suffi... |
0d1dbb88c0d99cfe1c17e9d4b12deeb6732c66f9 | sources/un.org/2015-members/meta.txt | sources/un.org/2015-members/meta.txt | URL: http://www.un.org/en/members/
Title: Member States of the United Nations
| URL: http://www.un.org/en/members/
Title: Member States of the United Nations
Checked: 2015-01-22
| Check data.csv against source in HTML format | Check data.csv against source in HTML format
I accessed the HTML source through the redirection of url.html
and compared data.csv with it line by line. I found no differences,
except asterisks at the end of names, removed on purpose.
| Text | cc0-1.0 | eric-brechemier/ipcc-countries,eric-brechemier/ipcc-countries | text | ## Code Before:
URL: http://www.un.org/en/members/
Title: Member States of the United Nations
## Instruction:
Check data.csv against source in HTML format
I accessed the HTML source through the redirection of url.html
and compared data.csv with it line by line. I found no differences,
except asterisks at the end of n... |
8b82e4f70b479d32fe112facbcfdcf07441fee56 | src/index.js | src/index.js | const { send } = require('micro');
const Raven = require('raven');
module.exports = exports = url => fn => {
if (!url)
throw Error('micro-sentry must be initialized with a Sentry DSN.');
if (!fn || typeof fn !== 'function')
throw Error('micro-sentry must be passed a function.');
Raven.config(url).insta... | const { sendError } = require('micro');
const Raven = require('raven');
module.exports = exports = url => fn => {
if (!url)
throw Error('micro-sentry must be initialized with a Sentry DSN.');
if (!fn || typeof fn !== 'function')
throw Error('micro-sentry must be passed a function.');
Raven.config(url).... | Use sendError to send back error | Use sendError to send back error
| JavaScript | mit | tanmulabs/micro-sentry | javascript | ## Code Before:
const { send } = require('micro');
const Raven = require('raven');
module.exports = exports = url => fn => {
if (!url)
throw Error('micro-sentry must be initialized with a Sentry DSN.');
if (!fn || typeof fn !== 'function')
throw Error('micro-sentry must be passed a function.');
Raven.c... |
7a92c188a1417445028f03d2359166dad276b118 | README.md | README.md | Convert the clementine vulgate, http://vulsearch.sourceforge.net/, to an xml bible for use with bible-api.com.
The files in the latin directory are downloaded from: http://vulsearch.sourceforge.net/
## Copyright and licensing of Clementine Vulgate
The text has been released into the public domain. Those
who use it are... |
Convert the clementine vulgate, http://vulsearch.sourceforge.net/, to an xml bible for use with bible-api.com
following the example of https://github.com/seven1m/open-bibles/blob/master/util/cherokee.rb.
The files in the latin directory are downloaded from: http://vulsearch.sourceforge.net/.
## Copyright and licensin... | Add reference to cherokee bible converter. | Add reference to cherokee bible converter.
| Markdown | mit | jrichter/ClementineVulgateConverter | markdown | ## Code Before:
Convert the clementine vulgate, http://vulsearch.sourceforge.net/, to an xml bible for use with bible-api.com.
The files in the latin directory are downloaded from: http://vulsearch.sourceforge.net/
## Copyright and licensing of Clementine Vulgate
The text has been released into the public domain. Thos... |
b05d2666c834a9c4d151d0340612010851bd4610 | eniric/Qcalculator.py | eniric/Qcalculator.py |
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.0_R60k_res3.txt"):
"""
function that claculates the RV precision achievable on a spectrum
"""
data = pd.read_table(spectr... |
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.0_R60k_res3.txt"):
"""
function that claculates the RV precision achievable on a spectrum
"""
data = pd.read_table(spectr... | Update RVprec_calculation use numpy.diff() and remove unnecessary array calls. | Update RVprec_calculation
use numpy.diff() and remove unnecessary array calls.
Former-commit-id: 646ff0cea061feb87c08b819a47d8e9f3dd55b55 | Python | mit | jason-neal/eniric,jason-neal/eniric | python | ## Code Before:
# from eniric.IOmodule import read_2col
import numpy as np
import pandas as pd
c = 299792458 # m/s
def RVprec_calc(spectrum_file="resampled/Spectrum_M0-PHOENIX-ACES_Hband_vsini1.0_R60k_res3.txt"):
"""
function that claculates the RV precision achievable on a spectrum
"""
data = pd.r... |
835e787387b53cd272bd87f419a4a11c68e20f9d | core/app/controllers/topics_controller.rb | core/app/controllers/topics_controller.rb | class TopicsController < ApplicationController
def related_user_channels
authorize! :show, topic
@channels = top_channels_for_topic(topic)
render 'channels/index'
end
def top
render json: top_topics(12)
end
def top_channels
@channels = get_top_channels
render 'channels/index'
end
... | class TopicsController < ApplicationController
def related_user_channels
authorize! :show, topic
@channels = top_channels_for_topic(topic)
render 'channels/index'
end
def top
render json: top_topics(12)
end
def top_channels
@channels = get_top_channels
render 'channels/index'
end
... | Use slug_title in topics/facts query | Use slug_title in topics/facts query
| Ruby | mit | Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,Factlink/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core,daukantas/factlink-core | ruby | ## Code Before:
class TopicsController < ApplicationController
def related_user_channels
authorize! :show, topic
@channels = top_channels_for_topic(topic)
render 'channels/index'
end
def top
render json: top_topics(12)
end
def top_channels
@channels = get_top_channels
render 'channel... |
366bf1d05418263cea184bf437bc583d41f94149 | README.md | README.md | date-format
===========
node.js formatting of Date objects as strings. Probably exactly the same as some other library out there.
npm install date-format
usage
=====
var format = require('date-format');
format.asString(new Date()); //defaults to ISO8601 format
format.asString('hh:mm:... | date-format
===========
node.js formatting of Date objects as strings. Probably exactly the same as some other library out there.
```sh
npm install date-format
```
usage
=====
```js
var format = require('date-format');
format.asString(new Date()); //defaults to ISO8601 format
format.asString('hh:mm:ss.SSS', new Dat... | Use code fences for syntax highlighting | Use code fences for syntax highlighting | Markdown | mit | nomiddlename/date-format | markdown | ## Code Before:
date-format
===========
node.js formatting of Date objects as strings. Probably exactly the same as some other library out there.
npm install date-format
usage
=====
var format = require('date-format');
format.asString(new Date()); //defaults to ISO8601 format
format.... |
61aaa1f968c88862e5b8a89eca2b23e0a0d315b0 | client/imports/song/songs.component.ts | client/imports/song/songs.component.ts | import { Component, OnInit } from '@angular/core';
import { Songs } from '../../../imports/collections';
import template from "./songs.html";
@Component({
selector: 'songs',
template
})
export class SongsComponent implements OnInit {
songs;
ngOnInit(): void {
this.songs = Songs.find({});
}
}
| import { Component, OnInit } from '@angular/core';
import { Songs } from '../../../imports/collections';
import template from "./songs.html";
@Component({
selector: 'songs',
template
})
export class SongsComponent implements OnInit {
songs;
ngOnInit(): void {
this.songs = Songs.find({}, {
sort: {... | Sort songs in reverse creation order | Sort songs in reverse creation order
| TypeScript | agpl-3.0 | singularities/song-pot,singularities/song-pot,singularities/songs-pot,singularities/songs-pot,singularities/song-pot,singularities/songs-pot | typescript | ## Code Before:
import { Component, OnInit } from '@angular/core';
import { Songs } from '../../../imports/collections';
import template from "./songs.html";
@Component({
selector: 'songs',
template
})
export class SongsComponent implements OnInit {
songs;
ngOnInit(): void {
this.songs = Songs.find({})... |
07917060184c0dac0b820182364365d3864fbc50 | scripts/oel/kernel.sh | scripts/oel/kernel.sh |
function echoinfo() {
local BC="\033[1;34m"
local EC="\033[0m"
printf "${BC} ☆ INFO${EC}: %s\n" "$@";
}
function use_redhat_kernel() {
echoinfo "Configuring Grub to use RedHat-compatible kernel"
if grep -q -i "release 7" /etc/redhat-release ; then
sed -i 's/^GRUB_DEFAULT=saved/GRUB_DEFAULT=0/' /etc/def... |
function echoinfo() {
local BC="\033[1;34m"
local EC="\033[0m"
printf "${BC} ☆ INFO${EC}: %s\n" "$@";
}
function use_redhat_kernel() {
echoinfo "Disabling transparent hugepages"
sed -i 's/^GRUB_DEFAULT=saved/GRUB_DEFAULT=1/' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
}
function disable_tra... | Fix logic to select default boot option | Fix logic to select default boot option
| Shell | mit | jrbing/ps-packer,jrbing/ps-packer | shell | ## Code Before:
function echoinfo() {
local BC="\033[1;34m"
local EC="\033[0m"
printf "${BC} ☆ INFO${EC}: %s\n" "$@";
}
function use_redhat_kernel() {
echoinfo "Configuring Grub to use RedHat-compatible kernel"
if grep -q -i "release 7" /etc/redhat-release ; then
sed -i 's/^GRUB_DEFAULT=saved/GRUB_DEFA... |
eb7dff0095e03bd819bc3297ef05a45d79636d57 | stylesheets/blog.css | stylesheets/blog.css | .hero {
height: 200px;
}
.hero-text {
padding-top: 25px;
font-size: 1.25em;
}
.post {
font-size: 1.1em;
line-height: 1.25em;
}
.post-text {
padding: 25px 0;
font-size: 1.15em;
line-height: 1.3;
}
.post-text h3, h4 {
font-weight: 700;
}
.post-links {
width: 360px;
}
.post-links li {
display: block;... | .hero {
height: 200px;
}
.hero-text {
padding-top: 25px;
font-size: 1.25em;
}
.blog-title {
padding-top: 40px;
}
.post {
width: 1200px;
margin: 0 auto;
font-size: 1.1em;
line-height: 1.25em;
}
.post-text {
padding: 25px 0;
font-size: 1.15em;
line-height: 1.3;
}
.post-text h3, h4 {
font-weight: 7... | Remove Bootstrap mark-up and update css | Remove Bootstrap mark-up and update css
| CSS | mit | toddseller/toddseller.github.io,toddseller/toddseller.github.io,toddseller/toddseller.github.io | css | ## Code Before:
.hero {
height: 200px;
}
.hero-text {
padding-top: 25px;
font-size: 1.25em;
}
.post {
font-size: 1.1em;
line-height: 1.25em;
}
.post-text {
padding: 25px 0;
font-size: 1.15em;
line-height: 1.3;
}
.post-text h3, h4 {
font-weight: 700;
}
.post-links {
width: 360px;
}
.post-links li {
... |
65127eb36bd76c990e068ac8e18e189b44ef5d09 | aws_lab_setup/roles/common/tasks/main.yml | aws_lab_setup/roles/common/tasks/main.yml | - name: Include Red Hat tasks
include: "{{ ansible_os_family }}.yml"
static: no
when: ansible_distribution == 'RedHat'
- name: Include Ubuntu tasks
include: "{{ ansible_distribution }}.yml"
static: no
when: ansible_distribution == 'Ubuntu'
- name: Configure sshd and sudoers
lineinfile:
dest: "{{ ite... | - name: Include Red Hat tasks
include: "{{ ansible_os_family }}.yml"
static: no
when: ansible_os_family == 'RedHat'
- name: Include Ubuntu tasks
include: "{{ ansible_distribution }}.yml"
static: no
when: ansible_distribution == 'Ubuntu'
- name: Configure sshd and sudoers
lineinfile:
dest: "{{ item.d... | Use proper fact for conditional | Use proper fact for conditional
| YAML | mit | tima/lightbulb,thisdavejohnson/lightbulb,ansible/lightbulb,tima/lightbulb,tima/lightbulb,thisdavejohnson/lightbulb,ansible/lightbulb,ansible/lightbulb,ansible/lightbulb | yaml | ## Code Before:
- name: Include Red Hat tasks
include: "{{ ansible_os_family }}.yml"
static: no
when: ansible_distribution == 'RedHat'
- name: Include Ubuntu tasks
include: "{{ ansible_distribution }}.yml"
static: no
when: ansible_distribution == 'Ubuntu'
- name: Configure sshd and sudoers
lineinfile:
... |
16faaa2413cbb9c88008b3d25e61f5c8bc1bfb6b | config/application.rb | config/application.rb | require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require(*Rails.groups)
Dotenv::Railtie.load
module Horizon
class Application < Rails::Application
# middlewarezez
unless ENV["DISABLE_RATE_LIMIT"] == "true"
config.middleware.use Rack::Attack
end
config.middleware.in... | require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require(*Rails.groups)
Dotenv::Railtie.load
module Horizon
class Application < Rails::Application
require "#{config.root}/lib/request_metrics"
config.middleware.insert_before ActionDispatch::ShowExceptions,
RequestMetrics, M... | Remove middlewares that are not needed since go-horizon provides them | Remove middlewares that are not needed since go-horizon provides them
| Ruby | apache-2.0 | FredericHeem/horizon,stellar/horizon-importer,masonforest/horizon-importer,malandrina/horizon,matschaffer/horizon | ruby | ## Code Before:
require File.expand_path('../boot', __FILE__)
require 'rails/all'
Bundler.require(*Rails.groups)
Dotenv::Railtie.load
module Horizon
class Application < Rails::Application
# middlewarezez
unless ENV["DISABLE_RATE_LIMIT"] == "true"
config.middleware.use Rack::Attack
end
conf... |
7ac50659de3dc446438eae27c26eac66d0e048ce | spec/suite_to_rdf_spec.rb | spec/suite_to_rdf_spec.rb | require_relative 'spec_helper'
describe JSON::LD do
describe "test suite" do
require_relative 'suite_helper'
m = Fixtures::SuiteTest::Manifest.open("#{Fixtures::SuiteTest::SUITE}toRdf-manifest.jsonld")
describe m.name do
m.entries.each do |t|
specify "#{t.property('@id')}: #{t.name}#{' (neg... | require_relative 'spec_helper'
describe JSON::LD do
describe "test suite" do
require_relative 'suite_helper'
m = Fixtures::SuiteTest::Manifest.open("#{Fixtures::SuiteTest::SUITE}toRdf-manifest.jsonld")
describe m.name do
m.entries.each do |t|
specify "#{t.property('@id')}: #{t.name}#{' (neg... | Mark toRdf 0130 pending until RDF.rb addresses odd IRI joining issue. | Mark toRdf 0130 pending until RDF.rb addresses odd IRI joining issue.
| Ruby | unlicense | ruby-rdf/json-ld,gkellogg/json-ld,ruby-rdf/json-ld | ruby | ## Code Before:
require_relative 'spec_helper'
describe JSON::LD do
describe "test suite" do
require_relative 'suite_helper'
m = Fixtures::SuiteTest::Manifest.open("#{Fixtures::SuiteTest::SUITE}toRdf-manifest.jsonld")
describe m.name do
m.entries.each do |t|
specify "#{t.property('@id')}: #... |
4b75c6fc43980e189031846a02bc4d4eddd581ef | build_initramfs.sh | build_initramfs.sh | set -x
KVER=$(cd /usr/src/linux; make kernelrelease)
# Dracut is needed on the host
EMERGE_FLAGS="--buildpkg --getbinpkg --update --jobs --deep --newuse"
emerge $EMERGE_FLAGS --usepkg --oneshot \
sys-kernel/dracut
dracut -f /root/initramfs $KVER -i /root/systemd.squashfs /root.squashfs
chmod a+r /root/initramfs
... | set -x
KVER=$(cd /usr/src/linux; make kernelrelease)
# Dracut is needed on the host
EMERGE_FLAGS="--buildpkg --getbinpkg --update --jobs --deep --newuse"
eix -qI sys-kernel/dracut || emerge $EMERGE_FLAGS --usepkg --oneshot \
sys-kernel/dracut
dracut -f /root/initramfs $KVER -i /root/systemd.squashfs /root.squashf... | Install dracut on the host if necessary | Install dracut on the host if necessary
| Shell | mit | bencord0/genboot,bencord0/genboot | shell | ## Code Before:
set -x
KVER=$(cd /usr/src/linux; make kernelrelease)
# Dracut is needed on the host
EMERGE_FLAGS="--buildpkg --getbinpkg --update --jobs --deep --newuse"
emerge $EMERGE_FLAGS --usepkg --oneshot \
sys-kernel/dracut
dracut -f /root/initramfs $KVER -i /root/systemd.squashfs /root.squashfs
chmod a+r ... |
76da8b8089df8c70c584f1e3dfc4aa643754ab53 | app/controllers/admin/quotas_controller.rb | app/controllers/admin/quotas_controller.rb | class Admin::QuotasController < Admin::SimpleCrudController
def index
@years = Quota.years_array
index!
end
def duplication
@years = Quota.years_array
@count = Quota.where('EXTRACT(year from start_date) = ?', @years.first).
count
@geo_entities = GeoEntity.joins(:quotas).order(:name_en)... | class Admin::QuotasController < Admin::SimpleCrudController
def index
@years = Quota.years_array
if params[:year] && !@years.include?(params[:year])
@years = @years.push(params[:year]).sort{|a,b| b <=> a}
end
index!
end
def duplication
@years = Quota.years_array
@count = Quota.wher... | Include year that is passed from params. (When quotas are duplicated for a new year, that year will not be in the array of years, until they have been copied. This way the interface shows it nevertheless, otherwise users might think it didn't work) | Include year that is passed from params. (When quotas are duplicated for a new year, that year will not be in the array of years, until they have been copied. This way the interface shows it nevertheless, otherwise users might think it didn't work)
| Ruby | bsd-3-clause | unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI,unepwcmc/SAPI | ruby | ## Code Before:
class Admin::QuotasController < Admin::SimpleCrudController
def index
@years = Quota.years_array
index!
end
def duplication
@years = Quota.years_array
@count = Quota.where('EXTRACT(year from start_date) = ?', @years.first).
count
@geo_entities = GeoEntity.joins(:quotas)... |
fd2bd48ca9da96e894031f7979798672e1cebdea | tests/test_util.py | tests/test_util.py | from project_generator.util import *
def test_unicode_detection():
try:
print(u'\U0001F648')
except UnicodeEncodeError:
assert not unicode_available()
else:
assert unicode_available()
def test_flatten():
l1 = [['aa', 'bb', ['cc', 'dd', 'ee'], ['ee', 'ff'], 'gg']]
assert li... | from project_generator.util import *
def test_flatten():
l1 = [['aa', 'bb', ['cc', 'dd', 'ee'], ['ee', 'ff'], 'gg']]
assert list(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ee', 'ff', 'gg']
assert uniqify(flatten(l1)) == ['aa', 'bb', 'cc', 'dd', 'ee', 'ff', 'gg']
def test_uniqify():
l1 = ['a', 'b... | Test util - unicode removal | Test util - unicode removal
| Python | apache-2.0 | ohagendorf/project_generator,project-generator/project_generator,sarahmarshy/project_generator,0xc0170/project_generator | python | ## Code Before:
from project_generator.util import *
def test_unicode_detection():
try:
print(u'\U0001F648')
except UnicodeEncodeError:
assert not unicode_available()
else:
assert unicode_available()
def test_flatten():
l1 = [['aa', 'bb', ['cc', 'dd', 'ee'], ['ee', 'ff'], 'gg']... |
4584a52b921839924396af1022ed4f447cf68485 | MAGPIE/sample-debs/src/main/java/ch/hevs/aislab/magpie/debs/retrofit/UserSvcApi.java | MAGPIE/sample-debs/src/main/java/ch/hevs/aislab/magpie/debs/retrofit/UserSvcApi.java | package ch.hevs.aislab.magpie.debs.retrofit;
import ch.hevs.aislab.magpie.debs.model.MobileClient;
import retrofit.http.Body;
import retrofit.http.POST;
public interface UserSvcApi {
String CLIENT_ID = "mobile";
String SERVICE_URL = "https://10.0.2.2:8443";
String TOKEN_PATH = "/oauth/token";
Stri... | package ch.hevs.aislab.magpie.debs.retrofit;
import java.util.Collection;
import ch.hevs.aislab.magpie.debs.model.MobileClient;
import retrofit.http.Body;
import retrofit.http.GET;
import retrofit.http.POST;
import retrofit.http.Path;
public interface UserSvcApi {
String CLIENT_ID = "mobile";
String SERVI... | Add methods to get contacts by their subscription status | Add methods to get contacts by their subscription status
| Java | bsd-3-clause | aislab-hevs/magpie | java | ## Code Before:
package ch.hevs.aislab.magpie.debs.retrofit;
import ch.hevs.aislab.magpie.debs.model.MobileClient;
import retrofit.http.Body;
import retrofit.http.POST;
public interface UserSvcApi {
String CLIENT_ID = "mobile";
String SERVICE_URL = "https://10.0.2.2:8443";
String TOKEN_PATH = "/oauth/t... |
086826b6a872c69087906053ed265148620d456c | lib/tasks/worker_tasks.rake | lib/tasks/worker_tasks.rake | task :enqueue_feed_eater_worker, [:feed_onestop_ids, :import_level] => [:environment] do |t, args|
begin
if args.feed_onestop_ids.present?
array_of_feed_onestop_ids = args.feed_onestop_ids.split(' ')
else
array_of_feed_onestop_ids = []
end
feed_eater_worker = FeedEaterWorker.perform_async(... | task :enqueue_feed_eater_worker, [:feed_onestop_ids, :import_level] => [:environment] do |t, args|
begin
if args.feed_onestop_ids.present?
array_of_feed_onestop_ids = args.feed_onestop_ids.split(' ')
else
array_of_feed_onestop_ids = []
end
# Defalut import level
import_level = (args.im... | Check import_level in rake task | Check import_level in rake task
| Ruby | mit | transitland/transitland-datastore,brechtvdv/transitland-datastore,transitland/transitland-datastore,brechtvdv/transitland-datastore,transitland/transitland-datastore,brechtvdv/transitland-datastore | ruby | ## Code Before:
task :enqueue_feed_eater_worker, [:feed_onestop_ids, :import_level] => [:environment] do |t, args|
begin
if args.feed_onestop_ids.present?
array_of_feed_onestop_ids = args.feed_onestop_ids.split(' ')
else
array_of_feed_onestop_ids = []
end
feed_eater_worker = FeedEaterWorke... |
b69f2d7e53f341aaf24afa05a09c326b8a149a51 | PreludeTests/ApplicationTests.swift | PreludeTests/ApplicationTests.swift | // Copyright (c) 2014 Rob Rix. All rights reserved.
import Prelude
import XCTest
final class ApplicationTests: XCTestCase {
// MARK: Forward function application
func testForwardUnaryFunctionApplication() {
let digits = 100 |> toString |> countElements
XCTAssertEqual(digits, 3)
}
func testForwardBinaryFunc... | // Copyright (c) 2014 Rob Rix. All rights reserved.
import Prelude
import XCTest
final class ApplicationTests: XCTestCase {
// MARK: Forward function application
func testForwardUnaryFunctionApplication() {
let digits = 100 |> toString |> countElements
XCTAssertEqual(digits, 3)
}
func testForwardBinaryFunc... | Test that the precedence is higher than assignment. | Test that the precedence is higher than assignment.
| Swift | mit | robrix/Prelude,robrix/Prelude,335g/Prelude,335g/Prelude,robrix/Prelude,335g/Prelude | swift | ## Code Before:
// Copyright (c) 2014 Rob Rix. All rights reserved.
import Prelude
import XCTest
final class ApplicationTests: XCTestCase {
// MARK: Forward function application
func testForwardUnaryFunctionApplication() {
let digits = 100 |> toString |> countElements
XCTAssertEqual(digits, 3)
}
func testF... |
fd4a841e19dda4c76d0663ac81ebe52ce88573ee | src/main/resources/assets/soulshardstow/models/item/modifiers/soulStealer.json | src/main/resources/assets/soulshardstow/models/item/modifiers/soulStealer.json | {
"textures": {
"battleaxe": "soulshardstow:items/modifiers/soulStealer_battleaxe",
"battlesign": "soulshardstow:items/modifiers/soulStealer_battlesign",
"broadsword": "soulshardstow:items/modifiers/soulStealer_broadsword",
"rapier": "soulshardstow:items/modifiers/soulStealer_rapier",
"cleaver": "... | {
"textures": {
"battleaxe": "soulshardstow:items/modifiers/soulStealer_battleaxe",
"broadsword": "soulshardstow:items/modifiers/soulStealer_broadsword",
"rapier": "soulshardstow:items/modifiers/soulStealer_rapier",
"cleaver": "soulshardstow:items/modifiers/soulStealer_cleaver",
"frypan": "soulsha... | Remove unneeded modifier texture references | Remove unneeded modifier texture references
| JSON | mit | TehNut/Soul-Shards-The-Old-Ways | json | ## Code Before:
{
"textures": {
"battleaxe": "soulshardstow:items/modifiers/soulStealer_battleaxe",
"battlesign": "soulshardstow:items/modifiers/soulStealer_battlesign",
"broadsword": "soulshardstow:items/modifiers/soulStealer_broadsword",
"rapier": "soulshardstow:items/modifiers/soulStealer_rapier",
... |
7972c0fbaf8b46810dd36e0d824c341ea4234b47 | swampdragon_live/models.py | swampdragon_live/models.py | from django.db.models.signals import post_save, pre_delete
from django.contrib.contenttypes.models import ContentType
from django.dispatch import receiver
from .pushers import push_new_content_for_instance
from .pushers import push_new_content_for_queryset
@receiver(post_save)
def post_save_handler(sender, instance, ... | from django.db.models.signals import post_save, pre_delete
from django.contrib.contenttypes.models import ContentType
from django.dispatch import receiver
from .pushers import push_new_content_for_instance
from .pushers import push_new_content_for_queryset
@receiver(post_save)
def post_save_handler(sender, instance, ... | Optimize number of updates for queryset and instance listeners | Optimize number of updates for queryset and instance listeners
Only push additions to queryset listeners, not instance changes.
Only push changes to instance listeners, not queryset additions.
| Python | mit | mback2k/swampdragon-live,mback2k/swampdragon-live | python | ## Code Before:
from django.db.models.signals import post_save, pre_delete
from django.contrib.contenttypes.models import ContentType
from django.dispatch import receiver
from .pushers import push_new_content_for_instance
from .pushers import push_new_content_for_queryset
@receiver(post_save)
def post_save_handler(se... |
8ea3fe598997e04b102d50bc31c6c579b5591679 | src/js/main.js | src/js/main.js | require('../css/style.css');
(function(window, document, requirejs, define){
'use strict';
// config
try {
var config = JSON.parse(
document.getElementById('data-config').getAttribute('data-config')
);
var versions = config.versions;
} catch (error) {
// con... | require('../css/style.css');
(function(window, document, requirejs, define){
'use strict';
// config
try {
var config = JSON.parse(
document.getElementById('data-config').getAttribute('data-config')
);
var versions = config.versions;
} catch (error) {
// con... | Refactor `react-engine` client-side mounting to use Require.js | Refactor `react-engine` client-side mounting to use Require.js
Replace event listener `DOMContentLoaded` with `requirejs` now
that the scripts will run after they are loaded.
Make sure to load `react` and `react-dom` before `react-router`.
Also, attach the modules to `window` for it to work in production.
| JavaScript | mit | remarkablemark/react-engine-template,remarkablemark/react-engine-template | javascript | ## Code Before:
require('../css/style.css');
(function(window, document, requirejs, define){
'use strict';
// config
try {
var config = JSON.parse(
document.getElementById('data-config').getAttribute('data-config')
);
var versions = config.versions;
} catch (error) ... |
57666b8b8028065531f814444d4cdeaeb36a86cb | Resources/Private/Sass/Generic/_T3General.scss | Resources/Private/Sass/Generic/_T3General.scss | /*
TYPO3
Styling for typo3 related classes
*/
/*
CSC-Frames
*/
.csc-frame-rulerBefore:before {
content: '';
@extend %horizontal-ruler;
}
.csc-frame-rulerAfter:after {
content: '';
@extend %horizontal-ruler;
}
.csc-frame-indent { padding: 0 10%; }
.csc-frame-indent3366 { padding-left: 33.333%; }
.csc-frame-in... | /*
TYPO3
Styling for typo3 related classes
*/
/*
CSC-Frames
*/
.csc-frame-rulerBefore:before {
content: '';
@extend %hr;
}
.csc-frame-rulerAfter:after {
content: '';
@extend %hr;
}
.csc-frame-indent { padding: 0 10%; }
.csc-frame-indent3366 { padding-left: 33.333%; }
.csc-frame-indent6633 { padding-right: 33... | Fix the %hr @extend on the csc-frame-ruler* rules | [BUGFIX] Fix the %hr @extend on the csc-frame-ruler* rules
| SCSS | mit | t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template,t3b/t3b_template | scss | ## Code Before:
/*
TYPO3
Styling for typo3 related classes
*/
/*
CSC-Frames
*/
.csc-frame-rulerBefore:before {
content: '';
@extend %horizontal-ruler;
}
.csc-frame-rulerAfter:after {
content: '';
@extend %horizontal-ruler;
}
.csc-frame-indent { padding: 0 10%; }
.csc-frame-indent3366 { padding-left: 33.333%;... |
ffd64c8d9cec48ad6247d02b204a90702288813e | lazy-susan.asd | lazy-susan.asd | ;;;; lazy-susan.asd
(asdf:defsystem #:lazy-susan
:serial t
:description "A readtable which provides more flexible symbol reading"
:author "Matt Niemeir <matt.niemeir@gmail.com>"
:license "BSD 2-clause"
:depends-on (#:mcn-utils)
:components ((:file "package")
(:file "utils")
(:... | ;;;; lazy-susan.asd
(asdf:defsystem #:lazy-susan
:serial t
:description "A readtable which provides more flexible symbol reading"
:author "Matt Niemeir <matt.niemeir@gmail.com>"
:license "BSD 2-clause"
:components ((:file "package")
(:file "utils")
(:file "syntax")
... | Remove stray MCN-UTILS dependency (sorry!) | Remove stray MCN-UTILS dependency (sorry!)
| Common Lisp | bsd-2-clause | m-n/lazy-susan | common-lisp | ## Code Before:
;;;; lazy-susan.asd
(asdf:defsystem #:lazy-susan
:serial t
:description "A readtable which provides more flexible symbol reading"
:author "Matt Niemeir <matt.niemeir@gmail.com>"
:license "BSD 2-clause"
:depends-on (#:mcn-utils)
:components ((:file "package")
(:file "utils")
... |
19ecce788850594f291b824ff5c5731d0ed12d20 | lib/deploy/repository.rb | lib/deploy/repository.rb | require 'fileutils'
require 'open3'
class Repository
def index_modified?
! system('git diff-index --cached --quiet HEAD --ignore-submodules --')
end
def prepare!(tag)
fail "No tag given" unless tag
@tag = tag
sync! unless tag_exists?
end
private
def tag_exists?
Open3.popen3("git rev-... | require 'fileutils'
require 'open3'
class Repository
def index_modified?
! system('git diff-index --cached --quiet HEAD --ignore-submodules --')
end
def prepare!(tag)
fail "No tag given" unless tag
@tag = tag
sync! unless tag_exists?
end
private
def tag_exists?
Open3.popen3("git rev-... | Use the result of the command, not its success status | Use the result of the command, not its success status
| Ruby | mit | sealink/deploy,sealink/deploy_aws,sealink/deploy,sealink/deploy_aws | ruby | ## Code Before:
require 'fileutils'
require 'open3'
class Repository
def index_modified?
! system('git diff-index --cached --quiet HEAD --ignore-submodules --')
end
def prepare!(tag)
fail "No tag given" unless tag
@tag = tag
sync! unless tag_exists?
end
private
def tag_exists?
Open3.... |
6032fb8eb10a2f6be28142c7473e03b4bc349c7c | partitions/registry.py | partitions/registry.py | from django.conf import settings
class Registry(object):
def __init__(self):
self._partitions = {}
def register(self, key, app_model, expression):
if not isinstance(app_model, basestring):
app_model = "%s.%s" % (
app_model._meta.app_label,
... | from django.conf import settings
class Registry(object):
def __init__(self):
self._partitions = {}
def register(self, key, app_model, expression):
if not isinstance(app_model, basestring):
app_model = "%s.%s" % (
app_model._meta.app_label,
... | Use update instead of setting key directly | Use update instead of setting key directly
| Python | bsd-3-clause | eldarion/django-partitions | python | ## Code Before:
from django.conf import settings
class Registry(object):
def __init__(self):
self._partitions = {}
def register(self, key, app_model, expression):
if not isinstance(app_model, basestring):
app_model = "%s.%s" % (
app_model._meta.app_label,
... |
722f37d99c74bc8592fc51a07bb6e4e2168b0da4 | README.md | README.md | A portfolio for design work and programming stuff.
https://carolkng.github.io
| A portfolio for design work and programming stuff.
https://carolkng.github.io
http://carolkng.me
| Add new domain to list of access points | Add new domain to list of access points | Markdown | mit | carolkng/carolkng.github.io,carolkng/carolkng.github.io | markdown | ## Code Before:
A portfolio for design work and programming stuff.
https://carolkng.github.io
## Instruction:
Add new domain to list of access points
## Code After:
A portfolio for design work and programming stuff.
https://carolkng.github.io
http://carolkng.me
|
df173cceb43ed1e54055f559364c0a9fc991aadc | build/m4/banshee/gdata.m4 | build/m4/banshee/gdata.m4 | AC_DEFUN([BANSHEE_CHECK_GDATA],
[
GDATASHARP_REQUIRED_VERSION=1.4
AC_SUBST(GDATASHARP_REQUIRED_VERSION)
AC_ARG_ENABLE(gdata, AC_HELP_STRING([--enable-gdata], [Enable experimental Youtube extension - unfinished, likely broken]), , enable_gdata="no")
if test "x$enable_gdata" = "xyes"; then
PKG_CHECK_MODULES(GDATA... | AC_DEFUN([BANSHEE_CHECK_GDATA],
[
GDATASHARP_REQUIRED_VERSION=1.4
AC_SUBST(GDATASHARP_REQUIRED_VERSION)
AC_ARG_ENABLE(gdata, AC_HELP_STRING([--disable-gdata], [Disable Youtube extension]), , enable_gdata="yes")
if test "x$enable_gdata" = "xyes"; then
PKG_CHECK_MODULES(GDATASHARP,
gdata-sharp-core >= $GDATASH... | Build YouTube extension by default | [build] Build YouTube extension by default
| M4 | mit | dufoli/banshee,petejohanson/banshee,petejohanson/banshee,ixfalia/banshee,arfbtwn/banshee,Carbenium/banshee,Dynalon/banshee-osx,stsundermann/banshee,babycaseny/banshee,lamalex/Banshee,GNOME/banshee,GNOME/banshee,ixfalia/banshee,GNOME/banshee,ixfalia/banshee,GNOME/banshee,babycaseny/banshee,arfbtwn/banshee,directhex/bans... | m4 | ## Code Before:
AC_DEFUN([BANSHEE_CHECK_GDATA],
[
GDATASHARP_REQUIRED_VERSION=1.4
AC_SUBST(GDATASHARP_REQUIRED_VERSION)
AC_ARG_ENABLE(gdata, AC_HELP_STRING([--enable-gdata], [Enable experimental Youtube extension - unfinished, likely broken]), , enable_gdata="no")
if test "x$enable_gdata" = "xyes"; then
PKG_CHE... |
5087e006d6641b4481638a2c390f58c7cfac7efc | package.json | package.json | {
"name": "minimap-selection",
"main": "./lib/minimap-selection",
"version": "4.0.0",
"description": "Display the buffer's selections on the minimap",
"repository": "https://github.com/abe33/atom-minimap-selection",
"license": "MIT",
"engines": {
"atom": ">0.50.0"
},
"dependencies": {
"emissar... | {
"name": "minimap-selection",
"main": "./lib/minimap-selection",
"version": "4.0.0",
"description": "Display the buffer's selections on the minimap",
"repository": "https://github.com/abe33/atom-minimap-selection",
"license": "MIT",
"engines": {
"atom": ">0.50.0"
},
"dependencies": {
"emissar... | Update event-kit to version 1.x | :arrow_up: Update event-kit to version 1.x
| JSON | mit | atom-minimap/minimap-selection | json | ## Code Before:
{
"name": "minimap-selection",
"main": "./lib/minimap-selection",
"version": "4.0.0",
"description": "Display the buffer's selections on the minimap",
"repository": "https://github.com/abe33/atom-minimap-selection",
"license": "MIT",
"engines": {
"atom": ">0.50.0"
},
"dependencies"... |
34dde97513714adaab2cb3041c28c6dd959d2815 | www/index.html | www/index.html | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<style>
</style>
</head>
<body>
<h2>PhoneGap Day app perf examples</h2>
<h3>Slow</h2>
<a href="slow/1-scrol... | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<style>
a {
display: block;
padding: .8em;
border: 1px solid black;
margin: .2em;
}
... | Enable autoreload when app is viewed via the PG Dev app | Enable autoreload when app is viewed via the PG Dev app
| HTML | mit | blefebvre/pg-app-perf,blefebvre/pg-app-perf | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<style>
</style>
</head>
<body>
<h2>PhoneGap Day app perf examples</h2>
<h3>Slow</h2>
<a hr... |
58161590db5b0fe73dfb430dcfab6bcb7b79017a | app/webroot/js/maps.js | app/webroot/js/maps.js | tosMap.controller('MapsController', [
"$scope", "Location",
function ($scope, Location) {
Location.query().$promise.then(function (response) {
$scope.locations = response;
});
}
]);
| tosMap.controller('MapsController', [
"$scope", "Location",
function ($scope, Location) {
Location.query().$promise.then(function (response) {
$scope.locations = response;
});
// Create the drag and move behavior
$(document).ready(function(){
var wndow, scrolling = false;
$(window).on('mousedown', ... | Create the drag and drop behavior | Create the drag and drop behavior
| JavaScript | mit | Block-code/TreeOfSaviorInteractiveMap,Block-code/TreeOfSaviorInteractiveMap,Block-code/TreeOfSaviorInteractiveMap | javascript | ## Code Before:
tosMap.controller('MapsController', [
"$scope", "Location",
function ($scope, Location) {
Location.query().$promise.then(function (response) {
$scope.locations = response;
});
}
]);
## Instruction:
Create the drag and drop behavior
## Code After:
tosMap.controller('MapsController', [
"$scop... |
ad9b6a913a584de8d06ee05c3b30f46b7102f539 | _config.yml | _config.yml | title: Clean Blog
header-img: img/home-bg.jpg
email: your-email@yourdomain.com
copyright_name: Your/Project/Corporate Name
description: "Write your site description here. It will be used as your sites meta description as well!"
baseurl: ""
url: "http://yourdomain.com"
twitter_username: SBootstrap
github_username: davi... | title: Clean Blog
header-img: img/home-bg.jpg
email: your-email@yourdomain.com
copyright_name: Your/Project/Corporate Name
description: "Write your site description here. It will be used as your sites meta description as well!"
baseurl:
url: "http://yourdomain.com"
twitter_username: SBootstrap
github_username: davidtm... | Add default config for posts | Add default config for posts
| YAML | mit | ihonecomcn/ihonecomcn.github.io,ihonecomcn/ihonecomcn.github.io,ihonecomcn/ihonecomcn.github.io | yaml | ## Code Before:
title: Clean Blog
header-img: img/home-bg.jpg
email: your-email@yourdomain.com
copyright_name: Your/Project/Corporate Name
description: "Write your site description here. It will be used as your sites meta description as well!"
baseurl: ""
url: "http://yourdomain.com"
twitter_username: SBootstrap
github... |
29810184a9289a815efad7ac63aedab7691d8595 | README.md | README.md |
The idea is to create an ecosystem of static sites that are fractally
self-referential to improve SEO results, and stake claim on the unique
linguistic corpus of the TSS brand.
By having each static site use <code><meta></code> tags, that refer to the
corpus and other sites in the ecosystem, and having those names li... |
The idea is to create an ecosystem of static sites that are fractally
self-referential to improve SEO results, and stake claim on the unique
linguistic corpus of the TSS brand.
By having each static site use <code><meta></code> tags, that refer to the
corpus and other sites in the ecosystem, and having those names li... | Add explainer for virtualenv installation | Add explainer for virtualenv installation
| Markdown | agpl-3.0 | trinitysoulstars/astralturf,trinitysoulstars/astralturf | markdown | ## Code Before:
The idea is to create an ecosystem of static sites that are fractally
self-referential to improve SEO results, and stake claim on the unique
linguistic corpus of the TSS brand.
By having each static site use <code><meta></code> tags, that refer to the
corpus and other sites in the ecosystem, and havin... |
53b519c4912d7b3cc32f000eea73bc4d9693967e | tests/test_basic.py | tests/test_basic.py | import pytest
import subprocess
import os
import sys
prefix = '.'
for i in range(0,3):
if os.path.exists(os.path.join(prefix, 'pyiso.py')):
sys.path.insert(0, prefix)
break
else:
prefix = '../' + prefix
import pyiso
def test_nofiles(tmpdir):
# First set things up, and generate the... | import pytest
import subprocess
import os
import sys
prefix = '.'
for i in range(0,3):
if os.path.exists(os.path.join(prefix, 'pyiso.py')):
sys.path.insert(0, prefix)
break
else:
prefix = '../' + prefix
import pyiso
def test_nofiles(tmpdir):
# First set things up, and generate the... | Add in more unit tests. | Add in more unit tests.
Signed-off-by: Chris Lalancette <281cd07d7578d97c83271fbbf2faddb83ab3791c@gmail.com>
| Python | lgpl-2.1 | clalancette/pycdlib,clalancette/pyiso | python | ## Code Before:
import pytest
import subprocess
import os
import sys
prefix = '.'
for i in range(0,3):
if os.path.exists(os.path.join(prefix, 'pyiso.py')):
sys.path.insert(0, prefix)
break
else:
prefix = '../' + prefix
import pyiso
def test_nofiles(tmpdir):
# First set things up, ... |
e41d9d04f2c75ef8d4a2b8f1af757fd7353f887b | js/kablammo.js | js/kablammo.js | "use strict";
function Kablammo() {
// When hit is to complement of nucleotide sequence (whether for query or
// subject), we will show the HSPs relative to the coordinates of the
// original (i.e., input or DB) sequence if this value is false, or relative
// to the coordinates of its complement if this value ... | "use strict";
function Kablammo() {
// When hit is to complement of nucleotide sequence (whether for query or
// subject), we will show the HSPs relative to the coordinates of the
// original (i.e., input or DB) sequence if this value is false, or relative
// to the coordinates of its complement if this value ... | Remove mistakenly added testing line. | Remove mistakenly added testing line.
| JavaScript | mit | jwintersinger/kablammo,jwintersinger/kablammo,jwintersinger/kablammo,jwintersinger/kablammo | javascript | ## Code Before:
"use strict";
function Kablammo() {
// When hit is to complement of nucleotide sequence (whether for query or
// subject), we will show the HSPs relative to the coordinates of the
// original (i.e., input or DB) sequence if this value is false, or relative
// to the coordinates of its complemen... |
8a32ba4ff39044ecb1a75734c8e27476f1437dc7 | README.md | README.md | [](https://travis-ci.org/mvpotter/currency-fair)
# CurrencyFair Engineering Test
### Information for reviewer
- Consumer endpoint has basic authentication: user = currency, password = fair
- Rate limiting is implemented: by default the l... | [](https://travis-ci.org/mvpotter/currency-fair)
# CurrencyFair Engineering Test
[Task description](https://github.com/mvpotter/currency-fair/blob/master/Task.md)
### Information for reviewer
- Consumer endpoint has basic authentication... | Add link to task description | Add link to task description | Markdown | mit | mvpotter/currency-fair,mvpotter/currency-fair,mvpotter/currency-fair | markdown | ## Code Before:
[](https://travis-ci.org/mvpotter/currency-fair)
# CurrencyFair Engineering Test
### Information for reviewer
- Consumer endpoint has basic authentication: user = currency, password = fair
- Rate limiting is implemented: ... |
02736fbd594533bcb6a97f5bb4528adfaaa87ec1 | app/assets/stylesheets/components/page_specific/_trust_banner.scss | app/assets/stylesheets/components/page_specific/_trust_banner.scss | // Trust banner displayed on the home page
//
// Styleguide Trust banner
.trust-banner {
position: relative;
height: 280px;
background: image_url('illustrated_people.png') 94% 100% no-repeat;
@include respond-to(31.875em) {
height: auto;
}
}
.trust-banner__heading {
@include body(30, 36);
color: $t... | // Trust banner displayed on the home page
//
// Styleguide Trust banner
.trust-banner {
position: relative;
height: 240px;
background: image_url('illustrated_people.png') 100% 100% no-repeat;
background-size: 100%;
@include respond-to($mq-s) {
background-size: 40%;
height: auto;
}
}
.trust-banne... | Refactor the style for the trust banner | Refactor the style for the trust banner | SCSS | mit | moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend,moneyadviceservice/frontend | scss | ## Code Before:
// Trust banner displayed on the home page
//
// Styleguide Trust banner
.trust-banner {
position: relative;
height: 280px;
background: image_url('illustrated_people.png') 94% 100% no-repeat;
@include respond-to(31.875em) {
height: auto;
}
}
.trust-banner__heading {
@include body(30, ... |
e61942b8caddca14807281072d038e60dc4a1aa0 | VectorElementRemoval/VectorElementRemoval.cpp | VectorElementRemoval/VectorElementRemoval.cpp |
int main()
{
std::vector<int> myValues;
for ( long int i=0L; i<100000000L; ++i )
myValues.push_back(i%3);
int iOriginalSize = myValues.size();
#ifdef REMOVE_VALUES
myValues.erase(std::remove_if(myValues.begin(),myValues.end(),[](int i) { return i == 2; }),myValues.end());
#endif
int sum = 0;
for ( unsigned... |
int main()
{
std::vector<int> myValues;
for ( long int i=0L; i<10000000L; ++i )
myValues.push_back(i%3);
int iOriginalSize = myValues.size();
#ifdef REMOVE_VALUES
myValues.erase(std::remove_if(myValues.begin(),myValues.end(),[](int i) { return i == 2; }),myValues.end());
#endif
const int iterations = 100;
fo... | Check vs Remove - not so not so clear | Check vs Remove - not so not so clear
| C++ | mit | hanw/cppsandbox,hanw/cppsandbox,hanw/cppsandbox,jbcoe/CppSandbox,jbcoe/CppSandbox,jbcoe/CppSandbox | c++ | ## Code Before:
int main()
{
std::vector<int> myValues;
for ( long int i=0L; i<100000000L; ++i )
myValues.push_back(i%3);
int iOriginalSize = myValues.size();
#ifdef REMOVE_VALUES
myValues.erase(std::remove_if(myValues.begin(),myValues.end(),[](int i) { return i == 2; }),myValues.end());
#endif
int sum = 0;
... |
5748ff269e4805f4cabe8bd7d9744e4ad57f5cc8 | bin/webserver.js | bin/webserver.js |
'use strict'
const server = new (require('..').Server)()
server.run()
|
'use strict'
const server = new (require('..').Server)()
server.run({logging: true})
| Modify to server log output setting | Modify to server log output setting
| JavaScript | mit | abetomo/Simply-imitated-SQS-for-testing | javascript | ## Code Before:
'use strict'
const server = new (require('..').Server)()
server.run()
## Instruction:
Modify to server log output setting
## Code After:
'use strict'
const server = new (require('..').Server)()
server.run({logging: true})
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.