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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a3b6cd7af4c5c2b6e4900999af5faa8516e23ac7 | README.rst | README.rst | bvg-grabber
===========
.. image:: https://secure.travis-ci.org/Markush2010/bvg-grabber.png?branch=master
:alt: Build Status
:target: http://travis-ci.org/Markush2010/bvg-grabber
| bvg-grabber
===========
Showing BVG Departures In Your Office
+++++++++++++++++++++++++++++++++++++
.. image:: https://secure.travis-ci.org/Markush2010/bvg-grabber.png?branch=master
:alt: Build Status
:target: http://travis-ci.org/Markush2010/bvg-grabber
Blog post:
http://markusholtermann.eu/article/showin... | Add links to blog/slides + pictures to readme | Add links to blog/slides + pictures to readme | reStructuredText | bsd-3-clause | MarkusH/bvg-grabber | restructuredtext | ## Code Before:
bvg-grabber
===========
.. image:: https://secure.travis-ci.org/Markush2010/bvg-grabber.png?branch=master
:alt: Build Status
:target: http://travis-ci.org/Markush2010/bvg-grabber
## Instruction:
Add links to blog/slides + pictures to readme
## Code After:
bvg-grabber
===========
Showing BVG D... |
4d124fe1c3d2321f945c9f21ebcc321586036902 | Medium/078_Subsets.js | Medium/078_Subsets.js | // https://leetcode.com/problems/subsets/description/
/**
* @param {number[]} nums
* @return {number[][]}
*/
var subsets = function (nums) {
let result = [[]];
for (let num of nums) {
let len = result.length;
for (let i = 0; i < len; i++) {
let temp = [].concat(result[i]);
temp.push(num);
... | // https://leetcode.com/problems/subsets/description/
/**
* @param {number[]} nums
* @return {number[][]}
*/
var subsets2 = function (nums) {
let result = [[]];
for (let num of nums) {
let len = result.length;
for (let i = 0; i < len; i++) {
let temp = [].concat(result[i]);
temp.push(num);
... | Add second solution for subsets | Add second solution for subsets
| JavaScript | mit | lon-yang/leetcode,lon-yang/leetcode | javascript | ## Code Before:
// https://leetcode.com/problems/subsets/description/
/**
* @param {number[]} nums
* @return {number[][]}
*/
var subsets = function (nums) {
let result = [[]];
for (let num of nums) {
let len = result.length;
for (let i = 0; i < len; i++) {
let temp = [].concat(result[i]);
te... |
2ab9efeafdce44e7296eb787be36f3b622f43a57 | README.md | README.md | ImageManipulator
=================
Code which allows importing and manipulating and re-saving of images on the client side.
| ImageManipulator
=================
Code which allows importing and manipulating and re-saving of images on the client side.
Currently the code is structured as a Jade based website initialised by the Harp server. All the javascript (the most important part) is in "scripts.js". I plan to abstract this out into class f... | Update to readme to explain messy structure. | Update to readme to explain messy structure. | Markdown | mit | andrewbridge/image-manipulator | markdown | ## Code Before:
ImageManipulator
=================
Code which allows importing and manipulating and re-saving of images on the client side.
## Instruction:
Update to readme to explain messy structure.
## Code After:
ImageManipulator
=================
Code which allows importing and manipulating and re-saving of imag... |
a28eaf9968fe57da4ed3eef11bc05cdfd00e9af4 | app/views/documents/_embed_code.html.erb | app/views/documents/_embed_code.html.erb | <% if options[:use_default_container] %>
<div id="<%= options[:default_container_id] %>" class="DV-container"></div>
<% end %>
<script type="text/javascript">
DV.load("<%= options[:resource_js_url] %>", JSON.parse('<%= data.to_json %>'));
</script>
<% if data[:pdf] %>
<noscript>
<a href="<%#= options[:pdf_url] %>">... | <% if options[:use_default_container] %>
<div id="<%= options[:default_container_id] %>" class="DV-container"></div>
<% end %>
<script type="text/javascript">
DV.load("<%= options[:resource_js_url] %>", <%= data.to_json %>);
</script>
<% if data[:pdf] %>
<noscript>
<a href="<%#= options[:pdf_url] %>"><%#= options[:... | Stop trying to tame JSON | Stop trying to tame JSON
Revert 43a2f99624491193be9b220da11c5ba58979e7ee and actually fix things. (We were dumping the Ruby-generated JSON between curly braces, when Ruby was already returning it that way.)
| HTML+ERB | mit | ivarvong/documentcloud,moodpo/documentcloud,dannguyen/documentcloud,Teino1978-Corp/Teino1978-Corp-documentcloud,Teino1978-Corp/Teino1978-Corp-documentcloud,documentcloud/documentcloud,dannguyen/documentcloud,monofox/documentcloud,gunjanmodi/documentcloud,moodpo/documentcloud,ivarvong/documentcloud,monofox/documentcloud... | html+erb | ## Code Before:
<% if options[:use_default_container] %>
<div id="<%= options[:default_container_id] %>" class="DV-container"></div>
<% end %>
<script type="text/javascript">
DV.load("<%= options[:resource_js_url] %>", JSON.parse('<%= data.to_json %>'));
</script>
<% if data[:pdf] %>
<noscript>
<a href="<%#= option... |
0f08bdd49437340fd087c753be383f33e70f810a | public/views/content/directives/contentEditRouteModal.tpl.html | public/views/content/directives/contentEditRouteModal.tpl.html | <div class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" ng-show="title">
<button type="button" class="close" ng-click="vm.editRouteModal.closeModal()">×</button>
<h4 class="modal-title"... | <div class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" ng-show="title">
<button type="button" class="close" ng-click="vm.editRouteModal.closeModal()">×</button>
<h4 class="modal-title"... | Edit route modal disable button if form is not valid | Edit route modal disable button if form is not valid
| HTML | mit | GrupaZero/admin,GrupaZero/admin,GrupaZero/admin | html | ## Code Before:
<div class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header" ng-show="title">
<button type="button" class="close" ng-click="vm.editRouteModal.closeModal()">×</button>
<h4 cla... |
a7c6fd7b2d6674d2e6fddba363e09a1aa5422170 | app/controllers/settings_controller.rb | app/controllers/settings_controller.rb | class SettingsController < ApplicationController
def install
if config.is_ok?
render_action 'done'
end
@fields = Configuration.fields
if request.post?
Setting.transaction do
for field, v... | class SettingsController < ApplicationController
def install
if config.is_ok?
render_action 'done'
return
end
@fields = Configuration.fields
if request.post?
Setting.transaction do
for field, value in @params["fields"]
setting = find_or_create(field... | Fix for stupid mistake tobi pointed out. | Fix for stupid mistake tobi pointed out.
git-svn-id: 70ab0960c3db1cbf656efd6df54a8f3de72dc710@142 820eb932-12ee-0310-9ca8-eeb645f39767
| Ruby | mit | swombat/blog,swombat/blog,swombat/blog,swombat/blog,swombat/blog | ruby | ## Code Before:
class SettingsController < ApplicationController
def install
if config.is_ok?
render_action 'done'
end
@fields = Configuration.fields
if request.post?
Setting.transaction do
... |
7015b5bf056c1181af65695b5f263aaaaeea61fa | lib/Stripe/Charge.php | lib/Stripe/Charge.php | <?php
class Stripe_Charge extends Stripe_ApiResource
{
public static function constructFrom($values, $apiKey=null)
{
$class = get_class();
return self::_scopedConstructFrom($class, $values, $apiKey);
}
public static function retrieve($id, $apiKey=null)
{
$class = get_class();
return self::_s... | <?php
class Stripe_Charge extends Stripe_ApiResource
{
public static function constructFrom($values, $apiKey=null)
{
$class = get_class();
return self::_scopedConstructFrom($class, $values, $apiKey);
}
public static function retrieve($id, $apiKey=null)
{
$class = get_class();
return self::_s... | Add optional params to refund | Add optional params to refund
| PHP | mit | a-ankitpatel/stripe-php,Nayami/stripe-php,iFixit/stripe-php,matthewarkin/stripe-php,MamunHoque/stripe-php,stripe/stripe-php,5outh/stripe-php,cruisemaniac/laravel-stripe-php-bundle | php | ## Code Before:
<?php
class Stripe_Charge extends Stripe_ApiResource
{
public static function constructFrom($values, $apiKey=null)
{
$class = get_class();
return self::_scopedConstructFrom($class, $values, $apiKey);
}
public static function retrieve($id, $apiKey=null)
{
$class = get_class();
... |
f0bbaab78aa677d19974087b3b63f817fd442eb9 | core/Request.qml | core/Request.qml | ///object for handling XML/HTTP requests
Object {
property bool loading: false; ///< loading flag, is true when request was send and false when answer was recieved or error occured
/**@param request:Object request object
send request using 'XMLHttpRequest' object*/
ajax(request): {
var url = request.url
var er... | ///object for handling XML/HTTP requests
Object {
property bool loading: false; ///< loading flag, is true when request was send and false when answer was recieved or error occured
/**@param request:Object request object
send request using 'XMLHttpRequest' object*/
ajax(request): {
var url = request.url
var er... | Fix warning, remove unused variable. | Fix warning, remove unused variable.
| QML | mit | pureqml/controls | qml | ## Code Before:
///object for handling XML/HTTP requests
Object {
property bool loading: false; ///< loading flag, is true when request was send and false when answer was recieved or error occured
/**@param request:Object request object
send request using 'XMLHttpRequest' object*/
ajax(request): {
var url = requ... |
734b31b3d12e986d8de35fdbcf2db54690277074 | wal-e-requirements.txt | wal-e-requirements.txt | Babel==1.3
argparse==1.3.0
azure==0.9.0
boto==2.35.2
futures==2.2.0
gevent==1.0.1
greenlet==0.4.5
iso8601==0.1.10
netaddr==0.7.13
netifaces==0.10.4
oslo.config==1.6.0
oslo.i18n==1.3.0
oslo.serialization==1.2.0
oslo.utils==1.2.1
pbr==0.10.7
prettytable==0.7.2
python-dateutil==2.4.0
python-keystoneclient==1.0.0
python-sw... | Babel==2.2.0
argparse==1.2.1
azure==1.0.3
azure-common==1.0.0
azure-mgmt==0.20.2
azure-mgmt-common==0.20.0
azure-mgmt-compute==0.20.1
azure-mgmt-network==0.20.1
azure-mgmt-nspkg==1.0.0
azure-mgmt-resource==0.20.1
azure-mgmt-storage==0.20.0
azure-nspkg==1.0.0
azure-servicebus==0.20.1
azure-servicemanagement-legacy==0.20... | Update wal-e requirements, don't rely on my fork. | Update wal-e requirements, don't rely on my fork.
| Text | mit | hms-dbmi/fourfront,ENCODE-DCC/snovault,4dn-dcic/fourfront,T2DREAM/t2dream-portal,ENCODE-DCC/encoded,ENCODE-DCC/encoded,hms-dbmi/fourfront,4dn-dcic/fourfront,hms-dbmi/fourfront,T2DREAM/t2dream-portal,4dn-dcic/fourfront,ENCODE-DCC/snovault,ENCODE-DCC/snovault,ENCODE-DCC/encoded,4dn-dcic/fourfront,ENCODE-DCC/snovault,T2DR... | text | ## Code Before:
Babel==1.3
argparse==1.3.0
azure==0.9.0
boto==2.35.2
futures==2.2.0
gevent==1.0.1
greenlet==0.4.5
iso8601==0.1.10
netaddr==0.7.13
netifaces==0.10.4
oslo.config==1.6.0
oslo.i18n==1.3.0
oslo.serialization==1.2.0
oslo.utils==1.2.1
pbr==0.10.7
prettytable==0.7.2
python-dateutil==2.4.0
python-keystoneclient=... |
e28da205788cc1f1e81b1b7b9f3f7ee9e204ad03 | server/models/applicant.js | server/models/applicant.js | var mongoose = require("mongoose");
var Schema = mongoose.Schema;
var applicantSchema = new Schema({
name: {
type: String,
required: true
},
email: {
type: String,
required: true,
lowercase: true
},
timeTaken: String
}, {timestamps: true});
applicantSchema.p... | var mongoose = require("mongoose");
var Schema = mongoose.Schema;
var applicantSchema = new Schema({
name: {
type: String,
required: true
},
email: {
type: String,
required: true,
lowercase: true
},
timeTaken: {
type: String,
default: "Not yet... | Change timeTaken to default of Not yet completed | Change timeTaken to default of Not yet completed
| JavaScript | mit | bobziroll/admissions,bobziroll/admissions | javascript | ## Code Before:
var mongoose = require("mongoose");
var Schema = mongoose.Schema;
var applicantSchema = new Schema({
name: {
type: String,
required: true
},
email: {
type: String,
required: true,
lowercase: true
},
timeTaken: String
}, {timestamps: true});
a... |
d1e93a8645d10b013325b4d78493bde397e905af | spec/unit/result_queue_spec.rb | spec/unit/result_queue_spec.rb |
require 'spec_helper'
describe Que::ResultQueue do
let :result_queue do
Que::ResultQueue.new
end
describe "#push and #clear" do
it "should add items and remove all items from the result queue" do
ids = (1..100).to_a.shuffle
threads = ids.each_slice(25).to_a.map do |id_set|
Thread.n... |
require 'spec_helper'
describe Que::ResultQueue do
let :result_queue do
Que::ResultQueue.new
end
describe "#push and #clear" do
it "should add items and remove all items from the result queue" do
ids = (1..100).to_a.shuffle
result_queue # Initialize before it's accessed by different threads... | Fix another intermittent spec failure. | Fix another intermittent spec failure.
| Ruby | mit | chanks/que,heroku/que | ruby | ## Code Before:
require 'spec_helper'
describe Que::ResultQueue do
let :result_queue do
Que::ResultQueue.new
end
describe "#push and #clear" do
it "should add items and remove all items from the result queue" do
ids = (1..100).to_a.shuffle
threads = ids.each_slice(25).to_a.map do |id_set|
... |
b674ada8bca18bc2ba0e545d73f79459cc27dd88 | src/v2/Apps/ArtistSeries/routes.tsx | src/v2/Apps/ArtistSeries/routes.tsx | import loadable from "@loadable/component"
import { graphql } from "react-relay"
import { RouteConfig } from "found"
// import React from "react"
const ArtistSeriesApp = loadable(() => import("./ArtistSeriesApp"))
// const ArtistSeriesApp = props => <h1>{props.artistSeries.internalID}</h1>
export const routes: Route... | import loadable from "@loadable/component"
import { graphql } from "react-relay"
import { RouteConfig } from "found"
const ArtistSeriesApp = loadable(() => import("./ArtistSeriesApp"))
export const routes: RouteConfig[] = [
{
path: "/artist-series/:slug",
getComponent: () => ArtistSeriesApp,
prepare: ()... | Remove leftover commented out code | Remove leftover commented out code
| TypeScript | mit | oxaudo/force,oxaudo/force,oxaudo/force,artsy/force,artsy/force,eessex/force,eessex/force,joeyAghion/force,artsy/force-public,artsy/force-public,eessex/force,joeyAghion/force,joeyAghion/force,joeyAghion/force,oxaudo/force,eessex/force,artsy/force,artsy/force | typescript | ## Code Before:
import loadable from "@loadable/component"
import { graphql } from "react-relay"
import { RouteConfig } from "found"
// import React from "react"
const ArtistSeriesApp = loadable(() => import("./ArtistSeriesApp"))
// const ArtistSeriesApp = props => <h1>{props.artistSeries.internalID}</h1>
export con... |
76dc1e71be25b6a1f654aa71c272b04b3d0ca50b | templates/includes/article_precontent.html | templates/includes/article_precontent.html | {% if article.series %}
<p>This post is part ({{ article.series.index }}/{{ article.series.all|count }}) of the "<a href="{{ SITEURL }}/{{ article.series.all[0].url }}">{{ article.series.name }}</a>" series:</p>
<ol class="parts">
{% for part_article in article.series.all %}
<li {% if part_article == article %}clas... | {% if article.series %}
{% if article.status != "draft" and article.status != "hidden" %}
<p>This post is part ({{ article.series.index }}/{{ article.series.all|count }}) of the "<a href="{{ SITEURL }}/{{ article.series.all[0].url }}">{{ article.series.name }}</a>" series:</p>
<ol class="parts">
{% for part_article i... | Add check to limit series to published posts | Add check to limit series to published posts
| HTML | mit | sanjayankur31/voidy-bootstrap | html | ## Code Before:
{% if article.series %}
<p>This post is part ({{ article.series.index }}/{{ article.series.all|count }}) of the "<a href="{{ SITEURL }}/{{ article.series.all[0].url }}">{{ article.series.name }}</a>" series:</p>
<ol class="parts">
{% for part_article in article.series.all %}
<li {% if part_article =... |
834f08110d4c4c0c4e38e2a917c0c774a6c071fa | .travis.yml | .travis.yml | language: php
php:
- 5.6
services:
- redis-server
before_script:
- mysql -uroot -e 'create database rena;'
- wget http://getcomposer.org/composer.phar
- php composer.phar install --dev --no-interaction -o
- ls -alh
- cp tests/config.php config/config.php
- cat config/config.php
- cp tests/phinx.yml... | sudo: true
language: php
php:
- 5.6
services:
- redis-server
before_script:
- sudo service mysql stop
- sudo apt-get install python-software-properties
- sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
- sudo add-apt-repository 'deb http://ftp.osuosl.org/pub/mari... | Add mariadb instead of mysql, also setup tokudb.. | Add mariadb instead of mysql, also setup tokudb..
| YAML | mit | EVE-KILL/projectRena,EVE-KILL/projectRena,EVE-KILL/projectRena | yaml | ## Code Before:
language: php
php:
- 5.6
services:
- redis-server
before_script:
- mysql -uroot -e 'create database rena;'
- wget http://getcomposer.org/composer.phar
- php composer.phar install --dev --no-interaction -o
- ls -alh
- cp tests/config.php config/config.php
- cat config/config.php
- cp... |
e7de2460160568b28ec1b0d7b28290e0983ef799 | STYLE-GUIDE.md | STYLE-GUIDE.md | https://github.com/airbnb/javascript
| Forked copy of Airbnb style-guide [here](https://github.com/MapReactor/javascript).
Use the `javascript/linters/.eslintrc` file as a starting point for your project's .eslintrc.
| Add link to forked airbnb style-guide repo. | Add link to forked airbnb style-guide repo. | Markdown | mit | MapReactor/Sonder,MapReactor/Sonder,MapReactor/Sonder,MapReactor/Sonder,MapReactor/Sonder | markdown | ## Code Before:
https://github.com/airbnb/javascript
## Instruction:
Add link to forked airbnb style-guide repo.
## Code After:
Forked copy of Airbnb style-guide [here](https://github.com/MapReactor/javascript).
Use the `javascript/linters/.eslintrc` file as a starting point for your project's .eslintrc.
|
578314dfc2eec055f224251577ae05e771f0b736 | .travis.yml | .travis.yml | language: dart
dart:
- dev
script:
- dartanalyzer --fatal-warnings --fatal-lints --strong .
- pub run test
| language: dart
script:
- dartanalyzer --fatal-warnings --fatal-lints .
- pub run test
| Stop testing with the dev branch of Dart | Stop testing with the dev branch of Dart
| YAML | bsd-3-clause | filiph/markov | yaml | ## Code Before:
language: dart
dart:
- dev
script:
- dartanalyzer --fatal-warnings --fatal-lints --strong .
- pub run test
## Instruction:
Stop testing with the dev branch of Dart
## Code After:
language: dart
script:
- dartanalyzer --fatal-warnings --fatal-lints .
- pub run test
|
aadffa19c05715f281667e6a5fa4945881334978 | make.bat | make.bat | @rem if we don't have nmake in the path, we need to run setup
where nmake.exe 2> NUL
if %ERRORLEVEL% GTR 0 set need_setup=1
@rem if we don't have the include path set, we need to run setup
if not defined INCLUDE set need_setup=1
@rem run setup if we need to
if %need_setup% == 1 call "c:\Program Files (x86)\Microsoft ... | @rem if we don't have nmake in the path, we need to run setup
where nmake.exe 2> NUL
if %ERRORLEVEL% GTR 0 set need_setup=1
@rem if we don't have the include path set, we need to run setup
if not defined INCLUDE set need_setup=1
@rem run setup if we need to
if %need_setup% == 1 call "c:\Program Files (x86)\Microsoft ... | Adjust windows build script some more | Adjust windows build script some more
Make a guess about php and python locations
| Batchfile | mit | wez/watchman,nodakai/watchman,dhruvsinghal/watchman,dhruvsinghal/watchman,kwlzn/watchman,wez/watchman,nodakai/watchman,dhruvsinghal/watchman,kwlzn/watchman,dhruvsinghal/watchman,dhruvsinghal/watchman,dcolascione/laptop-watchman,nodakai/watchman,wez/watchman,kwlzn/watchman,wez/watchman,dcolascione/laptop-watchman,facebo... | batchfile | ## Code Before:
@rem if we don't have nmake in the path, we need to run setup
where nmake.exe 2> NUL
if %ERRORLEVEL% GTR 0 set need_setup=1
@rem if we don't have the include path set, we need to run setup
if not defined INCLUDE set need_setup=1
@rem run setup if we need to
if %need_setup% == 1 call "c:\Program Files ... |
2168a53a5fa4f1d19eafd2cc8a3c8eede9fc3db5 | config/environments/development.js | config/environments/development.js | var express = require('express');
module.exports = function() {
this.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
this.set('db-uri', 'mongodb://localhost/rezerve');
this.set('view options', {
pretty: true
});
}
| var express = require('express');
var utils = require('connect').utils;
module.exports = function() {
this.set('db-uri', 'mongodb://localhost/rezerve');
this.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
// Set pretty prints
this.express.locals.pretty = true;
};
| Add pretty print for Jade HTML output | Add pretty print for Jade HTML output
| JavaScript | mit | pblondin/re-zerve,pblondin/re-zerve | javascript | ## Code Before:
var express = require('express');
module.exports = function() {
this.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
this.set('db-uri', 'mongodb://localhost/rezerve');
this.set('view options', {
pretty: true
});
}
## Instruction:
Add pretty print for Jade HTML output
... |
d768f84579e2c426159df0d5725f212b629b03ef | .travis.yml | .travis.yml | language: python
sudo: required
python:
- '2.7'
- '3.5'
services:
- docker
before_install:
# Set base Python image version (leverages Travis build matrix)
- sed -i'' "s/^\(FROM python:\).*/\1${TRAVIS_PYTHON_VERSION}/" Dockerfile
install:
- docker build --tag betty .
script:
- docker run bett... | language: python
sudo: required
python:
- '2.7'
- '3.5'
services:
- docker
before_install:
# Set base Python image version (leverages Travis build matrix)
- sed -i'' "s/^\(FROM python:\).*/\1${TRAVIS_PYTHON_VERSION}/" Dockerfile
install:
- docker build --tag betty .
script:
- docker run bett... | Disable coveralls (not really using it, and harder to integrate with Docker) | Disable coveralls (not really using it, and harder to integrate with Docker)
| YAML | mit | theonion/betty-cropper,theonion/betty-cropper,theonion/betty-cropper,theonion/betty-cropper | yaml | ## Code Before:
language: python
sudo: required
python:
- '2.7'
- '3.5'
services:
- docker
before_install:
# Set base Python image version (leverages Travis build matrix)
- sed -i'' "s/^\(FROM python:\).*/\1${TRAVIS_PYTHON_VERSION}/" Dockerfile
install:
- docker build --tag betty .
script:
-... |
c6f9e33c7bd4ddb8eb20c4d810988345668d01ae | Common/src/main/java/net/darkhax/bookshelf/api/item/ICreativeTabBuilder.java | Common/src/main/java/net/darkhax/bookshelf/api/item/ICreativeTabBuilder.java | package net.darkhax.bookshelf.api.item;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
import net.minecraft.world.level.ItemLike;
import java.util.List;
import... | package net.darkhax.bookshelf.api.item;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
import net.minecraft.world.level.ItemLike;
import java.util.List;
import... | Add support for item tab icon suppliers. | Add support for item tab icon suppliers.
| Java | lgpl-2.1 | Darkhax-Minecraft/Bookshelf | java | ## Code Before:
package net.darkhax.bookshelf.api.item;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.CreativeModeTab;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
import net.minecraft.world.level.ItemLike;
import java.u... |
37dd74cc1ba4a08a8d55ae2ea610f7d2ed8b518e | _protected/app/system/modules/payment/inc/class/GroupId.php | _protected/app/system/modules/payment/inc/class/GroupId.php | <?php
/**
* @author Pierre-Henry Soria <ph7software@gmail.com>
* @copyright (c) 2018, Pierre-Henry Soria. All Rights Reserved.
* @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @package PH7 / App / System / Module / Payment / Inc / C... | <?php
/**
* @author Pierre-Henry Soria <ph7software@gmail.com>
* @copyright (c) 2018, Pierre-Henry Soria. All Rights Reserved.
* @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @package PH7 / App / System / Module / Payment / Inc / C... | Make Default Membership ID value modifiable from the method | Make Default Membership ID value modifiable from the method
| PHP | mit | pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS | php | ## Code Before:
<?php
/**
* @author Pierre-Henry Soria <ph7software@gmail.com>
* @copyright (c) 2018, Pierre-Henry Soria. All Rights Reserved.
* @license GNU General Public License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory.
* @package PH7 / App / System / Module / P... |
0c4a26f20a9d3add76d208b31d36426ab9baafea | assets/js/effects.js | assets/js/effects.js | 'use strict';
/*
effects.js
Contains the functionality for the scrolling fixed menu
and the popup menu toggle
*/
$(document).ready(function(){
/* Menu Pop up Toggle */
$('#popmenu').click( function(){
$('#popup-menu').toggle('hide');
});
/* Smooth Scrolling */
$(function() {
$('a[href*="#"]... | 'use strict';
/*
effects.js
Contains the functionality for the scrolling fixed menu
and the popup menu toggle
*/
$(document).ready(function(){
/* Menu Pop up Toggle */
$('#popmenu').click( function(){
$('#popup-menu').toggle('hide');
});
/* Smooth Scrolling */
$(function() {
$('a[href*="#"]:... | Improve visibility of nav bar text on page scroll | Improve visibility of nav bar text on page scroll
Also matches footer now as well.
| JavaScript | mit | DanLaRoche/codeforfoco.github.io,CodeForFoco/codeforfoco.github.io,DanLaRoche/codeforfoco.github.io,CodeForFoco/codeforfoco.github.io,DanLaRoche/codeforfoco.github.io,CodeForFoco/codeforfoco.github.io | javascript | ## Code Before:
'use strict';
/*
effects.js
Contains the functionality for the scrolling fixed menu
and the popup menu toggle
*/
$(document).ready(function(){
/* Menu Pop up Toggle */
$('#popmenu').click( function(){
$('#popup-menu').toggle('hide');
});
/* Smooth Scrolling */
$(function() {
... |
18992c0e70e2e9cfc52c3ec5978f6f18754ee820 | rails/app/views/policies/index.html.haml | rails/app/views/policies/index.html.haml | - content_for :title, 'Policies'
%h1= yield :title
%p
Policies are stated positions on a particular issue. For example
"Process asylum seekers offshore", or "Legalise same sex marriage".
Each policy has a definition and a way to vote in relevant
divisions in Parliament.
%ul
%li
%a{:href => "account/addpo... | - content_for :title, 'Policies'
%h1= yield :title
%p
Policies are stated positions on a particular issue. For example
"Process asylum seekers offshore", or "Legalise same sex marriage".
Each policy has a definition and a way to vote in relevant
divisions in Parliament.
%ul
%li
%a{:href => "account/addpo... | Tidy up and improve the HTML formatting | Tidy up and improve the HTML formatting
| Haml | agpl-3.0 | mysociety/publicwhip,mysociety/publicwhip,mysociety/publicwhip | haml | ## Code Before:
- content_for :title, 'Policies'
%h1= yield :title
%p
Policies are stated positions on a particular issue. For example
"Process asylum seekers offshore", or "Legalise same sex marriage".
Each policy has a definition and a way to vote in relevant
divisions in Parliament.
%ul
%li
%a{:href =... |
062a6493be23522bf363d94486b639be82e07d62 | package.json | package.json | {
"name": "asmsimulator",
"version": "0.5.1",
"description": "Simple 8-bit Assembler Simulator in Javascript",
"author": "Marco Schweighauser",
"license": "MIT",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-jshint"... | {
"name": "asmsimulator",
"version": "0.5.1",
"description": "Simple 8-bit Assembler Simulator in Javascript",
"author": "Marco Schweighauser",
"license": "MIT",
"devDependencies": {
"grunt": "~1.0.1",
"grunt-contrib-concat": "~1.0.1",
"grunt-contrib-uglify": "~2.3.0",
"grunt-contrib-jshint"... | Update dependencies to latest version | Update dependencies to latest version
| JSON | mit | ihmels/asmsimulator,ihmels/asmsimulator | json | ## Code Before:
{
"name": "asmsimulator",
"version": "0.5.1",
"description": "Simple 8-bit Assembler Simulator in Javascript",
"author": "Marco Schweighauser",
"license": "MIT",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-uglify": "~0.2.4",
"grunt... |
b8561df674c6362925a53205d93ca9383fc9bfc6 | tests/Timezone/Earth/Antarctica/PalmerTest.php | tests/Timezone/Earth/Antarctica/PalmerTest.php | <?php
declare(strict_types = 1);
namespace Tests\Innmind\TimeContinuum\Timezone\Earth\Antarctica;
use Innmind\TimeContinuum\{
Timezone\Earth\Antarctica\Palmer,
TimezoneInterface
};
class PalmerTest extends \PHPUnit_Framework_TestCase
{
public function testInterface()
{
$zone = new Palmer;
... | <?php
declare(strict_types = 1);
namespace Tests\Innmind\TimeContinuum\Timezone\Earth\Antarctica;
use Innmind\TimeContinuum\{
Timezone\Earth\Antarctica\Palmer,
TimezoneInterface
};
class PalmerTest extends \PHPUnit_Framework_TestCase
{
public function testInterface()
{
$zone = new Palmer;
... | Revert "do not test the dst for palmer (do not understand php behaviour for this one)" | Revert "do not test the dst for palmer (do not understand php behaviour for this one)"
This reverts commit a830d15881d2aafb11357c4591568ea53c60a22b.
| PHP | mit | Innmind/TimeContinuum | php | ## Code Before:
<?php
declare(strict_types = 1);
namespace Tests\Innmind\TimeContinuum\Timezone\Earth\Antarctica;
use Innmind\TimeContinuum\{
Timezone\Earth\Antarctica\Palmer,
TimezoneInterface
};
class PalmerTest extends \PHPUnit_Framework_TestCase
{
public function testInterface()
{
$zone =... |
97c89395eb34093f103cc8816c1d2420e6c8e44d | index.php | index.php | <?php
require_once('config.inc.php');
require_once('misc.inc.php');
require_once('db.inc.php');
require_once('html.inc.php');
date_default_timezone_set('Europe/Berlin');
setlocale(LC_TIME, 'de_DE');
session_start();
// Actual content generation:
$db = new db();
switch ($_GET['view']) {
case 'login':
$source = ... | <?php
require_once('config.inc.php');
require_once('misc.inc.php');
require_once('db.inc.php');
require_once('html.inc.php');
date_default_timezone_set('Europe/Berlin');
setlocale(LC_TIME, 'de_DE');
session_start();
// Actual content generation:
$db = new db();
switch ($_GET['view']) {
case 'public':
authentic... | Make login the default view | Make login the default view
Signed-off-by: Josua Grawitter <c028c213ed5efcf30c3f4fc7361dbde0c893c5b7@greyage.org>
| PHP | agpl-3.0 | gwater/rlo-plan,gwater/rlo-plan | php | ## Code Before:
<?php
require_once('config.inc.php');
require_once('misc.inc.php');
require_once('db.inc.php');
require_once('html.inc.php');
date_default_timezone_set('Europe/Berlin');
setlocale(LC_TIME, 'de_DE');
session_start();
// Actual content generation:
$db = new db();
switch ($_GET['view']) {
case 'login'... |
b6ccc6b6ae6c5fab45f7a27dbecbda88cc8775b8 | SplitNavigation.py | SplitNavigation.py | import sublime, sublime_plugin
class SplitNavigationCommand(sublime_plugin.TextCommand):
def run(self, edit, direction):
win = self.view.window()
num = win.num_groups()
act = win.active_group()
if direction == "up":
act = act + 1
else:
act = act - 1
win.focus_group(act % num)
| import sublime, sublime_plugin
def focusNext(win):
act = win.active_group()
num = win.num_groups()
act += 1
if act >= num:
act = 0
win.focus_group(act)
if len(win.views_in_group(act)) == 0:
focusNext(win)
def focusPrev(win):
act = win.active_group()
num = win.num_groups()
act -= 1
if act < 0:
act... | Fix some weird action when user navigates between blank groups. | Fix some weird action when user navigates between blank groups.
| Python | mit | oleander/sublime-split-navigation,oleander/sublime-split-navigation | python | ## Code Before:
import sublime, sublime_plugin
class SplitNavigationCommand(sublime_plugin.TextCommand):
def run(self, edit, direction):
win = self.view.window()
num = win.num_groups()
act = win.active_group()
if direction == "up":
act = act + 1
else:
act = act - 1
win.focus_group(act % num)
## I... |
bb80a73b4120a8bdd241f475e50ca76fa5d2801f | app/views/layouts/_footer.html.erb | app/views/layouts/_footer.html.erb | <!-- FOOTER -->
<footer class="footer-height">
<hr>
<p ><a href="#">Back to top</a></p>
<p>© 2014-2018 Holly Moody, Developer (hollymoody@charter.net) · <%= link_to "Terms", welcome_license_path %></p>
</footer>
| <!-- FOOTER -->
<footer class="footer-height">
<hr>
<p ><a href="#">Back to top</a></p>
<p>© 2014-2018 <%= link_to "Holly Moody", "http://www.linkedin.com/in/hollycmoody/", target: "_blank" %> · <%= link_to "Terms", welcome_license_path %></p>
</footer>
| Tweak copyright to link to my linkedin profile. | Tweak copyright to link to my linkedin profile.
| HTML+ERB | mit | HollyM021980/DnDCharacterSheet,HollyM021980/DnDCharacterSheet | html+erb | ## Code Before:
<!-- FOOTER -->
<footer class="footer-height">
<hr>
<p ><a href="#">Back to top</a></p>
<p>© 2014-2018 Holly Moody, Developer (hollymoody@charter.net) · <%= link_to "Terms", welcome_license_path %></p>
</footer>
## Instruction:
Tweak copyright to link to my linkedin profile.
## Code ... |
548fb65618dfce8aa43671f79231628a773a8f88 | imagekit/admin.py | imagekit/admin.py | from django.utils.translation import ugettext_lazy as _
from django.template.loader import render_to_string
class AdminThumbnail(object):
"""
A convenience utility for adding thumbnails to Django's admin change list.
"""
short_description = _('Thumbnail')
allow_tags = True
def __init__(self,... | from django.utils.translation import ugettext_lazy as _
from django.template.loader import render_to_string
class AdminThumbnail(object):
"""
A convenience utility for adding thumbnails to Django's admin change list.
"""
short_description = _('Thumbnail')
allow_tags = True
def __init__(self,... | Allow callables for AdminThumbnail image_field arg | Allow callables for AdminThumbnail image_field arg
This allows images from related models to be displayed. Closes #138.
| Python | bsd-3-clause | pcompassion/django-imagekit,pcompassion/django-imagekit,tawanda/django-imagekit,pcompassion/django-imagekit,tawanda/django-imagekit,FundedByMe/django-imagekit,FundedByMe/django-imagekit | python | ## Code Before:
from django.utils.translation import ugettext_lazy as _
from django.template.loader import render_to_string
class AdminThumbnail(object):
"""
A convenience utility for adding thumbnails to Django's admin change list.
"""
short_description = _('Thumbnail')
allow_tags = True
de... |
2b612556339a343a7b5b5853117e4aa1cdeb710b | app/src/main/kotlin/com/github/ramonrabello/kiphy/trends/data/TrendingRepository.kt | app/src/main/kotlin/com/github/ramonrabello/kiphy/trends/data/TrendingRepository.kt | package com.github.ramonrabello.kiphy.trends.data
import io.reactivex.Single
class TrendingRepository(
private val localDataSource: TrendingDataSource,
private val remoteDataSource: TrendingDataSource) {
fun loadTrending() = Single.merge(
remoteDataSource.loadTrending(),
l... | package com.github.ramonrabello.kiphy.trends.data
import com.github.ramonrabello.kiphy.trends.data.source.TrendingDataSource
import io.reactivex.Single
class TrendingRepository(
private val localDataSource: TrendingDataSource,
private val remoteDataSource: TrendingDataSource) {
fun loadTrending()... | Update constructor to use both local and remote data source. | Update constructor to use both local and remote data source.
| Kotlin | apache-2.0 | ramonrabello/Kiphy | kotlin | ## Code Before:
package com.github.ramonrabello.kiphy.trends.data
import io.reactivex.Single
class TrendingRepository(
private val localDataSource: TrendingDataSource,
private val remoteDataSource: TrendingDataSource) {
fun loadTrending() = Single.merge(
remoteDataSource.loadTrending(... |
6e8a5687a38b837ab606e84a8177ea74edfaad12 | src/buildercore/fastly/vcl/original-host.vcl | src/buildercore/fastly/vcl/original-host.vcl | set req.http.X-Forwarded-Host = req.http.host;
| if (!req.http.Fastly-FF) {
set req.http.X-Forwarded-Host = req.http.host;
}
| Make X-Forwarded-Host compatible with Fastly shielding | Make X-Forwarded-Host compatible with Fastly shielding
| VCL | mit | elifesciences/builder,elifesciences/builder | vcl | ## Code Before:
set req.http.X-Forwarded-Host = req.http.host;
## Instruction:
Make X-Forwarded-Host compatible with Fastly shielding
## Code After:
if (!req.http.Fastly-FF) {
set req.http.X-Forwarded-Host = req.http.host;
}
|
33ceea40e41d9f568b11e30779b8b7c16ba8f5b8 | bench/split-file.py | bench/split-file.py |
import sys
prefix = sys.argv[1]
filename = sys.argv[2]
f = open(filename)
sf = None
for line in f:
if line.startswith('Processing database:'):
if sf:
sf.close()
line2 = line.split(':')[1]
# Check if entry is compressed and if has to be processed
line2 = line2[:line2.rfi... |
import sys
prefix = sys.argv[1]
filename = sys.argv[2]
f = open(filename)
sf = None
for line in f:
if line.startswith('Processing database:'):
if sf:
sf.close()
line2 = line.split(':')[1]
# Check if entry is compressed and if has to be processed
line2 = line2[:line2.rfi... | Support for splitting outputs for PyTables and Postgres indexing benchmarks all in one. | Support for splitting outputs for PyTables and Postgres indexing
benchmarks all in one.
git-svn-id: 92c705c98a17f0f7623a131b3c42ed50fcde59b4@2885 1b98710c-d8ec-0310-ae81-f5f2bcd8cb94
| Python | bsd-3-clause | jennolsen84/PyTables,rabernat/PyTables,avalentino/PyTables,jack-pappas/PyTables,rdhyee/PyTables,gdementen/PyTables,joonro/PyTables,PyTables/PyTables,mohamed-ali/PyTables,andreabedini/PyTables,tp199911/PyTables,jennolsen84/PyTables,tp199911/PyTables,dotsdl/PyTables,cpcloud/PyTables,tp199911/PyTables,FrancescAlted/PyTabl... | python | ## Code Before:
import sys
prefix = sys.argv[1]
filename = sys.argv[2]
f = open(filename)
sf = None
for line in f:
if line.startswith('Processing database:'):
if sf:
sf.close()
line2 = line.split(':')[1]
# Check if entry is compressed and if has to be processed
line2 = ... |
1e5ebe3c3430888821c77b5b23213f382333598e | src/lunch.coffee | src/lunch.coffee |
module.exports = (robot) ->
robot.hear /lunch/i, (msg) ->
if ! isPastLunchTime() then msg.reply "Hey #{msg.message.user.name}, isn't it a bit early to start talking about lunch?"
isPastLunchTime = (time) ->
return time.getHours() > 12
|
module.exports = (robot) ->
robot.hear /lunch/i, (msg) ->
if ! isPastLunchTime() then msg.reply "Hey #{msg.message.user.name}, isn't it a bit early to start talking about lunch?"
isPastLunchTime = ->
return new Date().getHours() > 12
| Use the date object instead of a param | Use the date object instead of a param
| CoffeeScript | mit | arosenb2/hubot-lunch | coffeescript | ## Code Before:
module.exports = (robot) ->
robot.hear /lunch/i, (msg) ->
if ! isPastLunchTime() then msg.reply "Hey #{msg.message.user.name}, isn't it a bit early to start talking about lunch?"
isPastLunchTime = (time) ->
return time.getHours() > 12
## Instruction:
Use the date object instead of a param
##... |
fc86ddacda98160646e0301fb21f6ebfbc271794 | configs/virtualwire.json | configs/virtualwire.json | {
"name": "VirtualWire",
"keywords": "rf, radio, protocol",
"description": "It provides a simple message passing protocol for a range of inexpensive transmitter and receiver modules",
"authors":
{
"name": "Mike McCauley",
"email": "mikem@airspayce.com"
},
"version": "1.15",
"downloadUrl": "https... | {
"name": "VirtualWire",
"keywords": "rf, radio, protocol",
"description": "It provides a simple message passing protocol for a range of inexpensive transmitter and receiver modules",
"authors":
{
"name": "Mike McCauley",
"email": "mikem@airspayce.com"
},
"version": "1.15",
"downloadUrl": "https... | Update config for VirtualWire library | Update config for VirtualWire library | JSON | apache-2.0 | platformio/platformio-libmirror,platformio/platformio-libmirror | json | ## Code Before:
{
"name": "VirtualWire",
"keywords": "rf, radio, protocol",
"description": "It provides a simple message passing protocol for a range of inexpensive transmitter and receiver modules",
"authors":
{
"name": "Mike McCauley",
"email": "mikem@airspayce.com"
},
"version": "1.15",
"down... |
44728ce3574b7459e2c9304383fe2c1dc2dc0b8b | Source/Model/Connecting/Socket/Tcp/Method/MConnectingSocketTcpMethodTypeFactory.swift | Source/Model/Connecting/Socket/Tcp/Method/MConnectingSocketTcpMethodTypeFactory.swift | import Foundation
extension MConnectingSocketTcpMethodType
{
private static func factoryMethod(
type:MConnectingSocketTcpMethodType) -> MConnectingSocketTcpMethodProtocol.Type
{
switch type
{
case MConnectingSocketTcpMethodType.showpin:
return MConnectin... | import Foundation
extension MConnectingSocketTcpMethodType
{
private static let kMethodMap:[
MConnectingSocketTcpMethodType:
MConnectingSocketTcpMethodProtocol.Type] = [
MConnectingSocketTcpMethodType.showpin:
MConnectingSocketTcpMethodShowpin.self,
MConnecti... | Replace switch with method map | Replace switch with method map
| Swift | mit | devpunk/velvet_room,devpunk/velvet_room | swift | ## Code Before:
import Foundation
extension MConnectingSocketTcpMethodType
{
private static func factoryMethod(
type:MConnectingSocketTcpMethodType) -> MConnectingSocketTcpMethodProtocol.Type
{
switch type
{
case MConnectingSocketTcpMethodType.showpin:
r... |
0173d18e2c88f4b944b3b12df2259fb0d26fee1d | drogher/shippers/dhl.py | drogher/shippers/dhl.py | from .base import Shipper
class DHL(Shipper):
barcode_pattern = r'^\d{10}$'
shipper = 'DHL'
| from .base import Shipper
class DHL(Shipper):
barcode_pattern = r'^\d{10}$'
shipper = 'DHL'
@property
def valid_checksum(self):
sequence, check_digit = self.tracking_number[:-1], self.tracking_number[-1]
return int(sequence) % 7 == int(check_digit)
| Add DHL waybill checksum validation | Add DHL waybill checksum validation
| Python | bsd-3-clause | jbittel/drogher | python | ## Code Before:
from .base import Shipper
class DHL(Shipper):
barcode_pattern = r'^\d{10}$'
shipper = 'DHL'
## Instruction:
Add DHL waybill checksum validation
## Code After:
from .base import Shipper
class DHL(Shipper):
barcode_pattern = r'^\d{10}$'
shipper = 'DHL'
@property
def valid_ch... |
950cafe0db61fa10d1a024261fcd43a2c5a12525 | CONTRIBUTING.md | CONTRIBUTING.md |
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
**Working on your first Pull Request?** You can learn how from this *free* series
[How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).
Please join our [Slac... |
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
**Working on your first Pull Request?** You can learn how from this *free* series
[How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).
Please join our [Slac... | Add instructions on how to build docs | Add instructions on how to build docs | Markdown | mit | xanecs/hydrogen,nteract/hydrogen,rgbkrk/hydrogen,nteract/hydrogen | markdown | ## Code Before:
:+1::tada: First off, thanks for taking the time to contribute! :tada::+1:
**Working on your first Pull Request?** You can learn how from this *free* series
[How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github).
Pleas... |
2a350a6ad1aff1c34a5970ce029e9b2b27fed5a6 | README.md | README.md | Qnoise
======
A simple tool to generate noises in a given source data.
| Qnoise <img src="https://api.travis-ci.org/Qatar-Computing-Research-Institute/Qnoise.png" />
======
### What is Qnoise?
Qnoise is a Java based noise data generator, developed by the data analytic group at [Qatar Computing Research Institute](da.qcri.org).
### See it in Action
```
usage: qnoise.sh -f <input csv fil... | Update the readme with travis support. | Update the readme with travis support. | Markdown | mit | Qatar-Computing-Research-Institute/Qnoise,Qatar-Computing-Research-Institute/Qnoise,Qatar-Computing-Research-Institute/Qnoise,Qatar-Computing-Research-Institute/Qnoise | markdown | ## Code Before:
Qnoise
======
A simple tool to generate noises in a given source data.
## Instruction:
Update the readme with travis support.
## Code After:
Qnoise <img src="https://api.travis-ci.org/Qatar-Computing-Research-Institute/Qnoise.png" />
======
### What is Qnoise?
Qnoise is a Java based noise data gener... |
04bf65fa025902f92cd80b87f95c276e32487af0 | tensorflow_datasets/image/binary_alpha_digits_test.py | tensorflow_datasets/image/binary_alpha_digits_test.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import binary_alpha_digits
import tensorflow_datasets.testing as tfds_test
class BinaryAlphaDigitsTest(tfds_test.DatasetBuilderTestCase):
DATASET_CLAS... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import binary_alpha_digits
import tensorflow_datasets.testing as tfds_test
class BinaryAlphaDigitsTest(tfds_test.DatasetBuilderTestCase):
DATASET_CLAS... | Fix in test file for Binary Alpha Digit Dataset Issue-189 | Fix in test file for Binary Alpha Digit Dataset Issue-189
| Python | apache-2.0 | tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets,tensorflow/datasets | python | ## Code Before:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow_datasets.image import binary_alpha_digits
import tensorflow_datasets.testing as tfds_test
class BinaryAlphaDigitsTest(tfds_test.DatasetBuilderTestCase):
... |
9e591927718cfa898d3ffddeefdd0c5185f22ce4 | graf3d/glew/CMakeLists.txt | graf3d/glew/CMakeLists.txt |
include_directories(${OPENGL_INCLUDE_DIR})
ROOT_LINKER_LIBRARY(GLEW *.c LIBRARIES ${OPENGL_LIBRARIES})
ROOT_INSTALL_HEADERS()
|
include_directories(${OPENGL_INCLUDE_DIR})
# Do not install headers for all platforms and configurations.
if(UNIX)
set(installoptions OPTIONS REGEX "wglew" EXCLUDE)
else() # Windows
set(installoptions OPTIONS REGEX "glew" EXCLUDE)
endif()
if(NOT x11)
set(installoptions ${installoptions} OPTIONS REGEX "glxew" EX... | Install only the relevant headers depending on the platform. | Install only the relevant headers depending on the platform.
| Text | lgpl-2.1 | zzxuanyuan/root-compressor-dummy,zzxuanyuan/root,beniz/root,gbitzes/root,simonpf/root,karies/root,bbockelm/root,bbockelm/root,gbitzes/root,mhuwiler/rootauto,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,simonpf/root,karies/root,olifre/root,mhuwiler/rootauto,beniz/root,bbockelm/root,mhuwiler/rootauto,agarciamonto... | text | ## Code Before:
include_directories(${OPENGL_INCLUDE_DIR})
ROOT_LINKER_LIBRARY(GLEW *.c LIBRARIES ${OPENGL_LIBRARIES})
ROOT_INSTALL_HEADERS()
## Instruction:
Install only the relevant headers depending on the platform.
## Code After:
include_directories(${OPENGL_INCLUDE_DIR})
# Do not install headers for all plat... |
a345269b75d83af93290c61953ed255a6b27d5be | disable-autofocus.sh | disable-autofocus.sh | CAMERA = video0
# Disable autofocus
uvcdynctrl -v -d $CAMERA --set='Focus, Auto' 0
# Fix the focus
uvcdynctrl -v -d $CAMERA --set='Focus (absolute)' 30
| uvcdynctrl -v -d video0 --set='Focus, Auto' 0
# Fix the focus
uvcdynctrl -v -d video0 --set='Focus (absolute)' 0
# Fix the power line frequency
uvcdynctrl -v -d video0 --set='Power Line Frequency' 1
| Add the power line frequency setup. | Add the power line frequency setup.
| Shell | mit | microy/RobotVision,microy/RobotVision | shell | ## Code Before:
CAMERA = video0
# Disable autofocus
uvcdynctrl -v -d $CAMERA --set='Focus, Auto' 0
# Fix the focus
uvcdynctrl -v -d $CAMERA --set='Focus (absolute)' 30
## Instruction:
Add the power line frequency setup.
## Code After:
uvcdynctrl -v -d video0 --set='Focus, Auto' 0
# Fix the focus
uvcdynctrl -v -d v... |
62b88141b8a5642fabc36e951ea0a15f41b95f2c | .travis.yml | .travis.yml | language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
matrix:
include:
- php: 5.4
- php: 5.5
- php: 5.6
- php: 5.6
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
- php: nightly
allow_failures:
- php: nightly
fast_finish: true
install: composer update ... | language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
matrix:
include:
- php: 5.4
- php: 5.5
- php: 5.6
- php: 5.6
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
- php: 7
- php: hhvm
install: composer update $COMPOSER_FLAGS -n
script: vendor/bin/phpunit
| Add support of PHP7 and HHVM | Add support of PHP7 and HHVM
| YAML | mit | FriendsOfSymfony/FOSMessage | yaml | ## Code Before:
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
matrix:
include:
- php: 5.4
- php: 5.5
- php: 5.6
- php: 5.6
env: COMPOSER_FLAGS='--prefer-lowest --prefer-stable'
- php: nightly
allow_failures:
- php: nightly
fast_finish: true
install: ... |
831ce8e749e194caa93c43d917a4671a5ead7634 | .travis.yml | .travis.yml | sudo: required
services:
- docker
language: python
python:
- 3.6
env:
- DOCKER_COMPOSE_VERSION=1.21.2
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- c... | sudo: required
services:
- docker
language: python
python:
- 3.6
env:
- DOCKER_COMPOSE_VERSION=1.21.2
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- c... | Fix clash with Travis postgres server | Fix clash with Travis postgres server
| YAML | apache-2.0 | comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django | yaml | ## Code Before:
sudo: required
services:
- docker
language: python
python:
- 3.6
env:
- DOCKER_COMPOSE_VERSION=1.21.2
before_install:
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > dock... |
ac28ed12b1eddebd493f67e1bfa0f451f73e9a8f | lib/mix/lib/mix/tasks/iex.ex | lib/mix/lib/mix/tasks/iex.ex | defmodule Mix.Tasks.Iex do
use Mix.Task
@hidden true
def run(_) do
raise Mix.Error, message: "Cannot start IEx after the VM was booted. " <>
"To use IEx with Mix, please run: iex -S mix"
end
end
| defmodule Mix.Tasks.Iex do
use Mix.Task
@hidden true
@moduledoc false
def run(_) do
raise Mix.Error, message: "Cannot start IEx after the VM was booted. " <>
"To use IEx with Mix, please run: iex -S mix"
end
end
| Make IEx task with @moduledoc false | Make IEx task with @moduledoc false
| Elixir | apache-2.0 | antipax/elixir,gfvcastro/elixir,joshprice/elixir,antipax/elixir,ggcampinho/elixir,kimshrier/elixir,kelvinst/elixir,gfvcastro/elixir,lexmag/elixir,kimshrier/elixir,lexmag/elixir,beedub/elixir,pedrosnk/elixir,pedrosnk/elixir,michalmuskala/elixir,ggcampinho/elixir,kelvinst/elixir,elixir-lang/elixir,beedub/elixir | elixir | ## Code Before:
defmodule Mix.Tasks.Iex do
use Mix.Task
@hidden true
def run(_) do
raise Mix.Error, message: "Cannot start IEx after the VM was booted. " <>
"To use IEx with Mix, please run: iex -S mix"
end
end
## Instruction:
Make IEx task with @moduledoc false
## Code Aft... |
64e4137f436983af4faa0761a690f226544cc433 | .travis.yml | .travis.yml | language: node_js
node_js:
- "0.10"
- "0.12"
- "4"
- "6"
before_install:
# setup apt package
- sudo apt-get update
- sudo apt-get install g++
- sudo apt-get install zlib1g-dev
# build kyotocabinet
- wget http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.76.tar.gz
- tar zxvf kyotocabinet-1.2.76... | language: node_js
node_js:
- "0.12"
- "4"
- "6"
before_install:
# setup apt package
- sudo apt-get update
- sudo apt-get install g++
- sudo apt-get install zlib1g-dev
# build kyotocabinet
- wget http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.76.tar.gz
- tar zxvf kyotocabinet-1.2.76.tar.gz
-... | Drop support for Node.js 0.10 | Drop support for Node.js 0.10
| YAML | mit | kamoqq/node-kt-client,kamoqq/kt-client | yaml | ## Code Before:
language: node_js
node_js:
- "0.10"
- "0.12"
- "4"
- "6"
before_install:
# setup apt package
- sudo apt-get update
- sudo apt-get install g++
- sudo apt-get install zlib1g-dev
# build kyotocabinet
- wget http://fallabs.com/kyotocabinet/pkg/kyotocabinet-1.2.76.tar.gz
- tar zxvf kyo... |
0fdc4f87395d449892f945466369d812a04855b4 | .emacs.d/config/package.el | .emacs.d/config/package.el | (require 'package)
;; add-to-list add to list's front unless by t
;; reset
;;(setq package-archives nil)
;; default GNU ELPA
;; (add-to-list 'package-archives
;; '("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives
'("org" . "http://orgmode.org/elpa/"))
;; Milkypostman's Emacs Lisp... | (require 'package)
;; add-to-list add to list's front unless by t
;; reset
;;(setq package-archives nil)
;; default GNU ELPA
;; (add-to-list 'package-archives
;; '("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives
'("org" . "http://orgmode.org/elpa/"))
;; Milkypostman's Emacs Lisp... | Use clj-refactor in Melpa to work with cider 0.10.0, which requires clj-refactor 2.0.0-SNAPSHOT. | Use clj-refactor in Melpa to work with cider 0.10.0, which requires clj-refactor 2.0.0-SNAPSHOT.
| Emacs Lisp | apache-2.0 | pw4ever/dotemacs,pw4ever/dotemacs,pw4ever/dotemacs,pw4ever/dotemacs,pw4ever/dotemacs | emacs-lisp | ## Code Before:
(require 'package)
;; add-to-list add to list's front unless by t
;; reset
;;(setq package-archives nil)
;; default GNU ELPA
;; (add-to-list 'package-archives
;; '("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives
'("org" . "http://orgmode.org/elpa/"))
;; Milkypost... |
6d8622390a1649c03d59caee2a6eae8a0d184067 | scripts/cf-deliver.sh | scripts/cf-deliver.sh |
pushd `dirname $0`/.. > /dev/null
root=$(pwd -P)
popd > /dev/null
# gather some data about the repo
source $root/scripts/vars.sh
[ -f $root/app.$EXT ] && exit
mvn dependency:get \
-DremoteRepositories=nexus::default::$NEXUSURL \
-DrepositoryId=nexus \
-DartifactId=$APP \
-DgroupId=io.piazzageo \
-Dpackagi... |
pushd `dirname $0`/.. > /dev/null
root=$(pwd -P)
popd > /dev/null
# gather some data about the repo
source $root/scripts/vars.sh
[ -f $root/app.$EXT ] && exit
mvn dependency:get \
-DremoteRepositories=nexus::default::$NEXUSURL \
-DrepositoryId=nexus \
-DartifactId=$APP \
-DgroupId=io.piazzageo \
-Dpackagi... | Revert "Attempt to use destination property" | Revert "Attempt to use destination property"
This reverts commit 1a1bd46cc875167273284b4bfb7a2ff554945fde.
| Shell | epl-1.0 | venicegeo/pz-discover | shell | ## Code Before:
pushd `dirname $0`/.. > /dev/null
root=$(pwd -P)
popd > /dev/null
# gather some data about the repo
source $root/scripts/vars.sh
[ -f $root/app.$EXT ] && exit
mvn dependency:get \
-DremoteRepositories=nexus::default::$NEXUSURL \
-DrepositoryId=nexus \
-DartifactId=$APP \
-DgroupId=io.piazzag... |
85c81fffb1e091142d631b0aa579b4d8bd6d6e75 | .travis.yml | .travis.yml | language: ruby
script : script/cibuild
sudo: false
rvm:
- 2.3.1
- 2.2.5
- 2.1.9
env:
- ""
- JEKYLL_VERSION=3.0
- JEKYLL_VERSION=2.0
matrix:
include:
- # GitHub Pages
rvm: 2.1.1
env: GH_PAGES=true
- # Ruby 1.9
rvm: 1.9
env: JEKYLL_VERSION=2.0
| language: ruby
script : script/cibuild
sudo: false
rvm:
- 2.3.1
- 2.2.5
- 2.1.9
env:
- ""
- JEKYLL_VERSION=3.0
- JEKYLL_VERSION=2.0
matrix:
include:
- # GitHub Pages
rvm: 2.1.1
env: GH_PAGES=true
| Remove Travis test for Ruby 1.9 | Remove Travis test for Ruby 1.9
| YAML | mit | jekyll/jekyll-archives,jekyll/jekyll-archives,jekyll/jekyll-archives | yaml | ## Code Before:
language: ruby
script : script/cibuild
sudo: false
rvm:
- 2.3.1
- 2.2.5
- 2.1.9
env:
- ""
- JEKYLL_VERSION=3.0
- JEKYLL_VERSION=2.0
matrix:
include:
- # GitHub Pages
rvm: 2.1.1
env: GH_PAGES=true
- # Ruby 1.9
rvm: 1.9
env: JEKYLL_VERSION=2.0
## Instruction... |
779efe4ae9a6af8bf0ef8280e2e3968ed18f51f3 | public/js/app.js | public/js/app.js | var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
Hello, world! I am a CommentBox.
</div>
);
}
});
React.render(
<CommentBox />,
document.getElementById('content')
);
| /*
CommentBox
*/
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
<h1>Comments</h1>
<CommentList />
<CommentForm />
</div>
);
}
});
/*
CommentList
*/
var CommentList = React.createClass({
render: function() {
r... | Build CommentList and CommentForm components | Build CommentList and CommentForm components
| JavaScript | mit | thinkswan/react-comments,thinkswan/react-comments | javascript | ## Code Before:
var CommentBox = React.createClass({
render: function() {
return (
<div className="commentBox">
Hello, world! I am a CommentBox.
</div>
);
}
});
React.render(
<CommentBox />,
document.getElementById('content')
);
## Instruction:
Build CommentList and CommentForm com... |
4e2d78d3d547e286c1f4d7bf891e1ec9bd050452 | mobile/analytics/partners.js | mobile/analytics/partners.js | (function () {
'use strict'
$('.partner-profile-contact-email a').click(function (e) {
analytics.track('Clicked Contact Gallery Via Email', {
partner_id: $(e.currentTarget).data('partner-id'),
partner_slug: $(e.currentTarget).data('partner-slug')
})
})
$('.partner-profile-contact-website a... | (function () {
'use strict'
$('.partner-profile-contact-email a').click(function (e) {
analytics.track('Click',{
partner_id: $(e.currentTarget).data('partner-id'),
label: "Contact gallery by email"
});
})
$('.partner-profile-contact-website a').click(function (e) {
analytics.track('Cli... | Send 'Click' events rather than 'Clicked Gallery Website' | Send 'Click' events rather than 'Clicked Gallery Website'
| JavaScript | mit | damassi/force,cavvia/force-1,mzikherman/force,artsy/force-public,izakp/force,izakp/force,cavvia/force-1,erikdstock/force,oxaudo/force,izakp/force,oxaudo/force,erikdstock/force,anandaroop/force,anandaroop/force,xtina-starr/force,artsy/force-public,joeyAghion/force,oxaudo/force,joeyAghion/force,mzikherman/force,erikdstoc... | javascript | ## Code Before:
(function () {
'use strict'
$('.partner-profile-contact-email a').click(function (e) {
analytics.track('Clicked Contact Gallery Via Email', {
partner_id: $(e.currentTarget).data('partner-id'),
partner_slug: $(e.currentTarget).data('partner-slug')
})
})
$('.partner-profile-c... |
a0b0415cb069dde1ff57e657a5d2663f090e3363 | polyball/shared/model/Player.js | polyball/shared/model/Player.js | /**
* Created by Jared Rewerts on 3/7/2016.
*/
"use strict";
/**
* Each player owns it's own paddle. The already created paddle is passed into
* the constructor of Player in config.
*
* @param {{id: number,
* paddle: Paddle
* client: Client}} config
* @constructor
*/
var Player = function(c... | /**
* Created by Jared Rewerts on 3/7/2016.
*/
"use strict";
/**
* Each player owns it's own paddle. The already created paddle is passed into
* the constructor of Player in config.
*
* @param {{id: number,
* paddle: Paddle,
* arenaPosition: Number,
* client: Client}} config
* @con... | Add arenaposition state to player. | Add arenaposition state to player.
| JavaScript | mit | polyball/polyball,polyball/polyball | javascript | ## Code Before:
/**
* Created by Jared Rewerts on 3/7/2016.
*/
"use strict";
/**
* Each player owns it's own paddle. The already created paddle is passed into
* the constructor of Player in config.
*
* @param {{id: number,
* paddle: Paddle
* client: Client}} config
* @constructor
*/
var Pla... |
c8c9cfa77f0c0fdb895dfdbfc177db3c26dcedcc | swig/CMakeLists.txt | swig/CMakeLists.txt | INCLUDE( ${SWIG_USE_FILE} )
SET(CMAKE_SWIG_FLAGS -Werror -Wall -modern)
INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} )
SET_SOURCE_FILES_PROPERTIES(plist.i PROPERTIES CPLUSPLUS ON)
SWIG_ADD_MODULE( PList python plist.i )
SWIG_LINK_LIBRARIES( PList plist plist++ ${PYTHON_LIBRARIES} )
EXEC_PROGRAM("${PYTHON_EXECUTABLE}... | INCLUDE( ${SWIG_USE_FILE} )
SET(CMAKE_SWIG_FLAGS -Werror -Wall -modern)
INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} )
SET_SOURCE_FILES_PROPERTIES(plist.i PROPERTIES CPLUSPLUS ON)
SWIG_ADD_MODULE( PList python plist.i )
SWIG_LINK_LIBRARIES( PList plist plist++ ${PYTHON_LIBRARIES} )
EXEC_PROGRAM("${PYTHON_EXECUTABLE}... | Install python bindings in the right directory on 64bit machines. | Install python bindings in the right directory on 64bit machines.
| Text | lgpl-2.1 | libimobiledevice-win32/libplist,Tatsh/libplist,libimobiledevice/libplist,Tatsh/libplist,libimobiledevice/libplist,libimobiledevice/libplist,Tatsh/libplist,Tatsh/libplist,libimobiledevice-win32/libplist,libimobiledevice-win32/libplist,libimobiledevice-win32/libplist | text | ## Code Before:
INCLUDE( ${SWIG_USE_FILE} )
SET(CMAKE_SWIG_FLAGS -Werror -Wall -modern)
INCLUDE_DIRECTORIES( ${PYTHON_INCLUDE_PATH} )
SET_SOURCE_FILES_PROPERTIES(plist.i PROPERTIES CPLUSPLUS ON)
SWIG_ADD_MODULE( PList python plist.i )
SWIG_LINK_LIBRARIES( PList plist plist++ ${PYTHON_LIBRARIES} )
EXEC_PROGRAM("${PY... |
7295998abd322eb591626011ae5bed491cd26799 | src/test/java/net/sf/jabref/JabRefPreferencesTest.java | src/test/java/net/sf/jabref/JabRefPreferencesTest.java | package net.sf.jabref;
import static org.junit.Assert.assertEquals;
import java.io.File;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class JabRefPreferencesTest {
private JabRefPreferences prefs;
private JabRefPreferences backup;
@Before
public void setUp() {
... | package net.sf.jabref;
import static org.junit.Assert.assertEquals;
import java.io.File;
import java.nio.charset.StandardCharsets;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class JabRefPreferencesTest {
private JabRefPreferences prefs;
private JabRefPreferences backup;... | Add test for getting/setting default encoding in preferences | Add test for getting/setting default encoding in preferences
| Java | mit | grimes2/jabref,sauliusg/jabref,zellerdev/jabref,zellerdev/jabref,bartsch-dev/jabref,oscargus/jabref,obraliar/jabref,Braunch/jabref,motokito/jabref,obraliar/jabref,Braunch/jabref,mredaelli/jabref,tschechlovdev/jabref,JabRef/jabref,ayanai1/jabref,motokito/jabref,shitikanth/jabref,mredaelli/jabref,bartsch-dev/jabref,obral... | java | ## Code Before:
package net.sf.jabref;
import static org.junit.Assert.assertEquals;
import java.io.File;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class JabRefPreferencesTest {
private JabRefPreferences prefs;
private JabRefPreferences backup;
@Before
public ... |
7074cfd271da781ded38d612a88881c882e193dd | src/jquery-input-file-text.js | src/jquery-input-file-text.js | /**
*/
(function($) {
$.fn.inputFileText = function(userOptions) {
var MARKER_ATTRIBUTE = 'data-inputFileText';
if(this.attr(MARKER_ATTRIBUTE) === 'true') {
// Plugin has already been applied to input file element
return this;
}
var options = $.extend({
... | /**
*/
(function($) {
$.fn.inputFileText = function(userOptions) {
var MARKER_ATTRIBUTE = 'data-inputFileText';
if(this.attr(MARKER_ATTRIBUTE) === 'true') {
// Plugin has already been applied to input file element
return this;
}
var options = $.extend({
... | Fix for Chrome filepath C:\fakepath\ | Fix for Chrome filepath C:\fakepath\
| JavaScript | mit | datchung/jquery.inputFileText,datchung/jquery.inputFileText | javascript | ## Code Before:
/**
*/
(function($) {
$.fn.inputFileText = function(userOptions) {
var MARKER_ATTRIBUTE = 'data-inputFileText';
if(this.attr(MARKER_ATTRIBUTE) === 'true') {
// Plugin has already been applied to input file element
return this;
}
var option... |
f1155aa1648f7df67990b2c1511feaafc496df8b | www/ui/header.php | www/ui/header.php | <?php
require_once('ui/view.php');
require_once('inc/account.php');
class HeaderView extends View
{
public function show()
{
$current_user = Login::GetLoggedInUser();
if ($current_user === FALSE) {
?>
<a href="index.php">Home</a> |
<a href="login.php">... | <?php
require_once('ui/view.php');
require_once('inc/account.php');
class HeaderView extends View
{
public function show()
{
$current_user = Login::GetLoggedInUser();
if ($current_user === FALSE) {
?>
<a href="login.php">Log In</a> |
<a href="register... | Remove 'Home' link since it's useless. | Remove 'Home' link since it's useless.
| PHP | agpl-3.0 | defuse/php-newsgroups,defuse/php-newsgroups | php | ## Code Before:
<?php
require_once('ui/view.php');
require_once('inc/account.php');
class HeaderView extends View
{
public function show()
{
$current_user = Login::GetLoggedInUser();
if ($current_user === FALSE) {
?>
<a href="index.php">Home</a> |
<a h... |
e2821b56fb7cc4f3917e6c124f0e025c60a234a2 | integration_tests/setupStore.js | integration_tests/setupStore.js | // @flow
import { createStore, combineReducers, applyMiddleware } from 'redux'
import { routerReducer, routerMiddleware } from 'react-router-redux'
import { createMemoryHistory } from 'history'
import { createReducer } from 'redux-orm'
import createSagaMiddleware from 'redux-saga'
import sinon from 'sinon'
import orm f... | // @flow
import { createStore, combineReducers, applyMiddleware } from 'redux'
import { routerReducer, routerMiddleware } from 'react-router-redux'
import { createMemoryHistory } from 'history'
import { createReducer } from 'redux-orm'
import createSagaMiddleware from 'redux-saga'
import sinon from 'sinon'
import orm f... | Fix flow error in test store setup. | fix(flow): Fix flow error in test store setup.
| JavaScript | mit | jsonnull/aleamancer,jsonnull/aleamancer | javascript | ## Code Before:
// @flow
import { createStore, combineReducers, applyMiddleware } from 'redux'
import { routerReducer, routerMiddleware } from 'react-router-redux'
import { createMemoryHistory } from 'history'
import { createReducer } from 'redux-orm'
import createSagaMiddleware from 'redux-saga'
import sinon from 'sin... |
07edcea567eb0640edab0dda4f3dabbd0f2c3d98 | diary/templates/questions_base.html | diary/templates/questions_base.html | {% extends 'base.html' %}
{% block title %}Questions for Week {{ week.week }}{% endblock %}
{% block content %}
<form id="diary-form" action="{% url 'diary:record_answers' %}" method="POST">
{% csrf_token %}
<input type="hidden" name="week" value="{{ week.week }}">
{% block questions %}{% endblock %}
</form>
<script>... | {% extends 'base.html' %}
{% block title %}Questions for Week {{ week.week }}{% endblock %}
{% block content %}
<form id="diary-form" action="{% url 'diary:record_answers' %}" method="POST">
{% csrf_token %}
<input type="hidden" name="week" value="{{ week.week }}">
{% block questions %}{% endblock %}
<h1>6</h1>
... | Add a confirm page to the diary screens | Add a confirm page to the diary screens
To try and cut down on people accidentally submitting
| HTML | agpl-3.0 | mysociety/manchester-survey,mysociety/manchester-survey,mysociety/manchester-survey,mysociety/manchester-survey,mysociety/manchester-survey | html | ## Code Before:
{% extends 'base.html' %}
{% block title %}Questions for Week {{ week.week }}{% endblock %}
{% block content %}
<form id="diary-form" action="{% url 'diary:record_answers' %}" method="POST">
{% csrf_token %}
<input type="hidden" name="week" value="{{ week.week }}">
{% block questions %}{% endblock %}
... |
4647183697170ce22910bd6cde27746297543514 | python3_tools/get_edx_webservices.py | python3_tools/get_edx_webservices.py | import github
from get_repos import *
webservices = []
for repo in expanded_repos_list(orgs):
try:
metadata = get_remote_yaml(repo, 'openedx.yaml')
except github.GithubException:
continue
if 'tags' in metadata and 'webservice' in metadata['tags']:
print("{}".format(repo.html_url))... | import github
from get_repos import orgs, expanded_repos_list, get_remote_yaml
webservices = []
for repo in expanded_repos_list(orgs):
try:
metadata = get_remote_yaml(repo, 'openedx.yaml')
except github.GithubException:
continue
if 'tags' in metadata and 'webservice' in metadata['tags']:
... | Add tooling to get all of edx's web services. | Add tooling to get all of edx's web services.
| Python | apache-2.0 | edx/repo-tools,edx/repo-tools | python | ## Code Before:
import github
from get_repos import *
webservices = []
for repo in expanded_repos_list(orgs):
try:
metadata = get_remote_yaml(repo, 'openedx.yaml')
except github.GithubException:
continue
if 'tags' in metadata and 'webservice' in metadata['tags']:
print("{}".format... |
36d1df8c383002cdc75b66808e1b135607bd4883 | cli.ts | cli.ts |
/**
* Entry point for CLI.
* Validate args and kick off electron process so user doesn't have to invoke
* electron directly.
*/
import * as Child from "child_process";
import * as Path from "path";
import * as Yargs from "yargs";
import * as Args from "./arg-parsing";
// Parse cli args before requiring running e... |
/**
* Entry point for CLI.
* Validate args and kick off electron process so user doesn't have to invoke
* electron directly.
*/
import * as Child from "child_process";
import * as Path from "path";
import * as Yargs from "yargs";
import * as Args from "./arg-parsing";
// Parse cli args before requiring running e... | Use local version of electron | Use local version of electron
| TypeScript | mit | trodi/peer-review-cli,trodi/peer-review-cli | typescript | ## Code Before:
/**
* Entry point for CLI.
* Validate args and kick off electron process so user doesn't have to invoke
* electron directly.
*/
import * as Child from "child_process";
import * as Path from "path";
import * as Yargs from "yargs";
import * as Args from "./arg-parsing";
// Parse cli args before req... |
6935fbe97bf8ddfdcf6364e298f34bafc859035c | app/views/reaches/edit.erb | app/views/reaches/edit.erb |
<div class="container">
<center>
<h1> Update Reach </h1>
<div class="update_reach">
<form action="/reaches/<%= @reach.id %>" method="POST">
<input type="hidden" name="_method" value="PUT">
Contact name: <input type="text" name="reach[contact_name]" value="<%=@reach.contact_name %>"><br><br>
... |
<div class="container">
<center>
<h1> Update Reach </h1>
<div class="update_reach">
<form action="/reaches/<%= @reach.id %>" method="POST">
<input type="hidden" name="_method" value="PUT">
Contact name: <input type="text" name="reach[contact_name]" value="<%=@reach.contact_name %>"><br><br>
... | Fix check box for main reach | Fix check box for main reach
| HTML+ERB | mit | hypatiah/reach,hypatiah/reach,hypatiah/reach | html+erb | ## Code Before:
<div class="container">
<center>
<h1> Update Reach </h1>
<div class="update_reach">
<form action="/reaches/<%= @reach.id %>" method="POST">
<input type="hidden" name="_method" value="PUT">
Contact name: <input type="text" name="reach[contact_name]" value="<%=@reach.contact_name %>... |
c5f978ca2ab6040cdf5f60d6c3916df5d5c243ac | lib/rbplusplus/builders/extension.rb | lib/rbplusplus/builders/extension.rb | module RbPlusPlus
module Builders
# Extension node.
# There is only ever one of these in a project as this is
# the top level node for building a Ruby extension.
#
# Extensions are effectively Modules with some slightly different
# symantics, in that they expose to Kernel and have slightly
... | module RbPlusPlus
module Builders
# Extension node.
# There is only ever one of these in a project as this is
# the top level node for building a Ruby extension.
#
# Extensions are effectively Modules with some slightly different
# symantics, in that they expose to Kernel and have slightly
... | Make sure to take into account the same availability checks for global functions | Make sure to take into account the same availability checks for global functions
| Ruby | mit | jasonroelofs/rbplusplus,jasonroelofs/rbplusplus,jasonroelofs/rbplusplus,jasonroelofs/rbplusplus | ruby | ## Code Before:
module RbPlusPlus
module Builders
# Extension node.
# There is only ever one of these in a project as this is
# the top level node for building a Ruby extension.
#
# Extensions are effectively Modules with some slightly different
# symantics, in that they expose to Kernel and ... |
17797e2cded9aeab7bf4d7a005339a4af6944d34 | archive.go | archive.go | package gohandy
import (
"archive/tar"
"io"
"os"
"path/filepath"
)
func Unpack(r *tar.Reader, toPath string) error {
for {
hdr, err := r.Next()
if err == io.EOF {
break
}
if err != nil {
return err
}
err = nil
if hdr.Typeflag == tar.TypeDir {
dirpath := filepath.Join(toPath, hdr.Name)
... | package gohandy
import (
"archive/tar"
"io"
"os"
"path/filepath"
)
func Unpack(r *tar.Reader, toPath string) error {
for {
hdr, err := r.Next()
switch {
case err == io.EOF:
break
case err != nil:
return err
default:
if err := doOnType(hdr.Typeflag, toPath, hdr.Name, r); err != nil {
return... | Refactor to make code more readable. | Refactor to make code more readable.
| Go | mit | materials-commons/gohandy,materials-commons/gohandy | go | ## Code Before:
package gohandy
import (
"archive/tar"
"io"
"os"
"path/filepath"
)
func Unpack(r *tar.Reader, toPath string) error {
for {
hdr, err := r.Next()
if err == io.EOF {
break
}
if err != nil {
return err
}
err = nil
if hdr.Typeflag == tar.TypeDir {
dirpath := filepath.Join(toP... |
d3bd236c66fcc401499208441b332b87d45d1588 | src/reducers/reducer_weather.js | src/reducers/reducer_weather.js | export default function(state = null, action) {
return state;
} | import { FETCH_WEATHER } from "../actions/index";
export default function(state = [], action) {
switch (action.type) {
case FETCH_WEATHER:
// return state.concat([ action.payload.data ]);
return [ action.payload.data, ...state ]; // insert array at the top [ city, city, city, ...]
}
return state;
} | Add request payload data to state | Add request payload data to state
| JavaScript | mit | eduarmreyes/ReactWeatherApp,eduarmreyes/ReactWeatherApp | javascript | ## Code Before:
export default function(state = null, action) {
return state;
}
## Instruction:
Add request payload data to state
## Code After:
import { FETCH_WEATHER } from "../actions/index";
export default function(state = [], action) {
switch (action.type) {
case FETCH_WEATHER:
// return state.concat([ ac... |
319cd9449cda087fef68c838af04e5b89134e0f3 | content/W2015/W15-event-destress.md | content/W2015/W15-event-destress.md | Title: Big CSters Discussion Circles: De-Stressing
Date: 2015-03-05 18:00
Category: Events
Tags: social
Slug: de-stress
Author: Anna Lorimer
Summary: School is stressful! Come find out what strategies upper-year students use to handle their workload.
Big CSters would like to invite you to our first CSters discussion c... | Title: Big CSters Discussion Circles: De-Stressing
Date: 2015-03-05 18:00
Category: Events
Tags: social, big csters
Slug: destressing
Author: Anna Lorimer
Summary: School is stressful! Come find out what strategies upper-year students use to handle their workload.
Big CSters would like to invite you to our first CSter... | Update de-stress event with PR feedback | Update de-stress event with PR feedback
| Markdown | agpl-3.0 | claricen/website,ehashman/website-wics,ehashman/website-wics,fboxwala/website,annalorimer/website,annalorimer/website,annalorimer/website,claricen/website,arshiamufti/website,evykassirer/wics-website,ehashman/website-wics,evykassirer/wics-website,arshiamufti/website,arshiamufti/website,fboxwala/website,claricen/website... | markdown | ## Code Before:
Title: Big CSters Discussion Circles: De-Stressing
Date: 2015-03-05 18:00
Category: Events
Tags: social
Slug: de-stress
Author: Anna Lorimer
Summary: School is stressful! Come find out what strategies upper-year students use to handle their workload.
Big CSters would like to invite you to our first CSt... |
84429bfd02de1831f5080a944b9cb7cfea466239 | README.md | README.md |
Tracka Keepa is a time keeping web application. Specific features will a task interruption tracker, physical button integration and anything else that comes to mind. I expect the project will develop a personality as development progresses.
## Tests ##
Tests are run with Protractor and Cucumber. WebDriver must be ru... | [ ](https://codeship.com/projects/61691)
### What is Tracka Keepa ###
Tracka Keepa is a time keeping web application. Specific features will a task interruption tracker, physical butto... | Add Codeship status to readme | Add Codeship status to readme
| Markdown | mit | johnapost/tracka-keepa,johnapost/tracka-keepa | markdown | ## Code Before:
Tracka Keepa is a time keeping web application. Specific features will a task interruption tracker, physical button integration and anything else that comes to mind. I expect the project will develop a personality as development progresses.
## Tests ##
Tests are run with Protractor and Cucumber. WebD... |
4827551abdd2ecf9b87666c361e0bbb36544ce3c | gutentag.gemspec | gutentag.gemspec | Gem::Specification.new do |s|
s.name = 'gutentag'
s.version = '0.6.0'
s.authors = ['Pat Allan']
s.email = ['pat@freelancing-gods.com']
s.homepage = 'https://github.com/pat/gutentag'
s.summary = 'Good Tags'
s.description = 'A good, simple, solid tagging extension for ActiveRecor... | Gem::Specification.new do |s|
s.name = 'gutentag'
s.version = '0.6.0'
s.authors = ['Pat Allan']
s.email = ['pat@freelancing-gods.com']
s.homepage = 'https://github.com/pat/gutentag'
s.summary = 'Good Tags'
s.description = 'A good, simple, solid tagging extension for ActiveRecor... | Use latest release of bundler. | Use latest release of bundler.
Required for ruby_22 flag.
| Ruby | mit | pat/gutentag,pat/gutentag | ruby | ## Code Before:
Gem::Specification.new do |s|
s.name = 'gutentag'
s.version = '0.6.0'
s.authors = ['Pat Allan']
s.email = ['pat@freelancing-gods.com']
s.homepage = 'https://github.com/pat/gutentag'
s.summary = 'Good Tags'
s.description = 'A good, simple, solid tagging extension... |
2ba6fb3884d3b53438fbf25257bdf5f7ce07c7fc | sources/unicode.org/2014-code-mappings/meta.txt | sources/unicode.org/2014-code-mappings/meta.txt | URL: http://unicode.org/repos/cldr/trunk/common/supplemental/supplementalData.xml
XPath: /supplementalData/codeMappings/territoryCodes
Description:
Copyright © 1991-2013 Unicode, Inc.
CLDR data files are interpreted according to the LDML specification
(http://unicode.org/reports/tr35/)
For terms of use, see http://w... | URL: http://unicode.org/repos/cldr/trunk/common/supplemental/supplementalData.xml
XPath: /supplementalData/codeMappings/territoryCodes
Checked: 2015-02-04
Description:
Copyright © 1991-2013 Unicode, Inc.
CLDR data files are interpreted according to the LDML specification
(http://unicode.org/reports/tr35/)
For terms ... | Check data.csv vs source in XML format | Check data.csv vs source in XML format
I checked each code mapping and found no differences,
except leading zeros not displayed in numeric codes
in LibreOffice Calc (but present in the CSV).
| Text | cc0-1.0 | eric-brechemier/ipcc-countries,eric-brechemier/ipcc-countries | text | ## Code Before:
URL: http://unicode.org/repos/cldr/trunk/common/supplemental/supplementalData.xml
XPath: /supplementalData/codeMappings/territoryCodes
Description:
Copyright © 1991-2013 Unicode, Inc.
CLDR data files are interpreted according to the LDML specification
(http://unicode.org/reports/tr35/)
For terms of u... |
b16f72fcabaa3c65e8149f370a795ea030145c6f | config/routes.rb | config/routes.rb | Rails.application.routes.draw do
# Render legal documents by using Keiyaku CSS
# https://github.com/cognitom/keiyaku-css
resources :contracts, only: [:index, :show]
# Redirects
get "/releases/2016/12/12/new-backend", to: redirect('/news/2016/12/12/new-backend')
get "/blogs/2016/12/12/new-backend", to: r... | Rails.application.routes.draw do
# Render legal documents by using Keiyaku CSS
# https://github.com/cognitom/keiyaku-css
resources :contracts, only: [:index, :show], path: '/mou'
# Redirects
get "/releases/2016/12/12/new-backend", to: redirect('/news/2016/12/12/new-backend')
get "/blogs/2016/12/12/new-back... | Change routing from /contracts to /mou | Change routing from /contracts to /mou
| Ruby | mit | yasslab/coderdojo.jp,yasslab/coderdojo.jp,coderdojo-japan/coderdojo.jp,coderdojo-japan/coderdojo.jp,yasslab/coderdojo.jp,coderdojo-japan/coderdojo.jp,coderdojo-japan/coderdojo.jp | ruby | ## Code Before:
Rails.application.routes.draw do
# Render legal documents by using Keiyaku CSS
# https://github.com/cognitom/keiyaku-css
resources :contracts, only: [:index, :show]
# Redirects
get "/releases/2016/12/12/new-backend", to: redirect('/news/2016/12/12/new-backend')
get "/blogs/2016/12/12/new-ba... |
dd29c72b58581a4a56d7432944514ca11de888bd | lisp/init-locales.el | lisp/init-locales.el | ;;; init-locales.el --- Configure default locale -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(defun sanityinc/utf8-locale-p (v)
"Return whether locale string V relates to a UTF-8 locale."
(and v (string-match "UTF-8" v)))
(defun sanityinc/locale-is-utf8-p ()
"Return t iff the \"locale\" command or envi... | ;;; init-locales.el --- Configure default locale -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(defun sanityinc/utf8-locale-p (v)
"Return whether locale string V relates to a UTF-8 locale."
(and v (string-match "UTF-8" v)))
(defun sanityinc/locale-is-utf8-p ()
"Return t iff the \"locale\" command or envi... | Remove redundant coding system configuration | Remove redundant coding system configuration
| Emacs Lisp | bsd-2-clause | lust4life/emacs.d,arthurl/emacs.d,benkha/emacs.d,purcell/emacs.d,sgarciac/emacs.d,baohaojun/emacs.d,dcorking/emacs.d,krzysz00/emacs.d,svenyurgensson/emacs.d,cjqw/emacs.d,braveoyster/emacs.d,wegatron/emacs.d,gsmlg/emacs.d,emuio/emacs.d,blueseason/emacs.d,qianwan/emacs.d,blueabysm/emacs.d | emacs-lisp | ## Code Before:
;;; init-locales.el --- Configure default locale -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
(defun sanityinc/utf8-locale-p (v)
"Return whether locale string V relates to a UTF-8 locale."
(and v (string-match "UTF-8" v)))
(defun sanityinc/locale-is-utf8-p ()
"Return t iff the \"locale\"... |
7e6c617988e7982d319f099da5fd3f0d4e689ead | README.md | README.md | Early Stages Angular & Ionic Project.
[](https://travis-ci.org/kpratama24/earlyStagesInformatics-ionic)
#### This is a Github Repository for collaborating with 2017's Informatics Project Lecture.
---
## **Details**
... | Early Stages Angular & Ionic Project.
[](https://travis-ci.org/kpratama24/earlyStagesInformatics-ionic)
#### This is a Github Repository for collaborating with 2017's Informatics Project Lecture.
---
## **Details**
... | Update fungsi upload dan FrameApplier | Update fungsi upload dan FrameApplier
| Markdown | mit | kpratama24/earlyStagesInformatics-ionic,kpratama24/earlyStagesInformatics-ionic,kpratama24/earlyStagesInformatics-ionic | markdown | ## Code Before:
Early Stages Angular & Ionic Project.
[](https://travis-ci.org/kpratama24/earlyStagesInformatics-ionic)
#### This is a Github Repository for collaborating with 2017's Informatics Project Lecture.
---
## **D... |
81a379d4295da4cc1980a5187ba6c5634988305f | cmd/list_test.go | cmd/list_test.go | package cmd
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestListCmdHasUse(t *testing.T) {
assert.NotEmpty(t, ListCmd.Use)
}
func TestListCmdHasShort(t *testing.T) {
assert.NotEmpty(t, ListCmd.Short)
}
func TestListCmdHasLong(t *testing.T) {
assert.NotEmpty(t, ListCmd.Long)
}
func TestListC... | package cmd
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestListCmdHasUse(t *testing.T) {
assert.NotEmpty(t, ListCmd.Use)
}
func TestListCmdHasShort(t *testing.T) {
assert.NotEmpty(t, ListCmd.Short)
}
func TestListCmdHasLong(t *testing.T) {
assert.NotEmpty(t, ListCmd.Long)
}
func TestListC... | Add test for ls alias | Add test for ls alias
| Go | mit | hoop33/limo | go | ## Code Before:
package cmd
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestListCmdHasUse(t *testing.T) {
assert.NotEmpty(t, ListCmd.Use)
}
func TestListCmdHasShort(t *testing.T) {
assert.NotEmpty(t, ListCmd.Short)
}
func TestListCmdHasLong(t *testing.T) {
assert.NotEmpty(t, ListCmd.Long)
}... |
c8fd9cc1b0fd1c8dd283f3a89918c134b05c5c21 | src/bda/plone/shop/browser/shop.js | src/bda/plone/shop/browser/shop.js | /* jslint browser: true */
/* global jQuery */
(function($) {
"use strict";
$(document).ready(function() {
var binder = function(context) {
$('div.availability', context).unbind('mouseover')
.bind('mouseover', function() {
var details = $('div.availabilit... | /* jslint browser: true */
/* global jQuery, bdajax */
(function($, bdajax) {
"use strict";
$(document).ready(function() {
var binder = function(context) {
$('div.availability', context).unbind('mouseover')
.bind('mouseover', function() {
var details = $(... | Revert "dont pass bdajax. get it from window" | Revert "dont pass bdajax. get it from window"
This reverts commit 05393ce7c10b99eca03f1c8fb5c8f1a3abcc32b1.
| JavaScript | bsd-3-clause | TheVirtualLtd/bda.plone.shop,andreesg/bda.plone.shop,andreesg/bda.plone.shop,TheVirtualLtd/bda.plone.shop,TheVirtualLtd/bda.plone.shop,andreesg/bda.plone.shop | javascript | ## Code Before:
/* jslint browser: true */
/* global jQuery */
(function($) {
"use strict";
$(document).ready(function() {
var binder = function(context) {
$('div.availability', context).unbind('mouseover')
.bind('mouseover', function() {
var details = $(... |
aded5c6d0c859d34cd5af3cf4d15f28a924b6072 | resources/frontend/app/pods/tournament/team/route.js | resources/frontend/app/pods/tournament/team/route.js | import Ember from 'ember';
const {
Route,
RSVP
} = Ember;
export default Route.extend({
deactivate() {
this.store.peekAll('team-member').forEach((team) => {
if (team.get('isNew')) {
this.store.deleteRecord(team);
}
});
},
actions: {
assignMember(member) {
const flash... | import Ember from 'ember';
const {
Route,
RSVP
} = Ember;
export default Route.extend({
deactivate() {
this.store.peekAll('team-member').forEach((team) => {
if (team.get('isNew')) {
this.store.deleteRecord(team);
}
});
},
actions: {
assignMember(member) {
const flash... | Fix assign member to the team | Fix assign member to the team
| JavaScript | mit | nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf,nixsolutions/ggf | javascript | ## Code Before:
import Ember from 'ember';
const {
Route,
RSVP
} = Ember;
export default Route.extend({
deactivate() {
this.store.peekAll('team-member').forEach((team) => {
if (team.get('isNew')) {
this.store.deleteRecord(team);
}
});
},
actions: {
assignMember(member) {
... |
0b48df9444934c0e25564e990545410d4d64dc29 | source/addons/responsive_controls/ResponsiveSizing.gd | source/addons/responsive_controls/ResponsiveSizing.gd | tool
extends Control
# Minimum size the parent Control must have in order to trigger this Responsive Sizing
export(Vector2) var minimumParentSize
# Whether or not this Responsive Sizing is visible in the set size
export(bool) var isVisible
# Checks if this Responsive Sizing is eligible under the specified size
func ... | tool
extends Control
# Minimum size the parent Control must have in order to trigger this Responsive Sizing
export(Vector2) var minimumParentSize = Vector2()
# Whether or not this Responsive Sizing is visible in the set size
export(bool) var isVisible = true
# Checks if this Responsive Sizing is eligible under the s... | Add defaults to responsive sizing | Add defaults to responsive sizing
| GDScript | mit | ruipsrosario/godot-responsive-control | gdscript | ## Code Before:
tool
extends Control
# Minimum size the parent Control must have in order to trigger this Responsive Sizing
export(Vector2) var minimumParentSize
# Whether or not this Responsive Sizing is visible in the set size
export(bool) var isVisible
# Checks if this Responsive Sizing is eligible under the spec... |
02141d8df02091e89cb02144417753032337525b | src/org/nwapw/abacus/lexing/pattern/PatternNode.java | src/org/nwapw/abacus/lexing/pattern/PatternNode.java | package org.nwapw.abacus.lexing.pattern;
import java.util.ArrayList;
public class PatternNode<T> {
protected ArrayList<PatternNode<T>> outputStates;
public PatternNode(){
outputStates = new ArrayList<>();
}
public boolean matches(char other){
return false;
}
public char ran... | package org.nwapw.abacus.lexing.pattern;
import java.util.ArrayList;
import java.util.HashSet;
public class PatternNode<T> {
protected HashSet<PatternNode<T>> outputStates;
public PatternNode(){
outputStates = new HashSet<>();
}
public boolean matches(char other){
return false;
... | Switch underlying implementation to Set from List. | Switch underlying implementation to Set from List.
| Java | mit | DanilaFe/abacus,DanilaFe/abacus | java | ## Code Before:
package org.nwapw.abacus.lexing.pattern;
import java.util.ArrayList;
public class PatternNode<T> {
protected ArrayList<PatternNode<T>> outputStates;
public PatternNode(){
outputStates = new ArrayList<>();
}
public boolean matches(char other){
return false;
}
... |
84b48b9be466ac72bddf5ee6288ff48be26eed62 | tests/classifier/RandomForestClassifier/RandomForestClassifierPHPTest.py | tests/classifier/RandomForestClassifier/RandomForestClassifierPHPTest.py |
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomForestClassifierPHPTest, self).setUp()
... |
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomForestClassifierPHPTest, self).setUp()
... | Reduce the number of trees | Reduce the number of trees
| Python | bsd-3-clause | nok/sklearn-porter | python | ## Code Before:
import unittest
from unittest import TestCase
from sklearn.ensemble import RandomForestClassifier
from ..Classifier import Classifier
from ...language.PHP import PHP
class RandomForestClassifierPHPTest(PHP, Classifier, TestCase):
def setUp(self):
super(RandomForestClassifierPHPTest, se... |
d0b25766a6e36294ae2c8083664fa36be6be292f | signage/urls.py | signage/urls.py | from django.conf.urls import url
from .views import DisplayCreate
from .views import DisplayDelete
from .views import DisplayDetail
from .views import DisplayList
from .views import DisplayUpdate
from .views import SlideCreate
from .views import SlideDelete
from .views import SlideList
from .views import SlideUpdate
... | from django.conf.urls import url
from . import views
app_name = 'signage'
urlpatterns = [
url(r'^display/(?P<pk>\d+)/$', views.DisplayDetail.as_view(), name='display'),
url(r'^display/create/$', views.DisplayCreate.as_view(), name='display_create'),
url(r'^display/(?P<pk>\d+)/delete/$', views.DisplayDel... | Refactor URL imports and paths | Refactor URL imports and paths
| Python | bsd-3-clause | jbittel/django-signage,jbittel/django-signage,jbittel/django-signage | python | ## Code Before:
from django.conf.urls import url
from .views import DisplayCreate
from .views import DisplayDelete
from .views import DisplayDetail
from .views import DisplayList
from .views import DisplayUpdate
from .views import SlideCreate
from .views import SlideDelete
from .views import SlideList
from .views impo... |
84a5b48d4e4047551a0d52c78bfcadd97efe3194 | lib/citrus.rb | lib/citrus.rb | require 'securerandom'
require 'json'
require 'webmachine'
require 'celluloid/zmq'
require 'celluloid_zmq_extensions'
require 'thor'
require 'httpclient'
Celluloid.logger = nil
module Citrus
class << self
attr_writer :build_root
def build_root
@build_root || root.join('builds')
end
def cache... | require 'bundler'
Bundler.require(:default)
require 'securerandom'
require 'json'
Celluloid.logger = nil
module Citrus
class << self
attr_writer :build_root
def build_root
@build_root || root.join('builds')
end
def cache_root
@cache_root || root.join('cache')
end
def root
... | Make use of bundler require feature. | Make use of bundler require feature.
| Ruby | mit | pawelpacana/citrus-legacy | ruby | ## Code Before:
require 'securerandom'
require 'json'
require 'webmachine'
require 'celluloid/zmq'
require 'celluloid_zmq_extensions'
require 'thor'
require 'httpclient'
Celluloid.logger = nil
module Citrus
class << self
attr_writer :build_root
def build_root
@build_root || root.join('builds')
en... |
d2f75744f3f42a4c37c55b51d9ba2e24c430c6cf | drupal.make.yml | drupal.make.yml | api: '2'
core: 7.x
projects:
drupal:
type: 'core'
version: '7.41'
redhen_training:
type: 'profile'
download:
type: 'git'
branch: 'master'
url: https://github.com/thinkshout/redhen_training.git
working-copy: true
| api: '2'
core: 7.x
projects:
drupal:
type: 'core'
version: '7.41'
redhen_training:
type: 'profile'
download:
type: 'git'
branch: 'native-redhen'
url: https://github.com/thinkshout/redhen_training.git
working-copy: true
| Use native-redhen branch by default | Use native-redhen branch by default
| YAML | mit | thinkshout/crm-training | yaml | ## Code Before:
api: '2'
core: 7.x
projects:
drupal:
type: 'core'
version: '7.41'
redhen_training:
type: 'profile'
download:
type: 'git'
branch: 'master'
url: https://github.com/thinkshout/redhen_training.git
working-copy: true
## Instruction:
Use native-redhen branch by... |
01cd8092c3a6e5d0bf3448640361603aace1de06 | thingmenn-data/utility/xml.js | thingmenn-data/utility/xml.js | import axios from 'axios'
import { parseString } from 'xml2js'
const cache = {}
function parseXmlPromiseWrapper(xml) {
return new Promise((resolve, reject) => {
parseString(xml, (err, result) => {
if (err) {
reject(err)
} else {
resolve(result)
}
})
})
}
export async fu... | import axios from 'axios'
import { parseString } from 'xml2js'
const cache = {}
function parseXmlPromiseWrapper(xml) {
return new Promise((resolve, reject) => {
parseString(xml, (err, result) => {
if (err) {
reject(err)
} else {
resolve(result)
}
})
})
}
export async fu... | Allow fetchXml a few tries if it fails | Data: Allow fetchXml a few tries if it fails
| JavaScript | mit | baering/thingmenn,baering/thingmenn,baering/thingmenn,baering/thingmenn | javascript | ## Code Before:
import axios from 'axios'
import { parseString } from 'xml2js'
const cache = {}
function parseXmlPromiseWrapper(xml) {
return new Promise((resolve, reject) => {
parseString(xml, (err, result) => {
if (err) {
reject(err)
} else {
resolve(result)
}
})
})
}
... |
70992e8a55e466186417174a5cea4a88d35693df | .github/pull_request_template.md | .github/pull_request_template.md | ---
name: Pull Request
about: Create a pull request to make changes to Spark.
---
## What does this PR do?
A clear and concise description of what this PR does.
## Please check off completed items as you work.
If a checklist item or section does not apply to your PR
then please remove it.
### Documentation
- [ ] Up... | A clear and concise description of what this PR does.
## Please check off completed items as you work.
If a checklist item or section does not apply to your PR
then please remove it.
### Documentation
- [ ] Update Spark Docs Angular
- [ ] Update Spark Docs Vanilla
- [ ] Update Component Sass Var/Class Modifier tabl... | Remove top header, add test commands | Remove top header, add test commands | Markdown | mit | sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system | markdown | ## Code Before:
---
name: Pull Request
about: Create a pull request to make changes to Spark.
---
## What does this PR do?
A clear and concise description of what this PR does.
## Please check off completed items as you work.
If a checklist item or section does not apply to your PR
then please remove it.
### Documen... |
cc330fda86522ea7b602dffbed4feb3da7db4e78 | test/controllers/api/networks_controller_test.rb | test/controllers/api/networks_controller_test.rb | require 'test_helper'
describe Api::NetworksController do
let(:user) { create(:user) }
let(:network) { create(:network, account: user.individual_account) }
it 'should show' do
get(:show, { api_version: 'v1', format: 'json', id: network.id } )
assert_response :success
end
it 'should list' do
net... | require 'test_helper'
require 'json'
describe Api::NetworksController do
let(:user) { create(:user) }
let(:network) { create(:network, account: user.individual_account) }
it 'should show' do
get(:show, api_version: 'v1', format: 'json', id: network.id)
resource = JSON.parse(@response.body)
resource[... | Make tests better, actually check some values | Make tests better, actually check some values
| Ruby | agpl-3.0 | PRX/cms.prx.org,PRX/cms.prx.org,PRX/cms.prx.org,PRX/cms.prx.org | ruby | ## Code Before:
require 'test_helper'
describe Api::NetworksController do
let(:user) { create(:user) }
let(:network) { create(:network, account: user.individual_account) }
it 'should show' do
get(:show, { api_version: 'v1', format: 'json', id: network.id } )
assert_response :success
end
it 'should ... |
e0b0804a6f194add34e17cfcedcb40c77b321827 | ipa-fun-check-rpms.sh | ipa-fun-check-rpms.sh |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $DIR/config.sh
# Set DIST_DIR if given via command line
if [[ ! $1 == "" ]]
then
if [[ ! -d $WORKING_DIR/$1 ]]
then
echo "$WORKING_DIR/$1 does not exist"
exit 1
fi
DIST_DIR=$WORKING_DIR/$1/dist
fi
if [[ `ls $DIST_DIR | wc -l` -eq 0 ]]
th... |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $DIR/config.sh
if [[ `ls $DIST_DIR | wc -l` -eq 0 ]]
then
echo "There are no rpms in $DIST_DIR"
exit 1
fi
| Remove custom directory support from check-rpms | Remove custom directory support from check-rpms
| Shell | mit | pspacek/labtool,tomaskrizek/labtool,pvoborni/labtool,tomaskrizek/labtool,pspacek/labtool,pvoborni/labtool | shell | ## Code Before:
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $DIR/config.sh
# Set DIST_DIR if given via command line
if [[ ! $1 == "" ]]
then
if [[ ! -d $WORKING_DIR/$1 ]]
then
echo "$WORKING_DIR/$1 does not exist"
exit 1
fi
DIST_DIR=$WORKING_DIR/$1/dist
fi
if [[ `ls $DIST_DIR | wc... |
0bff34400d912806a9d831f5e0436082d359a531 | tomviz/python/tomviz/state/_pipeline.py | tomviz/python/tomviz/state/_pipeline.py | from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
# Need to define a constructor as the implementation on the C++ side is
# static.
def __init__(self):
pass
def __call__(cls):
if cls._instance is None:
... | from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
def __new__(cls, *args, **kwargs):
if cls._instance is None:
cls._instance = PipelineStateManagerBase.__new__(cls, *args, **kwargs)
return cls._instance
| Fix singleton to work with wrapped manager class | Fix singleton to work with wrapped manager class
Signed-off-by: Chris Harris <a361e89d1eba6c570561222d75facbbf7aaeeafe@kitware.com>
| Python | bsd-3-clause | OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz | python | ## Code Before:
from tomviz._wrapping import PipelineStateManagerBase
class PipelineStateManager(PipelineStateManagerBase):
_instance = None
# Need to define a constructor as the implementation on the C++ side is
# static.
def __init__(self):
pass
def __call__(cls):
if cls._instan... |
148d4c44a9eb63016b469c6bf317a3dbe9ed7918 | permuta/permutations.py | permuta/permutations.py | from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
def __init__(self, n):
assert 0 <= n
self.n = n
def __iter__(self):
left = DancingLinks(range(1, self.n+1))
res = []
def gen():
if len(left) == 0:
... | from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
"""Class for iterating through all Permutations of length n"""
def __init__(self, n):
"""Returns an object giving all permutations of length n"""
assert 0 <= n
self.n = n
... | Add documentation for Permutations class | Add documentation for Permutations class
| Python | bsd-3-clause | PermutaTriangle/Permuta | python | ## Code Before:
from .misc import DancingLinks
from .permutation import Permutation
import random
class Permutations(object):
def __init__(self, n):
assert 0 <= n
self.n = n
def __iter__(self):
left = DancingLinks(range(1, self.n+1))
res = []
def gen():
if ... |
ab5fc4baf2dd856e7bea2b837d6a6eb794cf68e9 | README.md | README.md | Put something like this in your $HOME/.bashrc or $HOME/.zshrc:
```shell
. /path/to/skip.sh
```
## Usage
```shell
$ cat moby-dick.txt | skip 1
Some years ago — never mind how long precisely -
having little or no money
...
```
Or:
```shell
$ skip 1 moby-dick.txt
Some years ago — never mind how long precisely -
having li... | Put something like this in your $HOME/.bashrc or $HOME/.zshrc:
```shell
. /path/to/skip.sh
```
## Usage
```shell
$ cat moby-dick.txt | skip 1
Some years ago — never mind how long precisely -
having little or no money
...
```
Or:
```shell
$ skip 1 moby-dick.txt
Some years ago — never mind how long precisely -
having li... | Add a note on presence of GNU tail | :memo: Add a note on presence of GNU tail
Most systems have it.
| Markdown | mit | alexandershov/skip | markdown | ## Code Before:
Put something like this in your $HOME/.bashrc or $HOME/.zshrc:
```shell
. /path/to/skip.sh
```
## Usage
```shell
$ cat moby-dick.txt | skip 1
Some years ago — never mind how long precisely -
having little or no money
...
```
Or:
```shell
$ skip 1 moby-dick.txt
Some years ago — never mind how long preci... |
a8ec265ab894131ce5d4bed5c88631b2e85f1fc7 | spec/unit/morpher/evaluator/transformer/hash_transform_spec.rb | spec/unit/morpher/evaluator/transformer/hash_transform_spec.rb | require 'spec_helper'
describe Morpher::Evaluator::Transformer::HashTransform do
let(:body_a) do
s(:symbolize_key, 'foo', s(:guard, s(:primitive, String)))
end
let(:ast) do
s(:hash_transform, body_a)
end
let(:object) do
Morpher.evaluator(ast)
end
let(:evaluator_a) do
Morpher.evaluator... | require 'spec_helper'
describe Morpher::Evaluator::Transformer::HashTransform do
let(:body_a) do
s(:symbolize_key, 'foo', s(:guard, s(:primitive, String)))
end
let(:ast) do
s(:hash_transform, body_a)
end
let(:object) do
Morpher.evaluator(ast)
end
let(:evaluator_a) do
Morpher.evaluator... | Add mutation covering unit spec for Morpher::Evaluator::Transformer::HashTransform | Add mutation covering unit spec for Morpher::Evaluator::Transformer::HashTransform
| Ruby | mit | snusnu/morpher,mbj/morpher,nepalez/morpher | ruby | ## Code Before:
require 'spec_helper'
describe Morpher::Evaluator::Transformer::HashTransform do
let(:body_a) do
s(:symbolize_key, 'foo', s(:guard, s(:primitive, String)))
end
let(:ast) do
s(:hash_transform, body_a)
end
let(:object) do
Morpher.evaluator(ast)
end
let(:evaluator_a) do
M... |
16ddb8b0d20e343c87abf465d55611b798076fc5 | README.md | README.md |
[](https://travis-ci.org/hajimehoshi/ebiten)
[](http://godoc.org/github.com/hajimehoshi/ebiten)
* A simple SNES-like 2D game library in Go
* Works on
* Web browsers (powere... |
[](https://travis-ci.org/hajimehoshi/ebiten)
[](http://godoc.org/github.com/hajimehoshi/ebiten)
[... | Add 'Go Report Card' Link | doc: Add 'Go Report Card' Link
| Markdown | apache-2.0 | hajimehoshi/ebiten,hajimehoshi/ebiten | markdown | ## Code Before:
[](https://travis-ci.org/hajimehoshi/ebiten)
[](http://godoc.org/github.com/hajimehoshi/ebiten)
* A simple SNES-like 2D game library in Go
* Works on
* Web ... |
f53fe0e190b604fdde345aa36432b2a4f4bf1e1f | src/discordcr/mappings/gateway.cr | src/discordcr/mappings/gateway.cr | require "./converters"
require "./user"
require "./channel"
require "./guild"
module Discord
module Gateway
struct ReadyPayload
JSON.mapping(
v: UInt8,
user: User,
private_channels: Array(PrivateChannel),
guilds: Array(UnavailableGuild),
session_id: String
)
... | require "./converters"
require "./user"
require "./channel"
require "./guild"
module Discord
module Gateway
struct ReadyPayload
JSON.mapping(
v: UInt8,
user: User,
private_channels: Array(PrivateChannel),
guilds: Array(UnavailableGuild),
session_id: String
)
... | Add a mapping for the GUILD_INTEGRATIONS_UPDATE dispatch payload | Add a mapping for the GUILD_INTEGRATIONS_UPDATE dispatch payload
| Crystal | mit | meew0/discordcr | crystal | ## Code Before:
require "./converters"
require "./user"
require "./channel"
require "./guild"
module Discord
module Gateway
struct ReadyPayload
JSON.mapping(
v: UInt8,
user: User,
private_channels: Array(PrivateChannel),
guilds: Array(UnavailableGuild),
session_id: S... |
fc9832ffa6a181003afaf11a9be1cad66d05619e | src/Http/Adapter/Curl.php | src/Http/Adapter/Curl.php | <?php
namespace Faulancer\Http\Adapter;
use Faulancer\Exception\ClientException;
use Faulancer\Http\Request;
/**
* Class Curl
* @package Faulancer\Http\Adapter
* @author Florian Knapp <office@florianknapp.de>
*/
class Curl extends AbstractAdapter
{
/**
* @param Request $request
* @return void
... | <?php
namespace Faulancer\Http\Adapter;
use Faulancer\Exception\ClientException;
use Faulancer\Http\Request;
/**
* Class Curl
* @package Faulancer\Http\Adapter
* @author Florian Knapp <office@florianknapp.de>
*/
class Curl extends AbstractAdapter
{
/**
* @param Request $request
* @return void
... | Add user agent to request | Add user agent to request
| PHP | mit | FloKnapp/faulancer,FloKnapp/faulancer,FloKnapp/faulancer | php | ## Code Before:
<?php
namespace Faulancer\Http\Adapter;
use Faulancer\Exception\ClientException;
use Faulancer\Http\Request;
/**
* Class Curl
* @package Faulancer\Http\Adapter
* @author Florian Knapp <office@florianknapp.de>
*/
class Curl extends AbstractAdapter
{
/**
* @param Request $request
* @... |
f56339b6f2b26f3392144b917440413eb0679624 | setup/macos/brew_casks.txt | setup/macos/brew_casks.txt | java
xquartz
1password
alfred
dropbox
evernote
docker
iterm2
sublime-text
visual-studio-code
appcleaner
caffeine
flux
handbrake
omnidisksweeper
sublime
the-unarchiver
transmission
vlc
firefox
flash-npapi
google-chrome
torbrowser
basictex
djview
marked
microsoft-office-2011
skype
slack
textual
betterzip
epubquick... | java
xquartz
1password
alfred
dropbox
evernote
docker
iterm2
sublime-text
visual-studio-code
appcleaner
flux
handbrake
itsycal
keepingyouawake
omnidisksweeper
sublime
the-unarchiver
transmission
vlc
firefox
flash-npapi
google-chrome
torbrowser
basictex
djview
marked
microsoft-office-2011
skype
slack
textual
bett... | Replace caffeine by keepingyouawake and add calendar app in macos setup | Replace caffeine by keepingyouawake and add calendar app in macos setup
| Text | mit | lendenmc/dotfiles | text | ## Code Before:
java
xquartz
1password
alfred
dropbox
evernote
docker
iterm2
sublime-text
visual-studio-code
appcleaner
caffeine
flux
handbrake
omnidisksweeper
sublime
the-unarchiver
transmission
vlc
firefox
flash-npapi
google-chrome
torbrowser
basictex
djview
marked
microsoft-office-2011
skype
slack
textual
bet... |
783fd1063a156b30488b5db7804912e5588ecc1f | src/test/java/Test/SemantTest.java | src/test/java/Test/SemantTest.java | package Test;
import absyn.Exp;
import env.Env;
import error.CompilerError;
import java_cup.runtime.Symbol;
import org.assertj.core.api.JUnitSoftAssertions;
import org.junit.Rule;
import org.junit.Test;
import parse.Lexer;
import parse.Parser;
import types.*;
import java.io.IOException;
import java.io.StringReader;
... | package Test;
import absyn.Exp;
import env.Env;
import error.CompilerError;
import java_cup.runtime.Symbol;
import org.assertj.core.api.JUnitSoftAssertions;
import org.junit.Rule;
import org.junit.Test;
import parse.Lexer;
import parse.Parser;
import types.*;
import java.io.IOException;
import java.io.StringReader;
... | Add tests of semantic analysis of literals | Add tests of semantic analysis of literals
| Java | mit | romildo/eplan,romildo/eplan | java | ## Code Before:
package Test;
import absyn.Exp;
import env.Env;
import error.CompilerError;
import java_cup.runtime.Symbol;
import org.assertj.core.api.JUnitSoftAssertions;
import org.junit.Rule;
import org.junit.Test;
import parse.Lexer;
import parse.Parser;
import types.*;
import java.io.IOException;
import java.io... |
2e2fb333adeffc2d076fa889bf95a58a39ba9f56 | lib/puppet/parser/functions/dns_array.rb | lib/puppet/parser/functions/dns_array.rb | module Puppet::Parser::Functions
newfunction(:dns_array, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args|
Returns a json array of hostnames and addresses from the data source.
Arguments are the data source, the name of the api we are using,
the token to connect to that api, and the domain to get the I... | module Puppet::Parser::Functions
newfunction(:dns_array, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args|
Returns a json array of hostnames and addresses from the data source.
Arguments are the data source, the name of the api we are using,
the token to connect to that api, and the domain to get the I... | Adjust ruby ssl settings to use TLSv1.2 for connection to web server | Adjust ruby ssl settings to use TLSv1.2 for connection to web server
| Ruby | mit | covermymeds/puppet-bind,covermymeds/puppet-bind | ruby | ## Code Before:
module Puppet::Parser::Functions
newfunction(:dns_array, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args|
Returns a json array of hostnames and addresses from the data source.
Arguments are the data source, the name of the api we are using,
the token to connect to that api, and the dom... |
03b2923a10b5023fa582805074e033b1eb44783b | app/components/common/appMainFooter/appMainFooter.html | app/components/common/appMainFooter/appMainFooter.html | <footer class="appMainFooter">
<div class="container">
<div class="row appMainFooter-row">
<div class="col-xs-6">
<div class="appMainFooter__brand">
<a ui-sref="home"><span class="text-grey-2">OD</span>Ca</a>
</div>
<ul class="appMainFooter-linksList">
<li><a ui-... | <footer class="appMainFooter">
<div class="container">
<div class="row appMainFooter-row">
<div class="col-xs-6">
<div class="appMainFooter__brand">
<a ui-sref="home"><span class="text-grey-2">OD</span>Ca</a>
</div>
<ul class="appMainFooter-linksList">
<li><a ui-... | Fix extra gutter by allowing word break | Fix extra gutter by allowing word break
| HTML | mit | caciviclab/disclosure-frontend-alpha,KyleW/disclosure-frontend,KyleW/disclosure-frontend,KyleW/disclosure-frontend,caciviclab/disclosure-frontend,caciviclab/disclosure-frontend-alpha,caciviclab/disclosure-frontend,caciviclab/disclosure-frontend-alpha,caciviclab/disclosure-frontend | html | ## Code Before:
<footer class="appMainFooter">
<div class="container">
<div class="row appMainFooter-row">
<div class="col-xs-6">
<div class="appMainFooter__brand">
<a ui-sref="home"><span class="text-grey-2">OD</span>Ca</a>
</div>
<ul class="appMainFooter-linksList">
... |
f703e7ece93e859af0f6e268e8933021cba36367 | tox.ini | tox.ini | [tox]
envlist = py26,py27,pep8
minversion = 1.6
skipsdist = True
[testenv]
usedevelop = True
whitelist_externals = bash
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = bash tools/pretty_tox.sh... | [tox]
envlist = py26,py27,pep8
minversion = 1.6
skipsdist = True
[testenv]
usedevelop = True
whitelist_externals = bash
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = bash tools/pretty_tox.sh... | Enable F812 and H904 style check | Enable F812 and H904 style check
There are no shadowed variables in list comprehensions so
F812 can be enabled.
Also enable H904 because it was removed since hacking 0.10.0 [1]
[1] http://git.openstack.org/cgit/openstack-dev/hacking/tag/?id=0.10.0
Change-Id: I11e55066f2ec883c5706774d72c4f21b928ebde5
| INI | apache-2.0 | openstack/python-muranoclient,openstack/python-muranoclient | ini | ## Code Before:
[tox]
envlist = py26,py27,pep8
minversion = 1.6
skipsdist = True
[testenv]
usedevelop = True
whitelist_externals = bash
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = bash too... |
66fed655a9b41f6e270acec19fe66f787049063b | src/atom10/feed.php | src/atom10/feed.php | <?php
namespace ComplexPie\Atom10;
class Feed
{
private static $aliases = array(
'description' => 'subtitle',
'tagline' => 'subtitle',
'copyright' => 'rights',
);
private static $elements = array(
'title' => array(
'element' => 'atom:title',
'typ... | <?php
namespace ComplexPie\Atom10;
class Feed
{
private static $aliases = array(
'description' => 'subtitle',
'tagline' => 'subtitle',
'copyright' => 'rights',
);
private static $elements = array(
'title' => array(
'element' => 'atom:title',
'con... | Make this a bit cleaner. | Make this a bit cleaner.
| PHP | bsd-3-clause | gsnedders/complexpie | php | ## Code Before:
<?php
namespace ComplexPie\Atom10;
class Feed
{
private static $aliases = array(
'description' => 'subtitle',
'tagline' => 'subtitle',
'copyright' => 'rights',
);
private static $elements = array(
'title' => array(
'element' => 'atom:title',
... |
1e243b491ca7621302a499e9cef169f6dd1f5b62 | t/01-load.t | t/01-load.t | use v6;
use Test;
use Test::Builder;
plan 1;
# Verify that module is loaded properly
ok 1, 'Load module';
# vim: ft=perl6
| use v6;
use Test;
use Test::Builder;
plan 2;
# Verify that module is loaded properly
ok 1, 'Load module';
my Test::Builder $tb .= new;
ok $tb, 'Instance was created';
# vim: ft=perl6
| Test for checking instance creation | Test for checking instance creation
| Perl | artistic-2.0 | perl6-community-modules/p6-test-builder | perl | ## Code Before:
use v6;
use Test;
use Test::Builder;
plan 1;
# Verify that module is loaded properly
ok 1, 'Load module';
# vim: ft=perl6
## Instruction:
Test for checking instance creation
## Code After:
use v6;
use Test;
use Test::Builder;
plan 2;
# Verify that module is loaded properly
ok 1, 'Load module';... |
58b33c99faa2d9ea0667b967f784556dfec78616 | _config.yml | _config.yml | name: Micah Miller-Eshleman
description: Blog
meta_description: "Your New Jekyll Site, Blogging about stuffs"
aboutPage: true
markdown: kramdown
highlighter: rouge
paginate: 20
baseurl: /
domain_name: 'http://yourblog-domain.com'
google_analytics: 'UA-XXXXXXXX-X'
disqus: false
disqus_shortname: 'your-disqus-shortnam... | name: Micah Miller-Eshleman
description: Blog
meta_description: "Your New Jekyll Site, Blogging about stuffs"
aboutPage: true
markdown: kramdown
highlighter: rouge
paginate: 20
baseurl: 'https://pranksinatra.github.io/'
domain_name: 'http://yourblog-domain.com'
google_analytics: 'UA-XXXXXXXX-X'
disqus: false
disqus_... | Update baseurl to pranksinatra.github.io so Prose.io image preview works | Update baseurl to pranksinatra.github.io so Prose.io image preview works
| YAML | mit | pranksinatra/pranksinatra.github.io,pranksinatra/pranksinatra.github.io | yaml | ## Code Before:
name: Micah Miller-Eshleman
description: Blog
meta_description: "Your New Jekyll Site, Blogging about stuffs"
aboutPage: true
markdown: kramdown
highlighter: rouge
paginate: 20
baseurl: /
domain_name: 'http://yourblog-domain.com'
google_analytics: 'UA-XXXXXXXX-X'
disqus: false
disqus_shortname: 'your... |
e2382e4d30dc6739ef819802aad904f93d2c3aff | examples/logger.php | examples/logger.php | <?php
class logger
{
private $logfile = null;
private static $instance = null;
public static function getInstance()
{
if (self::$instance == null) {
self::$instance = new logger();
}
return self::$instance;
}
private function __construct()
{
}
... | <?php
/**
* Logger class to register the logger for
* to give a central logging with callback
* registration in the php_rsync extension.
*
* @author ironpinguin
*
*/
class logger
{
/**
* Log file.
*
* @var string
*/
private $logfile = null;
/**
* Instance variable for the lo... | Add doc comment to the class. | Add doc comment to the class.
| PHP | bsd-2-clause | ironpinguin/php_rsync,ironpinguin/php_rsync,ironpinguin/php_rsync,ironpinguin/php_rsync,ironpinguin/php_rsync | php | ## Code Before:
<?php
class logger
{
private $logfile = null;
private static $instance = null;
public static function getInstance()
{
if (self::$instance == null) {
self::$instance = new logger();
}
return self::$instance;
}
private function __construct()
... |
815d187d68ab86d8c20e46427a75f0b784464340 | models/scoreset.rb | models/scoreset.rb | class Scoreset < Sequel::Model
many_to_one :player
one_to_many :score
def Scoreset.new_scores(player, song, registered_at)
scoreset = Scoreset.new(
player: player,
registered_at: registered_at)
scoreset.save
song.each do |s|
song_name = s[:name].gsub(/''/, '"').strip
music = ... | class Scoreset < Sequel::Model
many_to_one :player
one_to_many :score
def Scoreset.new_scores(player, song, registered_at)
scoreset = Scoreset.new(
player: player,
registered_at: registered_at)
scoreset.save
song.each do |s|
song_name = s[:name].gsub(/''/, '"').strip
music = ... | Fix bug (use DIFFICULTY as Array) | Fix bug (use DIFFICULTY as Array)
| Ruby | mit | mayth/refixative,mayth/refixative,mayth/refixative | ruby | ## Code Before:
class Scoreset < Sequel::Model
many_to_one :player
one_to_many :score
def Scoreset.new_scores(player, song, registered_at)
scoreset = Scoreset.new(
player: player,
registered_at: registered_at)
scoreset.save
song.each do |s|
song_name = s[:name].gsub(/''/, '"').stri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.