commit stringlengths 40 40 | old_file stringlengths 4 184 | new_file stringlengths 4 184 | old_contents stringlengths 1 3.6k | new_contents stringlengths 5 3.38k | subject stringlengths 15 778 | message stringlengths 16 6.74k | lang stringclasses 201 values | license stringclasses 13 values | repos stringlengths 6 116k | config stringclasses 201 values | content stringlengths 137 7.24k | diff stringlengths 26 5.55k | diff_length int64 1 123 | relative_diff_length float64 0.01 89 | n_lines_added int64 0 108 | n_lines_deleted int64 0 106 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4213899b01d41487a188ca9f5b30f01c9bd861d7 | modules/ui/treemacs/autoload.el | modules/ui/treemacs/autoload.el | ;;; ui/treemacs/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +treemacs/toggle ()
"Initialize or toggle treemacs.
* If the treemacs window is visible hide it.
* If a treemacs buffer exists, but is not visible show it.
* If no treemacs buffer exists for the current frame create and show it.
* If the workspace is empty additionally ask for the root path of the first
project to add."
(interactive)
(require 'treemacs)
(-pcase (treemacs--current-visibility)
['visible (delete-window (treemacs--is-visible?))]
['exists (treemacs-select-window)]
['none
(let ((project-root (doom-project-root 'nocache)))
(when project-root
(unless (treemacs--find-project-for-path project-root)
(treemacs-add-project-at (treemacs--canonical-path project-root)
(doom-project-name 'nocache))))
(treemacs--init project-root))]))
| ;;; ui/treemacs/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +treemacs/toggle ()
"Initialize or toggle treemacs.
* If the treemacs window is visible hide it.
* If a treemacs buffer exists, but is not visible show it.
* If no treemacs buffer exists for the current frame create and show it.
* If the workspace is empty additionally ask for the root path of the first
project to add."
(interactive)
(require 'treemacs)
(pcase (treemacs--current-visibility)
(`visible (delete-window (treemacs--is-visible?)))
(`exists (treemacs-select-window))
(`none
(let ((project-root (doom-project-root 'nocache)))
(when project-root
(unless (treemacs--find-project-for-path project-root)
(treemacs-add-project-at (treemacs--canonical-path project-root)
(doom-project-name 'nocache))))
(treemacs--init project-root)))))
| Refactor out -pcase in +treemacs/toggle | Refactor out -pcase in +treemacs/toggle
| Emacs Lisp | mit | UndeadKernel/emacs_doom,hlissner/.emacs.d,UndeadKernel/emacs_doom,hlissner/.emacs.d,hlissner/.emacs.d,UndeadKernel/emacs_doom,UndeadKernel/emacs_doom,hlissner/.emacs.d,UndeadKernel/emacs_doom,hlissner/.emacs.d,hlissner/doom-emacs,UndeadKernel/emacs_doom,hlissner/.emacs.d,UndeadKernel/emacs_doom,hlissner/doom-emacs,hlissner/doom-emacs,hlissner/doom-emacs,hlissner/.emacs.d,hlissner/doom-emacs,hlissner/doom-emacs,hlissner/doom-emacs,hlissner/.emacs.d | emacs-lisp | ## Code Before:
;;; ui/treemacs/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +treemacs/toggle ()
"Initialize or toggle treemacs.
* If the treemacs window is visible hide it.
* If a treemacs buffer exists, but is not visible show it.
* If no treemacs buffer exists for the current frame create and show it.
* If the workspace is empty additionally ask for the root path of the first
project to add."
(interactive)
(require 'treemacs)
(-pcase (treemacs--current-visibility)
['visible (delete-window (treemacs--is-visible?))]
['exists (treemacs-select-window)]
['none
(let ((project-root (doom-project-root 'nocache)))
(when project-root
(unless (treemacs--find-project-for-path project-root)
(treemacs-add-project-at (treemacs--canonical-path project-root)
(doom-project-name 'nocache))))
(treemacs--init project-root))]))
## Instruction:
Refactor out -pcase in +treemacs/toggle
## Code After:
;;; ui/treemacs/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +treemacs/toggle ()
"Initialize or toggle treemacs.
* If the treemacs window is visible hide it.
* If a treemacs buffer exists, but is not visible show it.
* If no treemacs buffer exists for the current frame create and show it.
* If the workspace is empty additionally ask for the root path of the first
project to add."
(interactive)
(require 'treemacs)
(pcase (treemacs--current-visibility)
(`visible (delete-window (treemacs--is-visible?)))
(`exists (treemacs-select-window))
(`none
(let ((project-root (doom-project-root 'nocache)))
(when project-root
(unless (treemacs--find-project-for-path project-root)
(treemacs-add-project-at (treemacs--canonical-path project-root)
(doom-project-name 'nocache))))
(treemacs--init project-root)))))
| ;;; ui/treemacs/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +treemacs/toggle ()
"Initialize or toggle treemacs.
* If the treemacs window is visible hide it.
* If a treemacs buffer exists, but is not visible show it.
* If no treemacs buffer exists for the current frame create and show it.
* If the workspace is empty additionally ask for the root path of the first
project to add."
(interactive)
(require 'treemacs)
- (-pcase (treemacs--current-visibility)
? -
+ (pcase (treemacs--current-visibility)
- ['visible (delete-window (treemacs--is-visible?))]
? ^^ ^
+ (`visible (delete-window (treemacs--is-visible?)))
? ^^ ^
- ['exists (treemacs-select-window)]
? ^^ ^
+ (`exists (treemacs-select-window))
? ^^ ^
- ['none
? ^^
+ (`none
? ^^
(let ((project-root (doom-project-root 'nocache)))
(when project-root
(unless (treemacs--find-project-for-path project-root)
(treemacs-add-project-at (treemacs--canonical-path project-root)
(doom-project-name 'nocache))))
- (treemacs--init project-root))]))
? -
+ (treemacs--init project-root)))))
? +
| 10 | 0.454545 | 5 | 5 |
be15f350522d522d9a8eeaf1c214f6257adc055b | README.md | README.md |
[](https://gitter.im/daryllabar/XrmUnitTest?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](https://ci.appveyor.com/project/daryllabar/xrmunittest)
Xrm Unit Testing Framework With "In Memory" CRM server
|
[](https://gitter.im/daryllabar/XrmUnitTest?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Xrm Unit Testing Framework Provides a long list of features that makes developing Unit Tests in CRM quicker, faster, easier, and more reliable. "In Memory" CRM server
For more information checkout out the [Wiki](https://github.com/daryllabar/XrmUnitTest/wik)! | Test with Branches and merging by adding a link to the wiki | Test with Branches and merging by adding a link to the wiki
| Markdown | mit | daryllabar/XrmUnitTest | markdown | ## Code Before:
[](https://gitter.im/daryllabar/XrmUnitTest?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[](https://ci.appveyor.com/project/daryllabar/xrmunittest)
Xrm Unit Testing Framework With "In Memory" CRM server
## Instruction:
Test with Branches and merging by adding a link to the wiki
## Code After:
[](https://gitter.im/daryllabar/XrmUnitTest?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Xrm Unit Testing Framework Provides a long list of features that makes developing Unit Tests in CRM quicker, faster, easier, and more reliable. "In Memory" CRM server
For more information checkout out the [Wiki](https://github.com/daryllabar/XrmUnitTest/wik)! |
[](https://gitter.im/daryllabar/XrmUnitTest?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
- [](https://ci.appveyor.com/project/daryllabar/xrmunittest)
+ Xrm Unit Testing Framework Provides a long list of features that makes developing Unit Tests in CRM quicker, faster, easier, and more reliable. "In Memory" CRM server
- Xrm Unit Testing Framework With "In Memory" CRM server
+ For more information checkout out the [Wiki](https://github.com/daryllabar/XrmUnitTest/wik)! | 4 | 0.571429 | 2 | 2 |
9b04b3ca1184556181562ce79e23cf3dfb572396 | includes/libft_trm.h | includes/libft_trm.h | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft_trm.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncoden <ncoden@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/05/08 09:57:42 by ncoden #+# #+# */
/* Updated: 2015/05/11 18:53:58 by ncoden ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LIBFT_TRM_H
# define LIBFT_TRM_H
# include <term.h>
# include <termios.h>
# include <curses.h>
# include <sys/ioctl.h>
# include <signal.h>
typedef struct s_trm
{
struct termios *opts;
t_ilst_evnt *on_key;
t_evnt *on_resize;
} t_trm;
struct termios *ft_trmget();
t_bool ft_trmset(struct termios *trm);
#endif
| /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft_trm.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncoden <ncoden@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/05/08 09:57:42 by ncoden #+# #+# */
/* Updated: 2015/05/12 00:42:36 by ncoden ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LIBFT_TRM_H
# define LIBFT_TRM_H
# include <term.h>
# include <termios.h>
# include <curses.h>
# include <sys/ioctl.h>
# include <signal.h>
typedef struct s_trm
{
struct termios *opts;
t_ilst_evnt *on_key_press;
t_evnt *on_resize;
} t_trm;
struct termios *ft_trmget();
t_bool ft_trmset(struct termios *trm);
#endif
| Change on_key term event to on_key_press | Change on_key term event to on_key_press
| C | apache-2.0 | ncoden/libft | c | ## Code Before:
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft_trm.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncoden <ncoden@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/05/08 09:57:42 by ncoden #+# #+# */
/* Updated: 2015/05/11 18:53:58 by ncoden ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LIBFT_TRM_H
# define LIBFT_TRM_H
# include <term.h>
# include <termios.h>
# include <curses.h>
# include <sys/ioctl.h>
# include <signal.h>
typedef struct s_trm
{
struct termios *opts;
t_ilst_evnt *on_key;
t_evnt *on_resize;
} t_trm;
struct termios *ft_trmget();
t_bool ft_trmset(struct termios *trm);
#endif
## Instruction:
Change on_key term event to on_key_press
## Code After:
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft_trm.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncoden <ncoden@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/05/08 09:57:42 by ncoden #+# #+# */
/* Updated: 2015/05/12 00:42:36 by ncoden ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef LIBFT_TRM_H
# define LIBFT_TRM_H
# include <term.h>
# include <termios.h>
# include <curses.h>
# include <sys/ioctl.h>
# include <signal.h>
typedef struct s_trm
{
struct termios *opts;
t_ilst_evnt *on_key_press;
t_evnt *on_resize;
} t_trm;
struct termios *ft_trmget();
t_bool ft_trmset(struct termios *trm);
#endif
| /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* libft_trm.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ncoden <ncoden@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/05/08 09:57:42 by ncoden #+# #+# */
- /* Updated: 2015/05/11 18:53:58 by ncoden ### ########.fr */
? ^ ^^ ^ ^^^
+ /* Updated: 2015/05/12 00:42:36 by ncoden ### ########.fr */
? ^ ^^ ^^^ ^
/* */
/* ************************************************************************** */
#ifndef LIBFT_TRM_H
# define LIBFT_TRM_H
# include <term.h>
# include <termios.h>
# include <curses.h>
# include <sys/ioctl.h>
# include <signal.h>
typedef struct s_trm
{
struct termios *opts;
- t_ilst_evnt *on_key;
+ t_ilst_evnt *on_key_press;
? ++++++
t_evnt *on_resize;
} t_trm;
struct termios *ft_trmget();
t_bool ft_trmset(struct termios *trm);
#endif | 4 | 0.125 | 2 | 2 |
0b8d55b196164dc7dfdef644ee95806f2d5dac59 | packages/kolibri-tools/jest.conf/setup.js | packages/kolibri-tools/jest.conf/setup.js | import 'intl';
import 'intl/locale-data/jsonp/en.js';
import * as Aphrodite from 'aphrodite';
import * as AphroditeNoImportant from 'aphrodite/no-important';
import Vue from 'vue';
import VueMeta from 'vue-meta';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import { i18nSetup } from 'kolibri.utils.i18n';
import KThemePlugin from 'kolibri-components/src/KThemePlugin';
import KContentPlugin from 'kolibri-components/src/content/KContentPlugin';
Aphrodite.StyleSheetTestUtils.suppressStyleInjection();
AphroditeNoImportant.StyleSheetTestUtils.suppressStyleInjection();
// Register Vue plugins and components
Vue.use(Vuex);
Vue.use(VueRouter);
Vue.use(VueMeta);
Vue.use(KThemePlugin);
Vue.use(KContentPlugin);
Vue.config.silent = true;
Vue.config.devtools = false;
Vue.config.productionTip = false;
i18nSetup(true);
const csrf = global.document.createElement('input');
csrf.name = 'csrfmiddlewaretoken';
csrf.value = 'csrfmiddlewaretoken';
global.document.body.append(csrf);
Object.defineProperty(window, 'scrollTo', { value: () => {}, writable: true });
| import 'intl';
import 'intl/locale-data/jsonp/en.js';
import * as Aphrodite from 'aphrodite';
import * as AphroditeNoImportant from 'aphrodite/no-important';
import Vue from 'vue';
import VueMeta from 'vue-meta';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import { i18nSetup } from 'kolibri.utils.i18n';
import KThemePlugin from 'kolibri-components/src/KThemePlugin';
import KContentPlugin from 'kolibri-components/src/content/KContentPlugin';
Aphrodite.StyleSheetTestUtils.suppressStyleInjection();
AphroditeNoImportant.StyleSheetTestUtils.suppressStyleInjection();
// Register Vue plugins and components
Vue.use(Vuex);
Vue.use(VueRouter);
Vue.use(VueMeta);
Vue.use(KThemePlugin);
Vue.use(KContentPlugin);
Vue.config.silent = true;
Vue.config.devtools = false;
Vue.config.productionTip = false;
i18nSetup(true);
const csrf = global.document.createElement('input');
csrf.name = 'csrfmiddlewaretoken';
csrf.value = 'csrfmiddlewaretoken';
global.document.body.append(csrf);
Object.defineProperty(window, 'scrollTo', { value: () => {}, writable: true });
// Uncomment to see better errors from Node
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
console.log(reason.stack);
});
| Add extra logging for node promises | Add extra logging for node promises
| JavaScript | mit | indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,indirectlylit/kolibri,learningequality/kolibri | javascript | ## Code Before:
import 'intl';
import 'intl/locale-data/jsonp/en.js';
import * as Aphrodite from 'aphrodite';
import * as AphroditeNoImportant from 'aphrodite/no-important';
import Vue from 'vue';
import VueMeta from 'vue-meta';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import { i18nSetup } from 'kolibri.utils.i18n';
import KThemePlugin from 'kolibri-components/src/KThemePlugin';
import KContentPlugin from 'kolibri-components/src/content/KContentPlugin';
Aphrodite.StyleSheetTestUtils.suppressStyleInjection();
AphroditeNoImportant.StyleSheetTestUtils.suppressStyleInjection();
// Register Vue plugins and components
Vue.use(Vuex);
Vue.use(VueRouter);
Vue.use(VueMeta);
Vue.use(KThemePlugin);
Vue.use(KContentPlugin);
Vue.config.silent = true;
Vue.config.devtools = false;
Vue.config.productionTip = false;
i18nSetup(true);
const csrf = global.document.createElement('input');
csrf.name = 'csrfmiddlewaretoken';
csrf.value = 'csrfmiddlewaretoken';
global.document.body.append(csrf);
Object.defineProperty(window, 'scrollTo', { value: () => {}, writable: true });
## Instruction:
Add extra logging for node promises
## Code After:
import 'intl';
import 'intl/locale-data/jsonp/en.js';
import * as Aphrodite from 'aphrodite';
import * as AphroditeNoImportant from 'aphrodite/no-important';
import Vue from 'vue';
import VueMeta from 'vue-meta';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import { i18nSetup } from 'kolibri.utils.i18n';
import KThemePlugin from 'kolibri-components/src/KThemePlugin';
import KContentPlugin from 'kolibri-components/src/content/KContentPlugin';
Aphrodite.StyleSheetTestUtils.suppressStyleInjection();
AphroditeNoImportant.StyleSheetTestUtils.suppressStyleInjection();
// Register Vue plugins and components
Vue.use(Vuex);
Vue.use(VueRouter);
Vue.use(VueMeta);
Vue.use(KThemePlugin);
Vue.use(KContentPlugin);
Vue.config.silent = true;
Vue.config.devtools = false;
Vue.config.productionTip = false;
i18nSetup(true);
const csrf = global.document.createElement('input');
csrf.name = 'csrfmiddlewaretoken';
csrf.value = 'csrfmiddlewaretoken';
global.document.body.append(csrf);
Object.defineProperty(window, 'scrollTo', { value: () => {}, writable: true });
// Uncomment to see better errors from Node
process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
console.log(reason.stack);
});
| import 'intl';
import 'intl/locale-data/jsonp/en.js';
import * as Aphrodite from 'aphrodite';
import * as AphroditeNoImportant from 'aphrodite/no-important';
import Vue from 'vue';
import VueMeta from 'vue-meta';
import VueRouter from 'vue-router';
import Vuex from 'vuex';
import { i18nSetup } from 'kolibri.utils.i18n';
import KThemePlugin from 'kolibri-components/src/KThemePlugin';
import KContentPlugin from 'kolibri-components/src/content/KContentPlugin';
Aphrodite.StyleSheetTestUtils.suppressStyleInjection();
AphroditeNoImportant.StyleSheetTestUtils.suppressStyleInjection();
// Register Vue plugins and components
Vue.use(Vuex);
Vue.use(VueRouter);
Vue.use(VueMeta);
Vue.use(KThemePlugin);
Vue.use(KContentPlugin);
Vue.config.silent = true;
Vue.config.devtools = false;
Vue.config.productionTip = false;
i18nSetup(true);
const csrf = global.document.createElement('input');
csrf.name = 'csrfmiddlewaretoken';
csrf.value = 'csrfmiddlewaretoken';
global.document.body.append(csrf);
Object.defineProperty(window, 'scrollTo', { value: () => {}, writable: true });
+
+ // Uncomment to see better errors from Node
+ process.on('unhandledRejection', (reason, p) => {
+ console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);
+ console.log(reason.stack);
+ }); | 6 | 0.171429 | 6 | 0 |
561060423d0979e51b92a7209482e76680734d51 | dallinger/dev_server/app.py | dallinger/dev_server/app.py | import codecs
import os
import gevent.monkey
from dallinger.experiment_server.experiment_server import app
gevent.monkey.patch_all()
app.config["EXPLAIN_TEMPLATE_LOADING"] = True
os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex").decode("ascii")
| import codecs
import os
import gevent.monkey
gevent.monkey.patch_all() # Patch before importing app and all its dependencies
from dallinger.experiment_server.experiment_server import app # noqa: E402
app.config["EXPLAIN_TEMPLATE_LOADING"] = True
os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex").decode("ascii")
| Apply gevent patch earlier based on output of `flask run` | Apply gevent patch earlier based on output of `flask run`
| Python | mit | Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger,Dallinger/Dallinger | python | ## Code Before:
import codecs
import os
import gevent.monkey
from dallinger.experiment_server.experiment_server import app
gevent.monkey.patch_all()
app.config["EXPLAIN_TEMPLATE_LOADING"] = True
os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex").decode("ascii")
## Instruction:
Apply gevent patch earlier based on output of `flask run`
## Code After:
import codecs
import os
import gevent.monkey
gevent.monkey.patch_all() # Patch before importing app and all its dependencies
from dallinger.experiment_server.experiment_server import app # noqa: E402
app.config["EXPLAIN_TEMPLATE_LOADING"] = True
os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex").decode("ascii")
| import codecs
import os
import gevent.monkey
- from dallinger.experiment_server.experiment_server import app
+ gevent.monkey.patch_all() # Patch before importing app and all its dependencies
+ from dallinger.experiment_server.experiment_server import app # noqa: E402
- gevent.monkey.patch_all()
app.config["EXPLAIN_TEMPLATE_LOADING"] = True
os.environ["FLASK_SECRET_KEY"] = codecs.encode(os.urandom(16), "hex").decode("ascii") | 4 | 0.363636 | 2 | 2 |
23ab68d9c14f72076cb1c3cbf00e15630f3fb461 | lib/bandwidth-chart.js | lib/bandwidth-chart.js | const chart = require('ascii-chart');
function pointsFromBandwidthData(values, numPoints) {
// Define vars
const len = values.length;
const points = [];
let i = 0;
let size;
// Split values into n points
if(numPoints < 2) {
points.push(values);
} else {
if(len % numPoints === 0) {
size = Math.floor(len / numPoints);
while (i < len) {
points.push(values.slice(i, i += size));
}
}
while (i < len) {
size = Math.ceil((len - i) / numPoints--);
points.push(values.slice(i, i += size));
}
}
// Return points
const result = points
// Calculate average value of each point
.map(point => Math.round(point.reduce((a,b) => a + b) / point.length))
// Convert bytes to megabytes
.map(bytes => Number((bytes / 1000000).toPrecision(3)));
return result;
}
module.exports = values => {
if(values && values.length) {
const points = pointsFromBandwidthData(values, 56);
return chart(points, {
width: 125,
height: 20,
padding: 0,
pointChar: '*',
negativePointChar: '.'
});
} else {
return '';
}
}
| const chart = require('ascii-chart');
function pointsFromBandwidthData(values, numPoints) {
// Define vars
const len = values.length;
const points = [];
let i = 0;
let size;
// Split values into n points
if(numPoints < 2) {
points.push(values);
} else {
if(len % numPoints === 0) {
size = Math.floor(len / numPoints);
while (i < len) {
points.push(values.slice(i, i += size));
}
}
while (i < len) {
size = Math.ceil((len - i) / numPoints--);
points.push(values.slice(i, i += size));
}
}
// Return points
return points
// Calculate average value of each point
.map(point => Math.round(point.reduce((a,b) => a + b) / point.length))
// Convert bytes to megabytes
.map(bytes => Number((bytes / 1000000).toPrecision(3)));
}
module.exports = values => {
if(values && values.length) {
const points = pointsFromBandwidthData(values, 56);
return chart(points, {
width: 125,
height: 20,
padding: 0,
pointChar: '*',
negativePointChar: '.'
});
} else {
return '';
}
}
| Reformat bandwidth data return section | Reformat bandwidth data return section
| JavaScript | mit | lukechilds/tor-explorer,lukechilds/tor-explorer | javascript | ## Code Before:
const chart = require('ascii-chart');
function pointsFromBandwidthData(values, numPoints) {
// Define vars
const len = values.length;
const points = [];
let i = 0;
let size;
// Split values into n points
if(numPoints < 2) {
points.push(values);
} else {
if(len % numPoints === 0) {
size = Math.floor(len / numPoints);
while (i < len) {
points.push(values.slice(i, i += size));
}
}
while (i < len) {
size = Math.ceil((len - i) / numPoints--);
points.push(values.slice(i, i += size));
}
}
// Return points
const result = points
// Calculate average value of each point
.map(point => Math.round(point.reduce((a,b) => a + b) / point.length))
// Convert bytes to megabytes
.map(bytes => Number((bytes / 1000000).toPrecision(3)));
return result;
}
module.exports = values => {
if(values && values.length) {
const points = pointsFromBandwidthData(values, 56);
return chart(points, {
width: 125,
height: 20,
padding: 0,
pointChar: '*',
negativePointChar: '.'
});
} else {
return '';
}
}
## Instruction:
Reformat bandwidth data return section
## Code After:
const chart = require('ascii-chart');
function pointsFromBandwidthData(values, numPoints) {
// Define vars
const len = values.length;
const points = [];
let i = 0;
let size;
// Split values into n points
if(numPoints < 2) {
points.push(values);
} else {
if(len % numPoints === 0) {
size = Math.floor(len / numPoints);
while (i < len) {
points.push(values.slice(i, i += size));
}
}
while (i < len) {
size = Math.ceil((len - i) / numPoints--);
points.push(values.slice(i, i += size));
}
}
// Return points
return points
// Calculate average value of each point
.map(point => Math.round(point.reduce((a,b) => a + b) / point.length))
// Convert bytes to megabytes
.map(bytes => Number((bytes / 1000000).toPrecision(3)));
}
module.exports = values => {
if(values && values.length) {
const points = pointsFromBandwidthData(values, 56);
return chart(points, {
width: 125,
height: 20,
padding: 0,
pointChar: '*',
negativePointChar: '.'
});
} else {
return '';
}
}
| const chart = require('ascii-chart');
function pointsFromBandwidthData(values, numPoints) {
// Define vars
const len = values.length;
const points = [];
let i = 0;
let size;
// Split values into n points
if(numPoints < 2) {
points.push(values);
} else {
if(len % numPoints === 0) {
size = Math.floor(len / numPoints);
while (i < len) {
points.push(values.slice(i, i += size));
}
}
while (i < len) {
size = Math.ceil((len - i) / numPoints--);
points.push(values.slice(i, i += size));
}
}
// Return points
- const result = points
+ return points
// Calculate average value of each point
.map(point => Math.round(point.reduce((a,b) => a + b) / point.length))
// Convert bytes to megabytes
.map(bytes => Number((bytes / 1000000).toPrecision(3)));
-
- return result;
}
module.exports = values => {
if(values && values.length) {
const points = pointsFromBandwidthData(values, 56);
return chart(points, {
width: 125,
height: 20,
padding: 0,
pointChar: '*',
negativePointChar: '.'
});
} else {
return '';
}
} | 4 | 0.076923 | 1 | 3 |
bb3ec131261f0619a86f21f549d6b1cb47f2c9ad | graph/serializers.py | graph/serializers.py | from rest_framework import serializers
from measurement.models import Measurement
from threshold_value.models import ThresholdValue
from calendar import timegm
from alarm.models import Alarm
class GraphSeriesSerializer(serializers.ModelSerializer):
x = serializers.SerializerMethodField('get_time')
y = serializers.SerializerMethodField('get_value')
class Meta:
fields = ['x', 'y']
def get_time(self, obj):
return int(timegm(obj.time.utctimetuple())) * 1000 # Milliseconds since epoch, UTC
def get_value(self, obj):
return obj.value
class MeasurementGraphSeriesSerializer(GraphSeriesSerializer):
alarm = serializers.SerializerMethodField('get_alarm')
def __init__(self, *args, **kwargs):
self.alarm_dict = kwargs.pop('alarm_dict', None)
super(MeasurementGraphSeriesSerializer, self).__init__(*args, **kwargs)
if not self.alarm_dict:
self.fields.pop('alarm')
def get_alarm(self, obj):
if obj.id in self.alarm_dict:
alarm = self.alarm_dict[obj.id]
serializer = SimpleAlarmSerializer(alarm)
return serializer.data
return None
class Meta(GraphSeriesSerializer.Meta):
model = Measurement
fields = GraphSeriesSerializer.Meta.fields + ['alarm']
class ThresholdValueGraphSeriesSerializer(GraphSeriesSerializer):
class Meta(GraphSeriesSerializer.Meta):
model = ThresholdValue
class SimpleAlarmSerializer(serializers.ModelSerializer):
class Meta:
model = Alarm
fields = ('id', 'time_created', 'is_treated', 'treated_text')
| from rest_framework import serializers
from measurement.models import Measurement
from threshold_value.models import ThresholdValue
from calendar import timegm
from alarm.models import Alarm
class GraphSeriesSerializer(serializers.ModelSerializer):
x = serializers.SerializerMethodField('get_time')
y = serializers.SerializerMethodField('get_value')
class Meta:
fields = ['x', 'y']
def get_time(self, obj):
return int(timegm(obj.time.utctimetuple())) * 1000 # Milliseconds since epoch, UTC
def get_value(self, obj):
return obj.value
class MeasurementGraphSeriesSerializer(GraphSeriesSerializer):
alarm = serializers.SerializerMethodField('get_alarm')
def __init__(self, *args, **kwargs):
self.alarm_dict = kwargs.pop('alarm_dict', None)
super(MeasurementGraphSeriesSerializer, self).__init__(*args, **kwargs)
if not self.alarm_dict:
self.fields.pop('alarm')
def get_alarm(self, obj):
if obj.id in self.alarm_dict:
alarm = self.alarm_dict[obj.id]
serializer = SimpleAlarmSerializer(alarm)
return serializer.data
return None
class Meta(GraphSeriesSerializer.Meta):
model = Measurement
fields = GraphSeriesSerializer.Meta.fields + ['alarm']
class ThresholdValueGraphSeriesSerializer(GraphSeriesSerializer):
class Meta(GraphSeriesSerializer.Meta):
model = ThresholdValue
class SimpleAlarmSerializer(serializers.ModelSerializer):
class Meta:
model = Alarm
fields = ['is_treated']
| Simplify SimpleAlarmSerializer to improve the performance of the graph_data endpoint | Simplify SimpleAlarmSerializer to improve the performance of the graph_data endpoint
| Python | mit | sigurdsa/angelika-api | python | ## Code Before:
from rest_framework import serializers
from measurement.models import Measurement
from threshold_value.models import ThresholdValue
from calendar import timegm
from alarm.models import Alarm
class GraphSeriesSerializer(serializers.ModelSerializer):
x = serializers.SerializerMethodField('get_time')
y = serializers.SerializerMethodField('get_value')
class Meta:
fields = ['x', 'y']
def get_time(self, obj):
return int(timegm(obj.time.utctimetuple())) * 1000 # Milliseconds since epoch, UTC
def get_value(self, obj):
return obj.value
class MeasurementGraphSeriesSerializer(GraphSeriesSerializer):
alarm = serializers.SerializerMethodField('get_alarm')
def __init__(self, *args, **kwargs):
self.alarm_dict = kwargs.pop('alarm_dict', None)
super(MeasurementGraphSeriesSerializer, self).__init__(*args, **kwargs)
if not self.alarm_dict:
self.fields.pop('alarm')
def get_alarm(self, obj):
if obj.id in self.alarm_dict:
alarm = self.alarm_dict[obj.id]
serializer = SimpleAlarmSerializer(alarm)
return serializer.data
return None
class Meta(GraphSeriesSerializer.Meta):
model = Measurement
fields = GraphSeriesSerializer.Meta.fields + ['alarm']
class ThresholdValueGraphSeriesSerializer(GraphSeriesSerializer):
class Meta(GraphSeriesSerializer.Meta):
model = ThresholdValue
class SimpleAlarmSerializer(serializers.ModelSerializer):
class Meta:
model = Alarm
fields = ('id', 'time_created', 'is_treated', 'treated_text')
## Instruction:
Simplify SimpleAlarmSerializer to improve the performance of the graph_data endpoint
## Code After:
from rest_framework import serializers
from measurement.models import Measurement
from threshold_value.models import ThresholdValue
from calendar import timegm
from alarm.models import Alarm
class GraphSeriesSerializer(serializers.ModelSerializer):
x = serializers.SerializerMethodField('get_time')
y = serializers.SerializerMethodField('get_value')
class Meta:
fields = ['x', 'y']
def get_time(self, obj):
return int(timegm(obj.time.utctimetuple())) * 1000 # Milliseconds since epoch, UTC
def get_value(self, obj):
return obj.value
class MeasurementGraphSeriesSerializer(GraphSeriesSerializer):
alarm = serializers.SerializerMethodField('get_alarm')
def __init__(self, *args, **kwargs):
self.alarm_dict = kwargs.pop('alarm_dict', None)
super(MeasurementGraphSeriesSerializer, self).__init__(*args, **kwargs)
if not self.alarm_dict:
self.fields.pop('alarm')
def get_alarm(self, obj):
if obj.id in self.alarm_dict:
alarm = self.alarm_dict[obj.id]
serializer = SimpleAlarmSerializer(alarm)
return serializer.data
return None
class Meta(GraphSeriesSerializer.Meta):
model = Measurement
fields = GraphSeriesSerializer.Meta.fields + ['alarm']
class ThresholdValueGraphSeriesSerializer(GraphSeriesSerializer):
class Meta(GraphSeriesSerializer.Meta):
model = ThresholdValue
class SimpleAlarmSerializer(serializers.ModelSerializer):
class Meta:
model = Alarm
fields = ['is_treated']
| from rest_framework import serializers
from measurement.models import Measurement
from threshold_value.models import ThresholdValue
from calendar import timegm
from alarm.models import Alarm
class GraphSeriesSerializer(serializers.ModelSerializer):
x = serializers.SerializerMethodField('get_time')
y = serializers.SerializerMethodField('get_value')
class Meta:
fields = ['x', 'y']
def get_time(self, obj):
return int(timegm(obj.time.utctimetuple())) * 1000 # Milliseconds since epoch, UTC
def get_value(self, obj):
return obj.value
class MeasurementGraphSeriesSerializer(GraphSeriesSerializer):
alarm = serializers.SerializerMethodField('get_alarm')
def __init__(self, *args, **kwargs):
self.alarm_dict = kwargs.pop('alarm_dict', None)
super(MeasurementGraphSeriesSerializer, self).__init__(*args, **kwargs)
if not self.alarm_dict:
self.fields.pop('alarm')
def get_alarm(self, obj):
if obj.id in self.alarm_dict:
alarm = self.alarm_dict[obj.id]
serializer = SimpleAlarmSerializer(alarm)
return serializer.data
return None
class Meta(GraphSeriesSerializer.Meta):
model = Measurement
fields = GraphSeriesSerializer.Meta.fields + ['alarm']
class ThresholdValueGraphSeriesSerializer(GraphSeriesSerializer):
class Meta(GraphSeriesSerializer.Meta):
model = ThresholdValue
class SimpleAlarmSerializer(serializers.ModelSerializer):
class Meta:
model = Alarm
- fields = ('id', 'time_created', 'is_treated', 'treated_text')
+ fields = ['is_treated'] | 2 | 0.039216 | 1 | 1 |
87790a85c68d3dad91679fcf9d28a4acb878a50f | README.md | README.md | Dexter's Lab
============
[Try it now](http://dexters-lab.io/) or clone and run:
```
nvm use 6
npm i
gulp build
open docs/index.html
```
| Dexter's Lab
============

[Try it now](http://dexters-lab.io/) or clone and run:
```
nvm use 6
npm i
gulp build
open docs/index.html
```
| Add Travis CI badge buildstatus | Add Travis CI badge buildstatus
| Markdown | mit | frakti/dexters-lab | markdown | ## Code Before:
Dexter's Lab
============
[Try it now](http://dexters-lab.io/) or clone and run:
```
nvm use 6
npm i
gulp build
open docs/index.html
```
## Instruction:
Add Travis CI badge buildstatus
## Code After:
Dexter's Lab
============

[Try it now](http://dexters-lab.io/) or clone and run:
```
nvm use 6
npm i
gulp build
open docs/index.html
```
| Dexter's Lab
============
+ 
[Try it now](http://dexters-lab.io/) or clone and run:
```
nvm use 6
npm i
gulp build
open docs/index.html
``` | 1 | 0.090909 | 1 | 0 |
52a60130d2c757266d127e4ac8bb9e4d5edbc94a | README.md | README.md |
Coulr is a color box to help developers and designers. Currently, it allows to:
- convert RGB color its Hexadeciaml value and vice versa
- copy selected color
### Screenshots

### Version
Coulr is currently in version 0.1
### Tech
Coulr uses open-source projects to work properly:
* [Python 3](https://www.python.org/)
* [webcolors](https://github.com/ubernostrum/webcolors)
### License
This project is under MIT licence ... so do what you want with it :)
### Help me
That would make me very happy you make me feedback on using the software.
Thanks for your interest and see you soon !
|
[](https://www.codacy.com/app/hugo-posnic/Coulr?utm_source=github.com&utm_medium=referral&utm_content=Huluti/Coulr&utm_campaign=Badge_Grade)
[](https://requires.io/github/Huluti/Coulr/requirements/?branch=master)
## Enjoy colors and feel happy
Coulr is a color box to help developers and designers. Currently, it allows to:
- convert RGB color its Hexadeciaml value and vice versa
- copy selected color
### Screenshots

### Version
Coulr is currently in version 0.1
### Tech
Coulr uses open-source projects to work properly:
* [Python 3](https://www.python.org/)
* [webcolors](https://github.com/ubernostrum/webcolors)
### License
This project is under MIT licence ... so do what you want with it :)
### Help me
That would make me very happy you make me feedback on using the software.
Thanks for your interest and see you soon !
| Test code quality with Codacy and test requirements with requires.io | Test code quality with Codacy and test requirements with requires.io
| Markdown | mit | Huluti/Coulr | markdown | ## Code Before:
Coulr is a color box to help developers and designers. Currently, it allows to:
- convert RGB color its Hexadeciaml value and vice versa
- copy selected color
### Screenshots

### Version
Coulr is currently in version 0.1
### Tech
Coulr uses open-source projects to work properly:
* [Python 3](https://www.python.org/)
* [webcolors](https://github.com/ubernostrum/webcolors)
### License
This project is under MIT licence ... so do what you want with it :)
### Help me
That would make me very happy you make me feedback on using the software.
Thanks for your interest and see you soon !
## Instruction:
Test code quality with Codacy and test requirements with requires.io
## Code After:
[](https://www.codacy.com/app/hugo-posnic/Coulr?utm_source=github.com&utm_medium=referral&utm_content=Huluti/Coulr&utm_campaign=Badge_Grade)
[](https://requires.io/github/Huluti/Coulr/requirements/?branch=master)
## Enjoy colors and feel happy
Coulr is a color box to help developers and designers. Currently, it allows to:
- convert RGB color its Hexadeciaml value and vice versa
- copy selected color
### Screenshots

### Version
Coulr is currently in version 0.1
### Tech
Coulr uses open-source projects to work properly:
* [Python 3](https://www.python.org/)
* [webcolors](https://github.com/ubernostrum/webcolors)
### License
This project is under MIT licence ... so do what you want with it :)
### Help me
That would make me very happy you make me feedback on using the software.
Thanks for your interest and see you soon !
| +
+ [](https://www.codacy.com/app/hugo-posnic/Coulr?utm_source=github.com&utm_medium=referral&utm_content=Huluti/Coulr&utm_campaign=Badge_Grade)
+ [](https://requires.io/github/Huluti/Coulr/requirements/?branch=master)
+
+ ## Enjoy colors and feel happy
Coulr is a color box to help developers and designers. Currently, it allows to:
- convert RGB color its Hexadeciaml value and vice versa
- copy selected color
### Screenshots

### Version
Coulr is currently in version 0.1
### Tech
Coulr uses open-source projects to work properly:
* [Python 3](https://www.python.org/)
* [webcolors](https://github.com/ubernostrum/webcolors)
### License
This project is under MIT licence ... so do what you want with it :)
### Help me
That would make me very happy you make me feedback on using the software.
Thanks for your interest and see you soon ! | 5 | 0.178571 | 5 | 0 |
927086ed4c1543339ee3720d7e6864a0795eb551 | utils/string.js | utils/string.js | //* @public
enyo.string = {
/** return string with white space at start and end removed */
trim: function(inString) {
return inString.replace(/^\s+|\s+$/g,"");
},
/** return string with leading and trailing quote characters removed, e.g. <code>"foo"</code> becomes <code>foo</code> */
stripQuotes: function(inString) {
var c0 = inString.charAt(0);
if (c0 == '"' || c0 == "'") {
inString = inString.substring(1);
}
var l = inString.length - 1, cl = inString.charAt(l);
if (cl == '"' || cl == "'") {
inString = inString.substr(0, l);
}
return inString;
},
//* Encode a string to Base64
toBase64: function(inText) { return window.btoa(inText); },
//* Decode string from Base64. Throws exception on bad input.
fromBase64: function(inText) { return window.atob(inText); }
};
if (!(window.btoa && window.atob)) {
enyo.string.toBase64 = enyo.string.fromBase64 = function(inText) {
enyo.error("Your browser does not support native base64 operations");
return inText;
};
};
| //* @public
enyo.string = {
/** return string with white space at start and end removed */
trim: function(inString) {
return inString.replace(/^\s+|\s+$/g,"");
},
/** return string with leading and trailing quote characters removed, e.g. <code>"foo"</code> becomes <code>foo</code> */
stripQuotes: function(inString) {
var c0 = inString.charAt(0);
if (c0 == '"' || c0 == "'") {
inString = inString.substring(1);
}
var l = inString.length - 1, cl = inString.charAt(l);
if (cl == '"' || cl == "'") {
inString = inString.substr(0, l);
}
return inString;
}
}; | Remove base64 methods from extras, not used in any Enyo team code, seems buggy, and outside our competency | Remove base64 methods from extras, not used in any Enyo team code, seems buggy, and outside our competency
| JavaScript | apache-2.0 | enyojs/extra,enyojs/extra,MAMISHO/extra,MAMISHO/extra | javascript | ## Code Before:
//* @public
enyo.string = {
/** return string with white space at start and end removed */
trim: function(inString) {
return inString.replace(/^\s+|\s+$/g,"");
},
/** return string with leading and trailing quote characters removed, e.g. <code>"foo"</code> becomes <code>foo</code> */
stripQuotes: function(inString) {
var c0 = inString.charAt(0);
if (c0 == '"' || c0 == "'") {
inString = inString.substring(1);
}
var l = inString.length - 1, cl = inString.charAt(l);
if (cl == '"' || cl == "'") {
inString = inString.substr(0, l);
}
return inString;
},
//* Encode a string to Base64
toBase64: function(inText) { return window.btoa(inText); },
//* Decode string from Base64. Throws exception on bad input.
fromBase64: function(inText) { return window.atob(inText); }
};
if (!(window.btoa && window.atob)) {
enyo.string.toBase64 = enyo.string.fromBase64 = function(inText) {
enyo.error("Your browser does not support native base64 operations");
return inText;
};
};
## Instruction:
Remove base64 methods from extras, not used in any Enyo team code, seems buggy, and outside our competency
## Code After:
//* @public
enyo.string = {
/** return string with white space at start and end removed */
trim: function(inString) {
return inString.replace(/^\s+|\s+$/g,"");
},
/** return string with leading and trailing quote characters removed, e.g. <code>"foo"</code> becomes <code>foo</code> */
stripQuotes: function(inString) {
var c0 = inString.charAt(0);
if (c0 == '"' || c0 == "'") {
inString = inString.substring(1);
}
var l = inString.length - 1, cl = inString.charAt(l);
if (cl == '"' || cl == "'") {
inString = inString.substr(0, l);
}
return inString;
}
}; | //* @public
enyo.string = {
/** return string with white space at start and end removed */
trim: function(inString) {
return inString.replace(/^\s+|\s+$/g,"");
},
/** return string with leading and trailing quote characters removed, e.g. <code>"foo"</code> becomes <code>foo</code> */
stripQuotes: function(inString) {
var c0 = inString.charAt(0);
if (c0 == '"' || c0 == "'") {
inString = inString.substring(1);
}
var l = inString.length - 1, cl = inString.charAt(l);
if (cl == '"' || cl == "'") {
inString = inString.substr(0, l);
}
return inString;
- },
? -
+ }
- //* Encode a string to Base64
- toBase64: function(inText) { return window.btoa(inText); },
- //* Decode string from Base64. Throws exception on bad input.
- fromBase64: function(inText) { return window.atob(inText); }
};
-
- if (!(window.btoa && window.atob)) {
- enyo.string.toBase64 = enyo.string.fromBase64 = function(inText) {
- enyo.error("Your browser does not support native base64 operations");
- return inText;
- };
- }; | 13 | 0.419355 | 1 | 12 |
72cc4b987a809a4d2e86c9c65bdefc81cecd2750 | lib/poms/api/pagination_client.rb | lib/poms/api/pagination_client.rb | require 'poms/api/json_client'
module Poms
module Api
# Creates lazy Enumerators to handle pagination of the Poms API and performs
# the request on demand.
module PaginationClient
module_function
def get(uri, config)
execute(uri) { |page_uri| Api::JsonClient.get(page_uri, config) }
end
def post(uri, body, config)
execute(uri) { |page_uri| Api::JsonClient.post(page_uri, body, config) }
end
def execute(uri)
Enumerator.new do |yielder|
page = Page.new(uri)
loop do
page.execute { |page_uri| yield page_uri }
page.items.each { |item| yielder << item }
raise StopIteration if page.final?
page = page.next_page
end
end.lazy
end
# Keep track of number of items and how many have been retrieved
class Page
def initialize(uri, offset = 0)
uri.query_values = { offset: offset }
@uri = uri
@offset = offset
end
def next_page
self.class.new(uri, next_index)
end
def final?
next_index >= response['total']
end
def items
response['items']
end
def execute
@response = yield uri
end
private
attr_reader :response, :offset, :uri
def next_index
response['offset'] + response['max']
end
end
end
end
end
| require 'poms/api/json_client'
module Poms
module Api
# Creates lazy Enumerators to handle pagination of the Poms API and performs
# the request on demand.
module PaginationClient
module_function
def get(uri, config)
execute(uri) { |page_uri| Api::JsonClient.get(page_uri, config) }
end
def post(uri, body, config)
execute(uri) { |page_uri| Api::JsonClient.post(page_uri, body, config) }
end
def execute(uri)
Enumerator.new do |yielder|
page = Page.new(uri)
loop do
page.execute { |page_uri| yield page_uri }
page.items.each { |item| yielder << item }
raise StopIteration if page.final?
page = page.next_page
end
end.lazy
end
# Keep track of number of items and how many have been retrieved
class Page
def initialize(uri, offset = 0)
uri.query_values = { offset: offset }
@uri = uri
end
def next_page
self.class.new(uri, next_index)
end
def final?
next_index >= response['total']
end
def items
response['items']
end
def execute
@response = yield uri
end
private
attr_reader :response, :uri
def next_index
response['offset'] + response['max']
end
end
end
end
end
| Remove offset since it is no longer used in this place | Remove offset since it is no longer used in this place
| Ruby | mit | brightin/poms | ruby | ## Code Before:
require 'poms/api/json_client'
module Poms
module Api
# Creates lazy Enumerators to handle pagination of the Poms API and performs
# the request on demand.
module PaginationClient
module_function
def get(uri, config)
execute(uri) { |page_uri| Api::JsonClient.get(page_uri, config) }
end
def post(uri, body, config)
execute(uri) { |page_uri| Api::JsonClient.post(page_uri, body, config) }
end
def execute(uri)
Enumerator.new do |yielder|
page = Page.new(uri)
loop do
page.execute { |page_uri| yield page_uri }
page.items.each { |item| yielder << item }
raise StopIteration if page.final?
page = page.next_page
end
end.lazy
end
# Keep track of number of items and how many have been retrieved
class Page
def initialize(uri, offset = 0)
uri.query_values = { offset: offset }
@uri = uri
@offset = offset
end
def next_page
self.class.new(uri, next_index)
end
def final?
next_index >= response['total']
end
def items
response['items']
end
def execute
@response = yield uri
end
private
attr_reader :response, :offset, :uri
def next_index
response['offset'] + response['max']
end
end
end
end
end
## Instruction:
Remove offset since it is no longer used in this place
## Code After:
require 'poms/api/json_client'
module Poms
module Api
# Creates lazy Enumerators to handle pagination of the Poms API and performs
# the request on demand.
module PaginationClient
module_function
def get(uri, config)
execute(uri) { |page_uri| Api::JsonClient.get(page_uri, config) }
end
def post(uri, body, config)
execute(uri) { |page_uri| Api::JsonClient.post(page_uri, body, config) }
end
def execute(uri)
Enumerator.new do |yielder|
page = Page.new(uri)
loop do
page.execute { |page_uri| yield page_uri }
page.items.each { |item| yielder << item }
raise StopIteration if page.final?
page = page.next_page
end
end.lazy
end
# Keep track of number of items and how many have been retrieved
class Page
def initialize(uri, offset = 0)
uri.query_values = { offset: offset }
@uri = uri
end
def next_page
self.class.new(uri, next_index)
end
def final?
next_index >= response['total']
end
def items
response['items']
end
def execute
@response = yield uri
end
private
attr_reader :response, :uri
def next_index
response['offset'] + response['max']
end
end
end
end
end
| require 'poms/api/json_client'
module Poms
module Api
# Creates lazy Enumerators to handle pagination of the Poms API and performs
# the request on demand.
module PaginationClient
module_function
def get(uri, config)
execute(uri) { |page_uri| Api::JsonClient.get(page_uri, config) }
end
def post(uri, body, config)
execute(uri) { |page_uri| Api::JsonClient.post(page_uri, body, config) }
end
def execute(uri)
Enumerator.new do |yielder|
page = Page.new(uri)
loop do
page.execute { |page_uri| yield page_uri }
page.items.each { |item| yielder << item }
raise StopIteration if page.final?
page = page.next_page
end
end.lazy
end
# Keep track of number of items and how many have been retrieved
class Page
def initialize(uri, offset = 0)
uri.query_values = { offset: offset }
@uri = uri
- @offset = offset
end
def next_page
self.class.new(uri, next_index)
end
def final?
next_index >= response['total']
end
def items
response['items']
end
def execute
@response = yield uri
end
private
- attr_reader :response, :offset, :uri
? ---------
+ attr_reader :response, :uri
def next_index
response['offset'] + response['max']
end
end
end
end
end | 3 | 0.046875 | 1 | 2 |
7e5217907e52a354a14a177fb1f843c9d0822cdf | app/views/partial/post.html | app/views/partial/post.html | <div id="newMessage">
<input type="text" id="message" size="45" autocomplete="off" autofocus>
<div id="stamp-container-horizontal"></div>
<input type="submit" value="send" id="send" style="display:none">
{{if .env.IsMobile}}
<div id="つらいスペース" style="height:10px"></div>
{{else}}
<input type="submit" value="プレイリスト再生" id="playlist-start">
<label class="clickable"><input type="checkbox" id="enable-notification">通知</label>
{{end}}
</div>
| <div id="newMessage">
{{if .env.IsMobile}}
<input type="text" id="message" size="38" autocomplete="off" autofocus>
{{else}}
<input type="text" id="message" size="60" autocomplete="off" autofocus>
{{end}}
<div id="stamp-container-horizontal"></div>
<input type="submit" value="send" id="send" style="display:none">
{{if .env.IsMobile}}
<div id="つらいスペース" style="height:10px"></div>
{{else}}
<input type="submit" value="プレイリスト再生" id="playlist-start">
<label class="clickable"><input type="checkbox" id="enable-notification">通知</label>
{{end}}
</div>
| Fix input width a bit | Fix input width a bit
| HTML | mit | otiai10/chant,otiai10/chant,otiai10/chant | html | ## Code Before:
<div id="newMessage">
<input type="text" id="message" size="45" autocomplete="off" autofocus>
<div id="stamp-container-horizontal"></div>
<input type="submit" value="send" id="send" style="display:none">
{{if .env.IsMobile}}
<div id="つらいスペース" style="height:10px"></div>
{{else}}
<input type="submit" value="プレイリスト再生" id="playlist-start">
<label class="clickable"><input type="checkbox" id="enable-notification">通知</label>
{{end}}
</div>
## Instruction:
Fix input width a bit
## Code After:
<div id="newMessage">
{{if .env.IsMobile}}
<input type="text" id="message" size="38" autocomplete="off" autofocus>
{{else}}
<input type="text" id="message" size="60" autocomplete="off" autofocus>
{{end}}
<div id="stamp-container-horizontal"></div>
<input type="submit" value="send" id="send" style="display:none">
{{if .env.IsMobile}}
<div id="つらいスペース" style="height:10px"></div>
{{else}}
<input type="submit" value="プレイリスト再生" id="playlist-start">
<label class="clickable"><input type="checkbox" id="enable-notification">通知</label>
{{end}}
</div>
| <div id="newMessage">
+ {{if .env.IsMobile}}
- <input type="text" id="message" size="45" autocomplete="off" autofocus>
? ^^
+ <input type="text" id="message" size="38" autocomplete="off" autofocus>
? ++ ^^
+ {{else}}
+ <input type="text" id="message" size="60" autocomplete="off" autofocus>
+ {{end}}
<div id="stamp-container-horizontal"></div>
<input type="submit" value="send" id="send" style="display:none">
{{if .env.IsMobile}}
<div id="つらいスペース" style="height:10px"></div>
{{else}}
<input type="submit" value="プレイリスト再生" id="playlist-start">
<label class="clickable"><input type="checkbox" id="enable-notification">通知</label>
{{end}}
</div> | 6 | 0.545455 | 5 | 1 |
6e05ed3d47ab2e98b68ee284ab68cf1b0fc4e2af | www/tests/test_aio.py | www/tests/test_aio.py | from browser import console
import asyncio
from async_manager import AsyncTestManager
aio = AsyncTestManager()
async def wait_secs(s, result):
await asyncio.sleep(s)
console.log("Returning result", result)
return result
@aio.async_test(0.5)
def test_simple_coroutine():
console.log("coro_wait_secs")
coro_wait_secs = wait_secs(0.1, 10)
console.log("ensuring future")
fut = asyncio.ensure_future(coro_wait_secs)
console.log("asserting")
assert asyncio.iscoroutine(coro_wait_secs), "Result of running a coroutine function should be a coroutine object"
assert asyncio.iscoroutinefunction(wait_secs), "asyncio.coroutine decorator should return a coroutine function"
assert isinstance(fut, asyncio.Future), "ensure_future should return a future"
console.log("yielding")
result = yield from fut
console.log("asserting")
assert fut.result() == result, "yield from future should return its result"
assert result == 10, "Future result different from expected"
| from browser import console, aio
async def wait_secs(s, result):
await aio.sleep(s)
console.log("Returning result", result)
return result
async def test_simple_coroutine():
console.log("coro_wait_secs")
coro_wait_secs = wait_secs(0.1, 10)
console.log("ensuring future")
fut = await coro_wait_secs
console.log("asserting")
assert aio.iscoroutine(coro_wait_secs), "Result of running a coroutine function should be a coroutine object"
assert aio.iscoroutinefunction(wait_secs), "asyncio.coroutine decorator should return a coroutine function"
console.log("asserts ok")
assert fut == 10, "Future result different from expected"
aio.run(test_simple_coroutine()) | Replace asyncio tests by browser.aio tests | Replace asyncio tests by browser.aio tests
| Python | bsd-3-clause | brython-dev/brython,kikocorreoso/brython,kikocorreoso/brython,brython-dev/brython,kikocorreoso/brython,brython-dev/brython | python | ## Code Before:
from browser import console
import asyncio
from async_manager import AsyncTestManager
aio = AsyncTestManager()
async def wait_secs(s, result):
await asyncio.sleep(s)
console.log("Returning result", result)
return result
@aio.async_test(0.5)
def test_simple_coroutine():
console.log("coro_wait_secs")
coro_wait_secs = wait_secs(0.1, 10)
console.log("ensuring future")
fut = asyncio.ensure_future(coro_wait_secs)
console.log("asserting")
assert asyncio.iscoroutine(coro_wait_secs), "Result of running a coroutine function should be a coroutine object"
assert asyncio.iscoroutinefunction(wait_secs), "asyncio.coroutine decorator should return a coroutine function"
assert isinstance(fut, asyncio.Future), "ensure_future should return a future"
console.log("yielding")
result = yield from fut
console.log("asserting")
assert fut.result() == result, "yield from future should return its result"
assert result == 10, "Future result different from expected"
## Instruction:
Replace asyncio tests by browser.aio tests
## Code After:
from browser import console, aio
async def wait_secs(s, result):
await aio.sleep(s)
console.log("Returning result", result)
return result
async def test_simple_coroutine():
console.log("coro_wait_secs")
coro_wait_secs = wait_secs(0.1, 10)
console.log("ensuring future")
fut = await coro_wait_secs
console.log("asserting")
assert aio.iscoroutine(coro_wait_secs), "Result of running a coroutine function should be a coroutine object"
assert aio.iscoroutinefunction(wait_secs), "asyncio.coroutine decorator should return a coroutine function"
console.log("asserts ok")
assert fut == 10, "Future result different from expected"
aio.run(test_simple_coroutine()) | - from browser import console
+ from browser import console, aio
? +++++
- import asyncio
-
- from async_manager import AsyncTestManager
-
- aio = AsyncTestManager()
async def wait_secs(s, result):
- await asyncio.sleep(s)
? ----
+ await aio.sleep(s)
console.log("Returning result", result)
return result
-
- @aio.async_test(0.5)
- def test_simple_coroutine():
+ async def test_simple_coroutine():
? ++++++
console.log("coro_wait_secs")
coro_wait_secs = wait_secs(0.1, 10)
console.log("ensuring future")
- fut = asyncio.ensure_future(coro_wait_secs)
+ fut = await coro_wait_secs
console.log("asserting")
- assert asyncio.iscoroutine(coro_wait_secs), "Result of running a coroutine function should be a coroutine object"
? ----
+ assert aio.iscoroutine(coro_wait_secs), "Result of running a coroutine function should be a coroutine object"
- assert asyncio.iscoroutinefunction(wait_secs), "asyncio.coroutine decorator should return a coroutine function"
? ----
+ assert aio.iscoroutinefunction(wait_secs), "asyncio.coroutine decorator should return a coroutine function"
- assert isinstance(fut, asyncio.Future), "ensure_future should return a future"
+ console.log("asserts ok")
+ assert fut == 10, "Future result different from expected"
+ aio.run(test_simple_coroutine())
- console.log("yielding")
- result = yield from fut
-
- console.log("asserting")
- assert fut.result() == result, "yield from future should return its result"
- assert result == 10, "Future result different from expected" | 29 | 0.935484 | 9 | 20 |
4121dc4b67d198b7aeea16a4c46d7fc85e359190 | presentation/models.py | presentation/models.py | from django.db import models
from model_utils.models import TimeStampedModel
from warp.users.models import User
class Presentation(TimeStampedModel):
subject = models.CharField(max_length=50)
author = models.ForeignKey(User, on_delete=models.CASCADE)
views = models.IntegerField(default=0)
markdown = models.TextField()
html = models.TextField()
| from django.db import models
from model_utils.models import TimeStampedModel
from warp.users.models import User
class Presentation(TimeStampedModel):
subject = models.CharField(max_length=50)
author = models.ForeignKey(User, on_delete=models.CASCADE)
views = models.IntegerField(default=0)
markdown = models.TextField()
html = models.TextField()
is_public = models.BooleanField(default=True)
| Add 'is_public' field for checking the whether or not presentation is public | Add 'is_public' field for checking the whether or not presentation is public
| Python | mit | SaturDJang/warp,SaturDJang/warp,SaturDJang/warp,SaturDJang/warp | python | ## Code Before:
from django.db import models
from model_utils.models import TimeStampedModel
from warp.users.models import User
class Presentation(TimeStampedModel):
subject = models.CharField(max_length=50)
author = models.ForeignKey(User, on_delete=models.CASCADE)
views = models.IntegerField(default=0)
markdown = models.TextField()
html = models.TextField()
## Instruction:
Add 'is_public' field for checking the whether or not presentation is public
## Code After:
from django.db import models
from model_utils.models import TimeStampedModel
from warp.users.models import User
class Presentation(TimeStampedModel):
subject = models.CharField(max_length=50)
author = models.ForeignKey(User, on_delete=models.CASCADE)
views = models.IntegerField(default=0)
markdown = models.TextField()
html = models.TextField()
is_public = models.BooleanField(default=True)
| from django.db import models
from model_utils.models import TimeStampedModel
from warp.users.models import User
class Presentation(TimeStampedModel):
subject = models.CharField(max_length=50)
author = models.ForeignKey(User, on_delete=models.CASCADE)
views = models.IntegerField(default=0)
markdown = models.TextField()
html = models.TextField()
+ is_public = models.BooleanField(default=True) | 1 | 0.083333 | 1 | 0 |
9e7862b6e401f621847803b0f880ec7f3a5c5985 | README.md | README.md | DuckDuckGo Goodie Plugins
=================================
See [the tutorial](https://github.com/duckduckgo/duckduckgo/wiki/Open-Source-Plugin-Tutorial) for documentation (including step by step instructions).
We maintain a list of [requested goodie plugins](https://duckduckgo.uservoice.com/forums/5168-plugins/category/41841-goodies), but whatever you want to attempt is welcome!
Contributing
------------
First off, thank you!
### Process
1) Hack.
2) Test.
3) Submit a pull request.
Feel free to ask questions at [#duckduckgo on Freenode] (http://webchat.freenode.net/?channels=duckduckgo)!
| DuckDuckGo Goodie Plugins
=================================
See [DuckDuckHack](http://duckduckhack.com/) for documentation (including a tutorial and step by step instructions).
Contributing
------------
First off, thank you!
### Process
1) Pick [a goodie project](https://duckduckgo.uservoice.com/forums/5168-plugins/category/41841-goodies) (or add one) and comment that you're working on it.
2) [Hack](http://duckduckhack.com/#plugin-tutorial).
3) [Test](http://duckduckhack.com/#testing-triggers).
4) Submit a [pull request](http://help.github.com/send-pull-requests/).
Feel free to [ask questions](http://duckduckhack.com/#faq)!
| Update for upcoming documentation site. | Update for upcoming documentation site. | Markdown | apache-2.0 | JamyGolden/zeroclickinfo-goodies,codenirvana/zeroclickinfo-goodies,NateBrune/zeroclickinfo-goodies,ssrey/zeroclickinfo-goodies,anistark/zeroclickinfo-goodies,ACMASU/zeroclickinfo-goodies,kavithaRajagopalan/zeroclickinfo-goodies,yati-sagade/zeroclickinfo-goodies,shyamalschandra/zeroclickinfo-goodies,anistark/zeroclickinfo-goodies,P71/zeroclickinfo-goodies,ankushg07/zeroclickinfo-goodies,samskeller/zeroclickinfo-goodies,jarmokivekas/zeroclickinfo-goodies,lamanh/zeroclickinfo-goodies,stennie/zeroclickinfo-goodies,thechunsik/zeroclickinfo-goodies,AcriCAA/zeroclickinfo-goodies,Faiz7412/zeroclickinfo-goodies,salmanfarisvp/zeroclickinfo-goodies,technoabh/zeroclickinfo-goodies,ACMASU/zeroclickinfo-goodies,abinabrahamanchery/zeroclickinfo-goodies,MrChrisW/zeroclickinfo-goodies,karankrishna/zeroclickinfo-goodies,wongalvis/zeroclickinfo-goodies,gojomo/zeroclickinfo-goodies,loganom/zeroclickinfo-goodies,AcriCAA/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,marwendoukh/zeroclickinfo-goodies,zekiel/zeroclickinfo-goodies,oliverdunk/zeroclickinfo-goodies,zekiel/zeroclickinfo-goodies,thechunsik/zeroclickinfo-goodies,jsstrn/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,crashrane/zeroclickinfo-goodies,marwendoukh/zeroclickinfo-goodies,kalpetros/zeroclickinfo-goodies,digit4lfa1l/zeroclickinfo-goodies,marwendoukh/zeroclickinfo-goodies,CuriousLearner/zeroclickinfo-goodies,ericlake/zeroclickinfo-goodies,jamessun/zeroclickinfo-goodies,gsanthosh91/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,IamRafy/zeroclickinfo-goodies,heartstchr/zeroclickinfo-goodies,ssrey/zeroclickinfo-goodies,aasoliz/zeroclickinfo-goodies,ericlake/zeroclickinfo-goodies,viluon/zeroclickinfo-goodies,alfredmaliakal/zeroclickinfo-goodies,zekiel/zeroclickinfo-goodies,karankrishna/zeroclickinfo-goodies,zekiel/zeroclickinfo-goodies,ACMASU/zeroclickinfo-goodies,tharunreddysai/zeroclickinfo-goodies,aasoliz/zeroclickinfo-goodies,ssrey/zeroclickinfo-goodies,stennie/zeroclickinfo-goodies,dronov/zeroclickinfo-goodies,ACMASU/zeroclickinfo-goodies,MariagraziaAlastra/zeroclickinfo-goodies,cosimo/zeroclickinfo-goodies,abhijainn27/zeroclickinfo-goodies,moollaza/zeroclickinfo-goodies,chriskaschner/zeroclickinfo-goodies,thechunsik/zeroclickinfo-goodies,rhea-ahuja/zeroclickinfo-goodies,abinabrahamanchery/zeroclickinfo-goodies,alfredmaliakal/zeroclickinfo-goodies,chief10/zeroclickinfo-goodies,Skyller360/zeroclickinfo-goodies,P71/zeroclickinfo-goodies,moollaza/zeroclickinfo-goodies,comatory/zeroclickinfo-goodies,tharunreddysai/zeroclickinfo-goodies,visal19/zeroclickinfo-goodies,gohar94/zeroclickinfo-goodies,JamyGolden/zeroclickinfo-goodies,oliverdunk/zeroclickinfo-goodies,MariagraziaAlastra/zeroclickinfo-goodies,jee1mr/zeroclickinfo-goodies,chief10/zeroclickinfo-goodies,farhaanbukhsh/zeroclickinfo-goodies,amarchenkova/zeroclickinfo-goodies,yati-sagade/zeroclickinfo-goodies,crashrane/zeroclickinfo-goodies,aleksandar-todorovic/zeroclickinfo-goodies,alohaas/zeroclickinfo-goodies,alexishancock/zeroclickinfo-goodies,jee1mr/zeroclickinfo-goodies,jrenouard/zeroclickinfo-goodies,thsigit/zeroclickinfo-goodies,brianlechthaler/zeroclickinfo-goodies,glindste/zeroclickinfo-goodies,ecelis/zeroclickinfo-goodies,codenirvana/zeroclickinfo-goodies,ecelis/zeroclickinfo-goodies,jltalens/zeroclickinfo-goodies,sagarhani/zeroclickinfo-goodies,heartstchr/zeroclickinfo-goodies,gsanthosh91/zeroclickinfo-goodies,stanly-johnson/zeroclickinfo-goodies,gojomo/zeroclickinfo-goodies,Faiz7412/zeroclickinfo-goodies,amarchenkova/zeroclickinfo-goodies,fired334/zeroclickinfo-goodies,Acidburn0zzz/zeroclickinfo-goodies,ssrey/zeroclickinfo-goodies,rahul-raturi/zeroclickinfo-goodies,takikawa/zeroclickinfo-goodies,crashrane/zeroclickinfo-goodies,kavithaRajagopalan/zeroclickinfo-goodies,edi9999/zeroclickinfo-goodies,kavithaRajagopalan/zeroclickinfo-goodies,mohan08p/zeroclickinfo-goodies,shyamalschandra/zeroclickinfo-goodies,edi9999/zeroclickinfo-goodies,regagain/zeroclickinfo-goodies,jamessun/zeroclickinfo-goodies,takikawa/zeroclickinfo-goodies,DPDmancul/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,chanizzle/zeroclickinfo-goodies,charles-l/zeroclickinfo-goodies,farhaanbukhsh/zeroclickinfo-goodies,anistark/zeroclickinfo-goodies,Kakkoroid/zeroclickinfo-goodies,leekinney/zeroclickinfo-goodies,wongalvis/zeroclickinfo-goodies,sagarhani/zeroclickinfo-goodies,ecelis/zeroclickinfo-goodies,abhijainn27/zeroclickinfo-goodies,loganom/zeroclickinfo-goodies,SibuStephen/zeroclickinfo-goodies,viluon/zeroclickinfo-goodies,dronov/zeroclickinfo-goodies,iambibhas/zeroclickinfo-goodies,stanly-johnson/zeroclickinfo-goodies,technoabh/zeroclickinfo-goodies,alfredmaliakal/zeroclickinfo-goodies,edi9999/zeroclickinfo-goodies,anistark/zeroclickinfo-goodies,NateBrune/zeroclickinfo-goodies,ACMASU/zeroclickinfo-goodies,ssrey/zeroclickinfo-goodies,Kr1tya3/zeroclickinfo-goodies,kalpetros/zeroclickinfo-goodies,amarchenkova/zeroclickinfo-goodies,alohaas/zeroclickinfo-goodies,heartstchr/zeroclickinfo-goodies,jgkamat/zeroclickinfo-goodies,jee1mr/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,rhea-ahuja/zeroclickinfo-goodies,Shugabuga/zeroclickinfo-goodies,regagain/zeroclickinfo-goodies,AlexandreRio/zeroclickinfo-goodies,jltalens/zeroclickinfo-goodies,loganom/zeroclickinfo-goodies,alohaas/zeroclickinfo-goodies,alfredmaliakal/zeroclickinfo-goodies,brianlechthaler/zeroclickinfo-goodies,nagromc/zeroclickinfo-goodies,weathermaker/zeroclickinfo-goodies,alohaas/zeroclickinfo-goodies,lxndio/zeroclickinfo-goodies,brianlechthaler/zeroclickinfo-goodies,dachinzo/zeroclickinfo-goodies,farhaanbukhsh/zeroclickinfo-goodies,CuriousLearner/zeroclickinfo-goodies,jltalens/zeroclickinfo-goodies,tharunreddysai/zeroclickinfo-goodies,pratts/zeroclickinfo-goodies,rahul-raturi/zeroclickinfo-goodies,brianlechthaler/zeroclickinfo-goodies,rahul-raturi/zeroclickinfo-goodies,amarchenkova/zeroclickinfo-goodies,regagain/zeroclickinfo-goodies,technoabh/zeroclickinfo-goodies,zandips/zeroclickinfo-goodies,comatory/zeroclickinfo-goodies,AshishAAB/zeroclickinfo-goodies,zblair/zeroclickinfo-goodies,moollaza/zeroclickinfo-goodies,IamRafy/zeroclickinfo-goodies,tagawa/zeroclickinfo-goodies,codenirvana/zeroclickinfo-goodies,viluon/zeroclickinfo-goodies,alexishancock/zeroclickinfo-goodies,charles-l/zeroclickinfo-goodies,synbit/zeroclickinfo-goodies,JackabiLL/zeroclickinfo-goodies,synbit/zeroclickinfo-goodies,xuv/zeroclickinfo-goodies,lamanh/zeroclickinfo-goodies,MariagraziaAlastra/zeroclickinfo-goodies,rahul-raturi/zeroclickinfo-goodies,ankushg07/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,SvetlanaZem/zeroclickinfo-goodies,zandips/zeroclickinfo-goodies,xuv/zeroclickinfo-goodies,stennie/zeroclickinfo-goodies,moinism/zeroclickinfo-goodies,jophab/zeroclickinfo-goodies,yati-sagade/zeroclickinfo-goodies,ankushg07/zeroclickinfo-goodies,xuv/zeroclickinfo-goodies,dnmfarrell/zeroclickinfo-goodies,dachinzo/zeroclickinfo-goodies,yati-sagade/zeroclickinfo-goodies,heartstchr/zeroclickinfo-goodies,iambibhas/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,jee1mr/zeroclickinfo-goodies,Skyller360/zeroclickinfo-goodies,samskeller/zeroclickinfo-goodies,jeet09/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,zandips/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,mohan08p/zeroclickinfo-goodies,AshishAAB/zeroclickinfo-goodies,SibuStephen/zeroclickinfo-goodies,synbit/zeroclickinfo-goodies,jee1mr/zeroclickinfo-goodies,glindste/zeroclickinfo-goodies,thsigit/zeroclickinfo-goodies,nagromc/zeroclickinfo-goodies,SibuStephen/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,zandips/zeroclickinfo-goodies,kalpetros/zeroclickinfo-goodies,comatory/zeroclickinfo-goodies,Faiz7412/zeroclickinfo-goodies,fired334/zeroclickinfo-goodies,SvetlanaZem/zeroclickinfo-goodies,chanizzle/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,alexishancock/zeroclickinfo-goodies,shubhamrajput/zeroclickinfo-goodies,NateBrune/zeroclickinfo-goodies,jgkamat/zeroclickinfo-goodies,nagromc/zeroclickinfo-goodies,zekiel/zeroclickinfo-goodies,SibuStephen/zeroclickinfo-goodies,dnmfarrell/zeroclickinfo-goodies,IamRafy/zeroclickinfo-goodies,aasoliz/zeroclickinfo-goodies,jppope/zeroclickinfo-goodies,SibuStephen/zeroclickinfo-goodies,fired334/zeroclickinfo-goodies,paulmolluzzo/zeroclickinfo-goodies,technoabh/zeroclickinfo-goodies,mohan08p/zeroclickinfo-goodies,chriskaschner/zeroclickinfo-goodies,loganom/zeroclickinfo-goodies,gsanthosh91/zeroclickinfo-goodies,iambibhas/zeroclickinfo-goodies,dachinzo/zeroclickinfo-goodies,Kakkoroid/zeroclickinfo-goodies,codenirvana/zeroclickinfo-goodies,gohar94/zeroclickinfo-goodies,JackabiLL/zeroclickinfo-goodies,jppope/zeroclickinfo-goodies,chief10/zeroclickinfo-goodies,wongalvis/zeroclickinfo-goodies,leekinney/zeroclickinfo-goodies,rhea-ahuja/zeroclickinfo-goodies,jgkamat/zeroclickinfo-goodies,dachinzo/zeroclickinfo-goodies,nagromc/zeroclickinfo-goodies,evejweinberg/zeroclickinfo-goodies,lamanh/zeroclickinfo-goodies,alohaas/zeroclickinfo-goodies,lxndio/zeroclickinfo-goodies,Gabrielt014/zeroclickinfo-goodies,regagain/zeroclickinfo-goodies,dronov/zeroclickinfo-goodies,Kakkoroid/zeroclickinfo-goodies,GrandpaCardigan/zeroclickinfo-goodies,oliverdunk/zeroclickinfo-goodies,charles-l/zeroclickinfo-goodies,kavithaRajagopalan/zeroclickinfo-goodies,zandips/zeroclickinfo-goodies,marwendoukh/zeroclickinfo-goodies,glindste/zeroclickinfo-goodies,Edvac/zeroclickinfo-goodies,Shugabuga/zeroclickinfo-goodies,abinabrahamanchery/zeroclickinfo-goodies,AshishAAB/zeroclickinfo-goodies,cosimo/zeroclickinfo-goodies,jophab/zeroclickinfo-goodies,jsstrn/zeroclickinfo-goodies,abhijainn27/zeroclickinfo-goodies,jeet09/zeroclickinfo-goodies,evejweinberg/zeroclickinfo-goodies,rahul-raturi/zeroclickinfo-goodies,SvetlanaZem/zeroclickinfo-goodies,alexishancock/zeroclickinfo-goodies,alfredmaliakal/zeroclickinfo-goodies,comatory/zeroclickinfo-goodies,cosimo/zeroclickinfo-goodies,xuv/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,rhea-ahuja/zeroclickinfo-goodies,sagarhani/zeroclickinfo-goodies,gsanthosh91/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,JamyGolden/zeroclickinfo-goodies,Faiz7412/zeroclickinfo-goodies,mohan08p/zeroclickinfo-goodies,NateBrune/zeroclickinfo-goodies,weathermaker/zeroclickinfo-goodies,rhea-ahuja/zeroclickinfo-goodies,rubinovitz/zeroclickinfo-goodies,chriskaschner/zeroclickinfo-goodies,ericlake/zeroclickinfo-goodies,aleksandar-todorovic/zeroclickinfo-goodies,jrenouard/zeroclickinfo-goodies,Gabrielt014/zeroclickinfo-goodies,shyamalschandra/zeroclickinfo-goodies,fired334/zeroclickinfo-goodies,zekiel/zeroclickinfo-goodies,digit4lfa1l/zeroclickinfo-goodies,MariagraziaAlastra/zeroclickinfo-goodies,MrChrisW/zeroclickinfo-goodies,ankushg07/zeroclickinfo-goodies,ecelis/zeroclickinfo-goodies,thsigit/zeroclickinfo-goodies,abinabrahamanchery/zeroclickinfo-goodies,kavithaRajagopalan/zeroclickinfo-goodies,aleksandar-todorovic/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,farhaanbukhsh/zeroclickinfo-goodies,stanly-johnson/zeroclickinfo-goodies,shyamalschandra/zeroclickinfo-goodies,visal19/zeroclickinfo-goodies,anistark/zeroclickinfo-goodies,PierreZ/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,jarmokivekas/zeroclickinfo-goodies,gautamkrishnar/zeroclickinfo-goodies,Edvac/zeroclickinfo-goodies,jsstrn/zeroclickinfo-goodies,chief10/zeroclickinfo-goodies,kavithaRajagopalan/zeroclickinfo-goodies,charles-l/zeroclickinfo-goodies,gohar94/zeroclickinfo-goodies,jamessun/zeroclickinfo-goodies,samskeller/zeroclickinfo-goodies,chanizzle/zeroclickinfo-goodies,digit4lfa1l/zeroclickinfo-goodies,jarmokivekas/zeroclickinfo-goodies,tharunreddysai/zeroclickinfo-goodies,CuriousLearner/zeroclickinfo-goodies,Kakkoroid/zeroclickinfo-goodies,Acidburn0zzz/zeroclickinfo-goodies,oliverdunk/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,digit4lfa1l/zeroclickinfo-goodies,JackabiLL/zeroclickinfo-goodies,dachinzo/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,NateBrune/zeroclickinfo-goodies,rahul-raturi/zeroclickinfo-goodies,mohan08p/zeroclickinfo-goodies,salmanfarisvp/zeroclickinfo-goodies,IamRafy/zeroclickinfo-goodies,marwendoukh/zeroclickinfo-goodies,cosimo/zeroclickinfo-goodies,amarchenkova/zeroclickinfo-goodies,MrChrisW/zeroclickinfo-goodies,evejweinberg/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,yati-sagade/zeroclickinfo-goodies,salmanfarisvp/zeroclickinfo-goodies,samskeller/zeroclickinfo-goodies,farhaanbukhsh/zeroclickinfo-goodies,rubinovitz/zeroclickinfo-goodies,pratts/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,AcriCAA/zeroclickinfo-goodies,tagawa/zeroclickinfo-goodies,rhea-ahuja/zeroclickinfo-goodies,Acidburn0zzz/zeroclickinfo-goodies,edi9999/zeroclickinfo-goodies,IamRafy/zeroclickinfo-goodies,stennie/zeroclickinfo-goodies,AcriCAA/zeroclickinfo-goodies,fired334/zeroclickinfo-goodies,leekinney/zeroclickinfo-goodies,AlexandreRio/zeroclickinfo-goodies,samskeller/zeroclickinfo-goodies,rubinovitz/zeroclickinfo-goodies,jrenouard/zeroclickinfo-goodies,yati-sagade/zeroclickinfo-goodies,jarmokivekas/zeroclickinfo-goodies,jltalens/zeroclickinfo-goodies,evejweinberg/zeroclickinfo-goodies,technoabh/zeroclickinfo-goodies,gohar94/zeroclickinfo-goodies,jeet09/zeroclickinfo-goodies,cosimo/zeroclickinfo-goodies,shyamalschandra/zeroclickinfo-goodies,AcriCAA/zeroclickinfo-goodies,tharunreddysai/zeroclickinfo-goodies,loganom/zeroclickinfo-goodies,stanly-johnson/zeroclickinfo-goodies,zblair/zeroclickinfo-goodies,brianlechthaler/zeroclickinfo-goodies,codenirvana/zeroclickinfo-goodies,dronov/zeroclickinfo-goodies,paulmolluzzo/zeroclickinfo-goodies,JackabiLL/zeroclickinfo-goodies,glindste/zeroclickinfo-goodies,heartstchr/zeroclickinfo-goodies,stennie/zeroclickinfo-goodies,DPDmancul/zeroclickinfo-goodies,jeet09/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,alohaas/zeroclickinfo-goodies,AlexandreRio/zeroclickinfo-goodies,moinism/zeroclickinfo-goodies,visal19/zeroclickinfo-goodies,shubhamrajput/zeroclickinfo-goodies,Faiz7412/zeroclickinfo-goodies,jppope/zeroclickinfo-goodies,GrandpaCardigan/zeroclickinfo-goodies,PierreZ/zeroclickinfo-goodies,edi9999/zeroclickinfo-goodies,paulmolluzzo/zeroclickinfo-goodies,gojomo/zeroclickinfo-goodies,abinabrahamanchery/zeroclickinfo-goodies,gojomo/zeroclickinfo-goodies,jltalens/zeroclickinfo-goodies,shubhamrajput/zeroclickinfo-goodies,SvetlanaZem/zeroclickinfo-goodies,jgkamat/zeroclickinfo-goodies,jamessun/zeroclickinfo-goodies,Edvac/zeroclickinfo-goodies,iambibhas/zeroclickinfo-goodies,glindste/zeroclickinfo-goodies,abhijainn27/zeroclickinfo-goodies,lxndio/zeroclickinfo-goodies,karankrishna/zeroclickinfo-goodies,jarmokivekas/zeroclickinfo-goodies,jppope/zeroclickinfo-goodies,nagromc/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,tagawa/zeroclickinfo-goodies,evejweinberg/zeroclickinfo-goodies,akanshgulati/zeroclickinfo-goodies,Kr1tya3/zeroclickinfo-goodies,jgkamat/zeroclickinfo-goodies,Kakkoroid/zeroclickinfo-goodies,moinism/zeroclickinfo-goodies,PierreZ/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,weathermaker/zeroclickinfo-goodies,synbit/zeroclickinfo-goodies,chriskaschner/zeroclickinfo-goodies,dnmfarrell/zeroclickinfo-goodies,AlexandreRio/zeroclickinfo-goodies,thechunsik/zeroclickinfo-goodies,paulmolluzzo/zeroclickinfo-goodies,AshishAAB/zeroclickinfo-goodies,zblair/zeroclickinfo-goodies,jsstrn/zeroclickinfo-goodies,ericlake/zeroclickinfo-goodies,Midhun-Jo-Antony/zeroclickinfo-goodies,GrandpaCardigan/zeroclickinfo-goodies,chanizzle/zeroclickinfo-goodies,Kakkoroid/zeroclickinfo-goodies,alfredmaliakal/zeroclickinfo-goodies,crashrane/zeroclickinfo-goodies,zandips/zeroclickinfo-goodies,shubhamrajput/zeroclickinfo-goodies,SibuStephen/zeroclickinfo-goodies,Shugabuga/zeroclickinfo-goodies,Kr1tya3/zeroclickinfo-goodies,jarmokivekas/zeroclickinfo-goodies,evejweinberg/zeroclickinfo-goodies,leekinney/zeroclickinfo-goodies,P71/zeroclickinfo-goodies,oliverdunk/zeroclickinfo-goodies,Shugabuga/zeroclickinfo-goodies,ankushg07/zeroclickinfo-goodies,chanizzle/zeroclickinfo-goodies,NateBrune/zeroclickinfo-goodies,sagarhani/zeroclickinfo-goodies,crashrane/zeroclickinfo-goodies,gsanthosh91/zeroclickinfo-goodies,ericlake/zeroclickinfo-goodies,visal19/zeroclickinfo-goodies,digit4lfa1l/zeroclickinfo-goodies,loganom/zeroclickinfo-goodies,AshishAAB/zeroclickinfo-goodies,kalpetros/zeroclickinfo-goodies,PierreZ/zeroclickinfo-goodies,leekinney/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,Gabrielt014/zeroclickinfo-goodies,Skyller360/zeroclickinfo-goodies,jppope/zeroclickinfo-goodies,technoabh/zeroclickinfo-goodies,jppope/zeroclickinfo-goodies,mohan08p/zeroclickinfo-goodies,CuriousLearner/zeroclickinfo-goodies,MariagraziaAlastra/zeroclickinfo-goodies,viluon/zeroclickinfo-goodies,visal19/zeroclickinfo-goodies,PierreZ/zeroclickinfo-goodies,Gabrielt014/zeroclickinfo-goodies,P71/zeroclickinfo-goodies,AshishAAB/zeroclickinfo-goodies,akanshgulati/zeroclickinfo-goodies,seisfeld/zeroclickinfo-goodies,chief10/zeroclickinfo-goodies,tagawa/zeroclickinfo-goodies,karankrishna/zeroclickinfo-goodies,akanshgulati/zeroclickinfo-goodies,P71/zeroclickinfo-goodies,takikawa/zeroclickinfo-goodies,thsigit/zeroclickinfo-goodies,Gabrielt014/zeroclickinfo-goodies,zblair/zeroclickinfo-goodies,SvetlanaZem/zeroclickinfo-goodies,CuriousLearner/zeroclickinfo-goodies,Edvac/zeroclickinfo-goodies,kalpetros/zeroclickinfo-goodies,jamessun/zeroclickinfo-goodies,DPDmancul/zeroclickinfo-goodies,stanly-johnson/zeroclickinfo-goodies,gohar94/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,jrenouard/zeroclickinfo-goodies,rubinovitz/zeroclickinfo-goodies,Shugabuga/zeroclickinfo-goodies,charles-l/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,Gabrielt014/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,ssrey/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,iambibhas/zeroclickinfo-goodies,sagarhani/zeroclickinfo-goodies,lxndio/zeroclickinfo-goodies,dnmfarrell/zeroclickinfo-goodies,oliverdunk/zeroclickinfo-goodies,Acidburn0zzz/zeroclickinfo-goodies,Skyller360/zeroclickinfo-goodies,jrenouard/zeroclickinfo-goodies,edi9999/zeroclickinfo-goodies,karankrishna/zeroclickinfo-goodies,lxndio/zeroclickinfo-goodies,aleksandar-todorovic/zeroclickinfo-goodies,JackabiLL/zeroclickinfo-goodies,leekinney/zeroclickinfo-goodies,AlexandreRio/zeroclickinfo-goodies,anistark/zeroclickinfo-goodies,comatory/zeroclickinfo-goodies,chanizzle/zeroclickinfo-goodies,weathermaker/zeroclickinfo-goodies,jeet09/zeroclickinfo-goodies,jophab/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,jsstrn/zeroclickinfo-goodies,MariagraziaAlastra/zeroclickinfo-goodies,Kr1tya3/zeroclickinfo-goodies,wongalvis/zeroclickinfo-goodies,Skyller360/zeroclickinfo-goodies,jee1mr/zeroclickinfo-goodies,synbit/zeroclickinfo-goodies,MrChrisW/zeroclickinfo-goodies,mr-karan/zeroclickinfo-goodies,moinism/zeroclickinfo-goodies,Skyller360/zeroclickinfo-goodies,kalpetros/zeroclickinfo-goodies,viluon/zeroclickinfo-goodies,alexishancock/zeroclickinfo-goodies,gsanthosh91/zeroclickinfo-goodies,pratts/zeroclickinfo-goodies,alexishancock/zeroclickinfo-goodies,jophab/zeroclickinfo-goodies,brianlechthaler/zeroclickinfo-goodies,heartstchr/zeroclickinfo-goodies,weathermaker/zeroclickinfo-goodies,abhijainn27/zeroclickinfo-goodies,jeet09/zeroclickinfo-goodies,GrandpaCardigan/zeroclickinfo-goodies,iambibhas/zeroclickinfo-goodies,Kr1tya3/zeroclickinfo-goodies,DPDmancul/zeroclickinfo-goodies,crashrane/zeroclickinfo-goodies,PierreZ/zeroclickinfo-goodies,chriskaschner/zeroclickinfo-goodies,glindste/zeroclickinfo-goodies,marwendoukh/zeroclickinfo-goodies,ACMASU/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,jamessun/zeroclickinfo-goodies,AlexandreRio/zeroclickinfo-goodies,pratts/zeroclickinfo-goodies,urohit011/zeroclickinfo-goodies,moollaza/zeroclickinfo-goodies,ecelis/zeroclickinfo-goodies,Shugabuga/zeroclickinfo-goodies,salmanfarisvp/zeroclickinfo-goodies,AcriCAA/zeroclickinfo-goodies,weathermaker/zeroclickinfo-goodies,akanshgulati/zeroclickinfo-goodies,amarchenkova/zeroclickinfo-goodies,GrandpaCardigan/zeroclickinfo-goodies,takikawa/zeroclickinfo-goodies,gojomo/zeroclickinfo-goodies,rubinovitz/zeroclickinfo-goodies,digit4lfa1l/zeroclickinfo-goodies,stennie/zeroclickinfo-goodies,jophab/zeroclickinfo-goodies,farhaanbukhsh/zeroclickinfo-goodies,visal19/zeroclickinfo-goodies,fired334/zeroclickinfo-goodies,moollaza/zeroclickinfo-goodies,gohar94/zeroclickinfo-goodies,Edvac/zeroclickinfo-goodies,comatory/zeroclickinfo-goodies,gojomo/zeroclickinfo-goodies,thsigit/zeroclickinfo-goodies,RomainLG/zeroclickinfo-goodies,takikawa/zeroclickinfo-goodies,Edvac/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies,marianosimone/zeroclickinfo-goodies,MrChrisW/zeroclickinfo-goodies,pratts/zeroclickinfo-goodies,DPDmancul/zeroclickinfo-goodies,jltalens/zeroclickinfo-goodies,stanly-johnson/zeroclickinfo-goodies,salmanfarisvp/zeroclickinfo-goodies,dronov/zeroclickinfo-goodies,takikawa/zeroclickinfo-goodies,IamRafy/zeroclickinfo-goodies,P71/zeroclickinfo-goodies,thechunsik/zeroclickinfo-goodies,dnmfarrell/zeroclickinfo-goodies,jrenouard/zeroclickinfo-goodies,paulmolluzzo/zeroclickinfo-goodies,rubinovitz/zeroclickinfo-goodies,lamanh/zeroclickinfo-goodies,Kr1tya3/zeroclickinfo-goodies,aasoliz/zeroclickinfo-goodies,DPDmancul/zeroclickinfo-goodies,xuv/zeroclickinfo-goodies,chief10/zeroclickinfo-goodies,aleksandar-todorovic/zeroclickinfo-goodies,ericlake/zeroclickinfo-goodies,karankrishna/zeroclickinfo-goodies,Faiz7412/zeroclickinfo-goodies,sagarhani/zeroclickinfo-goodies,wongalvis/zeroclickinfo-goodies,JamyGolden/zeroclickinfo-goodies,aasoliz/zeroclickinfo-goodies,thechunsik/zeroclickinfo-goodies,tagawa/zeroclickinfo-goodies,tharunreddysai/zeroclickinfo-goodies,akanshgulati/zeroclickinfo-goodies,chriskaschner/zeroclickinfo-goodies,GrandpaCardigan/zeroclickinfo-goodies,thsigit/zeroclickinfo-goodies,aasoliz/zeroclickinfo-goodies,wongalvis/zeroclickinfo-goodies,moinism/zeroclickinfo-goodies,shubhamrajput/zeroclickinfo-goodies,moollaza/zeroclickinfo-goodies,JamyGolden/zeroclickinfo-goodies,moinism/zeroclickinfo-goodies,jsstrn/zeroclickinfo-goodies,paulmolluzzo/zeroclickinfo-goodies,dronov/zeroclickinfo-goodies,CuriousLearner/zeroclickinfo-goodies,dachinzo/zeroclickinfo-goodies,JackabiLL/zeroclickinfo-goodies,xuv/zeroclickinfo-goodies,dnmfarrell/zeroclickinfo-goodies,lights0123/zeroclickinfo-goodies | markdown | ## Code Before:
DuckDuckGo Goodie Plugins
=================================
See [the tutorial](https://github.com/duckduckgo/duckduckgo/wiki/Open-Source-Plugin-Tutorial) for documentation (including step by step instructions).
We maintain a list of [requested goodie plugins](https://duckduckgo.uservoice.com/forums/5168-plugins/category/41841-goodies), but whatever you want to attempt is welcome!
Contributing
------------
First off, thank you!
### Process
1) Hack.
2) Test.
3) Submit a pull request.
Feel free to ask questions at [#duckduckgo on Freenode] (http://webchat.freenode.net/?channels=duckduckgo)!
## Instruction:
Update for upcoming documentation site.
## Code After:
DuckDuckGo Goodie Plugins
=================================
See [DuckDuckHack](http://duckduckhack.com/) for documentation (including a tutorial and step by step instructions).
Contributing
------------
First off, thank you!
### Process
1) Pick [a goodie project](https://duckduckgo.uservoice.com/forums/5168-plugins/category/41841-goodies) (or add one) and comment that you're working on it.
2) [Hack](http://duckduckhack.com/#plugin-tutorial).
3) [Test](http://duckduckhack.com/#testing-triggers).
4) Submit a [pull request](http://help.github.com/send-pull-requests/).
Feel free to [ask questions](http://duckduckhack.com/#faq)!
| DuckDuckGo Goodie Plugins
=================================
+ See [DuckDuckHack](http://duckduckhack.com/) for documentation (including a tutorial and step by step instructions).
- See [the tutorial](https://github.com/duckduckgo/duckduckgo/wiki/Open-Source-Plugin-Tutorial) for documentation (including step by step instructions).
-
- We maintain a list of [requested goodie plugins](https://duckduckgo.uservoice.com/forums/5168-plugins/category/41841-goodies), but whatever you want to attempt is welcome!
Contributing
------------
First off, thank you!
### Process
- 1) Hack.
+ 1) Pick [a goodie project](https://duckduckgo.uservoice.com/forums/5168-plugins/category/41841-goodies) (or add one) and comment that you're working on it.
- 2) Test.
+ 2) [Hack](http://duckduckhack.com/#plugin-tutorial).
- 3) Submit a pull request.
+ 3) [Test](http://duckduckhack.com/#testing-triggers).
- Feel free to ask questions at [#duckduckgo on Freenode] (http://webchat.freenode.net/?channels=duckduckgo)!
+ 4) Submit a [pull request](http://help.github.com/send-pull-requests/).
+
+ Feel free to [ask questions](http://duckduckhack.com/#faq)! | 14 | 0.608696 | 7 | 7 |
3c1357627bf1921fdee114b60f96f42c328120b4 | caramel/__init__.py | caramel/__init__.py | from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import (
init_session,
)
def main(global_config, **settings):
"""This function returns a Pyramid WSGI application."""
engine = engine_from_config(settings, "sqlalchemy.")
init_session(engine)
config = Configurator(settings=settings)
config.add_route("ca", "/root.crt", request_method="GET")
config.add_route("cabundle", "/bundle.crt", request_method="GET")
config.add_route("csr", "/{sha256:[0-9a-f]{64}}", request_method="POST")
config.add_route("cert", "/{sha256:[0-9a-f]{64}}", request_method="GET")
config.scan()
return config.make_wsgi_app()
| from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import (
init_session,
)
def main(global_config, **settings):
"""This function returns a Pyramid WSGI application."""
engine = engine_from_config(settings, "sqlalchemy.")
init_session(engine)
config = Configurator(settings=settings)
config.include("pyramid_tm")
config.add_route("ca", "/root.crt", request_method="GET")
config.add_route("cabundle", "/bundle.crt", request_method="GET")
config.add_route("csr", "/{sha256:[0-9a-f]{64}}", request_method="POST")
config.add_route("cert", "/{sha256:[0-9a-f]{64}}", request_method="GET")
config.scan()
return config.make_wsgi_app()
| Move pyramid_tm include to caramel.main | Caramel: Move pyramid_tm include to caramel.main
Move the setting to include pyramid_tm to caramel.main from ini files.
This is a vital setting that should never be changed by the user.
| Python | agpl-3.0 | ModioAB/caramel,ModioAB/caramel | python | ## Code Before:
from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import (
init_session,
)
def main(global_config, **settings):
"""This function returns a Pyramid WSGI application."""
engine = engine_from_config(settings, "sqlalchemy.")
init_session(engine)
config = Configurator(settings=settings)
config.add_route("ca", "/root.crt", request_method="GET")
config.add_route("cabundle", "/bundle.crt", request_method="GET")
config.add_route("csr", "/{sha256:[0-9a-f]{64}}", request_method="POST")
config.add_route("cert", "/{sha256:[0-9a-f]{64}}", request_method="GET")
config.scan()
return config.make_wsgi_app()
## Instruction:
Caramel: Move pyramid_tm include to caramel.main
Move the setting to include pyramid_tm to caramel.main from ini files.
This is a vital setting that should never be changed by the user.
## Code After:
from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import (
init_session,
)
def main(global_config, **settings):
"""This function returns a Pyramid WSGI application."""
engine = engine_from_config(settings, "sqlalchemy.")
init_session(engine)
config = Configurator(settings=settings)
config.include("pyramid_tm")
config.add_route("ca", "/root.crt", request_method="GET")
config.add_route("cabundle", "/bundle.crt", request_method="GET")
config.add_route("csr", "/{sha256:[0-9a-f]{64}}", request_method="POST")
config.add_route("cert", "/{sha256:[0-9a-f]{64}}", request_method="GET")
config.scan()
return config.make_wsgi_app()
| from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import (
init_session,
)
def main(global_config, **settings):
"""This function returns a Pyramid WSGI application."""
engine = engine_from_config(settings, "sqlalchemy.")
init_session(engine)
config = Configurator(settings=settings)
+ config.include("pyramid_tm")
config.add_route("ca", "/root.crt", request_method="GET")
config.add_route("cabundle", "/bundle.crt", request_method="GET")
config.add_route("csr", "/{sha256:[0-9a-f]{64}}", request_method="POST")
config.add_route("cert", "/{sha256:[0-9a-f]{64}}", request_method="GET")
config.scan()
return config.make_wsgi_app() | 1 | 0.052632 | 1 | 0 |
3dcd577810a623d15327a07a589a232a9e8dc355 | .travis.yml | .travis.yml | language: android
android:
components:
- build-tools-20.0.0
- android-16
licenses:
- android-sdk-license-5be876d5
branches:
except:
- gh-pages
notifications:
email: false
| language: android
jdk:
- oraclejdk7
- oraclejdk8
android:
components:
- build-tools-20.0.0
- android-16
licenses:
- android-sdk-license-5be876d5
branches:
except:
- gh-pages
notifications:
email: false
| Include JDK 8 in CI compilation in addition to 7 (current implicit default). | Include JDK 8 in CI compilation in addition to 7 (current implicit default).
| YAML | apache-2.0 | rajyvan/butterknife,newtonker/butterknife,ChristianBecker/butterknife,SOFTPOWER1991/butterknife,GeekHades/butterknife,rajyvan/butterknife,dance609195946/butterknife,JackLeeMing/butterknife,KoMinkyu/butterknife,wuseal/butterknife,lukaciko/butterknife,nabishpaul/butterknife,dreamseekerkun/butterknife,krumman/butterknife,appdevzhang/butterknife,artem-zinnatullin/butterknife,GeekHades/butterknife,KristenXu/butterknife,yuanhuihui/butterknife,wuseal/butterknife,tsunli/butterknife,sylsi/butterknife,wangkr/butterknife,tanweijiu/butterknife,kevinmost/butterknife,tbsandee/butterknife,xsingHu/butterknife,vamsirajendra/butterknife,JakeWharton/butterknife,serj-lotutovici/butterknife,risedrag/butterknife,haoyh/butterknife,yadihaoku/butterknife,ptornhult/butterknife,littlezan/butterknife,sunios/butterknife,jbc25/butterknife,JackLeeMing/butterknife,AmberWhiteSky/butterknife,MichaelEvans/butterknife,lockerfish/butterknife,ze-pequeno/butterknife,wuzheng4android/butterknife,newtonker/butterknife,hzsweers/butterknife,OneRom/external_butterknife,yadihaoku/butterknife,nabishpaul/butterknife,rajyvan/butterknife,Orbar/butterknife,chuangWu/butterknife,wuman/butterknife,healthy-tree/butterknife,luinnx/butterknife,yuanhuihui/butterknife,YuzurihaInori/butterknife,tanweijiu/butterknife,OneRom/external_butterknife,littlezan/butterknife,appdevzhang/butterknife,wuman/butterknife,dreamseekerkun/butterknife,JudeRosario/butterknife,yuanbo1026/butterknife,suzukaze/butterknife,kaoree/butterknife,hgl888/butterknife,ze-pequeno/butterknife,Peter32/butterknife,Shedings/butterknife,krumman/butterknife,JuranoSaurus/butterknife,luinnx/butterknife,wenxueliu/butterknife,wenxueliu/butterknife,healthy-tree/butterknife,ta893115871/butterknife,github609195946/butterknife,wuseal/butterknife,renatohsc/butterknife,huanting/butterknife,KristenXu/butterknife,wuzheng4android/butterknife,JackLeeMing/butterknife,KoMinkyu/butterknife,srayhunter/butterknife,risedrag/butterknife,suzukaze/butterknife,androidgilbert/butterknife,hgl888/butterknife,b-cuts/butterknife,oguzbabaoglu/butterfork,chuangWu/butterknife,carollynn2253/butterknife,serj-lotutovici/butterknife,xfumihiro/butterknife,yadihaoku/butterknife,ta893115871/butterknife,GeekHades/butterknife,NortonAhu/butterknife,huangsongyan/butterknife,kevinmost/butterknife,AmberWhiteSky/butterknife,JakeWharton/butterknife,nabishpaul/butterknife,yuhuayi/butterknife,xfumihiro/butterknife,AmberWhiteSky/butterknife,haoyh/butterknife,xfumihiro/butterknife,ptornhult/butterknife,sunios/butterknife,ruhaly/butterknife,jvvlives2005/butterknife,SOFTPOWER1991/butterknife,wangkr/butterknife,kevinmost/butterknife,yuanbo1026/butterknife,carollynn2253/butterknife,appdevzhang/butterknife,littlezan/butterknife,lockerfish/butterknife,yigeyidian/butterknife,lockerfish/butterknife,risedrag/butterknife,tbsandee/butterknife,ze-pequeno/butterknife,zhakui/butterknife,ta893115871/butterknife,wuman/butterknife,ChristianBecker/butterknife,kaoree/butterknife,luinnx/butterknife,PAC-ROM/android_external_JakeWharton_butterknife,MichaelEvans/butterknife,huanting/butterknife,tsunli/butterknife,ruhaly/butterknife,chuangWu/butterknife,YuzurihaInori/butterknife,yigeyidian/butterknife,OneRom/external_butterknife,hgl888/butterknife,b-cuts/butterknife,srayhunter/butterknife,huangsongyan/butterknife,Orbar/butterknife,androidgilbert/butterknife,krumman/butterknife,oguzbabaoglu/butterfork,yuhuayi/butterknife,sylsi/butterknife,xsingHu/butterknife,b-cuts/butterknife,wuzheng4android/butterknife,yigeyidian/butterknife,ChinaKim/butterknife,JudeRosario/butterknife,zheng1733/butterknife,serj-lotutovici/butterknife,eleme/butterknife,dance609195946/butterknife,vamsirajendra/butterknife,huangsongyan/butterknife,YuzurihaInori/butterknife,dreamseekerkun/butterknife,ChristianBecker/butterknife,omegasoft7/butterknife,artem-zinnatullin/butterknife,JasonWKS/butterknife,jam0cam/butterknife,carollynn2253/butterknife,KristenXu/butterknife,yuhuayi/butterknife,hzsweers/butterknife,kaoree/butterknife,ze-pequeno/butterknife,sylsi/butterknife,lukaciko/butterknife,JellyBeanIdea/butterknife,yuanbo1026/butterknife,PAC-ROM/android_external_JakeWharton_butterknife,qingsong-xu/butterknife,healthy-tree/butterknife,JudeRosario/butterknife,ChinaKim/butterknife,newtonker/butterknife,wenxueliu/butterknife,github609195946/butterknife,qingsong-xu/butterknife,ChristianBecker/butterknife,yuanhuihui/butterknife,NortonAhu/butterknife,JakeWharton/butterknife,zhakui/butterknife,JakeWharton/butterknife,renatohsc/butterknife,JuranoSaurus/butterknife,JasonWKS/butterknife,PAC-ROM/android_external_JakeWharton_butterknife,zheng1733/butterknife,jam0cam/butterknife,JellyBeanIdea/butterknife,jvvlives2005/butterknife,suzukaze/butterknife,Shedings/butterknife,ptornhult/butterknife,Orbar/butterknife,dance609195946/butterknife,jbc25/butterknife,yushiwo/butterknife,Peter32/butterknife,Shedings/butterknife,treejames/butterknife,srayhunter/butterknife,treejames/butterknife,zheng1733/butterknife,oguzbabaoglu/butterfork,MichaelEvans/butterknife,huanting/butterknife,yushiwo/butterknife,omegasoft7/butterknife,KoMinkyu/butterknife,jbc25/butterknife,wangkr/butterknife,lukaciko/butterknife,tbsandee/butterknife,haoyh/butterknife,jam0cam/butterknife,zhakui/butterknife,ChinaKim/butterknife,xsingHu/butterknife,treejames/butterknife,renatohsc/butterknife,eleme/butterknife,vamsirajendra/butterknife,yushiwo/butterknife,sunios/butterknife,tsunli/butterknife,NortonAhu/butterknife,github609195946/butterknife,ruhaly/butterknife,Scanor/butterknife,jvvlives2005/butterknife,eleme/butterknife,JasonWKS/butterknife,androidgilbert/butterknife,JellyBeanIdea/butterknife,qingsong-xu/butterknife,hzsweers/butterknife,Peter32/butterknife,JuranoSaurus/butterknife,Scanor/butterknife,Scanor/butterknife,tanweijiu/butterknife,artem-zinnatullin/butterknife,SOFTPOWER1991/butterknife | yaml | ## Code Before:
language: android
android:
components:
- build-tools-20.0.0
- android-16
licenses:
- android-sdk-license-5be876d5
branches:
except:
- gh-pages
notifications:
email: false
## Instruction:
Include JDK 8 in CI compilation in addition to 7 (current implicit default).
## Code After:
language: android
jdk:
- oraclejdk7
- oraclejdk8
android:
components:
- build-tools-20.0.0
- android-16
licenses:
- android-sdk-license-5be876d5
branches:
except:
- gh-pages
notifications:
email: false
| language: android
+
+ jdk:
+ - oraclejdk7
+ - oraclejdk8
android:
components:
- build-tools-20.0.0
- android-16
licenses:
- android-sdk-license-5be876d5
branches:
except:
- gh-pages
notifications:
email: false | 4 | 0.266667 | 4 | 0 |
4cf41f5b834e91eaf3c2348295f1bea9090719d9 | src/oe/packet/PacketHandler.java | src/oe/packet/PacketHandler.java | package oe.packet;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
public class PacketHandler implements IPacketHandler {
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player playerEntity) {
System.out.println(packet.channel);
if (packet.channel == "oe" || packet.channel == "OE") {
InternalPacket.packet(manager, packet, playerEntity);
}
}
}
| package oe.packet;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
public class PacketHandler implements IPacketHandler {
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player playerEntity) {
if (packet.channel == "oe" || packet.channel == "OE") {
InternalPacket.packet(manager, packet, playerEntity);
}
}
}
| Remove Debug code in packet handler | Remove Debug code in packet handler
| Java | mit | ictrobot/Open-Exchange | java | ## Code Before:
package oe.packet;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
public class PacketHandler implements IPacketHandler {
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player playerEntity) {
System.out.println(packet.channel);
if (packet.channel == "oe" || packet.channel == "OE") {
InternalPacket.packet(manager, packet, playerEntity);
}
}
}
## Instruction:
Remove Debug code in packet handler
## Code After:
package oe.packet;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
public class PacketHandler implements IPacketHandler {
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player playerEntity) {
if (packet.channel == "oe" || packet.channel == "OE") {
InternalPacket.packet(manager, packet, playerEntity);
}
}
}
| package oe.packet;
import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
public class PacketHandler implements IPacketHandler {
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player playerEntity) {
- System.out.println(packet.channel);
if (packet.channel == "oe" || packet.channel == "OE") {
InternalPacket.packet(manager, packet, playerEntity);
}
}
} | 1 | 0.055556 | 0 | 1 |
09fde3ea31b753527919baca4401401b15e3efc7 | k8s/base/deployments/deployment.yaml | k8s/base/deployments/deployment.yaml |
kind: Deployment
apiVersion: apps/v1
metadata:
name: sample-app
spec:
selector:
matchLabels:
app: sample-app
env: base
template:
metadata:
name: sample-app
labels:
app: sample-app
env: base
spec:
containers:
- name: sample-app
image: sample-app
resources:
limits:
memory: "128Mi"
cpu: "250m"
env:
- name: VERSION
value: base
imagePullPolicy: Always
readinessProbe:
initialDelaySeconds: 2
periodSeconds: 20
httpGet:
path: /healthz
port: 8080
ports:
- name: sample-app
containerPort: 8080
securityContext:
runAsUser: 1000
runAsNonRoot: true
|
kind: Deployment
apiVersion: apps/v1
metadata:
name: sample-app
spec:
selector:
matchLabels:
app: sample-app
env: base
template:
metadata:
name: sample-app
labels:
app: sample-app
env: base
spec:
containers:
- name: sample-app
image: sample-app
resources:
limits:
memory: "128Mi"
cpu: "250m"
env:
- name: VERSION
value: base
imagePullPolicy: Always
livenessProbe:
initialDelaySeconds: 10
periodSeconds: 10
httpGet:
path: /healthz
port: 8080
readinessProbe:
initialDelaySeconds: 2
periodSeconds: 20
httpGet:
path: /healthz
port: 8080
ports:
- name: sample-app
containerPort: 8080
securityContext:
runAsUser: 1000
runAsNonRoot: true
| Add liveness probe to shutdown app if unhealthy | Add liveness probe to shutdown app if unhealthy
| YAML | apache-2.0 | google/golden-path-for-app-delivery,google/golden-path-for-app-delivery,google/golden-path-for-app-delivery | yaml | ## Code Before:
kind: Deployment
apiVersion: apps/v1
metadata:
name: sample-app
spec:
selector:
matchLabels:
app: sample-app
env: base
template:
metadata:
name: sample-app
labels:
app: sample-app
env: base
spec:
containers:
- name: sample-app
image: sample-app
resources:
limits:
memory: "128Mi"
cpu: "250m"
env:
- name: VERSION
value: base
imagePullPolicy: Always
readinessProbe:
initialDelaySeconds: 2
periodSeconds: 20
httpGet:
path: /healthz
port: 8080
ports:
- name: sample-app
containerPort: 8080
securityContext:
runAsUser: 1000
runAsNonRoot: true
## Instruction:
Add liveness probe to shutdown app if unhealthy
## Code After:
kind: Deployment
apiVersion: apps/v1
metadata:
name: sample-app
spec:
selector:
matchLabels:
app: sample-app
env: base
template:
metadata:
name: sample-app
labels:
app: sample-app
env: base
spec:
containers:
- name: sample-app
image: sample-app
resources:
limits:
memory: "128Mi"
cpu: "250m"
env:
- name: VERSION
value: base
imagePullPolicy: Always
livenessProbe:
initialDelaySeconds: 10
periodSeconds: 10
httpGet:
path: /healthz
port: 8080
readinessProbe:
initialDelaySeconds: 2
periodSeconds: 20
httpGet:
path: /healthz
port: 8080
ports:
- name: sample-app
containerPort: 8080
securityContext:
runAsUser: 1000
runAsNonRoot: true
|
kind: Deployment
apiVersion: apps/v1
metadata:
name: sample-app
spec:
selector:
matchLabels:
app: sample-app
env: base
template:
metadata:
name: sample-app
labels:
app: sample-app
env: base
spec:
containers:
- name: sample-app
image: sample-app
resources:
limits:
memory: "128Mi"
cpu: "250m"
env:
- name: VERSION
value: base
imagePullPolicy: Always
+ livenessProbe:
+ initialDelaySeconds: 10
+ periodSeconds: 10
+ httpGet:
+ path: /healthz
+ port: 8080
readinessProbe:
initialDelaySeconds: 2
periodSeconds: 20
httpGet:
path: /healthz
port: 8080
ports:
- name: sample-app
containerPort: 8080
securityContext:
runAsUser: 1000
runAsNonRoot: true | 6 | 0.15 | 6 | 0 |
1d3abf94f912d1fc3edc8836ddcaf9a5bc725764 | schema_gen.go | schema_gen.go | package cloudformation
//go:generate go run ./scraper/scrape.go -format=go -out=schema.go
//go:generate go run ./scraper/scrape.go -format=json -out=schema.json
| package cloudformation
//go:generate go test -v ./scraper/.
| Update scraper to use new script | Update scraper to use new script
| Go | bsd-2-clause | crewjam/go-cloudformation,crewjam/go-cloudformation | go | ## Code Before:
package cloudformation
//go:generate go run ./scraper/scrape.go -format=go -out=schema.go
//go:generate go run ./scraper/scrape.go -format=json -out=schema.json
## Instruction:
Update scraper to use new script
## Code After:
package cloudformation
//go:generate go test -v ./scraper/.
| package cloudformation
+ //go:generate go test -v ./scraper/.
- //go:generate go run ./scraper/scrape.go -format=go -out=schema.go
- //go:generate go run ./scraper/scrape.go -format=json -out=schema.json | 3 | 0.75 | 1 | 2 |
b561932577bc34f46b86b1af420e1c176518be9f | .travis.yml | .travis.yml | sudo: false
dist: trusty
language: php
matrix:
include:
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: nightly
- php: hhvm-3.24
sudo: required
fast_finish: true
allow_failures:
- php: nightly
- php: hhvm-3.24
before_script:
- composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
script:
- ./vendor/bin/phpunit -v -c phpunit.xml.dist
- ./vendor/bin/phpmd src/ text phpmd.xml.dist
- |
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS}
cache:
directories:
- $HOME/.composer/cache
| sudo: false
dist: trusty
language: php
matrix:
include:
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
- php: nightly
sudo: required
fast_finish: true
allow_failures:
- php: nightly
before_script:
- composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
script:
- ./vendor/bin/phpunit -v -c phpunit.xml.dist
- ./vendor/bin/phpmd src/ text phpmd.xml.dist
- |
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS}
cache:
directories:
- $HOME/.composer/cache
| Add support for builds with PHP 7.3 and 7.4, dropped support for hhvm-3.24 | Add support for builds with PHP 7.3 and 7.4, dropped support for hhvm-3.24
| YAML | mit | Facturama/facturama-php-sdk | yaml | ## Code Before:
sudo: false
dist: trusty
language: php
matrix:
include:
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: nightly
- php: hhvm-3.24
sudo: required
fast_finish: true
allow_failures:
- php: nightly
- php: hhvm-3.24
before_script:
- composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
script:
- ./vendor/bin/phpunit -v -c phpunit.xml.dist
- ./vendor/bin/phpmd src/ text phpmd.xml.dist
- |
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS}
cache:
directories:
- $HOME/.composer/cache
## Instruction:
Add support for builds with PHP 7.3 and 7.4, dropped support for hhvm-3.24
## Code After:
sudo: false
dist: trusty
language: php
matrix:
include:
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
- php: nightly
sudo: required
fast_finish: true
allow_failures:
- php: nightly
before_script:
- composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
script:
- ./vendor/bin/phpunit -v -c phpunit.xml.dist
- ./vendor/bin/phpmd src/ text phpmd.xml.dist
- |
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS}
cache:
directories:
- $HOME/.composer/cache
| sudo: false
dist: trusty
language: php
matrix:
include:
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
+ - php: 7.3
+ - php: 7.4
- php: nightly
- - php: hhvm-3.24
sudo: required
fast_finish: true
allow_failures:
- php: nightly
- - php: hhvm-3.24
before_script:
- composer update --prefer-dist --no-interaction $COMPOSER_FLAGS
script:
- ./vendor/bin/phpunit -v -c phpunit.xml.dist
- ./vendor/bin/phpmd src/ text phpmd.xml.dist
- |
CHANGED_FILES=$(git diff --name-only --diff-filter=ACMRTUXB "${TRAVIS_COMMIT_RANGE}")
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php_cs(\\.dist)?|composer\\.lock)$"; then EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}"); else EXTRA_ARGS=''; fi
vendor/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS}
cache:
directories:
- $HOME/.composer/cache | 4 | 0.117647 | 2 | 2 |
dbd774250bcc44c73a614b52fdcf5da0bfbb85bd | languages/plumhead/lib/Parrot/Test/Plumhead/Yacc.pm | languages/plumhead/lib/Parrot/Test/Plumhead/Yacc.pm |
package Parrot::Test::Plumhead::Yacc;
# pragmata
use strict;
use warnings;
use base 'Parrot::Test::Plumhead';
sub get_out_fn {
my $self = shift;
my ( $count, $options ) = @_;
return Parrot::Test::per_test( '_yacc.out', $count );
}
# Use PHP on the command line
sub get_test_prog {
my $self = shift;
my ( $count, $options ) = @_;
my $lang_fn = Parrot::Test::per_test( '.php', $count );
return "./parrot languages/plumhead/plumhead.pbc --variant=yacc languages/${lang_fn}";
}
# never skip the reference implementation
sub skip_why {
my $self = shift;
my ($options) = @_;
return;
}
1;
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
|
package Parrot::Test::Plumhead::Yacc;
# pragmata
use strict;
use warnings;
use base 'Parrot::Test::Plumhead';
# Generate output_is(), output_isnt() and output_like() in current package.
Parrot::Test::generate_languages_functions();
sub get_out_fn {
my $self = shift;
my ( $count, $options ) = @_;
return Parrot::Test::per_test( '_yacc.out', $count );
}
# Use PHP on the command line
sub get_test_prog {
my $self = shift;
my ( $count, $options ) = @_;
my $lang_fn = Parrot::Test::per_test( '.php', $count );
return qq{./parrot languages/plumhead/plumhead.pbc --variant=yacc languages/${lang_fn}};
}
# never skip the reference implementation
sub skip_why {
my $self = shift;
my ($options) = @_;
return;
}
1;
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
| Add missing Parrot::Test::generate_languages_functions(). All tests failing for 'make test-yacc' as variant 'yacc' is not implemented. | [Plumhead]
Add missing Parrot::Test::generate_languages_functions().
All tests failing for 'make test-yacc' as variant 'yacc'
is not implemented.
git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@22252 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
| Perl | artistic-2.0 | ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot | perl | ## Code Before:
package Parrot::Test::Plumhead::Yacc;
# pragmata
use strict;
use warnings;
use base 'Parrot::Test::Plumhead';
sub get_out_fn {
my $self = shift;
my ( $count, $options ) = @_;
return Parrot::Test::per_test( '_yacc.out', $count );
}
# Use PHP on the command line
sub get_test_prog {
my $self = shift;
my ( $count, $options ) = @_;
my $lang_fn = Parrot::Test::per_test( '.php', $count );
return "./parrot languages/plumhead/plumhead.pbc --variant=yacc languages/${lang_fn}";
}
# never skip the reference implementation
sub skip_why {
my $self = shift;
my ($options) = @_;
return;
}
1;
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
## Instruction:
[Plumhead]
Add missing Parrot::Test::generate_languages_functions().
All tests failing for 'make test-yacc' as variant 'yacc'
is not implemented.
git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@22252 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
## Code After:
package Parrot::Test::Plumhead::Yacc;
# pragmata
use strict;
use warnings;
use base 'Parrot::Test::Plumhead';
# Generate output_is(), output_isnt() and output_like() in current package.
Parrot::Test::generate_languages_functions();
sub get_out_fn {
my $self = shift;
my ( $count, $options ) = @_;
return Parrot::Test::per_test( '_yacc.out', $count );
}
# Use PHP on the command line
sub get_test_prog {
my $self = shift;
my ( $count, $options ) = @_;
my $lang_fn = Parrot::Test::per_test( '.php', $count );
return qq{./parrot languages/plumhead/plumhead.pbc --variant=yacc languages/${lang_fn}};
}
# never skip the reference implementation
sub skip_why {
my $self = shift;
my ($options) = @_;
return;
}
1;
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4:
|
package Parrot::Test::Plumhead::Yacc;
# pragmata
use strict;
use warnings;
use base 'Parrot::Test::Plumhead';
+
+ # Generate output_is(), output_isnt() and output_like() in current package.
+ Parrot::Test::generate_languages_functions();
sub get_out_fn {
my $self = shift;
my ( $count, $options ) = @_;
return Parrot::Test::per_test( '_yacc.out', $count );
}
# Use PHP on the command line
sub get_test_prog {
my $self = shift;
my ( $count, $options ) = @_;
my $lang_fn = Parrot::Test::per_test( '.php', $count );
- return "./parrot languages/plumhead/plumhead.pbc --variant=yacc languages/${lang_fn}";
? ^ ^
+ return qq{./parrot languages/plumhead/plumhead.pbc --variant=yacc languages/${lang_fn}};
? ^^^ ^
}
# never skip the reference implementation
sub skip_why {
my $self = shift;
my ($options) = @_;
return;
}
1;
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
# vim: expandtab shiftwidth=4: | 5 | 0.119048 | 4 | 1 |
c1e4dcb6896b0255edf43a8b5af9d3ffdafeaddd | app/views/users/passwords/new.html.haml | app/views/users/passwords/new.html.haml | .auth__form
%h2= I18n.t 'auth.forgot.link'
= simple_form_for resource, as: resource_name, url: password_path(resource_name) do |f|
= devise_error_messages!
= f.input :email, autofocus: true, required: true
= f.button :submit, I18n.t('auth.forgot.submit'), class: 'btn-primary'
= render "users/shared/links"
| .auth__form
%h2= I18n.t 'auth.forgot.link'
= simple_form_for resource, as: resource_name, url: password_path(resource_name) do |f|
= f.input :email, autofocus: true, required: true
= f.button :submit, I18n.t('auth.forgot.submit'), class: 'btn-primary'
= render "users/shared/links"
| Remove generic devise error message | Remove generic devise error message | Haml | mit | aninder/rails4-starterkit,mwahmed/picxel,kbarre123/starterkits_rails4,nfelix/mvmt,rememberlenny/email-newsletter-stand,kbarre123/starterkits_rails4,nfelix/mvmt,girlIT/Weekend,jocelyndrean/glowing-avenger,yogadog/rails-project,rememberlenny/newsletterstand,mwahmed/picxel,ak15/beshare_ak15,Gerstep/cine,MonikaMahanthappa/lunch-box,Nahrae/nahrae-portfolio,cybergami/cybergami.com.2.0,cybergami/rails4-starterkit,MartinHeimbring/awesome_starter_app,MonikaMahanthappa/lunch-box,andrewthefish/ImageScrambler,rememberlenny/newsletterstand,rememberlenny/email-newsletter-stand,Gerstep/cine,Wendersonandes/emerge,rememberlenny/rails4-starterkit,usmanajmal3/Testing,jocelyndrean/glowing-avenger,starterkits/rails4-starterkit,MartinHeimbring/awesome_starter_app,aninder/rails4-starterkit,rememberlenny/rails4-starterkit,starterkits/rails4-starterkit,Gerstep/cine,starterkits/rails4-starterkit,Nahrae/nahrae-portfolio,ak15/beshare,verdi327/jumpstartvegan,ak15/beshare,nfelix/mvmt,MonikaMahanthappa/lunch-box,Ilinicz/cupofme,samuels410/simply_notify,ak15/beshare_ak15,samuels410/simply_notify,rememberlenny/email-newsletter-stand,laeroah/SAM,jocelyndrean/glowing-avenger,rememberlenny/newsletterstand,MartinHeimbring/awesome_starter_app,Ilinicz/cupofme,Nahrae/nahrae-portfolio,yogadog/rails-project,andrewthefish/ImageScrambler,girlIT/Weekend,cybergami/rails4-starterkit,kbarre123/starterkits_rails4,verdi327/jumpstartvegan,cybergami/cybergami.com.2.0,Wendersonandes/emerge,aninder/rails4-starterkit,usmanajmal3/Testing,Wendersonandes/emerge,laeroah/SAM,usmanajmal3/Testing,laeroah/SAM | haml | ## Code Before:
.auth__form
%h2= I18n.t 'auth.forgot.link'
= simple_form_for resource, as: resource_name, url: password_path(resource_name) do |f|
= devise_error_messages!
= f.input :email, autofocus: true, required: true
= f.button :submit, I18n.t('auth.forgot.submit'), class: 'btn-primary'
= render "users/shared/links"
## Instruction:
Remove generic devise error message
## Code After:
.auth__form
%h2= I18n.t 'auth.forgot.link'
= simple_form_for resource, as: resource_name, url: password_path(resource_name) do |f|
= f.input :email, autofocus: true, required: true
= f.button :submit, I18n.t('auth.forgot.submit'), class: 'btn-primary'
= render "users/shared/links"
| .auth__form
%h2= I18n.t 'auth.forgot.link'
= simple_form_for resource, as: resource_name, url: password_path(resource_name) do |f|
- = devise_error_messages!
= f.input :email, autofocus: true, required: true
= f.button :submit, I18n.t('auth.forgot.submit'), class: 'btn-primary'
= render "users/shared/links" | 1 | 0.111111 | 0 | 1 |
b52441dbdd7e3145a5a450fce7734d399d1ffd9b | lib/tasks/comments.rake | lib/tasks/comments.rake | namespace :comments do
desc "Move posts to polymophic subject"
task move_posts_to_subject: :environment do
Comment.all.each do |comment|
next unless comment.post.present?
comment.subject = comment.post
comment.post = nil
comment.save
end
end
end
| namespace :comments do
desc "Move posts to polymophic subject"
task copy_posts_to_subject: :environment do
Comment.all.each do |comment|
next unless comment.post.present?
comment.subject = comment.post
comment.save
end
end
end
| Update rake to not clear post from comment | Update rake to not clear post from comment
| Ruby | mit | fantasygame/campaigns,fantasygame/campaigns,fantasygame/campaigns | ruby | ## Code Before:
namespace :comments do
desc "Move posts to polymophic subject"
task move_posts_to_subject: :environment do
Comment.all.each do |comment|
next unless comment.post.present?
comment.subject = comment.post
comment.post = nil
comment.save
end
end
end
## Instruction:
Update rake to not clear post from comment
## Code After:
namespace :comments do
desc "Move posts to polymophic subject"
task copy_posts_to_subject: :environment do
Comment.all.each do |comment|
next unless comment.post.present?
comment.subject = comment.post
comment.save
end
end
end
| namespace :comments do
desc "Move posts to polymophic subject"
- task move_posts_to_subject: :environment do
? ^ ^^
+ task copy_posts_to_subject: :environment do
? ^ ^^
Comment.all.each do |comment|
next unless comment.post.present?
comment.subject = comment.post
- comment.post = nil
comment.save
end
end
end | 3 | 0.272727 | 1 | 2 |
1d851a859ca3ebf6a40fb49388998275c57e4096 | cucumber.js | cucumber.js | module.exports = {
"default": "--compiler ls:livescript -r features --strict --snippet-syntax node_modules/cucumber-snippets-livescript"
}
| module.exports = {
"default": "--compiler ls:livescript -r features --fail-fast --strict --snippet-syntax node_modules/cucumber-snippets-livescript"
}
| Stop Cucumber at the first error | Stop Cucumber at the first error | JavaScript | mit | Originate/exosphere,Originate/exosphere,Originate/exosphere,Originate/exosphere | javascript | ## Code Before:
module.exports = {
"default": "--compiler ls:livescript -r features --strict --snippet-syntax node_modules/cucumber-snippets-livescript"
}
## Instruction:
Stop Cucumber at the first error
## Code After:
module.exports = {
"default": "--compiler ls:livescript -r features --fail-fast --strict --snippet-syntax node_modules/cucumber-snippets-livescript"
}
| module.exports = {
- "default": "--compiler ls:livescript -r features --strict --snippet-syntax node_modules/cucumber-snippets-livescript"
+ "default": "--compiler ls:livescript -r features --fail-fast --strict --snippet-syntax node_modules/cucumber-snippets-livescript"
? ++++++++++++
} | 2 | 0.666667 | 1 | 1 |
e26f7e5b824ff9cfe21b1ea81e599942cc8b9cf3 | test/authorized-keys-test.js | test/authorized-keys-test.js | var assert = require('assert'),
vows = require('vows'),
AuthorizedKeys = require('../');
var testKey = { type: 'ssh-rsa', content: 'mykey', name: 'maciej' };
vows.describe('authorized-keys').addBatch({
'When using `authorized-keys`': {
'with a new `AuthorizedKeys` object': {
topic: new AuthorizedKeys(),
'there should be no keys': function (keys) {
assert.lengthOf(keys.keys, 0);
},
'after adding a key to it': {
topic: function (keys) {
keys.add(testKey);
return keys;
},
'it should be there': function (keys) {
assert.lengthOf(keys.keys, 1);
assert.deepEqual(keys.keys[0], new AuthorizedKeys.Key(testKey));
}
}
}
}
}).export(module);
| var assert = require('assert'),
vows = require('vows'),
AuthorizedKeys = require('../');
var testKey = { type: 'ssh-rsa', content: 'mykey', name: 'maciej' };
vows.describe('authorized-keys').addBatch({
'When using `authorized-keys`': {
'with a new `AuthorizedKeys` object': {
topic: new AuthorizedKeys(),
'there should be no keys': function (keys) {
assert.lengthOf(keys.keys, 0);
},
'after adding a key to it': {
topic: function (keys) {
keys.add(testKey);
return keys;
},
'it should be there': function (keys) {
assert.lengthOf(keys.keys, 1);
assert.deepEqual(keys.keys[0], new AuthorizedKeys.Key(testKey));
},
'it should be searchable by name': function (keys) {
var search = keys.getByName(testKey.name);
assert.lengthOf(search, 1);
assert.deepEqual(search[0], new AuthorizedKeys.Key(testKey));
}
}
}
}
}).export(module);
| Add test for searching by name | [test] Add test for searching by name
| JavaScript | mit | mmalecki/node-authorized-keys | javascript | ## Code Before:
var assert = require('assert'),
vows = require('vows'),
AuthorizedKeys = require('../');
var testKey = { type: 'ssh-rsa', content: 'mykey', name: 'maciej' };
vows.describe('authorized-keys').addBatch({
'When using `authorized-keys`': {
'with a new `AuthorizedKeys` object': {
topic: new AuthorizedKeys(),
'there should be no keys': function (keys) {
assert.lengthOf(keys.keys, 0);
},
'after adding a key to it': {
topic: function (keys) {
keys.add(testKey);
return keys;
},
'it should be there': function (keys) {
assert.lengthOf(keys.keys, 1);
assert.deepEqual(keys.keys[0], new AuthorizedKeys.Key(testKey));
}
}
}
}
}).export(module);
## Instruction:
[test] Add test for searching by name
## Code After:
var assert = require('assert'),
vows = require('vows'),
AuthorizedKeys = require('../');
var testKey = { type: 'ssh-rsa', content: 'mykey', name: 'maciej' };
vows.describe('authorized-keys').addBatch({
'When using `authorized-keys`': {
'with a new `AuthorizedKeys` object': {
topic: new AuthorizedKeys(),
'there should be no keys': function (keys) {
assert.lengthOf(keys.keys, 0);
},
'after adding a key to it': {
topic: function (keys) {
keys.add(testKey);
return keys;
},
'it should be there': function (keys) {
assert.lengthOf(keys.keys, 1);
assert.deepEqual(keys.keys[0], new AuthorizedKeys.Key(testKey));
},
'it should be searchable by name': function (keys) {
var search = keys.getByName(testKey.name);
assert.lengthOf(search, 1);
assert.deepEqual(search[0], new AuthorizedKeys.Key(testKey));
}
}
}
}
}).export(module);
| var assert = require('assert'),
vows = require('vows'),
AuthorizedKeys = require('../');
var testKey = { type: 'ssh-rsa', content: 'mykey', name: 'maciej' };
vows.describe('authorized-keys').addBatch({
'When using `authorized-keys`': {
'with a new `AuthorizedKeys` object': {
topic: new AuthorizedKeys(),
'there should be no keys': function (keys) {
assert.lengthOf(keys.keys, 0);
},
'after adding a key to it': {
topic: function (keys) {
keys.add(testKey);
return keys;
},
'it should be there': function (keys) {
assert.lengthOf(keys.keys, 1);
assert.deepEqual(keys.keys[0], new AuthorizedKeys.Key(testKey));
+ },
+ 'it should be searchable by name': function (keys) {
+ var search = keys.getByName(testKey.name);
+ assert.lengthOf(search, 1);
+ assert.deepEqual(search[0], new AuthorizedKeys.Key(testKey));
}
}
}
}
}).export(module);
| 5 | 0.185185 | 5 | 0 |
ba22b270a60e6815400300d8180e13cb2ceea358 | config/webpack/environment.js | config/webpack/environment.js | const { environment } = require('@rails/webpacker')
const ConcatPlugin = require('webpack-concat-plugin')
environment.plugins.append('ConcatPlugin', new ConcatPlugin({
uglify: true,
sourceMap: true,
outputPath: 'js',
fileName: 'application.bundle.js',
filesToConcat: [
'jquery',
'jquery-ujs',
'jquery.iframe-transport',
'dropzone',
'govuk_frontend_toolkit/javascripts/govuk/stick-at-top-when-scrolling.js',
'govuk_frontend_toolkit/javascripts/govuk/stop-scrolling-at-footer.js',
'jquery-accessible-accordion-aria',
'jsrender',
'jquery-highlight',
'jquery-throttle-debounce',
'accessible-autocomplete',
'./app/webpack/javascripts/vendor/**/*',
'./app/webpack/javascripts/modules/**/*',
'./app/webpack/javascripts/plugins/**/*',
'./app/webpack/javascripts/application.js'
]
}))
module.exports = environment
| const { environment } = require('@rails/webpacker')
const ConcatPlugin = require('webpack-concat-plugin')
environment.plugins.append('ConcatPlugin', new ConcatPlugin({
uglify: true,
sourceMap: true,
outputPath: 'js',
fileName: 'application.bundle.js',
filesToConcat: [
'jquery',
'jquery-ujs',
'jquery.iframe-transport',
'dropzone',
'govuk_frontend_toolkit/javascripts/govuk/stick-at-top-when-scrolling.js',
'govuk_frontend_toolkit/javascripts/govuk/stop-scrolling-at-footer.js',
'jquery-accessible-accordion-aria',
'jsrender',
'jquery-highlight',
'jquery-throttle-debounce',
'accessible-autocomplete',
'./app/webpack/javascripts/vendor/**/*',
'./app/webpack/javascripts/modules/**/*',
'./app/webpack/javascripts/plugins/**/*',
'./app/webpack/javascripts/application.js'
]
}))
environment.config.merge({
output: {
filename: 'js/[name]-[hash].js'
}
})
module.exports = environment
| Resolve webpack-dev-server output filename error | Resolve webpack-dev-server output filename error
```
ERROR in chunk [file] [entry]
Cannot use [chunkhash] or [contenthash] for chunk in 'js/[name]-[contenthash].js' (use [hash] instead)
```
Override the base config output filename and resolve the above error in chunk
| JavaScript | mit | ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments | javascript | ## Code Before:
const { environment } = require('@rails/webpacker')
const ConcatPlugin = require('webpack-concat-plugin')
environment.plugins.append('ConcatPlugin', new ConcatPlugin({
uglify: true,
sourceMap: true,
outputPath: 'js',
fileName: 'application.bundle.js',
filesToConcat: [
'jquery',
'jquery-ujs',
'jquery.iframe-transport',
'dropzone',
'govuk_frontend_toolkit/javascripts/govuk/stick-at-top-when-scrolling.js',
'govuk_frontend_toolkit/javascripts/govuk/stop-scrolling-at-footer.js',
'jquery-accessible-accordion-aria',
'jsrender',
'jquery-highlight',
'jquery-throttle-debounce',
'accessible-autocomplete',
'./app/webpack/javascripts/vendor/**/*',
'./app/webpack/javascripts/modules/**/*',
'./app/webpack/javascripts/plugins/**/*',
'./app/webpack/javascripts/application.js'
]
}))
module.exports = environment
## Instruction:
Resolve webpack-dev-server output filename error
```
ERROR in chunk [file] [entry]
Cannot use [chunkhash] or [contenthash] for chunk in 'js/[name]-[contenthash].js' (use [hash] instead)
```
Override the base config output filename and resolve the above error in chunk
## Code After:
const { environment } = require('@rails/webpacker')
const ConcatPlugin = require('webpack-concat-plugin')
environment.plugins.append('ConcatPlugin', new ConcatPlugin({
uglify: true,
sourceMap: true,
outputPath: 'js',
fileName: 'application.bundle.js',
filesToConcat: [
'jquery',
'jquery-ujs',
'jquery.iframe-transport',
'dropzone',
'govuk_frontend_toolkit/javascripts/govuk/stick-at-top-when-scrolling.js',
'govuk_frontend_toolkit/javascripts/govuk/stop-scrolling-at-footer.js',
'jquery-accessible-accordion-aria',
'jsrender',
'jquery-highlight',
'jquery-throttle-debounce',
'accessible-autocomplete',
'./app/webpack/javascripts/vendor/**/*',
'./app/webpack/javascripts/modules/**/*',
'./app/webpack/javascripts/plugins/**/*',
'./app/webpack/javascripts/application.js'
]
}))
environment.config.merge({
output: {
filename: 'js/[name]-[hash].js'
}
})
module.exports = environment
| const { environment } = require('@rails/webpacker')
const ConcatPlugin = require('webpack-concat-plugin')
environment.plugins.append('ConcatPlugin', new ConcatPlugin({
uglify: true,
sourceMap: true,
outputPath: 'js',
fileName: 'application.bundle.js',
filesToConcat: [
'jquery',
'jquery-ujs',
'jquery.iframe-transport',
'dropzone',
'govuk_frontend_toolkit/javascripts/govuk/stick-at-top-when-scrolling.js',
'govuk_frontend_toolkit/javascripts/govuk/stop-scrolling-at-footer.js',
'jquery-accessible-accordion-aria',
'jsrender',
'jquery-highlight',
'jquery-throttle-debounce',
'accessible-autocomplete',
'./app/webpack/javascripts/vendor/**/*',
'./app/webpack/javascripts/modules/**/*',
'./app/webpack/javascripts/plugins/**/*',
'./app/webpack/javascripts/application.js'
]
}))
+ environment.config.merge({
+ output: {
+ filename: 'js/[name]-[hash].js'
+ }
+ })
+
module.exports = environment | 6 | 0.214286 | 6 | 0 |
f96b2ca6612083db679a47303c6d3779c6c4ba5a | app/views/crops/_index_card.html.haml | app/views/crops/_index_card.html.haml | .well
.row
.col-md-4
= link_to image_tag(crop_image_path(crop),
alt: '',
class: 'img crop-image'),
crop
.col-md-8
%h3{ style: 'padding-top: 0px; margin-top: 0px' }
= link_to crop, crop
%p
%b Scientific name:
= crop.default_scientific_name
- if crop.annual? && crop.median_lifespan.present?
%p
Median Lifespan
%b= crop.median_lifespan
days
- unless crop.median_days_to_first_harvest.nil?
%p
First harvest expected
%b= crop.median_days_to_first_harvest
days after planting
- if crop.annual? && crop.median_days_to_last_harvest.present?
%p
Last harvest expected
%b= crop.median_days_to_last_harvest
days after planting
- if can? :create, Planting
= link_to "Plant #{crop.name}", new_planting_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
- if can? :create, Seed
= link_to "Add #{crop.name} seeds to stash", new_seed_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
| .well
.row
.col
= link_to image_tag(crop_image_path(crop),
alt: '',
class: 'img crop-image'),
crop
.col
%h3{ style: 'padding-top: 0px; margin-top: 0px' }
= link_to crop, crop
%p
%b Scientific name:
= crop.default_scientific_name
- if crop.annual? && crop.median_lifespan.present?
%p
Median Lifespan
%b= crop.median_lifespan
days
- unless crop.median_days_to_first_harvest.nil?
%p
First harvest expected
%b= crop.median_days_to_first_harvest
days after planting
- if crop.annual? && crop.median_days_to_last_harvest.present?
%p
Last harvest expected
%b= crop.median_days_to_last_harvest
days after planting
- if can? :create, Planting
= link_to "Plant #{crop.name}", new_planting_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
- if can? :create, Seed
= link_to "Add #{crop.name} seeds to stash", new_seed_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
| Tidy columns on crops index card | Tidy columns on crops index card
| Haml | agpl-3.0 | Growstuff/growstuff,Br3nda/growstuff,Br3nda/growstuff,Br3nda/growstuff,cesy/growstuff,Growstuff/growstuff,yez/growstuff,cesy/growstuff,Growstuff/growstuff,yez/growstuff,Br3nda/growstuff,cesy/growstuff,yez/growstuff,yez/growstuff,Growstuff/growstuff,cesy/growstuff | haml | ## Code Before:
.well
.row
.col-md-4
= link_to image_tag(crop_image_path(crop),
alt: '',
class: 'img crop-image'),
crop
.col-md-8
%h3{ style: 'padding-top: 0px; margin-top: 0px' }
= link_to crop, crop
%p
%b Scientific name:
= crop.default_scientific_name
- if crop.annual? && crop.median_lifespan.present?
%p
Median Lifespan
%b= crop.median_lifespan
days
- unless crop.median_days_to_first_harvest.nil?
%p
First harvest expected
%b= crop.median_days_to_first_harvest
days after planting
- if crop.annual? && crop.median_days_to_last_harvest.present?
%p
Last harvest expected
%b= crop.median_days_to_last_harvest
days after planting
- if can? :create, Planting
= link_to "Plant #{crop.name}", new_planting_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
- if can? :create, Seed
= link_to "Add #{crop.name} seeds to stash", new_seed_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
## Instruction:
Tidy columns on crops index card
## Code After:
.well
.row
.col
= link_to image_tag(crop_image_path(crop),
alt: '',
class: 'img crop-image'),
crop
.col
%h3{ style: 'padding-top: 0px; margin-top: 0px' }
= link_to crop, crop
%p
%b Scientific name:
= crop.default_scientific_name
- if crop.annual? && crop.median_lifespan.present?
%p
Median Lifespan
%b= crop.median_lifespan
days
- unless crop.median_days_to_first_harvest.nil?
%p
First harvest expected
%b= crop.median_days_to_first_harvest
days after planting
- if crop.annual? && crop.median_days_to_last_harvest.present?
%p
Last harvest expected
%b= crop.median_days_to_last_harvest
days after planting
- if can? :create, Planting
= link_to "Plant #{crop.name}", new_planting_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
- if can? :create, Seed
= link_to "Add #{crop.name} seeds to stash", new_seed_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
| .well
.row
- .col-md-4
? -----
+ .col
= link_to image_tag(crop_image_path(crop),
alt: '',
class: 'img crop-image'),
crop
- .col-md-8
? -----
+ .col
%h3{ style: 'padding-top: 0px; margin-top: 0px' }
= link_to crop, crop
%p
%b Scientific name:
= crop.default_scientific_name
- if crop.annual? && crop.median_lifespan.present?
%p
Median Lifespan
%b= crop.median_lifespan
days
- unless crop.median_days_to_first_harvest.nil?
%p
First harvest expected
%b= crop.median_days_to_first_harvest
days after planting
- if crop.annual? && crop.median_days_to_last_harvest.present?
%p
Last harvest expected
%b= crop.median_days_to_last_harvest
days after planting
- if can? :create, Planting
= link_to "Plant #{crop.name}", new_planting_path(params: { crop_id: crop.id }), class: 'btn btn-primary'
- if can? :create, Seed
= link_to "Add #{crop.name} seeds to stash", new_seed_path(params: { crop_id: crop.id }), class: 'btn btn-primary' | 4 | 0.111111 | 2 | 2 |
fbadf23356b40c36378cef8f3a9c8b382bce9e32 | comics/core/admin.py | comics/core/admin.py | from django.contrib import admin
from comics.core import models
class ComicAdmin(admin.ModelAdmin):
list_display = ('slug', 'name', 'language', 'url', 'rights')
prepopulated_fields = {
'slug': ('name',)
}
class ReleaseAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'comic', 'pub_date', 'fetched')
list_filter = ['pub_date', 'fetched', 'comic']
date_hierarchy = 'pub_date'
exclude = ('images',)
class ImageAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'file', 'height', 'width', 'fetched', 'title', 'text')
list_filter = ['fetched', 'comic']
date_hierarchy = 'fetched'
admin.site.register(models.Comic, ComicAdmin)
admin.site.register(models.Release, ReleaseAdmin)
admin.site.register(models.Image, ImageAdmin)
| from django.contrib import admin
from comics.core import models
class ComicAdmin(admin.ModelAdmin):
list_display = ('slug', 'name', 'language', 'url', 'rights', 'start_date',
'end_date', 'active')
prepopulated_fields = {
'slug': ('name',)
}
class ReleaseAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'comic', 'pub_date', 'fetched')
list_filter = ['pub_date', 'fetched', 'comic']
date_hierarchy = 'pub_date'
exclude = ('images',)
class ImageAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'file', 'height', 'width', 'fetched', 'title', 'text')
list_filter = ['fetched', 'comic']
date_hierarchy = 'fetched'
admin.site.register(models.Comic, ComicAdmin)
admin.site.register(models.Release, ReleaseAdmin)
admin.site.register(models.Image, ImageAdmin)
| Include start date, end date, and active flag in comics list | Include start date, end date, and active flag in comics list
| Python | agpl-3.0 | jodal/comics,jodal/comics,jodal/comics,datagutten/comics,datagutten/comics,datagutten/comics,jodal/comics,datagutten/comics | python | ## Code Before:
from django.contrib import admin
from comics.core import models
class ComicAdmin(admin.ModelAdmin):
list_display = ('slug', 'name', 'language', 'url', 'rights')
prepopulated_fields = {
'slug': ('name',)
}
class ReleaseAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'comic', 'pub_date', 'fetched')
list_filter = ['pub_date', 'fetched', 'comic']
date_hierarchy = 'pub_date'
exclude = ('images',)
class ImageAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'file', 'height', 'width', 'fetched', 'title', 'text')
list_filter = ['fetched', 'comic']
date_hierarchy = 'fetched'
admin.site.register(models.Comic, ComicAdmin)
admin.site.register(models.Release, ReleaseAdmin)
admin.site.register(models.Image, ImageAdmin)
## Instruction:
Include start date, end date, and active flag in comics list
## Code After:
from django.contrib import admin
from comics.core import models
class ComicAdmin(admin.ModelAdmin):
list_display = ('slug', 'name', 'language', 'url', 'rights', 'start_date',
'end_date', 'active')
prepopulated_fields = {
'slug': ('name',)
}
class ReleaseAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'comic', 'pub_date', 'fetched')
list_filter = ['pub_date', 'fetched', 'comic']
date_hierarchy = 'pub_date'
exclude = ('images',)
class ImageAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'file', 'height', 'width', 'fetched', 'title', 'text')
list_filter = ['fetched', 'comic']
date_hierarchy = 'fetched'
admin.site.register(models.Comic, ComicAdmin)
admin.site.register(models.Release, ReleaseAdmin)
admin.site.register(models.Image, ImageAdmin)
| from django.contrib import admin
from comics.core import models
class ComicAdmin(admin.ModelAdmin):
- list_display = ('slug', 'name', 'language', 'url', 'rights')
? ^
+ list_display = ('slug', 'name', 'language', 'url', 'rights', 'start_date',
? ^^^^^^^^^^^^^^^
+ 'end_date', 'active')
prepopulated_fields = {
'slug': ('name',)
}
class ReleaseAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'comic', 'pub_date', 'fetched')
list_filter = ['pub_date', 'fetched', 'comic']
date_hierarchy = 'pub_date'
exclude = ('images',)
class ImageAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'file', 'height', 'width', 'fetched', 'title', 'text')
list_filter = ['fetched', 'comic']
date_hierarchy = 'fetched'
admin.site.register(models.Comic, ComicAdmin)
admin.site.register(models.Release, ReleaseAdmin)
admin.site.register(models.Image, ImageAdmin) | 3 | 0.107143 | 2 | 1 |
ac7a156cf7f6f78425d85f5a08cfa302de46d362 | spec/features/admin/promotion_rule_store_spec.rb | spec/features/admin/promotion_rule_store_spec.rb | require 'spec_helper'
RSpec.describe "Store promotion rule", js: true do
stub_authorization!
let!(:store) { create(:store, name: "Real fake doors") }
let!(:promotion) { create(:promotion) }
it "Can add a store rule to a promotion" do
visit spree.edit_admin_promotion_path(promotion)
if SolidusSupport.solidus_gem_version < Gem::Version.new('2.3.x')
select2 "Store", from: "Add rule of type"
else
select "Store", from: "Add rule of type"
end
within("#rules_container") { click_button "Add" }
select2_search store.name, from: "Choose Stores"
within("#rules_container") { click_button "Update" }
expect(page).to have_content('successfully updated')
end
end
| require 'spec_helper'
RSpec.describe "Store promotion rule", js: true do
stub_authorization!
let!(:store) { create(:store, name: "Real fake doors") }
let!(:promotion) { create(:promotion) }
it "Can add a store rule to a promotion" do
visit spree.edit_admin_promotion_path(promotion)
if SolidusSupport.solidus_gem_version < Gem::Version.new('2.3.x')
select2 "Store", from: "Add rule of type"
else
select "Store", from: "promotion_rule_type"
end
within("#rules_container") { click_button "Add" }
select2_search store.name, from: "Choose Stores"
within("#rules_container") { click_button "Update" }
expect(page).to have_content('successfully updated')
end
end
| Fix failing test that used incorrect select ID | Fix failing test that used incorrect select ID
| Ruby | bsd-3-clause | solidusio/solidus_multi_domain,solidusio/solidus_multi_domain,solidusio/solidus_multi_domain | ruby | ## Code Before:
require 'spec_helper'
RSpec.describe "Store promotion rule", js: true do
stub_authorization!
let!(:store) { create(:store, name: "Real fake doors") }
let!(:promotion) { create(:promotion) }
it "Can add a store rule to a promotion" do
visit spree.edit_admin_promotion_path(promotion)
if SolidusSupport.solidus_gem_version < Gem::Version.new('2.3.x')
select2 "Store", from: "Add rule of type"
else
select "Store", from: "Add rule of type"
end
within("#rules_container") { click_button "Add" }
select2_search store.name, from: "Choose Stores"
within("#rules_container") { click_button "Update" }
expect(page).to have_content('successfully updated')
end
end
## Instruction:
Fix failing test that used incorrect select ID
## Code After:
require 'spec_helper'
RSpec.describe "Store promotion rule", js: true do
stub_authorization!
let!(:store) { create(:store, name: "Real fake doors") }
let!(:promotion) { create(:promotion) }
it "Can add a store rule to a promotion" do
visit spree.edit_admin_promotion_path(promotion)
if SolidusSupport.solidus_gem_version < Gem::Version.new('2.3.x')
select2 "Store", from: "Add rule of type"
else
select "Store", from: "promotion_rule_type"
end
within("#rules_container") { click_button "Add" }
select2_search store.name, from: "Choose Stores"
within("#rules_container") { click_button "Update" }
expect(page).to have_content('successfully updated')
end
end
| require 'spec_helper'
RSpec.describe "Store promotion rule", js: true do
stub_authorization!
let!(:store) { create(:store, name: "Real fake doors") }
let!(:promotion) { create(:promotion) }
it "Can add a store rule to a promotion" do
visit spree.edit_admin_promotion_path(promotion)
if SolidusSupport.solidus_gem_version < Gem::Version.new('2.3.x')
select2 "Store", from: "Add rule of type"
else
- select "Store", from: "Add rule of type"
? ^^^^ ^^^^
+ select "Store", from: "promotion_rule_type"
? ^^^^^^^^^^ ^
end
+
within("#rules_container") { click_button "Add" }
select2_search store.name, from: "Choose Stores"
within("#rules_container") { click_button "Update" }
expect(page).to have_content('successfully updated')
end
end | 3 | 0.125 | 2 | 1 |
1a31c2a5f69e979e75061dfd1fc4e884a230072a | PrehensilePonyTail/PPTail/Properties/launchSettings.json | PrehensilePonyTail/PPTail/Properties/launchSettings.json | {
"profiles": {
"PPTail": {
"commandName": "Project",
"commandLineArgs": "C:\\SourceDataLocation C:\\OutputDataLocation"
}
}
} | {
"profiles": {
"PPTail": {
"commandName": "Project",
"commandLineArgs": "Provider=PPTail.Data.FileSystem.Repository;Filepath=C:\\SourceDataLocation Provider=PPTail.Output.FileSystem.Repository;FilePath=C:\\OutputDataLocation C:\\TemplateFolderPath"
}
}
} | Update launch setting parameters to new provider style | Update launch setting parameters to new provider style
| JSON | mit | bsstahl/PPTail,bsstahl/PPTail | json | ## Code Before:
{
"profiles": {
"PPTail": {
"commandName": "Project",
"commandLineArgs": "C:\\SourceDataLocation C:\\OutputDataLocation"
}
}
}
## Instruction:
Update launch setting parameters to new provider style
## Code After:
{
"profiles": {
"PPTail": {
"commandName": "Project",
"commandLineArgs": "Provider=PPTail.Data.FileSystem.Repository;Filepath=C:\\SourceDataLocation Provider=PPTail.Output.FileSystem.Repository;FilePath=C:\\OutputDataLocation C:\\TemplateFolderPath"
}
}
} | {
"profiles": {
"PPTail": {
"commandName": "Project",
- "commandLineArgs": "C:\\SourceDataLocation C:\\OutputDataLocation"
+ "commandLineArgs": "Provider=PPTail.Data.FileSystem.Repository;Filepath=C:\\SourceDataLocation Provider=PPTail.Output.FileSystem.Repository;FilePath=C:\\OutputDataLocation C:\\TemplateFolderPath"
}
}
} | 2 | 0.25 | 1 | 1 |
70ab020d94875f5cdcd4d3b95ce600bd420ef641 | src/singleton/singleton.php | src/singleton/singleton.php | <?php
namespace Nectary;
abstract class Singleton {
protected static $instances = array();
protected function __construct() {}
protected function __clone() {}
public function __wakeup() {
throw new \Exception( 'Cannot unserialize singleton' );
}
public static function get_instance() {
$cls = get_called_class(); // late-static-bound class name
if ( ! isset( self::$instances[ $cls ] ) ) {
self::$instances[ $cls ] = new static;
}
return self::$instances[ $cls ];
}
public static function set_instance( $instance ) {
$cls = get_called_class();
self::$instances[ $cls ] = $instance;
}
}
| <?php
namespace Nectary;
abstract class Singleton {
protected static $instances = array();
protected function __construct() {}
protected function __clone() {}
public static function get_instance() {
$cls = get_called_class(); // late-static-bound class name
if ( ! isset( self::$instances[ $cls ] ) ) {
self::$instances[ $cls ] = new static;
}
return self::$instances[ $cls ];
}
public static function set_instance( $instance ) {
$cls = get_called_class();
self::$instances[ $cls ] = $instance;
}
}
| Remove wakeup exception until further notice | Remove wakeup exception until further notice
| PHP | mit | gios-asu/nectary,gios-asu/nectary | php | ## Code Before:
<?php
namespace Nectary;
abstract class Singleton {
protected static $instances = array();
protected function __construct() {}
protected function __clone() {}
public function __wakeup() {
throw new \Exception( 'Cannot unserialize singleton' );
}
public static function get_instance() {
$cls = get_called_class(); // late-static-bound class name
if ( ! isset( self::$instances[ $cls ] ) ) {
self::$instances[ $cls ] = new static;
}
return self::$instances[ $cls ];
}
public static function set_instance( $instance ) {
$cls = get_called_class();
self::$instances[ $cls ] = $instance;
}
}
## Instruction:
Remove wakeup exception until further notice
## Code After:
<?php
namespace Nectary;
abstract class Singleton {
protected static $instances = array();
protected function __construct() {}
protected function __clone() {}
public static function get_instance() {
$cls = get_called_class(); // late-static-bound class name
if ( ! isset( self::$instances[ $cls ] ) ) {
self::$instances[ $cls ] = new static;
}
return self::$instances[ $cls ];
}
public static function set_instance( $instance ) {
$cls = get_called_class();
self::$instances[ $cls ] = $instance;
}
}
| <?php
namespace Nectary;
abstract class Singleton {
protected static $instances = array();
protected function __construct() {}
protected function __clone() {}
- public function __wakeup() {
- throw new \Exception( 'Cannot unserialize singleton' );
- }
public static function get_instance() {
$cls = get_called_class(); // late-static-bound class name
if ( ! isset( self::$instances[ $cls ] ) ) {
self::$instances[ $cls ] = new static;
}
return self::$instances[ $cls ];
}
public static function set_instance( $instance ) {
$cls = get_called_class();
self::$instances[ $cls ] = $instance;
}
} | 3 | 0.111111 | 0 | 3 |
0f0531c8e4f62f5c6b4ff74f0059cf0238b5bf1c | src/main/AndroidManifest.xml | src/main/AndroidManifest.xml | <manifest
android:versionName="0.1" android:versionCode="1" package="org.positronicnet" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="7"></uses-sdk>
</manifest>
| <manifest
android:versionName="0.1" android:versionCode="1" package="org.positronicnet.libresources" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="7"></uses-sdk>
</manifest>
| Move dummy R and TR classes for the library itself to their own package. | Move dummy R and TR classes for the library itself to their own package.
Done mainly to keep from cluttering up the docs.
| XML | bsd-3-clause | rst/positronic_net | xml | ## Code Before:
<manifest
android:versionName="0.1" android:versionCode="1" package="org.positronicnet" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="7"></uses-sdk>
</manifest>
## Instruction:
Move dummy R and TR classes for the library itself to their own package.
Done mainly to keep from cluttering up the docs.
## Code After:
<manifest
android:versionName="0.1" android:versionCode="1" package="org.positronicnet.libresources" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="7"></uses-sdk>
</manifest>
| <manifest
- android:versionName="0.1" android:versionCode="1" package="org.positronicnet" xmlns:android="http://schemas.android.com/apk/res/android">
+ android:versionName="0.1" android:versionCode="1" package="org.positronicnet.libresources" xmlns:android="http://schemas.android.com/apk/res/android">
? +++++++++++++
<uses-sdk android:minSdkVersion="7"></uses-sdk>
</manifest> | 2 | 0.5 | 1 | 1 |
1ac2f38f3d9cf9cb331890a2a69e960da2aafa3c | templates/course.json | templates/course.json | {
"id": "local",
"isEditable": true,
"title": "local course",
"shortDesc": "",
"longDesc": "",
"authorBio": "",
"tags": [],
"catalogs": [],
"lessons": [
{
"id": "1",
"title": "Lesson 1",
"gadgets": []
}
],
"progress": { "lesson": 0 },
"assetUrlTemplate": "//localhost:3000/api/assets/<%= id %>"
}
| {
"id": "local",
"isEditable": true,
"title": "local course",
"shortDesc": "",
"longDesc": "",
"authorBio": "",
"tags": [],
"catalogs": [],
"lessons": [
{
"id": "1",
"title": "Lesson 1",
"gadgets": []
}
],
"progress": { "lesson": 0 },
"assetUrlTemplate": "/api/assets/<%= id %>"
}
| Use relative asset url path | Use relative asset url path
| JSON | mit | Versal/sdk,Versal/sdk | json | ## Code Before:
{
"id": "local",
"isEditable": true,
"title": "local course",
"shortDesc": "",
"longDesc": "",
"authorBio": "",
"tags": [],
"catalogs": [],
"lessons": [
{
"id": "1",
"title": "Lesson 1",
"gadgets": []
}
],
"progress": { "lesson": 0 },
"assetUrlTemplate": "//localhost:3000/api/assets/<%= id %>"
}
## Instruction:
Use relative asset url path
## Code After:
{
"id": "local",
"isEditable": true,
"title": "local course",
"shortDesc": "",
"longDesc": "",
"authorBio": "",
"tags": [],
"catalogs": [],
"lessons": [
{
"id": "1",
"title": "Lesson 1",
"gadgets": []
}
],
"progress": { "lesson": 0 },
"assetUrlTemplate": "/api/assets/<%= id %>"
}
| {
"id": "local",
"isEditable": true,
"title": "local course",
"shortDesc": "",
"longDesc": "",
"authorBio": "",
"tags": [],
"catalogs": [],
"lessons": [
{
"id": "1",
"title": "Lesson 1",
"gadgets": []
}
],
"progress": { "lesson": 0 },
- "assetUrlTemplate": "//localhost:3000/api/assets/<%= id %>"
? ----------------
+ "assetUrlTemplate": "/api/assets/<%= id %>"
} | 2 | 0.105263 | 1 | 1 |
3537792cb832cdf5283ee356070637198a0393f1 | recipes/distro/meta.yaml | recipes/distro/meta.yaml | {% set name = "distro" %}
{% set version = "1.1.0" %}
{% set sha256 = "722054925f339a39ca411a8c7079f390a41d42c422697bedf228f1a9c46ac1ee" %}
package:
name: '{{ name|lower }}'
version: '{{ version }}'
source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: '{{ sha256 }}'
build:
number: 0
entry_points: # [linux]
- distro = distro:main
script: python setup.py install --single-version-externally-managed --record=record.txt
requirements:
host:
- python
- setuptools
run:
- python
test: # [linux]
commands:
- distro --help
about:
home: https://github.com/nir0s/distro
license: Apache-2.0
license_file: LICENSE
summary: Linux Distribution - a Linux OS platform information API
doc_url: http://distro.readthedocs.io/en/latest/
dev_url: https://github.com/nir0s/distro
extra:
recipe-maintainers:
- windelbouwman
- windelbouwmanbosch
| {% set name = "distro" %}
{% set version = "1.1.0" %}
{% set sha256 = "722054925f339a39ca411a8c7079f390a41d42c422697bedf228f1a9c46ac1ee" %}
package:
name: '{{ name|lower }}'
version: '{{ version }}'
source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: '{{ sha256 }}'
build:
skip: True # [not linux]
number: 0
entry_points:
- distro = distro:main
script: python setup.py install --single-version-externally-managed --record=record.txt
requirements:
host:
- python
- setuptools
run:
- python
test: # [linux]
commands:
- distro --help
imports:
- distro
about:
home: https://github.com/nir0s/distro
license: Apache-2.0
license_file: LICENSE
summary: Linux Distribution - a Linux OS platform information API
doc_url: http://distro.readthedocs.io/en/latest/
dev_url: https://github.com/nir0s/distro
extra:
recipe-maintainers:
- windelbouwman
- windelbouwmanbosch
| Make package linux only [skip appveyor] [skip travis] | Make package linux only [skip appveyor] [skip travis]
| YAML | bsd-3-clause | cpaulik/staged-recipes,rmcgibbo/staged-recipes,dschreij/staged-recipes,shadowwalkersb/staged-recipes,ocefpaf/staged-recipes,guillochon/staged-recipes,patricksnape/staged-recipes,synapticarbors/staged-recipes,igortg/staged-recipes,Cashalow/staged-recipes,barkls/staged-recipes,chrisburr/staged-recipes,sodre/staged-recipes,petrushy/staged-recipes,jjhelmus/staged-recipes,isuruf/staged-recipes,jakirkham/staged-recipes,jochym/staged-recipes,ReimarBauer/staged-recipes,asmeurer/staged-recipes,barkls/staged-recipes,hadim/staged-recipes,chrisburr/staged-recipes,jjhelmus/staged-recipes,rvalieris/staged-recipes,NOAA-ORR-ERD/staged-recipes,kwilcox/staged-recipes,johanneskoester/staged-recipes,Juanlu001/staged-recipes,scopatz/staged-recipes,mariusvniekerk/staged-recipes,jakirkham/staged-recipes,mcs07/staged-recipes,guillochon/staged-recipes,pmlandwehr/staged-recipes,rvalieris/staged-recipes,asmeurer/staged-recipes,SylvainCorlay/staged-recipes,scopatz/staged-recipes,conda-forge/staged-recipes,goanpeca/staged-recipes,Cashalow/staged-recipes,ceholden/staged-recipes,kwilcox/staged-recipes,basnijholt/staged-recipes,birdsarah/staged-recipes,cpaulik/staged-recipes,goanpeca/staged-recipes,patricksnape/staged-recipes,ReimarBauer/staged-recipes,isuruf/staged-recipes,pmlandwehr/staged-recipes,dschreij/staged-recipes,mariusvniekerk/staged-recipes,conda-forge/staged-recipes,petrushy/staged-recipes,johanneskoester/staged-recipes,glemaitre/staged-recipes,hadim/staged-recipes,stuertz/staged-recipes,igortg/staged-recipes,mcs07/staged-recipes,jochym/staged-recipes,ceholden/staged-recipes,shadowwalkersb/staged-recipes,basnijholt/staged-recipes,Juanlu001/staged-recipes,ocefpaf/staged-recipes,glemaitre/staged-recipes,birdsarah/staged-recipes,SylvainCorlay/staged-recipes,rmcgibbo/staged-recipes,stuertz/staged-recipes,NOAA-ORR-ERD/staged-recipes,sodre/staged-recipes,synapticarbors/staged-recipes,sodre/staged-recipes | yaml | ## Code Before:
{% set name = "distro" %}
{% set version = "1.1.0" %}
{% set sha256 = "722054925f339a39ca411a8c7079f390a41d42c422697bedf228f1a9c46ac1ee" %}
package:
name: '{{ name|lower }}'
version: '{{ version }}'
source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: '{{ sha256 }}'
build:
number: 0
entry_points: # [linux]
- distro = distro:main
script: python setup.py install --single-version-externally-managed --record=record.txt
requirements:
host:
- python
- setuptools
run:
- python
test: # [linux]
commands:
- distro --help
about:
home: https://github.com/nir0s/distro
license: Apache-2.0
license_file: LICENSE
summary: Linux Distribution - a Linux OS platform information API
doc_url: http://distro.readthedocs.io/en/latest/
dev_url: https://github.com/nir0s/distro
extra:
recipe-maintainers:
- windelbouwman
- windelbouwmanbosch
## Instruction:
Make package linux only [skip appveyor] [skip travis]
## Code After:
{% set name = "distro" %}
{% set version = "1.1.0" %}
{% set sha256 = "722054925f339a39ca411a8c7079f390a41d42c422697bedf228f1a9c46ac1ee" %}
package:
name: '{{ name|lower }}'
version: '{{ version }}'
source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: '{{ sha256 }}'
build:
skip: True # [not linux]
number: 0
entry_points:
- distro = distro:main
script: python setup.py install --single-version-externally-managed --record=record.txt
requirements:
host:
- python
- setuptools
run:
- python
test: # [linux]
commands:
- distro --help
imports:
- distro
about:
home: https://github.com/nir0s/distro
license: Apache-2.0
license_file: LICENSE
summary: Linux Distribution - a Linux OS platform information API
doc_url: http://distro.readthedocs.io/en/latest/
dev_url: https://github.com/nir0s/distro
extra:
recipe-maintainers:
- windelbouwman
- windelbouwmanbosch
| {% set name = "distro" %}
{% set version = "1.1.0" %}
{% set sha256 = "722054925f339a39ca411a8c7079f390a41d42c422697bedf228f1a9c46ac1ee" %}
package:
name: '{{ name|lower }}'
version: '{{ version }}'
source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: '{{ sha256 }}'
build:
+ skip: True # [not linux]
number: 0
- entry_points: # [linux]
+ entry_points:
- distro = distro:main
script: python setup.py install --single-version-externally-managed --record=record.txt
requirements:
host:
- python
- setuptools
run:
- python
test: # [linux]
commands:
- distro --help
+ imports:
+ - distro
about:
home: https://github.com/nir0s/distro
license: Apache-2.0
license_file: LICENSE
summary: Linux Distribution - a Linux OS platform information API
doc_url: http://distro.readthedocs.io/en/latest/
dev_url: https://github.com/nir0s/distro
extra:
recipe-maintainers:
- windelbouwman
- windelbouwmanbosch | 5 | 0.119048 | 4 | 1 |
eb31a1684a2df7fe8c1e6bf338fbf3cb772e8c78 | config/locales/en.yml | config/locales/en.yml |
en:
MENU: "Menu"
ACTIVITY: "Activity"
BEGIN_ACTIVITY: "Begin activity"
BEGIN_NEXT_ACTIVITY: "Begin activity"
TAKE_SNAPSHOT: "Take snapshot"
REPLACE_SNAPSHOT: "Replace snapshot"
QUESTION: "Question"
TYPE_ANSWER_HERE: "Type answer here"
NEXT: "Next >"
BACK: "< Back"
PICK_ONE: "Pick one"
GENERATE_A_REPORT: "Generate a report"
EDIT: "Edit"
DATA_WILL_NOT_BE_SAVED: "Data will not be saved"
TIME_TO_COMPLETE: "Estimated Time to Complete This Module:"
MINUTES: "minutes"
MAKE_DRAWING: "Make drawing"
DONE: "Done"
CANCEL: "Cancel"
PREDICTION_BUTTON: "Submit your prediction"
ANSWER_IS_FINAL: "Your answer can not be changed."
IS_PREDICTION_QUESTION: "Prediction Question?"
|
en:
MENU: "Menu"
ACTIVITY: "Activity"
BEGIN_ACTIVITY: "Begin activity"
BEGIN_NEXT_ACTIVITY: "Begin activity"
TAKE_SNAPSHOT: "Take snapshot"
REPLACE_SNAPSHOT: "Replace snapshot"
QUESTION: "Question"
TYPE_ANSWER_HERE: "Type answer here"
NEXT: "Next >"
BACK: "< Back"
PICK_ONE: "Pick one"
GENERATE_A_REPORT: "Generate a report"
EDIT: "Edit"
DATA_WILL_NOT_BE_SAVED: "Data will not be saved"
TIME_TO_COMPLETE: "Estimated Time to Complete This Module:"
MINUTES: "minutes"
MAKE_DRAWING: "Make drawing"
DONE: "Done"
CANCEL: "Cancel"
PREDICTION_BUTTON: "Submit your prediction"
ANSWER_IS_FINAL: "Your answer is now locked."
IS_PREDICTION_QUESTION: "Prediction Question?"
| Change ANSWER_IS_FINAL text to "Your answer is now locked" | Change ANSWER_IS_FINAL text to "Your answer is now locked"
| YAML | mit | concord-consortium/lara,concord-consortium/lara,concord-consortium/lara,concord-consortium/lara,concord-consortium/lara | yaml | ## Code Before:
en:
MENU: "Menu"
ACTIVITY: "Activity"
BEGIN_ACTIVITY: "Begin activity"
BEGIN_NEXT_ACTIVITY: "Begin activity"
TAKE_SNAPSHOT: "Take snapshot"
REPLACE_SNAPSHOT: "Replace snapshot"
QUESTION: "Question"
TYPE_ANSWER_HERE: "Type answer here"
NEXT: "Next >"
BACK: "< Back"
PICK_ONE: "Pick one"
GENERATE_A_REPORT: "Generate a report"
EDIT: "Edit"
DATA_WILL_NOT_BE_SAVED: "Data will not be saved"
TIME_TO_COMPLETE: "Estimated Time to Complete This Module:"
MINUTES: "minutes"
MAKE_DRAWING: "Make drawing"
DONE: "Done"
CANCEL: "Cancel"
PREDICTION_BUTTON: "Submit your prediction"
ANSWER_IS_FINAL: "Your answer can not be changed."
IS_PREDICTION_QUESTION: "Prediction Question?"
## Instruction:
Change ANSWER_IS_FINAL text to "Your answer is now locked"
## Code After:
en:
MENU: "Menu"
ACTIVITY: "Activity"
BEGIN_ACTIVITY: "Begin activity"
BEGIN_NEXT_ACTIVITY: "Begin activity"
TAKE_SNAPSHOT: "Take snapshot"
REPLACE_SNAPSHOT: "Replace snapshot"
QUESTION: "Question"
TYPE_ANSWER_HERE: "Type answer here"
NEXT: "Next >"
BACK: "< Back"
PICK_ONE: "Pick one"
GENERATE_A_REPORT: "Generate a report"
EDIT: "Edit"
DATA_WILL_NOT_BE_SAVED: "Data will not be saved"
TIME_TO_COMPLETE: "Estimated Time to Complete This Module:"
MINUTES: "minutes"
MAKE_DRAWING: "Make drawing"
DONE: "Done"
CANCEL: "Cancel"
PREDICTION_BUTTON: "Submit your prediction"
ANSWER_IS_FINAL: "Your answer is now locked."
IS_PREDICTION_QUESTION: "Prediction Question?"
|
en:
MENU: "Menu"
ACTIVITY: "Activity"
BEGIN_ACTIVITY: "Begin activity"
BEGIN_NEXT_ACTIVITY: "Begin activity"
TAKE_SNAPSHOT: "Take snapshot"
REPLACE_SNAPSHOT: "Replace snapshot"
QUESTION: "Question"
TYPE_ANSWER_HERE: "Type answer here"
NEXT: "Next >"
BACK: "< Back"
PICK_ONE: "Pick one"
GENERATE_A_REPORT: "Generate a report"
EDIT: "Edit"
DATA_WILL_NOT_BE_SAVED: "Data will not be saved"
TIME_TO_COMPLETE: "Estimated Time to Complete This Module:"
MINUTES: "minutes"
MAKE_DRAWING: "Make drawing"
DONE: "Done"
CANCEL: "Cancel"
PREDICTION_BUTTON: "Submit your prediction"
- ANSWER_IS_FINAL: "Your answer can not be changed."
? ^^^ ^ ^^^ ^^^^
+ ANSWER_IS_FINAL: "Your answer is now locked."
? ^^ ^ ^^ ^
IS_PREDICTION_QUESTION: "Prediction Question?" | 2 | 0.083333 | 1 | 1 |
dd6eb92da87382c082bb86109f11947cfeb8c222 | packages/te/text-lens.yaml | packages/te/text-lens.yaml | homepage: https://github.com/ChrisPenner/rasa
changelog-type: ''
hash: 764fbbb5d04e609973d779069c26075afc0330b796102f50450d792acbad6a97
test-bench-deps:
text-lens: -any
base: -any
hspec: -any
lens: -any
maintainer: christopher.penner@gmail.com
synopsis: Lenses for operating over text
changelog: ''
basic-deps:
extra: -any
base: ! '>=4.7 && <5'
text: -any
lens: -any
all-versions:
- '0.1.0.0'
author: Chris Penner
latest: '0.1.0.0'
description-type: haddock
description: Lenses for operating over text
license-name: MIT
| homepage: https://github.com/ChrisPenner/rasa
changelog-type: ''
hash: aa49360b3eed02fb144acd4eb691b6c165c9c03e9e09861599fbbc4248287b21
test-bench-deps:
text-lens: ! '>=0.1.1 && <0.2'
base: ! '>=4.9.0.0 && <4.10'
hspec: ! '>=2.2.4 && <2.3'
lens: ==4.14.*
maintainer: christopher.penner@gmail.com
synopsis: Lenses for operating over text
changelog: ''
basic-deps:
extra: ! '>=1.4.10 && <1.5'
base: ! '>=4.8 && <5'
text: ! '>=1.2.2.1 && <1.3'
lens: ==4.14.*
all-versions:
- '0.1.0.0'
- '0.1.1'
author: Chris Penner
latest: '0.1.1'
description-type: haddock
description: Lenses for operating over text
license-name: BSD3
| Update from Hackage at 2017-01-29T18:42:06Z | Update from Hackage at 2017-01-29T18:42:06Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: https://github.com/ChrisPenner/rasa
changelog-type: ''
hash: 764fbbb5d04e609973d779069c26075afc0330b796102f50450d792acbad6a97
test-bench-deps:
text-lens: -any
base: -any
hspec: -any
lens: -any
maintainer: christopher.penner@gmail.com
synopsis: Lenses for operating over text
changelog: ''
basic-deps:
extra: -any
base: ! '>=4.7 && <5'
text: -any
lens: -any
all-versions:
- '0.1.0.0'
author: Chris Penner
latest: '0.1.0.0'
description-type: haddock
description: Lenses for operating over text
license-name: MIT
## Instruction:
Update from Hackage at 2017-01-29T18:42:06Z
## Code After:
homepage: https://github.com/ChrisPenner/rasa
changelog-type: ''
hash: aa49360b3eed02fb144acd4eb691b6c165c9c03e9e09861599fbbc4248287b21
test-bench-deps:
text-lens: ! '>=0.1.1 && <0.2'
base: ! '>=4.9.0.0 && <4.10'
hspec: ! '>=2.2.4 && <2.3'
lens: ==4.14.*
maintainer: christopher.penner@gmail.com
synopsis: Lenses for operating over text
changelog: ''
basic-deps:
extra: ! '>=1.4.10 && <1.5'
base: ! '>=4.8 && <5'
text: ! '>=1.2.2.1 && <1.3'
lens: ==4.14.*
all-versions:
- '0.1.0.0'
- '0.1.1'
author: Chris Penner
latest: '0.1.1'
description-type: haddock
description: Lenses for operating over text
license-name: BSD3
| homepage: https://github.com/ChrisPenner/rasa
changelog-type: ''
- hash: 764fbbb5d04e609973d779069c26075afc0330b796102f50450d792acbad6a97
+ hash: aa49360b3eed02fb144acd4eb691b6c165c9c03e9e09861599fbbc4248287b21
test-bench-deps:
- text-lens: -any
- base: -any
- hspec: -any
- lens: -any
+ text-lens: ! '>=0.1.1 && <0.2'
+ base: ! '>=4.9.0.0 && <4.10'
+ hspec: ! '>=2.2.4 && <2.3'
+ lens: ==4.14.*
maintainer: christopher.penner@gmail.com
synopsis: Lenses for operating over text
changelog: ''
basic-deps:
- extra: -any
+ extra: ! '>=1.4.10 && <1.5'
- base: ! '>=4.7 && <5'
? ^
+ base: ! '>=4.8 && <5'
? ^
- text: -any
- lens: -any
+ text: ! '>=1.2.2.1 && <1.3'
+ lens: ==4.14.*
all-versions:
- '0.1.0.0'
+ - '0.1.1'
author: Chris Penner
- latest: '0.1.0.0'
? ^^^
+ latest: '0.1.1'
? ^
description-type: haddock
description: Lenses for operating over text
- license-name: MIT
? ^^^
+ license-name: BSD3
? ^^^^
| 23 | 1 | 12 | 11 |
9d07f2f9c7b71c82ecacf0adf5b99e530d3dc65e | locales/ms/faq.properties | locales/ms/faq.properties | faq_header=Penderma FAQ
faq_donate_link=derma sekarang
faq_intro=Berikut ialah soalan lazim perihal derma untuk Yayasan Mozilla. Jika soalan dan jawapan anda tidak tersenarai di sini, sila hubungi kami di <a href="mailto:donate@mozilla.org">donate@mozilla.org</a>.
faq_item_5_header=Bolehkah saya derma bitcoin?
faq_item_7_header=Bagaimana derma saya akan digunakan?
faq_item_7_paragraph_a=Di Mozilla, kebajikan adalah sebahagian etika kami, Ketahui cara derma anda digunakan, klik <a href="https://www.mozilla.org/foundation/">sini</a>.
faq_item_9_header=Siapa yang menderma untuk Mozilla?
| faq_header=Penderma FAQ
faq_donate_link=derma sekarang
faq_intro=Berikut ialah soalan lazim perihal derma untuk Yayasan Mozilla. Jika soalan dan jawapan anda tidak tersenarai di sini, sila hubungi kami di <a href="mailto:donate@mozilla.org">donate@mozilla.org</a>.
faq_item_4_header=Ke mana saya boleh hantar cek/cheque?
faq_item_4_paragraph_a=Sila hantar cek anda ke:
faq_item_5_header=Bolehkah saya derma bitcoin?
faq_item_7_header=Bagaimana derma saya akan digunakan?
faq_item_7_paragraph_a=Di Mozilla, kebajikan adalah sebahagian etika kami, Ketahui cara derma anda digunakan, klik <a href="https://www.mozilla.org/foundation/">sini</a>.
faq_item_9_header=Siapa yang menderma untuk Mozilla?
| Update Malay (ms) localization of Fundraising | Pontoon: Update Malay (ms) localization of Fundraising
Localization authors:
- manxmensch <manxmensch@gmail.com>
| INI | mpl-2.0 | mozilla/donate.mozilla.org | ini | ## Code Before:
faq_header=Penderma FAQ
faq_donate_link=derma sekarang
faq_intro=Berikut ialah soalan lazim perihal derma untuk Yayasan Mozilla. Jika soalan dan jawapan anda tidak tersenarai di sini, sila hubungi kami di <a href="mailto:donate@mozilla.org">donate@mozilla.org</a>.
faq_item_5_header=Bolehkah saya derma bitcoin?
faq_item_7_header=Bagaimana derma saya akan digunakan?
faq_item_7_paragraph_a=Di Mozilla, kebajikan adalah sebahagian etika kami, Ketahui cara derma anda digunakan, klik <a href="https://www.mozilla.org/foundation/">sini</a>.
faq_item_9_header=Siapa yang menderma untuk Mozilla?
## Instruction:
Pontoon: Update Malay (ms) localization of Fundraising
Localization authors:
- manxmensch <manxmensch@gmail.com>
## Code After:
faq_header=Penderma FAQ
faq_donate_link=derma sekarang
faq_intro=Berikut ialah soalan lazim perihal derma untuk Yayasan Mozilla. Jika soalan dan jawapan anda tidak tersenarai di sini, sila hubungi kami di <a href="mailto:donate@mozilla.org">donate@mozilla.org</a>.
faq_item_4_header=Ke mana saya boleh hantar cek/cheque?
faq_item_4_paragraph_a=Sila hantar cek anda ke:
faq_item_5_header=Bolehkah saya derma bitcoin?
faq_item_7_header=Bagaimana derma saya akan digunakan?
faq_item_7_paragraph_a=Di Mozilla, kebajikan adalah sebahagian etika kami, Ketahui cara derma anda digunakan, klik <a href="https://www.mozilla.org/foundation/">sini</a>.
faq_item_9_header=Siapa yang menderma untuk Mozilla?
| faq_header=Penderma FAQ
faq_donate_link=derma sekarang
faq_intro=Berikut ialah soalan lazim perihal derma untuk Yayasan Mozilla. Jika soalan dan jawapan anda tidak tersenarai di sini, sila hubungi kami di <a href="mailto:donate@mozilla.org">donate@mozilla.org</a>.
+ faq_item_4_header=Ke mana saya boleh hantar cek/cheque?
+ faq_item_4_paragraph_a=Sila hantar cek anda ke:
faq_item_5_header=Bolehkah saya derma bitcoin?
faq_item_7_header=Bagaimana derma saya akan digunakan?
faq_item_7_paragraph_a=Di Mozilla, kebajikan adalah sebahagian etika kami, Ketahui cara derma anda digunakan, klik <a href="https://www.mozilla.org/foundation/">sini</a>.
faq_item_9_header=Siapa yang menderma untuk Mozilla? | 2 | 0.285714 | 2 | 0 |
51cf7436188936c195c7fe13a74eac28c10f4873 | .todo.txt | .todo.txt | Add;
Version 1.x:
- ./droopescan scan -u drupal.org fails
- better error for empty file when `scan`
- SIGINT capture for new scanning.
- Add composer.json to interesting URLs for all CMS.
Version 2.x:
- Break API to remove finds, isempty. Instead, simply return finds.
- Break API to replace 'interesting urls' key with 'interesting_urls'.
- Break API to add url (the URL which was requested to be scanned) and final_url which is the URL after redirects.
- Break API to detect plugin version.
- Wordpress?
Relevant:
- https://wappalyzer.com/ -
http://www.opensourcecms.com/general/cms-marketshare.php
| Add;
Version 1.x:
- ./droopescan scan -u drupal.org fails
- better error for empty file when `scan`
- SIGINT capture for new scanning.
- relative paths for --error-log
- Add "output to file" functionality.
- resume when -U and "output to file"
- Add composer.json to interesting URLs for all CMS.
Version 2.x:
- Break API to remove finds, isempty. Instead, simply return finds.
- Break API to replace 'interesting urls' key with 'interesting_urls'.
- Break API to add url (the URL which was requested to be scanned) and final_url which is the URL after redirects.
- Break API to detect plugin version.
- Wordpress?
Relevant:
- https://wappalyzer.com/ -
http://www.opensourcecms.com/general/cms-marketshare.php
| Add notes of issues that were raised due to testing. | Add notes of issues that were raised due to testing.
| Text | agpl-3.0 | droope/droopescan,VielSoft/droopescan,fu3kingt3pe/droopescan,VielSoft/droopescan,fu3kingt3pe/droopescan,srkdos/droopescan,srkdos/droopescan,droope/droopescan | text | ## Code Before:
Add;
Version 1.x:
- ./droopescan scan -u drupal.org fails
- better error for empty file when `scan`
- SIGINT capture for new scanning.
- Add composer.json to interesting URLs for all CMS.
Version 2.x:
- Break API to remove finds, isempty. Instead, simply return finds.
- Break API to replace 'interesting urls' key with 'interesting_urls'.
- Break API to add url (the URL which was requested to be scanned) and final_url which is the URL after redirects.
- Break API to detect plugin version.
- Wordpress?
Relevant:
- https://wappalyzer.com/ -
http://www.opensourcecms.com/general/cms-marketshare.php
## Instruction:
Add notes of issues that were raised due to testing.
## Code After:
Add;
Version 1.x:
- ./droopescan scan -u drupal.org fails
- better error for empty file when `scan`
- SIGINT capture for new scanning.
- relative paths for --error-log
- Add "output to file" functionality.
- resume when -U and "output to file"
- Add composer.json to interesting URLs for all CMS.
Version 2.x:
- Break API to remove finds, isempty. Instead, simply return finds.
- Break API to replace 'interesting urls' key with 'interesting_urls'.
- Break API to add url (the URL which was requested to be scanned) and final_url which is the URL after redirects.
- Break API to detect plugin version.
- Wordpress?
Relevant:
- https://wappalyzer.com/ -
http://www.opensourcecms.com/general/cms-marketshare.php
| Add;
Version 1.x:
- ./droopescan scan -u drupal.org fails
- better error for empty file when `scan`
- SIGINT capture for new scanning.
+ - relative paths for --error-log
+ - Add "output to file" functionality.
+ - resume when -U and "output to file"
- Add composer.json to interesting URLs for all CMS.
Version 2.x:
- Break API to remove finds, isempty. Instead, simply return finds.
- Break API to replace 'interesting urls' key with 'interesting_urls'.
- Break API to add url (the URL which was requested to be scanned) and final_url which is the URL after redirects.
- Break API to detect plugin version.
- Wordpress?
Relevant:
- https://wappalyzer.com/ -
http://www.opensourcecms.com/general/cms-marketshare.php | 3 | 0.166667 | 3 | 0 |
397bb32f8c74ffe6b0ed6afab90a29e56bbbd8b6 | sonar-project.properties | sonar-project.properties | sonar.junit.reportsPath=./reports/
sonar.junit.include=*.junit
sonar.swift.lizard.report=./reports/lizard-report.xml
sonar.swift.coverage.reportPattern=./reports/cobertura.xml
sonar.swift.swiftlint.report=./reports/*swiftlint.txt
sonar.projectName=Trakt-Swift
sonar.projectKey=io.github.pietrocaselani.traktswift
sonar.sources=.
sonar.exclusions=Example/Pods/**
sonar.swift.project=Trakt.xcodeproj
sonar.swift.workspace=Trakt.xcworkspace
sonar.sourceEncoding=UTF-8
sonar.language=swift
sonar.host.url=https://sonarcloud.io
sonar.organization=pietrocaselani-github | sonar.junit.reportsPath=./reports/
sonar.junit.include=*.junit
sonar.swift.lizard.report=./reports/lizard-report.xml
sonar.swift.coverage.reportPattern=./reports/cobertura.xml
sonar.swift.swiftlint.report=./reports/*swiftlint.txt
sonar.projectName=Trakt-Swift
sonar.projectKey=io.github.pietrocaselani.traktswift
sonar.sources=.
sonar.exclusions=Example/Pods/**,vendor/**
sonar.swift.project=Trakt.xcodeproj
sonar.swift.workspace=Trakt.xcworkspace
sonar.sourceEncoding=UTF-8
sonar.language=swift
sonar.host.url=https://sonarcloud.io
sonar.organization=pietrocaselani-github | Exclude `vendor` folder from sonar | Exclude `vendor` folder from sonar
| INI | unlicense | pietrocaselani/Trakt-Swift,pietrocaselani/Trakt-Swift,pietrocaselani/Trakt-Swift | ini | ## Code Before:
sonar.junit.reportsPath=./reports/
sonar.junit.include=*.junit
sonar.swift.lizard.report=./reports/lizard-report.xml
sonar.swift.coverage.reportPattern=./reports/cobertura.xml
sonar.swift.swiftlint.report=./reports/*swiftlint.txt
sonar.projectName=Trakt-Swift
sonar.projectKey=io.github.pietrocaselani.traktswift
sonar.sources=.
sonar.exclusions=Example/Pods/**
sonar.swift.project=Trakt.xcodeproj
sonar.swift.workspace=Trakt.xcworkspace
sonar.sourceEncoding=UTF-8
sonar.language=swift
sonar.host.url=https://sonarcloud.io
sonar.organization=pietrocaselani-github
## Instruction:
Exclude `vendor` folder from sonar
## Code After:
sonar.junit.reportsPath=./reports/
sonar.junit.include=*.junit
sonar.swift.lizard.report=./reports/lizard-report.xml
sonar.swift.coverage.reportPattern=./reports/cobertura.xml
sonar.swift.swiftlint.report=./reports/*swiftlint.txt
sonar.projectName=Trakt-Swift
sonar.projectKey=io.github.pietrocaselani.traktswift
sonar.sources=.
sonar.exclusions=Example/Pods/**,vendor/**
sonar.swift.project=Trakt.xcodeproj
sonar.swift.workspace=Trakt.xcworkspace
sonar.sourceEncoding=UTF-8
sonar.language=swift
sonar.host.url=https://sonarcloud.io
sonar.organization=pietrocaselani-github | sonar.junit.reportsPath=./reports/
sonar.junit.include=*.junit
sonar.swift.lizard.report=./reports/lizard-report.xml
sonar.swift.coverage.reportPattern=./reports/cobertura.xml
sonar.swift.swiftlint.report=./reports/*swiftlint.txt
sonar.projectName=Trakt-Swift
sonar.projectKey=io.github.pietrocaselani.traktswift
sonar.sources=.
- sonar.exclusions=Example/Pods/**
+ sonar.exclusions=Example/Pods/**,vendor/**
? ++++++++++
sonar.swift.project=Trakt.xcodeproj
sonar.swift.workspace=Trakt.xcworkspace
sonar.sourceEncoding=UTF-8
sonar.language=swift
sonar.host.url=https://sonarcloud.io
sonar.organization=pietrocaselani-github | 2 | 0.133333 | 1 | 1 |
d610e4d86defa39a052a21ad75908cb0ad0bf570 | set-version.sh | set-version.sh | VERSION=$1
jq_in_place() {
tmp=$(mktemp)
jq $1 $2 > ${tmp}
mv ${tmp} $2
}
# Update version placeholders
FILES=$(grep -r SEED_VERSION spec | cut -d ':' -f 1 | sort | uniq)
for FILE in ${FILES}
do
sed -i "" -e "s/SEED_VERSION/"$1"/g" ${FILE}
done
# Update schemas
jq_in_place .properties.seedVersion.pattern=\"^${VERSION}$\" spec/schema/seed.manifest.schema.json
jq_in_place .properties.seedVersion.pattern=\"^${VERSION}$\" spec/schema/seed.metadata.schema.json
# Update examples
FILES=$(grep -r seedVersion spec/examples/ | cut -d ':' -f 1 | sort | uniq | grep -v Dockerfile)
for FILE in ${FILES}
do
jq_in_place .seedVersion=\"${VERSION}\" ${FILE}
done
| VERSION=$1
jq_in_place() {
tmp=$(mktemp)
jq $1 $2 > ${tmp}
mv ${tmp} $2
}
# Update version placeholders
FILES=$(grep -r SEED_VERSION spec | cut -d ':' -f 1 | sort | uniq)
for FILE in ${FILES}
do
sed -i "" -e "s/SEED_VERSION/"$1"/g" ${FILE}
done
# Update schemas
VERSION_PATTERN=$(echo ${VERSION} | sed 's^\.^\\\\\.^g')
jq_in_place .properties.seedVersion.pattern=\"^${VERSION_PATTERN}$\" spec/schema/seed.manifest.schema.json
jq_in_place .properties.seedVersion.pattern=\"^${VERSION_PATTERN}$\" spec/schema/seed.metadata.schema.json
# Update examples
FILES=$(grep -r seedVersion spec/examples/ | cut -d ':' -f 1 | sort | uniq | grep -v Dockerfile)
for FILE in ${FILES}
do
jq_in_place .seedVersion=\"${VERSION}\" ${FILE}
done
| Update to set schema pattern properly | Update to set schema pattern properly
| Shell | apache-2.0 | ngageoint/seed,ngageoint/seed,ngageoint/seed | shell | ## Code Before:
VERSION=$1
jq_in_place() {
tmp=$(mktemp)
jq $1 $2 > ${tmp}
mv ${tmp} $2
}
# Update version placeholders
FILES=$(grep -r SEED_VERSION spec | cut -d ':' -f 1 | sort | uniq)
for FILE in ${FILES}
do
sed -i "" -e "s/SEED_VERSION/"$1"/g" ${FILE}
done
# Update schemas
jq_in_place .properties.seedVersion.pattern=\"^${VERSION}$\" spec/schema/seed.manifest.schema.json
jq_in_place .properties.seedVersion.pattern=\"^${VERSION}$\" spec/schema/seed.metadata.schema.json
# Update examples
FILES=$(grep -r seedVersion spec/examples/ | cut -d ':' -f 1 | sort | uniq | grep -v Dockerfile)
for FILE in ${FILES}
do
jq_in_place .seedVersion=\"${VERSION}\" ${FILE}
done
## Instruction:
Update to set schema pattern properly
## Code After:
VERSION=$1
jq_in_place() {
tmp=$(mktemp)
jq $1 $2 > ${tmp}
mv ${tmp} $2
}
# Update version placeholders
FILES=$(grep -r SEED_VERSION spec | cut -d ':' -f 1 | sort | uniq)
for FILE in ${FILES}
do
sed -i "" -e "s/SEED_VERSION/"$1"/g" ${FILE}
done
# Update schemas
VERSION_PATTERN=$(echo ${VERSION} | sed 's^\.^\\\\\.^g')
jq_in_place .properties.seedVersion.pattern=\"^${VERSION_PATTERN}$\" spec/schema/seed.manifest.schema.json
jq_in_place .properties.seedVersion.pattern=\"^${VERSION_PATTERN}$\" spec/schema/seed.metadata.schema.json
# Update examples
FILES=$(grep -r seedVersion spec/examples/ | cut -d ':' -f 1 | sort | uniq | grep -v Dockerfile)
for FILE in ${FILES}
do
jq_in_place .seedVersion=\"${VERSION}\" ${FILE}
done
| VERSION=$1
jq_in_place() {
tmp=$(mktemp)
jq $1 $2 > ${tmp}
mv ${tmp} $2
}
# Update version placeholders
FILES=$(grep -r SEED_VERSION spec | cut -d ':' -f 1 | sort | uniq)
for FILE in ${FILES}
do
sed -i "" -e "s/SEED_VERSION/"$1"/g" ${FILE}
done
# Update schemas
+ VERSION_PATTERN=$(echo ${VERSION} | sed 's^\.^\\\\\.^g')
- jq_in_place .properties.seedVersion.pattern=\"^${VERSION}$\" spec/schema/seed.manifest.schema.json
+ jq_in_place .properties.seedVersion.pattern=\"^${VERSION_PATTERN}$\" spec/schema/seed.manifest.schema.json
? ++++++++
- jq_in_place .properties.seedVersion.pattern=\"^${VERSION}$\" spec/schema/seed.metadata.schema.json
+ jq_in_place .properties.seedVersion.pattern=\"^${VERSION_PATTERN}$\" spec/schema/seed.metadata.schema.json
? ++++++++
# Update examples
FILES=$(grep -r seedVersion spec/examples/ | cut -d ':' -f 1 | sort | uniq | grep -v Dockerfile)
for FILE in ${FILES}
do
jq_in_place .seedVersion=\"${VERSION}\" ${FILE}
done | 5 | 0.178571 | 3 | 2 |
800503e891a9ee87641f0a4d1e45074bf8dd98b6 | metadata/io.rebble.charon.yml | metadata/io.rebble.charon.yml | Categories:
- Connectivity
- System
License: MIT
AuthorName: The Rebble Alliance
AuthorEmail: support@rebble.io
WebSite: https://rebble.io
SourceCode: https://github.com/pebble-dev/rebble-sideloader
IssueTracker: https://github.com/pebble-dev/rebble-sideloader/issues
Translation: https://crowdin.com/project/charon
AutoName: Sideload Helper by Rebble
RepoType: git
Repo: https://github.com/pebble-dev/rebble-sideloader
Builds:
- versionName: '1.3'
versionCode: 4
commit: v1.3
subdir: app
gradle:
- yes
antifeatures:
- NonFreeDep
AutoUpdateMode: Version v%v
UpdateCheckMode: RepoManifest
| Categories:
- Connectivity
- System
License: MIT
AuthorName: The Rebble Alliance
AuthorEmail: support@rebble.io
WebSite: https://rebble.io
SourceCode: https://github.com/pebble-dev/rebble-sideloader
IssueTracker: https://github.com/pebble-dev/rebble-sideloader/issues
Translation: https://crowdin.com/project/charon
AutoName: Sideloader
RepoType: git
Repo: https://github.com/pebble-dev/rebble-sideloader
Builds:
- versionName: '1.3'
versionCode: 4
commit: v1.3
subdir: app
gradle:
- yes
antifeatures:
- NonFreeDep
AutoUpdateMode: Version v%v
UpdateCheckMode: RepoManifest
CurrentVersion: '1.3'
CurrentVersionCode: 4
| Update CurrentVersion of Sideloader to 1.3 (4) | Update CurrentVersion of Sideloader to 1.3 (4)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- Connectivity
- System
License: MIT
AuthorName: The Rebble Alliance
AuthorEmail: support@rebble.io
WebSite: https://rebble.io
SourceCode: https://github.com/pebble-dev/rebble-sideloader
IssueTracker: https://github.com/pebble-dev/rebble-sideloader/issues
Translation: https://crowdin.com/project/charon
AutoName: Sideload Helper by Rebble
RepoType: git
Repo: https://github.com/pebble-dev/rebble-sideloader
Builds:
- versionName: '1.3'
versionCode: 4
commit: v1.3
subdir: app
gradle:
- yes
antifeatures:
- NonFreeDep
AutoUpdateMode: Version v%v
UpdateCheckMode: RepoManifest
## Instruction:
Update CurrentVersion of Sideloader to 1.3 (4)
## Code After:
Categories:
- Connectivity
- System
License: MIT
AuthorName: The Rebble Alliance
AuthorEmail: support@rebble.io
WebSite: https://rebble.io
SourceCode: https://github.com/pebble-dev/rebble-sideloader
IssueTracker: https://github.com/pebble-dev/rebble-sideloader/issues
Translation: https://crowdin.com/project/charon
AutoName: Sideloader
RepoType: git
Repo: https://github.com/pebble-dev/rebble-sideloader
Builds:
- versionName: '1.3'
versionCode: 4
commit: v1.3
subdir: app
gradle:
- yes
antifeatures:
- NonFreeDep
AutoUpdateMode: Version v%v
UpdateCheckMode: RepoManifest
CurrentVersion: '1.3'
CurrentVersionCode: 4
| Categories:
- Connectivity
- System
License: MIT
AuthorName: The Rebble Alliance
AuthorEmail: support@rebble.io
WebSite: https://rebble.io
SourceCode: https://github.com/pebble-dev/rebble-sideloader
IssueTracker: https://github.com/pebble-dev/rebble-sideloader/issues
Translation: https://crowdin.com/project/charon
- AutoName: Sideload Helper by Rebble
+ AutoName: Sideloader
RepoType: git
Repo: https://github.com/pebble-dev/rebble-sideloader
Builds:
- versionName: '1.3'
versionCode: 4
commit: v1.3
subdir: app
gradle:
- yes
antifeatures:
- NonFreeDep
AutoUpdateMode: Version v%v
UpdateCheckMode: RepoManifest
+ CurrentVersion: '1.3'
+ CurrentVersionCode: 4 | 4 | 0.142857 | 3 | 1 |
0515f71d861529262aada1ad416c626277e11d9e | django_excel_to_model/forms.py | django_excel_to_model/forms.py | from django.utils.translation import ugettext_lazy as _
from django import forms
from models import ExcelImportTask
from django.forms import ModelForm
class ExcelFormatTranslateForm(forms.Form):
# title = forms.CharField(max_length=50)
import_file = forms.FileField(
label=_('File to import')
)
header_row_numbered_from_1 = forms.IntegerField()
spreadsheet_numbered_from_1 = forms.IntegerField()
class_name = forms.CharField()
is_create_app_now = forms.BooleanField(required=False)
class ExcelImportTaskForm(ModelForm):
class Meta:
model = ExcelImportTask
fields = ['excel_file', 'content', "header_row_numbered_from_1", "spreadsheet_numbered_from_1"]
is_import_now = forms.BooleanField(required=False)
| from django.contrib.contenttypes.models import ContentType
from django.utils.translation import ugettext_lazy as _
from django import forms
from models import ExcelImportTask
from django.forms import ModelForm
class ExcelFormatTranslateForm(forms.Form):
# title = forms.CharField(max_length=50)
import_file = forms.FileField(
label=_('File to import')
)
header_row_numbered_from_1 = forms.IntegerField()
spreadsheet_numbered_from_1 = forms.IntegerField()
class_name = forms.CharField()
is_create_app_now = forms.BooleanField(required=False)
class ExcelImportTaskForm(ModelForm):
content = forms.ModelChoiceField(queryset=ContentType.objects.order_by('model'))
class Meta:
model = ExcelImportTask
fields = ['excel_file', 'content', "header_row_numbered_from_1", "spreadsheet_numbered_from_1"]
is_import_now = forms.BooleanField(required=False)
| Sort content for data import. | Sort content for data import.
| Python | bsd-3-clause | weijia/django-excel-to-model,weijia/django-excel-to-model | python | ## Code Before:
from django.utils.translation import ugettext_lazy as _
from django import forms
from models import ExcelImportTask
from django.forms import ModelForm
class ExcelFormatTranslateForm(forms.Form):
# title = forms.CharField(max_length=50)
import_file = forms.FileField(
label=_('File to import')
)
header_row_numbered_from_1 = forms.IntegerField()
spreadsheet_numbered_from_1 = forms.IntegerField()
class_name = forms.CharField()
is_create_app_now = forms.BooleanField(required=False)
class ExcelImportTaskForm(ModelForm):
class Meta:
model = ExcelImportTask
fields = ['excel_file', 'content', "header_row_numbered_from_1", "spreadsheet_numbered_from_1"]
is_import_now = forms.BooleanField(required=False)
## Instruction:
Sort content for data import.
## Code After:
from django.contrib.contenttypes.models import ContentType
from django.utils.translation import ugettext_lazy as _
from django import forms
from models import ExcelImportTask
from django.forms import ModelForm
class ExcelFormatTranslateForm(forms.Form):
# title = forms.CharField(max_length=50)
import_file = forms.FileField(
label=_('File to import')
)
header_row_numbered_from_1 = forms.IntegerField()
spreadsheet_numbered_from_1 = forms.IntegerField()
class_name = forms.CharField()
is_create_app_now = forms.BooleanField(required=False)
class ExcelImportTaskForm(ModelForm):
content = forms.ModelChoiceField(queryset=ContentType.objects.order_by('model'))
class Meta:
model = ExcelImportTask
fields = ['excel_file', 'content', "header_row_numbered_from_1", "spreadsheet_numbered_from_1"]
is_import_now = forms.BooleanField(required=False)
| + from django.contrib.contenttypes.models import ContentType
from django.utils.translation import ugettext_lazy as _
from django import forms
from models import ExcelImportTask
from django.forms import ModelForm
class ExcelFormatTranslateForm(forms.Form):
# title = forms.CharField(max_length=50)
import_file = forms.FileField(
label=_('File to import')
)
header_row_numbered_from_1 = forms.IntegerField()
spreadsheet_numbered_from_1 = forms.IntegerField()
class_name = forms.CharField()
is_create_app_now = forms.BooleanField(required=False)
class ExcelImportTaskForm(ModelForm):
+ content = forms.ModelChoiceField(queryset=ContentType.objects.order_by('model'))
+
class Meta:
model = ExcelImportTask
fields = ['excel_file', 'content', "header_row_numbered_from_1", "spreadsheet_numbered_from_1"]
+
is_import_now = forms.BooleanField(required=False)
- | 5 | 0.217391 | 4 | 1 |
2925dd45827f8f9a8c8df38cb0554f1c285737b1 | src/amethyst/http/params.cr | src/amethyst/http/params.cr | class Params
getter :hash
def initialize(default="")
@params = Hash(String, String).new(default)
end
def hash
@params
end
def merge(other : Params)
merged_hash = @params.merge other.hash
merged_params = Params.new
merged_params.from_hash(merged_hash)
merged_params
end
def [](key)
@params[key.to_s]
end
def from_hash(hash : Hash)
hash.each { |k,v| @params[k.to_s] = v.to_s }
end
def []=(k,v)
@params[k.to_s] = v.to_s
end
def ==(other : Hash)
other == @params
end
def inspect
@params.inspect
end
def has_keys?(keys_array : Array)
has = true
keys_array.each do |key|
has = false unless @params.has_key? key.to_s
end
has
end
forward_missing_to @params
end | class Params
getter :hash
def initialize(default="")
@params = Hash(String, String).new(default)
end
def hash
@params
end
def merge(other : Params)
merged_hash = @params.merge other.hash
merged_params = Params.new
merged_params.from_hash(merged_hash)
merged_params
end
def [](key)
@params[key.to_s]
end
def from_hash(hash : Hash)
hash.each { |k,v| @params[k.to_s] = v.to_s }
end
def []=(k,v)
@params[k.to_s] = v.to_s
end
def ==(other : Hash)
other == @params
end
def inspect
@params.inspect
end
def has_keys?(keys_array : Array)
has = true
keys_array.each do |key|
has = false unless @params.has_key? key.to_s
end
has
end
def to_s(io : IO)
msg = "\n{"
@params.each do |k,v|
msg+="#{k} => #{v}"
end
io << msg
end
forward_missing_to @params
end | Add to_s method for Params | Add to_s method for Params
| Crystal | mit | trapped/amethyst | crystal | ## Code Before:
class Params
getter :hash
def initialize(default="")
@params = Hash(String, String).new(default)
end
def hash
@params
end
def merge(other : Params)
merged_hash = @params.merge other.hash
merged_params = Params.new
merged_params.from_hash(merged_hash)
merged_params
end
def [](key)
@params[key.to_s]
end
def from_hash(hash : Hash)
hash.each { |k,v| @params[k.to_s] = v.to_s }
end
def []=(k,v)
@params[k.to_s] = v.to_s
end
def ==(other : Hash)
other == @params
end
def inspect
@params.inspect
end
def has_keys?(keys_array : Array)
has = true
keys_array.each do |key|
has = false unless @params.has_key? key.to_s
end
has
end
forward_missing_to @params
end
## Instruction:
Add to_s method for Params
## Code After:
class Params
getter :hash
def initialize(default="")
@params = Hash(String, String).new(default)
end
def hash
@params
end
def merge(other : Params)
merged_hash = @params.merge other.hash
merged_params = Params.new
merged_params.from_hash(merged_hash)
merged_params
end
def [](key)
@params[key.to_s]
end
def from_hash(hash : Hash)
hash.each { |k,v| @params[k.to_s] = v.to_s }
end
def []=(k,v)
@params[k.to_s] = v.to_s
end
def ==(other : Hash)
other == @params
end
def inspect
@params.inspect
end
def has_keys?(keys_array : Array)
has = true
keys_array.each do |key|
has = false unless @params.has_key? key.to_s
end
has
end
def to_s(io : IO)
msg = "\n{"
@params.each do |k,v|
msg+="#{k} => #{v}"
end
io << msg
end
forward_missing_to @params
end | class Params
getter :hash
def initialize(default="")
@params = Hash(String, String).new(default)
end
def hash
@params
end
def merge(other : Params)
merged_hash = @params.merge other.hash
merged_params = Params.new
merged_params.from_hash(merged_hash)
merged_params
end
def [](key)
@params[key.to_s]
end
def from_hash(hash : Hash)
hash.each { |k,v| @params[k.to_s] = v.to_s }
end
def []=(k,v)
@params[k.to_s] = v.to_s
end
def ==(other : Hash)
other == @params
end
def inspect
@params.inspect
end
def has_keys?(keys_array : Array)
has = true
keys_array.each do |key|
has = false unless @params.has_key? key.to_s
end
has
end
+ def to_s(io : IO)
+ msg = "\n{"
+ @params.each do |k,v|
+ msg+="#{k} => #{v}"
+ end
+ io << msg
+ end
+
forward_missing_to @params
end | 8 | 0.166667 | 8 | 0 |
7af7e49f5de3048e0322d585cb658ff34436b904 | circle.yml | circle.yml | machine:
services:
- docker
dependencies:
cache_directories:
- "~/docker-apt-cacher-ng"
override:
- docker info
- if [[ -e ~/docker-apt-cacher-ng/image.tar ]]; then docker load --input ~/docker-apt-cacher-ng/image.tar; fi
- docker build -t sameersbn/apt-cacher-ng .
- mkdir -p ~/docker-apt-cacher-ng; docker save --output ~/docker-apt-cacher-ng/image.tar sameersbn/apt-cacher-ng
test:
override:
- docker run --name=apt-cacher-ng -d -p 172.17.42.1:3142:3142 sameersbn/apt-cacher-ng; sleep 10
- docker exec -it apt-cacher-ng su -c 'echo "Acquire::http::Proxy \"http://172.17.42.1:3142\";" > /etc/apt/apt.conf.d/01proxy'
| machine:
services:
- docker
dependencies:
cache_directories:
- "~/docker-apt-cacher-ng"
override:
- docker info
- if [[ -e ~/docker-apt-cacher-ng/image.tar ]]; then docker load --input ~/docker-apt-cacher-ng/image.tar; fi
- docker build -t sameersbn/apt-cacher-ng .
- mkdir -p ~/docker-apt-cacher-ng; docker save --output ~/docker-apt-cacher-ng/image.tar sameersbn/apt-cacher-ng
test:
override:
- docker run -d -p 172.17.42.1:3142:3142 sameersbn/apt-cacher-ng; sleep 10
- curl --retry 10 --retry-delay 5 -v "http://172.17.42.1:3142/acng-report.html?doCount=Count+Data"
| Revert "ci: test apt-cacher-ng from within the apt-cacher-ng container" | Revert "ci: test apt-cacher-ng from within the apt-cacher-ng container"
This reverts commit 16028df9a87cb542c8698e6e9304b4c788e553f8.
circleci does not support `exec`.. FUCK IT!
| YAML | mit | sameersbn/docker-apt-cacher-ng | yaml | ## Code Before:
machine:
services:
- docker
dependencies:
cache_directories:
- "~/docker-apt-cacher-ng"
override:
- docker info
- if [[ -e ~/docker-apt-cacher-ng/image.tar ]]; then docker load --input ~/docker-apt-cacher-ng/image.tar; fi
- docker build -t sameersbn/apt-cacher-ng .
- mkdir -p ~/docker-apt-cacher-ng; docker save --output ~/docker-apt-cacher-ng/image.tar sameersbn/apt-cacher-ng
test:
override:
- docker run --name=apt-cacher-ng -d -p 172.17.42.1:3142:3142 sameersbn/apt-cacher-ng; sleep 10
- docker exec -it apt-cacher-ng su -c 'echo "Acquire::http::Proxy \"http://172.17.42.1:3142\";" > /etc/apt/apt.conf.d/01proxy'
## Instruction:
Revert "ci: test apt-cacher-ng from within the apt-cacher-ng container"
This reverts commit 16028df9a87cb542c8698e6e9304b4c788e553f8.
circleci does not support `exec`.. FUCK IT!
## Code After:
machine:
services:
- docker
dependencies:
cache_directories:
- "~/docker-apt-cacher-ng"
override:
- docker info
- if [[ -e ~/docker-apt-cacher-ng/image.tar ]]; then docker load --input ~/docker-apt-cacher-ng/image.tar; fi
- docker build -t sameersbn/apt-cacher-ng .
- mkdir -p ~/docker-apt-cacher-ng; docker save --output ~/docker-apt-cacher-ng/image.tar sameersbn/apt-cacher-ng
test:
override:
- docker run -d -p 172.17.42.1:3142:3142 sameersbn/apt-cacher-ng; sleep 10
- curl --retry 10 --retry-delay 5 -v "http://172.17.42.1:3142/acng-report.html?doCount=Count+Data"
| machine:
services:
- docker
dependencies:
cache_directories:
- "~/docker-apt-cacher-ng"
override:
- docker info
- if [[ -e ~/docker-apt-cacher-ng/image.tar ]]; then docker load --input ~/docker-apt-cacher-ng/image.tar; fi
- docker build -t sameersbn/apt-cacher-ng .
- mkdir -p ~/docker-apt-cacher-ng; docker save --output ~/docker-apt-cacher-ng/image.tar sameersbn/apt-cacher-ng
test:
override:
- - docker run --name=apt-cacher-ng -d -p 172.17.42.1:3142:3142 sameersbn/apt-cacher-ng; sleep 10
? ---------------------
+ - docker run -d -p 172.17.42.1:3142:3142 sameersbn/apt-cacher-ng; sleep 10
- - docker exec -it apt-cacher-ng su -c 'echo "Acquire::http::Proxy \"http://172.17.42.1:3142\";" > /etc/apt/apt.conf.d/01proxy'
+ - curl --retry 10 --retry-delay 5 -v "http://172.17.42.1:3142/acng-report.html?doCount=Count+Data" | 4 | 0.266667 | 2 | 2 |
258c31c3b3f9cbeca6904c7785785d767821886e | lib/App/Happyman/Action.pm | lib/App/Happyman/Action.pm | package App::Happyman::Action;
use v5.18;
use Moose;
use namespace::autoclean;
has [qw(text sender_nick)] => (
is => 'ro',
isa => 'Str',
required => 1,
);
sub BUILDARGS {
my ( $self, %args ) = @_;
$args{text} =~ s/^\s+|\s+$//g;
return \%args;
}
1;
| package App::Happyman::Action;
use v5.18;
use Moose;
use namespace::autoclean;
use Moose::Util::TypeConstraints;
subtype 'TrimmedStr'
=> as 'Str'
=> where { /^\S .* \S$/x };
coerce 'TrimmedStr'
=> from 'Str'
=> via { s/^\s+ | \s+$//gxr };
has 'sender_nick' => (
is => 'ro',
isa => 'Str',
required => 1,
);
has 'text' => (
is => 'ro',
isa => 'TrimmedStr',
required => 1,
coerce => 1,
);
1;
| Use subtype for trimming text | Hug: Use subtype for trimming text
| Perl | mit | skyshaper/happyman,skyshaper/happyman,skyshaper/happyman | perl | ## Code Before:
package App::Happyman::Action;
use v5.18;
use Moose;
use namespace::autoclean;
has [qw(text sender_nick)] => (
is => 'ro',
isa => 'Str',
required => 1,
);
sub BUILDARGS {
my ( $self, %args ) = @_;
$args{text} =~ s/^\s+|\s+$//g;
return \%args;
}
1;
## Instruction:
Hug: Use subtype for trimming text
## Code After:
package App::Happyman::Action;
use v5.18;
use Moose;
use namespace::autoclean;
use Moose::Util::TypeConstraints;
subtype 'TrimmedStr'
=> as 'Str'
=> where { /^\S .* \S$/x };
coerce 'TrimmedStr'
=> from 'Str'
=> via { s/^\s+ | \s+$//gxr };
has 'sender_nick' => (
is => 'ro',
isa => 'Str',
required => 1,
);
has 'text' => (
is => 'ro',
isa => 'TrimmedStr',
required => 1,
coerce => 1,
);
1;
| package App::Happyman::Action;
use v5.18;
use Moose;
use namespace::autoclean;
+ use Moose::Util::TypeConstraints;
+
+ subtype 'TrimmedStr'
+ => as 'Str'
+ => where { /^\S .* \S$/x };
+
+ coerce 'TrimmedStr'
+ => from 'Str'
+ => via { s/^\s+ | \s+$//gxr };
+
+
- has [qw(text sender_nick)] => (
? ^^^^^^^^^ ^^
+ has 'sender_nick' => (
? ^ ^
is => 'ro',
isa => 'Str',
required => 1,
);
+ has 'text' => (
+ is => 'ro',
+ isa => 'TrimmedStr',
+ required => 1,
+ coerce => 1,
+ );
-
- sub BUILDARGS {
- my ( $self, %args ) = @_;
-
- $args{text} =~ s/^\s+|\s+$//g;
- return \%args;
- }
1; | 26 | 1.368421 | 18 | 8 |
2a471afe3d1a215fdc9be75d3e73889a571e822e | scripts/platform-identifier.sh | scripts/platform-identifier.sh | set -euo pipefail
IFS=$'\n\t'
SUPPORT_FILE="/etc/protonet/support_identifier"
get_mac() {
local INTERFACE=$(netstat -nr | awk '/^0\.0\.0\.0/ { print $8 }')
local MAC=$(ip link show ${INTERFACE} | awk '/link/ { gsub(/:/, "", $2); print toupper($2)}')
echo -n "${MAC}"
}
get_hw() {
echo -n "U"
}
if [[ ! -f "${SUPPORT_FILE}" ]]; then
mkdir -p $(dirname "${SUPPORT_FILE}")
get_hw > ${SUPPORT_FILE}
get_mac > ${SUPPORT_FILE}
fi
| set -euo pipefail
IFS=$'\n\t'
SUPPORT_FILE="/etc/protonet/support_identifier"
get_mac() {
local interfaces=$(ip link show | awk '/^[0-9]+:\s+[ew][a-z0-9]+/ { gsub(/:/, "", $2); print $2 }')
local mac
local result=""
local iface
for iface in ${interfaces}; do
mac=$(ip link show ${iface} | awk '/link/ { gsub(/:/, "", $2); print toupper($2)}')
result=$(echo ${result}-${mac})
done
echo -n "${result}"
}
get_hw() {
local INTERFACE_COUNT=$(ip link show | grep -P '^\d+:\s+[ew][a-z0-9]+'| wc -l)
if [[ "${INTERFACE_COUNT}" -eq 2 ]]; then
echo -n "MAYA"
else
echo -n "CARLA"
fi
}
main () {
if [ "$(id -u)" != "0" ]; then
echo "You must run this as root"
exit 1
fi
if [[ ! -f "${SUPPORT_FILE}" ]]; then
echo -n "Writing support identifier to ${SUPPORT_FILE}... "
mkdir -p $(dirname "${SUPPORT_FILE}")
get_hw > ${SUPPORT_FILE}
get_mac >> ${SUPPORT_FILE}
echo "DONE"
else
echo "Support identifier ${SUPPORT_FILE} already exists."
fi
}
main | Make the support identifier great again. | Make the support identifier great again.
| Shell | apache-2.0 | experimental-platform/platform-configure,experimental-platform/platform-configure | shell | ## Code Before:
set -euo pipefail
IFS=$'\n\t'
SUPPORT_FILE="/etc/protonet/support_identifier"
get_mac() {
local INTERFACE=$(netstat -nr | awk '/^0\.0\.0\.0/ { print $8 }')
local MAC=$(ip link show ${INTERFACE} | awk '/link/ { gsub(/:/, "", $2); print toupper($2)}')
echo -n "${MAC}"
}
get_hw() {
echo -n "U"
}
if [[ ! -f "${SUPPORT_FILE}" ]]; then
mkdir -p $(dirname "${SUPPORT_FILE}")
get_hw > ${SUPPORT_FILE}
get_mac > ${SUPPORT_FILE}
fi
## Instruction:
Make the support identifier great again.
## Code After:
set -euo pipefail
IFS=$'\n\t'
SUPPORT_FILE="/etc/protonet/support_identifier"
get_mac() {
local interfaces=$(ip link show | awk '/^[0-9]+:\s+[ew][a-z0-9]+/ { gsub(/:/, "", $2); print $2 }')
local mac
local result=""
local iface
for iface in ${interfaces}; do
mac=$(ip link show ${iface} | awk '/link/ { gsub(/:/, "", $2); print toupper($2)}')
result=$(echo ${result}-${mac})
done
echo -n "${result}"
}
get_hw() {
local INTERFACE_COUNT=$(ip link show | grep -P '^\d+:\s+[ew][a-z0-9]+'| wc -l)
if [[ "${INTERFACE_COUNT}" -eq 2 ]]; then
echo -n "MAYA"
else
echo -n "CARLA"
fi
}
main () {
if [ "$(id -u)" != "0" ]; then
echo "You must run this as root"
exit 1
fi
if [[ ! -f "${SUPPORT_FILE}" ]]; then
echo -n "Writing support identifier to ${SUPPORT_FILE}... "
mkdir -p $(dirname "${SUPPORT_FILE}")
get_hw > ${SUPPORT_FILE}
get_mac >> ${SUPPORT_FILE}
echo "DONE"
else
echo "Support identifier ${SUPPORT_FILE} already exists."
fi
}
main | set -euo pipefail
IFS=$'\n\t'
SUPPORT_FILE="/etc/protonet/support_identifier"
get_mac() {
- local INTERFACE=$(netstat -nr | awk '/^0\.0\.0\.0/ { print $8 }')
+ local interfaces=$(ip link show | awk '/^[0-9]+:\s+[ew][a-z0-9]+/ { gsub(/:/, "", $2); print $2 }')
+ local mac
+ local result=""
+ local iface
+ for iface in ${interfaces}; do
- local MAC=$(ip link show ${INTERFACE} | awk '/link/ { gsub(/:/, "", $2); print toupper($2)}')
? ^^ ------ ^^^^^^^^^
+ mac=$(ip link show ${iface} | awk '/link/ { gsub(/:/, "", $2); print toupper($2)}')
? ^^^^^^ ^^^^^
+ result=$(echo ${result}-${mac})
+ done
- echo -n "${MAC}"
? ^^^
+ echo -n "${result}"
? ^^^^^^
- }
-
- get_hw() {
- echo -n "U"
}
+ get_hw() {
+ local INTERFACE_COUNT=$(ip link show | grep -P '^\d+:\s+[ew][a-z0-9]+'| wc -l)
+ if [[ "${INTERFACE_COUNT}" -eq 2 ]]; then
+ echo -n "MAYA"
+ else
+ echo -n "CARLA"
+ fi
+ }
+
+
+ main () {
+ if [ "$(id -u)" != "0" ]; then
+ echo "You must run this as root"
+ exit 1
+ fi
+
- if [[ ! -f "${SUPPORT_FILE}" ]]; then
+ if [[ ! -f "${SUPPORT_FILE}" ]]; then
? ++++
+ echo -n "Writing support identifier to ${SUPPORT_FILE}... "
- mkdir -p $(dirname "${SUPPORT_FILE}")
+ mkdir -p $(dirname "${SUPPORT_FILE}")
? ++++
- get_hw > ${SUPPORT_FILE}
+ get_hw > ${SUPPORT_FILE}
? ++++
- get_mac > ${SUPPORT_FILE}
+ get_mac >> ${SUPPORT_FILE}
? ++++ +
- fi
+ echo "DONE"
+ else
+ echo "Support identifier ${SUPPORT_FILE} already exists."
+ fi
+ }
+
+ main | 49 | 2.333333 | 37 | 12 |
ec1a9f8988686dafc768338fc69cbf99c4f82860 | etc/schema-image.json | etc/schema-image.json | {}
| {
"kernel_id": {
"type": "string",
"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
"description": "ID of image stored in Glance that should be used as the kernel when booting an AMI-style image."
},
"ramdisk_id": {
"type": "string",
"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
"description": "ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image."
},
"instance_uuid": {
"type": "string",
"description": "ID of instance used to create this image."
}
}
| Add kernel/ramdisk_id, instance_uuid to v2 schema | Add kernel/ramdisk_id, instance_uuid to v2 schema
Nova depends on a few properties to be able to interact with
images in Glance effectively. The three added in this patch
are kernel_id, ramdisk_id and instance_uuid. These properties
are just being added to the default v2 schema, so they can
be overwritten if a consumer decides they need to.
Fixes bug 1039818
Change-Id: I5cfd5f0b5c8d1d526d56d99de738f9271aa641c1
| JSON | apache-2.0 | klmitch/glance,rajalokan/glance,akash1808/glance,cloudbau/glance,citrix-openstack-build/glance,SUSE-Cloud/glance,JioCloud/glance,rajalokan/glance,SUSE-Cloud/glance,ozamiatin/glance,wkoathp/glance,darren-wang/gl,ntt-sic/glance,dims/glance,takeshineshiro/glance,kfwang/Glance-OVA-OVF,saeki-masaki/glance,vuntz/glance,redhat-openstack/glance,ntt-sic/glance,paramite/glance,sigmavirus24/glance,rickerc/glance_audit,vuntz/glance,rickerc/glance_audit,tanglei528/glance,akash1808/glance,cloudbau/glance,jumpstarter-io/glance,paramite/glance,scripnichenko/glance,stevelle/glance,openstack/glance,JioCloud/glance,darren-wang/gl,dims/glance,wkoathp/glance,saeki-masaki/glance,tanglei528/glance,scripnichenko/glance,klmitch/glance,redhat-openstack/glance,jumpstarter-io/glance,openstack/glance,sigmavirus24/glance,citrix-openstack-build/glance,takeshineshiro/glance,kfwang/Glance-OVA-OVF,ozamiatin/glance,openstack/glance,stevelle/glance | json | ## Code Before:
{}
## Instruction:
Add kernel/ramdisk_id, instance_uuid to v2 schema
Nova depends on a few properties to be able to interact with
images in Glance effectively. The three added in this patch
are kernel_id, ramdisk_id and instance_uuid. These properties
are just being added to the default v2 schema, so they can
be overwritten if a consumer decides they need to.
Fixes bug 1039818
Change-Id: I5cfd5f0b5c8d1d526d56d99de738f9271aa641c1
## Code After:
{
"kernel_id": {
"type": "string",
"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
"description": "ID of image stored in Glance that should be used as the kernel when booting an AMI-style image."
},
"ramdisk_id": {
"type": "string",
"pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
"description": "ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image."
},
"instance_uuid": {
"type": "string",
"description": "ID of instance used to create this image."
}
}
| - {}
+ {
+ "kernel_id": {
+ "type": "string",
+ "pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
+ "description": "ID of image stored in Glance that should be used as the kernel when booting an AMI-style image."
+ },
+ "ramdisk_id": {
+ "type": "string",
+ "pattern": "^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$",
+ "description": "ID of image stored in Glance that should be used as the ramdisk when booting an AMI-style image."
+ },
+ "instance_uuid": {
+ "type": "string",
+ "description": "ID of instance used to create this image."
+ }
+ } | 17 | 17 | 16 | 1 |
0104016e78f9f7d3b535386c6455701bed4bdade | cmake/modules/CPackConfig.cmake | cmake/modules/CPackConfig.cmake | set(CPACK_PACKAGE_VENDOR "Daniel Nicoletti")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Web Framework built on top of Qt, using the simple and elegant approach of Catalyst (Perl) framework.")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_CONTACT "Daniel Nicoletti <dantti12@gmail.com>")
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${PROJECT_VERSION_MAJOR}")
if(UNIX)
if(NOT CPACK_GENERATOR)
set(CPACK_GENERATOR "DEB")
endif()
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_STRIP_FILES 1)
if(${CMAKE_VERSION} VERSION_GREATER "3.5")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
endif()
endif()
include(CPack)
| set(CPACK_PACKAGE_VENDOR "Daniel Nicoletti")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Web Framework built on top of Qt, using the simple and elegant approach of Catalyst (Perl) framework.")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_CONTACT "Daniel Nicoletti <dantti12@gmail.com>")
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${PROJECT_VERSION_MAJOR}-qt${QT_VERSION_MAJOR}")
if(UNIX)
if(NOT CPACK_GENERATOR)
set(CPACK_GENERATOR "DEB")
endif()
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_STRIP_FILES 1)
if(${CMAKE_VERSION} VERSION_GREATER "3.5")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
endif()
endif()
include(CPack)
| Fix CPack creating -qtX packages | Fix CPack creating -qtX packages
| CMake | bsd-3-clause | cutelyst/cutelyst,cutelyst/cutelyst,buschmann23/cutelyst,buschmann23/cutelyst,buschmann23/cutelyst,cutelyst/cutelyst | cmake | ## Code Before:
set(CPACK_PACKAGE_VENDOR "Daniel Nicoletti")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Web Framework built on top of Qt, using the simple and elegant approach of Catalyst (Perl) framework.")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_CONTACT "Daniel Nicoletti <dantti12@gmail.com>")
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${PROJECT_VERSION_MAJOR}")
if(UNIX)
if(NOT CPACK_GENERATOR)
set(CPACK_GENERATOR "DEB")
endif()
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_STRIP_FILES 1)
if(${CMAKE_VERSION} VERSION_GREATER "3.5")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
endif()
endif()
include(CPack)
## Instruction:
Fix CPack creating -qtX packages
## Code After:
set(CPACK_PACKAGE_VENDOR "Daniel Nicoletti")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Web Framework built on top of Qt, using the simple and elegant approach of Catalyst (Perl) framework.")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_CONTACT "Daniel Nicoletti <dantti12@gmail.com>")
set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${PROJECT_VERSION_MAJOR}-qt${QT_VERSION_MAJOR}")
if(UNIX)
if(NOT CPACK_GENERATOR)
set(CPACK_GENERATOR "DEB")
endif()
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_STRIP_FILES 1)
if(${CMAKE_VERSION} VERSION_GREATER "3.5")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
endif()
endif()
include(CPack)
| set(CPACK_PACKAGE_VENDOR "Daniel Nicoletti")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A Web Framework built on top of Qt, using the simple and elegant approach of Catalyst (Perl) framework.")
set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_CONTACT "Daniel Nicoletti <dantti12@gmail.com>")
- set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${PROJECT_VERSION_MAJOR}")
+ set(CPACK_PACKAGE_NAME "${PROJECT_NAME}${PROJECT_VERSION_MAJOR}-qt${QT_VERSION_MAJOR}")
? ++++++++++++++++++++++
if(UNIX)
if(NOT CPACK_GENERATOR)
set(CPACK_GENERATOR "DEB")
endif()
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_STRIP_FILES 1)
if(${CMAKE_VERSION} VERSION_GREATER "3.5")
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
endif()
endif()
include(CPack) | 2 | 0.105263 | 1 | 1 |
30b2faf8f6159e2aaffb5a792b92bcbd7afb1193 | lib/util/OrderBook.js | lib/util/OrderBook.js |
/*
*
* poloniex-unofficial
* https://git.io/polonode
*
* Yet another unofficial Node.js wrapper for the Poloniex cryptocurrency
* exchange APIs.
*
* Copyright (c) 2016 Tyler Filla
*
* This software may be modified and distributed under the terms of the MIT
* license. See the LICENSE file for details.
*
*/
/*
* Order book utility constructor.
*/
function OrderBook() {
}
module.exports = OrderBook;
|
/*
*
* poloniex-unofficial
* https://git.io/polonode
*
* Yet another unofficial Node.js wrapper for the Poloniex cryptocurrency
* exchange APIs.
*
* Copyright (c) 2016 Tyler Filla
*
* This software may be modified and distributed under the terms of the MIT
* license. See the LICENSE file for details.
*
*/
/*
* Order book utility constructor.
*/
function OrderBook() {
this._wrapperPublic = null;
this._wrapperPush = null;
}
/*
*
* function getWrapperPublic()
*
* Get the public wrapper instance.
*
*/
OrderBook.prototype.getWrapperPublic = function() {
return this._wrapperPublic;
};
/*
*
* function setWrapperPublic(wrapperPublic)
*
* Set the public wrapper instance.
*
*/
OrderBook.prototype.setWrapperPublic = function(wrapperPublic) {
this._wrapperPublic = wrapperPublic;
};
/*
*
* function getWrapperPush()
*
* Get the push wrapper instance.
*
*/
OrderBook.prototype.getWrapperPush = function() {
return this._wrapperPush;
};
/*
*
* function setWrapperPublic(wrapperPublic)
*
* Set the push wrapper instance.
*
*/
OrderBook.prototype.setWrapperPush = function(wrapperPush) {
this._wrapperPush = wrapperPush;
};
module.exports = OrderBook;
| Add getters and setters to order book util | Add getters and setters to order book util
| JavaScript | mit | tylerfilla/node-poloniex-unofficial | javascript | ## Code Before:
/*
*
* poloniex-unofficial
* https://git.io/polonode
*
* Yet another unofficial Node.js wrapper for the Poloniex cryptocurrency
* exchange APIs.
*
* Copyright (c) 2016 Tyler Filla
*
* This software may be modified and distributed under the terms of the MIT
* license. See the LICENSE file for details.
*
*/
/*
* Order book utility constructor.
*/
function OrderBook() {
}
module.exports = OrderBook;
## Instruction:
Add getters and setters to order book util
## Code After:
/*
*
* poloniex-unofficial
* https://git.io/polonode
*
* Yet another unofficial Node.js wrapper for the Poloniex cryptocurrency
* exchange APIs.
*
* Copyright (c) 2016 Tyler Filla
*
* This software may be modified and distributed under the terms of the MIT
* license. See the LICENSE file for details.
*
*/
/*
* Order book utility constructor.
*/
function OrderBook() {
this._wrapperPublic = null;
this._wrapperPush = null;
}
/*
*
* function getWrapperPublic()
*
* Get the public wrapper instance.
*
*/
OrderBook.prototype.getWrapperPublic = function() {
return this._wrapperPublic;
};
/*
*
* function setWrapperPublic(wrapperPublic)
*
* Set the public wrapper instance.
*
*/
OrderBook.prototype.setWrapperPublic = function(wrapperPublic) {
this._wrapperPublic = wrapperPublic;
};
/*
*
* function getWrapperPush()
*
* Get the push wrapper instance.
*
*/
OrderBook.prototype.getWrapperPush = function() {
return this._wrapperPush;
};
/*
*
* function setWrapperPublic(wrapperPublic)
*
* Set the push wrapper instance.
*
*/
OrderBook.prototype.setWrapperPush = function(wrapperPush) {
this._wrapperPush = wrapperPush;
};
module.exports = OrderBook;
|
/*
*
* poloniex-unofficial
* https://git.io/polonode
*
* Yet another unofficial Node.js wrapper for the Poloniex cryptocurrency
* exchange APIs.
*
* Copyright (c) 2016 Tyler Filla
*
* This software may be modified and distributed under the terms of the MIT
* license. See the LICENSE file for details.
*
*/
/*
* Order book utility constructor.
*/
function OrderBook() {
+ this._wrapperPublic = null;
+ this._wrapperPush = null;
}
+ /*
+ *
+ * function getWrapperPublic()
+ *
+ * Get the public wrapper instance.
+ *
+ */
+ OrderBook.prototype.getWrapperPublic = function() {
+ return this._wrapperPublic;
+ };
+
+ /*
+ *
+ * function setWrapperPublic(wrapperPublic)
+ *
+ * Set the public wrapper instance.
+ *
+ */
+ OrderBook.prototype.setWrapperPublic = function(wrapperPublic) {
+ this._wrapperPublic = wrapperPublic;
+ };
+
+ /*
+ *
+ * function getWrapperPush()
+ *
+ * Get the push wrapper instance.
+ *
+ */
+ OrderBook.prototype.getWrapperPush = function() {
+ return this._wrapperPush;
+ };
+
+ /*
+ *
+ * function setWrapperPublic(wrapperPublic)
+ *
+ * Set the push wrapper instance.
+ *
+ */
+ OrderBook.prototype.setWrapperPush = function(wrapperPush) {
+ this._wrapperPush = wrapperPush;
+ };
+
module.exports = OrderBook; | 46 | 2 | 46 | 0 |
771c5a86ea0e871b6805f0653b37f6bbd98df16b | src/coffee/run.coffee | src/coffee/run.coffee | Config = require '../config'
argv = require('optimist')
.usage('Usage: $0 --projectKey key --clientId id --clientSecret secret')
.demand(['projectKey','clientId', 'clientSecret'])
.argv
MarketPlaceStockUpdater = require('../main').MarketPlaceStockUpdater
Config.timeout = 60000
Config.showProgress = true
updater = new MarketPlaceStockUpdater(Config, argv.projectKey, argv.clientId, argv.clientSecret)
updater.run (msg) ->
console.log msg
process.exit 1 unless msg.status | Config = require '../config'
argv = require('optimist')
.usage('Usage: $0 --projectKey key --clientId id --clientSecret secret')
.demand(['projectKey','clientId', 'clientSecret'])
.argv
MarketPlaceStockUpdater = require('../main').MarketPlaceStockUpdater
updater = new MarketPlaceStockUpdater(Config, argv.projectKey, argv.clientId, argv.clientSecret)
updater.run (msg) ->
console.log msg
process.exit 1 unless msg.status | Remove config as it shoud be set outside. | Remove config as it shoud be set outside.
| CoffeeScript | mit | sphereio/sphere-stock-sync,sphereio/sphere-stock-sync | coffeescript | ## Code Before:
Config = require '../config'
argv = require('optimist')
.usage('Usage: $0 --projectKey key --clientId id --clientSecret secret')
.demand(['projectKey','clientId', 'clientSecret'])
.argv
MarketPlaceStockUpdater = require('../main').MarketPlaceStockUpdater
Config.timeout = 60000
Config.showProgress = true
updater = new MarketPlaceStockUpdater(Config, argv.projectKey, argv.clientId, argv.clientSecret)
updater.run (msg) ->
console.log msg
process.exit 1 unless msg.status
## Instruction:
Remove config as it shoud be set outside.
## Code After:
Config = require '../config'
argv = require('optimist')
.usage('Usage: $0 --projectKey key --clientId id --clientSecret secret')
.demand(['projectKey','clientId', 'clientSecret'])
.argv
MarketPlaceStockUpdater = require('../main').MarketPlaceStockUpdater
updater = new MarketPlaceStockUpdater(Config, argv.projectKey, argv.clientId, argv.clientSecret)
updater.run (msg) ->
console.log msg
process.exit 1 unless msg.status | Config = require '../config'
argv = require('optimist')
.usage('Usage: $0 --projectKey key --clientId id --clientSecret secret')
.demand(['projectKey','clientId', 'clientSecret'])
.argv
MarketPlaceStockUpdater = require('../main').MarketPlaceStockUpdater
- Config.timeout = 60000
- Config.showProgress = true
-
updater = new MarketPlaceStockUpdater(Config, argv.projectKey, argv.clientId, argv.clientSecret)
updater.run (msg) ->
console.log msg
process.exit 1 unless msg.status | 3 | 0.214286 | 0 | 3 |
b19ba07d987b24b1d6a065654c07601ac1667cba | app/models/spree/page.rb | app/models/spree/page.rb | module Spree
class Page < ActiveRecord::Base
validates :title, :presence => true
validates :permalink, :uniqueness => true
scope :published, where(:published => true)
paginates_per 50
end
end
| module Spree
class Page < ActiveRecord::Base
attr_accessible :title, :meta_keywords, :meta_description, :body, :permalink, :published
validates :title, :presence => true
validates :permalink, :uniqueness => true
scope :published, where(:published => true)
paginates_per 50
end
end
| Add attr_accessible to be compatible with rails 3.2.6+ | Add attr_accessible to be compatible with rails 3.2.6+
| Ruby | bsd-3-clause | gdsn13/spree_pages,sebastyuiop/spree_pages,gdsn13/spree_pages | ruby | ## Code Before:
module Spree
class Page < ActiveRecord::Base
validates :title, :presence => true
validates :permalink, :uniqueness => true
scope :published, where(:published => true)
paginates_per 50
end
end
## Instruction:
Add attr_accessible to be compatible with rails 3.2.6+
## Code After:
module Spree
class Page < ActiveRecord::Base
attr_accessible :title, :meta_keywords, :meta_description, :body, :permalink, :published
validates :title, :presence => true
validates :permalink, :uniqueness => true
scope :published, where(:published => true)
paginates_per 50
end
end
| module Spree
class Page < ActiveRecord::Base
+ attr_accessible :title, :meta_keywords, :meta_description, :body, :permalink, :published
validates :title, :presence => true
validates :permalink, :uniqueness => true
scope :published, where(:published => true)
paginates_per 50
end
end | 1 | 0.1 | 1 | 0 |
f93a2dd65df78ec50f694e1c5a7c35dd53206821 | README.md | README.md |
Package keygen is a helper to generate symmetric key(Ex: HMAC).
#### Create Symmetric Algorithm Key for HMAC SHA-256
var err error
size := 256 // Key size = 256 bits.
key := make([]byte, size)
if key, err = keygen.GenSymmetricKey(size); err != nil {
fmt.Printf("GenSymmetricKey(%v) error: %v\n", size, err)
}
// Compare a zero-value byte array to see if key is generated.
fmt.Printf("%v", !bytes.Equal(key, make([]byte, size)))
#### [CLI to generate symmetric key](https://github.com/northbright/keygen/tree/master/cli/gensymmetrickey)
* [gensymmetrickey](https://github.com/northbright/keygen/tree/master/cli/gensymmetrickey)
* Generate symmetric key(Ex: HMAC).
* Usage:
`gensymmetrickey -b=<key size in bits> -o=<output file>`
Ex:
gensymmetrickey -b=512 -o="mykey.dat"
* [Binary Release](https://github.com/northbright/keygen/releases)
#### Documentation
* [API Reference](http://godoc.org/github.com/northbright/keygen)
#### License
* [MIT License](./LICENSE)
|
keygen is a [Golang](http://golang.org) package which provides helper functions to generate symmetric key(Ex: HMAC).
#### Create Symmetric Algorithm Key for HMAC SHA-256
var err error
size := 256 // Key size = 256 bits.
key := make([]byte, size)
if key, err = keygen.GenSymmetricKey(size); err != nil {
fmt.Printf("GenSymmetricKey(%v) error: %v\n", size, err)
}
// Compare a zero-value byte array to see if key is generated.
fmt.Printf("%v", !bytes.Equal(key, make([]byte, size)))
#### [CLI to generate symmetric key](https://github.com/northbright/keygen/tree/master/cli/gensymmetrickey)
* [gensymmetrickey](https://github.com/northbright/keygen/tree/master/cli/gensymmetrickey)
* Generate symmetric key(Ex: HMAC).
* Usage:
`gensymmetrickey -b=<key size in bits> -o=<output file>`
Ex:
gensymmetrickey -b=512 -o="mykey.dat"
* [Binary Release](https://github.com/northbright/keygen/releases)
#### Documentation
* [API Reference](http://godoc.org/github.com/northbright/keygen)
#### License
* [MIT License](./LICENSE)
| Make it easy to understand what keygen is | Make it easy to understand what keygen is
| Markdown | mit | northbright/keygen | markdown | ## Code Before:
Package keygen is a helper to generate symmetric key(Ex: HMAC).
#### Create Symmetric Algorithm Key for HMAC SHA-256
var err error
size := 256 // Key size = 256 bits.
key := make([]byte, size)
if key, err = keygen.GenSymmetricKey(size); err != nil {
fmt.Printf("GenSymmetricKey(%v) error: %v\n", size, err)
}
// Compare a zero-value byte array to see if key is generated.
fmt.Printf("%v", !bytes.Equal(key, make([]byte, size)))
#### [CLI to generate symmetric key](https://github.com/northbright/keygen/tree/master/cli/gensymmetrickey)
* [gensymmetrickey](https://github.com/northbright/keygen/tree/master/cli/gensymmetrickey)
* Generate symmetric key(Ex: HMAC).
* Usage:
`gensymmetrickey -b=<key size in bits> -o=<output file>`
Ex:
gensymmetrickey -b=512 -o="mykey.dat"
* [Binary Release](https://github.com/northbright/keygen/releases)
#### Documentation
* [API Reference](http://godoc.org/github.com/northbright/keygen)
#### License
* [MIT License](./LICENSE)
## Instruction:
Make it easy to understand what keygen is
## Code After:
keygen is a [Golang](http://golang.org) package which provides helper functions to generate symmetric key(Ex: HMAC).
#### Create Symmetric Algorithm Key for HMAC SHA-256
var err error
size := 256 // Key size = 256 bits.
key := make([]byte, size)
if key, err = keygen.GenSymmetricKey(size); err != nil {
fmt.Printf("GenSymmetricKey(%v) error: %v\n", size, err)
}
// Compare a zero-value byte array to see if key is generated.
fmt.Printf("%v", !bytes.Equal(key, make([]byte, size)))
#### [CLI to generate symmetric key](https://github.com/northbright/keygen/tree/master/cli/gensymmetrickey)
* [gensymmetrickey](https://github.com/northbright/keygen/tree/master/cli/gensymmetrickey)
* Generate symmetric key(Ex: HMAC).
* Usage:
`gensymmetrickey -b=<key size in bits> -o=<output file>`
Ex:
gensymmetrickey -b=512 -o="mykey.dat"
* [Binary Release](https://github.com/northbright/keygen/releases)
#### Documentation
* [API Reference](http://godoc.org/github.com/northbright/keygen)
#### License
* [MIT License](./LICENSE)
|
- Package keygen is a helper to generate symmetric key(Ex: HMAC).
+ keygen is a [Golang](http://golang.org) package which provides helper functions to generate symmetric key(Ex: HMAC).
#### Create Symmetric Algorithm Key for HMAC SHA-256
var err error
size := 256 // Key size = 256 bits.
key := make([]byte, size)
if key, err = keygen.GenSymmetricKey(size); err != nil {
fmt.Printf("GenSymmetricKey(%v) error: %v\n", size, err)
}
// Compare a zero-value byte array to see if key is generated.
fmt.Printf("%v", !bytes.Equal(key, make([]byte, size)))
#### [CLI to generate symmetric key](https://github.com/northbright/keygen/tree/master/cli/gensymmetrickey)
* [gensymmetrickey](https://github.com/northbright/keygen/tree/master/cli/gensymmetrickey)
* Generate symmetric key(Ex: HMAC).
* Usage:
`gensymmetrickey -b=<key size in bits> -o=<output file>`
Ex:
gensymmetrickey -b=512 -o="mykey.dat"
* [Binary Release](https://github.com/northbright/keygen/releases)
#### Documentation
* [API Reference](http://godoc.org/github.com/northbright/keygen)
#### License
* [MIT License](./LICENSE) | 2 | 0.060606 | 1 | 1 |
078d8c8f591b7bb82287c61635ae0e048e2af4ed | CONTRIBUTING.rst | CONTRIBUTING.rst | If you would like to contribute to the development of OpenStack,
you must follow the steps documented at:
https://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/ironic-lib
| If you would like to contribute to the development of OpenStack,
you must follow the steps documented at:
https://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
Bugs should be filed in StoryBoard, not GitHub:
https://storyboard.openstack.org/#!/project/946
| Change launchpad references to storyboard | Change launchpad references to storyboard
Change-Id: I438236e9f46987f985a2e7c103ce1bef88e8fb04
| reStructuredText | apache-2.0 | openstack/ironic-lib | restructuredtext | ## Code Before:
If you would like to contribute to the development of OpenStack,
you must follow the steps documented at:
https://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/ironic-lib
## Instruction:
Change launchpad references to storyboard
Change-Id: I438236e9f46987f985a2e7c103ce1bef88e8fb04
## Code After:
If you would like to contribute to the development of OpenStack,
you must follow the steps documented at:
https://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
Bugs should be filed in StoryBoard, not GitHub:
https://storyboard.openstack.org/#!/project/946
| If you would like to contribute to the development of OpenStack,
you must follow the steps documented at:
https://docs.openstack.org/infra/manual/developers.html#development-workflow
Pull requests submitted through GitHub will be ignored.
- Bugs should be filed on Launchpad, not GitHub:
? ^ ^ ^^^^^^
+ Bugs should be filed in StoryBoard, not GitHub:
? ^ ^^^^^^^ ^
- https://bugs.launchpad.net/ironic-lib
+ https://storyboard.openstack.org/#!/project/946 | 4 | 0.4 | 2 | 2 |
0495f5171afdbf5b067a65f08c502f40c2de320d | README.md | README.md | microsoft.github.io
===================
A simple redirector to point onto the Microsoft Openness Site.
Note, if the Microsoft Open Source project you are looking for isn't here then
we have several other Organizations on GitHub:
- https://github.com/MSOpenTech
- https://github.com/aspnet
- https://github.com/Azure
- https://github.com/OfficeDev
- https://github.com/Reactive-Extensions
- https://github.com/fuselabs
- https://github.com/mspnp
- https://github.com/MicrosoftHPC
- https://github.com/yammer
There are also projects hosted on CodePlex here:
- https://www.codeplex.com/site/users/view/MSOpenTech
- https://www.codeplex.com/site/users/view/Microsoft
| microsoft.github.io
===================
A simple redirector to point onto the Microsoft Openness Site.
Note, if the Microsoft Open Source project you are looking for isn't here then
we have several other Organizations on GitHub:
- https://github.com/MSOpenTech
- https://github.com/aspnet
- https://github.com/Azure
- https://github.com/OfficeDev
- https://github.com/Reactive-Extensions
- https://github.com/fuselabs
- https://github.com/mspnp
- https://github.com/MicrosoftHPC
- https://github.com/yammer
- https://github.com/nuget
There are also projects hosted on CodePlex here:
- https://www.codeplex.com/site/users/view/MSOpenTech
- https://www.codeplex.com/site/users/view/Microsoft
| Add Nuget org to other Microsoft org list. | Add Nuget org to other Microsoft org list. | Markdown | mit | isathish/microsoft.github.io,pythonvietnam/microsoft.github.io,erlend-sh/misoftest,isathish/microsoft.github.io,KnowNo/microsoft.github.io,MaizerGomes/microsoft.github.io,wicky-info/microsoft.github.io,KnowNo/microsoft.github.io,jmarti326/microsoft.github.io,erlend-sh/misoftest,MaizerGomes/microsoft.github.io,jmarti326/microsoft.github.io,pythonvietnam/microsoft.github.io | markdown | ## Code Before:
microsoft.github.io
===================
A simple redirector to point onto the Microsoft Openness Site.
Note, if the Microsoft Open Source project you are looking for isn't here then
we have several other Organizations on GitHub:
- https://github.com/MSOpenTech
- https://github.com/aspnet
- https://github.com/Azure
- https://github.com/OfficeDev
- https://github.com/Reactive-Extensions
- https://github.com/fuselabs
- https://github.com/mspnp
- https://github.com/MicrosoftHPC
- https://github.com/yammer
There are also projects hosted on CodePlex here:
- https://www.codeplex.com/site/users/view/MSOpenTech
- https://www.codeplex.com/site/users/view/Microsoft
## Instruction:
Add Nuget org to other Microsoft org list.
## Code After:
microsoft.github.io
===================
A simple redirector to point onto the Microsoft Openness Site.
Note, if the Microsoft Open Source project you are looking for isn't here then
we have several other Organizations on GitHub:
- https://github.com/MSOpenTech
- https://github.com/aspnet
- https://github.com/Azure
- https://github.com/OfficeDev
- https://github.com/Reactive-Extensions
- https://github.com/fuselabs
- https://github.com/mspnp
- https://github.com/MicrosoftHPC
- https://github.com/yammer
- https://github.com/nuget
There are also projects hosted on CodePlex here:
- https://www.codeplex.com/site/users/view/MSOpenTech
- https://www.codeplex.com/site/users/view/Microsoft
| microsoft.github.io
===================
A simple redirector to point onto the Microsoft Openness Site.
Note, if the Microsoft Open Source project you are looking for isn't here then
we have several other Organizations on GitHub:
- https://github.com/MSOpenTech
- https://github.com/aspnet
- https://github.com/Azure
- https://github.com/OfficeDev
- https://github.com/Reactive-Extensions
- https://github.com/fuselabs
- https://github.com/mspnp
- https://github.com/MicrosoftHPC
- https://github.com/yammer
+ - https://github.com/nuget
There are also projects hosted on CodePlex here:
- https://www.codeplex.com/site/users/view/MSOpenTech
- https://www.codeplex.com/site/users/view/Microsoft | 1 | 0.045455 | 1 | 0 |
fd10a748b7777d57e3de24d2af40bcb0359db213 | bower.json | bower.json | {
"name": "wow-guild-recruit",
"dependencies": {
"angular": "1.4.8",
"angular-moment": "^1.0.0-beta.5",
"angular-ranger": "~0.1.4",
"angular-ui-router": "~1.0.0-alpha.1",
"angular-socket-io": "~0.7.0",
"angular-translate": "~2.11.0",
"bootstrap": "~3.3.6",
"font-awesome": "~4.5.0",
"jquery": "~2.2.2",
"ngInfiniteScroll": "~1.2.2",
"angular-bootstrap": "~1.1.2",
"angular-marked": "~1.0.1",
"angular-sanitize": "~1.5.3",
"angular-resource": "~1.5.3",
"ng-tags-input": "~3.0.0",
"moment-timezone": "~0.5.3",
"isteven-angular-multiselect": "angular-multi-select#~4.0.0",
"ng-scroll-glue": "~2.0.10",
"angular-perfect-scrollbar": "^0.0.4"
},
"resolutions": {
"angular": "1.4.8"
}
}
| {
"name": "wow-guild-recruit",
"dependencies": {
"angular": "1.4.8",
"angular-moment": "^1.0.0-beta.5",
"angular-ranger": "~0.1.4",
"angular-ui-router": "~0.3.0",
"angular-socket-io": "~0.7.0",
"angular-translate": "~2.11.0",
"bootstrap": "~3.3.6",
"font-awesome": "~4.5.0",
"jquery": "~2.2.2",
"ngInfiniteScroll": "~1.2.2",
"angular-bootstrap": "~1.1.2",
"angular-marked": "~1.0.1",
"angular-sanitize": "~1.5.3",
"angular-resource": "~1.5.3",
"ng-tags-input": "~3.0.0",
"moment-timezone": "~0.5.3",
"isteven-angular-multiselect": "angular-multi-select#~4.0.0",
"ng-scroll-glue": "~2.0.10",
"angular-perfect-scrollbar": "^0.0.4"
},
"resolutions": {
"angular": "1.4.8"
}
}
| Fix Google Analytics bug - ui router version bug | Fix Google Analytics bug - ui router version bug
| JSON | agpl-3.0 | warcraftlfg/warcraft-lfg,warcraftlfg/warcraft-lfg | json | ## Code Before:
{
"name": "wow-guild-recruit",
"dependencies": {
"angular": "1.4.8",
"angular-moment": "^1.0.0-beta.5",
"angular-ranger": "~0.1.4",
"angular-ui-router": "~1.0.0-alpha.1",
"angular-socket-io": "~0.7.0",
"angular-translate": "~2.11.0",
"bootstrap": "~3.3.6",
"font-awesome": "~4.5.0",
"jquery": "~2.2.2",
"ngInfiniteScroll": "~1.2.2",
"angular-bootstrap": "~1.1.2",
"angular-marked": "~1.0.1",
"angular-sanitize": "~1.5.3",
"angular-resource": "~1.5.3",
"ng-tags-input": "~3.0.0",
"moment-timezone": "~0.5.3",
"isteven-angular-multiselect": "angular-multi-select#~4.0.0",
"ng-scroll-glue": "~2.0.10",
"angular-perfect-scrollbar": "^0.0.4"
},
"resolutions": {
"angular": "1.4.8"
}
}
## Instruction:
Fix Google Analytics bug - ui router version bug
## Code After:
{
"name": "wow-guild-recruit",
"dependencies": {
"angular": "1.4.8",
"angular-moment": "^1.0.0-beta.5",
"angular-ranger": "~0.1.4",
"angular-ui-router": "~0.3.0",
"angular-socket-io": "~0.7.0",
"angular-translate": "~2.11.0",
"bootstrap": "~3.3.6",
"font-awesome": "~4.5.0",
"jquery": "~2.2.2",
"ngInfiniteScroll": "~1.2.2",
"angular-bootstrap": "~1.1.2",
"angular-marked": "~1.0.1",
"angular-sanitize": "~1.5.3",
"angular-resource": "~1.5.3",
"ng-tags-input": "~3.0.0",
"moment-timezone": "~0.5.3",
"isteven-angular-multiselect": "angular-multi-select#~4.0.0",
"ng-scroll-glue": "~2.0.10",
"angular-perfect-scrollbar": "^0.0.4"
},
"resolutions": {
"angular": "1.4.8"
}
}
| {
"name": "wow-guild-recruit",
"dependencies": {
"angular": "1.4.8",
"angular-moment": "^1.0.0-beta.5",
"angular-ranger": "~0.1.4",
- "angular-ui-router": "~1.0.0-alpha.1",
? ^ ----------
+ "angular-ui-router": "~0.3.0",
? ^^^
"angular-socket-io": "~0.7.0",
"angular-translate": "~2.11.0",
"bootstrap": "~3.3.6",
"font-awesome": "~4.5.0",
"jquery": "~2.2.2",
"ngInfiniteScroll": "~1.2.2",
"angular-bootstrap": "~1.1.2",
"angular-marked": "~1.0.1",
"angular-sanitize": "~1.5.3",
"angular-resource": "~1.5.3",
"ng-tags-input": "~3.0.0",
"moment-timezone": "~0.5.3",
"isteven-angular-multiselect": "angular-multi-select#~4.0.0",
"ng-scroll-glue": "~2.0.10",
"angular-perfect-scrollbar": "^0.0.4"
},
"resolutions": {
"angular": "1.4.8"
}
} | 2 | 0.074074 | 1 | 1 |
7848ca7714e2e23e3098f32ed64233037b11290e | pytest.ini | pytest.ini | [pytest]
addopts = --pep8 -rsx --cov src/purkinje --cov-report term-missing
#addopts = --pep8 -rsx --cov src/purkinje --cov-report html
norecursedirs = venv bower_components build testdata | [pytest]
addopts = --pep8 -rsx --cov src/purkinje --cov-report term-missing --cov-report html
norecursedirs = venv bower_components build testdata | Create terminal and HTML coverage report | Create terminal and HTML coverage report
| INI | mit | bbiskup/purkinje,bbiskup/purkinje,bbiskup/purkinje,bbiskup/purkinje | ini | ## Code Before:
[pytest]
addopts = --pep8 -rsx --cov src/purkinje --cov-report term-missing
#addopts = --pep8 -rsx --cov src/purkinje --cov-report html
norecursedirs = venv bower_components build testdata
## Instruction:
Create terminal and HTML coverage report
## Code After:
[pytest]
addopts = --pep8 -rsx --cov src/purkinje --cov-report term-missing --cov-report html
norecursedirs = venv bower_components build testdata | [pytest]
- addopts = --pep8 -rsx --cov src/purkinje --cov-report term-missing
+ addopts = --pep8 -rsx --cov src/purkinje --cov-report term-missing --cov-report html
? ++++++++++++++++++
- #addopts = --pep8 -rsx --cov src/purkinje --cov-report html
norecursedirs = venv bower_components build testdata | 3 | 0.75 | 1 | 2 |
2f35cc1dad8ef23ebb2f0cfe4a0a919aa7936478 | posh/Settings/PSReadLine.ps1 | posh/Settings/PSReadLine.ps1 | if (Get-Module -Name PSReadLine -ListAvailable) {
if ($Host.Name -eq 'ConsoleHost') {
Write-Verbose -Message '[dotfiles] Loading PSReadLine settings ...'
Import-Module -Name PSReadLine
# Move the cursor to end of line while cycling through history
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
# Search the command history based on any already entered text
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
# Menu style command completion
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
} else {
Write-Verbose -Message '[dotfiles] Skipping PSReadLine settings as host is not ConsoleHost.'
}
} else {
Write-Verbose -Message '[dotfiles] Skipping PSReadLine settings as module not found.'
}
| if (Get-Module -Name PSReadLine -ListAvailable) {
if ($Host.Name -eq 'ConsoleHost') {
Write-Verbose -Message '[dotfiles] Loading PSReadLine settings ...'
Import-Module -Name PSReadLine
# Move the cursor to end of line while cycling through history
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
# Search the command history based on any already entered text
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
# Menu style command completion
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
# Insert paired parenthesis on line or selection
# Via: https://github.com/lzybkr/PSReadLine/blob/master/PSReadLine/SamplePSReadLineProfile.ps1
Set-PSReadlineKeyHandler `
-Chord 'Alt+(' `
-BriefDescription InsertPairedParenthesis `
-LongDescription 'Insert parenthesis around the selection or the entire line if no text is selected' `
-ScriptBlock {
Param($Key, $Arg)
$Line = $null
$Cursor = $null
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$Line, [ref]$Cursor)
$SelectionStart = $null
$SelectionLength = $null
[Microsoft.PowerShell.PSConsoleReadLine]::GetSelectionState([ref]$SelectionStart, [ref]$SelectionLength)
if ($SelectionStart -ne -1) {
$SelectionText = $Line.SubString($SelectionStart, $SelectionLength)
[Microsoft.PowerShell.PSConsoleReadLine]::Replace($SelectionStart, $SelectionLength, '({0})' -f $SelectionText)
[Microsoft.PowerShell.PSConsoleReadLine]::SetCursorPosition($SelectionStart + $SelectionLength + 2)
} else {
[Microsoft.PowerShell.PSConsoleReadLine]::Replace(0, $Line.Length, '({0})' -f $Line)
[Microsoft.PowerShell.PSConsoleReadLine]::EndOfLine()
}
}
} else {
Write-Verbose -Message '[dotfiles] Skipping PSReadLine settings as host is not ConsoleHost.'
}
} else {
Write-Verbose -Message '[dotfiles] Skipping PSReadLine settings as module not found.'
}
| Add PSReadline handler for inserting paired parenthesis | Add PSReadline handler for inserting paired parenthesis
| PowerShell | unlicense | ralish/dotfiles,ralish/dotfiles,ralish/dotfiles | powershell | ## Code Before:
if (Get-Module -Name PSReadLine -ListAvailable) {
if ($Host.Name -eq 'ConsoleHost') {
Write-Verbose -Message '[dotfiles] Loading PSReadLine settings ...'
Import-Module -Name PSReadLine
# Move the cursor to end of line while cycling through history
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
# Search the command history based on any already entered text
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
# Menu style command completion
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
} else {
Write-Verbose -Message '[dotfiles] Skipping PSReadLine settings as host is not ConsoleHost.'
}
} else {
Write-Verbose -Message '[dotfiles] Skipping PSReadLine settings as module not found.'
}
## Instruction:
Add PSReadline handler for inserting paired parenthesis
## Code After:
if (Get-Module -Name PSReadLine -ListAvailable) {
if ($Host.Name -eq 'ConsoleHost') {
Write-Verbose -Message '[dotfiles] Loading PSReadLine settings ...'
Import-Module -Name PSReadLine
# Move the cursor to end of line while cycling through history
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
# Search the command history based on any already entered text
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
# Menu style command completion
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
# Insert paired parenthesis on line or selection
# Via: https://github.com/lzybkr/PSReadLine/blob/master/PSReadLine/SamplePSReadLineProfile.ps1
Set-PSReadlineKeyHandler `
-Chord 'Alt+(' `
-BriefDescription InsertPairedParenthesis `
-LongDescription 'Insert parenthesis around the selection or the entire line if no text is selected' `
-ScriptBlock {
Param($Key, $Arg)
$Line = $null
$Cursor = $null
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$Line, [ref]$Cursor)
$SelectionStart = $null
$SelectionLength = $null
[Microsoft.PowerShell.PSConsoleReadLine]::GetSelectionState([ref]$SelectionStart, [ref]$SelectionLength)
if ($SelectionStart -ne -1) {
$SelectionText = $Line.SubString($SelectionStart, $SelectionLength)
[Microsoft.PowerShell.PSConsoleReadLine]::Replace($SelectionStart, $SelectionLength, '({0})' -f $SelectionText)
[Microsoft.PowerShell.PSConsoleReadLine]::SetCursorPosition($SelectionStart + $SelectionLength + 2)
} else {
[Microsoft.PowerShell.PSConsoleReadLine]::Replace(0, $Line.Length, '({0})' -f $Line)
[Microsoft.PowerShell.PSConsoleReadLine]::EndOfLine()
}
}
} else {
Write-Verbose -Message '[dotfiles] Skipping PSReadLine settings as host is not ConsoleHost.'
}
} else {
Write-Verbose -Message '[dotfiles] Skipping PSReadLine settings as module not found.'
}
| if (Get-Module -Name PSReadLine -ListAvailable) {
if ($Host.Name -eq 'ConsoleHost') {
Write-Verbose -Message '[dotfiles] Loading PSReadLine settings ...'
Import-Module -Name PSReadLine
# Move the cursor to end of line while cycling through history
Set-PSReadLineOption -HistorySearchCursorMovesToEnd
# Search the command history based on any already entered text
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
# Menu style command completion
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete
+
+ # Insert paired parenthesis on line or selection
+ # Via: https://github.com/lzybkr/PSReadLine/blob/master/PSReadLine/SamplePSReadLineProfile.ps1
+ Set-PSReadlineKeyHandler `
+ -Chord 'Alt+(' `
+ -BriefDescription InsertPairedParenthesis `
+ -LongDescription 'Insert parenthesis around the selection or the entire line if no text is selected' `
+ -ScriptBlock {
+ Param($Key, $Arg)
+
+ $Line = $null
+ $Cursor = $null
+ [Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$Line, [ref]$Cursor)
+
+ $SelectionStart = $null
+ $SelectionLength = $null
+ [Microsoft.PowerShell.PSConsoleReadLine]::GetSelectionState([ref]$SelectionStart, [ref]$SelectionLength)
+
+ if ($SelectionStart -ne -1) {
+ $SelectionText = $Line.SubString($SelectionStart, $SelectionLength)
+ [Microsoft.PowerShell.PSConsoleReadLine]::Replace($SelectionStart, $SelectionLength, '({0})' -f $SelectionText)
+ [Microsoft.PowerShell.PSConsoleReadLine]::SetCursorPosition($SelectionStart + $SelectionLength + 2)
+ } else {
+ [Microsoft.PowerShell.PSConsoleReadLine]::Replace(0, $Line.Length, '({0})' -f $Line)
+ [Microsoft.PowerShell.PSConsoleReadLine]::EndOfLine()
+ }
+ }
} else {
Write-Verbose -Message '[dotfiles] Skipping PSReadLine settings as host is not ConsoleHost.'
}
} else {
Write-Verbose -Message '[dotfiles] Skipping PSReadLine settings as module not found.'
} | 27 | 1.35 | 27 | 0 |
7f3a9dd375f30906ff06b51b20d2a964f9e8a949 | _protected/app/system/modules/payment/views/base/tpl/main/error.tpl | _protected/app/system/modules/payment/views/base/tpl/main/error.tpl | <div class="center">
<p class="red bold">
{lang 'The purchase failed. The payment status of your purchase might be just pending, in progress or invalid.'}
</p>
<p>
{lang 'If the problem persists, please <a href="%0%">contact us</a>.', Framework\Mvc\Router\Uri::get('contact', 'contact', 'index')}
</p>
</div>
| <div class="center">
<p class="red bold">
{lang 'The purchase failed. The payment status of your purchase might be just pending, in progress or invalid.'}
</p>
<p>
{lang 'If the problem persists, please contact your payment provider or <a href="%0%">contact us</a>.', Framework\Mvc\Router\Uri::get('contact', 'contact', 'index')}
</p>
</div>
| Add more details into payment failure message | Add more details into payment failure message
| Smarty | mit | pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS,pH7Software/pH7-Social-Dating-CMS | smarty | ## Code Before:
<div class="center">
<p class="red bold">
{lang 'The purchase failed. The payment status of your purchase might be just pending, in progress or invalid.'}
</p>
<p>
{lang 'If the problem persists, please <a href="%0%">contact us</a>.', Framework\Mvc\Router\Uri::get('contact', 'contact', 'index')}
</p>
</div>
## Instruction:
Add more details into payment failure message
## Code After:
<div class="center">
<p class="red bold">
{lang 'The purchase failed. The payment status of your purchase might be just pending, in progress or invalid.'}
</p>
<p>
{lang 'If the problem persists, please contact your payment provider or <a href="%0%">contact us</a>.', Framework\Mvc\Router\Uri::get('contact', 'contact', 'index')}
</p>
</div>
| <div class="center">
<p class="red bold">
{lang 'The purchase failed. The payment status of your purchase might be just pending, in progress or invalid.'}
</p>
<p>
- {lang 'If the problem persists, please <a href="%0%">contact us</a>.', Framework\Mvc\Router\Uri::get('contact', 'contact', 'index')}
+ {lang 'If the problem persists, please contact your payment provider or <a href="%0%">contact us</a>.', Framework\Mvc\Router\Uri::get('contact', 'contact', 'index')}
? +++++++++++++++++++++++++++++++++
</p>
</div> | 2 | 0.222222 | 1 | 1 |
5118050141ea1d1c98f888185161330c6dc23a6d | .travis.yml | .travis.yml | language: python
python:
- "2.7"
jdk:
- openjdk6
install: pip install -r REQUIREMENTS --use-mirrors && pip install Fabric==1.4.0 --use-mirrors
#script: python manage.py harvest --apps=storybase_user --settings=settings.travis
script: python manage.py test storybase_messaging storybase_asset storybase_geo storybase_help storybase_story storybase_user storybase_taxonomy --settings=settings.travis
postgres:
adapter: postgresql
database: atlas_travis
username: postgres
before_install: ./scripts/ci_before_install.sh
before_script: ./scripts/ci_before_script.sh
branches:
only:
- master
- develop
| language: python
python:
- "2.7"
jdk:
- openjdk6
install: pip install -r REQUIREMENTS --use-mirrors && pip install Fabric==1.4.0 --use-mirrors
script: python manage.py test storybase_messaging storybase_asset storybase_geo storybase_help storybase_story storybase_user storybase_taxonomy cmsplugin_storybase --settings=settings.travis
postgres:
adapter: postgresql
database: atlas_travis
username: postgres
before_install: ./scripts/ci_before_install.sh
before_script: ./scripts/ci_before_script.sh
branches:
only:
- master
- develop
| Add cmsplugin_storybase tests to Travis run | Add cmsplugin_storybase tests to Travis run
| YAML | mit | denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase | yaml | ## Code Before:
language: python
python:
- "2.7"
jdk:
- openjdk6
install: pip install -r REQUIREMENTS --use-mirrors && pip install Fabric==1.4.0 --use-mirrors
#script: python manage.py harvest --apps=storybase_user --settings=settings.travis
script: python manage.py test storybase_messaging storybase_asset storybase_geo storybase_help storybase_story storybase_user storybase_taxonomy --settings=settings.travis
postgres:
adapter: postgresql
database: atlas_travis
username: postgres
before_install: ./scripts/ci_before_install.sh
before_script: ./scripts/ci_before_script.sh
branches:
only:
- master
- develop
## Instruction:
Add cmsplugin_storybase tests to Travis run
## Code After:
language: python
python:
- "2.7"
jdk:
- openjdk6
install: pip install -r REQUIREMENTS --use-mirrors && pip install Fabric==1.4.0 --use-mirrors
script: python manage.py test storybase_messaging storybase_asset storybase_geo storybase_help storybase_story storybase_user storybase_taxonomy cmsplugin_storybase --settings=settings.travis
postgres:
adapter: postgresql
database: atlas_travis
username: postgres
before_install: ./scripts/ci_before_install.sh
before_script: ./scripts/ci_before_script.sh
branches:
only:
- master
- develop
| language: python
python:
- "2.7"
jdk:
- openjdk6
install: pip install -r REQUIREMENTS --use-mirrors && pip install Fabric==1.4.0 --use-mirrors
- #script: python manage.py harvest --apps=storybase_user --settings=settings.travis
- script: python manage.py test storybase_messaging storybase_asset storybase_geo storybase_help storybase_story storybase_user storybase_taxonomy --settings=settings.travis
+ script: python manage.py test storybase_messaging storybase_asset storybase_geo storybase_help storybase_story storybase_user storybase_taxonomy cmsplugin_storybase --settings=settings.travis
? ++++++++++++++++++++
postgres:
adapter: postgresql
database: atlas_travis
username: postgres
before_install: ./scripts/ci_before_install.sh
before_script: ./scripts/ci_before_script.sh
branches:
only:
- master
- develop | 3 | 0.166667 | 1 | 2 |
9bcabeb64d3ffe31ff427564361a6222b7887b97 | src/Tgstation.Server.Host/appsettings.Docker.json | src/Tgstation.Server.Host/appsettings.Docker.json | {
"General": {
"LogFileDirectory": "/tgs_logs",
"MinimumPasswordLength": 15,
"GitHubAccessToken": null
},
"Database": {
"DatabaseType": "SqlServer or MySQL or MariaDB",
"ConnectionString": "<Your connection string>",
"MySqlServerVersion": "<Set if using MySQL/MariaDB i.e. 10.2.7>"
}
}
| {
"General": {
"LogFileDirectory": "/tgs_logs",
"MinimumPasswordLength": 15,
"GitHubAccessToken": null
},
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://localhost:5000"
}
}
},
"Database": {
"DatabaseType": "SqlServer or MySQL or MariaDB",
"ConnectionString": "<Your connection string>",
"MySqlServerVersion": "<Set if using MySQL/MariaDB i.e. 10.2.7>"
}
}
| Add kestrel config to docker json | Add kestrel config to docker json | JSON | agpl-3.0 | tgstation/tgstation-server,Cyberboss/tgstation-server,Cyberboss/tgstation-server,tgstation/tgstation-server,tgstation/tgstation-server-tools | json | ## Code Before:
{
"General": {
"LogFileDirectory": "/tgs_logs",
"MinimumPasswordLength": 15,
"GitHubAccessToken": null
},
"Database": {
"DatabaseType": "SqlServer or MySQL or MariaDB",
"ConnectionString": "<Your connection string>",
"MySqlServerVersion": "<Set if using MySQL/MariaDB i.e. 10.2.7>"
}
}
## Instruction:
Add kestrel config to docker json
## Code After:
{
"General": {
"LogFileDirectory": "/tgs_logs",
"MinimumPasswordLength": 15,
"GitHubAccessToken": null
},
"Kestrel": {
"Endpoints": {
"Http": {
"Url": "http://localhost:5000"
}
}
},
"Database": {
"DatabaseType": "SqlServer or MySQL or MariaDB",
"ConnectionString": "<Your connection string>",
"MySqlServerVersion": "<Set if using MySQL/MariaDB i.e. 10.2.7>"
}
}
| {
"General": {
"LogFileDirectory": "/tgs_logs",
"MinimumPasswordLength": 15,
"GitHubAccessToken": null
+ },
+ "Kestrel": {
+ "Endpoints": {
+ "Http": {
+ "Url": "http://localhost:5000"
+ }
+ }
},
"Database": {
"DatabaseType": "SqlServer or MySQL or MariaDB",
"ConnectionString": "<Your connection string>",
"MySqlServerVersion": "<Set if using MySQL/MariaDB i.e. 10.2.7>"
}
} | 7 | 0.583333 | 7 | 0 |
2e040a249bed30d0e844c56401f03ba4cdf49e18 | froide_campaign/templates/froide_campaign/plugins/campaign_map.html | froide_campaign/templates/froide_campaign/plugins/campaign_map.html | {% load static %}
{% load sekizai_tags %}
<campaign-map
id="campaign-map-component"
:config="{{ config }}"
>
</campaign-map>
{% addtoblock 'js' %}
<script src="{% static 'js/common.js' %}" charset="utf-8"></script>
<script src="{% static 'js/campaign_map.js' %}" charset="utf-8"></script>
{% endaddtoblock %} | {% load static %}
{% load sekizai_tags %}
<campaign-map
id="campaign-map-component"
:config="{{ config }}"
>
</campaign-map>
{% addtoblock 'js' %}
<script src="{% static 'js/common.js' %}" charset="utf-8"></script>
{% endaddtoblock %}
{% addtoblock 'js' %}
<script src="{% static 'js/campaign_map.js' %}" charset="utf-8"></script>
{% endaddtoblock %}
{% addtoblock 'css' %}
<link rel="stylesheet" href="{% static 'css/common.css' %}">
{% endaddtoblock %}
{% addtoblock 'css' %}
<link rel="stylesheet" href="{% static 'css/campaign_map.css' %}">
{% endaddtoblock %}
| Add css to campaign map, split addtoblocks | Add css to campaign map, split addtoblocks | HTML | mit | okfde/froide-campaign,okfde/froide-campaign,okfde/froide-campaign | html | ## Code Before:
{% load static %}
{% load sekizai_tags %}
<campaign-map
id="campaign-map-component"
:config="{{ config }}"
>
</campaign-map>
{% addtoblock 'js' %}
<script src="{% static 'js/common.js' %}" charset="utf-8"></script>
<script src="{% static 'js/campaign_map.js' %}" charset="utf-8"></script>
{% endaddtoblock %}
## Instruction:
Add css to campaign map, split addtoblocks
## Code After:
{% load static %}
{% load sekizai_tags %}
<campaign-map
id="campaign-map-component"
:config="{{ config }}"
>
</campaign-map>
{% addtoblock 'js' %}
<script src="{% static 'js/common.js' %}" charset="utf-8"></script>
{% endaddtoblock %}
{% addtoblock 'js' %}
<script src="{% static 'js/campaign_map.js' %}" charset="utf-8"></script>
{% endaddtoblock %}
{% addtoblock 'css' %}
<link rel="stylesheet" href="{% static 'css/common.css' %}">
{% endaddtoblock %}
{% addtoblock 'css' %}
<link rel="stylesheet" href="{% static 'css/campaign_map.css' %}">
{% endaddtoblock %}
| {% load static %}
{% load sekizai_tags %}
<campaign-map
id="campaign-map-component"
:config="{{ config }}"
>
</campaign-map>
{% addtoblock 'js' %}
<script src="{% static 'js/common.js' %}" charset="utf-8"></script>
- <script src="{% static 'js/campaign_map.js' %}" charset="utf-8"></script>
{% endaddtoblock %}
+ {% addtoblock 'js' %}
+ <script src="{% static 'js/campaign_map.js' %}" charset="utf-8"></script>
+ {% endaddtoblock %}
+
+ {% addtoblock 'css' %}
+ <link rel="stylesheet" href="{% static 'css/common.css' %}">
+ {% endaddtoblock %}
+ {% addtoblock 'css' %}
+ <link rel="stylesheet" href="{% static 'css/campaign_map.css' %}">
+ {% endaddtoblock %} | 11 | 0.846154 | 10 | 1 |
76a41203854506ef38cb1c6d327f2b207a284248 | lib/lyricfy/providers/metro_lyrics.rb | lib/lyricfy/providers/metro_lyrics.rb | module Lyricfy
class MetroLyrics < Lyricfy::LyricProvider
include URIHelper
def initialize(parameters)
super(parameters)
self.base_url = "http://m.metrolyrics.com/"
self.url = URI.escape(self.base_url + format_parameters)
end
def search
begin
html = Nokogiri::HTML(open(url))
lyricbox = html.css('p.lyricsbody').first
# Removing ads
if ads = lyricbox.css('.lyrics-ringtone')
ads.each do |matcher|
matcher.remove
end
end
if credits = lyricbox.css('span')
credits.each do |span|
span.remove
end
end
lyricbox.children.to_html
rescue OpenURI::HTTPError
nil
end
end
private
def prepare_parameter(parameter)
parameter.downcase.split(' ').map { |w| w.gsub(/\W/, '') }.join('-')
end
def format_parameters
artist_name = prepare_parameter(self.parameters[:artist_name])
song_name = prepare_parameter(self.parameters[:song_name])
"#{song_name}-lyrics-#{artist_name}"
end
end
end | module Lyricfy
class MetroLyrics < Lyricfy::LyricProvider
include URIHelper
def initialize(parameters)
super(parameters)
self.base_url = "http://m.metrolyrics.com/"
self.url = URI.escape(self.base_url + format_parameters)
end
def search
if data = super
html = Nokogiri::HTML(data)
container = html.css('p.gnlyricsbody').first
elements = container.children.to_a
paragraphs = elements.select { |ele| ele.text? }
paragraphs.map! { |paragraph| paragraph.text.strip.chomp if paragraph.text != "\n" }.reject! { |ele| ele.empty? }
end
end
private
def prepare_parameter(parameter)
parameter.downcase.split(' ').map { |w| w.gsub(/\W/, '') }.join('-')
end
def format_parameters
artist_name = prepare_parameter(self.parameters[:artist_name])
song_name = prepare_parameter(self.parameters[:song_name])
"#{song_name}-lyrics-#{artist_name}"
end
end
end | Change Lyricfy::MetroLyrics to pass tests | Change Lyricfy::MetroLyrics to pass tests
| Ruby | mit | javichito/Lyricfy | ruby | ## Code Before:
module Lyricfy
class MetroLyrics < Lyricfy::LyricProvider
include URIHelper
def initialize(parameters)
super(parameters)
self.base_url = "http://m.metrolyrics.com/"
self.url = URI.escape(self.base_url + format_parameters)
end
def search
begin
html = Nokogiri::HTML(open(url))
lyricbox = html.css('p.lyricsbody').first
# Removing ads
if ads = lyricbox.css('.lyrics-ringtone')
ads.each do |matcher|
matcher.remove
end
end
if credits = lyricbox.css('span')
credits.each do |span|
span.remove
end
end
lyricbox.children.to_html
rescue OpenURI::HTTPError
nil
end
end
private
def prepare_parameter(parameter)
parameter.downcase.split(' ').map { |w| w.gsub(/\W/, '') }.join('-')
end
def format_parameters
artist_name = prepare_parameter(self.parameters[:artist_name])
song_name = prepare_parameter(self.parameters[:song_name])
"#{song_name}-lyrics-#{artist_name}"
end
end
end
## Instruction:
Change Lyricfy::MetroLyrics to pass tests
## Code After:
module Lyricfy
class MetroLyrics < Lyricfy::LyricProvider
include URIHelper
def initialize(parameters)
super(parameters)
self.base_url = "http://m.metrolyrics.com/"
self.url = URI.escape(self.base_url + format_parameters)
end
def search
if data = super
html = Nokogiri::HTML(data)
container = html.css('p.gnlyricsbody').first
elements = container.children.to_a
paragraphs = elements.select { |ele| ele.text? }
paragraphs.map! { |paragraph| paragraph.text.strip.chomp if paragraph.text != "\n" }.reject! { |ele| ele.empty? }
end
end
private
def prepare_parameter(parameter)
parameter.downcase.split(' ').map { |w| w.gsub(/\W/, '') }.join('-')
end
def format_parameters
artist_name = prepare_parameter(self.parameters[:artist_name])
song_name = prepare_parameter(self.parameters[:song_name])
"#{song_name}-lyrics-#{artist_name}"
end
end
end | module Lyricfy
class MetroLyrics < Lyricfy::LyricProvider
include URIHelper
def initialize(parameters)
super(parameters)
self.base_url = "http://m.metrolyrics.com/"
self.url = URI.escape(self.base_url + format_parameters)
end
def search
- begin
+ if data = super
- html = Nokogiri::HTML(open(url))
? ^^^^^^^^ -
+ html = Nokogiri::HTML(data)
? ^^^^
- lyricbox = html.css('p.lyricsbody').first
? ^^ -----
+ container = html.css('p.gnlyricsbody').first
? ^^^^^^^^ ++
+ elements = container.children.to_a
+ paragraphs = elements.select { |ele| ele.text? }
+ paragraphs.map! { |paragraph| paragraph.text.strip.chomp if paragraph.text != "\n" }.reject! { |ele| ele.empty? }
-
- # Removing ads
- if ads = lyricbox.css('.lyrics-ringtone')
- ads.each do |matcher|
- matcher.remove
- end
- end
-
- if credits = lyricbox.css('span')
- credits.each do |span|
- span.remove
- end
- end
-
- lyricbox.children.to_html
- rescue OpenURI::HTTPError
- nil
end
end
private
def prepare_parameter(parameter)
parameter.downcase.split(' ').map { |w| w.gsub(/\W/, '') }.join('-')
end
def format_parameters
artist_name = prepare_parameter(self.parameters[:artist_name])
song_name = prepare_parameter(self.parameters[:song_name])
"#{song_name}-lyrics-#{artist_name}"
end
end
end | 26 | 0.565217 | 6 | 20 |
7aff5878747c000c5868e3a5ddd8b205d74770b0 | thinc/extra/load_nlp.py | thinc/extra/load_nlp.py | import numpy
try:
import spacy
except ImportError:
spacy = None
SPACY_MODELS = {}
VECTORS = {}
def get_spacy(lang, **kwargs):
global SPACY_MODELS
if spacy is None:
raise ImportError("Could not import spacy. Is it installed?")
if lang not in SPACY_MODELS:
SPACY_MODELS[lang] = spacy.load(lang, **kwargs)
return SPACY_MODELS[lang]
def get_vectors(ops, lang):
global VECTORS
key = (ops.device, lang)
if key not in VECTORS:
nlp = get_spacy(lang)
nV = max(lex.rank for lex in nlp.vocab)+1
nM = nlp.vocab.vectors_length
vectors = numpy.zeros((nV, nM), dtype='float32')
for lex in nlp.vocab:
if lex.has_vector:
vectors[lex.rank] = lex.vector / lex.vector_norm
VECTORS[key] = ops.asarray(vectors)
return VECTORS[key]
| import numpy
SPACY_MODELS = {}
VECTORS = {}
def get_spacy(lang, **kwargs):
global SPACY_MODELS
import spacy
if lang not in SPACY_MODELS:
SPACY_MODELS[lang] = spacy.load(lang, **kwargs)
return SPACY_MODELS[lang]
def get_vectors(ops, lang):
global VECTORS
key = (ops.device, lang)
if key not in VECTORS:
nlp = get_spacy(lang)
nV = max(lex.rank for lex in nlp.vocab)+1
nM = nlp.vocab.vectors_length
vectors = numpy.zeros((nV, nM), dtype='float32')
for lex in nlp.vocab:
if lex.has_vector:
vectors[lex.rank] = lex.vector / lex.vector_norm
VECTORS[key] = ops.asarray(vectors)
return VECTORS[key]
| Improve import of spaCy, to prevent cycles | Improve import of spaCy, to prevent cycles
| Python | mit | explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc | python | ## Code Before:
import numpy
try:
import spacy
except ImportError:
spacy = None
SPACY_MODELS = {}
VECTORS = {}
def get_spacy(lang, **kwargs):
global SPACY_MODELS
if spacy is None:
raise ImportError("Could not import spacy. Is it installed?")
if lang not in SPACY_MODELS:
SPACY_MODELS[lang] = spacy.load(lang, **kwargs)
return SPACY_MODELS[lang]
def get_vectors(ops, lang):
global VECTORS
key = (ops.device, lang)
if key not in VECTORS:
nlp = get_spacy(lang)
nV = max(lex.rank for lex in nlp.vocab)+1
nM = nlp.vocab.vectors_length
vectors = numpy.zeros((nV, nM), dtype='float32')
for lex in nlp.vocab:
if lex.has_vector:
vectors[lex.rank] = lex.vector / lex.vector_norm
VECTORS[key] = ops.asarray(vectors)
return VECTORS[key]
## Instruction:
Improve import of spaCy, to prevent cycles
## Code After:
import numpy
SPACY_MODELS = {}
VECTORS = {}
def get_spacy(lang, **kwargs):
global SPACY_MODELS
import spacy
if lang not in SPACY_MODELS:
SPACY_MODELS[lang] = spacy.load(lang, **kwargs)
return SPACY_MODELS[lang]
def get_vectors(ops, lang):
global VECTORS
key = (ops.device, lang)
if key not in VECTORS:
nlp = get_spacy(lang)
nV = max(lex.rank for lex in nlp.vocab)+1
nM = nlp.vocab.vectors_length
vectors = numpy.zeros((nV, nM), dtype='float32')
for lex in nlp.vocab:
if lex.has_vector:
vectors[lex.rank] = lex.vector / lex.vector_norm
VECTORS[key] = ops.asarray(vectors)
return VECTORS[key]
| import numpy
- try:
- import spacy
- except ImportError:
- spacy = None
SPACY_MODELS = {}
VECTORS = {}
def get_spacy(lang, **kwargs):
global SPACY_MODELS
+ import spacy
- if spacy is None:
- raise ImportError("Could not import spacy. Is it installed?")
if lang not in SPACY_MODELS:
SPACY_MODELS[lang] = spacy.load(lang, **kwargs)
return SPACY_MODELS[lang]
def get_vectors(ops, lang):
global VECTORS
key = (ops.device, lang)
if key not in VECTORS:
nlp = get_spacy(lang)
nV = max(lex.rank for lex in nlp.vocab)+1
nM = nlp.vocab.vectors_length
vectors = numpy.zeros((nV, nM), dtype='float32')
for lex in nlp.vocab:
if lex.has_vector:
vectors[lex.rank] = lex.vector / lex.vector_norm
VECTORS[key] = ops.asarray(vectors)
return VECTORS[key] | 7 | 0.21875 | 1 | 6 |
61c2cbbdd7f785690c6d8ec8df45cf5c0c92e914 | Union/Union.swift | Union/Union.swift | //
// Union.swift
// Union
//
// Created by Hirohisa Kawasaki on 2/19/15.
// Copyright (c) 2015 Hirohisa Kawasaki. All rights reserved.
//
import UIKit
public enum Error: ErrorType {
case AnimationPreviousNotIncludedInAnimations
}
public protocol Delegate {
func animationsBeforeTransitionTo(viewController: UIViewController) -> [Animation]
func animationsDuringTransitionFrom(viewController: UIViewController) -> [Animation]
}
extension Delegate {
func animationsBeforeTransitionTo(viewController: UIViewController) -> [Animation] {
return []
}
func animationsDuringTransitionFrom(viewController: UIViewController) -> [Animation] {
return []
}
} | //
// Union.swift
// Union
//
// Created by Hirohisa Kawasaki on 2/19/15.
// Copyright (c) 2015 Hirohisa Kawasaki. All rights reserved.
//
import UIKit
public enum Error: ErrorType {
case AnimationPreviousNotIncludedInAnimations
}
public protocol Delegate {
func animationsBeforeTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation]
func animationsDuringTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation]
}
extension Delegate {
func animationsBeforeTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation] {
return []
}
func animationsDuringTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation] {
return []
}
} | Add arguments from and to viewControllers in Delegate | Add arguments from and to viewControllers in Delegate
| Swift | mit | TransitionKit/Union,TransitionKit/Union | swift | ## Code Before:
//
// Union.swift
// Union
//
// Created by Hirohisa Kawasaki on 2/19/15.
// Copyright (c) 2015 Hirohisa Kawasaki. All rights reserved.
//
import UIKit
public enum Error: ErrorType {
case AnimationPreviousNotIncludedInAnimations
}
public protocol Delegate {
func animationsBeforeTransitionTo(viewController: UIViewController) -> [Animation]
func animationsDuringTransitionFrom(viewController: UIViewController) -> [Animation]
}
extension Delegate {
func animationsBeforeTransitionTo(viewController: UIViewController) -> [Animation] {
return []
}
func animationsDuringTransitionFrom(viewController: UIViewController) -> [Animation] {
return []
}
}
## Instruction:
Add arguments from and to viewControllers in Delegate
## Code After:
//
// Union.swift
// Union
//
// Created by Hirohisa Kawasaki on 2/19/15.
// Copyright (c) 2015 Hirohisa Kawasaki. All rights reserved.
//
import UIKit
public enum Error: ErrorType {
case AnimationPreviousNotIncludedInAnimations
}
public protocol Delegate {
func animationsBeforeTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation]
func animationsDuringTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation]
}
extension Delegate {
func animationsBeforeTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation] {
return []
}
func animationsDuringTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation] {
return []
}
} | //
// Union.swift
// Union
//
// Created by Hirohisa Kawasaki on 2/19/15.
// Copyright (c) 2015 Hirohisa Kawasaki. All rights reserved.
//
import UIKit
public enum Error: ErrorType {
case AnimationPreviousNotIncludedInAnimations
}
public protocol Delegate {
- func animationsBeforeTransitionTo(viewController: UIViewController) -> [Animation]
? ^ ^^
+ func animationsBeforeTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation]
? ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- func animationsDuringTransitionFrom(viewController: UIViewController) -> [Animation]
? ^ ^^
+ func animationsDuringTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation]
? ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
}
extension Delegate {
- func animationsBeforeTransitionTo(viewController: UIViewController) -> [Animation] {
? ^ ^^
+ func animationsBeforeTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation] {
? ^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return []
}
- func animationsDuringTransitionFrom(viewController: UIViewController) -> [Animation] {
? ^ ^^
+ func animationsDuringTransition(from fromViewController: UIViewController, to toViewController: UIViewController) -> [Animation] {
? ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
return []
}
} | 8 | 0.285714 | 4 | 4 |
35e6d5cf29edeab3f4d3ac47a445c15c369203fa | index.js | index.js | module.exports = function (dest, src) {
Object.getOwnPropertyNames(src).forEach(function (name) {
var descriptor = Object.getOwnPropertyDescriptor(src, name)
Object.defineProperty(dest, name, descriptor)
})
return dest
} | /*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* MIT Licensed
*/
/**
* Module exports.
* @public
*/
module.exports = merge
/**
* Merge the property descriptors of `src` into `dest`
*
* @param {object} dest Object to add descriptors to
* @param {object} src Object to clone descriptors from
* @returns {object} Reference to dest
* @public
*/
function merge(dest, src) {
Object.getOwnPropertyNames(src).forEach(function forEachOwnPropertyName(name) {
var descriptor = Object.getOwnPropertyDescriptor(src, name)
Object.defineProperty(dest, name, descriptor)
})
return dest
}
| Add jsdoc to source file | Add jsdoc to source file
| JavaScript | mit | nooks/merge-descriptors,component/merge-descriptors | javascript | ## Code Before:
module.exports = function (dest, src) {
Object.getOwnPropertyNames(src).forEach(function (name) {
var descriptor = Object.getOwnPropertyDescriptor(src, name)
Object.defineProperty(dest, name, descriptor)
})
return dest
}
## Instruction:
Add jsdoc to source file
## Code After:
/*!
* merge-descriptors
* Copyright(c) 2014 Jonathan Ong
* MIT Licensed
*/
/**
* Module exports.
* @public
*/
module.exports = merge
/**
* Merge the property descriptors of `src` into `dest`
*
* @param {object} dest Object to add descriptors to
* @param {object} src Object to clone descriptors from
* @returns {object} Reference to dest
* @public
*/
function merge(dest, src) {
Object.getOwnPropertyNames(src).forEach(function forEachOwnPropertyName(name) {
var descriptor = Object.getOwnPropertyDescriptor(src, name)
Object.defineProperty(dest, name, descriptor)
})
return dest
}
| - module.exports = function (dest, src) {
+ /*!
+ * merge-descriptors
+ * Copyright(c) 2014 Jonathan Ong
+ * MIT Licensed
+ */
+
+ /**
+ * Module exports.
+ * @public
+ */
+
+ module.exports = merge
+
+ /**
+ * Merge the property descriptors of `src` into `dest`
+ *
+ * @param {object} dest Object to add descriptors to
+ * @param {object} src Object to clone descriptors from
+ * @returns {object} Reference to dest
+ * @public
+ */
+
+ function merge(dest, src) {
- Object.getOwnPropertyNames(src).forEach(function (name) {
+ Object.getOwnPropertyNames(src).forEach(function forEachOwnPropertyName(name) {
? ++++++++++++++++++++++
var descriptor = Object.getOwnPropertyDescriptor(src, name)
Object.defineProperty(dest, name, descriptor)
})
return dest
} | 26 | 3.25 | 24 | 2 |
5fbcce3feffb63dbd50623f8d6cb0e354bce7add | fedora/release.py | fedora/release.py | '''
Information about this python-fedora release
'''
NAME = 'python-fedora'
VERSION = '0.10.0'
DESCRIPTION = 'Python modules for interacting with Fedora Services'
LONG_DESCRIPTION = '''
The Fedora Project runs many different services. These services help us to
package software, develop new programs, and generally put together the distro.
This package contains software that helps us do that.
'''
AUTHOR = 'Toshio Kuratomi, Luke Macken, Ricky Elrod, Ralph Bean, Patrick Uiterwijk'
EMAIL = 'admin@fedoraproject.org'
COPYRIGHT = '2007-2018 Red Hat, Inc.'
URL = 'https://fedorahosted.org/python-fedora'
DOWNLOAD_URL = 'https://pypi.python.org/pypi/python-fedora'
LICENSE = 'LGPLv2+'
| '''
Information about this python-fedora release
'''
NAME = 'python-fedora'
VERSION = '0.10.0'
DESCRIPTION = 'Python modules for interacting with Fedora Services'
LONG_DESCRIPTION = '''
The Fedora Project runs many different services. These services help us to
package software, develop new programs, and generally put together the distro.
This package contains software that helps us do that.
'''
AUTHOR = 'Toshio Kuratomi, Luke Macken, Ricky Elrod, Ralph Bean, Patrick Uiterwijk'
EMAIL = 'admin@fedoraproject.org'
COPYRIGHT = '2007-2018 Red Hat, Inc.'
URL = 'https://github.com/fedora-infra/python-fedora'
DOWNLOAD_URL = 'https://pypi.python.org/pypi/python-fedora'
LICENSE = 'LGPLv2+'
| Fix the URL in the metadata of the package | Fix the URL in the metadata of the package
Signed-off-by: Pierre-Yves Chibon <0e23e1aa25183634677db757f9f5e912e5bb8b8c@pingoured.fr>
| Python | lgpl-2.1 | fedora-infra/python-fedora | python | ## Code Before:
'''
Information about this python-fedora release
'''
NAME = 'python-fedora'
VERSION = '0.10.0'
DESCRIPTION = 'Python modules for interacting with Fedora Services'
LONG_DESCRIPTION = '''
The Fedora Project runs many different services. These services help us to
package software, develop new programs, and generally put together the distro.
This package contains software that helps us do that.
'''
AUTHOR = 'Toshio Kuratomi, Luke Macken, Ricky Elrod, Ralph Bean, Patrick Uiterwijk'
EMAIL = 'admin@fedoraproject.org'
COPYRIGHT = '2007-2018 Red Hat, Inc.'
URL = 'https://fedorahosted.org/python-fedora'
DOWNLOAD_URL = 'https://pypi.python.org/pypi/python-fedora'
LICENSE = 'LGPLv2+'
## Instruction:
Fix the URL in the metadata of the package
Signed-off-by: Pierre-Yves Chibon <0e23e1aa25183634677db757f9f5e912e5bb8b8c@pingoured.fr>
## Code After:
'''
Information about this python-fedora release
'''
NAME = 'python-fedora'
VERSION = '0.10.0'
DESCRIPTION = 'Python modules for interacting with Fedora Services'
LONG_DESCRIPTION = '''
The Fedora Project runs many different services. These services help us to
package software, develop new programs, and generally put together the distro.
This package contains software that helps us do that.
'''
AUTHOR = 'Toshio Kuratomi, Luke Macken, Ricky Elrod, Ralph Bean, Patrick Uiterwijk'
EMAIL = 'admin@fedoraproject.org'
COPYRIGHT = '2007-2018 Red Hat, Inc.'
URL = 'https://github.com/fedora-infra/python-fedora'
DOWNLOAD_URL = 'https://pypi.python.org/pypi/python-fedora'
LICENSE = 'LGPLv2+'
| '''
Information about this python-fedora release
'''
NAME = 'python-fedora'
VERSION = '0.10.0'
DESCRIPTION = 'Python modules for interacting with Fedora Services'
LONG_DESCRIPTION = '''
The Fedora Project runs many different services. These services help us to
package software, develop new programs, and generally put together the distro.
This package contains software that helps us do that.
'''
AUTHOR = 'Toshio Kuratomi, Luke Macken, Ricky Elrod, Ralph Bean, Patrick Uiterwijk'
EMAIL = 'admin@fedoraproject.org'
COPYRIGHT = '2007-2018 Red Hat, Inc.'
- URL = 'https://fedorahosted.org/python-fedora'
+ URL = 'https://github.com/fedora-infra/python-fedora'
DOWNLOAD_URL = 'https://pypi.python.org/pypi/python-fedora'
LICENSE = 'LGPLv2+' | 2 | 0.105263 | 1 | 1 |
0e85bd392a0a262c80968e069753797a85f1e9d9 | lib/puppetfiler/cli.rb | lib/puppetfiler/cli.rb | require 'thor'
require 'puppetfiler/puppetfile'
require 'puppetfiler/version'
module Puppetfiler
class CLI < Thor
desc 'check [puppetfile]', 'Check forge for newer versions of used forge modules'
def check(puppetfile = 'Puppetfile')
pf = Puppetfiler::Puppetfile.new(puppetfile)
format = "% -#{pf.maxlen_name}s % -#{pf.maxlen_ver}s %s"
puts sprintf(format, 'module', 'current', 'newest')
pf.updates.each do |name, hash|
puts sprintf(format, name, hash[:current], hash[:newest])
end
end
desc 'fixture [puppetfile]', 'Create puppetlabs_spec_helper compatible .fixtures.yml from puppetfile'
def fixture(puppetfile = 'Puppetfile')
puts Puppetfiler::Puppetfile(puppetfile).fixture
end
desc 'version', 'Output version'
def version
puts "puppetfiler v#{Puppetfiler::VERSION}"
end
end
end
| require 'thor'
require 'puppetfiler/puppetfile'
require 'puppetfiler/version'
module Puppetfiler
class CLI < Thor
desc 'check [puppetfile]', 'Check forge for newer versions of used forge modules'
def check(puppetfile = 'Puppetfile')
pf = Puppetfiler::Puppetfile.new(puppetfile)
format = "% -#{pf.maxlen_name}s % -#{pf.maxlen_ver}s %s"
puts sprintf(format, 'module', 'current', 'newest')
pf.updates.each do |name, hash|
puts sprintf(format, name, hash[:current], hash[:newest])
end
end
desc 'fixture [puppetfile]', 'Create puppetlabs_spec_helper compatible .fixtures.yml from puppetfile'
method_option :stdout, :aliases => '-o'
def fixture(puppetfile = 'Puppetfile')
f = Puppetfiler::Puppetfile.new(puppetfile).fixture
if options[:stdout]
puts f
else
File.write('.fixtures.yml', f)
end
end
desc 'version', 'Output version'
def version
puts "puppetfiler v#{Puppetfiler::VERSION}"
end
end
end
| Write to file by default, stdout on flag | fixture: Write to file by default, stdout on flag
| Ruby | mit | ntnn/puppetfiler,ntnn/puppetfiler | ruby | ## Code Before:
require 'thor'
require 'puppetfiler/puppetfile'
require 'puppetfiler/version'
module Puppetfiler
class CLI < Thor
desc 'check [puppetfile]', 'Check forge for newer versions of used forge modules'
def check(puppetfile = 'Puppetfile')
pf = Puppetfiler::Puppetfile.new(puppetfile)
format = "% -#{pf.maxlen_name}s % -#{pf.maxlen_ver}s %s"
puts sprintf(format, 'module', 'current', 'newest')
pf.updates.each do |name, hash|
puts sprintf(format, name, hash[:current], hash[:newest])
end
end
desc 'fixture [puppetfile]', 'Create puppetlabs_spec_helper compatible .fixtures.yml from puppetfile'
def fixture(puppetfile = 'Puppetfile')
puts Puppetfiler::Puppetfile(puppetfile).fixture
end
desc 'version', 'Output version'
def version
puts "puppetfiler v#{Puppetfiler::VERSION}"
end
end
end
## Instruction:
fixture: Write to file by default, stdout on flag
## Code After:
require 'thor'
require 'puppetfiler/puppetfile'
require 'puppetfiler/version'
module Puppetfiler
class CLI < Thor
desc 'check [puppetfile]', 'Check forge for newer versions of used forge modules'
def check(puppetfile = 'Puppetfile')
pf = Puppetfiler::Puppetfile.new(puppetfile)
format = "% -#{pf.maxlen_name}s % -#{pf.maxlen_ver}s %s"
puts sprintf(format, 'module', 'current', 'newest')
pf.updates.each do |name, hash|
puts sprintf(format, name, hash[:current], hash[:newest])
end
end
desc 'fixture [puppetfile]', 'Create puppetlabs_spec_helper compatible .fixtures.yml from puppetfile'
method_option :stdout, :aliases => '-o'
def fixture(puppetfile = 'Puppetfile')
f = Puppetfiler::Puppetfile.new(puppetfile).fixture
if options[:stdout]
puts f
else
File.write('.fixtures.yml', f)
end
end
desc 'version', 'Output version'
def version
puts "puppetfiler v#{Puppetfiler::VERSION}"
end
end
end
| require 'thor'
require 'puppetfiler/puppetfile'
require 'puppetfiler/version'
module Puppetfiler
class CLI < Thor
desc 'check [puppetfile]', 'Check forge for newer versions of used forge modules'
def check(puppetfile = 'Puppetfile')
pf = Puppetfiler::Puppetfile.new(puppetfile)
format = "% -#{pf.maxlen_name}s % -#{pf.maxlen_ver}s %s"
puts sprintf(format, 'module', 'current', 'newest')
pf.updates.each do |name, hash|
puts sprintf(format, name, hash[:current], hash[:newest])
end
end
desc 'fixture [puppetfile]', 'Create puppetlabs_spec_helper compatible .fixtures.yml from puppetfile'
+ method_option :stdout, :aliases => '-o'
def fixture(puppetfile = 'Puppetfile')
- puts Puppetfiler::Puppetfile(puppetfile).fixture
? ^^^^
+ f = Puppetfiler::Puppetfile.new(puppetfile).fixture
? ^^^ ++++
+
+ if options[:stdout]
+ puts f
+ else
+ File.write('.fixtures.yml', f)
+ end
end
desc 'version', 'Output version'
def version
puts "puppetfiler v#{Puppetfiler::VERSION}"
end
end
end | 9 | 0.310345 | 8 | 1 |
71f26c3cf34d4e1c598908309f97869536baf1e2 | app/javascript/consent/ConsentComponent.css | app/javascript/consent/ConsentComponent.css | .ConsentComponent {
clear: both;
padding-top: 1px;
}
.ConsentComponent--opt-in-reason {
margin: 20px 0;
}
.ConsentComponent--opt-out-warn {
margin: 15px 0;
padding: 10px;
color: red;
border: 2px solid red;
}
.ConsentComponent--opt-out-warn-title {
font-weight: bold;
}
.ConsentComponent--opt-out-warn-message {
margin-top: 10px;
}
.ConsentComponent--prompt {
margin-bottom: 15px;
}
.ConsentComponent--how-to-opt-out {
margin-bottom: 15px;
}
| .ConsentComponent {
clear: both;
padding-top: 1px;
margin-top: 20px;
}
.ConsentComponent--opt-in-reason {
margin: 20px 0;
}
.ConsentComponent--opt-out-warn {
margin: 15px 0;
padding: 10px;
color: red;
border: 2px solid red;
}
.ConsentComponent--opt-out-warn-title {
font-weight: bold;
}
.ConsentComponent--opt-out-warn-message {
margin-top: 10px;
}
.ConsentComponent--prompt {
margin-bottom: 15px;
}
.ConsentComponent--how-to-opt-out {
margin-bottom: 15px;
}
| Add some space above consent options | :lipstick: Add some space above consent options
| CSS | mit | SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign,SumOfUs/Champaign | css | ## Code Before:
.ConsentComponent {
clear: both;
padding-top: 1px;
}
.ConsentComponent--opt-in-reason {
margin: 20px 0;
}
.ConsentComponent--opt-out-warn {
margin: 15px 0;
padding: 10px;
color: red;
border: 2px solid red;
}
.ConsentComponent--opt-out-warn-title {
font-weight: bold;
}
.ConsentComponent--opt-out-warn-message {
margin-top: 10px;
}
.ConsentComponent--prompt {
margin-bottom: 15px;
}
.ConsentComponent--how-to-opt-out {
margin-bottom: 15px;
}
## Instruction:
:lipstick: Add some space above consent options
## Code After:
.ConsentComponent {
clear: both;
padding-top: 1px;
margin-top: 20px;
}
.ConsentComponent--opt-in-reason {
margin: 20px 0;
}
.ConsentComponent--opt-out-warn {
margin: 15px 0;
padding: 10px;
color: red;
border: 2px solid red;
}
.ConsentComponent--opt-out-warn-title {
font-weight: bold;
}
.ConsentComponent--opt-out-warn-message {
margin-top: 10px;
}
.ConsentComponent--prompt {
margin-bottom: 15px;
}
.ConsentComponent--how-to-opt-out {
margin-bottom: 15px;
}
| .ConsentComponent {
clear: both;
padding-top: 1px;
+ margin-top: 20px;
}
.ConsentComponent--opt-in-reason {
margin: 20px 0;
}
.ConsentComponent--opt-out-warn {
margin: 15px 0;
padding: 10px;
color: red;
border: 2px solid red;
}
.ConsentComponent--opt-out-warn-title {
font-weight: bold;
}
.ConsentComponent--opt-out-warn-message {
margin-top: 10px;
}
.ConsentComponent--prompt {
margin-bottom: 15px;
}
.ConsentComponent--how-to-opt-out {
margin-bottom: 15px;
} | 1 | 0.034483 | 1 | 0 |
61fb2f693d93e8f56fae405e2372029e093aa157 | test/gh.fish | test/gh.fish | test "prints help when given -h option"
"Usage: gh [--help] USER REPO" \
"" \
"Description:" \
" Quickly navigate across git repositories cloned from GitHub." \
" Searches within $HOME/github.com/. Clones repo if not found." \
"" \
"Examples:" \
" gh dideler fish-cd-git" = (gh -h)
end
| test "prints help when given -h option"
"Usage: gh [--help] USER REPO" \
"" \
"Description:" \
" Quickly navigate across git repositories cloned from GitHub." \
" Searches within $HOME/github.com/. Clones repo if not found." \
"" \
"Examples:" \
" gh dideler fish-cd-git" = (gh -h)
end
test "prints help when given --help option"
"Usage: gh [--help] USER REPO" \
"" \
"Description:" \
" Quickly navigate across git repositories cloned from GitHub." \
" Searches within $HOME/github.com/. Clones repo if not found." \
"" \
"Examples:" \
" gh dideler fish-cd-git" = (gh -h)
end
| Add test for --help option | :white_check_mark: Add test for --help option
| fish | mit | dideler/fish-cd-git | fish | ## Code Before:
test "prints help when given -h option"
"Usage: gh [--help] USER REPO" \
"" \
"Description:" \
" Quickly navigate across git repositories cloned from GitHub." \
" Searches within $HOME/github.com/. Clones repo if not found." \
"" \
"Examples:" \
" gh dideler fish-cd-git" = (gh -h)
end
## Instruction:
:white_check_mark: Add test for --help option
## Code After:
test "prints help when given -h option"
"Usage: gh [--help] USER REPO" \
"" \
"Description:" \
" Quickly navigate across git repositories cloned from GitHub." \
" Searches within $HOME/github.com/. Clones repo if not found." \
"" \
"Examples:" \
" gh dideler fish-cd-git" = (gh -h)
end
test "prints help when given --help option"
"Usage: gh [--help] USER REPO" \
"" \
"Description:" \
" Quickly navigate across git repositories cloned from GitHub." \
" Searches within $HOME/github.com/. Clones repo if not found." \
"" \
"Examples:" \
" gh dideler fish-cd-git" = (gh -h)
end
| test "prints help when given -h option"
"Usage: gh [--help] USER REPO" \
"" \
"Description:" \
" Quickly navigate across git repositories cloned from GitHub." \
" Searches within $HOME/github.com/. Clones repo if not found." \
"" \
"Examples:" \
" gh dideler fish-cd-git" = (gh -h)
end
+
+ test "prints help when given --help option"
+ "Usage: gh [--help] USER REPO" \
+ "" \
+ "Description:" \
+ " Quickly navigate across git repositories cloned from GitHub." \
+ " Searches within $HOME/github.com/. Clones repo if not found." \
+ "" \
+ "Examples:" \
+ " gh dideler fish-cd-git" = (gh -h)
+ end | 11 | 1.1 | 11 | 0 |
8d20035df56fcc1d40c6d28ad8e7a4ff30900636 | script.js | script.js | var ctx = document.getElementById("chart").getContext("2d");
var myLineChart = new Chart(ctx).Line(data, {
tooltipTemplate = function(valuesObject){
var label = valuesObject.label;
var idx = data.labels.indexOf(label);
var result = data.datasets[0].time[idx];
if (data.datasets[0].languages[idx] !== 0)
result += '[' + data.datasets[0].languages[idx].join(", ") + "]"
return result;
}
});
document.getElementById("summary").innerHTML = "I have written code for " + totalTime + " in the the last week in mostly " + languages.join(", ") + ".";
| var data = {"labels": ["12 December", "13 December", "14 December", "15 December", "16 December", "17 December", "18 December"], "datasets": [{"languages": [[], [], [], [], [], ["Python", "Other"], ["Python", "JavaScript", "Bash"]], "pointHighlightFill": "#fff", "fillColor": "rgba(151,187,205,0.2)", "pointHighlightStroke": "rgba(151,187,205,1)", "time": [" 0 secs", " 0 secs", " 0 secs", " 0 secs", " 0 secs", "53 mins", "2 hrs 17 mins"], "pointColor": "rgba(151,187,205,1)", "strokeColor": "rgba(151,187,205,1)", "pointStrokeColor": "#fff", "data": [0.0, 0.0, 0.0, 0.0, 0.0, 0.8852777777777778, 2.2880555555555557], "label": "Dataset"}]};
var totalTime = "3 hours 10 minutes";
var languages = ["Python", "JavaScript", "Bash"];
var ctx = document.getElementById("chart").getContext("2d");
var myLineChart = new Chart(ctx).Line(data, {
tooltipTemplate = function(valuesObject){
var label = valuesObject.label;
var idx = data.labels.indexOf(label);
var result = data.datasets[0].time[idx];
if (data.datasets[0].languages[idx] !== 0)
result += '[' + data.datasets[0].languages[idx].join(", ") + "]"
return result;
}
});
document.getElementById("summary").innerHTML = "I have written code for " + totalTime + " in the the last week in mostly " + languages.join(", ") + ".";
| Update dashboard at Fri Dec 18 02:17:47 NPT 2015 | Update dashboard at Fri Dec 18 02:17:47 NPT 2015
| JavaScript | mit | switchkiller/HaloTracker,switchkiller/HaloTracker,switchkiller/HaloTracker | javascript | ## Code Before:
var ctx = document.getElementById("chart").getContext("2d");
var myLineChart = new Chart(ctx).Line(data, {
tooltipTemplate = function(valuesObject){
var label = valuesObject.label;
var idx = data.labels.indexOf(label);
var result = data.datasets[0].time[idx];
if (data.datasets[0].languages[idx] !== 0)
result += '[' + data.datasets[0].languages[idx].join(", ") + "]"
return result;
}
});
document.getElementById("summary").innerHTML = "I have written code for " + totalTime + " in the the last week in mostly " + languages.join(", ") + ".";
## Instruction:
Update dashboard at Fri Dec 18 02:17:47 NPT 2015
## Code After:
var data = {"labels": ["12 December", "13 December", "14 December", "15 December", "16 December", "17 December", "18 December"], "datasets": [{"languages": [[], [], [], [], [], ["Python", "Other"], ["Python", "JavaScript", "Bash"]], "pointHighlightFill": "#fff", "fillColor": "rgba(151,187,205,0.2)", "pointHighlightStroke": "rgba(151,187,205,1)", "time": [" 0 secs", " 0 secs", " 0 secs", " 0 secs", " 0 secs", "53 mins", "2 hrs 17 mins"], "pointColor": "rgba(151,187,205,1)", "strokeColor": "rgba(151,187,205,1)", "pointStrokeColor": "#fff", "data": [0.0, 0.0, 0.0, 0.0, 0.0, 0.8852777777777778, 2.2880555555555557], "label": "Dataset"}]};
var totalTime = "3 hours 10 minutes";
var languages = ["Python", "JavaScript", "Bash"];
var ctx = document.getElementById("chart").getContext("2d");
var myLineChart = new Chart(ctx).Line(data, {
tooltipTemplate = function(valuesObject){
var label = valuesObject.label;
var idx = data.labels.indexOf(label);
var result = data.datasets[0].time[idx];
if (data.datasets[0].languages[idx] !== 0)
result += '[' + data.datasets[0].languages[idx].join(", ") + "]"
return result;
}
});
document.getElementById("summary").innerHTML = "I have written code for " + totalTime + " in the the last week in mostly " + languages.join(", ") + ".";
| + var data = {"labels": ["12 December", "13 December", "14 December", "15 December", "16 December", "17 December", "18 December"], "datasets": [{"languages": [[], [], [], [], [], ["Python", "Other"], ["Python", "JavaScript", "Bash"]], "pointHighlightFill": "#fff", "fillColor": "rgba(151,187,205,0.2)", "pointHighlightStroke": "rgba(151,187,205,1)", "time": [" 0 secs", " 0 secs", " 0 secs", " 0 secs", " 0 secs", "53 mins", "2 hrs 17 mins"], "pointColor": "rgba(151,187,205,1)", "strokeColor": "rgba(151,187,205,1)", "pointStrokeColor": "#fff", "data": [0.0, 0.0, 0.0, 0.0, 0.0, 0.8852777777777778, 2.2880555555555557], "label": "Dataset"}]};
+ var totalTime = "3 hours 10 minutes";
+ var languages = ["Python", "JavaScript", "Bash"];
var ctx = document.getElementById("chart").getContext("2d");
var myLineChart = new Chart(ctx).Line(data, {
tooltipTemplate = function(valuesObject){
var label = valuesObject.label;
var idx = data.labels.indexOf(label);
var result = data.datasets[0].time[idx];
if (data.datasets[0].languages[idx] !== 0)
result += '[' + data.datasets[0].languages[idx].join(", ") + "]"
return result;
}
});
document.getElementById("summary").innerHTML = "I have written code for " + totalTime + " in the the last week in mostly " + languages.join(", ") + "."; | 3 | 0.25 | 3 | 0 |
04d86995aa2750bf6fc9b5e9ab1133e167084d1c | .travis.yml | .travis.yml | rvm: 2.6.1
sudo: required
branches:
only:
- master
cache: bundler
before_script:
- echo -e "[mysqld]\ninnodb_file_format = Barracuda\ninnodb_file_per_table = 1\ninnodb_large_prefix = 1" | sudo sh -c "cat >> /etc/mysql/my.cnf"
- sudo service mysql restart
- bundle exec rake db:create db:migrate
- mkdir -p /home/travis/build/k0kubun/github-ranking/tmp/cache
script:
- bundle exec rake assets:precompile RAILS_ENV=production
- bundle exec rake spec
| rvm: 2.6.1
node_js: 8
sudo: required
branches:
only:
- master
cache: bundler
before_script:
- echo -e "[mysqld]\ninnodb_file_format = Barracuda\ninnodb_file_per_table = 1\ninnodb_large_prefix = 1" | sudo sh -c "cat >> /etc/mysql/my.cnf"
- sudo service mysql restart
- bundle exec rake db:create db:migrate
- mkdir -p /home/travis/build/k0kubun/github-ranking/tmp/cache
script:
- bundle exec rake assets:precompile RAILS_ENV=production
- bundle exec rake spec
| Use node_js: 8 on Travis | Use node_js: 8 on Travis
| YAML | mit | k0kubun/githubranking,k0kubun/githubranking,k0kubun/github-ranking,k0kubun/github-ranking,k0kubun/githubranking,k0kubun/github-ranking,k0kubun/github-ranking,k0kubun/githubranking,k0kubun/githubranking,k0kubun/github-ranking | yaml | ## Code Before:
rvm: 2.6.1
sudo: required
branches:
only:
- master
cache: bundler
before_script:
- echo -e "[mysqld]\ninnodb_file_format = Barracuda\ninnodb_file_per_table = 1\ninnodb_large_prefix = 1" | sudo sh -c "cat >> /etc/mysql/my.cnf"
- sudo service mysql restart
- bundle exec rake db:create db:migrate
- mkdir -p /home/travis/build/k0kubun/github-ranking/tmp/cache
script:
- bundle exec rake assets:precompile RAILS_ENV=production
- bundle exec rake spec
## Instruction:
Use node_js: 8 on Travis
## Code After:
rvm: 2.6.1
node_js: 8
sudo: required
branches:
only:
- master
cache: bundler
before_script:
- echo -e "[mysqld]\ninnodb_file_format = Barracuda\ninnodb_file_per_table = 1\ninnodb_large_prefix = 1" | sudo sh -c "cat >> /etc/mysql/my.cnf"
- sudo service mysql restart
- bundle exec rake db:create db:migrate
- mkdir -p /home/travis/build/k0kubun/github-ranking/tmp/cache
script:
- bundle exec rake assets:precompile RAILS_ENV=production
- bundle exec rake spec
| rvm: 2.6.1
+ node_js: 8
sudo: required
branches:
only:
- master
cache: bundler
before_script:
- echo -e "[mysqld]\ninnodb_file_format = Barracuda\ninnodb_file_per_table = 1\ninnodb_large_prefix = 1" | sudo sh -c "cat >> /etc/mysql/my.cnf"
- sudo service mysql restart
- bundle exec rake db:create db:migrate
- mkdir -p /home/travis/build/k0kubun/github-ranking/tmp/cache
script:
- bundle exec rake assets:precompile RAILS_ENV=production
- bundle exec rake spec | 1 | 0.071429 | 1 | 0 |
82fe0c4d03652463916146d9d707383f4f360f22 | webpack.config.js | webpack.config.js | var path = require("path");
var webpack = require("webpack");
var ParallelEsPlugin = require("parallel-es-webpack-plugin");
module.exports = {
devtool: "#inline-source-map",
entry: {
examples: "./src/browser-example.ts",
"performance-measurements": "./src/performance-measurement.ts"
},
output: {
path: path.resolve(__dirname, "dist"),
pathinfo: true,
filename: "[name].js"
},
resolve: {
extensions: [".webpack.js", ".web.js", ".ts", ".js"]
},
module: {
loaders: [
{
test: /\.ts$/,
exclude: path.resolve("./src/transpiled"),
loader: "babel!awesome-typescript-loader"
},
{
test: /\.ts$/,
include: path.resolve("./src/transpiled"),
loader: `babel?${JSON.stringify({"plugins": [ "parallel-es"] })}!awesome-typescript-loader`
},
{
test: /\.parallel-es6\.js/,
loader: "source-map"
}
],
noParse: [ /benchmark\/benchmark\.js/ ]
},
devServer: {
stats: {
chunks: false
}
},
plugins: [
new webpack.optimize.CommonsChunkPlugin("common"),
new ParallelEsPlugin({
babelOptions: {
"presets": [
["es2015", { "modules": false }]
]
}
})
]
};
| var path = require("path");
var webpack = require("webpack");
var ParallelEsPlugin = require("parallel-es-webpack-plugin");
module.exports = {
devtool: "#inline-source-map",
entry: {
examples: "./src/browser-example.ts",
"performance-measurements": "./src/performance-measurement.ts"
},
output: {
path: path.resolve(__dirname, "dist"),
pathinfo: true,
filename: "[name].js"
},
module: {
loaders: [
{
test: /\.ts$/,
exclude: path.resolve("./src/transpiled"),
loader: "babel!awesome-typescript-loader"
},
{
test: /\.ts$/,
include: path.resolve("./src/transpiled"),
loader: `babel?${JSON.stringify({"plugins": [ "parallel-es"] })}!awesome-typescript-loader`
},
{
test: /\.parallel-es6\.js/,
loader: "source-map"
}
],
noParse: [ /benchmark\/benchmark\.js/ ]
},
resolve: {
extensions: [".webpack.js", ".web.js", ".ts", ".js"],
modules:[
path.join(__dirname, "node_modules")
]
},
devServer: {
stats: {
chunks: false
}
},
plugins: [
new webpack.optimize.CommonsChunkPlugin("common"),
new ParallelEsPlugin({
babelOptions: {
"presets": [
["es2015", { "modules": false }]
]
}
})
]
};
| Fix webpack setup for linked parallel-es | Fix webpack setup for linked parallel-es
If the parallel-es module is linked, dependencies imported from transpiled functions can no longer be resolved.
Requires to set resolve.modules to the project directory
| JavaScript | mit | MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example,MichaReiser/parallel-es-example | javascript | ## Code Before:
var path = require("path");
var webpack = require("webpack");
var ParallelEsPlugin = require("parallel-es-webpack-plugin");
module.exports = {
devtool: "#inline-source-map",
entry: {
examples: "./src/browser-example.ts",
"performance-measurements": "./src/performance-measurement.ts"
},
output: {
path: path.resolve(__dirname, "dist"),
pathinfo: true,
filename: "[name].js"
},
resolve: {
extensions: [".webpack.js", ".web.js", ".ts", ".js"]
},
module: {
loaders: [
{
test: /\.ts$/,
exclude: path.resolve("./src/transpiled"),
loader: "babel!awesome-typescript-loader"
},
{
test: /\.ts$/,
include: path.resolve("./src/transpiled"),
loader: `babel?${JSON.stringify({"plugins": [ "parallel-es"] })}!awesome-typescript-loader`
},
{
test: /\.parallel-es6\.js/,
loader: "source-map"
}
],
noParse: [ /benchmark\/benchmark\.js/ ]
},
devServer: {
stats: {
chunks: false
}
},
plugins: [
new webpack.optimize.CommonsChunkPlugin("common"),
new ParallelEsPlugin({
babelOptions: {
"presets": [
["es2015", { "modules": false }]
]
}
})
]
};
## Instruction:
Fix webpack setup for linked parallel-es
If the parallel-es module is linked, dependencies imported from transpiled functions can no longer be resolved.
Requires to set resolve.modules to the project directory
## Code After:
var path = require("path");
var webpack = require("webpack");
var ParallelEsPlugin = require("parallel-es-webpack-plugin");
module.exports = {
devtool: "#inline-source-map",
entry: {
examples: "./src/browser-example.ts",
"performance-measurements": "./src/performance-measurement.ts"
},
output: {
path: path.resolve(__dirname, "dist"),
pathinfo: true,
filename: "[name].js"
},
module: {
loaders: [
{
test: /\.ts$/,
exclude: path.resolve("./src/transpiled"),
loader: "babel!awesome-typescript-loader"
},
{
test: /\.ts$/,
include: path.resolve("./src/transpiled"),
loader: `babel?${JSON.stringify({"plugins": [ "parallel-es"] })}!awesome-typescript-loader`
},
{
test: /\.parallel-es6\.js/,
loader: "source-map"
}
],
noParse: [ /benchmark\/benchmark\.js/ ]
},
resolve: {
extensions: [".webpack.js", ".web.js", ".ts", ".js"],
modules:[
path.join(__dirname, "node_modules")
]
},
devServer: {
stats: {
chunks: false
}
},
plugins: [
new webpack.optimize.CommonsChunkPlugin("common"),
new ParallelEsPlugin({
babelOptions: {
"presets": [
["es2015", { "modules": false }]
]
}
})
]
};
| var path = require("path");
var webpack = require("webpack");
var ParallelEsPlugin = require("parallel-es-webpack-plugin");
module.exports = {
devtool: "#inline-source-map",
entry: {
examples: "./src/browser-example.ts",
"performance-measurements": "./src/performance-measurement.ts"
},
output: {
path: path.resolve(__dirname, "dist"),
pathinfo: true,
filename: "[name].js"
- },
- resolve: {
- extensions: [".webpack.js", ".web.js", ".ts", ".js"]
},
module: {
loaders: [
{
test: /\.ts$/,
exclude: path.resolve("./src/transpiled"),
loader: "babel!awesome-typescript-loader"
},
{
test: /\.ts$/,
include: path.resolve("./src/transpiled"),
loader: `babel?${JSON.stringify({"plugins": [ "parallel-es"] })}!awesome-typescript-loader`
},
{
test: /\.parallel-es6\.js/,
loader: "source-map"
}
],
noParse: [ /benchmark\/benchmark\.js/ ]
},
+ resolve: {
+ extensions: [".webpack.js", ".web.js", ".ts", ".js"],
+ modules:[
+ path.join(__dirname, "node_modules")
+ ]
+ },
devServer: {
stats: {
chunks: false
}
},
plugins: [
new webpack.optimize.CommonsChunkPlugin("common"),
new ParallelEsPlugin({
babelOptions: {
"presets": [
["es2015", { "modules": false }]
]
}
})
]
}; | 9 | 0.169811 | 6 | 3 |
a484a3efb48f55133fca7c0f38ad65b6a576ba2b | gulpfile.js | gulpfile.js | /* === PLUGINS === */
const gulp = require('gulp'),
rimraf = require('gulp-rimraf'),
webpack = require('webpack-stream'),
sequence = require('run-sequence');
/* === CONFIG === */
const config = {
src: {
js: 'src/main/js/**/*',
},
target: 'dist/',
cfg: {
webpack: './webpack.config.js',
jshint: '.jshintrc'
}
};
/* === TASKS === */
gulp.task('clean', function () {
return gulp.src(config.target, {read: false}).pipe(rimraf());
});
gulp.task('webpack:build', function () {
return gulp.src(config.src.js)
.pipe(webpack(require(config.cfg.webpack)))
.pipe(gulp.dest(config.target));
});
gulp.task('webpack:watch', function () {
return gulp.watch(config.src.js, ['webpack:build']);
});
// Shortcut tasks
gulp.task('build', function (callback) {
sequence('clean', 'webpack:build', callback);
});
gulp.task('watch', ['webpack:watch']);
gulp.task('default', ['build']);
| /* === PLUGINS === */
const gulp = require('gulp'),
rimraf = require('gulp-rimraf'),
webpack = require('webpack-stream'),
sequence = require('run-sequence');
/* === CONFIG === */
const config = {
src: 'src/main/**/*',
target: 'dist/',
cfg: {
webpack: './webpack.config.js',
jshint: '.jshintrc'
}
};
/* === TASKS === */
gulp.task('clean', function () {
return gulp.src(config.target, {read: false}).pipe(rimraf());
});
gulp.task('webpack:build', function () {
return gulp.src(config.src)
.pipe(webpack(require(config.cfg.webpack)))
.pipe(gulp.dest(config.target));
});
gulp.task('webpack:watch', function () {
return gulp.watch(config.src, ['webpack:build']);
});
// Shortcut tasks
gulp.task('build', function (callback) {
sequence('clean', 'webpack:build', callback);
});
gulp.task('watch', ['webpack:watch']);
gulp.task('default', ['build']);
| Fix Gulp config due to latest evolutions | Fix Gulp config due to latest evolutions
| JavaScript | unknown | cyChop/beverages-js,cyChop/beverages-js,cyChop/teas-js,cyChop/beverages-js,cyChop/teas-js | javascript | ## Code Before:
/* === PLUGINS === */
const gulp = require('gulp'),
rimraf = require('gulp-rimraf'),
webpack = require('webpack-stream'),
sequence = require('run-sequence');
/* === CONFIG === */
const config = {
src: {
js: 'src/main/js/**/*',
},
target: 'dist/',
cfg: {
webpack: './webpack.config.js',
jshint: '.jshintrc'
}
};
/* === TASKS === */
gulp.task('clean', function () {
return gulp.src(config.target, {read: false}).pipe(rimraf());
});
gulp.task('webpack:build', function () {
return gulp.src(config.src.js)
.pipe(webpack(require(config.cfg.webpack)))
.pipe(gulp.dest(config.target));
});
gulp.task('webpack:watch', function () {
return gulp.watch(config.src.js, ['webpack:build']);
});
// Shortcut tasks
gulp.task('build', function (callback) {
sequence('clean', 'webpack:build', callback);
});
gulp.task('watch', ['webpack:watch']);
gulp.task('default', ['build']);
## Instruction:
Fix Gulp config due to latest evolutions
## Code After:
/* === PLUGINS === */
const gulp = require('gulp'),
rimraf = require('gulp-rimraf'),
webpack = require('webpack-stream'),
sequence = require('run-sequence');
/* === CONFIG === */
const config = {
src: 'src/main/**/*',
target: 'dist/',
cfg: {
webpack: './webpack.config.js',
jshint: '.jshintrc'
}
};
/* === TASKS === */
gulp.task('clean', function () {
return gulp.src(config.target, {read: false}).pipe(rimraf());
});
gulp.task('webpack:build', function () {
return gulp.src(config.src)
.pipe(webpack(require(config.cfg.webpack)))
.pipe(gulp.dest(config.target));
});
gulp.task('webpack:watch', function () {
return gulp.watch(config.src, ['webpack:build']);
});
// Shortcut tasks
gulp.task('build', function (callback) {
sequence('clean', 'webpack:build', callback);
});
gulp.task('watch', ['webpack:watch']);
gulp.task('default', ['build']);
| /* === PLUGINS === */
const gulp = require('gulp'),
rimraf = require('gulp-rimraf'),
webpack = require('webpack-stream'),
sequence = require('run-sequence');
/* === CONFIG === */
const config = {
- src: {
- js: 'src/main/js/**/*',
? ----- ---
+ src: 'src/main/**/*',
? ++
- },
target: 'dist/',
cfg: {
webpack: './webpack.config.js',
jshint: '.jshintrc'
}
};
/* === TASKS === */
gulp.task('clean', function () {
return gulp.src(config.target, {read: false}).pipe(rimraf());
});
gulp.task('webpack:build', function () {
- return gulp.src(config.src.js)
? ---
+ return gulp.src(config.src)
.pipe(webpack(require(config.cfg.webpack)))
.pipe(gulp.dest(config.target));
});
gulp.task('webpack:watch', function () {
- return gulp.watch(config.src.js, ['webpack:build']);
? ---
+ return gulp.watch(config.src, ['webpack:build']);
});
// Shortcut tasks
gulp.task('build', function (callback) {
sequence('clean', 'webpack:build', callback);
});
gulp.task('watch', ['webpack:watch']);
gulp.task('default', ['build']); | 8 | 0.205128 | 3 | 5 |
3532a955c1e08114b1937550999c53a7a5da676f | src/Milax/Mconsole/Providers/ViewComposersServiceProvider.php | src/Milax/Mconsole/Providers/ViewComposersServiceProvider.php | <?php
namespace Milax\Mconsole\Providers;
use Illuminate\Support\ServiceProvider;
class ViewComposersServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
view()->composer('mconsole::app', 'Milax\Mconsole\Composers\SectionComposer');
view()->composer('mconsole::partials.menu', 'Milax\Mconsole\Composers\MenuComposer');
view()->composer('mconsole::app', 'Milax\Mconsole\Composers\OptionsComposer');
view()->composer('mconsole::forms.upload', 'Milax\Mconsole\Composers\UploadFormComposer');
view()->composer('mconsole::forms.tags', 'Milax\Mconsole\Composers\TagsInputComposer');
view()->composer('mconsole::helpers.blade', 'Milax\Mconsole\Composers\BladeHelperViewComposer');
view()->composer('mconsole::forms.links', 'Milax\Mconsole\Composers\LinksSetsComposer');
view()->composer('mconsole::menu.form', 'Milax\Mconsole\Composers\LanguagesComposer');
}
}
| <?php
namespace Milax\Mconsole\Providers;
use Illuminate\Support\ServiceProvider;
class ViewComposersServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
view()->composer('mconsole::app', 'Milax\Mconsole\Composers\SectionComposer');
view()->composer('mconsole::partials.menu', 'Milax\Mconsole\Composers\MenuComposer');
view()->composer('mconsole::app', 'Milax\Mconsole\Composers\OptionsComposer');
view()->composer(['mconsole::forms.upload', 'mconsole::uploads.form'], 'Milax\Mconsole\Composers\UploadFormComposer');
view()->composer('mconsole::forms.tags', 'Milax\Mconsole\Composers\TagsInputComposer');
view()->composer('mconsole::helpers.blade', 'Milax\Mconsole\Composers\BladeHelperViewComposer');
view()->composer('mconsole::forms.links', 'Milax\Mconsole\Composers\LinksSetsComposer');
view()->composer('mconsole::menu.form', 'Milax\Mconsole\Composers\LanguagesComposer');
}
}
| Add uploads form laguage composer | Add uploads form laguage composer
| PHP | mit | misterpaladin/mconsole,misterpaladin/mconsole,misterpaladin/mconsole | php | ## Code Before:
<?php
namespace Milax\Mconsole\Providers;
use Illuminate\Support\ServiceProvider;
class ViewComposersServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
view()->composer('mconsole::app', 'Milax\Mconsole\Composers\SectionComposer');
view()->composer('mconsole::partials.menu', 'Milax\Mconsole\Composers\MenuComposer');
view()->composer('mconsole::app', 'Milax\Mconsole\Composers\OptionsComposer');
view()->composer('mconsole::forms.upload', 'Milax\Mconsole\Composers\UploadFormComposer');
view()->composer('mconsole::forms.tags', 'Milax\Mconsole\Composers\TagsInputComposer');
view()->composer('mconsole::helpers.blade', 'Milax\Mconsole\Composers\BladeHelperViewComposer');
view()->composer('mconsole::forms.links', 'Milax\Mconsole\Composers\LinksSetsComposer');
view()->composer('mconsole::menu.form', 'Milax\Mconsole\Composers\LanguagesComposer');
}
}
## Instruction:
Add uploads form laguage composer
## Code After:
<?php
namespace Milax\Mconsole\Providers;
use Illuminate\Support\ServiceProvider;
class ViewComposersServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
view()->composer('mconsole::app', 'Milax\Mconsole\Composers\SectionComposer');
view()->composer('mconsole::partials.menu', 'Milax\Mconsole\Composers\MenuComposer');
view()->composer('mconsole::app', 'Milax\Mconsole\Composers\OptionsComposer');
view()->composer(['mconsole::forms.upload', 'mconsole::uploads.form'], 'Milax\Mconsole\Composers\UploadFormComposer');
view()->composer('mconsole::forms.tags', 'Milax\Mconsole\Composers\TagsInputComposer');
view()->composer('mconsole::helpers.blade', 'Milax\Mconsole\Composers\BladeHelperViewComposer');
view()->composer('mconsole::forms.links', 'Milax\Mconsole\Composers\LinksSetsComposer');
view()->composer('mconsole::menu.form', 'Milax\Mconsole\Composers\LanguagesComposer');
}
}
| <?php
namespace Milax\Mconsole\Providers;
use Illuminate\Support\ServiceProvider;
class ViewComposersServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
view()->composer('mconsole::app', 'Milax\Mconsole\Composers\SectionComposer');
view()->composer('mconsole::partials.menu', 'Milax\Mconsole\Composers\MenuComposer');
view()->composer('mconsole::app', 'Milax\Mconsole\Composers\OptionsComposer');
- view()->composer('mconsole::forms.upload', 'Milax\Mconsole\Composers\UploadFormComposer');
+ view()->composer(['mconsole::forms.upload', 'mconsole::uploads.form'], 'Milax\Mconsole\Composers\UploadFormComposer');
? + +++++++++++++++++++++++++++
view()->composer('mconsole::forms.tags', 'Milax\Mconsole\Composers\TagsInputComposer');
view()->composer('mconsole::helpers.blade', 'Milax\Mconsole\Composers\BladeHelperViewComposer');
view()->composer('mconsole::forms.links', 'Milax\Mconsole\Composers\LinksSetsComposer');
view()->composer('mconsole::menu.form', 'Milax\Mconsole\Composers\LanguagesComposer');
}
} | 2 | 0.057143 | 1 | 1 |
6c5822c7c29026708f1d33df125e1e45c6080a72 | package.json | package.json | {
"name": "nscale-client",
"description": "nearForm's nscale command line client",
"keywords": [
"nearForm",
"nscale",
"deployer",
"command",
"line",
"client"
],
"version": "0.4.0",
"license": "Artistic License 2.0",
"author": "Peter Elger (http://nearform.com/)",
"contributors": [
"Peter Elger <elger.peter@gmail.com> (http://peterelger.com/)",
"Matteo Collina <matteo.collina@nearform.com>"
],
"engines": {
"node": "*"
},
"dependencies": {
"async": "^0.9.0",
"cli-table": "^0.3.0",
"commist": "^0.2.0",
"lodash": "^2.4.1",
"nscale-sdk": "~0.3.1",
"prompt": "^0.2.13",
"shell-quote": "^1.4.2",
"username": "^1.0.0"
},
"main": "./nscale.js",
"bin": {
"nsd": "./nscale.js",
"nscale": "./nscale.js"
},
"repository": {
"type": "git",
"url": "https://github.com/nearform/nscale-client.git"
},
"devDependencies": {}
}
| {
"name": "nscale-client",
"description": "nearForm's nscale command line client",
"keywords": [
"nearForm",
"nscale",
"deployer",
"command",
"line",
"client"
],
"version": "0.4.0",
"license": "Artistic License 2.0",
"author": "Peter Elger (http://nearform.com/)",
"contributors": [
"Peter Elger <elger.peter@gmail.com> (http://peterelger.com/)",
"Matteo Collina <matteo.collina@nearform.com>"
],
"engines": {
"node": "*"
},
"dependencies": {
"async": "^0.9.0",
"cli-table": "^0.3.0",
"commist": "^0.2.0",
"lodash": "^2.4.1",
"nscale-sdk": "git+https://github.com/nearform/nscale-sdk.git#error-handling",
"prompt": "^0.2.13",
"shell-quote": "^1.4.2",
"username": "^1.0.0"
},
"main": "./nscale.js",
"bin": {
"nsd": "./nscale.js",
"nscale": "./nscale.js"
},
"repository": {
"type": "git",
"url": "https://github.com/nearform/nscale-client.git"
},
"devDependencies": {}
}
| Use `error-handling` branch of `nscale-sdk` | Use `error-handling` branch of `nscale-sdk`
| JSON | artistic-2.0 | nearform/nscale-client,nearform/nscale-client | json | ## Code Before:
{
"name": "nscale-client",
"description": "nearForm's nscale command line client",
"keywords": [
"nearForm",
"nscale",
"deployer",
"command",
"line",
"client"
],
"version": "0.4.0",
"license": "Artistic License 2.0",
"author": "Peter Elger (http://nearform.com/)",
"contributors": [
"Peter Elger <elger.peter@gmail.com> (http://peterelger.com/)",
"Matteo Collina <matteo.collina@nearform.com>"
],
"engines": {
"node": "*"
},
"dependencies": {
"async": "^0.9.0",
"cli-table": "^0.3.0",
"commist": "^0.2.0",
"lodash": "^2.4.1",
"nscale-sdk": "~0.3.1",
"prompt": "^0.2.13",
"shell-quote": "^1.4.2",
"username": "^1.0.0"
},
"main": "./nscale.js",
"bin": {
"nsd": "./nscale.js",
"nscale": "./nscale.js"
},
"repository": {
"type": "git",
"url": "https://github.com/nearform/nscale-client.git"
},
"devDependencies": {}
}
## Instruction:
Use `error-handling` branch of `nscale-sdk`
## Code After:
{
"name": "nscale-client",
"description": "nearForm's nscale command line client",
"keywords": [
"nearForm",
"nscale",
"deployer",
"command",
"line",
"client"
],
"version": "0.4.0",
"license": "Artistic License 2.0",
"author": "Peter Elger (http://nearform.com/)",
"contributors": [
"Peter Elger <elger.peter@gmail.com> (http://peterelger.com/)",
"Matteo Collina <matteo.collina@nearform.com>"
],
"engines": {
"node": "*"
},
"dependencies": {
"async": "^0.9.0",
"cli-table": "^0.3.0",
"commist": "^0.2.0",
"lodash": "^2.4.1",
"nscale-sdk": "git+https://github.com/nearform/nscale-sdk.git#error-handling",
"prompt": "^0.2.13",
"shell-quote": "^1.4.2",
"username": "^1.0.0"
},
"main": "./nscale.js",
"bin": {
"nsd": "./nscale.js",
"nscale": "./nscale.js"
},
"repository": {
"type": "git",
"url": "https://github.com/nearform/nscale-client.git"
},
"devDependencies": {}
}
| {
"name": "nscale-client",
"description": "nearForm's nscale command line client",
"keywords": [
"nearForm",
"nscale",
"deployer",
"command",
"line",
"client"
],
"version": "0.4.0",
"license": "Artistic License 2.0",
"author": "Peter Elger (http://nearform.com/)",
"contributors": [
"Peter Elger <elger.peter@gmail.com> (http://peterelger.com/)",
"Matteo Collina <matteo.collina@nearform.com>"
],
"engines": {
"node": "*"
},
"dependencies": {
"async": "^0.9.0",
"cli-table": "^0.3.0",
"commist": "^0.2.0",
"lodash": "^2.4.1",
- "nscale-sdk": "~0.3.1",
+ "nscale-sdk": "git+https://github.com/nearform/nscale-sdk.git#error-handling",
"prompt": "^0.2.13",
"shell-quote": "^1.4.2",
"username": "^1.0.0"
},
"main": "./nscale.js",
"bin": {
"nsd": "./nscale.js",
"nscale": "./nscale.js"
},
"repository": {
"type": "git",
"url": "https://github.com/nearform/nscale-client.git"
},
"devDependencies": {}
} | 2 | 0.047619 | 1 | 1 |
f0523d5c5c0ce7401d57fdf3b5f27c18393a46ce | templates/index.html | templates/index.html | {% extends "base.html" %}
{% block body %}
<div class="pure-g">
{# <div class="pure-u-1-3"></div> #}
<div class="pure-u-1-4"></div>
<div class="pure-u-1-4">
<p><img class="pure-img" src="hexagram/110011.png"></p>
<p>Call <pre>/hexagrams/nnnnnn.png</pre>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Hexagrams are built from bottom to top.</p>
</div>
<div class="pure-u-1-4">
<p><img class="pure-img" src="trigram/101.png"></p>
<p>Call <pre>/trigrams/nnn.png</pre>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Trigrams are built from bottom to top.</p>
</div>
<div class="pure-u-1-4"></div>
</div>
{% endblock %}
| {% extends "base.html" %}
{% block body %}
<div class="pure-g">
{# <div class="pure-u-1-3"></div> #}
<div class="pure-u-1-4"></div>
<div class="pure-u-1-4">
<p><img class="pure-img" src="{{ url_for('hex_out', hexagram='110011') }}"></p>
<p>Call <a href="{{ url_for('hex_out', hexagram='110011') }}"><pre>/hexagrams/nnnnnn.png</pre></a>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Hexagrams are built from bottom to top.</p>
</div>
<div class="pure-u-1-4">
<p><img class="pure-img" src="{{ url_for('tri_out', trigram='101') }}"></p>
<p>Call <a href="{{ url_for('tri_out', trigram='101') }}"><pre>/trigrams/nnn.png</pre></a>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Trigrams are built from bottom to top.</p>
</div>
<div class="pure-u-1-4"></div>
</div>
{% endblock %}
| Index links are dynamic now | Index links are dynamic now
| HTML | mit | urschrei/hexagrams,urschrei/hexagrams | html | ## Code Before:
{% extends "base.html" %}
{% block body %}
<div class="pure-g">
{# <div class="pure-u-1-3"></div> #}
<div class="pure-u-1-4"></div>
<div class="pure-u-1-4">
<p><img class="pure-img" src="hexagram/110011.png"></p>
<p>Call <pre>/hexagrams/nnnnnn.png</pre>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Hexagrams are built from bottom to top.</p>
</div>
<div class="pure-u-1-4">
<p><img class="pure-img" src="trigram/101.png"></p>
<p>Call <pre>/trigrams/nnn.png</pre>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Trigrams are built from bottom to top.</p>
</div>
<div class="pure-u-1-4"></div>
</div>
{% endblock %}
## Instruction:
Index links are dynamic now
## Code After:
{% extends "base.html" %}
{% block body %}
<div class="pure-g">
{# <div class="pure-u-1-3"></div> #}
<div class="pure-u-1-4"></div>
<div class="pure-u-1-4">
<p><img class="pure-img" src="{{ url_for('hex_out', hexagram='110011') }}"></p>
<p>Call <a href="{{ url_for('hex_out', hexagram='110011') }}"><pre>/hexagrams/nnnnnn.png</pre></a>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Hexagrams are built from bottom to top.</p>
</div>
<div class="pure-u-1-4">
<p><img class="pure-img" src="{{ url_for('tri_out', trigram='101') }}"></p>
<p>Call <a href="{{ url_for('tri_out', trigram='101') }}"><pre>/trigrams/nnn.png</pre></a>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Trigrams are built from bottom to top.</p>
</div>
<div class="pure-u-1-4"></div>
</div>
{% endblock %}
| {% extends "base.html" %}
{% block body %}
<div class="pure-g">
{# <div class="pure-u-1-3"></div> #}
<div class="pure-u-1-4"></div>
<div class="pure-u-1-4">
- <p><img class="pure-img" src="hexagram/110011.png"></p>
? ^ ^^^^
+ <p><img class="pure-img" src="{{ url_for('hex_out', hexagram='110011') }}"></p>
? ++++++++++++++++++++++ ^^ ^^^^^
- <p>Call <pre>/hexagrams/nnnnnn.png</pre>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Hexagrams are built from bottom to top.</p>
+ <p>Call <a href="{{ url_for('hex_out', hexagram='110011') }}"><pre>/hexagrams/nnnnnn.png</pre></a>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Hexagrams are built from bottom to top.</p>
? ++++++++++++++++++++++++++++++++++++++++++++++++++++++ ++++
</div>
<div class="pure-u-1-4">
- <p><img class="pure-img" src="trigram/101.png"></p>
? ^ ^^^^
+ <p><img class="pure-img" src="{{ url_for('tri_out', trigram='101') }}"></p>
? ++++++++++++++++++++++ ^^ ^^^^^
- <p>Call <pre>/trigrams/nnn.png</pre>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Trigrams are built from bottom to top.</p>
+ <p>Call <a href="{{ url_for('tri_out', trigram='101') }}"><pre>/trigrams/nnn.png</pre></a>Where <em>n</em> is 1 (a solid bar), or 0 (a broken bar). Trigrams are built from bottom to top.</p>
? ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++
</div>
<div class="pure-u-1-4"></div>
</div>
{% endblock %} | 8 | 0.5 | 4 | 4 |
d8f7c70c5d6544fd819e2dc120b8603ec80c1e49 | apps/show/components/related_shows/index.coffee | apps/show/components/related_shows/index.coffee | _ = require 'underscore'
{ Cities, FeaturedCities } = require 'places'
PartnerShows = require '../../../../collections/partner_shows.coffee'
RelatedShowsView = require './view.coffee'
module.exports = (type, show) ->
el = $('.js-related-shows')
city = _.findWhere(Cities, name: show.formatCity())
criteria =
sort: 'end_at'
size: 20
displayable: true
relatedShows = new PartnerShows
switch type
when 'fair'
data = _.extend criteria, {
fair_id: show.related().fair.get('_id')
}
title = "More Booths from #{show.related().fair.get('name')}"
when 'gallery'
data = _.extend criteria, {
sort: '-start_at'
status: "upcoming"
}
relatedShows.url = "#{show.related().partner.url()}/shows"
title = "Other Shows from #{show.partnerName()}"
when 'featured'
data = _.extend criteria, {
featured: true
status: 'running'
}
el = $('.js-featured-shows')
title = "Featured Shows"
when 'city'
data = _.extend criteria, {
near: show.location().getMapsLocation()
status: 'running'
}
title = "Current Shows in #{show.formatCity()}"
new RelatedShowsView
collection: relatedShows
title: title
el: el
show: show
city: city
relatedShows.fetch
data: data
success: ->
relatedShows.getShowsRelatedImages()
| _ = require 'underscore'
{ Cities, FeaturedCities } = require 'places'
PartnerShows = require '../../../../collections/partner_shows.coffee'
RelatedShowsView = require './view.coffee'
module.exports = (type, show) ->
el = $('.js-related-shows')
city = _.findWhere(Cities, name: show.formatCity())
criteria =
sort: 'end_at'
size: 20
displayable: true
relatedShows = new PartnerShows
switch type
when 'fair'
data = _.extend criteria, {
fair_id: show.related().fair.get('_id')
}
title = "More Booths from #{show.related().fair.get('name')}"
when 'gallery'
data = _.extend criteria, {
sort: '-start_at'
}
relatedShows.url = "#{show.related().partner.url()}/shows"
title = "Other Shows from #{show.partnerName()}"
when 'featured'
data = _.extend criteria, {
featured: true
status: 'running'
}
el = $('.js-featured-shows')
title = "Featured Shows"
when 'city'
data = _.extend criteria, {
near: show.location().getMapsLocation()
status: 'running'
}
title = "Current Shows in #{show.formatCity()}"
new RelatedShowsView
collection: relatedShows
title: title
el: el
show: show
city: city
relatedShows.fetch
data: data
success: ->
relatedShows.getShowsRelatedImages()
| Include past shows in related shows on gallery pages | Include past shows in related shows on gallery pages
| CoffeeScript | mit | izakp/force,kanaabe/force,oxaudo/force,yuki24/force,erikdstock/force,cavvia/force-1,xtina-starr/force,anandaroop/force,dblock/force,joeyAghion/force,yuki24/force,damassi/force,artsy/force-public,cavvia/force-1,yuki24/force,joeyAghion/force,mzikherman/force,mzikherman/force,yuki24/force,kanaabe/force,erikdstock/force,dblock/force,eessex/force,mzikherman/force,xtina-starr/force,kanaabe/force,anandaroop/force,damassi/force,oxaudo/force,kanaabe/force,artsy/force,artsy/force,eessex/force,oxaudo/force,TribeMedia/force-public,xtina-starr/force,mzikherman/force,artsy/force,dblock/force,damassi/force,erikdstock/force,oxaudo/force,cavvia/force-1,kanaabe/force,anandaroop/force,joeyAghion/force,xtina-starr/force,anandaroop/force,joeyAghion/force,damassi/force,artsy/force,erikdstock/force,izakp/force,izakp/force,TribeMedia/force-public,eessex/force,cavvia/force-1,eessex/force,artsy/force-public,izakp/force | coffeescript | ## Code Before:
_ = require 'underscore'
{ Cities, FeaturedCities } = require 'places'
PartnerShows = require '../../../../collections/partner_shows.coffee'
RelatedShowsView = require './view.coffee'
module.exports = (type, show) ->
el = $('.js-related-shows')
city = _.findWhere(Cities, name: show.formatCity())
criteria =
sort: 'end_at'
size: 20
displayable: true
relatedShows = new PartnerShows
switch type
when 'fair'
data = _.extend criteria, {
fair_id: show.related().fair.get('_id')
}
title = "More Booths from #{show.related().fair.get('name')}"
when 'gallery'
data = _.extend criteria, {
sort: '-start_at'
status: "upcoming"
}
relatedShows.url = "#{show.related().partner.url()}/shows"
title = "Other Shows from #{show.partnerName()}"
when 'featured'
data = _.extend criteria, {
featured: true
status: 'running'
}
el = $('.js-featured-shows')
title = "Featured Shows"
when 'city'
data = _.extend criteria, {
near: show.location().getMapsLocation()
status: 'running'
}
title = "Current Shows in #{show.formatCity()}"
new RelatedShowsView
collection: relatedShows
title: title
el: el
show: show
city: city
relatedShows.fetch
data: data
success: ->
relatedShows.getShowsRelatedImages()
## Instruction:
Include past shows in related shows on gallery pages
## Code After:
_ = require 'underscore'
{ Cities, FeaturedCities } = require 'places'
PartnerShows = require '../../../../collections/partner_shows.coffee'
RelatedShowsView = require './view.coffee'
module.exports = (type, show) ->
el = $('.js-related-shows')
city = _.findWhere(Cities, name: show.formatCity())
criteria =
sort: 'end_at'
size: 20
displayable: true
relatedShows = new PartnerShows
switch type
when 'fair'
data = _.extend criteria, {
fair_id: show.related().fair.get('_id')
}
title = "More Booths from #{show.related().fair.get('name')}"
when 'gallery'
data = _.extend criteria, {
sort: '-start_at'
}
relatedShows.url = "#{show.related().partner.url()}/shows"
title = "Other Shows from #{show.partnerName()}"
when 'featured'
data = _.extend criteria, {
featured: true
status: 'running'
}
el = $('.js-featured-shows')
title = "Featured Shows"
when 'city'
data = _.extend criteria, {
near: show.location().getMapsLocation()
status: 'running'
}
title = "Current Shows in #{show.formatCity()}"
new RelatedShowsView
collection: relatedShows
title: title
el: el
show: show
city: city
relatedShows.fetch
data: data
success: ->
relatedShows.getShowsRelatedImages()
| _ = require 'underscore'
{ Cities, FeaturedCities } = require 'places'
PartnerShows = require '../../../../collections/partner_shows.coffee'
RelatedShowsView = require './view.coffee'
module.exports = (type, show) ->
el = $('.js-related-shows')
city = _.findWhere(Cities, name: show.formatCity())
criteria =
sort: 'end_at'
size: 20
displayable: true
relatedShows = new PartnerShows
switch type
when 'fair'
data = _.extend criteria, {
fair_id: show.related().fair.get('_id')
}
title = "More Booths from #{show.related().fair.get('name')}"
when 'gallery'
data = _.extend criteria, {
sort: '-start_at'
- status: "upcoming"
}
relatedShows.url = "#{show.related().partner.url()}/shows"
title = "Other Shows from #{show.partnerName()}"
when 'featured'
data = _.extend criteria, {
featured: true
status: 'running'
}
el = $('.js-featured-shows')
title = "Featured Shows"
when 'city'
data = _.extend criteria, {
near: show.location().getMapsLocation()
status: 'running'
}
title = "Current Shows in #{show.formatCity()}"
new RelatedShowsView
collection: relatedShows
title: title
el: el
show: show
city: city
relatedShows.fetch
data: data
success: ->
relatedShows.getShowsRelatedImages()
| 1 | 0.017544 | 0 | 1 |
b78164e3ed6ddca895047d5b0e042e7074e192c3 | examples/logging_aspect.rb | examples/logging_aspect.rb | class A
def test input
input.upcase
end
end
##############################
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'aspector'
class LoggingAspect < Aspector::Base
around /.*/, :except => [:class], :context_arg => true do |context, *args, &block|
class_method = "#{self.class}.#{context.method_name}"
puts "Entering #{class_method}: #{args.join(',')}"
result = block.call *args
puts "Exiting #{class_method}: #{result}"
result
end
end
LoggingAspect.apply(A)
##############################
a = A.new
a.test 'input'
| class A
def test input
input.upcase
end
end
##############################
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'aspector'
class LoggingAspect < Aspector::Base
ALL_METHODS = /.*/
around ALL_METHODS, :except => :class, :context_arg => true do |context, *args, &block|
class_method = "#{self.class}.#{context.method_name}"
puts "Entering #{class_method}: #{args.join(',')}"
result = block.call *args
puts "Exiting #{class_method}: #{result}"
result
end
end
LoggingAspect.apply(A)
##############################
a = A.new
a.test 'input'
| Make aspect more readable by defining constants for all methods pattern | Make aspect more readable by defining constants for all methods pattern
| Ruby | mit | tmster/aspector,gcao/aspector,tmster/aspector | ruby | ## Code Before:
class A
def test input
input.upcase
end
end
##############################
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'aspector'
class LoggingAspect < Aspector::Base
around /.*/, :except => [:class], :context_arg => true do |context, *args, &block|
class_method = "#{self.class}.#{context.method_name}"
puts "Entering #{class_method}: #{args.join(',')}"
result = block.call *args
puts "Exiting #{class_method}: #{result}"
result
end
end
LoggingAspect.apply(A)
##############################
a = A.new
a.test 'input'
## Instruction:
Make aspect more readable by defining constants for all methods pattern
## Code After:
class A
def test input
input.upcase
end
end
##############################
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'aspector'
class LoggingAspect < Aspector::Base
ALL_METHODS = /.*/
around ALL_METHODS, :except => :class, :context_arg => true do |context, *args, &block|
class_method = "#{self.class}.#{context.method_name}"
puts "Entering #{class_method}: #{args.join(',')}"
result = block.call *args
puts "Exiting #{class_method}: #{result}"
result
end
end
LoggingAspect.apply(A)
##############################
a = A.new
a.test 'input'
| class A
def test input
input.upcase
end
end
##############################
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'aspector'
class LoggingAspect < Aspector::Base
+ ALL_METHODS = /.*/
- around /.*/, :except => [:class], :context_arg => true do |context, *args, &block|
? ^^^^ - -
+ around ALL_METHODS, :except => :class, :context_arg => true do |context, *args, &block|
? ^^^^^^^^^^^
class_method = "#{self.class}.#{context.method_name}"
puts "Entering #{class_method}: #{args.join(',')}"
result = block.call *args
puts "Exiting #{class_method}: #{result}"
result
end
end
LoggingAspect.apply(A)
##############################
a = A.new
a.test 'input'
| 3 | 0.090909 | 2 | 1 |
cd9eda24ad40b23344cf3cced5a6f6bc80064c7b | docs/EXERCISE_README_INSERT.md | docs/EXERCISE_README_INSERT.md | * * * *
For installation and learning resources, refer to the
[exercism help page](http://exercism.io/languages/ruby).
For running the tests provided, you will need the Minitest gem. Open a
terminal window and run the following command to install minitest:
gem install minitest
If you would like color output, you can `require 'minitest/pride'` in
the test file, or note the alternative instruction, below, for running
the test file.
In order to run the test, you can run the test file from the exercise
directory. For example, if the test suite is called
`hello_world_test.rb`, you can run the following command:
ruby hello_world_test.rb
To include color from the command line:
ruby -r minitest/pride hello_world_test.rb
The test files may have the execution bit set so you may also be able to
run it like this:
./hello_world_test.rb
| * * * *
For installation and learning resources, refer to the
[exercism help page](http://exercism.io/languages/ruby).
For running the tests provided, you will need the Minitest gem. Open a
terminal window and run the following command to install minitest:
gem install minitest
If you would like color output, you can `require 'minitest/pride'` in
the test file, or note the alternative instruction, below, for running
the test file.
In order to run the test, you can run the test file from the exercise
directory. For example, if the test suite is called
`hello_world_test.rb`, you can run the following command:
ruby hello_world_test.rb
To include color from the command line:
ruby -r minitest/pride hello_world_test.rb
| Remove instructions for direct test execution. | Remove instructions for direct test execution.
| Markdown | mit | NeimadTL/ruby,exercism/xruby,Insti/exercism-ruby,Insti/exercism-ruby,NeimadTL/ruby,Insti/exercism-ruby,Insti/xruby,Insti/xruby,exercism/xruby,NeimadTL/ruby | markdown | ## Code Before:
* * * *
For installation and learning resources, refer to the
[exercism help page](http://exercism.io/languages/ruby).
For running the tests provided, you will need the Minitest gem. Open a
terminal window and run the following command to install minitest:
gem install minitest
If you would like color output, you can `require 'minitest/pride'` in
the test file, or note the alternative instruction, below, for running
the test file.
In order to run the test, you can run the test file from the exercise
directory. For example, if the test suite is called
`hello_world_test.rb`, you can run the following command:
ruby hello_world_test.rb
To include color from the command line:
ruby -r minitest/pride hello_world_test.rb
The test files may have the execution bit set so you may also be able to
run it like this:
./hello_world_test.rb
## Instruction:
Remove instructions for direct test execution.
## Code After:
* * * *
For installation and learning resources, refer to the
[exercism help page](http://exercism.io/languages/ruby).
For running the tests provided, you will need the Minitest gem. Open a
terminal window and run the following command to install minitest:
gem install minitest
If you would like color output, you can `require 'minitest/pride'` in
the test file, or note the alternative instruction, below, for running
the test file.
In order to run the test, you can run the test file from the exercise
directory. For example, if the test suite is called
`hello_world_test.rb`, you can run the following command:
ruby hello_world_test.rb
To include color from the command line:
ruby -r minitest/pride hello_world_test.rb
| * * * *
For installation and learning resources, refer to the
[exercism help page](http://exercism.io/languages/ruby).
For running the tests provided, you will need the Minitest gem. Open a
terminal window and run the following command to install minitest:
gem install minitest
If you would like color output, you can `require 'minitest/pride'` in
the test file, or note the alternative instruction, below, for running
the test file.
In order to run the test, you can run the test file from the exercise
directory. For example, if the test suite is called
`hello_world_test.rb`, you can run the following command:
ruby hello_world_test.rb
To include color from the command line:
ruby -r minitest/pride hello_world_test.rb
- The test files may have the execution bit set so you may also be able to
- run it like this:
-
- ./hello_world_test.rb
- | 5 | 0.172414 | 0 | 5 |
36aa49935a2f936eeccf603d970f9135ba50ae6e | ivy.xml | ivy.xml | <?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">
<info organisation="net.filebot" module="java-installer" />
<dependencies>
<dependency org="org.apache.ant" name="ant" rev="latest.release" />
<dependency org="org.codehaus.groovy" name="groovy-ant" rev="latest.release" />
<dependency org="net.filebot" name="ant-spk" rev="latest.release" />
</dependencies>
</ivy-module>
| <?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">
<info organisation="net.filebot" module="java-installer" />
<dependencies>
<dependency org="org.apache.ant" name="ant" rev="1.10.3" />
<dependency org="org.codehaus.groovy" name="groovy-ant" rev="2.4.15" />
<dependency org="net.filebot" name="ant-spk" rev="0.6" />
</dependencies>
</ivy-module>
| Use fixed version numbers to improve build time | Use fixed version numbers to improve build time
| XML | apache-2.0 | rednoah/java-installer | xml | ## Code Before:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">
<info organisation="net.filebot" module="java-installer" />
<dependencies>
<dependency org="org.apache.ant" name="ant" rev="latest.release" />
<dependency org="org.codehaus.groovy" name="groovy-ant" rev="latest.release" />
<dependency org="net.filebot" name="ant-spk" rev="latest.release" />
</dependencies>
</ivy-module>
## Instruction:
Use fixed version numbers to improve build time
## Code After:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">
<info organisation="net.filebot" module="java-installer" />
<dependencies>
<dependency org="org.apache.ant" name="ant" rev="1.10.3" />
<dependency org="org.codehaus.groovy" name="groovy-ant" rev="2.4.15" />
<dependency org="net.filebot" name="ant-spk" rev="0.6" />
</dependencies>
</ivy-module>
| <?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0">
<info organisation="net.filebot" module="java-installer" />
<dependencies>
- <dependency org="org.apache.ant" name="ant" rev="latest.release" />
? ^^^^^^ ^^^^^^^
+ <dependency org="org.apache.ant" name="ant" rev="1.10.3" />
? ^ ^^^^
- <dependency org="org.codehaus.groovy" name="groovy-ant" rev="latest.release" />
? ^^^^^^ ^^^^^^^
+ <dependency org="org.codehaus.groovy" name="groovy-ant" rev="2.4.15" />
? ^ ^^^^
- <dependency org="net.filebot" name="ant-spk" rev="latest.release" />
? ^^^^^^ ^^^^^^^
+ <dependency org="net.filebot" name="ant-spk" rev="0.6" />
? ^ ^
</dependencies>
</ivy-module> | 6 | 0.666667 | 3 | 3 |
011db4c2de258e08e6d547f1dfe89f28f08fa714 | src/edu/stuy/commands/AutonSetting6.java | src/edu/stuy/commands/AutonSetting6.java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.stuy.commands;
/**
* Shoots from key at 2 point hoop
* @author admin
*/
import edu.stuy.subsystems.Flywheel;
import edu.wpi.first.wpilibj.command.CommandGroup;
public class AutonSetting6 extends CommandGroup {
public AutonSetting6 () {
double distanceInches = Flywheel.distances[Flywheel.KEY_MIDDLE_HOOP_INDEX];
addParallel(new FlywheelRun(distanceInches, Flywheel.speedsTopHoop));
addSequential(new ConveyAutomatic(Autonomous.CONVEY_AUTO_TIME));
}
} | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.stuy.commands;
/**
* Shoots from key at 2 point hoop
* @author admin
*/
import edu.stuy.subsystems.Flywheel;
import edu.wpi.first.wpilibj.command.CommandGroup;
public class AutonSetting6 extends CommandGroup {
public AutonSetting6 () {
double distanceInches = Flywheel.distances[Flywheel.KEY_INDEX];
addParallel(new FlywheelRun(distanceInches, Flywheel.speedsTopHoop));
addSequential(new ConveyAutomatic(Autonomous.CONVEY_AUTO_TIME));
}
} | Use top hoop for autonsettin6 instead of two-point shot | Use top hoop for autonsettin6 instead of two-point shot
| Java | bsd-3-clause | Team694/joebot | java | ## Code Before:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.stuy.commands;
/**
* Shoots from key at 2 point hoop
* @author admin
*/
import edu.stuy.subsystems.Flywheel;
import edu.wpi.first.wpilibj.command.CommandGroup;
public class AutonSetting6 extends CommandGroup {
public AutonSetting6 () {
double distanceInches = Flywheel.distances[Flywheel.KEY_MIDDLE_HOOP_INDEX];
addParallel(new FlywheelRun(distanceInches, Flywheel.speedsTopHoop));
addSequential(new ConveyAutomatic(Autonomous.CONVEY_AUTO_TIME));
}
}
## Instruction:
Use top hoop for autonsettin6 instead of two-point shot
## Code After:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.stuy.commands;
/**
* Shoots from key at 2 point hoop
* @author admin
*/
import edu.stuy.subsystems.Flywheel;
import edu.wpi.first.wpilibj.command.CommandGroup;
public class AutonSetting6 extends CommandGroup {
public AutonSetting6 () {
double distanceInches = Flywheel.distances[Flywheel.KEY_INDEX];
addParallel(new FlywheelRun(distanceInches, Flywheel.speedsTopHoop));
addSequential(new ConveyAutomatic(Autonomous.CONVEY_AUTO_TIME));
}
} | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.stuy.commands;
/**
* Shoots from key at 2 point hoop
* @author admin
*/
import edu.stuy.subsystems.Flywheel;
import edu.wpi.first.wpilibj.command.CommandGroup;
public class AutonSetting6 extends CommandGroup {
public AutonSetting6 () {
- double distanceInches = Flywheel.distances[Flywheel.KEY_MIDDLE_HOOP_INDEX];
? ------------
+ double distanceInches = Flywheel.distances[Flywheel.KEY_INDEX];
addParallel(new FlywheelRun(distanceInches, Flywheel.speedsTopHoop));
addSequential(new ConveyAutomatic(Autonomous.CONVEY_AUTO_TIME));
}
} | 2 | 0.1 | 1 | 1 |
d8e453ee8f6b6ea67847844a44f67d854b8daa9b | .travis.yml | .travis.yml | language:
- node_js
- python
node_js:
- "10"
- "8"
- "6"
- "node"
- "lts/*"
services: rabbitmq
before_script:
- sudo pip install pre-commit
| language:
- node_js
- python
node_js:
- "10"
- "8"
- "6"
- "node"
- "lts/*"
addons:
apt:
packages:
- rabbitmq-server
services: rabbitmq
before_script:
- sudo pip install pre-commit
| Add rabbitmq-server to apt addons for new ubuntu versions | Add rabbitmq-server to apt addons for new ubuntu versions
| YAML | mit | bakkerthehacker/bramqp | yaml | ## Code Before:
language:
- node_js
- python
node_js:
- "10"
- "8"
- "6"
- "node"
- "lts/*"
services: rabbitmq
before_script:
- sudo pip install pre-commit
## Instruction:
Add rabbitmq-server to apt addons for new ubuntu versions
## Code After:
language:
- node_js
- python
node_js:
- "10"
- "8"
- "6"
- "node"
- "lts/*"
addons:
apt:
packages:
- rabbitmq-server
services: rabbitmq
before_script:
- sudo pip install pre-commit
| language:
- node_js
- python
node_js:
- "10"
- "8"
- "6"
- "node"
- "lts/*"
+ addons:
+ apt:
+ packages:
+ - rabbitmq-server
services: rabbitmq
before_script:
- sudo pip install pre-commit | 4 | 0.333333 | 4 | 0 |
9a39d3b95887e1dd1acb9722b7d05b3eba7fc3f6 | package.json | package.json | {
"name": "trumpet",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start --skipflow",
"test": "yarn build && jest",
"lint": "tslint --project tsconfig.json --type-check",
"build": "tsc",
"build:watch": "tsc --watch"
},
"jest": {
"preset": "react-native",
"testRegex": "dist/__tests__/.*.jsx?$"
},
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.43.3"
},
"devDependencies": {
"@types/jest": "^19.2.2",
"@types/react": "^15.0.21",
"@types/react-native": "^0.43.1",
"@types/react-test-renderer": "^15.4.5",
"axios": "^0.16.1",
"jest": "^19.0.2",
"react-test-renderer": "16.0.0-alpha.6",
"tslint": "^5.1.0",
"typescript": "^2.2.2"
}
}
| {
"name": "trumpet",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start --skipflow",
"android": "node node_modules/react-native/local-cli/cli.js run-android",
"ios": "node node_modules/react-native/local-cli/cli.js run-ios",
"test": "yarn build && jest",
"lint": "tslint --project tsconfig.json --type-check",
"build": "tsc",
"build:watch": "tsc --watch"
},
"jest": {
"preset": "react-native",
"testRegex": "dist/__tests__/.*.jsx?$"
},
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.43.3"
},
"devDependencies": {
"@types/jest": "^19.2.2",
"@types/react": "^15.0.21",
"@types/react-native": "^0.43.1",
"@types/react-test-renderer": "^15.4.5",
"axios": "^0.16.1",
"jest": "^19.0.2",
"react-test-renderer": "16.0.0-alpha.6",
"tslint": "^5.1.0",
"typescript": "^2.2.2"
}
}
| Add android and ios npm script for development | Add android and ios npm script for development
| JSON | mit | y0za/trumpet,y0za/trumpet,y0za/trumpet,y0za/trumpet | json | ## Code Before:
{
"name": "trumpet",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start --skipflow",
"test": "yarn build && jest",
"lint": "tslint --project tsconfig.json --type-check",
"build": "tsc",
"build:watch": "tsc --watch"
},
"jest": {
"preset": "react-native",
"testRegex": "dist/__tests__/.*.jsx?$"
},
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.43.3"
},
"devDependencies": {
"@types/jest": "^19.2.2",
"@types/react": "^15.0.21",
"@types/react-native": "^0.43.1",
"@types/react-test-renderer": "^15.4.5",
"axios": "^0.16.1",
"jest": "^19.0.2",
"react-test-renderer": "16.0.0-alpha.6",
"tslint": "^5.1.0",
"typescript": "^2.2.2"
}
}
## Instruction:
Add android and ios npm script for development
## Code After:
{
"name": "trumpet",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start --skipflow",
"android": "node node_modules/react-native/local-cli/cli.js run-android",
"ios": "node node_modules/react-native/local-cli/cli.js run-ios",
"test": "yarn build && jest",
"lint": "tslint --project tsconfig.json --type-check",
"build": "tsc",
"build:watch": "tsc --watch"
},
"jest": {
"preset": "react-native",
"testRegex": "dist/__tests__/.*.jsx?$"
},
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.43.3"
},
"devDependencies": {
"@types/jest": "^19.2.2",
"@types/react": "^15.0.21",
"@types/react-native": "^0.43.1",
"@types/react-test-renderer": "^15.4.5",
"axios": "^0.16.1",
"jest": "^19.0.2",
"react-test-renderer": "16.0.0-alpha.6",
"tslint": "^5.1.0",
"typescript": "^2.2.2"
}
}
| {
"name": "trumpet",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start --skipflow",
+ "android": "node node_modules/react-native/local-cli/cli.js run-android",
+ "ios": "node node_modules/react-native/local-cli/cli.js run-ios",
"test": "yarn build && jest",
"lint": "tslint --project tsconfig.json --type-check",
"build": "tsc",
"build:watch": "tsc --watch"
},
"jest": {
"preset": "react-native",
"testRegex": "dist/__tests__/.*.jsx?$"
},
"dependencies": {
"react": "16.0.0-alpha.6",
"react-native": "0.43.3"
},
"devDependencies": {
"@types/jest": "^19.2.2",
"@types/react": "^15.0.21",
"@types/react-native": "^0.43.1",
"@types/react-test-renderer": "^15.4.5",
"axios": "^0.16.1",
"jest": "^19.0.2",
"react-test-renderer": "16.0.0-alpha.6",
"tslint": "^5.1.0",
"typescript": "^2.2.2"
}
} | 2 | 0.064516 | 2 | 0 |
06701a2fa969f461f476522609e94f065fb97e0e | usr.bin/du/Makefile | usr.bin/du/Makefile |
PROG= du
DPADD= ${LIBM}
LDADD= -lm
.include <bsd.prog.mk>
|
PROG= du
WARNS?= 6
DPADD= ${LIBM}
LDADD= -lm
.include <bsd.prog.mk>
| Mark du(1) as WARNS6 clean. | Mark du(1) as WARNS6 clean.
Tested on: alpha, amd64, i386, ia64, sparc64
| unknown | bsd-3-clause | jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase | unknown | ## Code Before:
PROG= du
DPADD= ${LIBM}
LDADD= -lm
.include <bsd.prog.mk>
## Instruction:
Mark du(1) as WARNS6 clean.
Tested on: alpha, amd64, i386, ia64, sparc64
## Code After:
PROG= du
WARNS?= 6
DPADD= ${LIBM}
LDADD= -lm
.include <bsd.prog.mk>
|
PROG= du
+ WARNS?= 6
DPADD= ${LIBM}
LDADD= -lm
.include <bsd.prog.mk> | 1 | 0.166667 | 1 | 0 |
7953158641cf348aedb09d663fbdb227adb06ebc | share/spice/xkcd/display/content.handlebars | share/spice/xkcd/display/content.handlebars | <div class="xkcd--container">
<div style="" class="xkcd--information">
<h3 class="zci__caption zci__result">{{title}}</h3>
<h4 class="zci__subheader xkcd--date">{{month}} {{day}}, {{year}}</h4>
<div class="xkcd--buttons">
{{#xkcd_previousNum num}}
<a href="/?q=xkcd+{{num}}">Prev</a>
{{/xkcd_previousNum}}
<span>|</span>
{{#if has_next}}
{{#xkcd_nextNum num}}
<a href="/?q=xkcd+{{num}}">Next</a>
{{/xkcd_nextNum}}
<span>|</span>
{{/if}}
<a href="http://www.explainxkcd.com/wiki/index.php/{{num}}">Explain</a>
</div>
</div>
<img src="{{imageProxy img}}" title="{{alt}}" alt="{{title}}" class="xkcd--img">
</div> | <div class="xkcd--container">
<div style="" class="xkcd--information">
<h3 class="zci__header">{{title}}</h3>
<h4 class="zci__subheader xkcd--date">{{month}} {{day}}, {{year}}</h4>
<div class="xkcd--buttons">
{{#xkcd_previousNum num}}
<a href="/?q=xkcd+{{num}}">Prev</a>
{{/xkcd_previousNum}}
<span>|</span>
{{#if has_next}}
{{#xkcd_nextNum num}}
<a href="/?q=xkcd+{{num}}">Next</a>
{{/xkcd_nextNum}}
<span>|</span>
{{/if}}
<a href="http://www.explainxkcd.com/wiki/index.php/{{num}}">Explain</a>
</div>
</div>
<img src="{{imageProxy img}}" title="{{alt}}" alt="{{title}}" class="xkcd--img">
</div> | Change Title to use zci__header CSS class | Change Title to use zci__header CSS class
| Handlebars | apache-2.0 | ppant/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,deserted/zeroclickinfo-spice,stennie/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,imwally/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,sevki/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,imwally/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,deserted/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,soleo/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,soleo/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,lerna/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,ppant/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,echosa/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,lernae/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,deserted/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,levaly/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,ppant/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,levaly/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,stevenmg/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,lerna/zeroclickinfo-spice,imwally/zeroclickinfo-spice,mayo/zeroclickinfo-spice,sevki/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,lerna/zeroclickinfo-spice,mayo/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,P71/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,lerna/zeroclickinfo-spice,mayo/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,stennie/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,lerna/zeroclickinfo-spice,levaly/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,evejweinberg/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,soleo/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,bibliotechy/zeroclickinfo-spice,ScreapDK/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,levaly/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,sevki/zeroclickinfo-spice,echosa/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,lernae/zeroclickinfo-spice,sevki/zeroclickinfo-spice,soleo/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,lernae/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,echosa/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,deserted/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,mohan08p/zeroclickinfo-spice,P71/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,imwally/zeroclickinfo-spice,dachinzo/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,lernae/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,Kr1tya3/zeroclickinfo-spice,levaly/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,andrey-p/zeroclickinfo-spice,gautamkrishnar/zeroclickinfo-spice,dogomedia/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,deserted/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,soleo/zeroclickinfo-spice,mayo/zeroclickinfo-spice,deserted/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,lernae/zeroclickinfo-spice,samskeller/zeroclickinfo-spice,levaly/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,echosa/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,Faiz7412/zeroclickinfo-spice,stennie/zeroclickinfo-spice,loganom/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,dheeraj143/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,navjotahuja92/zeroclickinfo-spice,AcriCAA/zeroclickinfo-spice,shyamalschandra/zeroclickinfo-spice,whalenrp/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,digit4lfa1l/zeroclickinfo-spice,P71/zeroclickinfo-spice,ColasBroux/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,echosa/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,loganom/zeroclickinfo-spice,TomBebbington/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,GrandpaCardigan/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,Dwaligon/zeroclickinfo-spice,mr-karan/zeroclickinfo-spice,MoriTanosuke/zeroclickinfo-spice,soleo/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,loganom/zeroclickinfo-spice,imwally/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,iambibhas/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,lw7360/zeroclickinfo-spice,lernae/zeroclickinfo-spice,bdjnk/zeroclickinfo-spice,jyounker/zeroclickinfo-spice,ppant/zeroclickinfo-spice,cylgom/zeroclickinfo-spice,tagawa/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,brianrisk/zeroclickinfo-spice,marianosimone/zeroclickinfo-spice,bigcurl/zeroclickinfo-spice,Queeniebee/zeroclickinfo-spice,xaviervalarino/zeroclickinfo-spice,rubinovitz/zeroclickinfo-spice,sagarhani/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,Retrobottega/zeroclickinfo-spice,kevintab95/zeroclickinfo-spice,rmad17/zeroclickinfo-spice,P71/zeroclickinfo-spice,Kakkoroid/zeroclickinfo-spice,hshackathons/zeroclickinfo-spice,loganom/zeroclickinfo-spice,alexandernext/zeroclickinfo-spice,stennie/zeroclickinfo-spice | handlebars | ## Code Before:
<div class="xkcd--container">
<div style="" class="xkcd--information">
<h3 class="zci__caption zci__result">{{title}}</h3>
<h4 class="zci__subheader xkcd--date">{{month}} {{day}}, {{year}}</h4>
<div class="xkcd--buttons">
{{#xkcd_previousNum num}}
<a href="/?q=xkcd+{{num}}">Prev</a>
{{/xkcd_previousNum}}
<span>|</span>
{{#if has_next}}
{{#xkcd_nextNum num}}
<a href="/?q=xkcd+{{num}}">Next</a>
{{/xkcd_nextNum}}
<span>|</span>
{{/if}}
<a href="http://www.explainxkcd.com/wiki/index.php/{{num}}">Explain</a>
</div>
</div>
<img src="{{imageProxy img}}" title="{{alt}}" alt="{{title}}" class="xkcd--img">
</div>
## Instruction:
Change Title to use zci__header CSS class
## Code After:
<div class="xkcd--container">
<div style="" class="xkcd--information">
<h3 class="zci__header">{{title}}</h3>
<h4 class="zci__subheader xkcd--date">{{month}} {{day}}, {{year}}</h4>
<div class="xkcd--buttons">
{{#xkcd_previousNum num}}
<a href="/?q=xkcd+{{num}}">Prev</a>
{{/xkcd_previousNum}}
<span>|</span>
{{#if has_next}}
{{#xkcd_nextNum num}}
<a href="/?q=xkcd+{{num}}">Next</a>
{{/xkcd_nextNum}}
<span>|</span>
{{/if}}
<a href="http://www.explainxkcd.com/wiki/index.php/{{num}}">Explain</a>
</div>
</div>
<img src="{{imageProxy img}}" title="{{alt}}" alt="{{title}}" class="xkcd--img">
</div> | <div class="xkcd--container">
<div style="" class="xkcd--information">
- <h3 class="zci__caption zci__result">{{title}}</h3>
? ^ ^^^^^^^^^^^^ -----
+ <h3 class="zci__header">{{title}}</h3>
? ^^ ^^
<h4 class="zci__subheader xkcd--date">{{month}} {{day}}, {{year}}</h4>
<div class="xkcd--buttons">
{{#xkcd_previousNum num}}
<a href="/?q=xkcd+{{num}}">Prev</a>
{{/xkcd_previousNum}}
<span>|</span>
{{#if has_next}}
{{#xkcd_nextNum num}}
<a href="/?q=xkcd+{{num}}">Next</a>
{{/xkcd_nextNum}}
<span>|</span>
{{/if}}
<a href="http://www.explainxkcd.com/wiki/index.php/{{num}}">Explain</a>
</div>
</div>
<img src="{{imageProxy img}}" title="{{alt}}" alt="{{title}}" class="xkcd--img">
</div> | 2 | 0.095238 | 1 | 1 |
7ac2abeb2b4ccc5ff776ece6f02dd5261f6e7f72 | app/config/environments/production.js | app/config/environments/production.js | module.exports = {
database: process.env.MONGOLAB_URI
, server_port: '80'
} | module.exports = {
database: process.env.MONGOLAB_URI
, server_port: process.env.PORT || 3000;
} | Fix port config for Heroku | Fix port config for Heroku
| JavaScript | apache-2.0 | rrodrigu3z/ospriet_example,rrodrigu3z/ospriet_example | javascript | ## Code Before:
module.exports = {
database: process.env.MONGOLAB_URI
, server_port: '80'
}
## Instruction:
Fix port config for Heroku
## Code After:
module.exports = {
database: process.env.MONGOLAB_URI
, server_port: process.env.PORT || 3000;
} | module.exports = {
database: process.env.MONGOLAB_URI
- , server_port: '80'
+ , server_port: process.env.PORT || 3000;
} | 2 | 0.5 | 1 | 1 |
07aaf9a942082e6b105755bd9e386167b89e1d88 | static/view.js | static/view.js | if (document.body.className.indexOf("no-contains-view")>-1) {
console.log("No view detected");
} else {
var cvbtn = document.querySelector(".view-buttons .cards");
var lvbtn = document.querySelector(".view-buttons .list");
var vlst = document.querySelector(".view");
var listView = function () {
cvbtn.classList.remove("active");
lvbtn.classList.add("active");
vlst.classList.remove("cards");
vlst.classList.add("list");
localStorage.setItem("view", "list");
}
var cardsView = function () {
lvbtn.classList.remove("active");
cvbtn.classList.add("active");
vlst.classList.remove("list");
vlst.classList.add("cards");
localStorage.setItem("view", "cards");
}
var restoreView = function () {
if (localStorage in window) {
var v = localStorage.getItem("view");
if (v !== null) {
if (v == "list") {
listView();
} else {
cardsView();
}
} else {
cardsView();
}
} else {
cardsView();
}
}
lvbtn.addEventListener("click", listView);
cvbtn.addEventListener("click", cardsView);
restoreView();
} | if (document.body.className.indexOf("no-contains-view")>-1) {
console.log("No view detected");
} else {
var cvbtn = document.querySelector(".view-buttons .cards");
var lvbtn = document.querySelector(".view-buttons .list");
var vlst = document.querySelector(".view");
var listView = function () {
cvbtn.classList.remove("active");
lvbtn.classList.add("active");
vlst.classList.remove("cards");
vlst.classList.add("list");
localStorage.setItem("view", "list");
}
var cardsView = function () {
lvbtn.classList.remove("active");
cvbtn.classList.add("active");
vlst.classList.remove("list");
vlst.classList.add("cards");
localStorage.setItem("view", "cards");
}
var restoreView = function () {
if (window.localStorage) {
var v = localStorage.getItem("view");
if (v !== null) {
if (v == "list") {
listView();
} else {
cardsView();
}
} else {
cardsView();
}
} else {
cardsView();
}
}
lvbtn.addEventListener("click", listView);
cvbtn.addEventListener("click", cardsView);
restoreView();
} | Fix bug in web UI | Fix bug in web UI
| JavaScript | mit | dontpanicgr/BookBrowser,geek1011/BookBrowser,geek1011/BookBrowser,dontpanicgr/BookBrowser,dontpanicgr/BookBrowser,dontpanicgr/BookBrowser,geek1011/BookBrowser | javascript | ## Code Before:
if (document.body.className.indexOf("no-contains-view")>-1) {
console.log("No view detected");
} else {
var cvbtn = document.querySelector(".view-buttons .cards");
var lvbtn = document.querySelector(".view-buttons .list");
var vlst = document.querySelector(".view");
var listView = function () {
cvbtn.classList.remove("active");
lvbtn.classList.add("active");
vlst.classList.remove("cards");
vlst.classList.add("list");
localStorage.setItem("view", "list");
}
var cardsView = function () {
lvbtn.classList.remove("active");
cvbtn.classList.add("active");
vlst.classList.remove("list");
vlst.classList.add("cards");
localStorage.setItem("view", "cards");
}
var restoreView = function () {
if (localStorage in window) {
var v = localStorage.getItem("view");
if (v !== null) {
if (v == "list") {
listView();
} else {
cardsView();
}
} else {
cardsView();
}
} else {
cardsView();
}
}
lvbtn.addEventListener("click", listView);
cvbtn.addEventListener("click", cardsView);
restoreView();
}
## Instruction:
Fix bug in web UI
## Code After:
if (document.body.className.indexOf("no-contains-view")>-1) {
console.log("No view detected");
} else {
var cvbtn = document.querySelector(".view-buttons .cards");
var lvbtn = document.querySelector(".view-buttons .list");
var vlst = document.querySelector(".view");
var listView = function () {
cvbtn.classList.remove("active");
lvbtn.classList.add("active");
vlst.classList.remove("cards");
vlst.classList.add("list");
localStorage.setItem("view", "list");
}
var cardsView = function () {
lvbtn.classList.remove("active");
cvbtn.classList.add("active");
vlst.classList.remove("list");
vlst.classList.add("cards");
localStorage.setItem("view", "cards");
}
var restoreView = function () {
if (window.localStorage) {
var v = localStorage.getItem("view");
if (v !== null) {
if (v == "list") {
listView();
} else {
cardsView();
}
} else {
cardsView();
}
} else {
cardsView();
}
}
lvbtn.addEventListener("click", listView);
cvbtn.addEventListener("click", cardsView);
restoreView();
} | if (document.body.className.indexOf("no-contains-view")>-1) {
console.log("No view detected");
} else {
var cvbtn = document.querySelector(".view-buttons .cards");
var lvbtn = document.querySelector(".view-buttons .list");
var vlst = document.querySelector(".view");
var listView = function () {
cvbtn.classList.remove("active");
lvbtn.classList.add("active");
vlst.classList.remove("cards");
vlst.classList.add("list");
localStorage.setItem("view", "list");
}
var cardsView = function () {
lvbtn.classList.remove("active");
cvbtn.classList.add("active");
vlst.classList.remove("list");
vlst.classList.add("cards");
localStorage.setItem("view", "cards");
}
var restoreView = function () {
- if (localStorage in window) {
? ----------
+ if (window.localStorage) {
? +++++++
var v = localStorage.getItem("view");
if (v !== null) {
if (v == "list") {
listView();
} else {
cardsView();
}
} else {
cardsView();
}
} else {
cardsView();
}
}
lvbtn.addEventListener("click", listView);
cvbtn.addEventListener("click", cardsView);
restoreView();
} | 2 | 0.044444 | 1 | 1 |
f3c4eb0a94502c072efec4acbe80c89416586aba | db/migrate/041_index_requests_with_solr.rb | db/migrate/041_index_requests_with_solr.rb | class IndexRequestsWithSolr < ActiveRecord::Migration
def self.up
add_column :info_requests, :solr_up_to_date, :boolean, :default => false, :null => false
end
def self.down
remove_column :info_requests, :solr_up_to_date
end
end
| class IndexRequestsWithSolr < ActiveRecord::Migration
def self.up
add_column :info_requests, :solr_up_to_date, :boolean, :default => false, :null => false
add_index :info_requests, :solr_up_to_date
end
def self.down
remove_index :info_requests, :solr_up_to_date
remove_column :info_requests, :solr_up_to_date
end
end
| Index the solr freshness boolean | Index the solr freshness boolean
| Ruby | agpl-3.0 | nzherald/alaveteli,petterreinholdtsen/alaveteli,nzherald/alaveteli,codeforcroatia/alaveteli,nzherald/alaveteli,datauy/alaveteli,andreicristianpetcu/alaveteli_old,TEDICpy/QueremoSaber,4bic/alaveteli,hasadna/alaveteli,4bic/alaveteli,nzherald/alaveteli,10layer/alaveteli,andreicristianpetcu/alaveteli,10layer/alaveteli,hasadna/alaveteli,petterreinholdtsen/alaveteli,andreicristianpetcu/alaveteli_old,andreicristianpetcu/alaveteli_old,TEDICpy/QueremoSaber,4bic/alaveteli,Br3nda/alaveteli,hasadna/alaveteli,andreicristianpetcu/alaveteli_old,4bic/alaveteli,sarhane/alaveteli-test,sarhane/alaveteli-test,hasadna/alaveteli,Br3nda/alaveteli,Br3nda/alaveteli,obshtestvo/alaveteli-bulgaria,petterreinholdtsen/alaveteli,Br3nda/alaveteli,4bic/alaveteli,nzherald/alaveteli,Br3nda/alaveteli,obshtestvo/alaveteli-bulgaria,hasadna/alaveteli,TEDICpy/QueremoSaber,hasadna/alaveteli,andreicristianpetcu/alaveteli,andreicristianpetcu/alaveteli_old,TEDICpy/QueremoSaber,andreicristianpetcu/alaveteli,andreicristianpetcu/alaveteli,sarhane/alaveteli-test,obshtestvo/alaveteli-bulgaria,andreicristianpetcu/alaveteli,codeforcroatia/alaveteli,kuahyeow/foi,datauy/alaveteli,10layer/alaveteli,petterreinholdtsen/alaveteli,sarhane/alaveteli-test,TEDICpy/QueremoSaber,datauy/alaveteli,obshtestvo/alaveteli-bulgaria,codeforcroatia/alaveteli,obshtestvo/alaveteli-bulgaria,kuahyeow/foi,petterreinholdtsen/alaveteli,codeforcroatia/alaveteli | ruby | ## Code Before:
class IndexRequestsWithSolr < ActiveRecord::Migration
def self.up
add_column :info_requests, :solr_up_to_date, :boolean, :default => false, :null => false
end
def self.down
remove_column :info_requests, :solr_up_to_date
end
end
## Instruction:
Index the solr freshness boolean
## Code After:
class IndexRequestsWithSolr < ActiveRecord::Migration
def self.up
add_column :info_requests, :solr_up_to_date, :boolean, :default => false, :null => false
add_index :info_requests, :solr_up_to_date
end
def self.down
remove_index :info_requests, :solr_up_to_date
remove_column :info_requests, :solr_up_to_date
end
end
| class IndexRequestsWithSolr < ActiveRecord::Migration
def self.up
add_column :info_requests, :solr_up_to_date, :boolean, :default => false, :null => false
+ add_index :info_requests, :solr_up_to_date
end
def self.down
+ remove_index :info_requests, :solr_up_to_date
remove_column :info_requests, :solr_up_to_date
end
end | 2 | 0.222222 | 2 | 0 |
01bd62a56a7c9cda77cccfb1d94dfd6c786bf1d5 | models/user-model.js | models/user-model.js | 'use strict';
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
var jwt = require('jwt-simple');
var moment = require('moment');
/**
* Define basic schema for a new user: for now, email, password, and domain to track
*/
var UserSchema = mongoose.Schema({
id: String,
sites: Array,
basic: {
email: String,
password: String
}
});
/**
* Run an incoming password through a one-way hash
*/
UserSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null); // 8: larger = more secure, but exponentially slower
};
/**
* Check incoming password against db's hashed password
*/
UserSchema.methods.matchingPassword = function(password) {
return bcrypt.compareSync(password, this.basic.password);
};
/**
* After a user is succesfully authenticated, create a new JWT
*/
UserSchema.methods.createToken = function(app) {
var expires = moment().add(7, 'days').valueOf();
var self = this;
var token = jwt.encode({
iss: self._id, // basically == id
expires: expires
}, app.get('jwtTokenSecret')); // The token we config in server.js
return token;
};
module.exports = mongoose.model('UserModel', UserSchema); | 'use strict';
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
var jwt = require('jwt-simple');
var moment = require('moment');
/**
* Define basic schema for a new user: for now, email, password, and domain to track
*/
var UserSchema = mongoose.Schema({
id: String,
sites: Array,
jwt: String,
basic: {
email: String,
password: String
}
});
/**
* Run an incoming password through a one-way hash
*/
UserSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null); // 8: larger = more secure, but exponentially slower
};
/**
* Check incoming password against db's hashed password
*/
UserSchema.methods.matchingPassword = function(password) {
return bcrypt.compareSync(password, this.basic.password);
};
/**
* After a user is succesfully authenticated, create a new JWT
*/
UserSchema.methods.createToken = function(app) {
var expires = moment().add(7, 'days').valueOf();
var self = this;
var token = jwt.encode({
iss: self._id, // basically == id
expires: expires
}, app.get('jwtTokenSecret')); // The token we config in server.js
return token;
};
module.exports = mongoose.model('UserModel', UserSchema); | Add JWT as an attribute, so we can return it with the db response | Add JWT as an attribute, so we can return it with the db response
| JavaScript | mit | Sextant-WDB/sextant-ng | javascript | ## Code Before:
'use strict';
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
var jwt = require('jwt-simple');
var moment = require('moment');
/**
* Define basic schema for a new user: for now, email, password, and domain to track
*/
var UserSchema = mongoose.Schema({
id: String,
sites: Array,
basic: {
email: String,
password: String
}
});
/**
* Run an incoming password through a one-way hash
*/
UserSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null); // 8: larger = more secure, but exponentially slower
};
/**
* Check incoming password against db's hashed password
*/
UserSchema.methods.matchingPassword = function(password) {
return bcrypt.compareSync(password, this.basic.password);
};
/**
* After a user is succesfully authenticated, create a new JWT
*/
UserSchema.methods.createToken = function(app) {
var expires = moment().add(7, 'days').valueOf();
var self = this;
var token = jwt.encode({
iss: self._id, // basically == id
expires: expires
}, app.get('jwtTokenSecret')); // The token we config in server.js
return token;
};
module.exports = mongoose.model('UserModel', UserSchema);
## Instruction:
Add JWT as an attribute, so we can return it with the db response
## Code After:
'use strict';
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
var jwt = require('jwt-simple');
var moment = require('moment');
/**
* Define basic schema for a new user: for now, email, password, and domain to track
*/
var UserSchema = mongoose.Schema({
id: String,
sites: Array,
jwt: String,
basic: {
email: String,
password: String
}
});
/**
* Run an incoming password through a one-way hash
*/
UserSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null); // 8: larger = more secure, but exponentially slower
};
/**
* Check incoming password against db's hashed password
*/
UserSchema.methods.matchingPassword = function(password) {
return bcrypt.compareSync(password, this.basic.password);
};
/**
* After a user is succesfully authenticated, create a new JWT
*/
UserSchema.methods.createToken = function(app) {
var expires = moment().add(7, 'days').valueOf();
var self = this;
var token = jwt.encode({
iss: self._id, // basically == id
expires: expires
}, app.get('jwtTokenSecret')); // The token we config in server.js
return token;
};
module.exports = mongoose.model('UserModel', UserSchema); | 'use strict';
var mongoose = require('mongoose');
var bcrypt = require('bcrypt-nodejs');
var jwt = require('jwt-simple');
var moment = require('moment');
/**
* Define basic schema for a new user: for now, email, password, and domain to track
*/
var UserSchema = mongoose.Schema({
id: String,
sites: Array,
+ jwt: String,
basic: {
email: String,
password: String
}
});
/**
* Run an incoming password through a one-way hash
*/
UserSchema.methods.generateHash = function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null); // 8: larger = more secure, but exponentially slower
};
/**
* Check incoming password against db's hashed password
*/
UserSchema.methods.matchingPassword = function(password) {
return bcrypt.compareSync(password, this.basic.password);
};
/**
* After a user is succesfully authenticated, create a new JWT
*/
UserSchema.methods.createToken = function(app) {
var expires = moment().add(7, 'days').valueOf();
var self = this;
var token = jwt.encode({
iss: self._id, // basically == id
expires: expires
}, app.get('jwtTokenSecret')); // The token we config in server.js
return token;
};
module.exports = mongoose.model('UserModel', UserSchema); | 1 | 0.018519 | 1 | 0 |
2e449712aba43dc0f0fb1184f24557ce07f12b3e | tests/CMakeLists.txt | tests/CMakeLists.txt | set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/..
)
set(model_view_SRCS
model-view.cpp
roles-proxy-model.cpp
)
kde4_add_ui_files(model_view_SRCS model-view.ui)
###
kde4_add_executable(ktp_contact_list_model_view
${model_view_SRCS}
contact-list-model-view-main.cpp
)
target_link_libraries(ktp_contact_list_model_view
${QT_QTTEST_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${TELEPATHY_QT4_LIBRARIES}
ktpcommoninternalsprivate
ktpmodelsprivate
)
kde4_add_executable(ktp_kpeople_list_model_view
${model_view_SRCS}
kpeople-model-view-main.cpp
)
target_link_libraries(ktp_kpeople_list_model_view
${QT_QTTEST_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${TELEPATHY_QT4_LIBRARIES}
${KPEOPLE_LIBS}
ktpcommoninternalsprivate
ktpmodelsprivate
)
| set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/..
)
set(model_view_SRCS
model-view.cpp
roles-proxy-model.cpp
)
kde4_add_ui_files(model_view_SRCS model-view.ui)
###
kde4_add_executable(ktp_contact_list_model_view
${model_view_SRCS}
contact-list-model-view-main.cpp
)
target_link_libraries(ktp_contact_list_model_view
${QT_QTTEST_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${TELEPATHY_QT4_LIBRARIES}
ktpcommoninternalsprivate
ktpmodelsprivate
)
if (KPEOPLE_FOUND)
include_directories(${KPEOPLE_INCLUDES})
kde4_add_executable(ktp_kpeople_list_model_view
${model_view_SRCS}
kpeople-model-view-main.cpp
)
target_link_libraries(ktp_kpeople_list_model_view
${QT_QTTEST_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${TELEPATHY_QT4_LIBRARIES}
${KPEOPLE_LIBS}
ktpcommoninternalsprivate
ktpmodelsprivate
)
endif (KPEOPLE_FOUND)
| Add if kpeople guard around building kpeople test | Add if kpeople guard around building kpeople test
Reviewed-by: David Edmundson
| Text | lgpl-2.1 | KDE/ktp-common-internals,KDE/ktp-common-internals,KDE/ktp-common-internals | text | ## Code Before:
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/..
)
set(model_view_SRCS
model-view.cpp
roles-proxy-model.cpp
)
kde4_add_ui_files(model_view_SRCS model-view.ui)
###
kde4_add_executable(ktp_contact_list_model_view
${model_view_SRCS}
contact-list-model-view-main.cpp
)
target_link_libraries(ktp_contact_list_model_view
${QT_QTTEST_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${TELEPATHY_QT4_LIBRARIES}
ktpcommoninternalsprivate
ktpmodelsprivate
)
kde4_add_executable(ktp_kpeople_list_model_view
${model_view_SRCS}
kpeople-model-view-main.cpp
)
target_link_libraries(ktp_kpeople_list_model_view
${QT_QTTEST_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${TELEPATHY_QT4_LIBRARIES}
${KPEOPLE_LIBS}
ktpcommoninternalsprivate
ktpmodelsprivate
)
## Instruction:
Add if kpeople guard around building kpeople test
Reviewed-by: David Edmundson
## Code After:
set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/..
)
set(model_view_SRCS
model-view.cpp
roles-proxy-model.cpp
)
kde4_add_ui_files(model_view_SRCS model-view.ui)
###
kde4_add_executable(ktp_contact_list_model_view
${model_view_SRCS}
contact-list-model-view-main.cpp
)
target_link_libraries(ktp_contact_list_model_view
${QT_QTTEST_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${TELEPATHY_QT4_LIBRARIES}
ktpcommoninternalsprivate
ktpmodelsprivate
)
if (KPEOPLE_FOUND)
include_directories(${KPEOPLE_INCLUDES})
kde4_add_executable(ktp_kpeople_list_model_view
${model_view_SRCS}
kpeople-model-view-main.cpp
)
target_link_libraries(ktp_kpeople_list_model_view
${QT_QTTEST_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${TELEPATHY_QT4_LIBRARIES}
${KPEOPLE_LIBS}
ktpcommoninternalsprivate
ktpmodelsprivate
)
endif (KPEOPLE_FOUND)
| set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}/..
${CMAKE_CURRENT_SOURCE_DIR}/..
)
set(model_view_SRCS
model-view.cpp
roles-proxy-model.cpp
)
kde4_add_ui_files(model_view_SRCS model-view.ui)
###
kde4_add_executable(ktp_contact_list_model_view
${model_view_SRCS}
contact-list-model-view-main.cpp
)
target_link_libraries(ktp_contact_list_model_view
${QT_QTTEST_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${TELEPATHY_QT4_LIBRARIES}
ktpcommoninternalsprivate
ktpmodelsprivate
)
+ if (KPEOPLE_FOUND)
+
+ include_directories(${KPEOPLE_INCLUDES})
+
kde4_add_executable(ktp_kpeople_list_model_view
${model_view_SRCS}
kpeople-model-view-main.cpp
)
target_link_libraries(ktp_kpeople_list_model_view
${QT_QTTEST_LIBRARY}
${KDE4_KDECORE_LIBS}
${KDE4_KDEUI_LIBS}
${TELEPATHY_QT4_LIBRARIES}
${KPEOPLE_LIBS}
ktpcommoninternalsprivate
ktpmodelsprivate
)
+ endif (KPEOPLE_FOUND)
+
+ | 7 | 0.148936 | 7 | 0 |
b995eb1092996c85e67a5b43b421d6cf62dfaaa9 | inonemonth/templates/challenge/detail/detail_base.html | inonemonth/templates/challenge/detail/detail_base.html | {% extends "challenge/challenge_base.html" %}
{% load staticfiles %}
{% load markdown_deux_tags %}
{% load crispy_forms_tags %}
{% block left-column %}
{% block left-column-top %}
<h2><span class="text-warning">In one month</span> I want to attain the following:</h1>
<div class="panel panel-default">
<div class="panel-heading">{{ challenge.title }}</div>
<div class="panel-body">
{{ challenge.body|markdown }}
</div>
<div class="panel-footer"><a href="{{ challenge.get_branch_main_url }}" target="_blank">{{ challenge.get_repo_branch_path_representation }}</a></div>
</div>
{% endblock left-column-top %}
{% block left-column-bottom %}
{% endblock left-column-bottom %}
{% endblock left-column %}
{% block right-column %}
{% endblock right-column %}
| {% extends "challenge/challenge_base.html" %}
{% load staticfiles %}
{% load markdown_deux_tags %}
{% load crispy_forms_tags %}
{% block left-column %}
{% block left-column-top %}
<h2><span class="text-warning">In one month</span> I want to attain the following:</h1>
<div class="panel panel-default">
<div class="panel-heading">{{ challenge.title }}</div>
<div class="panel-body">
{{ challenge.body|markdown }}
</div>
<div class="panel-footer">
<p>
<a href="{{ challenge.get_branch_main_url }}" target="_blank">{{ challenge.get_repo_branch_path_representation }}</a>
</p>
<p>
{% if challenge.is_last_commit_different_from_start_commit %}
<a href="{{ challenge.get_commit_comparison_url }}" target="_blank">Changes on branch since challenge started</a>.
{% else %}
No changes pushed to branch yet since challenge started.
{% endif %}
</p>
</div>
</div>
{% endblock left-column-top %}
{% block left-column-bottom %}
{% endblock left-column-bottom %}
{% endblock left-column %}
{% block right-column %}
{% endblock right-column %}
| Implement git comparison link in detail pages | Implement git comparison link in detail pages
| HTML | mit | robrechtdr/inonemonth,robrechtdr/inonemonth,robrechtdr/inonemonth,robrechtdr/inonemonth | html | ## Code Before:
{% extends "challenge/challenge_base.html" %}
{% load staticfiles %}
{% load markdown_deux_tags %}
{% load crispy_forms_tags %}
{% block left-column %}
{% block left-column-top %}
<h2><span class="text-warning">In one month</span> I want to attain the following:</h1>
<div class="panel panel-default">
<div class="panel-heading">{{ challenge.title }}</div>
<div class="panel-body">
{{ challenge.body|markdown }}
</div>
<div class="panel-footer"><a href="{{ challenge.get_branch_main_url }}" target="_blank">{{ challenge.get_repo_branch_path_representation }}</a></div>
</div>
{% endblock left-column-top %}
{% block left-column-bottom %}
{% endblock left-column-bottom %}
{% endblock left-column %}
{% block right-column %}
{% endblock right-column %}
## Instruction:
Implement git comparison link in detail pages
## Code After:
{% extends "challenge/challenge_base.html" %}
{% load staticfiles %}
{% load markdown_deux_tags %}
{% load crispy_forms_tags %}
{% block left-column %}
{% block left-column-top %}
<h2><span class="text-warning">In one month</span> I want to attain the following:</h1>
<div class="panel panel-default">
<div class="panel-heading">{{ challenge.title }}</div>
<div class="panel-body">
{{ challenge.body|markdown }}
</div>
<div class="panel-footer">
<p>
<a href="{{ challenge.get_branch_main_url }}" target="_blank">{{ challenge.get_repo_branch_path_representation }}</a>
</p>
<p>
{% if challenge.is_last_commit_different_from_start_commit %}
<a href="{{ challenge.get_commit_comparison_url }}" target="_blank">Changes on branch since challenge started</a>.
{% else %}
No changes pushed to branch yet since challenge started.
{% endif %}
</p>
</div>
</div>
{% endblock left-column-top %}
{% block left-column-bottom %}
{% endblock left-column-bottom %}
{% endblock left-column %}
{% block right-column %}
{% endblock right-column %}
| {% extends "challenge/challenge_base.html" %}
{% load staticfiles %}
{% load markdown_deux_tags %}
{% load crispy_forms_tags %}
{% block left-column %}
{% block left-column-top %}
<h2><span class="text-warning">In one month</span> I want to attain the following:</h1>
<div class="panel panel-default">
<div class="panel-heading">{{ challenge.title }}</div>
<div class="panel-body">
{{ challenge.body|markdown }}
</div>
+ <div class="panel-footer">
+ <p>
- <div class="panel-footer"><a href="{{ challenge.get_branch_main_url }}" target="_blank">{{ challenge.get_repo_branch_path_representation }}</a></div>
? ---- ^^^^^^^^^^^^^^^^^^^^^ ------
+ <a href="{{ challenge.get_branch_main_url }}" target="_blank">{{ challenge.get_repo_branch_path_representation }}</a>
? ^^^
+ </p>
+ <p>
+ {% if challenge.is_last_commit_different_from_start_commit %}
+ <a href="{{ challenge.get_commit_comparison_url }}" target="_blank">Changes on branch since challenge started</a>.
+ {% else %}
+ No changes pushed to branch yet since challenge started.
+ {% endif %}
+ </p>
+ </div>
</div>
{% endblock left-column-top %}
{% block left-column-bottom %}
{% endblock left-column-bottom %}
{% endblock left-column %}
{% block right-column %}
{% endblock right-column %} | 13 | 0.541667 | 12 | 1 |
b3f8b98b015a8dadb1eae8e7d646b558b0b45eae | salmon/extract-salmon_quant.sh | salmon/extract-salmon_quant.sh | for SF in $(ls */quant.sf)
do
OUT=${SF/\/quant.sf/}".sf"
echo $SF $OUT
cp $SF $OUT
done
| for SF in $(ls */quant.sf)
do
SF_OUT=${SF/\/quant.sf/}".sf"
echo $SF $SF_OUT
cp $SF $OUT
LOG=${SF/\/quant.sf/}"/logs/salmon_quant.log"
LOG_OUT=${SF/\/quant.sf/}".log"
echo $LOG $LOG_OUT
cp $LOG $LOG_OUT
done
| Copy the log file from salmon run. | Copy the log file from salmon run.
| Shell | apache-2.0 | taejoonlab/NuevoTx,marcottelab/NuevoTx,marcottelab/NuevoTx,taejoonlab/NuevoTx | shell | ## Code Before:
for SF in $(ls */quant.sf)
do
OUT=${SF/\/quant.sf/}".sf"
echo $SF $OUT
cp $SF $OUT
done
## Instruction:
Copy the log file from salmon run.
## Code After:
for SF in $(ls */quant.sf)
do
SF_OUT=${SF/\/quant.sf/}".sf"
echo $SF $SF_OUT
cp $SF $OUT
LOG=${SF/\/quant.sf/}"/logs/salmon_quant.log"
LOG_OUT=${SF/\/quant.sf/}".log"
echo $LOG $LOG_OUT
cp $LOG $LOG_OUT
done
| for SF in $(ls */quant.sf)
do
- OUT=${SF/\/quant.sf/}".sf"
+ SF_OUT=${SF/\/quant.sf/}".sf"
? +++
- echo $SF $OUT
+ echo $SF $SF_OUT
? +++
cp $SF $OUT
+
+ LOG=${SF/\/quant.sf/}"/logs/salmon_quant.log"
+ LOG_OUT=${SF/\/quant.sf/}".log"
+ echo $LOG $LOG_OUT
+ cp $LOG $LOG_OUT
done
+ | 10 | 1.666667 | 8 | 2 |
52ed7a0eb7f036d4971cc725d179460d95aae03f | src/components/PatchBay/PatchBay.scss | src/components/PatchBay/PatchBay.scss | $bay-width: 890px;
$row-padding: 5px;
$input-width: ($bay-width - ($row-padding * 2)) / 24;
.patch-bay {
width: $bay-width;
border: 5px solid #ccc;
border-radius: 10px;
background-color: #fff;
padding: $row-padding 0;
}
.row {
padding: $row-padding;
display: flex;
}
.label {
width: $input-width;
text-align: center;
}
.number {
background-color: #43c9ff;
color: #fff;
border-radius: 50%;
width: $input-width / 2;
height: $input-width / 2;
display: inline-block;
padding: 3px;
}
.jack {
width: $input-width;
&::before {
margin: 0 auto;
width: $input-width / 2;
height: $input-width / 2;
background-color: #eee;
border: 3px solid #bbb;
border-radius: 50%;
content: "";
display: block;
}
}
| $row-padding: 5px;
$input-width: 40px;
.patch-bay {
width: auto;
border: 5px solid #ccc;
border-radius: 10px;
background-color: #fff;
padding: $row-padding 0;
}
.row {
padding: $row-padding;
display: flex;
}
.label {
width: $input-width;
text-align: center;
}
.number {
background-color: #43c9ff;
color: #fff;
border-radius: 50%;
width: $input-width / 2;
height: $input-width / 2;
display: inline-block;
padding: 3px;
}
.jack {
width: $input-width;
&::before {
margin: 0 auto;
width: $input-width / 2;
height: $input-width / 2;
background-color: #eee;
border: 3px solid #bbb;
border-radius: 50%;
content: "";
display: block;
}
}
| Update patchbay css to not stipulate a width of patchbay | Update patchbay css to not stipulate a width of patchbay
| SCSS | mit | dbalatero/patchbay,dbalatero/patchbay | scss | ## Code Before:
$bay-width: 890px;
$row-padding: 5px;
$input-width: ($bay-width - ($row-padding * 2)) / 24;
.patch-bay {
width: $bay-width;
border: 5px solid #ccc;
border-radius: 10px;
background-color: #fff;
padding: $row-padding 0;
}
.row {
padding: $row-padding;
display: flex;
}
.label {
width: $input-width;
text-align: center;
}
.number {
background-color: #43c9ff;
color: #fff;
border-radius: 50%;
width: $input-width / 2;
height: $input-width / 2;
display: inline-block;
padding: 3px;
}
.jack {
width: $input-width;
&::before {
margin: 0 auto;
width: $input-width / 2;
height: $input-width / 2;
background-color: #eee;
border: 3px solid #bbb;
border-radius: 50%;
content: "";
display: block;
}
}
## Instruction:
Update patchbay css to not stipulate a width of patchbay
## Code After:
$row-padding: 5px;
$input-width: 40px;
.patch-bay {
width: auto;
border: 5px solid #ccc;
border-radius: 10px;
background-color: #fff;
padding: $row-padding 0;
}
.row {
padding: $row-padding;
display: flex;
}
.label {
width: $input-width;
text-align: center;
}
.number {
background-color: #43c9ff;
color: #fff;
border-radius: 50%;
width: $input-width / 2;
height: $input-width / 2;
display: inline-block;
padding: 3px;
}
.jack {
width: $input-width;
&::before {
margin: 0 auto;
width: $input-width / 2;
height: $input-width / 2;
background-color: #eee;
border: 3px solid #bbb;
border-radius: 50%;
content: "";
display: block;
}
}
| - $bay-width: 890px;
$row-padding: 5px;
- $input-width: ($bay-width - ($row-padding * 2)) / 24;
+ $input-width: 40px;
.patch-bay {
- width: $bay-width;
+ width: auto;
border: 5px solid #ccc;
border-radius: 10px;
background-color: #fff;
padding: $row-padding 0;
}
.row {
padding: $row-padding;
display: flex;
}
.label {
width: $input-width;
text-align: center;
}
.number {
background-color: #43c9ff;
color: #fff;
border-radius: 50%;
width: $input-width / 2;
height: $input-width / 2;
display: inline-block;
padding: 3px;
}
.jack {
width: $input-width;
&::before {
margin: 0 auto;
width: $input-width / 2;
height: $input-width / 2;
background-color: #eee;
border: 3px solid #bbb;
border-radius: 50%;
content: "";
display: block;
}
} | 5 | 0.108696 | 2 | 3 |
f53f09cea517e2ccce61afb95cc1b0288777e4b2 | blog/content/README.md | blog/content/README.md |
This folder contains the content for the _"Writing an OS in Rust"_ blog.
## License
This folder is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, available in [LICENSE-CC-BY-NC](LICENSE-CC-BY-NC) or under <http://creativecommons.org/licenses/by-nc/4.0/>.
All _code examples_ between markdown code blocks denoted by three backticks (`\``) are licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](../../LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](../../LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option. |
This folder contains the content for the _"Writing an OS in Rust"_ blog.
## License
This folder is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, available in [LICENSE-CC-BY-NC](LICENSE-CC-BY-NC) or under <http://creativecommons.org/licenses/by-nc/4.0/>.
All _code examples_ between markdown code blocks denoted by three backticks (`\``) are licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](../../LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](../../LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.
| Clarify licensing of contributions to blog/content | Clarify licensing of contributions to blog/content
| Markdown | apache-2.0 | phil-opp/blogOS,phil-opp/blog_os,phil-opp/blog_os,phil-opp/blog_os,phil-opp/blogOS,phil-opp/blog_os | markdown | ## Code Before:
This folder contains the content for the _"Writing an OS in Rust"_ blog.
## License
This folder is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, available in [LICENSE-CC-BY-NC](LICENSE-CC-BY-NC) or under <http://creativecommons.org/licenses/by-nc/4.0/>.
All _code examples_ between markdown code blocks denoted by three backticks (`\``) are licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](../../LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](../../LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
## Instruction:
Clarify licensing of contributions to blog/content
## Code After:
This folder contains the content for the _"Writing an OS in Rust"_ blog.
## License
This folder is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, available in [LICENSE-CC-BY-NC](LICENSE-CC-BY-NC) or under <http://creativecommons.org/licenses/by-nc/4.0/>.
All _code examples_ between markdown code blocks denoted by three backticks (`\``) are licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](../../LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](../../LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.
|
This folder contains the content for the _"Writing an OS in Rust"_ blog.
## License
This folder is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, available in [LICENSE-CC-BY-NC](LICENSE-CC-BY-NC) or under <http://creativecommons.org/licenses/by-nc/4.0/>.
All _code examples_ between markdown code blocks denoted by three backticks (`\``) are licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](../../LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](../../LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
+
+ ### Contribution
+
+ Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions. | 4 | 0.285714 | 4 | 0 |
fed2a44f04b78914b39a630e169af500f9b35474 | examples/http/centos6-ks.cfg | examples/http/centos6-ks.cfg | install
cdrom
lang en_US.UTF-8
keyboard us
unsupported_hardware
network --bootproto=dhcp
rootpw --iscrypted $1$DIlig7gp$FuhFdeHj.R1VrEzZsI4uo0
firewall --disabled
authconfig --enableshadow --passalgo=sha512
selinux --permissive
timezone UTC
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
autopart
auth --useshadow --enablemd5
firstboot --disabled
#reboot
poweroff
%packages --ignoremissing
@Base
@Core
@Development Tools
openssl-devel
readline-devel
zlib-devel
kernel-devel
vim
wget
%end
%post
yum -y update
# update root certs
wget -O/etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem
# vagrant
groupadd vagrant -g 999
useradd vagrant -g vagrant -G wheel -u 900 -s /bin/bash
echo "vagrant" | passwd --stdin vagrant
# sudo
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
%end
| install
cdrom
lang en_US.UTF-8
keyboard us
unsupported_hardware
network --bootproto=dhcp
rootpw --iscrypted $1$DIlig7gp$FuhFdeHj.R1VrEzZsI4uo0
firewall --disabled
authconfig --enableshadow --passalgo=sha512
selinux --permissive
timezone UTC
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
autopart
auth --useshadow --enablemd5
firstboot --disabled
reboot
%packages --ignoremissing
@Base
@Core
@Development Tools
openssl-devel
readline-devel
zlib-devel
kernel-devel
vim
wget
%end
%post
yum -y update
# update root certs
wget -O/etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem
# vagrant
groupadd vagrant -g 999
useradd vagrant -g vagrant -G wheel -u 900 -s /bin/bash
echo "vagrant" | passwd --stdin vagrant
# sudo
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
%end
| Update CentOS to reboot instead of poweroff | Update CentOS to reboot instead of poweroff
| INI | mpl-2.0 | dongyuzheng/packer-builder-xenserver,june07/packer-builder-xenserver,xenserverarmy/packer,simonfuhrer/packer-builder-xenserver-1,fr34k8/packer-builder-xenserver,conceptboard/packer,conceptboard/packer,xenserverarmy/packer,june07/packer-builder-xenserver,makunterry/packer-builder-xenserver,rdobson/packer-builder-xenserver,simonfuhrer/packer-builder-xenserver-1,dongyuzheng/packer-builder-xenserver,fr34k8/packer-builder-xenserver,rdobson/packer-builder-xenserver,makunterry/packer-builder-xenserver | ini | ## Code Before:
install
cdrom
lang en_US.UTF-8
keyboard us
unsupported_hardware
network --bootproto=dhcp
rootpw --iscrypted $1$DIlig7gp$FuhFdeHj.R1VrEzZsI4uo0
firewall --disabled
authconfig --enableshadow --passalgo=sha512
selinux --permissive
timezone UTC
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
autopart
auth --useshadow --enablemd5
firstboot --disabled
#reboot
poweroff
%packages --ignoremissing
@Base
@Core
@Development Tools
openssl-devel
readline-devel
zlib-devel
kernel-devel
vim
wget
%end
%post
yum -y update
# update root certs
wget -O/etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem
# vagrant
groupadd vagrant -g 999
useradd vagrant -g vagrant -G wheel -u 900 -s /bin/bash
echo "vagrant" | passwd --stdin vagrant
# sudo
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
%end
## Instruction:
Update CentOS to reboot instead of poweroff
## Code After:
install
cdrom
lang en_US.UTF-8
keyboard us
unsupported_hardware
network --bootproto=dhcp
rootpw --iscrypted $1$DIlig7gp$FuhFdeHj.R1VrEzZsI4uo0
firewall --disabled
authconfig --enableshadow --passalgo=sha512
selinux --permissive
timezone UTC
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
autopart
auth --useshadow --enablemd5
firstboot --disabled
reboot
%packages --ignoremissing
@Base
@Core
@Development Tools
openssl-devel
readline-devel
zlib-devel
kernel-devel
vim
wget
%end
%post
yum -y update
# update root certs
wget -O/etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem
# vagrant
groupadd vagrant -g 999
useradd vagrant -g vagrant -G wheel -u 900 -s /bin/bash
echo "vagrant" | passwd --stdin vagrant
# sudo
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
%end
| install
cdrom
lang en_US.UTF-8
keyboard us
unsupported_hardware
network --bootproto=dhcp
rootpw --iscrypted $1$DIlig7gp$FuhFdeHj.R1VrEzZsI4uo0
firewall --disabled
authconfig --enableshadow --passalgo=sha512
selinux --permissive
timezone UTC
bootloader --location=mbr
text
skipx
zerombr
clearpart --all --initlabel
autopart
auth --useshadow --enablemd5
firstboot --disabled
- #reboot
? -
+ reboot
- poweroff
%packages --ignoremissing
@Base
@Core
@Development Tools
openssl-devel
readline-devel
zlib-devel
kernel-devel
vim
wget
%end
%post
yum -y update
# update root certs
wget -O/etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem
# vagrant
groupadd vagrant -g 999
useradd vagrant -g vagrant -G wheel -u 900 -s /bin/bash
echo "vagrant" | passwd --stdin vagrant
# sudo
echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers
%end | 3 | 0.061224 | 1 | 2 |
241441143da746fb9a23150cb1d0a22c61153402 | README.rst | README.rst | Overview
========
Based on the `Neo <http://packages.python.org/neo/>`_ framework, spykeutils
is a Python library for analyzing and plotting data from neurophysiological
recordings. It can be used by itself or in conjunction with Spyke Viewer,
a multi-platform GUI application for navigating electrophysiological datasets.
For more information, see the documentation at
http://spykeutils.readthedocs.org
spykeutils was created by Robert Pröpper at the Neural Information
Processing Group (TU Berlin), supported by the Research Training Group
GRK 1589/1.
Dependencies
============
* Python 2.7
* scipy
* neo
* Optional: guiqwt for plots | Overview
========
.. image:: https://secure.travis-ci.org/rproepp/spykeutils.png?branch=develop
Based on the `Neo <http://packages.python.org/neo/>`_ framework, spykeutils
is a Python library for analyzing and plotting data from neurophysiological
recordings. It can be used by itself or in conjunction with Spyke Viewer,
a multi-platform GUI application for navigating electrophysiological datasets.
For more information, see the documentation at
http://spykeutils.readthedocs.org
spykeutils was created by Robert Pröpper at the Neural Information
Processing Group (TU Berlin), supported by the Research Training Group
GRK 1589/1.
Dependencies
============
* Python 2.7
* scipy
* neo
* Optional: guiqwt for plots | Add Travis CI status image | Add Travis CI status image
| reStructuredText | bsd-3-clause | rproepp/spykeutils | restructuredtext | ## Code Before:
Overview
========
Based on the `Neo <http://packages.python.org/neo/>`_ framework, spykeutils
is a Python library for analyzing and plotting data from neurophysiological
recordings. It can be used by itself or in conjunction with Spyke Viewer,
a multi-platform GUI application for navigating electrophysiological datasets.
For more information, see the documentation at
http://spykeutils.readthedocs.org
spykeutils was created by Robert Pröpper at the Neural Information
Processing Group (TU Berlin), supported by the Research Training Group
GRK 1589/1.
Dependencies
============
* Python 2.7
* scipy
* neo
* Optional: guiqwt for plots
## Instruction:
Add Travis CI status image
## Code After:
Overview
========
.. image:: https://secure.travis-ci.org/rproepp/spykeutils.png?branch=develop
Based on the `Neo <http://packages.python.org/neo/>`_ framework, spykeutils
is a Python library for analyzing and plotting data from neurophysiological
recordings. It can be used by itself or in conjunction with Spyke Viewer,
a multi-platform GUI application for navigating electrophysiological datasets.
For more information, see the documentation at
http://spykeutils.readthedocs.org
spykeutils was created by Robert Pröpper at the Neural Information
Processing Group (TU Berlin), supported by the Research Training Group
GRK 1589/1.
Dependencies
============
* Python 2.7
* scipy
* neo
* Optional: guiqwt for plots | Overview
========
+
+ .. image:: https://secure.travis-ci.org/rproepp/spykeutils.png?branch=develop
Based on the `Neo <http://packages.python.org/neo/>`_ framework, spykeutils
is a Python library for analyzing and plotting data from neurophysiological
recordings. It can be used by itself or in conjunction with Spyke Viewer,
a multi-platform GUI application for navigating electrophysiological datasets.
For more information, see the documentation at
http://spykeutils.readthedocs.org
spykeutils was created by Robert Pröpper at the Neural Information
Processing Group (TU Berlin), supported by the Research Training Group
GRK 1589/1.
Dependencies
============
* Python 2.7
* scipy
* neo
* Optional: guiqwt for plots | 2 | 0.095238 | 2 | 0 |
cf21441576c215d9d93a0bfa086b6c57d748ec57 | app.json | app.json | {
"name": "Baby Buddy",
"description": "Helps caregivers track baby's habits to learn about and predict needs without (as much) guess work.",
"keywords": [
"baby",
"baby buddy",
"dashboard",
"django",
"infant",
"newborn",
"python",
"self-host"
],
"repository": "https://github.com/babybuddy/babybuddy",
"website": "http://www.baby-buddy.net",
"buildpacks": [
{
"url": "heroku/python"
}
],
"env": {
"DJANGO_SETTINGS_MODULE": {
"description": "A prebuilt configuration for Heroku.",
"value": "babybuddy.settings.heroku"
},
"SECRET_KEY": {
"description": "Used for the auth system.",
"generator": "secret"
},
"DISABLE_COLLECTSTATIC": {
"description": "Prevent static asset collection.",
"value": "1"
},
"TIME_ZONE": {
"description": "Sets the instance default time zone.",
"value": "UTC"
}
},
"scripts": {
"postdeploy": "python manage.py migrate && python manage.py createcachetable"
}
}
| {
"name": "Baby Buddy",
"description": "Helps caregivers track baby's habits to learn about and predict needs without (as much) guess work.",
"keywords": [
"baby",
"baby buddy",
"dashboard",
"django",
"infant",
"newborn",
"python",
"self-host"
],
"repository": "https://github.com/babybuddy/babybuddy",
"website": "https://docs.baby-buddy.net",
"buildpacks": [
{
"url": "heroku/python"
}
],
"env": {
"DJANGO_SETTINGS_MODULE": {
"description": "A prebuilt configuration for Heroku.",
"value": "babybuddy.settings.heroku"
},
"DISABLE_COLLECTSTATIC": {
"description": "Prevent static asset collection.",
"generator": "secret"
},
"SECRET_KEY": {
"description": "Used for the auth system.",
"generator": "secret"
}
},
"scripts": {
"postdeploy": "python manage.py migrate && python manage.py createcachetable"
}
}
| Use Heroku generator for DISABLE_COLLECTSTATIC | Use Heroku generator for DISABLE_COLLECTSTATIC
Heroku's attempts to run collectstatic automatically but Baby Buddy never
wants that. Instead of offering a user-editable environment variable this
change uses Heroku's secret generator to set the variable so the user cannot
change it during deploy.
| JSON | bsd-2-clause | cdubz/babybuddy,cdubz/babybuddy,cdubz/babybuddy | json | ## Code Before:
{
"name": "Baby Buddy",
"description": "Helps caregivers track baby's habits to learn about and predict needs without (as much) guess work.",
"keywords": [
"baby",
"baby buddy",
"dashboard",
"django",
"infant",
"newborn",
"python",
"self-host"
],
"repository": "https://github.com/babybuddy/babybuddy",
"website": "http://www.baby-buddy.net",
"buildpacks": [
{
"url": "heroku/python"
}
],
"env": {
"DJANGO_SETTINGS_MODULE": {
"description": "A prebuilt configuration for Heroku.",
"value": "babybuddy.settings.heroku"
},
"SECRET_KEY": {
"description": "Used for the auth system.",
"generator": "secret"
},
"DISABLE_COLLECTSTATIC": {
"description": "Prevent static asset collection.",
"value": "1"
},
"TIME_ZONE": {
"description": "Sets the instance default time zone.",
"value": "UTC"
}
},
"scripts": {
"postdeploy": "python manage.py migrate && python manage.py createcachetable"
}
}
## Instruction:
Use Heroku generator for DISABLE_COLLECTSTATIC
Heroku's attempts to run collectstatic automatically but Baby Buddy never
wants that. Instead of offering a user-editable environment variable this
change uses Heroku's secret generator to set the variable so the user cannot
change it during deploy.
## Code After:
{
"name": "Baby Buddy",
"description": "Helps caregivers track baby's habits to learn about and predict needs without (as much) guess work.",
"keywords": [
"baby",
"baby buddy",
"dashboard",
"django",
"infant",
"newborn",
"python",
"self-host"
],
"repository": "https://github.com/babybuddy/babybuddy",
"website": "https://docs.baby-buddy.net",
"buildpacks": [
{
"url": "heroku/python"
}
],
"env": {
"DJANGO_SETTINGS_MODULE": {
"description": "A prebuilt configuration for Heroku.",
"value": "babybuddy.settings.heroku"
},
"DISABLE_COLLECTSTATIC": {
"description": "Prevent static asset collection.",
"generator": "secret"
},
"SECRET_KEY": {
"description": "Used for the auth system.",
"generator": "secret"
}
},
"scripts": {
"postdeploy": "python manage.py migrate && python manage.py createcachetable"
}
}
| {
"name": "Baby Buddy",
"description": "Helps caregivers track baby's habits to learn about and predict needs without (as much) guess work.",
"keywords": [
"baby",
"baby buddy",
"dashboard",
"django",
"infant",
"newborn",
"python",
"self-host"
],
"repository": "https://github.com/babybuddy/babybuddy",
- "website": "http://www.baby-buddy.net",
? ^^^
+ "website": "https://docs.baby-buddy.net",
? + ^^^^
"buildpacks": [
{
"url": "heroku/python"
}
],
"env": {
"DJANGO_SETTINGS_MODULE": {
"description": "A prebuilt configuration for Heroku.",
"value": "babybuddy.settings.heroku"
},
+ "DISABLE_COLLECTSTATIC": {
+ "description": "Prevent static asset collection.",
+ "generator": "secret"
+ },
"SECRET_KEY": {
"description": "Used for the auth system.",
"generator": "secret"
- },
- "DISABLE_COLLECTSTATIC": {
- "description": "Prevent static asset collection.",
- "value": "1"
- },
- "TIME_ZONE": {
- "description": "Sets the instance default time zone.",
- "value": "UTC"
}
},
"scripts": {
"postdeploy": "python manage.py migrate && python manage.py createcachetable"
}
} | 14 | 0.333333 | 5 | 9 |
459a52c1b4312362f276a561f1c0e1d7cb716777 | README.md | README.md | beertrade
=========
an app used by the /r/beertrade reddit community to keep track of beer trades and the corresponding reputation and flair for users.
Contributing
------------
1. Fork this repository
2. [Contact the moderators](https://www.reddit.com/message/compose?to=%2Fr%2Fbeertrade&subject=&message=) to request the necessary service credentials
3. Set up your `.env` file:
```bash
RACK_ENV=development
PORT=3000
REDDIT_OAUTH_ID=...
REDDIT_OAUTH_SECRET=...
BOT_OAUTH_ID=...
BOT_OAUTH_SECRET=...
BOT_USERNAME=...
BOT_PASSWORD=...
```
4. Run:
```bash
gem install foreman
bundle install
rake db:migrate
foreman s
```
5. Send feature in a pull request for review and merging
| beertrade
=========
an app used by the /r/beertrade reddit community to keep track of beer trades and the corresponding reputation and flair for users.
Contributing
------------
1. Fork this repository
2. [Contact the moderators](https://www.reddit.com/message/compose?to=%2Fr%2Fbeertrade&subject=&message=) to request the necessary service credentials
3. Set up your `.env` file:
RACK_ENV=development
PORT=3000
REDDIT_OAUTH_ID=...
REDDIT_OAUTH_SECRET=...
BOT_OAUTH_ID=...
BOT_OAUTH_SECRET=...
BOT_USERNAME=...
BOT_PASSWORD=...
4. Run:
gem install foreman
bundle install
rake db:migrate
foreman s
5. Send feature in a pull request for review and merging
| Update to proper code formatting | Update to proper code formatting
| Markdown | mit | patrickomatic/beertrade,patrickomatic/beertrade,patrickomatic/beertrade | markdown | ## Code Before:
beertrade
=========
an app used by the /r/beertrade reddit community to keep track of beer trades and the corresponding reputation and flair for users.
Contributing
------------
1. Fork this repository
2. [Contact the moderators](https://www.reddit.com/message/compose?to=%2Fr%2Fbeertrade&subject=&message=) to request the necessary service credentials
3. Set up your `.env` file:
```bash
RACK_ENV=development
PORT=3000
REDDIT_OAUTH_ID=...
REDDIT_OAUTH_SECRET=...
BOT_OAUTH_ID=...
BOT_OAUTH_SECRET=...
BOT_USERNAME=...
BOT_PASSWORD=...
```
4. Run:
```bash
gem install foreman
bundle install
rake db:migrate
foreman s
```
5. Send feature in a pull request for review and merging
## Instruction:
Update to proper code formatting
## Code After:
beertrade
=========
an app used by the /r/beertrade reddit community to keep track of beer trades and the corresponding reputation and flair for users.
Contributing
------------
1. Fork this repository
2. [Contact the moderators](https://www.reddit.com/message/compose?to=%2Fr%2Fbeertrade&subject=&message=) to request the necessary service credentials
3. Set up your `.env` file:
RACK_ENV=development
PORT=3000
REDDIT_OAUTH_ID=...
REDDIT_OAUTH_SECRET=...
BOT_OAUTH_ID=...
BOT_OAUTH_SECRET=...
BOT_USERNAME=...
BOT_PASSWORD=...
4. Run:
gem install foreman
bundle install
rake db:migrate
foreman s
5. Send feature in a pull request for review and merging
| beertrade
=========
an app used by the /r/beertrade reddit community to keep track of beer trades and the corresponding reputation and flair for users.
Contributing
------------
1. Fork this repository
2. [Contact the moderators](https://www.reddit.com/message/compose?to=%2Fr%2Fbeertrade&subject=&message=) to request the necessary service credentials
3. Set up your `.env` file:
- ```bash
RACK_ENV=development
PORT=3000
REDDIT_OAUTH_ID=...
REDDIT_OAUTH_SECRET=...
BOT_OAUTH_ID=...
BOT_OAUTH_SECRET=...
BOT_USERNAME=...
BOT_PASSWORD=...
- ```
4. Run:
- ```bash
+
gem install foreman
bundle install
rake db:migrate
foreman s
- ```
+
5. Send feature in a pull request for review and merging | 6 | 0.193548 | 2 | 4 |
e2e2b7d767e3f8ab9ae3aeb40a75e992c1631edc | test/data/sql/infrastructure/config.js | test/data/sql/infrastructure/config.js | // ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
// we can expand this to provide different configurations for different environments
var configuration = require('../../../../src/configuration');
if(process.env.MS_TableConnectionString)
module.exports = configuration.fromEnvironment({}).data;
else
module.exports = {
provider: 'sql',
user: 'azure-mobile-apps-test',
password: 'Blah1234',
server: 'localhost',
database: 'azure-mobile-apps-test'
};
| // ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
// we can expand this to provide different configurations for different environments
var configuration = require('../../../../src/configuration');
if(process.env.MS_TableConnectionString)
module.exports = configuration.fromEnvironment({ data: {} }).data;
else
module.exports = {
provider: 'sql',
user: 'azure-mobile-apps-test',
password: 'Blah1234',
server: 'localhost',
database: 'azure-mobile-apps-test'
};
| Fix for unit test issue | Fix for unit test issue
| JavaScript | mit | christopheranderson/azure-mobile-apps-node-old | javascript | ## Code Before:
// ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
// we can expand this to provide different configurations for different environments
var configuration = require('../../../../src/configuration');
if(process.env.MS_TableConnectionString)
module.exports = configuration.fromEnvironment({}).data;
else
module.exports = {
provider: 'sql',
user: 'azure-mobile-apps-test',
password: 'Blah1234',
server: 'localhost',
database: 'azure-mobile-apps-test'
};
## Instruction:
Fix for unit test issue
## Code After:
// ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
// we can expand this to provide different configurations for different environments
var configuration = require('../../../../src/configuration');
if(process.env.MS_TableConnectionString)
module.exports = configuration.fromEnvironment({ data: {} }).data;
else
module.exports = {
provider: 'sql',
user: 'azure-mobile-apps-test',
password: 'Blah1234',
server: 'localhost',
database: 'azure-mobile-apps-test'
};
| // ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
// we can expand this to provide different configurations for different environments
var configuration = require('../../../../src/configuration');
if(process.env.MS_TableConnectionString)
- module.exports = configuration.fromEnvironment({}).data;
+ module.exports = configuration.fromEnvironment({ data: {} }).data;
? ++++++++++
else
module.exports = {
provider: 'sql',
user: 'azure-mobile-apps-test',
password: 'Blah1234',
server: 'localhost',
database: 'azure-mobile-apps-test'
}; | 2 | 0.117647 | 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.