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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c13dbcd08a5be772b8e8e74115cf6196e76534ee | Casks/duplicate-annihilator.rb | Casks/duplicate-annihilator.rb | class DuplicateAnnihilator < Cask
url 'http://brattoo.com/propaganda/downloadDa.php'
homepage 'http://brattoo.com/propaganda/'
version '4.16.0'
sha1 '80af306c21f1f6c16d08fe6a672af3d20a43591d'
nested_container 'Duplicate Annihilator.dmg'
link 'Duplicate Annihilator.app'
end
| class DuplicateAnnihilator < Cask
url 'http://brattoo.com/propaganda/downloadDa.php'
homepage 'http://brattoo.com/propaganda/'
version 'latest'
no_checksum
nested_container 'Duplicate Annihilator.dmg'
link 'Duplicate Annihilator.app'
end
| Switch to latest version, no_checksum | Switch to latest version, no_checksum
| Ruby | bsd-2-clause | codeurge/homebrew-cask,jellyfishcoder/homebrew-cask,tmoreira2020/homebrew,sachin21/homebrew-cask,helloIAmPau/homebrew-cask,ponychicken/homebrew-customcask,rcuza/homebrew-cask,hvisage/homebrew-cask,hristozov/homebrew-cask,kirikiriyamama/homebrew-cask,aktau/homebrew-cask,nathancahill/homebrew-cask,sebcode/homebrew-cask,c... | ruby | ## Code Before:
class DuplicateAnnihilator < Cask
url 'http://brattoo.com/propaganda/downloadDa.php'
homepage 'http://brattoo.com/propaganda/'
version '4.16.0'
sha1 '80af306c21f1f6c16d08fe6a672af3d20a43591d'
nested_container 'Duplicate Annihilator.dmg'
link 'Duplicate Annihilator.app'
end
## Instruction:
S... |
ec5b2c9f43797f3dd3b29fe26f77ddcd1f60ca76 | ui/app/routes/jobs/job/index.js | ui/app/routes/jobs/job/index.js | import Route from '@ember/routing/route';
import { collect } from '@ember/object/computed';
import { watchRecord, watchRelationship, watchAll } from 'nomad-ui/utils/properties/watch';
import WithWatchers from 'nomad-ui/mixins/with-watchers';
export default class IndexRoute extends Route.extend(WithWatchers) {
startW... | import Route from '@ember/routing/route';
import { collect } from '@ember/object/computed';
import { watchRecord, watchRelationship, watchAll } from 'nomad-ui/utils/properties/watch';
import WithWatchers from 'nomad-ui/mixins/with-watchers';
export default class IndexRoute extends Route.extend(WithWatchers) {
startW... | Sort periodic and parameterized job detail pages by most recently submitted | Sort periodic and parameterized job detail pages by most recently submitted
| JavaScript | mpl-2.0 | hashicorp/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,dvusboy/nomad,burdandrei/nomad,hashicorp/nomad,burdandrei/nomad,hashicorp/nomad,hashicorp/nomad,dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,burdandrei/nomad,hashicorp/nomad,dvusboy/nomad,dvusboy/nomad,dvusboy/nomad,burdandrei/nomad,dvusboy/nomad | javascript | ## Code Before:
import Route from '@ember/routing/route';
import { collect } from '@ember/object/computed';
import { watchRecord, watchRelationship, watchAll } from 'nomad-ui/utils/properties/watch';
import WithWatchers from 'nomad-ui/mixins/with-watchers';
export default class IndexRoute extends Route.extend(WithWatc... |
81ea1101839059cbb57011f0d1af5b06ebe3d458 | setup.py | setup.py | from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='a2csuga@users.noreply.github.com',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
packages=['lektor_root_relative_path'],
description='Ro... | from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='a2csuga@users.noreply.github.com',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
install_requires=open('requirements.txt').read(),
packa... | Add dependency, so it gets auto installed when installing the plugin. | Add dependency, so it gets auto installed when installing the plugin.
| Python | mit | a2csuga/lektor-root-relative-path | python | ## Code Before:
from setuptools import setup
setup(
name='lektor-root-relative-path',
author=u'Atsushi Suga',
author_email='a2csuga@users.noreply.github.com',
version='0.1',
url='http://github.com/a2csuga/lektor-root-relative-path',
license='MIT',
packages=['lektor_root_relative_path'],
... |
7a9f295dc0588a56ef56e726dac721cc514a1b6f | app/views/users/show.html.erb | app/views/users/show.html.erb | <h1>My Profile</h1>
<h3><%= current_user.first_name %> <%= current_user.last_name %></h3>
<p>Email: <%= current_user.email %></p>
<p>Postal Code: <%= current_user.postal_code %></p>
<%= link_to("Edit Profile", edit_user_path) %>
<%= link_to("My Votes", user_user_votes_path(@user)) %>
| <h1>My Profile</h1>
<h3><%= current_user.first_name %> <%= current_user.last_name %></h3>
<p>Email: <%= current_user.email %></p>
<p>Postal Code: <%= current_user.postal_code %></p>
<%= link_to("Edit Profile", edit_user_path(@user)) %>
<%= link_to("My Votes", myvotes_path(@user)) %>
| Fix links to edit profile and my votes on user profile page | Fix links to edit profile and my votes on user profile page
| HTML+ERB | mit | CivicHaxx/ok_councillr,CivicHaxx/ok_councillr,CivicHaxx/ok_councillr | html+erb | ## Code Before:
<h1>My Profile</h1>
<h3><%= current_user.first_name %> <%= current_user.last_name %></h3>
<p>Email: <%= current_user.email %></p>
<p>Postal Code: <%= current_user.postal_code %></p>
<%= link_to("Edit Profile", edit_user_path) %>
<%= link_to("My Votes", user_user_votes_path(@user)) %>
## Instruction... |
5c95bdf43c4b5a60f5de1dd336705ffab999db1a | human_player.rb | human_player.rb | require_relative 'invalid_move_error'
class HumanPlayer
def initialize(board)
self.board = board
end
def take_turn
move = get_move
man = take_man(move.first)
if man.nil?
raise InvalidMoveError.new
end
(man.slide(move.last) || man.jump(move.last)) or raise InvalidMoveErro... | require_relative 'invalid_move_error'
class HumanPlayer
def initialize(board)
self.board = board
end
def take_turn
seq = get_move
man = take_man(seq.shift)
if man.nil?
raise InvalidMoveError.new
end
man.move(seq)
end
protected
attr_accessor :board
def take_... | Rewrite player move parsing to support entire movement chains | Rewrite player move parsing to support entire movement chains
| Ruby | mit | dandyism/checkers | ruby | ## Code Before:
require_relative 'invalid_move_error'
class HumanPlayer
def initialize(board)
self.board = board
end
def take_turn
move = get_move
man = take_man(move.first)
if man.nil?
raise InvalidMoveError.new
end
(man.slide(move.last) || man.jump(move.last)) or raise... |
962d8f7c7545b36725a8d652684eeebb1b982350 | install-bundles.sh.js | install-bundles.sh.js | require('shelljs/global');
var installBundle = function(gitPath) {
gitPath = gitPath.trim().replace(/#.*/, '');
if(!gitPath) { return; }
var repoName = gitPath.replace(/.*\//, '');
if(exec('git clone https://github.com/'+gitPath+'.git bundle/'+repoName).code != 0) {
echo('Checkout failed for bundle '+gitPa... | require('shelljs/global');
var repoNameFromGitPath = function(gitPath) {
return gitPath.replace(/.*\//, '');
};
var installBundle = function(gitPath) {
var repoName = gitPath.replace(/.*\//, '');
if(exec('git clone https://github.com/'+gitPath+'.git bundle/'+repoName).code !== 0) {
echo('Checkout failed for... | Update bundle if already installed | fix: Update bundle if already installed
| JavaScript | mit | jtrussell/vimfiles | javascript | ## Code Before:
require('shelljs/global');
var installBundle = function(gitPath) {
gitPath = gitPath.trim().replace(/#.*/, '');
if(!gitPath) { return; }
var repoName = gitPath.replace(/.*\//, '');
if(exec('git clone https://github.com/'+gitPath+'.git bundle/'+repoName).code != 0) {
echo('Checkout failed fo... |
018eab65881a2279efca88e1448dba0708a4dfe1 | django_excel_to_model/management/commands/model_create_utils/django_tables2_utils.py | django_excel_to_model/management/commands/model_create_utils/django_tables2_utils.py | from django_excel_to_model.management.commands.model_create_utils.attribute_generator import ClassAttributeCreator
import django_tables2 as tables
def get_django_tables2_from_dict(data_dict):
c = ClassAttributeCreator()
table_meta_class = type("Meta", (), {
"attrs": {'class': 'table table-striped tabl... | from django_excel_to_model.management.commands.model_create_utils.attribute_generator import ClassAttributeCreator
import django_tables2 as tables
def get_django_tables2_from_dict(data_dict):
c = ClassAttributeCreator()
table_meta_class = type("Meta", (), {
"attrs": {'class': 'table table-striped tabl... | Remove sort function by default for table generated from dict. | Remove sort function by default for table generated from dict.
| Python | bsd-3-clause | weijia/django-excel-to-model,weijia/django-excel-to-model | python | ## Code Before:
from django_excel_to_model.management.commands.model_create_utils.attribute_generator import ClassAttributeCreator
import django_tables2 as tables
def get_django_tables2_from_dict(data_dict):
c = ClassAttributeCreator()
table_meta_class = type("Meta", (), {
"attrs": {'class': 'table ta... |
21fb32e038627c0b12094558c0eb06ba679b4278 | lib/dataServiceController.js | lib/dataServiceController.js | 'use strict';
var assert = require('assert')
var dataServiceFactory = require('./dataService')
function createDataServices(config) {
var dataServices = {}
config.forEach((dsConfig) => {
dataServices[dsConfig.name] = dataServiceFactory(dsConfig)
})
return dataServices
}
/**
* DataService controller.
... | 'use strict';
var assert = require('assert')
var dataServiceFactory = require('./dataService')
function createDataServices(config) {
var dataServices = {}
config.forEach((dsConfig) => {
dataServices[dsConfig.name] = dataServiceFactory(dsConfig)
})
return dataServices
}
/**
* DataService controller.
... | Fix default object and validation | Fix default object and validation
| JavaScript | mit | mediasuitenz/mappy,mediasuitenz/mappy | javascript | ## Code Before:
'use strict';
var assert = require('assert')
var dataServiceFactory = require('./dataService')
function createDataServices(config) {
var dataServices = {}
config.forEach((dsConfig) => {
dataServices[dsConfig.name] = dataServiceFactory(dsConfig)
})
return dataServices
}
/**
* DataServi... |
79f6a0caaf718b3d29fed44b1bd7749d3bd4cb8e | src/web/js/hbs-helpers.js | src/web/js/hbs-helpers.js | /**
* Handlebars Helpers
*/
'use strict';
var Handlebars = require('hbsfy/runtime');
var moment = require('moment');
Handlebars.registerHelper('parseDate', function(options) {
var date = moment.unix(options.fn(this)/1000);
return date.format('YYYY/MM/DD HH:mm');
});
| /**
* Handlebars Helpers
*/
'use strict';
var Handlebars = require('hbsfy/runtime');
var moment = require('moment');
Handlebars.registerHelper('parseDate', function(options) {
var date = moment.unix(options.fn(this)/1000);
return date.format('YYYY/MM/DD') + ' at ' + date.format('HH:mm');
});
| Make date string format slightly friendlier | Make date string format slightly friendlier
| JavaScript | mit | ptmccarthy/wikimapper,ptmccarthy/wikimapper | javascript | ## Code Before:
/**
* Handlebars Helpers
*/
'use strict';
var Handlebars = require('hbsfy/runtime');
var moment = require('moment');
Handlebars.registerHelper('parseDate', function(options) {
var date = moment.unix(options.fn(this)/1000);
return date.format('YYYY/MM/DD HH:mm');
});
## Instruction:
Make d... |
5d879481e704f26824a1e8b84fea263bea5d794e | src/PhpGitHooks/Application/PhpCsFixer/InvalidPhpCsFixerConfigDataException.php | src/PhpGitHooks/Application/PhpCsFixer/InvalidPhpCsFixerConfigDataException.php | <?php
namespace PhpGitHooks\Application\PhpCsFixer;
final class InvalidPhpCsFixerConfigDataException extends \Exception
{
protected $message = 'Invalid entry for php-cs-fixer in your php-git-hooks.php file.' . "\n" .
'Please remove php-cs-fixer entry and execute composer install.';
}
| <?php
namespace PhpGitHooks\Application\PhpCsFixer;
final class InvalidPhpCsFixerConfigDataException extends \Exception
{
protected $message = "Invalid entry for php-cs-fixer in your php-git-hooks.php file.\n
'Please remove php-cs-fixer entry and execute composer install.";
}
| Fix Exception message for php5.5 | Fix Exception message for php5.5
| PHP | mit | bruli/php-git-hooks,jlaso/php-git-hooks,eNRJ/php-git-hooks,jeleb-smile/php-git-hooks,eNRJ/php-git-hooks,bruli/php-git-hooks,akovalyov/php-git-hooks | php | ## Code Before:
<?php
namespace PhpGitHooks\Application\PhpCsFixer;
final class InvalidPhpCsFixerConfigDataException extends \Exception
{
protected $message = 'Invalid entry for php-cs-fixer in your php-git-hooks.php file.' . "\n" .
'Please remove php-cs-fixer entry and execute composer install.';
}
## Instr... |
406601b246a468f1d21677bde28b8ecc6a3970eb | client/app.jsx | client/app.jsx | import React from 'react'
import Immutable from 'immutable'
import { applyMiddleware, createStore, combineReducers, compose } from 'redux'
import thunk from 'redux-thunk'
import promise from 'redux-promise'
import { reduxReactRouter, ReduxRouter } from 'redux-router'
import { batchedUpdatesMiddleware } from './dom/batc... | import React from 'react'
import Immutable from 'immutable'
import { applyMiddleware, createStore, combineReducers, compose } from 'redux'
import thunk from 'redux-thunk'
import promise from 'redux-promise'
import { reduxReactRouter, ReduxRouter } from 'redux-router'
import { batchedUpdatesMiddleware } from './dom/batc... | Add support for chrome extensionified redux dev tools. | Add support for chrome extensionified redux dev tools.
| JSX | mit | ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery | jsx | ## Code Before:
import React from 'react'
import Immutable from 'immutable'
import { applyMiddleware, createStore, combineReducers, compose } from 'redux'
import thunk from 'redux-thunk'
import promise from 'redux-promise'
import { reduxReactRouter, ReduxRouter } from 'redux-router'
import { batchedUpdatesMiddleware } ... |
eecadb9b764da9046e605842b46571a167e349d6 | README.md | README.md | Judy
====
Judy is an interactive game that could be played through a GUI or a CLI. Its main purpose is to destroy the blocks in the 2D field by clicking on a block chosen by the user. If the given block is part of a group of at least three neighbouring blocks of the same kind, the whole group will disappear.
As you p... | Judy
====
Judy is an interactive game that could be played through a GUI or a CLI. Its main purpose is to destroy the blocks in the 2D field by clicking on a block chosen by the user. If the given block is part of a group of at least three neighbouring blocks of the same kind, the whole group will disappear.
As you p... | Add missing plan for the second milestone | Add missing plan for the second milestone
| Markdown | mit | velinakd/candy-crush-2048 | markdown | ## Code Before:
Judy
====
Judy is an interactive game that could be played through a GUI or a CLI. Its main purpose is to destroy the blocks in the 2D field by clicking on a block chosen by the user. If the given block is part of a group of at least three neighbouring blocks of the same kind, the whole group will disa... |
b494a5b2ed94c1def6fb8bbbab5df5612ef30aa7 | tests/test_api.py | tests/test_api.py | from bmi_tester.api import check_bmi
def test_bmi_check(tmpdir):
with tmpdir.as_cwd():
with open("input.yaml", "w"):
pass
assert (
check_bmi(
"bmi_tester.bmi:Bmi", input_file="input.yaml", extra_args=["-vvv"]
)
== 0
)
def te... | import os
from bmi_tester.api import check_bmi
def touch_file(fname):
with open(fname, "w"):
pass
def test_bmi_check(tmpdir):
with tmpdir.as_cwd():
touch_file("input.yaml")
assert (
check_bmi(
"bmi_tester.bmi:Bmi", input_file="input.yaml", extra_args=["-v... | Test a manifest with multiple files. | Test a manifest with multiple files.
| Python | mit | csdms/bmi-tester | python | ## Code Before:
from bmi_tester.api import check_bmi
def test_bmi_check(tmpdir):
with tmpdir.as_cwd():
with open("input.yaml", "w"):
pass
assert (
check_bmi(
"bmi_tester.bmi:Bmi", input_file="input.yaml", extra_args=["-vvv"]
)
== 0
... |
280bf8f364d1251e04a4b869c4e932e78d0c59c3 | composer.json | composer.json | {
"name": "happyr/linkedin-api-client",
"type": "library",
"description": "LinkedIn API client. Handles OAuth, CSRF protection. Easy to implement and extend. This is a standalone library for any composer project.",
"keywords": ["LinkedIn", "OAuth", "API", "Client", "SDK"],
"homepage": "http://develo... | {
"name": "happyr/linkedin-api-client",
"type": "library",
"description": "LinkedIn API client. Handles OAuth, CSRF protection. Easy to implement and extend. This is a standalone library for any composer project.",
"keywords": ["LinkedIn", "OAuth", "API", "Client", "SDK"],
"homepage": "http://develo... | Revert "You may use discovery dev-master" | Revert "You may use discovery dev-master"
This reverts commit c291cbe302c2dc0bfcc74d7c22cbd6920941a8b7.
| JSON | mit | Happyr/LinkedIn-API-client | json | ## Code Before:
{
"name": "happyr/linkedin-api-client",
"type": "library",
"description": "LinkedIn API client. Handles OAuth, CSRF protection. Easy to implement and extend. This is a standalone library for any composer project.",
"keywords": ["LinkedIn", "OAuth", "API", "Client", "SDK"],
"homepage"... |
be6a9072b48ef3764d44c2d1c00285f92b4ea53c | jenkins/jobs/scripts/dlrn-api-report.sh | jenkins/jobs/scripts/dlrn-api-report.sh | virtualenv $WORKSPACE/venv_dlrnapi
source $WORKSPACE/venv_dlrnapi/bin/activate
pip install dlrnapi_client shyaml
curl -sLo $BUILD_TAG.yaml $(echo $DELOREAN_URL | sed 's/delorean\.repo/commit.yaml/')
commit_hash=$(cat $BUILD_TAG.yaml| shyaml get-value commits.0.commit_hash)
distro_hash=$(cat $BUILD_TAG.yaml| shyaml g... | virtualenv $WORKSPACE/venv_dlrnapi
source $WORKSPACE/venv_dlrnapi/bin/activate
pip install dlrnapi_client shyaml
curl -sLo $BUILD_TAG.yaml $(echo $DELOREAN_URL | sed 's/delorean\.repo/commit.yaml/')
commit_hash=$(cat $BUILD_TAG.yaml| shyaml get-value commits.0.commit_hash)
distro_hash=$(cat $BUILD_TAG.yaml| shyaml g... | Fix dlrnapi reporting script for tripleo | Fix dlrnapi reporting script for tripleo
The order of the arguments were not correct which makes the reporting
fail. This fixes the script.
Change-Id: I24fa339d161a29e13b4dd9106f2c7ce245652952
| Shell | apache-2.0 | rdo-infra/ci-config,redhat-openstack/rdo-infra,rdo-infra/ci-config,rdo-infra/ci-config,redhat-openstack/rdo-infra,rdo-infra/ci-config,redhat-openstack/rdo-infra,redhat-openstack/rdo-infra | shell | ## Code Before:
virtualenv $WORKSPACE/venv_dlrnapi
source $WORKSPACE/venv_dlrnapi/bin/activate
pip install dlrnapi_client shyaml
curl -sLo $BUILD_TAG.yaml $(echo $DELOREAN_URL | sed 's/delorean\.repo/commit.yaml/')
commit_hash=$(cat $BUILD_TAG.yaml| shyaml get-value commits.0.commit_hash)
distro_hash=$(cat $BUILD_TA... |
48059e6d2ad88ec64b5bd1a54a7e825a3540265b | lib/kippt_simple/client.rb | lib/kippt_simple/client.rb | module KipptSimple
class Client
extend Forwardable
attr_reader :username, :token
def initialize args
raise ArgumentError.new('Username and token required') if args[:username].nil? or args[:token].nil? or args[:username].empty? or args[:token].empty?
@username, @token = args[:username], args... | module KipptSimple
class Client
extend Forwardable
attr_reader :username, :token
def initialize args
@username, @token = args.fetch(:username, ''), args.fetch(:token, '')
raise ArgumentError.new('Username and Token cannot be empty') if @username.empty? or @token.empty?
end
def conn... | Raise better error message when username or token is empty. | Raise better error message when username or token is empty.
| Ruby | mit | maciejsmolinski/kippt_simple | ruby | ## Code Before:
module KipptSimple
class Client
extend Forwardable
attr_reader :username, :token
def initialize args
raise ArgumentError.new('Username and token required') if args[:username].nil? or args[:token].nil? or args[:username].empty? or args[:token].empty?
@username, @token = args[... |
eab703b15786b5a0b0ffe8abe91ca3559728e1d9 | src/config.js | src/config.js | /* jslint node:true */
'use strict';
exports = module.exports = {
db: null,
databaseUrl: process.env.CLOUDRON_MONGODB_URL || 'mongodb://127.0.0.1:27017/meemo',
_clearDatabase: clearDatabase,
attachmentDir: process.env.ATTACHMENT_DIR || (__dirname + '/../storage')
};
var MongoClient = require('mongod... | /* jslint node:true */
'use strict';
exports = module.exports = {
db: null,
databaseUrl: process.env.CLOUDRON_MONGODB_URL || 'mongodb://127.0.0.1:27017/meemo',
_clearDatabase: clearDatabase,
attachmentDir: process.env.ATTACHMENT_DIR || (__dirname + '/../storage')
};
var MongoClient = require('mongod... | Fix mongodb usage in tests | Fix mongodb usage in tests
| JavaScript | mit | nebulade/meemo,nebulade/guacamoly,nebulade/guacamoly,nebulade/meemo,nebulade/meemo,nebulade/guacamoly | javascript | ## Code Before:
/* jslint node:true */
'use strict';
exports = module.exports = {
db: null,
databaseUrl: process.env.CLOUDRON_MONGODB_URL || 'mongodb://127.0.0.1:27017/meemo',
_clearDatabase: clearDatabase,
attachmentDir: process.env.ATTACHMENT_DIR || (__dirname + '/../storage')
};
var MongoClient =... |
ca31ecaf79e42cacc023277aa163af8887a360ad | mlog/log.py | mlog/log.py | import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
''', values)
... | import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
''', values)
... | Use with statement when writing to a file | Use with statement when writing to a file
| Python | agpl-3.0 | fajran/mlog | python | ## Code Before:
import gzip
import json
from datetime import datetime
def log_database(conn, param, email):
param = json.dumps(param)
email_gz = gzip.compress(email.encode('ascii'))
values = (param, email_gz)
c = conn.cursor()
c.execute('''
INSERT INTO email_log (`param`, `email_gz`)
VALUES (?, ?)
... |
dbdb6ef782c84bcb4ba88c8f1d2b60214676991e | appveyor.yml | appveyor.yml | build: false
environment:
matrix:
- PYTHON: "C:/Python27-x64"
- PYTHON: "C:/Python35-x64"
- PYTHON: "C:/Python36-x64"
init:
- "ECHO %PYTHON%"
- ps: "ls C:/Python*"
install:
- ps: (new-object net.webclient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', 'C:/get-pip.py')
- "%PYTHON%/python.e... | build: false
environment:
PYTHONIOENCODING: "UTF-8"
matrix:
- PYTHON: "C:/Python27-x64"
- PYTHON: "C:/Python35-x64"
- PYTHON: "C:/Python36-x64"
init:
- "ECHO %PYTHON%"
- ps: "ls C:/Python*"
install:
- ps: (new-object net.webclient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', 'C:/get-p... | Work around to Appveyor testing error for Python 3 | Work around to Appveyor testing error for Python 3
| YAML | mit | thombashi/pytablewriter | yaml | ## Code Before:
build: false
environment:
matrix:
- PYTHON: "C:/Python27-x64"
- PYTHON: "C:/Python35-x64"
- PYTHON: "C:/Python36-x64"
init:
- "ECHO %PYTHON%"
- ps: "ls C:/Python*"
install:
- ps: (new-object net.webclient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', 'C:/get-pip.py')
- "%... |
92b31e49a7a4b0e89863efe6b086ed73fbac6cff | settings/src/components/appNavigation.vue | settings/src/components/appNavigation.vue | <template>
<div id="app-navigation" :class="{'icon-loading': menu.loading}">
<div class="app-navigation-new" v-if="menu.new">
<button type="button" :id="menu.new.id" :class="menu.new.icon" @click="menu.new.action">{{menu.new.text}}</button>
</div>
<ul :id="menu.id">
<navigation-item v-for="item in menu.ite... | <template>
<div id="app-navigation" :class="{'icon-loading': menu.loading}">
<div class="app-navigation-new" v-if="menu.new">
<button type="button" :id="menu.new.id" :class="menu.new.icon" @click="menu.new.action">{{menu.new.text}}</button>
</div>
<ul :id="menu.id">
<navigation-item v-for="item in menu.ite... | Hide app navigation settings when not provided | Hide app navigation settings when not provided
Signed-off-by: Julius Härtl <bf353fa4999f2f148afcc6d8ee6cb1ee74cc07c3@bitgrid.net>
| Vue | agpl-3.0 | andreas-p/nextcloud-server,nextcloud/server,andreas-p/nextcloud-server,andreas-p/nextcloud-server,nextcloud/server,nextcloud/server,nextcloud/server,andreas-p/nextcloud-server,andreas-p/nextcloud-server | vue | ## Code Before:
<template>
<div id="app-navigation" :class="{'icon-loading': menu.loading}">
<div class="app-navigation-new" v-if="menu.new">
<button type="button" :id="menu.new.id" :class="menu.new.icon" @click="menu.new.action">{{menu.new.text}}</button>
</div>
<ul :id="menu.id">
<navigation-item v-for="... |
a9d7dee03864dcea888e4ed0700af40a8d45d1ce | locket_client.go | locket_client.go | package locket
import (
"code.cloudfoundry.org/cfhttp"
"code.cloudfoundry.org/lager"
"code.cloudfoundry.org/locket/models"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)
type ClientLocketConfig struct {
LocketAddress string `json:"locket_address,omitempty"`
LocketCACertFile string `... | package locket
import (
"code.cloudfoundry.org/cfhttp"
"code.cloudfoundry.org/lager"
"code.cloudfoundry.org/locket/models"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)
type ClientLocketConfig struct {
LocketAddress string `json:"locket_address,omitempty" yaml:"locket_address,omitempty"... | Add YAML serialization to ClientLocketConfig | Add YAML serialization to ClientLocketConfig
[#139885407]
Signed-off-by: Edwin Xie <6bc24e9c160281972837d9e13287696d26612564@pivotal.io>
| Go | apache-2.0 | cloudfoundry-incubator/locket | go | ## Code Before:
package locket
import (
"code.cloudfoundry.org/cfhttp"
"code.cloudfoundry.org/lager"
"code.cloudfoundry.org/locket/models"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
)
type ClientLocketConfig struct {
LocketAddress string `json:"locket_address,omitempty"`
LocketCACertF... |
5790fdc7dfca54a44924d09255b3346d46fd86cc | Library/Formula/akonadi.rb | Library/Formula/akonadi.rb | require 'formula'
class Akonadi <Formula
url 'http://download.akonadi-project.org/akonadi-1.3.0.tar.bz2'
homepage 'http://pim.kde.org/akonadi/'
md5 '45fe59bd301268149cb0313d54a98520'
depends_on 'cmake'
depends_on 'shared-mime-info'
depends_on 'mysql'
depends_on 'automoc4'
depends_on 'soprano'
depend... | require 'formula'
class Akonadi <Formula
url 'http://download.akonadi-project.org/akonadi-1.3.1.tar.bz2'
homepage 'http://pim.kde.org/akonadi/'
md5 'e6eef3ed5c28d55f4b6530544e379413'
depends_on 'cmake'
depends_on 'shared-mime-info'
depends_on 'mysql'
depends_on 'automoc4'
depends_on 'soprano'
depend... | Update Akonadi to version 1.3.1. | Update Akonadi to version 1.3.1.
| Ruby | bsd-2-clause | tschoonj/homebrew,amjith/homebrew,lvicentesanchez/linuxbrew,Moisan/homebrew,danielfariati/homebrew,valkjsaaa/homebrew,keithws/homebrew,knpwrs/homebrew,jsallis/homebrew,lousama/homebrew,bidle/homebrew,keith/homebrew,qorelanguage/homebrew,hanxue/homebrew,aristiden7o/homebrew,Gui13/linuxbrew,johanhammar/homebrew,kazuho/ho... | ruby | ## Code Before:
require 'formula'
class Akonadi <Formula
url 'http://download.akonadi-project.org/akonadi-1.3.0.tar.bz2'
homepage 'http://pim.kde.org/akonadi/'
md5 '45fe59bd301268149cb0313d54a98520'
depends_on 'cmake'
depends_on 'shared-mime-info'
depends_on 'mysql'
depends_on 'automoc4'
depends_on 's... |
2a8232aba630bc7f2256437c5d9ae2914333e58d | features/support/hooks.rb | features/support/hooks.rb | Before do
CouchRestRails::Tests.setup
end
After do
CouchRestRails::Tests.teardown
end | Before do
# CouchRestRails::Tests.setup
end
# After each scenario...
After do
# CouchRestRails::Tests.teardown
end | Disable database refresh between each scenario | Disable database refresh between each scenario | Ruby | agpl-3.0 | ctumwebaze/RapidFTR,austiine04/RapidFTR,sriprasanna/RapidFTR,mwangiann/RapidFTR,sorashiro/RapidFTR,austiine04/RapidFTR,ctumwebaze/RapidFTR,sorashiro/RapidFTR,sriprasanna/RapidFTR,sferik/RapidFTR,timothyakampa/RapidFTR,sriprasanna/RapidFTR,rapidftr/RapidFTR,tomclement/RapidFTR,sferik/RapidFTR,timothyakampa/RapidFTR,rapi... | ruby | ## Code Before:
Before do
CouchRestRails::Tests.setup
end
After do
CouchRestRails::Tests.teardown
end
## Instruction:
Disable database refresh between each scenario
## Code After:
Before do
# CouchRestRails::Tests.setup
end
# After each scenario...
After do
# CouchRestRails::Tests.teardown
end |
cae9731a31dae49f17e4f09e9d8a54238ed8b2f8 | README.md | README.md | GOAL
First goal is to play well with HAProxy, without being specific to it:
- take "bundle" PEMs as input containing the certificate chain,
falling back to a `.issuer`-suffixed file
- output OCSP response in a `.ocsp`-suffixed file
All other usages can come later, as options if needed.
REQUIREMENTS
https://gist.g... | GOAL
First goal is to play well with HAProxy, without being specific to it:
- take "bundle" PEMs as input containing the certificate chain,
falling back to a `.issuer`-suffixed file
- output OCSP response in a `.ocsp`-suffixed file
All other usages can come later, as options if needed.
REQUIREMENTS
https://gist.g... | Update roadmap and currently implemented features | Update roadmap and currently implemented features | Markdown | bsd-3-clause | tbroyer/ocspd,tbroyer/ocspd | markdown | ## Code Before:
GOAL
First goal is to play well with HAProxy, without being specific to it:
- take "bundle" PEMs as input containing the certificate chain,
falling back to a `.issuer`-suffixed file
- output OCSP response in a `.ocsp`-suffixed file
All other usages can come later, as options if needed.
REQUIREMENTS... |
bf9d4f7379547c5058c594ef495243d61d2001ec | src/utils/fetch-data.ts | src/utils/fetch-data.ts | import * as fetch from 'isomorphic-fetch'
export default async (endpoint: string): Promise<Record<string, unknown> | Record<string, unknown>[]> => {
const response = await fetch(`https://data.police.uk/api${endpoint}`)
return response.json()
}
| import * as fetch from 'isomorphic-fetch'
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export default async (endpoint: string): Promise<any> => {
const response = await fetch(`https://data.police.uk/api${endpoint}`)
return response.json()
}
| Revert "fix fetch data result type" | Revert "fix fetch data result type"
This reverts commit 6a6e2dd3093d69e932a1abf793c79a53f7d6c69a.
| TypeScript | mit | AlexChesters/ukpd,AlexChesters/ukpd,AlexChesters/ukpd | typescript | ## Code Before:
import * as fetch from 'isomorphic-fetch'
export default async (endpoint: string): Promise<Record<string, unknown> | Record<string, unknown>[]> => {
const response = await fetch(`https://data.police.uk/api${endpoint}`)
return response.json()
}
## Instruction:
Revert "fix fetch data result type"
T... |
b9739a8444d1c51663fe1fa5445e8d8e179b9a37 | spec/support/mock_request.cr | spec/support/mock_request.cr | class MockRequest < HTTP::Request
def initialize
end
end
| class MockRequest
def initialize
end
def get(path : String, headers = Hash.new : Hash(String, String | Array(String)))
http_headers = HTTP::Headers.new
headers.each do |key, value|
http_headers.add(key, value)
end
HTTP::Request.new("GET", path, http_headers)
end
end
| Add a basic MockRequest for mocking a HTTP::Request | Add a basic MockRequest for mocking a HTTP::Request | Crystal | mit | benoist/carbon-crystal,benoist/carbon-crystal | crystal | ## Code Before:
class MockRequest < HTTP::Request
def initialize
end
end
## Instruction:
Add a basic MockRequest for mocking a HTTP::Request
## Code After:
class MockRequest
def initialize
end
def get(path : String, headers = Hash.new : Hash(String, String | Array(String)))
http_headers = HTTP::Header... |
cff3497f2c06dd4e1785af3c844040ed7939dcb0 | app/uploaders/file_uploader.rb | app/uploaders/file_uploader.rb | class FileUploader < CarrierWave::Uploader::Base
include UploaderHelper
storage :file
attr_accessor :project, :secret
def initialize(project, secret = self.class.generate_secret)
@project = project
@secret = secret
end
def base_dir
"uploads"
end
def store_dir
File.join(base_dir, @pr... | class FileUploader < CarrierWave::Uploader::Base
include UploaderHelper
MARKDOWN_PATTERN = %r{\!?\[.*?\]\(/uploads/(?<secret>[0-9a-f]{32})/(?<file>.*?)\)}
storage :file
attr_accessor :project, :secret
def initialize(project, secret = self.class.generate_secret)
@project = project
@secret = secret
... | Add markdown pattern for uploads to file uploader | Add markdown pattern for uploads to file uploader
| Ruby | mit | darkrasid/gitlabhq,iiet/iiet-git,Soullivaneuh/gitlabhq,htve/GitlabForChinese,jirutka/gitlabhq,axilleas/gitlabhq,darkrasid/gitlabhq,screenpages/gitlabhq,mmkassem/gitlabhq,axilleas/gitlabhq,darkrasid/gitlabhq,t-zuehlsdorff/gitlabhq,dreampet/gitlab,martijnvermaat/gitlabhq,screenpages/gitlabhq,dplarson/gitlabhq,daiyu/gitla... | ruby | ## Code Before:
class FileUploader < CarrierWave::Uploader::Base
include UploaderHelper
storage :file
attr_accessor :project, :secret
def initialize(project, secret = self.class.generate_secret)
@project = project
@secret = secret
end
def base_dir
"uploads"
end
def store_dir
File.jo... |
699a64067921955ada431c08bad6bc2462ef2217 | init.sh | init.sh | export SECRET_KEY_BASE=$(bundle exec rake secret)
export DEVISE_PEPPER=$(bundle exec rake secret)
export RAILS_SERVE_STATIC_FILES='true'
. /usr/src/app/secrets.sh
bundle exec rake db:create db:migrate
bundle exec rake assets:precompile
bundle exec rails s Puma -p 3000 -b '0.0.0.0'
| export RAILS_SERVE_STATIC_FILES='true'
. /usr/src/app/secrets.sh
bundle exec rake db:create db:migrate
bundle exec rake assets:precompile
bundle exec rails s Puma -p 3000 -b '0.0.0.0'
| Stop changing the secrets every time the solution is deployed, as it breaks stored encrypted passwords. | Stop changing the secrets every time the solution is deployed, as it breaks stored encrypted passwords.
| Shell | apache-2.0 | jlm/maint,jlm/maint,jlm/maint,jlm/maint | shell | ## Code Before:
export SECRET_KEY_BASE=$(bundle exec rake secret)
export DEVISE_PEPPER=$(bundle exec rake secret)
export RAILS_SERVE_STATIC_FILES='true'
. /usr/src/app/secrets.sh
bundle exec rake db:create db:migrate
bundle exec rake assets:precompile
bundle exec rails s Puma -p 3000 -b '0.0.0.0'
## Instruction:
Stop... |
c13c0b11a99899ad665b1140126c09064646c779 | pubspec.yaml | pubspec.yaml | name: mongo_dart
version: 0.1.44
authors:
- Vadim Tsushko <vadimtsushko@gmail.com>
- Ted Sander <ted@tedsander.com>
- Paul Evans <pevans@sonardesign.com>
description: MongoDB driver for Dart
homepage: https://github.com/vadimtsushko/mongo_dart
environment:
sdk: '>=0.8.10+6 <2.0.0'
dependencies:
bson: any
crypto: ... | name: mongo_dart
version: 0.1.45-dev
authors:
- Vadim Tsushko <vadimtsushko@gmail.com>
- Ted Sander <ted@tedsander.com>
- Paul Evans <pevans@sonardesign.com>
- Stéphane ESTE-GRACIAS <sestegra@gmail.com>
description: MongoDB driver for Dart
homepage: https://github.com/vadimtsushko/mongo_dart
environment:
sdk: '>=0.8... | Add sestegra to authors list | Add sestegra to authors list
| YAML | mit | mongo-dart/mongo_dart,vadimtsushko/mongo_dart,rajmaniar/mongo_dart | yaml | ## Code Before:
name: mongo_dart
version: 0.1.44
authors:
- Vadim Tsushko <vadimtsushko@gmail.com>
- Ted Sander <ted@tedsander.com>
- Paul Evans <pevans@sonardesign.com>
description: MongoDB driver for Dart
homepage: https://github.com/vadimtsushko/mongo_dart
environment:
sdk: '>=0.8.10+6 <2.0.0'
dependencies:
bson... |
7d9b002b30eb2646708c9f2cf5c1554a2bf5428c | content/tool/_index.md | content/tool/_index.md | ---
title: Tools Directory
description: A curated collection of tools and services
date: 2018-03-29 10:51:55 +0000
---
| ---
title: Tools
linktitle: Tools Directory
description: A curated collection of tools and services
date: 2018-03-29 10:51:55 +0000
---
| Use "directory" in menu only | Use "directory" in menu only
| Markdown | mit | thenewdynamic-org/thenewdynamic.org,budparr/thenewdynamic,budparr/thenewdynamic,thenewdynamic-org/thenewdynamic.org,budparr/thenewdynamic | markdown | ## Code Before:
---
title: Tools Directory
description: A curated collection of tools and services
date: 2018-03-29 10:51:55 +0000
---
## Instruction:
Use "directory" in menu only
## Code After:
---
title: Tools
linktitle: Tools Directory
description: A curated collection of tools and services
date: 2018-03-29 10:51... |
03e2abbc5db37d3ba4c375812b24f17e420d37be | README.md | README.md | Project Hub
================
Read more about [project hubs on 24 Ways.](http://24ways.org/2013/project-hubs/)
This is an HTML template for online project timelines (also known as "project hubs").
## What is a project hub and why would I use one?
A project hub is a tool for keeping track of the progress of a design p... | Project Hub
================
Read more about [project hubs on 24 Ways.](http://24ways.org/2013/project-hubs/)
This is an HTML template for online project timelines (also known as "project hubs").
## What is a project hub and why would I use one?
A project hub is a tool for keeping track of the progress of a design p... | Add a link to the PHP version | Add a link to the PHP version | Markdown | mit | Chisssy/project-hub,bradfrost/project-hub,GwenBierlier/project-hub,gdidayton/project-hub,jonambas/project-hub,javimosch/project-hub | markdown | ## Code Before:
Project Hub
================
Read more about [project hubs on 24 Ways.](http://24ways.org/2013/project-hubs/)
This is an HTML template for online project timelines (also known as "project hubs").
## What is a project hub and why would I use one?
A project hub is a tool for keeping track of the progre... |
7bebda1a4e01832a15ffda59a9ea4d75048785e6 | zsh/aws.zsh | zsh/aws.zsh | alias cfn-nag='cfn_nag'
alias cfn-nag-rules='cfn_nag_rules'
alias cfn-nag-scan='cfn_nag_scan'
alias isengard='isengardcli'
eval "$(isengardcli shell-autocomplete)"
| alias cfn-nag='cfn_nag'
alias cfn-nag-rules='cfn_nag_rules'
alias cfn-nag-scan='cfn_nag_scan'
alias isengard='isengardcli'
if [[ $(hostname) == "147dda49eefc.ant.amazon.com" ]]; then
eval "$(isengardcli shell-autocomplete)"
fi
| Check host for AWS shell commands | Check host for AWS shell commands
| Shell | bsd-2-clause | skjerven/dotfiles,skjerven/dotfiles,skjerven/dotfiles | shell | ## Code Before:
alias cfn-nag='cfn_nag'
alias cfn-nag-rules='cfn_nag_rules'
alias cfn-nag-scan='cfn_nag_scan'
alias isengard='isengardcli'
eval "$(isengardcli shell-autocomplete)"
## Instruction:
Check host for AWS shell commands
## Code After:
alias cfn-nag='cfn_nag'
alias cfn-nag-rules='cfn_nag_rules'
alias cfn-na... |
03b83fb604b4af7cf73e0faba97b46c1993aff29 | config/adapt_defaults.yml | config/adapt_defaults.yml | common: &common
adapt.home: ""
adapt.asset.path: assets
adapt.dir.mode: 0775
adapt.file.mode: 0660
adapt.file.ownership: ""
ada.openid.server: https://users.ada.edu.au
ada.registration.url: https://users.ada.edu.au/users/new
ada.email.admin: assda@anu.edu... | common: &common
adapt.home: ""
adapt.asset.path: assets
adapt.dir.mode: 0775
adapt.file.mode: 0660
adapt.file.ownership: ""
ada.openid.server: https://users.ada.edu.au
ada.registration.url: https://users.ada.edu.au/users/new
ada.email.admin: assda@anu.edu... | Store files on the d10 share in devs mode. | Store files on the d10 share in devs mode.
| YAML | mit | ANUSF/adapt,ANUSF/adapt | yaml | ## Code Before:
common: &common
adapt.home: ""
adapt.asset.path: assets
adapt.dir.mode: 0775
adapt.file.mode: 0660
adapt.file.ownership: ""
ada.openid.server: https://users.ada.edu.au
ada.registration.url: https://users.ada.edu.au/users/new
ada.email.admin: ... |
25d4fabce29433bc1381a03a44a67cc588688e7f | setup.py | setup.py |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name = 'CouchDB-FUSE',
version = '0.1',
description = 'CouchDB FUSE module',
long_description = \
"""This is a Python FUSE module for CouchDB. It allows CouchDB document
attachments to be mounted on ... |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name = 'CouchDB-FUSE',
version = '0.1',
description = 'CouchDB FUSE module',
long_description = \
"""This is a Python FUSE module for CouchDB. It allows CouchDB document
attachments to be mounted on ... | Update couchdb-python dependency version to 0.5 in anticipation of its release. | Update couchdb-python dependency version to 0.5 in anticipation of its release.
git-svn-id: fdb8975c015a424b33c0997a6b0d758f3a24819f@9 bfab2ddc-a81c-11dd-9a07-0f3041a8e97c
| Python | bsd-3-clause | cozy-labs/cozy-fuse,jasondavies/couchdb-fuse | python | ## Code Before:
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name = 'CouchDB-FUSE',
version = '0.1',
description = 'CouchDB FUSE module',
long_description = \
"""This is a Python FUSE module for CouchDB. It allows CouchDB document
attachments t... |
9d3ceb689547de937a5991c2c790fb671ab3aa00 | fixtures/dom/README.md | fixtures/dom/README.md |
This folder exists for **React contributors** only.
If you use React you don't need to worry about it.
These fixtures verify that the built React distributions are usable in different environments.
**They are not running automatically.** (At least not yet, feel free to contribute to automate them.)
Run them when... |
A set of DOM test cases for quickly identifying browser issues.
## Setup
To reference a local build of React, first run `npm run build` at the root
of the React project. Then:
```
cd fixtures/dom
npm install
npm start
```
The `start` command runs a script that copies over the local build of react into
the public d... | Update readme for DOM Fixtures | Update readme for DOM Fixtures
| Markdown | mit | TheBlasfem/react,flarnie/react,roth1002/react,jorrit/react,jorrit/react,mhhegazy/react,kaushik94/react,silvestrijonathan/react,jzmq/react,Simek/react,apaatsio/react,ericyang321/react,roth1002/react,kaushik94/react,apaatsio/react,aickin/react,chenglou/react,jordanpapaleo/react,claudiopro/react,jdlehman/react,TheBlasfem/... | markdown | ## Code Before:
This folder exists for **React contributors** only.
If you use React you don't need to worry about it.
These fixtures verify that the built React distributions are usable in different environments.
**They are not running automatically.** (At least not yet, feel free to contribute to automate them.... |
632d52013050bf78c70c64401a00f2ab3133e307 | src/shared/actions/ItemActions.js | src/shared/actions/ItemActions.js | export const ADD_ITEM = 'ADD_ITEM';
export const COMPLETE_ITEM = 'COMPLETE_ITEM';
export function addItem(text) {
return {
type: ADD_ITEM,
value: text
};
}
export function completeItem(index) {
return {
type: COMPLETE_ITEM,
id: index
};
}
//========== async ==============================
expo... | export const ADD_ITEM = 'ADD_ITEM';
export const COMPLETE_ITEM = 'COMPLETE_ITEM';
export function addItem(text) {
return {
type: ADD_ITEM,
value: text
};
}
export function completeItem(index) {
return {
type: COMPLETE_ITEM,
id: index
};
}
//========== async ==============================
expo... | Add basic template for async action creators | Add basic template for async action creators
| JavaScript | apache-2.0 | jsfeb26/gsd | javascript | ## Code Before:
export const ADD_ITEM = 'ADD_ITEM';
export const COMPLETE_ITEM = 'COMPLETE_ITEM';
export function addItem(text) {
return {
type: ADD_ITEM,
value: text
};
}
export function completeItem(index) {
return {
type: COMPLETE_ITEM,
id: index
};
}
//========== async ===================... |
41541eaeef335dbaa12d38c846392dbf3b0c1f2b | .travis.yml | .travis.yml | dist: trusty
group: beta
language: node_js
node_js:
- node
addons:
firefox: '49.0.2'
cache:
directories:
- node_modules
- "$HOME/.cache/bower"
before_install:
- "if [ -d node_modules ] && [ x$(cat node_modules/.last-node-version 2>/dev/null) != x$(node -e 'console.log(process.version)') ]; then npm rebuild && ... | dist: trusty
group: beta
language: node_js
node_js:
- node
addons:
firefox: latest-esr
cache:
directories:
- node_modules
- "$HOME/.cache/bower"
before_install:
- "if [ -d node_modules ] && [ x$(cat node_modules/.last-node-version 2>/dev/null) != x$(node -e 'console.log(process.version)') ]; then npm rebuild &... | Use the latest Firefox ESR for testing | Use the latest Firefox ESR for testing
| YAML | apache-2.0 | Collaborne/carbon-i18n-behavior | yaml | ## Code Before:
dist: trusty
group: beta
language: node_js
node_js:
- node
addons:
firefox: '49.0.2'
cache:
directories:
- node_modules
- "$HOME/.cache/bower"
before_install:
- "if [ -d node_modules ] && [ x$(cat node_modules/.last-node-version 2>/dev/null) != x$(node -e 'console.log(process.version)') ]; then... |
017e5070573419d533c6a75939513d8ae9f10961 | spec/fixture/phone.rb | spec/fixture/phone.rb |
class Phone
include Neo4j::NodeMixin
end
class Company
include Neo4j::NodeMixin
end
class Person
include Neo4j::NodeMixin
has_one(:home_phone).to(Phone)
property :name
property :city
has_n :friends
has_n(:friend_by).from(:friends)
has_one :address
has_n(:employed_by).from(Company, :employees)
... | class Person
include Neo4j::NodeMixin
end
class Phone
include Neo4j::NodeMixin
end
class Company
include Neo4j::NodeMixin
end
class Person
include Neo4j::NodeMixin
has_one(:home_phone).to(Phone)
property :name
property :city
has_n :friends
has_n(:friend_by).from(:friends)
has_one :address
ha... | Add forward declaration of Person since RSpec might fail otherwise | Add forward declaration of Person since RSpec might fail otherwise
| Ruby | mit | jessmartin/neo4j,mneedham/neo4j-1,garmoshka-mo/neo4j,subvertallchris/neo4j,jmdeldin/neo4j,neo4jrb/neo4j,subvertallchris/neo4j,SilverFox70/neo4j,cheerfulstoic/neo4j,junegunn/neo4j,SilverFox70/neo4j,ivopatty/neo4j,garmoshka-mo/neo4j,jmdeldin/neo4j,jessmartin/neo4j,veetow/neo4j,cheerfulstoic/neo4j,mneedham/neo4j-1,mneedha... | ruby | ## Code Before:
class Phone
include Neo4j::NodeMixin
end
class Company
include Neo4j::NodeMixin
end
class Person
include Neo4j::NodeMixin
has_one(:home_phone).to(Phone)
property :name
property :city
has_n :friends
has_n(:friend_by).from(:friends)
has_one :address
has_n(:employed_by).from(Compa... |
c91b7e4b61cc81af2eef03a815cf4b44e6b930a9 | recipes/initial.rb | recipes/initial.rb |
gitlab = node['gitlab']
# Merge environmental variables
gitlab = Chef::Mixin::DeepMerge.merge(gitlab,gitlab[gitlab['env']])
# 0. Initial Change
directory "/tmp" do
mode 0777
end
# 1. Packages / Dependencies
include_recipe "apt" if platform?("ubuntu", "debian")
include_recipe "yum::epel" if platform?("centos")
in... |
gitlab = node['gitlab']
# Merge environmental variables
gitlab = Chef::Mixin::DeepMerge.merge(gitlab,gitlab[gitlab['env']])
# 0. Initial Change
directory "/tmp" do
mode 0777
end
# Remove ruby 1.8.7 installation
if platform?("ubuntu", "debian")
package 'ruby1.8' do
action :purge
end
end
# 1. Packages / De... | Purge old ruby version before starting. | Purge old ruby version before starting.
| Ruby | mit | maoueh/cookbook-gitlab,dfang/deploy_gitlab,maoueh/cookbook-gitlab,maoueh/cookbook-gitlab | ruby | ## Code Before:
gitlab = node['gitlab']
# Merge environmental variables
gitlab = Chef::Mixin::DeepMerge.merge(gitlab,gitlab[gitlab['env']])
# 0. Initial Change
directory "/tmp" do
mode 0777
end
# 1. Packages / Dependencies
include_recipe "apt" if platform?("ubuntu", "debian")
include_recipe "yum::epel" if platfo... |
e5866136d3d7f2e6ef0cbf8cd12d6adb23d6d0fd | src/main.rs | src/main.rs | extern crate ratel;
extern crate iron;
use std::io::Read;
use iron::prelude::*;
use iron::status;
use ratel::error::ParseError;
fn compile(source: String, minify: bool) -> Result<String, ParseError> {
let mut ast = match ratel::parser::parse(source) {
Ok(ast) => ast,
Err(error) => return Err(er... | extern crate ratel;
extern crate iron;
use std::io::Read;
use iron::prelude::*;
use iron::status;
use ratel::error::ParseError;
const DEFAULT_PORT: u16 = 3000;
fn compile(source: String, minify: bool) -> Result<String, ParseError> {
let mut ast = match ratel::parser::parse(source) {
Ok(ast) => ast,
... | Allow for the port to be set by env variable | Allow for the port to be set by env variable
| Rust | mit | ratel-rust/ratel-server | rust | ## Code Before:
extern crate ratel;
extern crate iron;
use std::io::Read;
use iron::prelude::*;
use iron::status;
use ratel::error::ParseError;
fn compile(source: String, minify: bool) -> Result<String, ParseError> {
let mut ast = match ratel::parser::parse(source) {
Ok(ast) => ast,
Err(error) ... |
95d34a49953395548e7973f12bf21ca26c5af9cc | modules/Core/Controller/Js.php | modules/Core/Controller/Js.php | <?php
namespace MyTravel\Core\Controller;
use Patchwork\JSqueeze;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
class Js {
public function viewJsBundle(Request $request) {
$sq = new JSqueeze();
$minifiedJs = array();
/... | <?php
namespace MyTravel\Core\Controller;
use Patchwork\JSqueeze;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use MyTravel\Core\OutputInterface;
class Js implements OutputInterface {
public function viewJsBundle(Request $reques... | Make use of outputcontroller for caching js resonse | Make use of outputcontroller for caching js resonse
| PHP | mit | fennore/MyTravel,fennore/MyTravel,fennore/MyTravel,fennore/MyTravel | php | ## Code Before:
<?php
namespace MyTravel\Core\Controller;
use Patchwork\JSqueeze;
use Symfony\Component\Finder\Finder;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
class Js {
public function viewJsBundle(Request $request) {
$sq = new JSqueeze();
$minifiedJs ... |
6905de3def0696220adeccc108e98ebd357fdf03 | app/models/user.rb | app/models/user.rb | class User < ActiveRecord::Base
mount_uploader :photo, PhotoUploader
devise :rememberable, :trackable, :omniauthable, :omniauth_providers => [:github]
scope :instructors, ->{ where(instructor: true) }
scope :students, ->{ where("instructor = false or instructor is null") }
has_many :enrollments
has_many :... | class User < ActiveRecord::Base
mount_uploader :photo, PhotoUploader
devise :rememberable, :trackable, :omniauthable, :omniauth_providers => [:github]
scope :instructors, ->{ where(instructor: true) }
scope :students, ->{ where("instructor = false or instructor is null") }
has_many :enrollments
has_many :... | Remove trailing ? from Github avatar URL in the hopes that this fixes the seg faults on Heroku. | Remove trailing ? from Github avatar URL in the hopes that this fixes the seg
faults on Heroku.
| Ruby | mit | elizabrock/coursewareofthefuture,elizabrock/coursewareofthefuture,elizabrock/coursewareofthefuture | ruby | ## Code Before:
class User < ActiveRecord::Base
mount_uploader :photo, PhotoUploader
devise :rememberable, :trackable, :omniauthable, :omniauth_providers => [:github]
scope :instructors, ->{ where(instructor: true) }
scope :students, ->{ where("instructor = false or instructor is null") }
has_many :enrollme... |
d19936e6c2f4cf4b11b1f4b4ae39d88e5f13df74 | roles/other_dependencies/tasks/install_debian_packages.yml | roles/other_dependencies/tasks/install_debian_packages.yml | - name: Install debian packages for a comfortable environment.
apt:
pkg={{ item }}
state=latest
update_cache=yes
cache_valid_time=86400
sudo: yes
with_items:
- cython
- emacs23
- evince
- firefox
- gmsh
- gnuplot
- grace
- git
- libsundials-serial-dev
- merc... | - name: Install debian packages for a comfortable environment.
apt:
pkg={{ item }}
state=latest
update_cache=yes
cache_valid_time=86400
sudo: yes
with_items:
- cython
- emacs23
- evince
- firefox
- gmsh
- gnuplot
- grace
- git
- libsundials-serial-dev
- libz... | Install libzmq as a dependency so that pyzmq runs on containers. | FEAT-002: Install libzmq as a dependency so that pyzmq runs on containers.
| YAML | bsd-3-clause | fangohr/virtualmicromagnetics,computationalmodelling/virtualmicromagnetics,computationalmodelling/virtualmicromagnetics,fangohr/virtualmicromagnetics | yaml | ## Code Before:
- name: Install debian packages for a comfortable environment.
apt:
pkg={{ item }}
state=latest
update_cache=yes
cache_valid_time=86400
sudo: yes
with_items:
- cython
- emacs23
- evince
- firefox
- gmsh
- gnuplot
- grace
- git
- libsundials-seria... |
244164edfd85a0d88277c2b454bb12ccc8d68a95 | .travis.yml | .travis.yml | language: go
go:
- "1.9"
- "1.10.x"
- "tip"
env:
- "PATH=/home/travis/gopath/bin:$PATH"
install:
- go get -v -t .
script:
- scripts/check-fmt.sh
- go get -u golang.org/x/lint/golint
- golint ./... | grep -v vendor/
- make
- scripts/check-code-generation-ran.sh
# PR's don't have access to Travi... | language: go
go:
- "1.9"
- "1.10.x"
- "1.11.x"
- "tip"
env:
- "PATH=/home/travis/gopath/bin:$PATH"
install:
- go get -v -t .
script:
- scripts/check-fmt.sh
- go get -u golang.org/x/lint/golint
- golint ./... | grep -v vendor/
- make
- scripts/check-code-generation-ran.sh
# PR's don't have ac... | Add 1.11 to Travis build | Add 1.11 to Travis build
| YAML | bsd-3-clause | zorkian/go-datadog-api,zorkian/go-datadog-api | yaml | ## Code Before:
language: go
go:
- "1.9"
- "1.10.x"
- "tip"
env:
- "PATH=/home/travis/gopath/bin:$PATH"
install:
- go get -v -t .
script:
- scripts/check-fmt.sh
- go get -u golang.org/x/lint/golint
- golint ./... | grep -v vendor/
- make
- scripts/check-code-generation-ran.sh
# PR's don't have... |
c8de21c9a250922a26741e98d79df683ccdcaa65 | www/src/app/pages/admin/organizations/list/organizations.page.controller.js | www/src/app/pages/admin/organizations/list/organizations.page.controller.js | 'use strict';
import _ from 'lodash/core';
export default class OrganizationsPageController {
constructor($log, OrganizationService) {
'ngInject';
this.$log = $log;
this.OrganizationService = OrganizationService;
}
$onInit() {
this.state = {
showForm: false,
formData: {}
};
}... | 'use strict';
import _ from 'lodash/core';
export default class OrganizationsPageController {
constructor($log, OrganizationService, NotificationService, ModalService) {
'ngInject';
this.$log = $log;
this.OrganizationService = OrganizationService;
this.NotificationService = NotificationService;
... | Add confirmation dialog when enabling/disabling an organization | Add confirmation dialog when enabling/disabling an organization
| JavaScript | agpl-3.0 | CERT-BDF/Cortex,CERT-BDF/Cortex,CERT-BDF/Cortex,CERT-BDF/Cortex | javascript | ## Code Before:
'use strict';
import _ from 'lodash/core';
export default class OrganizationsPageController {
constructor($log, OrganizationService) {
'ngInject';
this.$log = $log;
this.OrganizationService = OrganizationService;
}
$onInit() {
this.state = {
showForm: false,
formDat... |
3883e83c349f460f6f6c7a746f062a746737f117 | go/src/socialapi/workers/api/modules/notificationsettings/handlers.go | go/src/socialapi/workers/api/modules/notificationsettings/handlers.go | package notificationsettings
import (
"socialapi/workers/common/handler"
"socialapi/workers/common/mux"
)
func AddHandlers(m *mux.Mux) {
m.AddHandler(
handler.Request{
Handler: Create,
Name: "notification-settings-create",
Type: handler.PostRequest,
Endpoint: "/channel/{id}/notificationsett... | package notificationsettings
import (
"socialapi/workers/common/handler"
"socialapi/workers/common/mux"
)
func AddHandlers(m *mux.Mux) {
m.AddHandler(
handler.Request{
Handler: Create,
Name: "notification-settings-create",
Type: handler.PostRequest,
Endpoint: "/channel/{id}/notificationsett... | Delete endpoint is added for notification setting | social/handler: Delete endpoint is added for notification setting
| Go | agpl-3.0 | koding/koding,rjeczalik/koding,sinan/koding,acbodine/koding,kwagdy/koding-1,gokmen/koding,koding/koding,rjeczalik/koding,andrewjcasal/koding,szkl/koding,alex-ionochkin/koding,mertaytore/koding,usirin/koding,andrewjcasal/koding,cihangir/koding,mertaytore/koding,usirin/koding,mertaytore/koding,jack89129/koding,cihangir/k... | go | ## Code Before:
package notificationsettings
import (
"socialapi/workers/common/handler"
"socialapi/workers/common/mux"
)
func AddHandlers(m *mux.Mux) {
m.AddHandler(
handler.Request{
Handler: Create,
Name: "notification-settings-create",
Type: handler.PostRequest,
Endpoint: "/channel/{id}/... |
282b39a62ef9507c54614d04920fb52d6d531df2 | plugin.php | plugin.php | <?php
/*
Plugin Name: Allow Forward Slashes in Short URLs
Plugin URI: http://williambargent.co.uk
Description: Allow Forward Slashes in Short URLs
Version: 1.0
Author: <a href="http://williambargent.co.uk">William Bargent</a>
*/
if( !defined( 'YOURLS_ABSPATH' ) ) die();
yourls_add_filter( 'get_shorturl_charset', '... | <?php
/*
Plugin Name: Allow Forward Slashes in Short URLs
Plugin URI: http://williambargent.co.uk
Description: Allow Forward Slashes in Short URLs
Version: 1.0
Author: William Bargent
Author URI: http://williambargent.co.uk
*/
if( !defined( 'YOURLS_ABSPATH' ) ) die();
yourls_add_filter( 'get_shorturl_charset', 'sl... | Add Author URI instead HTML | Add Author URI instead HTML
HTML code in Plugin info block, breaks the markup. | PHP | mit | williambargent/YOURLS-Forward-Slash-In-Urls | php | ## Code Before:
<?php
/*
Plugin Name: Allow Forward Slashes in Short URLs
Plugin URI: http://williambargent.co.uk
Description: Allow Forward Slashes in Short URLs
Version: 1.0
Author: <a href="http://williambargent.co.uk">William Bargent</a>
*/
if( !defined( 'YOURLS_ABSPATH' ) ) die();
yourls_add_filter( 'get_shor... |
6745560a4fc0b7a9b897614b0998306d1b48c4c3 | site/config.toml | site/config.toml | baseURL = "http://alessiorapini.me/"
languageCode = "en-us"
title = "Alessio Rapini - Full Stack Designer"
copyright = "2017 Alessio Rapini"
[Author]
name = "Alessio Rapini"
role = "Full Stack Designer"
mail = "hello@alessiorapini.me"
github = "rub"
[params]
description = "Alessio Rapini - Full Stack Design... | baseURL = "http://alessiorapini.me/"
languageCode = "en-us"
title = "Alessio Rapini - UX Engineer"
copyright = "2017 Alessio Rapini"
[Author]
name = "Alessio Rapini"
role = "UX Engineer"
mail = "hello@alessiorapini.me"
github = "rub"
[params]
description = "Alessio Rapini - Full Stack Designer"
| Update website title and role | Update website title and role
| TOML | bsd-2-clause | rub/alessiorapini.me,rub/alessiorapini.me | toml | ## Code Before:
baseURL = "http://alessiorapini.me/"
languageCode = "en-us"
title = "Alessio Rapini - Full Stack Designer"
copyright = "2017 Alessio Rapini"
[Author]
name = "Alessio Rapini"
role = "Full Stack Designer"
mail = "hello@alessiorapini.me"
github = "rub"
[params]
description = "Alessio Rapini - F... |
eba5b3024946de3dd1816cbc7bd8f647f087cb1d | README.md | README.md | beume
=====
High performance, scalable and high available, image resize service.
Motivation
---------- | beume
=====
High performance, scalable and high available image resize service.
Motivation
----------
I've worked in a fair ammount of projects and at some point a service of this kind is needed. Looks so easy that usually is re-done everytime.
Another commont point in those projects is that resizing becomes a can of... | Put it in the correct place | Put it in the correct place | Markdown | apache-2.0 | framegrace/beume | markdown | ## Code Before:
beume
=====
High performance, scalable and high available, image resize service.
Motivation
----------
## Instruction:
Put it in the correct place
## Code After:
beume
=====
High performance, scalable and high available image resize service.
Motivation
----------
I've worked in a fair ammount of pro... |
33a5568b4f56201f380084cc661d19935a7b1ea7 | lib/light-service/context_key_verifier.rb | lib/light-service/context_key_verifier.rb | module LightService
class ExpectedKeysNotInContextError < StandardError; end
class PromisedKeysNotInContextError < StandardError; end
class ContextKeyVerifier
class << self
def verify_expected_keys_are_in_context(context, action)
verify_keys_are_in_context(context, action.expected_keys) do |not... | module LightService
class ExpectedKeysNotInContextError < StandardError; end
class PromisedKeysNotInContextError < StandardError; end
class ContextKeyVerifier
class << self
def verify_expected_keys_are_in_context(context, action)
verify_keys_are_in_context(context, action.expected_keys) do |not... | Remove to_s since interpolation already does it implicitly | Remove to_s since interpolation already does it implicitly
| Ruby | mit | jpmoral/light-service,padi/light-service,adomokos/light-service,ramontayag/light-service,adomokos/light-service | ruby | ## Code Before:
module LightService
class ExpectedKeysNotInContextError < StandardError; end
class PromisedKeysNotInContextError < StandardError; end
class ContextKeyVerifier
class << self
def verify_expected_keys_are_in_context(context, action)
verify_keys_are_in_context(context, action.expect... |
a24d6a25cb7ee5101e8131a9719744f79b23c11b | examples/quotes/quotes.py | examples/quotes/quotes.py | import sys
print(sys.version_info)
import random
import time
import networkzero as nw0
quotes = [
"Humpty Dumpty sat on a wall",
"Hickory Dickory Dock",
"Baa Baa Black Sheep",
"Old King Cole was a merry old sould",
]
def main(address_pattern=None):
my_name = input("Name: ")
my_address = nw0.a... | import sys
print(sys.version_info)
import random
import time
import networkzero as nw0
quotes = [
"Humpty Dumpty sat on a wall",
"Hickory Dickory Dock",
"Baa Baa Black Sheep",
"Old King Cole was a merry old sould",
]
def main(address_pattern=None):
my_name = input("Name: ")
my_address = nw0.a... | Send notification to the correct address | Send notification to the correct address
| Python | mit | tjguk/networkzero,tjguk/networkzero,tjguk/networkzero | python | ## Code Before:
import sys
print(sys.version_info)
import random
import time
import networkzero as nw0
quotes = [
"Humpty Dumpty sat on a wall",
"Hickory Dickory Dock",
"Baa Baa Black Sheep",
"Old King Cole was a merry old sould",
]
def main(address_pattern=None):
my_name = input("Name: ")
my... |
27b0a5b95e188a5bd77ae662bbb43e06dfde4749 | slack/views.py | slack/views.py | from flask import Flask, request
import requests
from urllib import unquote
app = Flask(__name__)
@app.route("/")
def meme():
domain = request.args["team_domain"]
slackbot = request.args["slackbot"]
text = request.args["text"]
channel = request.args["channel_name"]
text = text[:-1] if text[-1] ==... | from flask import Flask, request
import requests
from urllib import unquote
app = Flask(__name__)
@app.route("/")
def meme():
domain = request.args["team_domain"]
slackbot = request.args["slackbot"]
text = request.args["text"]
channel = request.args["channel_id"]
text = unquote(text)
text = t... | Use the id of the channel and unquote all of the text first. | Use the id of the channel and unquote all of the text first.
| Python | mit | DuaneGarber/slack-meme,joeynebula/slack-meme,tezzutezzu/slack-meme,nicolewhite/slack-meme | python | ## Code Before:
from flask import Flask, request
import requests
from urllib import unquote
app = Flask(__name__)
@app.route("/")
def meme():
domain = request.args["team_domain"]
slackbot = request.args["slackbot"]
text = request.args["text"]
channel = request.args["channel_name"]
text = text[:-1... |
8173b340334a3c27e91f22148a5fca6d8827f3f6 | app/src/main/java/co/jasonwyatt/asynclistutil_example/SQLiteItemSource.kt | app/src/main/java/co/jasonwyatt/asynclistutil_example/SQLiteItemSource.kt | package co.jasonwyatt.asynclistutil_example
import android.annotation.SuppressLint
import android.database.Cursor
import android.database.sqlite.SQLiteDatabase
class SQLiteItemSource(val database: SQLiteDatabase) : ItemSource {
private var _cursor: Cursor? = null
@SuppressLint("Recycle")
private fun curso... | package co.jasonwyatt.asynclistutil_example
import android.annotation.SuppressLint
import android.database.Cursor
import android.database.sqlite.SQLiteDatabase
class SQLiteItemSource(val database: SQLiteDatabase) : ItemSource {
private var _cursor: Cursor? = null
private val cursor: Cursor
@SuppressLi... | Refactor a bit to use a property rather than a method for cursor. | Refactor a bit to use a property rather than a method for cursor.
| Kotlin | unlicense | jasonwyatt/AsyncListUtil-Example,jasonwyatt/AsyncListUtil-Example | kotlin | ## Code Before:
package co.jasonwyatt.asynclistutil_example
import android.annotation.SuppressLint
import android.database.Cursor
import android.database.sqlite.SQLiteDatabase
class SQLiteItemSource(val database: SQLiteDatabase) : ItemSource {
private var _cursor: Cursor? = null
@SuppressLint("Recycle")
p... |
b55426856c43f07e14756f40da88dfe6c86bb8fd | lib/ledgerdary/api/accounts.rb | lib/ledgerdary/api/accounts.rb | require 'json'
require 'grape'
require 'ledgerdary/statements/store'
module Ledgerdary
module API
class Accounts < Grape::API
format :json
content_type :csv, 'text/csv'
formatter :csv, ->(object, _) { object }
# formatter :csv, lambda { |object, _| object }
helpers do
de... | require 'json'
require 'grape'
require 'ledgerdary/statements/store'
module Ledgerdary
module API
class Accounts < Grape::API
format :json
content_type :csv, 'text/csv'
formatter :csv, ->(object, _) { object }
helpers do
def self_href
"#{settings.stack.first[:mount_p... | Remove commented code introduced in 843dd6e (whoops) | Remove commented code introduced in 843dd6e (whoops) | Ruby | mit | camhine/ledgerdary,camhine/ledgerdary,camhine/ledgerdary | ruby | ## Code Before:
require 'json'
require 'grape'
require 'ledgerdary/statements/store'
module Ledgerdary
module API
class Accounts < Grape::API
format :json
content_type :csv, 'text/csv'
formatter :csv, ->(object, _) { object }
# formatter :csv, lambda { |object, _| object }
helpe... |
01c3338b6be2f638a9cf5e0dd07e9c257c660036 | scripts/setup_localdb.sh | scripts/setup_localdb.sh | eval "$(./localdb_env_vars.sh)"
source $PORTAL_SOURCE_DIR/env/custom.sh
cd $TEST_HOME/local/runtime-config
eval "$(./setup_environment.sh)"
cd $PORTAL_SOURCE_DIR
$TEST_HOME/local/runtime-config/setup_local_context.sh -p -d -e # remove flags to exclude specific stages if desired (see below)
cd $PORTAL_SOURCE_DIR
#Du... | export BACKEND=cbioportal:master
export PORTAL_SOURCE_DIR=$(pwd) # change path if needed
export DB_DATA_DIR=/tmp/mysql # change path if needed
export TEST_HOME="$PORTAL_SOURCE_DIR/end-to-end-test"
export CHROMEDRIVER_VERSION=83.0.4103.39
export CBIOPORTAL_URL='http://localhost:8081'
source $PORTAL_SOURCE_DIR/env/custom... | Edit localdb e2e test setup | Edit localdb e2e test setup
Former-commit-id: cc5cf09379f8440d0cf935acbcd6f2aad92984a4 | Shell | agpl-3.0 | alisman/cbioportal-frontend,cBioPortal/cbioportal-frontend,alisman/cbioportal-frontend,alisman/cbioportal-frontend,cBioPortal/cbioportal-frontend,cBioPortal/cbioportal-frontend,alisman/cbioportal-frontend,cBioPortal/cbioportal-frontend,cBioPortal/cbioportal-frontend,cBioPortal/cbioportal-frontend,alisman/cbioportal-fro... | shell | ## Code Before:
eval "$(./localdb_env_vars.sh)"
source $PORTAL_SOURCE_DIR/env/custom.sh
cd $TEST_HOME/local/runtime-config
eval "$(./setup_environment.sh)"
cd $PORTAL_SOURCE_DIR
$TEST_HOME/local/runtime-config/setup_local_context.sh -p -d -e # remove flags to exclude specific stages if desired (see below)
cd $PORTAL_S... |
cf49e55d26f0a33f3e9be80b21a8234e57bca59b | src/com/cedricziel/idea/typo3/codeInspection/ExtbasePropertyInjectionInspection.java | src/com/cedricziel/idea/typo3/codeInspection/ExtbasePropertyInjectionInspection.java | package com.cedricziel.idea.typo3.codeInspection;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.psi.PsiElementVisitor;
import com.jetbrains.php.lang.documentation.phpdoc.psi.PhpDocType;
import com.jetbrains.php.lang.inspections.PhpInspection;
import com.jetbrains.php.lang.psi.visitors.PhpEleme... | package com.cedricziel.idea.typo3.codeInspection;
import com.intellij.codeInsight.daemon.GroupNames;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.psi.PsiElementVisitor;
import com.jetbrains.php.lang.documentation.phpdoc.psi.tags.PhpDocTag;
import com.jetbrains.php.lang.inspections.PhpInspecti... | Add extbase @inject performance inspection | Add extbase @inject performance inspection
| Java | mit | cedricziel/idea-php-typo3-plugin,cedricziel/idea-php-typo3-plugin,cedricziel/idea-php-typo3-plugin,cedricziel/idea-php-typo3-plugin | java | ## Code Before:
package com.cedricziel.idea.typo3.codeInspection;
import com.intellij.codeInspection.ProblemsHolder;
import com.intellij.psi.PsiElementVisitor;
import com.jetbrains.php.lang.documentation.phpdoc.psi.PhpDocType;
import com.jetbrains.php.lang.inspections.PhpInspection;
import com.jetbrains.php.lang.psi.v... |
9c505d73b836eada404880d3d32d1d97d9674d0b | _output.yml | _output.yml | bookdown::pdf_book:
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: natbib
keep_tex: yes
bookdown::epub_book: default
bookdown::gitbook:
css: style.css
config:
toc:
before: |
<li><a href="./">A Minimal Book Example</a></li>
after: |
<li><a href="... | bookdown::gitbook:
css: style.css
config:
toc:
before: |
<li><a href="./">A Minimal Book Example</a></li>
after: |
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
edit: https://github.com/rstudio/bookdown-demo/edit/master/%s
| Remove output other than gitbook. | Remove output other than gitbook.
| YAML | cc0-1.0 | odealab/coralbook,odealab/coralbook | yaml | ## Code Before:
bookdown::pdf_book:
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: natbib
keep_tex: yes
bookdown::epub_book: default
bookdown::gitbook:
css: style.css
config:
toc:
before: |
<li><a href="./">A Minimal Book Example</a></li>
after: |
... |
df173a307488b90c4c1486fb2a64029032c18d2f | webapps/callimachus/scripts/add-resource.js | webapps/callimachus/scripts/add-resource.js | // add-resource.js
/*
Copyright (c) 2011 Talis Inc, Some Rights Reserved
Licensed under the Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0
*/
(function($){
calli.addTemplate = calli.addResource = function(event) {
event = calli.fixEvent(event);
var node = event.target;
var rel = $(no... | // add-resource.js
/*
Copyright (c) 2011 Talis Inc, Some Rights Reserved
Licensed under the Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0
*/
(function($){
calli.addTemplate = calli.addResource = function(event, container) {
event = calli.fixEvent(event);
var node = container ? $(cont... | Add second argument to addResource for container | Add second argument to addResource for container
| JavaScript | apache-2.0 | edwardsph/callimachus,Thellmann/callimachus,Thellmann/callimachus,3-Round-Stones/callimachus,edwardsph/callimachus,edwardsph/callimachus,Thellmann/callimachus,jimmccusker/callimachus,jimmccusker/callimachus,edwardsph/callimachus,jimmccusker/callimachus,3-Round-Stones/callimachus,Thellmann/callimachus,jimmccusker/callim... | javascript | ## Code Before:
// add-resource.js
/*
Copyright (c) 2011 Talis Inc, Some Rights Reserved
Licensed under the Apache License, Version 2.0, http://www.apache.org/licenses/LICENSE-2.0
*/
(function($){
calli.addTemplate = calli.addResource = function(event) {
event = calli.fixEvent(event);
var node = event.target;... |
fb5364bc1659c50f280a6a510f5a97da73cd7fb8 | plugins/googlereaderkeys/init.php | plugins/googlereaderkeys/init.php | <?php
class GoogleReaderKeys extends Plugin {
private $link;
private $host;
function about() {
return array(1.0,
"Keyboard hotkeys emulate Google Reader",
"markwaters");
}
function init($host) {
$this->link = $host->get_link();
$this->host = $host;
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
... | <?php
class GoogleReaderKeys extends Plugin {
private $link;
private $host;
function about() {
return array(1.0,
"Keyboard hotkeys emulate Google Reader",
"markwaters");
}
function init($host) {
$this->link = $host->get_link();
$this->host = $host;
$host->add_hook($host::HOOK_HOTKEY_MAP, $this);
... | Modify googlereaderkeys plugin with mark unread toggle. | Modify googlereaderkeys plugin with mark unread toggle.
| PHP | agpl-3.0 | shakaran/Big-Big-RSS,shakaran/Big-Big-RSS,shakaran/Big-Big-RSS,shakaran/Big-Big-RSS,shakaran/Big-Big-RSS | php | ## Code Before:
<?php
class GoogleReaderKeys extends Plugin {
private $link;
private $host;
function about() {
return array(1.0,
"Keyboard hotkeys emulate Google Reader",
"markwaters");
}
function init($host) {
$this->link = $host->get_link();
$this->host = $host;
$host->add_hook($host::HOOK_HOTK... |
862bf1128178304c50f07838ed18a03bc707da9b | app/views/things/_form.html.haml | app/views/things/_form.html.haml | - thing ||= @thing
= form_for thing do |f|
= f.text_field :name, placeholder: 'Name'
= f.number_field :quantity, placeholder: 'Quantity'
= f.submit | - thing ||= @thing
= bootstrap_form_for thing do |f|
= f.alert_message 'Please fix the issues below.'
= f.text_field :name, placeholder: 'Name', required: true
= f.number_field :quantity, placeholder: 'Quantity', required: true
= f.submit | Switch view to bootstrap form gem | Switch view to bootstrap form gem
| Haml | mit | codeintheschools/check_me_out,codeintheschools/check_me_out,codeintheschools/check_me_out | haml | ## Code Before:
- thing ||= @thing
= form_for thing do |f|
= f.text_field :name, placeholder: 'Name'
= f.number_field :quantity, placeholder: 'Quantity'
= f.submit
## Instruction:
Switch view to bootstrap form gem
## Code After:
- thing ||= @thing
= bootstrap_form_for thing do |f|
= f.alert_message 'Please f... |
2235c82f0e2e962cf7f636d697af40af99b52769 | app/assets/javascripts/header-footer-only.js | app/assets/javascripts/header-footer-only.js | //= require libs/jquery/plugins/jquery.base64
//= require analytics
//= require user-satisfaction-survey
//= require core
//= require report-a-problem
//= require vendor/polyfills/bind
//= require govuk/selection-buttons
//= require govuk-component/govspeak-enhance-youtube-video-links
//= require govuk-component/option... | //= require libs/jquery/plugins/jquery.base64
//= require vendor/polyfills/bind
//= require analytics
//= require user-satisfaction-survey
//= require core
//= require report-a-problem
//= require govuk/selection-buttons
//= require govuk-component/govspeak-enhance-youtube-video-links
//= require govuk-component/option... | Move `bind` polyfill above `analytics` | Move `bind` polyfill above `analytics`
The `analytics` code uses the `bind` polyfill so the polyfill must
come above it.
| JavaScript | mit | tadast/static,robinwhittleton/static,robinwhittleton/static,tadast/static,robinwhittleton/static,tadast/static,alphagov/static,kalleth/static,tadast/static,alphagov/static,kalleth/static,kalleth/static,robinwhittleton/static,kalleth/static,alphagov/static | javascript | ## Code Before:
//= require libs/jquery/plugins/jquery.base64
//= require analytics
//= require user-satisfaction-survey
//= require core
//= require report-a-problem
//= require vendor/polyfills/bind
//= require govuk/selection-buttons
//= require govuk-component/govspeak-enhance-youtube-video-links
//= require govuk-... |
90e58ab455e1541074a832d987509aec3826ce85 | hieradata/class/development.yaml | hieradata/class/development.yaml | ---
govuk_elasticsearch::version: "0.20.6-ppa1~%{::lsbdistcodename}1"
| ---
govuk_elasticsearch::version: '0.90.12'
| Upgrade dev environments elasticsearch version | Upgrade dev environments elasticsearch version
This makes them match production; this version will soon be needed to
run rummager.
| YAML | mit | alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet | yaml | ## Code Before:
---
govuk_elasticsearch::version: "0.20.6-ppa1~%{::lsbdistcodename}1"
## Instruction:
Upgrade dev environments elasticsearch version
This makes them match production; this version will soon be needed to
run rummager.
## Code After:
---
govuk_elasticsearch::version: '0.90.12'
|
d1920de909e6d363074420bc47af4f26a8b7d15f | README.md | README.md |
This is a Angular scaffolding guide using latest Angular CLI with recommended options. My aim is to minimize Googling for setting up frequently desired features.
## Pre-requisite
+ Latest stable Node.js, [n](https://github.com/tj/n) is the recommended Node.js version manager
+ Install [Angular CLI](https://cli.angul... |
This is an Angular scaffolding guide using latest Angular CLI with recommended options. My aim is to minimize Googling for setting up frequently desired features.
## Pre-requisite
+ Latest stable Node.js, [n](https://github.com/tj/n) is the recommended Node.js version manager
+ Install [Angular CLI](https://cli.angu... | Fix and improve the setup section | Fix and improve the setup section
| Markdown | mit | FreshConsulting/angular-cheatsheet | markdown | ## Code Before:
This is a Angular scaffolding guide using latest Angular CLI with recommended options. My aim is to minimize Googling for setting up frequently desired features.
## Pre-requisite
+ Latest stable Node.js, [n](https://github.com/tj/n) is the recommended Node.js version manager
+ Install [Angular CLI](h... |
cc43b84b35f1984a4767fc927ed13f8cb717bed4 | _scripts/deploy-doc.sh | _scripts/deploy-doc.sh | set -e # exit with nonzero exit code if anything fails
# go to the module directory and create a *new* Git repo
cd "$GH_REPO"
git init
#git remote add origin "https://github.com/$GH_USER/$GH_REPO"
#git checkout --orphan module
# inside this git repo we'll pretend to be a new user
git config user.name "pentaho"
git c... | set -e # exit with nonzero exit code if anything fails
# go to the module directory and create a *new* Git repo
cd doc
git init
#git remote add origin "https://github.com/$GH_USER/$GH_REPO"
#git checkout --orphan module
# inside this git repo we'll pretend to be a new user
git config user.name "pentaho"
git config u... | Update commit and push info | Update commit and push info
| Shell | mpl-2.0 | gundisalwa/pentaho-angular-toolkit,gundisalwa/pentaho-angular-toolkit,francisco-guilherme/pentaho-angular-toolkit,francisco-guilherme/pentaho-angular-toolkit | shell | ## Code Before:
set -e # exit with nonzero exit code if anything fails
# go to the module directory and create a *new* Git repo
cd "$GH_REPO"
git init
#git remote add origin "https://github.com/$GH_USER/$GH_REPO"
#git checkout --orphan module
# inside this git repo we'll pretend to be a new user
git config user.name... |
c34dad8cf24a2c723c9ffde0700b17791aba92a2 | config/software/loom-ui.rb | config/software/loom-ui.rb | name "loom-ui"
default_version "develop"
dependency "nodejs"
source :git => "git://github.com/continuuity/loom.git"
relative_path 'ui'
build do
command "mkdir -p #{install_dir}/ui/bin"
command "cp -fpPR bin/loom-ui.sh #{install_dir}/ui/bin"
command "mkdir -p #{install_dir}/ui/etc/logrotate.d"
command "cp -f ... | name "loom-ui"
default_version "develop"
dependency "nodejs"
source :git => "git://github.com/continuuity/loom.git"
relative_path 'ui'
build do
command "mkdir -p #{install_dir}/ui/bin"
command "sed -e 's:ui/embedded/bin:embedded/bin:g' bin/loom-ui.sh > #{install_dir}/ui/bin/loom-ui.sh"
command "mkdir -p #{inst... | Update UI build to fix path to node | Update UI build to fix path to node
| Ruby | apache-2.0 | cdapio/omnibus-coopr,caskdata/omnibus-coopr,caskdata/omnibus-coopr,caskdata/omnibus-coopr,cdapio/omnibus-coopr,cdapio/omnibus-coopr | ruby | ## Code Before:
name "loom-ui"
default_version "develop"
dependency "nodejs"
source :git => "git://github.com/continuuity/loom.git"
relative_path 'ui'
build do
command "mkdir -p #{install_dir}/ui/bin"
command "cp -fpPR bin/loom-ui.sh #{install_dir}/ui/bin"
command "mkdir -p #{install_dir}/ui/etc/logrotate.d"
... |
0177e2c9f2f96e9b9d2cb1125ab9c8e2a08df4a2 | css/custom-radio-checkbox.css | css/custom-radio-checkbox.css | /* Custom radio-checkbox */
.radio, .checkbox {
padding: 0 5px 0 0;
background: url(../images/radio-checkbox.png) no-repeat;
display: block;
clear: left;
float: left;
position:relative;
top:3px
}
/* radio */
.radio {background-position:0 0;height:13px;width:13px}
.radio-checked{background-position:0 -13px}
/* ch... | /* REQUIRED CSS */
/* Custom radio-checkbox */
.radio, .checkbox {
background: url(../images/radio-checkbox.png) no-repeat;
padding: 0 5px 0 0;
top:3px;
/* don't need to modify this line */float:left;clear:left;position:relative;
}
/* radio */
.radio {background-position:0 0;height:13px;width:13px}
.radio-checked{... | Reorganize and comment code. Also remove of display:block (float already makes the element display as block) | Reorganize and comment code. Also remove of display:block (float already makes the element display as block)
| CSS | mit | dciccale/Custom-radio-checkbox | css | ## Code Before:
/* Custom radio-checkbox */
.radio, .checkbox {
padding: 0 5px 0 0;
background: url(../images/radio-checkbox.png) no-repeat;
display: block;
clear: left;
float: left;
position:relative;
top:3px
}
/* radio */
.radio {background-position:0 0;height:13px;width:13px}
.radio-checked{background-positio... |
6473d9e52419970bdccc653e3694bcb96f6e09a6 | Handler/OurStatic.hs | Handler/OurStatic.hs | module Handler.OurStatic
( getOurStaticR
)
where
import Import
import Data.Time
import Data.List
import qualified Data.Text as DT
import System.Locale (defaultTimeLocale)
import System.IO.Unsafe (unsafePerformIO)
import System.IO (readFile)
import Text.Blaze.Html (preEscapedToHtml)
import Data.ByteString.C... | module Handler.OurStatic
( getOurStaticR
)
where
import Import
import Data.Time
import Data.List
import qualified Data.Text as DT
import System.IO.Unsafe (unsafePerformIO)
import System.IO (readFile)
import Text.Blaze.Html (preEscapedToHtml)
readStaticFile :: FilePath -> String
readStaticFile filePath = ... | Make good url if url doesn't include file extension | Make good url if url doesn't include file extension
| Haskell | bsd-2-clause | SuetakeY/nomnichi_yesod,nomlab/nomnichi-haskell,okada-takuya/nomnichi-haskell,SuetakeY/nomnichi_yesod,SuetakeY/nomnichi_yesod,nomlab/nomnichi-haskell,okada-takuya/nomnichi-haskell,kobayashi1027/nomnichi-haskell,kobayashi1027/nomnichi-haskell,nomlab/nomnichi-haskell,okada-takuya/nomnichi-haskell,okada-takuya/nomnichi-ha... | haskell | ## Code Before:
module Handler.OurStatic
( getOurStaticR
)
where
import Import
import Data.Time
import Data.List
import qualified Data.Text as DT
import System.Locale (defaultTimeLocale)
import System.IO.Unsafe (unsafePerformIO)
import System.IO (readFile)
import Text.Blaze.Html (preEscapedToHtml)
import D... |
99efe071f03c46a24d31923c7df69e34c9a4ecbe | src/Oro/Bundle/EmailBundle/Provider/EmailRecipientsProvider.php | src/Oro/Bundle/EmailBundle/Provider/EmailRecipientsProvider.php | <?php
namespace Oro\Bundle\EmailBundle\Provider;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Oro\Bundle\EmailBundle\Event\EmailRecipientsLoadEvent;
class EmailRecipientsProvider
{
/** @var EventDispatcherInterface */
protected $dispatcher;
/**
* @param EventDispatcherInterf... | <?php
namespace Oro\Bundle\EmailBundle\Provider;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Oro\Bundle\EmailBundle\Event\EmailRecipientsLoadEvent;
class EmailRecipientsProvider
{
/** @var EventDispatcherInterface */
protected $dispatcher;
/**
* @param EventDispatcherInterf... | Add autocomplete for to, cc, bcc fields with possibility to type new email address | CRM-3533: Add autocomplete for to, cc, bcc fields with possibility to type new email address
| PHP | mit | ramunasd/platform,northdakota/platform,ramunasd/platform,geoffroycochard/platform,northdakota/platform,trustify/oroplatform,geoffroycochard/platform,hugeval/platform,2ndkauboy/platform,Djamy/platform,northdakota/platform,trustify/oroplatform,orocrm/platform,trustify/oroplatform,geoffroycochard/platform,2ndkauboy/platfo... | php | ## Code Before:
<?php
namespace Oro\Bundle\EmailBundle\Provider;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Oro\Bundle\EmailBundle\Event\EmailRecipientsLoadEvent;
class EmailRecipientsProvider
{
/** @var EventDispatcherInterface */
protected $dispatcher;
/**
* @param Event... |
9161fc7b6836e0ea3e733d4ee58cde47efebc12e | README.md | README.md | Chatter is a peer-to-peer chat program written in Java.
To build Chatter, clone this repo, run `ant jar`, and launch the resulting JAR file located at `build/jar/Chatter.jar`.
| Chatter is a peer-to-peer chat program written in Java.
To run Chatter, clone this repo and run `ant run`. You could also take the easy way out and run the JAR file on the [Downloads](https://github.com/kochman/Chatter/downloads) tab.
| Simplify readme with new Ant 'run' task | Simplify readme with new Ant 'run' task | Markdown | mit | kochman/Chatter | markdown | ## Code Before:
Chatter is a peer-to-peer chat program written in Java.
To build Chatter, clone this repo, run `ant jar`, and launch the resulting JAR file located at `build/jar/Chatter.jar`.
## Instruction:
Simplify readme with new Ant 'run' task
## Code After:
Chatter is a peer-to-peer chat program written in Java.... |
34b38ce7ae39db60970a90a7c88af76dc814c7f3 | README.md | README.md |
Talk given by Trey Hunner on January 1, 2100 at the San Diego JavaScript meetup.
|
Talk given by Trey Hunner on August 12, 2015 at the San Diego Ember meetup.
| Add talk info to readme | Add talk info to readme
| Markdown | mit | treyhunner/ember-babel-talk,treyhunner/ember-babel-talk | markdown | ## Code Before:
Talk given by Trey Hunner on January 1, 2100 at the San Diego JavaScript meetup.
## Instruction:
Add talk info to readme
## Code After:
Talk given by Trey Hunner on August 12, 2015 at the San Diego Ember meetup.
|
321da012f60f31b8e059a3cfa07e2932706d9ae6 | README.md | README.md | toolkit
=======
| toolkit
=======
Pei Qing's toolkit library.
## Dependencies
### AStyle
I use AStyle to format code, which is set up as a pre-build event in Visual Studio projects.
Please make sure `AStyle.exe` is in your `PATH` or disable the event to avoid errors.
### Boost
Change include directory and library directory accord... | Update readme for dependencies: astyle, boost | Update readme for dependencies: astyle, boost
| Markdown | mit | edwardtoday/toolkit,edwardtoday/toolkit | markdown | ## Code Before:
toolkit
=======
## Instruction:
Update readme for dependencies: astyle, boost
## Code After:
toolkit
=======
Pei Qing's toolkit library.
## Dependencies
### AStyle
I use AStyle to format code, which is set up as a pre-build event in Visual Studio projects.
Please make sure `AStyle.exe` is in your... |
aba17f908f13ddf6038a48ce8083f9cc643af01b | tests/integration/find-with-assert-test.js | tests/integration/find-with-assert-test.js | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import { findWithAssert } from 'ember-native-dom-helpers/test-support/helpers';
moduleForComponent('find', 'Integration | Test Helper | findWithAssert', {
integration: true
});
test('with empty query result, findW... | import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import { findWithAssert } from 'ember-native-dom-helpers/test-support/helpers';
moduleForComponent('find', 'Integration | Test Helper | findWithAssert', {
integration: true
});
test('with empty query result, findW... | Add findWithAssert test, acts like find | Add findWithAssert test, acts like find
| JavaScript | mit | cibernox/ember-native-dom-helpers,cibernox/ember-native-dom-helpers | javascript | ## Code Before:
import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';
import { findWithAssert } from 'ember-native-dom-helpers/test-support/helpers';
moduleForComponent('find', 'Integration | Test Helper | findWithAssert', {
integration: true
});
test('with empty que... |
88cfe216c518e1e742f127140e2ea2a81c9508be | package.json | package.json | {
"name": "jQuery.serializeObject",
"version": "2.0.2",
"description": "A jQuery plugin to turn form data into JSON",
"main": "jquery.serializeObject.js",
"directories": {
"test": "test"
},
"scripts": {
"pretest": "git submodule update --init",
"test": "grunt"
},
"repository": {
"type"... | {
"name": "jQuery.serializeObject",
"version": "2.0.2",
"description": "A jQuery plugin to turn form data into JSON",
"main": "jquery.serializeObject.js",
"directories": {
"test": "test"
},
"scripts": {
"pretest": "git submodule update --init --recursive && git submodule foreach --recursive git pu... | Add pretask to build jquery | Add pretask to build jquery
| JSON | mit | hongymagic/jQuery.serializeObject,hongymagic/jQuery.serializeObject | json | ## Code Before:
{
"name": "jQuery.serializeObject",
"version": "2.0.2",
"description": "A jQuery plugin to turn form data into JSON",
"main": "jquery.serializeObject.js",
"directories": {
"test": "test"
},
"scripts": {
"pretest": "git submodule update --init",
"test": "grunt"
},
"repositor... |
80e0c877b7cfea9c67ab23c9e01ac28f2887e137 | test/helper.rb | test/helper.rb | $:.unshift(File.expand_path("../lib", File.dirname(__FILE__)))
puts "!! REMOVE THIS IN LINE: #{__LINE__} of #{__FILE__}"
$:.unshift("/Users/cyx/Labs/shield/lib")
require "shield/contrib"
require "spawn"
require "ohm"
require "rack/test"
require "sinatra/base"
require "haml"
prepare { Ohm.flush }
def setup(&block)
... | $:.unshift(File.expand_path("../lib", File.dirname(__FILE__)))
require "shield"
require "shield/contrib"
require "spawn"
require "ohm"
require "rack/test"
require "sinatra/base"
require "haml"
prepare { Ohm.flush }
def setup(&block)
@_setup = block if block_given?
@_setup
end
class Cutest::Scope
include Rack:... | Remove the hard coded require. | Remove the hard coded require.
| Ruby | mit | cyx/shield-contrib | ruby | ## Code Before:
$:.unshift(File.expand_path("../lib", File.dirname(__FILE__)))
puts "!! REMOVE THIS IN LINE: #{__LINE__} of #{__FILE__}"
$:.unshift("/Users/cyx/Labs/shield/lib")
require "shield/contrib"
require "spawn"
require "ohm"
require "rack/test"
require "sinatra/base"
require "haml"
prepare { Ohm.flush }
def... |
59100c7878d4b75bf3aa2c9c38e2d26057c1f0c2 | lib/allowing/validations_group.rb | lib/allowing/validations_group.rb | require 'allowing/helpers/scope_helpers'
require 'allowing/wrapped_validation_builder'
module Allowing
class ValidationsGroup
attr_reader :attribute, :validations
def initialize(validations = [])
@validations = validations
end
def validate(value, errors, subject)
validations.each do |va... | module Allowing
class ValidationsGroup
attr_reader :validations
def initialize(validations = [])
@validations = validations
end
def validate(value, errors, subject)
validations.each do |validation|
validation.validate(value, errors, subject)
end
end
end
end
| Remove unnecessary reader and requires | Remove unnecessary reader and requires
| Ruby | mit | rhynix/allowing | ruby | ## Code Before:
require 'allowing/helpers/scope_helpers'
require 'allowing/wrapped_validation_builder'
module Allowing
class ValidationsGroup
attr_reader :attribute, :validations
def initialize(validations = [])
@validations = validations
end
def validate(value, errors, subject)
validat... |
39144e5f70d7ea1c4d46db591eb3247640a30b12 | haskell-dev/tasks/main.yml | haskell-dev/tasks/main.yml | ---
- name: Add the unofficial GHC PPA
apt_repository: repo="ppa:hvr/ghc" state=present
- name: Install the basic Haskell packages
apt: name={{ item }} state=latest
with_items:
- alex-{{ alex_version }}
- ghc-{{ ghc_version }}
- happy-{{ happy_version }}
- cabal-install-{{ cabal_install_version }... | ---
- name: Add the unofficial GHC PPA
apt_repository: repo="ppa:hvr/ghc" state=present
- name: Add the FP Complete apt key
apt_key: url=https://s3.amazonaws.com/download.fpcomplete.com/ubuntu/fpco.key state=present
- name: Add the FP Complete repository
apt_repository: repo="deb http://download.fpcomplete.com/... | Add stack to Haskell role. | Add stack to Haskell role.
| YAML | mit | tomku/ansible-roles | yaml | ## Code Before:
---
- name: Add the unofficial GHC PPA
apt_repository: repo="ppa:hvr/ghc" state=present
- name: Install the basic Haskell packages
apt: name={{ item }} state=latest
with_items:
- alex-{{ alex_version }}
- ghc-{{ ghc_version }}
- happy-{{ happy_version }}
- cabal-install-{{ cabal_i... |
04d289de07509dd0f4de5954f3b30f49f01d6f39 | apps/middleware/authenticate.coffee | apps/middleware/authenticate.coffee | Organization = require "../../models/organization"
# Need to support authentication via Organization API key as well
module.exports = (req, res, next) ->
if req.session.org_id
Organization.findById req.session.org_id, (err, org)->
req.org = org
req.session.org_id = org.id
next()
else
res... | Organization = require "../../models/organization"
# Need to support authentication via Organization API key as well
module.exports = (req, res, next) ->
unauthorzed = ->
if req.xhr
res.send 403
else
res.redirect('/login')
if api_key = req.query.api_key
Organization.findOne {api_key: api_... | Add Authentication via API key | Add Authentication via API key
| CoffeeScript | mit | EverFi/Sash,EverFi/Sash,EverFi/Sash | coffeescript | ## Code Before:
Organization = require "../../models/organization"
# Need to support authentication via Organization API key as well
module.exports = (req, res, next) ->
if req.session.org_id
Organization.findById req.session.org_id, (err, org)->
req.org = org
req.session.org_id = org.id
next(... |
aef22e1a112b78517280893022db07a70f98c9b1 | package.json | package.json | {
"name": "derrick-server",
"version": "0.1.0",
"description": "Server utility for Derrick's Docker operations.",
"main": "derrick-server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"bin": {
"derrick-server": "derrick-server.js"
},
"license": "MIT... | {
"name": "derrick-server",
"version": "0.1.0",
"description": "Server utility for Derrick's Docker operations.",
"main": "derrick-server.js",
"scripts": {},
"author": {
"name": "Eric Mann",
"email": "eric.mann@10up.com",
"url": "http://10up.com"
},
"contributors": [
{
"name": "Luk... | Make sure all collaborators are credited | Make sure all collaborators are credited
| JSON | mit | 10up/Derrick-Server | json | ## Code Before:
{
"name": "derrick-server",
"version": "0.1.0",
"description": "Server utility for Derrick's Docker operations.",
"main": "derrick-server.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"bin": {
"derrick-server": "derrick-server.js"
},
... |
c9c99f44a9f3b1b133a58d20525029f372b2a52b | src/main/java/com/hamishrickerby/http_server/App.java | src/main/java/com/hamishrickerby/http_server/App.java | package com.hamishrickerby.http_server;
import com.hamishrickerby.http_server.responses.ResponseCoordinator;
/**
* Created by rickerbh on 15/08/2016.
*/
public class App {
private static String DEFAULT_PORT = "5000";
public static void main(String[] args) {
AppArguments arguments = new AppArguments... | package com.hamishrickerby.http_server;
import com.hamishrickerby.http_server.auth.Authenticator;
import com.hamishrickerby.http_server.auth.RequestAuthenticator;
/**
* Created by rickerbh on 15/08/2016.
*/
public class App {
private static String DEFAULT_PORT = "5000";
public static void main(String[] arg... | Integrate authenticator into to app | Integrate authenticator into to app
| Java | mit | rickerbh/http_server_java,rickerbh/http_server_java | java | ## Code Before:
package com.hamishrickerby.http_server;
import com.hamishrickerby.http_server.responses.ResponseCoordinator;
/**
* Created by rickerbh on 15/08/2016.
*/
public class App {
private static String DEFAULT_PORT = "5000";
public static void main(String[] args) {
AppArguments arguments = ... |
90e59f24355b4ec073b5b2d11bee9432290d2d8b | README.md | README.md | SVG-optimiser.js
================
An online SVG optimiser using Javascript and jQuery
| SVG-optimiser.js
================
An online SVG optimiser using Javascript and jQuery
##Using optimise-functions.js and SVG-elements.js
###Create an SVG_Root object
The `SVG_Root` object is what parses the SVG and allows you to access the optimisation functions. You can pass it either a complete SVG or an SVG elemen... | Add basic usage for optimise-functions.js to Readme | Add basic usage for optimise-functions.js to Readme | Markdown | mit | petercollingridge/SVG-optimiser.js,petercollingridge/SVG-optimiser.js | markdown | ## Code Before:
SVG-optimiser.js
================
An online SVG optimiser using Javascript and jQuery
## Instruction:
Add basic usage for optimise-functions.js to Readme
## Code After:
SVG-optimiser.js
================
An online SVG optimiser using Javascript and jQuery
##Using optimise-functions.js and SVG-element... |
54a5d31df7cee659889ef45e53a692de268e361a | app/partials/player/scoreDetails.html | app/partials/player/scoreDetails.html | <table style="border: 1px solid;">
<tr>
<th>Date</th>
<th>Incoming Average</th>
<th ng-repeat="label in league.gameLabels">{{label}}</th>
<th>Series Average</th>
<th>Difference</th>
</tr>
<tr ng-repeat="series in roller.serieses">
<td style="padding: 4px;">{{s... | <table style="border: 1px solid;">
<tr>
<th>Week Number</th>
<th>Date</th>
<th>Incoming Average</th>
<th ng-repeat="label in league.gameLabels">{{label}}</th>
<th>Series Average</th>
<th>Difference</th>
</tr>
<tr ng-repeat="series in roller.serieses">
... | Add week number to player data table | Add week number to player data table
| HTML | mit | MeerkatLabs/bowling-visualization | html | ## Code Before:
<table style="border: 1px solid;">
<tr>
<th>Date</th>
<th>Incoming Average</th>
<th ng-repeat="label in league.gameLabels">{{label}}</th>
<th>Series Average</th>
<th>Difference</th>
</tr>
<tr ng-repeat="series in roller.serieses">
<td style="pa... |
8bf699de70d47aaa7a999a7cf286bdc11f232759 | app/clients/dropbox/routes/createFolder.js | app/clients/dropbox/routes/createFolder.js | var createClient = require("../util/createClient");
module.exports = function(req, res, next) {
if (req.unsavedAccount.full_access === false && !req.otherBlogsUseAppFolder)
return next();
var client = createClient(req.unsavedAccount.access_token);
client
.filesCreateFolder({ path: "/" + req.blog.title,... | var createClient = require("../util/createClient");
module.exports = function(req, res, next) {
if (req.unsavedAccount.full_access === false && !req.otherBlogsUseAppFolder)
return next();
var client = createClient(req.unsavedAccount.access_token);
var folder = req.blog.title;
folder = folder.split("/").j... | Remove slashes from folder name | Remove slashes from folder name
| JavaScript | cc0-1.0 | davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot,davidmerfield/Blot | javascript | ## Code Before:
var createClient = require("../util/createClient");
module.exports = function(req, res, next) {
if (req.unsavedAccount.full_access === false && !req.otherBlogsUseAppFolder)
return next();
var client = createClient(req.unsavedAccount.access_token);
client
.filesCreateFolder({ path: "/" +... |
ab12d9e847448750067e798ba1b5a4238451dfee | antfarm/views/static.py | antfarm/views/static.py |
'''
Helper for serving static content.
'''
from antfarm import response
import mimetypes
class ServeStatic(object):
def __init__(self, root):
self.root = root
def __call__(self, path):
full_path = os.path.absdir(os.path.join(self.root, path))
if not full_path.startswith(self.root):
... |
'''
Helper for serving static content.
'''
import os.path
from antfarm import response
import mimetypes
class ServeStatic(object):
def __init__(self, root):
self.root = root
def __call__(self, request, path):
full_path = os.path.abspath(os.path.join(self.root, path))
if not full_pat... | Handle missing files gracefully in ServeStatic | Handle missing files gracefully in ServeStatic
| Python | mit | funkybob/antfarm | python | ## Code Before:
'''
Helper for serving static content.
'''
from antfarm import response
import mimetypes
class ServeStatic(object):
def __init__(self, root):
self.root = root
def __call__(self, path):
full_path = os.path.absdir(os.path.join(self.root, path))
if not full_path.startswi... |
0c8609863c4cfaaad6b6b7d41bdbdd4c3616a24a | root/tasks/require.js | root/tasks/require.js | /*
Builds a source package, starting from src/js/main.js
*/
var r = require("requirejs");
var shell = require("shelljs");
module.exports = function(grunt) {
grunt.registerTask("amd", "Compile AMD modules to build/main.js", function() {
var c = this.async();
//build an optimized app bundle
//include ... | /*
Builds a source package, starting from src/js/main.js
*/
var r = require("requirejs");
var shell = require("shelljs");
var project = require("../project.json");
module.exports = function(grunt) {
grunt.registerTask("amd", "Compile AMD modules to build/main.js", function() {
var c = this.async();
var ... | Add common paths to the Require task | Add common paths to the Require task
Now you can just define "jquery" "pym" or "angular" as a dependency
after running the requisite bower install.
| JavaScript | mit | seattletimes/newsapp-template,seattletimes/newsapp-template | javascript | ## Code Before:
/*
Builds a source package, starting from src/js/main.js
*/
var r = require("requirejs");
var shell = require("shelljs");
module.exports = function(grunt) {
grunt.registerTask("amd", "Compile AMD modules to build/main.js", function() {
var c = this.async();
//build an optimized app bundl... |
f86446fe934c9fc34691198c5705a7337b10d5dc | test/unit/validation_info_test.rb | test/unit/validation_info_test.rb | require File.dirname(__FILE__) + '/../test_helper'
class ValidationInfoTest < ActiveSupport::TestCase
should 'validate the presence of validation methodology description' do
info = ValidationInfo.new
info.valid?
assert info.errors.invalid?(:validation_methodology)
info.validation_methodology = 'lala... | require File.dirname(__FILE__) + '/../test_helper'
class ValidationInfoTest < ActiveSupport::TestCase
should 'validate the presence of validation methodology description' do
info = ValidationInfo.new
info.valid?
assert info.errors[:validation_methodology].any?
info.validation_methodology = 'lalala'
... | Fix ValidationInfoTest unit test. Change deprecated call for method invalid?(attr) in ActiveModel::Errors class by [:attr].any? | rails3: Fix ValidationInfoTest unit test. Change deprecated call for method invalid?(attr) in ActiveModel::Errors class by [:attr].any?
| Ruby | agpl-3.0 | arthurmde/noosfero,hebertdougl/noosfero,uniteddiversity/noosfero,evandrojr/noosfero,marcosronaldo/noosfero,blogoosfero/noosfero,samasti/noosfero,vfcosta/noosfero,tallysmartins/noosfero,evandrojr/noosfero,coletivoEITA/noosfero,larissa/noosfero,evandrojr/noosferogov,EcoAlternative/noosfero-ecosol,arthurmde/noosfero,laris... | ruby | ## Code Before:
require File.dirname(__FILE__) + '/../test_helper'
class ValidationInfoTest < ActiveSupport::TestCase
should 'validate the presence of validation methodology description' do
info = ValidationInfo.new
info.valid?
assert info.errors.invalid?(:validation_methodology)
info.validation_met... |
630d3c505f35a11688fbcc5e2962b86f801a4c55 | lib/hamster/core_ext/enumerable.rb | lib/hamster/core_ext/enumerable.rb | require "hamster/list"
module Enumerable
def to_list
# use destructive operations to build up a new list, like Common Lisp's NCONC
# this is a very fast way to build up a linked list
list = tail = Hamster::Sequence.allocate
each do |item|
new_node = Hamster::Sequence.allocate
new_node.ins... | require "hamster/list"
# Ruby's built-in `Enumerable` module.
# @see http://www.ruby-doc.org/core/Enumerable.html
module Enumerable
# Return a new {Hamster::List} populated with the items in this `Enumerable` object.
# @return [List]
def to_list
# use destructive operations to build up a new list, like Commo... | Add Yardoc for ::Enumerable extensions | Add Yardoc for ::Enumerable extensions
| Ruby | mit | dzjuck/hamster,jack-nie/hamster,xaviershay/hamster | ruby | ## Code Before:
require "hamster/list"
module Enumerable
def to_list
# use destructive operations to build up a new list, like Common Lisp's NCONC
# this is a very fast way to build up a linked list
list = tail = Hamster::Sequence.allocate
each do |item|
new_node = Hamster::Sequence.allocate
... |
d61fff38bf6ebab7443a391c116e019ba888a67b | CREDITS.md | CREDITS.md |
* [Copyleft symbol by Jonathan Conway](https://thenounproject.com/search/?q=copyleft&i=87090)
|
* [Copyleft symbol by Jonathan Conway](https://thenounproject.com/search/?q=copyleft&i=87090)
* [Tipue Search](http://www.tipue.com/search/) by [Tipue](http://www.tipue.com/about/)
| Add Tipue Search to Credits | Add Tipue Search to Credits
| Markdown | agpl-3.0 | OpenSSR/openssr-prototyping,OpenSSR/openssr-prototyping | markdown | ## Code Before:
* [Copyleft symbol by Jonathan Conway](https://thenounproject.com/search/?q=copyleft&i=87090)
## Instruction:
Add Tipue Search to Credits
## Code After:
* [Copyleft symbol by Jonathan Conway](https://thenounproject.com/search/?q=copyleft&i=87090)
* [Tipue Search](http://www.tipue.com/search/) by [Ti... |
42cb1ee016050c161f6d8e9d166170dd377d20ce | src/gamelib/components/update/CameraTracker.cpp | src/gamelib/components/update/CameraTracker.cpp |
namespace gamelib
{
CameraTracker::CameraTracker() :
UpdateComponent(1, UpdateHookType::PostPostFrame),
camera(0),
shakerad(5),
_shake(false)
{
_props.registerProperty("shakeradius", shakerad);
_props.registerProperty("camera", camera);
}
void CameraTrac... |
namespace gamelib
{
CameraTracker::CameraTracker() :
UpdateComponent(1, UpdateHookType::PostPostFrame),
camera(0),
shakerad(5),
_shake(false)
{
_props.registerProperty("shakeradius", shakerad);
_props.registerProperty("camera", camera);
}
void CameraTrac... | Use entity position rather than bbox center | Use entity position rather than bbox center
Prevents camera jumping when the player size changes.
| C++ | mit | mall0c/TileEngine,mall0c/GameLib | c++ | ## Code Before:
namespace gamelib
{
CameraTracker::CameraTracker() :
UpdateComponent(1, UpdateHookType::PostPostFrame),
camera(0),
shakerad(5),
_shake(false)
{
_props.registerProperty("shakeradius", shakerad);
_props.registerProperty("camera", camera);
}
... |
024bc7a5558885fe991d2d4c3e3f1e5b3843be4a | README.md | README.md | An addin for Cake to help running MSBuild tasks
| An addin for Cake to help running MSBuild tasks
Example code
```CSharp
// 1. Add reference to addin the top of your cake script:
#addin Cake.MSBuildTask
// 2. Reference the dll(s) that has the MSBuild task(s) you want to use in your build
// Note that for MSBuild.Extension.Pack the present version of Cake (0.5.4) can... | Add example code to ReadMe | Add example code to ReadMe
| Markdown | mit | marcosnz/Cake.MSBuildTask | markdown | ## Code Before:
An addin for Cake to help running MSBuild tasks
## Instruction:
Add example code to ReadMe
## Code After:
An addin for Cake to help running MSBuild tasks
Example code
```CSharp
// 1. Add reference to addin the top of your cake script:
#addin Cake.MSBuildTask
// 2. Reference the dll(s) that has the M... |
d32e2e828ee52080398aa87358ce151a8e83687a | tsql/ReadMe.md | tsql/ReadMe.md |
This is a community supported grammar file for t-sql, it is cool, yet not very complete
so far because a grammar reference of T-SQL is hard to find.
MS website has grammar reference for different statements,
but it's not a complete file, so we try hard to stick to the references we could find,
and bit by bit make it ... |
This is a community supported grammar file for t-sql, it is cool, yet not very complete
so far because a grammar reference of T-SQL is hard to find.
MS website has grammar reference for different statements,
but it's not a complete file, so we try hard to stick to the references we could find,
and bit by bit make it ... | Add pointer to Sybase / SAP ASE reference | Add pointer to Sybase / SAP ASE reference
| Markdown | mit | antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4,antlr/grammars-v4 | markdown | ## Code Before:
This is a community supported grammar file for t-sql, it is cool, yet not very complete
so far because a grammar reference of T-SQL is hard to find.
MS website has grammar reference for different statements,
but it's not a complete file, so we try hard to stick to the references we could find,
and bit... |
97faf60b8e6bc9b56479c51f654b9abff7717421 | requirements.txt | requirements.txt | Django==1.4
mock
oauth2
# oauth_provider
PIL
pyproj
pytz
# South
simplejson>=2.1
django-oauth-plus
# If you're using a MySQL database, you may also need mysql-python
# mysql-python
cx_Oracle
| Django==1.4
mock
oauth2
# oauth_provider
PIL
pyproj
pytz
# South
simplejson>=2.1
# django-oauth-plus
-e hg+https://bitbucket.org/stephen-butler/django-oauth-plus@oracle-fix
# If you're using a MySQL database, you may also need mysql-python
# mysql-python
cx_Oracle
| Use own copy of django-oauth-plus | Use own copy of django-oauth-plus
| Text | apache-2.0 | uw-it-aca/spotseeker_server,uw-it-aca/spotseeker_server,uw-it-aca/spotseeker_server | text | ## Code Before:
Django==1.4
mock
oauth2
# oauth_provider
PIL
pyproj
pytz
# South
simplejson>=2.1
django-oauth-plus
# If you're using a MySQL database, you may also need mysql-python
# mysql-python
cx_Oracle
## Instruction:
Use own copy of django-oauth-plus
## Code After:
Django==1.4
mock
oauth2
# oauth_provider
PIL... |
059c5dd14fbd395923174e809cbe61d2d6759616 | sapi4out.cpp | sapi4out.cpp |
int main(int argc, char** argv)
{
VOICE_INFO VoiceInfo;
if (!InitializeForVoice(argv[1], &VoiceInfo)) {
return 0;
}
UINT64 Len;
LPSTR outFile = (LPSTR)malloc(17);
GetTTS(&VoiceInfo, atoi(argv[2]), atoi(argv[3]), argv[4], &Len, &outFile);
printf("%s\n", outFile);
free(outFile);
} |
int main(int argc, char** argv)
{
VOICE_INFO VoiceInfo;
if (!InitializeForVoice(argv[1], &VoiceInfo)) {
return 0;
}
UINT64 Len;
LPSTR outFile[17];
GetTTS(&VoiceInfo, atoi(argv[2]), atoi(argv[3]), argv[4], &Len, &outFile);
printf("%s\n", outFile);
} | Use stack instead of malloc | Use stack instead of malloc
| C++ | mit | TETYYS/SAPI4,TETYYS/SAPI4 | c++ | ## Code Before:
int main(int argc, char** argv)
{
VOICE_INFO VoiceInfo;
if (!InitializeForVoice(argv[1], &VoiceInfo)) {
return 0;
}
UINT64 Len;
LPSTR outFile = (LPSTR)malloc(17);
GetTTS(&VoiceInfo, atoi(argv[2]), atoi(argv[3]), argv[4], &Len, &outFile);
printf("%s\n", outFile);
free(outFile);
}
## Instr... |
2d4d8626f2a03e3101d48ea79f07be6c127bcae6 | coffee-chats/src/main/webapp/src/util/fetch.ts | coffee-chats/src/main/webapp/src/util/fetch.ts | import React from "react";
interface ResponseRaceDetect {
response: Response;
json: any;
raceOccurred: boolean;
}
const fetchAndDetectRaces: (url: string) => Promise<ResponseRaceDetect> = (() => {
let requestId = 0;
return async (url: string) => {
const currentRequestId = ++requestId;
const respon... | import React from "react";
/**
* A hook that fetches JSON data from a URL using a GET request
*
* @param url: URL to fetch data from
*/
export function useFetch(url: string): any {
const [data, setData] = React.useState(null);
const requestId = React.useRef(0);
React.useEffect(() => {
(async () => {
... | Use useRef for race detection in useFetch | Use useRef for race detection in useFetch
| TypeScript | apache-2.0 | googleinterns/step250-2020,googleinterns/step250-2020,googleinterns/step250-2020,googleinterns/step250-2020 | typescript | ## Code Before:
import React from "react";
interface ResponseRaceDetect {
response: Response;
json: any;
raceOccurred: boolean;
}
const fetchAndDetectRaces: (url: string) => Promise<ResponseRaceDetect> = (() => {
let requestId = 0;
return async (url: string) => {
const currentRequestId = ++requestId;
... |
78b2978c3e0e56c4c75a3a6b532e02c995ca69ed | openedx/core/djangoapps/user_api/permissions/views.py | openedx/core/djangoapps/user_api/permissions/views.py | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework import permissions
from django.db import transaction
from django.utils.translation import ugettext as _
from openedx.core.lib.api.authentication import (
SessionAuthenticatio... | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from openedx.core.lib.api.authentication import (
SessionAuthenticationAllowInactiveUser,
OAuth2AuthenticationAllowInactiveUser,
)
from openedx.core.lib.api.parsers import MergePatchParser
fr... | Remove unused import and redundant comment | Remove unused import and redundant comment
| Python | agpl-3.0 | mbareta/edx-platform-ft,mbareta/edx-platform-ft,mbareta/edx-platform-ft,mbareta/edx-platform-ft | python | ## Code Before:
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from rest_framework import permissions
from django.db import transaction
from django.utils.translation import ugettext as _
from openedx.core.lib.api.authentication import (
Sess... |
4eb1574fb43e476a3325cac7d0eef5024182f749 | .travis.yml | .travis.yml | before_install: gem update bundler
bundler_args: --without development
rvm:
- 1.9.3
- 2.0.0
- 2.1.1
- rbx-2
- ruby-head
language: ruby | before_install: gem update bundler
bundler_args: --without development
rvm:
- 1.9.3
- 2.0.0
- 2.1.1
language: ruby | Remove testing from other ruby versions | Remove testing from other ruby versions
| YAML | mit | joshuapaling/browserlog,naaano/browserlog,naaano/browserlog,joshuapaling/browserlog,dieb/browserlog,dieb/browserlog,naaano/browserlog,joshuapaling/browserlog,scytherswings/browserlog,scytherswings/browserlog,dieb/browserlog,scytherswings/browserlog | yaml | ## Code Before:
before_install: gem update bundler
bundler_args: --without development
rvm:
- 1.9.3
- 2.0.0
- 2.1.1
- rbx-2
- ruby-head
language: ruby
## Instruction:
Remove testing from other ruby versions
## Code After:
before_install: gem update bundler
bundler_args: --without development
rvm:
- 1.9.3
... |
fcba4eb4f0fd596e9655a95f06ed8a1261402f87 | optional/capi/time_spec.rb | optional/capi/time_spec.rb | require File.expand_path('../spec_helper', __FILE__)
load_extension("time")
describe "CApiTimeSpecs" do
before :each do
@s = CApiTimeSpecs.new
end
describe "rb_time_new" do
it "creates a Time from the sec and usec" do
@s.rb_time_new(1232141421, 1413123123).should == Time.at(1232141421, 1413123123... | require File.expand_path('../spec_helper', __FILE__)
load_extension("time")
describe "CApiTimeSpecs" do
before :each do
@s = CApiTimeSpecs.new
end
describe "rb_time_new" do
it "creates a Time from the sec and usec" do
usec = CAPI_SIZEOF_LONG == 8 ? 4611686018427387903 : 1413123123
@s.rb_tim... | Support the environment whose long is 64bit. | Support the environment whose long is 64bit.
| Ruby | mit | agrimm/rubyspec,chesterbr/rubyspec,godfat/rubyspec,timfel/rubyspec,neomadara/rubyspec,JuanitoFatas/rubyspec,kachick/rubyspec,terceiro/rubyspec,iainbeeston/rubyspec,ruby/spec,amarshall/rubyspec,kidaa/rubyspec,josedonizetti/rubyspec,jvshahid/rubyspec,saturnflyer/rubyspec,Aesthetikx/rubyspec,griff/rubyspec,yous/rubyspec,e... | ruby | ## Code Before:
require File.expand_path('../spec_helper', __FILE__)
load_extension("time")
describe "CApiTimeSpecs" do
before :each do
@s = CApiTimeSpecs.new
end
describe "rb_time_new" do
it "creates a Time from the sec and usec" do
@s.rb_time_new(1232141421, 1413123123).should == Time.at(123214... |
5102ce89c456e5a74f4fcde8cc011af88b8337fe | util/docker/web/setup/dbip.sh | util/docker/web/setup/dbip.sh | set -e
source /bd_build/buildconfig
set -x
cd /tmp
wget --quiet -O dbip-city-lite.mmdb.gz https://download.db-ip.com/free/dbip-city-lite-2020-03.mmdb.gz
gunzip dbip-city-lite.mmdb.gz
mv dbip-city-lite.mmdb /var/azuracast/dbip/
chown -R azuracast:azuracast /var/azuracast/dbip
| set -e
source /bd_build/buildconfig
set -x
cd /tmp
YEAR=$(date +'%Y')
MONTH=$(date +'%m')
wget --quiet -O dbip-city-lite.mmdb.gz "https://download.db-ip.com/free/dbip-city-lite-${YEAR}-${MONTH}.mmdb.gz"
gunzip dbip-city-lite.mmdb.gz
mv dbip-city-lite.mmdb /var/azuracast/dbip/
chown -R azuracast:azuracast /var/azur... | Update DBIP in Docker image to always use current year/month when building. | Update DBIP in Docker image to always use current year/month when building.
| Shell | agpl-3.0 | SlvrEagle23/AzuraCast,SlvrEagle23/AzuraCast,AzuraCast/AzuraCast,AzuraCast/AzuraCast,SlvrEagle23/AzuraCast,SlvrEagle23/AzuraCast,AzuraCast/AzuraCast,SlvrEagle23/AzuraCast,AzuraCast/AzuraCast | shell | ## Code Before:
set -e
source /bd_build/buildconfig
set -x
cd /tmp
wget --quiet -O dbip-city-lite.mmdb.gz https://download.db-ip.com/free/dbip-city-lite-2020-03.mmdb.gz
gunzip dbip-city-lite.mmdb.gz
mv dbip-city-lite.mmdb /var/azuracast/dbip/
chown -R azuracast:azuracast /var/azuracast/dbip
## Instruction:
Update ... |
17fbd3a8d5b777f04f1627d4b366aff57251b485 | tasks/config/jst.js | tasks/config/jst.js | /**
* Precompiles Underscore templates to a `.jst` file.
*
* ---------------------------------------------------------------
*
* (i.e. basically it takes HTML files and turns them into tiny little
* javascript functions that you pass data to and return HTML. This can
* speed up template rendering on the client... | /**
* Precompiles Underscore templates to a `.jst` file.
*
* ---------------------------------------------------------------
*
* (i.e. basically it takes HTML files and turns them into tiny little
* javascript functions that you pass data to and return HTML. This can
* speed up template rendering on the client... | Use custom interpolation for client templates. | Use custom interpolation for client templates.
| JavaScript | mit | kumpelblase2/modlab,kumpelblase2/modlab | javascript | ## Code Before:
/**
* Precompiles Underscore templates to a `.jst` file.
*
* ---------------------------------------------------------------
*
* (i.e. basically it takes HTML files and turns them into tiny little
* javascript functions that you pass data to and return HTML. This can
* speed up template renderi... |
488d3581c187cc3a6151232202d484575f7fdec5 | plugins/inputs/all/all.go | plugins/inputs/all/all.go | package all
import (
_ "github.com/SpirentOrion/metrics-service/telegraf/plugins/inputs/cloudstress_agent_consumer"
_ "github.com/SpirentOrion/metrics-service/telegraf/plugins/inputs/cloudstress_host_consumer"
)
| package all
import (
_ "github.com/SpirentOrion/metrics-service/telegraf/plugins/inputs/cloudstress_agent_consumer"
_ "github.com/SpirentOrion/metrics-service/telegraf/plugins/inputs/host_agent_consumer"
)
| Rename cloudstress agent consumer plugin to host agent consumer plugin | Rename cloudstress agent consumer plugin to host agent consumer plugin
| Go | mit | SpirentOrion/telegraf,SpirentOrion/telegraf,SpirentOrion/telegraf,SpirentOrion/telegraf | go | ## Code Before:
package all
import (
_ "github.com/SpirentOrion/metrics-service/telegraf/plugins/inputs/cloudstress_agent_consumer"
_ "github.com/SpirentOrion/metrics-service/telegraf/plugins/inputs/cloudstress_host_consumer"
)
## Instruction:
Rename cloudstress agent consumer plugin to host agent consumer plugin
... |
58375dfb48f0e052dd3717c75ff9cbd5db7ed450 | gulpfile.js | gulpfile.js | var gulp = require('gulp'),
rename = require('gulp-rename'),
basswork = require('gulp-basswork'),
minifyCss = require('gulp-minify-css'),
transform = require('vinyl-transform'),
size = require('gulp-size'),
webserver = require('gulp-webserver');
gulp.task('css', function() {
gulp.src('./src/t... | var gulp = require('gulp'),
rename = require('gulp-rename'),
basswork = require('gulp-basswork'),
minifyCss = require('gulp-minify-css'),
transform = require('vinyl-transform'),
size = require('gulp-size'),
webserver = require('gulp-webserver');
gulp.task('css', function() {
gulp.src('./src/t... | Add gzipped and non-gzipped file size output | Add gzipped and non-gzipped file size output
| JavaScript | isc | tachyons-css/tachyons-widths | javascript | ## Code Before:
var gulp = require('gulp'),
rename = require('gulp-rename'),
basswork = require('gulp-basswork'),
minifyCss = require('gulp-minify-css'),
transform = require('vinyl-transform'),
size = require('gulp-size'),
webserver = require('gulp-webserver');
gulp.task('css', function() {
g... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.