commit stringlengths 40 40 | old_file stringlengths 4 237 | new_file stringlengths 4 237 | old_contents stringlengths 1 4.24k | new_contents stringlengths 5 4.84k | subject stringlengths 15 778 | message stringlengths 16 6.86k | lang stringlengths 1 30 | license stringclasses 13
values | repos stringlengths 5 116k | config stringlengths 1 30 | content stringlengths 105 8.72k |
|---|---|---|---|---|---|---|---|---|---|---|---|
3af5ab820c130a6d8e0af590cfd0d96790dc6f4a | requirements.txt | requirements.txt | cairocffi==0.8.0
hiredis==0.2.0
mysqlclient==1.3.12
psycopg2==2.7.4; platform_python_implementation=='CPython'
psycopg2cffi==2.7.7
pycrypto==2.6.1
python_axolotl_curve25519==0.1
rcssmin==1.0.6
regex==2018.02.21
rjsmin==1.0.12
subprocess32==3.2.7; python_version<'3'
thriftpy==0.3.9
Twisted==17.9.0
ujson==1.35; platform_... | cairocffi==0.8.0
hiredis==0.2.0
mysqlclient==1.3.12
psycopg2==2.7.4; platform_python_implementation=='CPython'
psycopg2cffi==2.7.7
python_axolotl_curve25519==0.1
rcssmin==1.0.6
regex==2018.02.21
rjsmin==1.0.12
subprocess32==3.2.7; python_version<'3'
thriftpy==0.3.9
Twisted==17.9.0
ujson==1.35; platform_python_implement... | Remove pycrypto as it is insecure | Remove pycrypto as it is insecure
| Text | bsd-3-clause | praekeltfoundation/debian-wheel-mirror | text | ## Code Before:
cairocffi==0.8.0
hiredis==0.2.0
mysqlclient==1.3.12
psycopg2==2.7.4; platform_python_implementation=='CPython'
psycopg2cffi==2.7.7
pycrypto==2.6.1
python_axolotl_curve25519==0.1
rcssmin==1.0.6
regex==2018.02.21
rjsmin==1.0.12
subprocess32==3.2.7; python_version<'3'
thriftpy==0.3.9
Twisted==17.9.0
ujson=... |
0169c2fd825c957da3be07dbc26254360d5b05d7 | custom.css | custom.css |
.docblock pre.rust { background: #eeeeff; }
pre.trait, pre.fn, pre.struct, pre.enum, pre.typedef { background: #fcfefc; }
|
.docblock pre.rust { background: #eeeeff; }
pre.trait, pre.fn, pre.struct, pre.enum, pre.typedef { background: #fcfefc; }
/* Shift "where ..." part of FUNCTION definition down a line */
.content .fn .where { display: block; }
/* Bit of whitespace to indent it */
.content .fn .where::before { content: ' '; }
| Apply nice css to function's where clauses too | Apply nice css to function's where clauses too
| CSS | apache-2.0 | rust-itertools/itertools,stepancheg/rust-itertools,imp/rust-itertools,DanielKeep/rust-itertools,tempbottle/rust-itertools,flo-l/rust-itertools | css | ## Code Before:
.docblock pre.rust { background: #eeeeff; }
pre.trait, pre.fn, pre.struct, pre.enum, pre.typedef { background: #fcfefc; }
## Instruction:
Apply nice css to function's where clauses too
## Code After:
.docblock pre.rust { background: #eeeeff; }
pre.trait, pre.fn, pre.struct, pre.enum, pre.typedef { b... |
bdadf90ba7f688bb83a3abf2feb119b72b683a49 | groovy/gradle.properties | groovy/gradle.properties | major = 0
minor = 0
patch = 0
branch = unknown
# Library versions
checkstyleVersion = 5.7
codenarcVersion = 0.22
cucumberVersion = 1.2.2
groovyVersion = 2.4.1
jacocoVersion = 0.7.1.201405082137
spockVersion = 1.0-groovy-2.4
springBootVersion = 1.2.2.RELEASE
springCloudVersion = 1.0.0.RELEASE
toolsJavaVersion = 2.1.0
| major = 0
minor = 0
patch = 0
branch = unknown
# Library versions
checkstyleVersion = 5.7
codenarcVersion = 0.23
cucumberVersion = 1.2.2
gmetricsVersion = 0.7
groovyVersion = 2.4.1
jacocoVersion = 0.7.1.201405082137
spockVersion = 1.0-groovy-2.4
springBootVersion = 1.2.2.RELEASE
springCloudVersion = 1.0.0.RELEASE
too... | Upgrade to new CodeNarc and include GMetrics. | Upgrade to new CodeNarc and include GMetrics.
| INI | apache-2.0 | kurron/docker-gradle-sample-builds,kurron/docker-gradle-sample-builds | ini | ## Code Before:
major = 0
minor = 0
patch = 0
branch = unknown
# Library versions
checkstyleVersion = 5.7
codenarcVersion = 0.22
cucumberVersion = 1.2.2
groovyVersion = 2.4.1
jacocoVersion = 0.7.1.201405082137
spockVersion = 1.0-groovy-2.4
springBootVersion = 1.2.2.RELEASE
springCloudVersion = 1.0.0.RELEASE
toolsJava... |
2600b74b22858d3a3e82228231345f8071fcb734 | packages/op/OptDir.yaml | packages/op/OptDir.yaml | homepage: ''
changelog-type: ''
hash: 78812c925737e7435ab2b9f59e3983e1d5df6961d018d6e31d1519231a290c82
test-bench-deps: {}
maintainer: Masahiro Sakai <masahiro.sakai@gmail.com>
synopsis: The OptDir type for representing optimization directions.
changelog: ''
basic-deps:
base: ! '>=4 && <5'
syb: -any
hashable: ! '... | homepage: ''
changelog-type: ''
hash: 7a59a4e225a1ea402b82377c9057cf258e45d9d7913b2edd010f7ae8b9e4f8af
test-bench-deps: {}
maintainer: Masahiro Sakai <masahiro.sakai@gmail.com>
synopsis: The OptDir type for representing optimization directions.
changelog: ''
basic-deps:
base: ! '>=4 && <5'
syb: -any
hashable: ! '... | Update from Hackage at 2020-01-13T14:41:25Z | Update from Hackage at 2020-01-13T14:41:25Z
| YAML | mit | commercialhaskell/all-cabal-metadata | yaml | ## Code Before:
homepage: ''
changelog-type: ''
hash: 78812c925737e7435ab2b9f59e3983e1d5df6961d018d6e31d1519231a290c82
test-bench-deps: {}
maintainer: Masahiro Sakai <masahiro.sakai@gmail.com>
synopsis: The OptDir type for representing optimization directions.
changelog: ''
basic-deps:
base: ! '>=4 && <5'
syb: -any... |
713c9e3b7119e985039bb604473666e3e0734082 | game/states/menu.js | game/states/menu.js | 'use strict';
var GameData = require('../prefabs/gamedata');
function Menu() {}
Menu.prototype = {
preload: function() {
},
create: function() {
this.game.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL;
this.backgroundImage = this.game.add.sprite(0, 0, 'menu-background');
this.fullScreenBu... | 'use strict';
var GameData = require('../prefabs/gamedata');
function Menu() {}
Menu.prototype = {
preload: function() {
},
create: function() {
window.scrollTo(10, 10);
this.game.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL;
this.backgroundImage = this.game.add.sprite(0, 0, 'menu-backgr... | Add scrolling hack for iOS full screen so the canvas takes up the whole page and disables scrolling. | Add scrolling hack for iOS full screen so the canvas takes up the whole page and disables scrolling.
| JavaScript | bsd-3-clause | Juholei/Lukuinto-Spring-2015,Juholei/Lukuinto-Spring-2015 | javascript | ## Code Before:
'use strict';
var GameData = require('../prefabs/gamedata');
function Menu() {}
Menu.prototype = {
preload: function() {
},
create: function() {
this.game.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL;
this.backgroundImage = this.game.add.sprite(0, 0, 'menu-background');
t... |
878d241660d4739c40a3b96ba781288eb10ff2db | docs/widgets.md | docs/widgets.md |
Widget is a data type in `virtual-dom` that allows you to get low level with the DOM
and either optimize your code or handle finely detailed concerns.
## Example widget.
```js
var createElement = require('virtual-dom/create-element.js');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/pa... |
Widget is a data type in `virtual-dom` that allows you to get low level with the DOM
and either optimize your code or handle finely detailed concerns.
## Example widget.
```js
var createElement = require('virtual-dom/create-element.js');
var diff = require('virtual-dom/diff');
var patch = require('virtual-dom/pa... | Update widget example so it actually works now | Update widget example so it actually works now | Markdown | mit | martintietz/mercury,Raynos/mercury | markdown | ## Code Before:
Widget is a data type in `virtual-dom` that allows you to get low level with the DOM
and either optimize your code or handle finely detailed concerns.
## Example widget.
```js
var createElement = require('virtual-dom/create-element.js');
var diff = require('virtual-dom/diff');
var patch = require... |
4118633258a4e05cc453a993ac6043e8f5fc6254 | src/VarWords.txt | src/VarWords.txt | alert
assembly
bar
baz
bit
bitcoin
block
BlueTooth
bus
C
calculate
check
client
cookie
CPU
Diablo
direct
doge
error
exception
fail
fault
foo
FPS
funk
Git
GPU
graphics
HTTP
indirect
init
jump
kernel
logic
machine
maple
matrix
memory
message
mine
multi
network
node
pop
priority
push
pull
RAM
regex
robot
RPG
Runescape
seg... | AI
alert
assembly
bar
baz
binary
bit
bitcoin
block
BlueTooth
boolean
bus
C
calculate
check
client
cookie
CPU
delay
Diablo
direct
doge
dogecoin
error
exception
fail
fault
foo
FPS
funk
Git
GPU
graphics
hash
HTTP
indirect
init
jump
kernel
latency
logic
machine
maple
matrix
maximum
memory
message
mine
minimum
multi
network... | Add var words: AI, binary, boolean, delay, dogecoin... | Add var words: AI, binary, boolean, delay, dogecoin...
| Text | mit | m1c0l/RPG | text | ## Code Before:
alert
assembly
bar
baz
bit
bitcoin
block
BlueTooth
bus
C
calculate
check
client
cookie
CPU
Diablo
direct
doge
error
exception
fail
fault
foo
FPS
funk
Git
GPU
graphics
HTTP
indirect
init
jump
kernel
logic
machine
maple
matrix
memory
message
mine
multi
network
node
pop
priority
push
pull
RAM
regex
robot
R... |
693b86db54a2b2e02d3dbd877c5e762955f049c6 | assets/less/components/layout.less | assets/less/components/layout.less | html {
background: @navbar-default-bg;
}
main {
position: relative;
background: @off-white;
}
.footer {
margin-top: 1em;
padding-top: 1em;
background: @gray-lighter;
}
.center-image {
margin: auto;
}
| html {
background: @off-white;
}
main {
position: relative;
background: @off-white;
}
.footer {
margin-top: 1em;
padding-top: 1em;
background: @gray-lighter;
}
.center-image {
margin: auto;
}
| Fix inconsistent page background color | Fix inconsistent page background color
| Less | mit | uzi/reddit-mobile,madbook/reddit-mobile,madbook/reddit-mobile,uzi/reddit-mobile,madbook/reddit-mobile,uzi/reddit-mobile | less | ## Code Before:
html {
background: @navbar-default-bg;
}
main {
position: relative;
background: @off-white;
}
.footer {
margin-top: 1em;
padding-top: 1em;
background: @gray-lighter;
}
.center-image {
margin: auto;
}
## Instruction:
Fix inconsistent page background color
## Code After:
html {
backgr... |
37b16e111c5721dd4a154b262dcf133fd5b7403b | tox.ini | tox.ini | [tox]
envlist = py27,py32,py33,py34,pypy
[testenv]
commands = python setup.py test
[testenv:py33]
basepython = python3.3
[testenv:pypy]
basepython = pypy
[testenv:docs]
changedir = docs
deps =
sphinx
sphinx_rtd_theme
sphinxcontrib-napoleon
commands =
/usr/bin/make clean html
| [tox]
envlist = py27,py32,py33,py34,pypy
[testenv]
commands = python setup.py test
[testenv:py33]
basepython = python3.3
deps =
pytest
six
pytest-cov
pytest-cache
pytest-timeout
commands = py.test --strict --verbose --tb=long --cov hystrix --cov-report term-missing tests
[testenv:pypy]
basepython... | Work arrount setup.py test it can not finish test suit properly | Work arrount setup.py test it can not finish test suit properly
| INI | apache-2.0 | wiliamsouza/hystrix-py,wiliamsouza/hystrix-py | ini | ## Code Before:
[tox]
envlist = py27,py32,py33,py34,pypy
[testenv]
commands = python setup.py test
[testenv:py33]
basepython = python3.3
[testenv:pypy]
basepython = pypy
[testenv:docs]
changedir = docs
deps =
sphinx
sphinx_rtd_theme
sphinxcontrib-napoleon
commands =
/usr/bin/make clean html
## Inst... |
c23a26accf41526d533fe560b98e4e1a904c1365 | lib/kempelen/API/responses/reviewable_hits_response.rb | lib/kempelen/API/responses/reviewable_hits_response.rb | module Kempelen
module API
module Responses
class ReviewableHitsResponse < Base
attr_accessor :number_of_results
attr_accessor :page_number
attr_accessor :total_number_of_results
attr_accessor :hits
def initialize(response)
super()
@hits = []
... | module Kempelen
module API
module Responses
class ReviewableHitsResponse < Base
attr_accessor :number_of_results
attr_accessor :page_number
attr_accessor :total_number_of_results
attr_accessor :hits
def initialize(response)
super()
@hits = []
... | Fix issues with empty lists | Fix issues with empty lists
| Ruby | mit | forefrontlabs/kempelen,forefrontlabs/kempelen | ruby | ## Code Before:
module Kempelen
module API
module Responses
class ReviewableHitsResponse < Base
attr_accessor :number_of_results
attr_accessor :page_number
attr_accessor :total_number_of_results
attr_accessor :hits
def initialize(response)
super()
... |
98f210e2b3fe2451b63ad6abbf50e8ab690ef5a3 | setup.py | setup.py | import os
import re
from setuptools import find_packages, setup
READMEFILE = "README.rst"
VERSIONFILE = os.path.join("elasticutils", "_version.py")
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
def get_version():
verstrline = open(VERSIONFILE, "rt").read()
mo = re.search(VSRE, verstrline, re.M)
if mo:
... | import os
import re
from setuptools import find_packages, setup
READMEFILE = "README.rst"
VERSIONFILE = os.path.join("elasticutils", "_version.py")
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
def get_version():
verstrline = open(VERSIONFILE, "rt").read()
mo = re.search(VSRE, verstrline, re.M)
if mo:
... | Add python language version classifiers | Add python language version classifiers
| Python | bsd-3-clause | einvalentin/elasticutils,einvalentin/elasticutils,einvalentin/elasticutils,mozilla/elasticutils,mozilla/elasticutils,mozilla/elasticutils | python | ## Code Before:
import os
import re
from setuptools import find_packages, setup
READMEFILE = "README.rst"
VERSIONFILE = os.path.join("elasticutils", "_version.py")
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
def get_version():
verstrline = open(VERSIONFILE, "rt").read()
mo = re.search(VSRE, verstrline, re.... |
1ade61d21d0ab7cfa0cd12b6af8da54637bdf3d4 | lib/modules/apostrophe-areas/views/areaControls.html | lib/modules/apostrophe-areas/views/areaControls.html | {% import 'apostrophe-ui:components/dropdowns.html' as dropdowns with context -%}
{%- macro listWidgets(widgets) -%}
{%- for name, options in widgets -%}
{%- if not data.widgetManagers[name] -%}
{{ apos.log("Your area contains a widget of type " + name + " but there is no manager for that type. Maybe you fo... | {% import 'apostrophe-ui:components/dropdowns.html' as dropdowns with context -%}
{%- macro listWidgets(widgets) -%}
{%- for name, options in widgets -%}
{%- if not data.widgetManagers[name] -%}
{{ apos.log("Your area contains a widget of type " + name + " but there is no manager for that type. Maybe you fo... | Add content button should glow | Add content button should glow
| HTML | mit | punkave/apostrophe,punkave/apostrophe | html | ## Code Before:
{% import 'apostrophe-ui:components/dropdowns.html' as dropdowns with context -%}
{%- macro listWidgets(widgets) -%}
{%- for name, options in widgets -%}
{%- if not data.widgetManagers[name] -%}
{{ apos.log("Your area contains a widget of type " + name + " but there is no manager for that ty... |
1d2b8830014c373ee964bca09f49d856223c3fb7 | config/karma/self-loader.js | config/karma/self-loader.js | /**
* @author Matthew Dahl [@sandersky](https://github.com/sandersky)
* @copyright 2015 Cyan, Inc. All rights reserved.
* Allow code within a package to use it's own package name when using `require()`
* This is specifically for writing tests, so you don't have to use a lot of `../../../src` type requires
*/
'use ... | /**
* @author Matthew Dahl [@sandersky](https://github.com/sandersky)
* @copyright 2015 Cyan, Inc. All rights reserved.
* Allow code within a package to use it's own package name when using `require()`
* This is specifically for writing tests, so you don't have to use a lot of `../../../src` type requires
*/
'use ... | Add ES^ modules support to self loader | Add ES^ modules support to self loader
| JavaScript | mit | ciena-blueplanet/beaker,nskrypnik/beaker,sandersky/beaker,cyaninc/beaker,sandersky/beaker,nskrypnik/beaker,cyaninc/beaker,ciena-blueplanet/beaker,nskrypnik/beaker,ciena-blueplanet/beaker,cyaninc/beaker,sandersky/beaker | javascript | ## Code Before:
/**
* @author Matthew Dahl [@sandersky](https://github.com/sandersky)
* @copyright 2015 Cyan, Inc. All rights reserved.
* Allow code within a package to use it's own package name when using `require()`
* This is specifically for writing tests, so you don't have to use a lot of `../../../src` type re... |
e041fe96fa524b2954b9b33c434aafc245dfedae | lib/cupertino/provisioning_portal/helpers.rb | lib/cupertino/provisioning_portal/helpers.rb | module Commander::UI
alias :pw :password
end
class String
include Term::ANSIColor
end
module Cupertino
module ProvisioningPortal
module Helpers
def agent
unless @agent
@agent = Cupertino::ProvisioningPortal::Agent.new
@agent.instance_eval do
def username
... | module Commander::UI
alias :pw :password
end
class String
include Term::ANSIColor
end
module Cupertino
module ProvisioningPortal
module Helpers
def agent
unless @agent
@agent = Cupertino::ProvisioningPortal::Agent.new
@agent.instance_eval do
def username
... | Add support for multiple teams with the same primary name | Add support for multiple teams with the same primary name
Change-Id: Ie70c29e16cbe41081fe13c1a1c0ae084cbef863f
| Ruby | mit | radex/download-profiles,yaoxiaoyong/cupertino,Suninus/cupertino,tenforwardconsulting/cupertino,nomad/cupertino,zerok/cupertino | ruby | ## Code Before:
module Commander::UI
alias :pw :password
end
class String
include Term::ANSIColor
end
module Cupertino
module ProvisioningPortal
module Helpers
def agent
unless @agent
@agent = Cupertino::ProvisioningPortal::Agent.new
@agent.instance_eval do
def... |
57ba33cdb75746baa04f8accae85bf5b997bfd4d | src/CodeEditor.jsx | src/CodeEditor.jsx | import React from "react/addons"
var brace = require('brace');
var AceEditor = require('react-ace');
require('brace/mode/javascript')
require('brace/theme/github')
var $ = require('jquery') // needed for ajax
const RaisedButton = require('material-ui/lib/raised-button');
export default React.createClass({
get... | import React from "react/addons"
var brace = require('brace');
var AceEditor = require('react-ace');
require('brace/mode/javascript')
require('brace/theme/github')
var $ = require('jquery') // needed for ajax
const RaisedButton = require('material-ui/lib/raised-button');
export default React.createClass({
get... | Add space between code, test and ready | Add space between code, test and ready
| JSX | mit | MuSiika/euhack-2015,MuSiika/euhack-2015 | jsx | ## Code Before:
import React from "react/addons"
var brace = require('brace');
var AceEditor = require('react-ace');
require('brace/mode/javascript')
require('brace/theme/github')
var $ = require('jquery') // needed for ajax
const RaisedButton = require('material-ui/lib/raised-button');
export default React.crea... |
6045e33ea092d97f1ad354fbeb7ab55b8d9dfe09 | app/imports/ui/layouts/if-admin-logged-in.js | app/imports/ui/layouts/if-admin-logged-in.js | import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
/* eslint-disable object-shorthand */
Template.If_Admin_Logged_In.helpers({
/**
* @returns {*} True if Meteor is in the process of logging in.
*/
authInProcess: function authInProcess() {
return Meteor.loggingIn();
}... | import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
Template.If_Admin_Logged_In.helpers({
// @returns {*} True if Meteor is in the process of logging in.
//
authInProcess: function authInProcess() {
return Meteor.loggingIn();
},
//@returns {boolean} True if there is... | Modify settings.json to allow deploy | Modify settings.json to allow deploy
| JavaScript | apache-2.0 | adventure-portal/adventure-portal,adventure-portal/adventure-portal | javascript | ## Code Before:
import { Meteor } from 'meteor/meteor';
import { Template } from 'meteor/templating';
/* eslint-disable object-shorthand */
Template.If_Admin_Logged_In.helpers({
/**
* @returns {*} True if Meteor is in the process of logging in.
*/
authInProcess: function authInProcess() {
return Meteor.... |
e230859624a8df5865fee0f48183a7cb07b95d68 | src/templates/pycontw-2019/events/_includes/schedule_talk_event.html | src/templates/pycontw-2019/events/_includes/schedule_talk_event.html | {% load i18n_plus %}
<div class="talk-info">
<div class="talk-title">
<a href="{{ event.get_absolute_url }}" class="localed-url">
{{ info.title }}
</a>
</div class="talk-title">
<p class="talk-speakers">{{ speakers }}</p>
</div>
<ul class="talk-tags">
<li class="language-{{ info.language.lower }}"></li>
<li... | {% load i18n_plus %}
<a href="{{ event.get_absolute_url }}" class="talk-info localed-url">
<div class="talk-title">{{ info.title }}</div>
<p class="talk-speakers">{{ speakers }}</p>
</a>
<ul class="talk-tags">
<li class="language-{{ info.language.lower }}"></li>
<li class="python-level-{{ info.python_level.lower }... | Make (almost) the whole talk block clickable | Make (almost) the whole talk block clickable
| HTML | mit | pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016 | html | ## Code Before:
{% load i18n_plus %}
<div class="talk-info">
<div class="talk-title">
<a href="{{ event.get_absolute_url }}" class="localed-url">
{{ info.title }}
</a>
</div class="talk-title">
<p class="talk-speakers">{{ speakers }}</p>
</div>
<ul class="talk-tags">
<li class="language-{{ info.language.lowe... |
d43663858b1d9e943071f2cacea32b0991dbeca8 | src/components/notes/Note.js | src/components/notes/Note.js | import React from 'react';
import './Note.scss';
export default class Note extends React.Component {
render() {
const note = this.props;
return (
<div className="note">
<h1>{note.title}</h1>
<pre>{note.content}</pre>
</div>
);
}
}
| import React from 'react';
import './Note.scss';
export default function Note({ title, content }) {
return (
<div className="note">
<h1>{title}</h1>
<pre>{content}</pre>
</div>
);
}
| Use stateless normal function over class | Use stateless normal function over class
| JavaScript | mit | emyarod/refuge,emyarod/refuge | javascript | ## Code Before:
import React from 'react';
import './Note.scss';
export default class Note extends React.Component {
render() {
const note = this.props;
return (
<div className="note">
<h1>{note.title}</h1>
<pre>{note.content}</pre>
</div>
);
}
}
## Instruction:
Use statele... |
9180a0f3e38ddd5ec07662ed5a3baca2ae7f6f7d | .travis.yml | .travis.yml | sudo: false
addons:
chrome: stable
language: node_js
node_js:
- "6"
- "8"
- "10"
matrix:
fast_finish: true
cache:
directories:
- node_modules
| os:
- linux
- windows
addons:
chrome: stable
language: node_js
node_js:
- "10"
- "8"
- "6"
matrix:
fast_finish: true
allow_failures:
- os: windows
cache:
directories:
- node_modules
| Add Windows to Travis CI matrix | CI: Add Windows to Travis CI matrix
Ref https://github.com/gruntjs/grunt-contrib-qunit/issues/154.
| YAML | mit | gruntjs/grunt-contrib-qunit,gruntjs/grunt-contrib-qunit | yaml | ## Code Before:
sudo: false
addons:
chrome: stable
language: node_js
node_js:
- "6"
- "8"
- "10"
matrix:
fast_finish: true
cache:
directories:
- node_modules
## Instruction:
CI: Add Windows to Travis CI matrix
Ref https://github.com/gruntjs/grunt-contrib-qunit/issues/154.
## Code After:
os:
- ... |
5b3fdf55a37fab00b7cd8323e61b59d42533be4a | .travis.yml | .travis.yml | ---
language: python
python: "2.7"
# This role needs sudo, thus we can't use the new container infrastructure
# sudo: false
sudo: required
# Install ansible
addons:
apt:
packages:
- python-pip
install:
- pip install -r requirements.txt
script:
- cookiecutter --version
- cookiecutter --replay --confi... | ---
# https://docs.travis-ci.com/user/multi-os/
matrix:
include:
- os: osx
language: generic
- os: linux
dist: trusty
language: python
python: 2.7
# This role needs sudo, thus we can't use the new container infrastructure
# sudo: false
sudo: required
install:
- sudo pip install -r ... | Test of this project also supports OSX. | Test of this project also supports OSX.
| YAML | mit | FGtatsuro/cookiecutter-ansible-role,FGtatsuro/cookiecutter-ansible-role | yaml | ## Code Before:
---
language: python
python: "2.7"
# This role needs sudo, thus we can't use the new container infrastructure
# sudo: false
sudo: required
# Install ansible
addons:
apt:
packages:
- python-pip
install:
- pip install -r requirements.txt
script:
- cookiecutter --version
- cookiecutter ... |
07efe8f7cdec6b9213668a0a9bd010beae6d689f | index.js | index.js | var bodyParser = require('body-parser')
var dataUriToBuffer = require('data-uri-to-buffer')
var express = require('express')
var app = express()
var transform = require("./transformer")
// Set up some Express settings
app.use(bodyParser.json({ limit: '2mb' }))
app.use(express.static(__dirname + '/public'))
/**
* Ho... | var bodyParser = require('body-parser')
var dataUriToBuffer = require('data-uri-to-buffer')
var express = require('express')
var app = express()
/**
* This is your custom transform function
* move it wherever, call it whatever
*/
var transform = require("./transformer")
// Set up some Express settings
app.use(body... | Change image size limit down to 1mb per @ednapiranha | Change image size limit down to 1mb per @ednapiranha
| JavaScript | mit | jasonrhodes/revisit-gifplay,revisitors/revisit.link-quickstart,florida/put-a-bird-on-it-revisit-service,jasonrhodes/H4UNT3D-H4U5 | javascript | ## Code Before:
var bodyParser = require('body-parser')
var dataUriToBuffer = require('data-uri-to-buffer')
var express = require('express')
var app = express()
var transform = require("./transformer")
// Set up some Express settings
app.use(bodyParser.json({ limit: '2mb' }))
app.use(express.static(__dirname + '/publ... |
4b62c11c40c6a96d8fa7e3df5c1a0762a9a5eb49 | scorecard/templates/profile/_demarcation_indicator_notice.html | scorecard/templates/profile/_demarcation_indicator_notice.html | {% load dates finance %}
{% if demarcation.established_after_last_audit %}
<div class="demarcation-notice established">
{{ geography.name }} was established on {{ demarcation.established_date|as_date|date:"j F Y" }}.
Annual financial performance indicators will only be available after the end of the {{ demar... | {% load dates finance %}
{% if demarcation.established_after_last_audit %}
<div class="demarcation-notice established">
{{ geography.name }} was established on {{ demarcation.established_date|as_date|date:"j F Y" }}.
Annual financial performance indicators will only be available after the end of the {{ demar... | Tweak wording for new muni notice | Tweak wording for new muni notice
| HTML | mit | Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data | html | ## Code Before:
{% load dates finance %}
{% if demarcation.established_after_last_audit %}
<div class="demarcation-notice established">
{{ geography.name }} was established on {{ demarcation.established_date|as_date|date:"j F Y" }}.
Annual financial performance indicators will only be available after the end... |
d236ae01e64195c3408cd5f6b81ff677f6a35577 | package.json | package.json | {
"name": "googlebooks",
"version": "0.1.5",
"description": "A cache-backed lightweight node wrapper for the Google Books API",
"main": "./lib/googlebooks.js",
"dependencies": {
"extend": "^3.0.0",
"querystring": "^0.2.0",
"superagent": "^1.4.0"
},
"devDependencies": {
"chai": "^3.3.0",
... | {
"name": "googlebooks",
"version": "0.1.5",
"description": "A cache-backed lightweight node wrapper for the Google Books API",
"main": "./lib/googlebooks.js",
"dependencies": {
"extend": "^3.0.0",
"querystring": "^0.2.0",
"superagent": "^1.4.0"
},
"devDependencies": {
"babel": "^5.8.23",
... | Add redis cache tests, BUG: Add babel to dev dependencies ENH: Add module agent identifier | ENH: Add redis cache tests,
BUG: Add babel to dev dependencies
ENH: Add module agent identifier
| JSON | mit | kaspermarstal/bookify | json | ## Code Before:
{
"name": "googlebooks",
"version": "0.1.5",
"description": "A cache-backed lightweight node wrapper for the Google Books API",
"main": "./lib/googlebooks.js",
"dependencies": {
"extend": "^3.0.0",
"querystring": "^0.2.0",
"superagent": "^1.4.0"
},
"devDependencies": {
"cha... |
2ebab9cc919121d668ffad1c70bb5e066d7e363c | helm/nats-operator/templates/secret.yaml | helm/nats-operator/templates/secret.yaml | {{- if .Values.auth.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "nats.fullname" . }}-clients-auth
namespace: {{ .Release.Namespace }}
labels:
app: "{{ template "nats.name" . }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Rel... | {{- if .Values.auth.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "nats.fullname" . }}-clients-auth
namespace: {{ .Release.Namespace }}
labels:
app: "{{ template "nats.name" . }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
heritage: "{{ .Rel... | Remove password from Secret metadata | Remove password from Secret metadata
| YAML | apache-2.0 | pires/nats-operator,nats-io/nats-operator,nats-io/nats-operator | yaml | ## Code Before:
{{- if .Values.auth.enabled }}
apiVersion: v1
kind: Secret
metadata:
name: {{ template "nats.fullname" . }}-clients-auth
namespace: {{ .Release.Namespace }}
labels:
app: "{{ template "nats.name" . }}"
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
release: "{{ .Release.Name }}"
he... |
6ef190887b38df4f5212a8a7017e002051734c9f | lokar/bib.py | lokar/bib.py |
from __future__ import unicode_literals
from .marc import Record
from .util import etree, parse_xml, show_diff
class Bib(object):
""" An Alma Bib record """
def __init__(self, alma, xml):
self.alma = alma
self.orig_xml = xml.encode('utf-8')
self.init(xml)
def init(self, xml):
... |
from __future__ import unicode_literals
from io import BytesIO
from .marc import Record
from .util import etree, parse_xml, show_diff
class Bib(object):
""" An Alma Bib record """
def __init__(self, alma, xml):
self.alma = alma
self.orig_xml = xml.encode('utf-8')
self.init(xml)
... | Add xml header and post data as stream-like object just to be sure | Add xml header and post data as stream-like object just to be sure
| Python | agpl-3.0 | scriptotek/almar,scriptotek/lokar | python | ## Code Before:
from __future__ import unicode_literals
from .marc import Record
from .util import etree, parse_xml, show_diff
class Bib(object):
""" An Alma Bib record """
def __init__(self, alma, xml):
self.alma = alma
self.orig_xml = xml.encode('utf-8')
self.init(xml)
def i... |
de2610fe6365f033497cd34d291ae011aff6c744 | infrastructure/dev-deploy/app-dev.yaml | infrastructure/dev-deploy/app-dev.yaml | runtime: custom
env: flex
beta_settings:
cloud_sql_instances: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}
env_variables:
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
GOOGLE_CLOUD_SQL_DATABASE_USERNAME: ${GOOGLE_CLOUD_SQL_DATABASE_USERNAME}
GOOGLE_CLOUD_SQL_DATABASE_PASSWORD: ${GOOGLE_CLOUD_SQL_DATABASE_PASSWORD}
GOOGL... | runtime: custom
env: flex
beta_settings:
cloud_sql_instances: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}
env_variables:
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
GOOGLE_CLOUD_SQL_DATABASE_USERNAME: ${GOOGLE_CLOUD_SQL_DATABASE_USERNAME}
GOOGLE_CLOUD_SQL_DATABASE_PASSWORD: ${GOOGLE_CLOUD_SQL_DATABASE_PASSWORD}
GOOGL... | Set correct location for dev static files | Set correct location for dev static files
| YAML | mit | uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged | yaml | ## Code Before:
runtime: custom
env: flex
beta_settings:
cloud_sql_instances: ${GOOGLE_CLOUD_SQL_CONNECTION_NAME}
env_variables:
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY}
GOOGLE_CLOUD_SQL_DATABASE_USERNAME: ${GOOGLE_CLOUD_SQL_DATABASE_USERNAME}
GOOGLE_CLOUD_SQL_DATABASE_PASSWORD: ${GOOGLE_CLOUD_SQL_DATABASE_P... |
06ad1d393328fad70cdf5010c6536059d2b8a6e2 | templates/_comments.tpl | templates/_comments.tpl | <div class="page__content__comments__wrapper">
<h3 class="page__content__comments__header">{{ comments|length }} reacties</h3>
{% with m.comment.rsc[id] as comments %}
{% if comments %}
{% with m.rsc[id].creator_id as creator_id %}
<ol class="page__content__comments">
... | <div class="page__content__comments__wrapper">
<h3 class="page__content__comments__header">{{ comments|length }} reacties</h3>
{% with m.comment.rsc[id] as comments %}
{% if comments %}
{% with m.rsc[id].creator_id as creator_id %}
<ol class="page__content__comments" id="com... | Fix comments not showing up directly | [default] Fix comments not showing up directly
| Smarty | apache-2.0 | driebit/ginger,driebit/ginger,driebit/ginger | smarty | ## Code Before:
<div class="page__content__comments__wrapper">
<h3 class="page__content__comments__header">{{ comments|length }} reacties</h3>
{% with m.comment.rsc[id] as comments %}
{% if comments %}
{% with m.rsc[id].creator_id as creator_id %}
<ol class="page__content__c... |
2aa03882f2b62462ccb88281151a021a12ace4e8 | db/seeds/prisons/WTI-whatton.yml | db/seeds/prisons/WTI-whatton.yml | ---
name: Whatton
nomis_id: WTI
address: |-
New Lane
postcode: NG13 9FQ
email_address: socialvisits.whatton@hmps.gsi.gov.uk
phone_no: 01949 803564
enabled: true
private: false
closed: false
recurring:
fri:
- 1415-1615
mon:
- 1415-1615
sat:
- 0900-1130
- 1400-1600
sun:
- 0900-1130
- 1400-1600
thu... | ---
name: Whatton
nomis_id: WTI
address: |-
New Lane
postcode: NG13 9FQ
email_address: socialvisits.whatton@hmps.gsi.gov.uk
phone_no: 01949 803564
enabled: true
private: false
closed: false
recurring:
mon:
- 1345-1545
thu:
- 1345-1545
fri:
- 1345-1545
sat:
- 0900-1130
- 1400-1600
sun:
- 0900-113... | Update to slots for Whatton | Update to slots for Whatton
Beginning Monday 22nd September, our social visiting times will be as
follows:
Monday, Thursday and Friday: 13.45 - 15.45
Sat and Sunday sessions remain the same as at present.
| YAML | mit | ministryofjustice/prison-visits-2,ministryofjustice/prison-visits-2,ministryofjustice/prison-visits-2,ministryofjustice/prison-visits-2 | yaml | ## Code Before:
---
name: Whatton
nomis_id: WTI
address: |-
New Lane
postcode: NG13 9FQ
email_address: socialvisits.whatton@hmps.gsi.gov.uk
phone_no: 01949 803564
enabled: true
private: false
closed: false
recurring:
fri:
- 1415-1615
mon:
- 1415-1615
sat:
- 0900-1130
- 1400-1600
sun:
- 0900-1130
-... |
1f21feee15014dcb9522c3f74677810622b1e37c | style/aziconic.css | style/aziconic.css |
/* Hover highlight */
.leaflet-marker-icon {
opacity: 0 !important;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)" !important;
}
.leaflet-marker-icon:hover {
opacity: 1 !important;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)" !important;
}
/* Define hover tips styl... |
/* Hover highlight */
.leaflet-marker-icon {
opacity: 0 !important;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)" !important;
}
.leaflet-marker-icon:hover {
opacity: 1 !important;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)" !important;
}
/* Define hover tips styl... | Add IE css shadow property | Add IE css shadow property
| CSS | bsd-3-clause | genhan2011/vae-leaflet,virtual-arizona-experience/azacert,virtual-arizona-experience/aziconic,virtual-arizona-experience/azacert,genhan2011/vae-leaflet,genhan2011/vae-leaflet,virtual-arizona-experience/azacert,virtual-arizona-experience/aziconic,virtual-arizona-experience/aziconic | css | ## Code Before:
/* Hover highlight */
.leaflet-marker-icon {
opacity: 0 !important;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)" !important;
}
.leaflet-marker-icon:hover {
opacity: 1 !important;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)" !important;
}
/* Define... |
ff8ebd51dfdda96fc74dfde46cfb2bc230e2362e | sync/language.types.yml | sync/language.types.yml | all:
- language_interface
- language_content
- language_url
configurable:
- language_interface
negotiation:
language_content:
enabled:
language-url: -20
method_weights:
language-url: -20
language-content-entity: -19
language-session: -18
language-user: -17
language-... | all:
- language_interface
- language_content
- language_url
configurable:
- language_interface
negotiation:
language_content:
enabled:
language-url: -20
method_weights:
language-url: -20
language-content-entity: -19
language-session: -18
language-user: -17
language-... | Add langage detection based upon browser | Add langage detection based upon browser
| YAML | agpl-3.0 | Futurolan/ga-website,Futurolan/ga-website,Futurolan/ga-website,Futurolan/ga-website | yaml | ## Code Before:
all:
- language_interface
- language_content
- language_url
configurable:
- language_interface
negotiation:
language_content:
enabled:
language-url: -20
method_weights:
language-url: -20
language-content-entity: -19
language-session: -18
language-user: -17... |
74e38688d5cb6587356bce2fcfa71d4bdfe905ef | shell/alias.sh | shell/alias.sh | alias fucking=sudo
alias bd='cd $OLDPWD'
alias ls='ls --color=auto'
alias ll='ls -l'
alias lla='ll -a'
alias grep='grep --color=auto'
alias egrep='grep -E'
alias fgrep='grep -F'
alias man='LC_ALL=C LANG=C man'
| alias fucking=sudo
alias bd='cd $OLDPWD'
alias ls='ls --color=auto'
alias ll='ls -lh'
alias lla='ll -a'
alias grep='grep --color=auto'
alias egrep='grep -E'
alias fgrep='grep -F'
alias man='LC_ALL=C LANG=C man'
alias dus='du -hsc * | sort -h'
| Add human dates in ll and add dus for size ord ls | Add human dates in ll and add dus for size ord ls
| Shell | mit | ahaasler/dotfiles,ahaasler/dotfiles,ahaasler/dotfiles | shell | ## Code Before:
alias fucking=sudo
alias bd='cd $OLDPWD'
alias ls='ls --color=auto'
alias ll='ls -l'
alias lla='ll -a'
alias grep='grep --color=auto'
alias egrep='grep -E'
alias fgrep='grep -F'
alias man='LC_ALL=C LANG=C man'
## Instruction:
Add human dates in ll and add dus for size ord ls
## Code After:
alias fucki... |
ef5f60b52a647fd0a4c27ffedf74d292d0b07210 | README.md | README.md | Dada
====
Dada generates tabular text data.
Usage
-----
Usage: dada [-d delimiter] [-s size] [-v]
Installation
------------
Install to `/usr/local/bin`:
make install
Install to `$HOME/bin`:
PREFIX=$HOME make install
History
-------
0.1.0 (2012-06-23)
- Rename `-f` option to `-d` option.
- A... | Dada
====
Dada generates tabular text data.
Usage
-----
Usage: dada [-d delimiter] [-s size] [-v]
Installation
------------
make install
The default installation location is `/usr/local`. Override it with `$PREFIX`:
PREFIX=$HOME make install
History
-------
0.1.0 (2012-06-23)
- Rename `-f` opt... | Tweak Installation section in documentation | Tweak Installation section in documentation
| Markdown | mit | jvirtanen/dada,jvirtanen/dada | markdown | ## Code Before:
Dada
====
Dada generates tabular text data.
Usage
-----
Usage: dada [-d delimiter] [-s size] [-v]
Installation
------------
Install to `/usr/local/bin`:
make install
Install to `$HOME/bin`:
PREFIX=$HOME make install
History
-------
0.1.0 (2012-06-23)
- Rename `-f` option to `-... |
b817c6cc5a0231a0ad9bb1e71a69a15df05e4d80 | cmacros/effectless.h | cmacros/effectless.h |
/*
Macros without multiple execution of side-effects.
*/
/*
Generic min and max without double execution of side-effects:
http://stackoverflow.com/questions/3437404/min-and-max-in-c
*/
#define _CHOOSE(boolop, a, b, uid) \
({ \
decltype(a) _a_ ## uid = (a); \
decltype(b) _b_... |
/*
Macros without multiple execution of side-effects.
*/
/*
Generic min and max without double execution of side-effects:
http://stackoverflow.com/questions/3437404/min-and-max-in-c
*/
#define _CHOOSE(boolop, a, b, uid) \
({ ... | Fix `_CHOOSE` to use the copies instead of double execution of side-effects (issue reported by tromp at bitcointalk.org) | Fix `_CHOOSE` to use the copies instead of double execution of side-effects (issue reported by tromp at bitcointalk.org)
| C | unlicense | shelby3/cmacros,shelby3/cmacros | c | ## Code Before:
/*
Macros without multiple execution of side-effects.
*/
/*
Generic min and max without double execution of side-effects:
http://stackoverflow.com/questions/3437404/min-and-max-in-c
*/
#define _CHOOSE(boolop, a, b, uid) \
({ \
decltype(a) _a_ ## uid = (a); \
... |
4b2b77e901503ceccc8cf4cd2b78f6130da7a39f | lib/ktutils/os.rb | lib/ktutils/os.rb |
module Ktutils
# Sourced from
# http://stackoverflow.com/questions/170956/how-can-i-find-which-operating-system-my-ruby-program-is-running-on/171011#171011
module OS
def OS.windows?
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG["arch"]) != nil
end
def OS.mac?
(/darwin/ =~ RbCo... |
module Ktutils
# Sourced from
# http://stackoverflow.com/questions/170956/how-can-i-find-which-operating-system-my-ruby-program-is-running-on/171011#171011
# NOTE: When running on jruby, "arch" returns universal-java1.7 (or similar)
# Use "host_os" instead.
#
module OS
def OS.windows?
(/msw... | Change how OS is detected | Change how OS is detected
* Use host_os instead of arch
| Ruby | mit | jmcaffee/ktutils | ruby | ## Code Before:
module Ktutils
# Sourced from
# http://stackoverflow.com/questions/170956/how-can-i-find-which-operating-system-my-ruby-program-is-running-on/171011#171011
module OS
def OS.windows?
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG["arch"]) != nil
end
def OS.mac?
(... |
7ce8e8e217e80098ce2b6371dd6c117009843602 | pyxform/tests_v1/test_whitespace.py | pyxform/tests_v1/test_whitespace.py | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | Remove test that can't be fulfilled | Remove test that can't be fulfilled
| Python | bsd-2-clause | XLSForm/pyxform,XLSForm/pyxform | python | ## Code Before:
from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | typ... |
f99c5a6b63a3f98c22ab3f6ea92cdebc8502123a | todo.md | todo.md |
schema.json
===========
- [x] Example values in arbitrary units.
- [x] Field for "always-scalar"
- [ ] Separate fields for MathJax and standalone LaTeX documents.
equajson.py
===========
- [ ] Search by term in equation.
json
====
- Stirling's approximation
- XAFS equation
- definition of e
- trigonometri... |
schema.json
===========
- [x] Example values in arbitrary units.
- [x] Field for "always-scalar"
- [ ] Separate fields for MathJax and standalone LaTeX documents.
equajson.py
===========
- [ ] Search by term in equation.
json
====
- [x] Stirling's approximation
- [x] XAFS equation
- [ ] definition o... | Update what is done so far. | Update what is done so far.
| Markdown | mit | nbeaver/equajson | markdown | ## Code Before:
schema.json
===========
- [x] Example values in arbitrary units.
- [x] Field for "always-scalar"
- [ ] Separate fields for MathJax and standalone LaTeX documents.
equajson.py
===========
- [ ] Search by term in equation.
json
====
- Stirling's approximation
- XAFS equation
- definition of ... |
587d94c9cea3f88d177749841cdfa3830199b6cc | doc/api.rst | doc/api.rst | API
===
.. py:module:: reg
Dispatch functions
------------------
.. autofunction:: dispatch
.. autoclass:: Dispatch
:members:
.. autofunction:: match_key
.. autofunction:: match_instance
.. autofunction:: match_class
.. autoclass:: DictCachingKeyLookup
:members:
.. autoclass:: LruCachingKeyLookup
:memb... | API
===
.. py:module:: reg
Dispatch functions
------------------
.. autofunction:: dispatch
.. autoclass:: Dispatch
:members:
.. autofunction:: match_key
.. autofunction:: match_instance
.. autofunction:: match_class
.. autoclass:: LookupEntry
:members:
.. autoclass:: DictCachingKeyLookup
:members:
..... | Add documentation for the LookupEntry class. | Add documentation for the LookupEntry class.
| reStructuredText | bsd-3-clause | morepath/reg,taschini/reg | restructuredtext | ## Code Before:
API
===
.. py:module:: reg
Dispatch functions
------------------
.. autofunction:: dispatch
.. autoclass:: Dispatch
:members:
.. autofunction:: match_key
.. autofunction:: match_instance
.. autofunction:: match_class
.. autoclass:: DictCachingKeyLookup
:members:
.. autoclass:: LruCachingKe... |
3248b8cfe38259380d026a701ea21bdcffc43261 | Papers/Sequence-functions/sec-our-method.tex | Papers/Sequence-functions/sec-our-method.tex | \section{Our technique}
\begin{verbatim}
(defmacro with-test-and-test-not
((test-var test-not-var) &body body)
`(cond ((and (null ,test-var)
(null ,test-not-var))
,@body)
((null ,test-not-var)
(cond ((or (eq ,test-var #'eq)
(eq ,test-var 'eq))
,@body)
((or (eq ,te... | \section{Our technique}
| Remove macro handling TEST and TEST-NOT. We need a better test case. | Remove macro handling TEST and TEST-NOT. We need a better test case.
| TeX | bsd-2-clause | clasp-developers/SICL,clasp-developers/SICL,vtomole/SICL,vtomole/SICL,vtomole/SICL,vtomole/SICL,clasp-developers/SICL,clasp-developers/SICL | tex | ## Code Before:
\section{Our technique}
\begin{verbatim}
(defmacro with-test-and-test-not
((test-var test-not-var) &body body)
`(cond ((and (null ,test-var)
(null ,test-not-var))
,@body)
((null ,test-not-var)
(cond ((or (eq ,test-var #'eq)
(eq ,test-var 'eq))
,@body... |
cdd1256cb36e322ea6b430399774ad9237382c64 | install_noc.sh | install_noc.sh |
set -e -x
which puppet || {
echo >&2 Please install puppet first.
exit 1
}
|
set -e -x
which puppet || {
echo >&2 Please install puppet first.
exit 1
}
: ${CHECKOUT_DIR:="${dirname "$0"}"}
: ${PUPPET_MODULES_DIR:=/etc/puppet/environments/production/modules}
ln -sf "${CHECKOUT_DIR}"/noc/puppet/modules/blueboxnoc "$PUPPET_MODULES_DIR"/
| Add a symlink – We'll see what happens. | Add a symlink – We'll see what happens.
| Shell | mit | epfl-sti/cmi.bluebox,epfl-sti/cmi.bluebox,epfl-sti/cmi.bluebox,epfl-sti/cmi.bluebox | shell | ## Code Before:
set -e -x
which puppet || {
echo >&2 Please install puppet first.
exit 1
}
## Instruction:
Add a symlink – We'll see what happens.
## Code After:
set -e -x
which puppet || {
echo >&2 Please install puppet first.
exit 1
}
: ${CHECKOUT_DIR:="${dirname "$0"}"}
: ${PUPPET_MODULES_DIR:... |
476382e981bbae64480ce6510b9f52564a4f4899 | index.html | index.html | <img style="padding-top: 20px; padding-bottom: 30px;" src="images/Phylotastic_logo.png"/>
<p>
Phylotastic is 3 things: the name of an event, a noun referring to an architecture, and an adjective for all things that do something cool <em>and</em> interoperable with phylogenies.
</p>
<h2><a href="http://www.evoio.org/Phy... | <head>
<title>Phylotastis: An event, an architecture, and an attribute</title>
</head>
<body style="font-family: sans-serif; background-color: white;">
<img style="padding-top: 20px; padding-bottom: 30px;" src="images/Phylotastic_logo.png"/>
<p>
Phylotastic is 3 things: the name of an event, a noun referring to an arch... | Make it a little more standards-complying. | Make it a little more standards-complying.
| HTML | mit | phylotastic/phylotastic.github.io,phylotastic/phylotastic.github.io | html | ## Code Before:
<img style="padding-top: 20px; padding-bottom: 30px;" src="images/Phylotastic_logo.png"/>
<p>
Phylotastic is 3 things: the name of an event, a noun referring to an architecture, and an adjective for all things that do something cool <em>and</em> interoperable with phylogenies.
</p>
<h2><a href="http://w... |
1b31337b27ca6c7423964420c0678d45637aba57 | webpack.config.js | webpack.config.js | const commonConfig = require('./webpack.common');
const path = require('path');
const Webpack = require('webpack');
const { version } = require('./package.json');
module.exports = Object.assign(commonConfig, {
entry: './src/main.js',
output: {
path: path.join(__dirname, 'dist'),
publicPath: '/assets/',
... | const commonConfig = require('./webpack.common');
const path = require('path');
const Webpack = require('webpack');
const { version } = require('./package.json');
module.exports = Object.assign(commonConfig, {
entry: './src/main.js',
output: {
path: path.join(__dirname, 'dist'),
publicPath: '/assets/',
... | Revert "Externalize Shifty and Lodash" | Revert "Externalize Shifty and Lodash"
This reverts commit ebc2fd169272b7bfec9ae2fbdf4e1ef4fb52b7cd.
This is fixes the fact that Rekapi will not load properly in web
environments if the dependencies are not bundled into the binary. This
may not be ideal and warrants further investigation for a better
solution.
| JavaScript | mit | jeremyckahn/rekapi,jeremyckahn/rekapi | javascript | ## Code Before:
const commonConfig = require('./webpack.common');
const path = require('path');
const Webpack = require('webpack');
const { version } = require('./package.json');
module.exports = Object.assign(commonConfig, {
entry: './src/main.js',
output: {
path: path.join(__dirname, 'dist'),
publicPath... |
7ae42d3ffaf76392563d6260105ab8fea1d99d15 | node/functions.zsh | node/functions.zsh | publish () {
git fetch
if [[ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]]; then
return 1
fi
npm version $1 && git push origin --tags && npm publish
}
module () {
cd $PROJECTS
mkdir $1
cd $1
git init
hub create
travis enable --no-interactive &
yo bd
}
| publish () {
git fetch
if [[ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]]; then
return 1
fi
npm version $1
git push origin --follow-tags
npm publish
}
module () {
cd $PROJECTS
mkdir $1
cd $1
git init
hub create
travis enable --no-interactive &
yo bd
}
| Fix npm publish script: --tags => --follow-tags | Fix npm publish script: --tags => --follow-tags
| Shell | mit | bendrucker/dotfiles,bendrucker/dotfiles | shell | ## Code Before:
publish () {
git fetch
if [[ $(git rev-parse HEAD) != $(git rev-parse @{u}) ]]; then
return 1
fi
npm version $1 && git push origin --tags && npm publish
}
module () {
cd $PROJECTS
mkdir $1
cd $1
git init
hub create
travis enable --no-interactive &
yo bd
}
## Instruction:
Fix ... |
a0135de3a2cffa63c1ed40022e9b7df15fc44529 | index.js | index.js | 'use strict'
// Defer function using native promises
const defer = function() {
let result = {}
result.promise = new Promise(function(resolve, reject) {
result.resolve = resolve
result.reject = reject
})
return result
}
// Make callback function
const prepareCallback = function(deferred, withoutError... | 'use strict'
// Make callback function
const prepare = function(resolve, reject, withoutErrorAttr) {
// By default start with a second attribute
let base = 2
// But if it's not node style callback switch to the first one
if (withoutErrorAttr)
--base
return function () {
// If node style function r... | Remove deffered and simplify script. | Remove deffered and simplify script.
| JavaScript | mit | stojanovic/generatorify | javascript | ## Code Before:
'use strict'
// Defer function using native promises
const defer = function() {
let result = {}
result.promise = new Promise(function(resolve, reject) {
result.resolve = resolve
result.reject = reject
})
return result
}
// Make callback function
const prepareCallback = function(deferr... |
e64063535ff8ef851701a5a55bf25564fc752d27 | test_case_monkey/tcm/templates/project_create.html | test_case_monkey/tcm/templates/project_create.html | {% extends "base.html" %}
{% load static %}
{% block content %}
<div>
<h2>Add project</h2>
<br />
<form action="" method="post">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save" />
</form>
</div>
{% endblock content %}
| {% extends "base.html" %}
{% load static %}
{% block content %}
{% load crispy_forms_tags %}
<div>
<h2>Add project</h2>
<br />
<form action="" method="post">{% csrf_token %}
{{ form|crispy }}
<input type="submit" value="Save" />
</form>
</div>
{% endblock content %}
| Use crispyform instead of default form while creating project | Use crispyform instead of default form while creating project
| HTML | mit | Fanarim/test_case_monkey,Fanarim/test_case_monkey,Fanarim/test_case_monkey,Fanarim/test_case_monkey | html | ## Code Before:
{% extends "base.html" %}
{% load static %}
{% block content %}
<div>
<h2>Add project</h2>
<br />
<form action="" method="post">{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Save" />
</form>
</div>
{% endblock content %}
## Instruction:
Use crispyform instead of def... |
132b148ca8701ee867b7a08432a3595a213ce470 | cedexis/radar/tests/test_cli.py | cedexis/radar/tests/test_cli.py | import unittest
import types
import cedexis.radar.cli
class TestCommandLineInterface(unittest.TestCase):
def test_main(self):
self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType))
| import unittest
from unittest.mock import patch, MagicMock, call
import types
from pprint import pprint
import cedexis.radar.cli
class TestCommandLineInterface(unittest.TestCase):
def test_main(self):
self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType))
@patch('logging.getLogger')... | Add unit test for overrides | Add unit test for overrides
| Python | mit | cedexis/cedexis.radar | python | ## Code Before:
import unittest
import types
import cedexis.radar.cli
class TestCommandLineInterface(unittest.TestCase):
def test_main(self):
self.assertTrue(isinstance(cedexis.radar.cli.main, types.FunctionType))
## Instruction:
Add unit test for overrides
## Code After:
import unittest
from unittest.... |
da159456eb49efa3e3e35fce85f54e102c9aff58 | layouts/index.html | layouts/index.html | <!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<title> {{ .Site.Title }} </title>
{{ partial "head.html" . }}
</head>
<body>
{{ partial "header.html" . }}
<div class="flex-wrapper">
<div class="container wrapper">
{{ with .Site.Params.ProfilePicture }}
<div class="row">
<div ... | <!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<title> {{ .Site.Title }} </title>
{{ partial "head.html" . }}
</head>
<body>
{{ partial "header.html" . }}
<div class="flex-wrapper">
<div class="container wrapper">
{{ with .Site.Params.ProfilePicture }}
<div class="row">
<div ... | Hide empty box if no content in 'About' param | Hide empty box if no content in 'About' param
| HTML | mit | LordMathis/hugo-theme-nix | html | ## Code Before:
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
<head>
<title> {{ .Site.Title }} </title>
{{ partial "head.html" . }}
</head>
<body>
{{ partial "header.html" . }}
<div class="flex-wrapper">
<div class="container wrapper">
{{ with .Site.Params.ProfilePicture }}
<div class="... |
7e4dd7ecaa23409c33e5c7cc6442a52f585f5f9c | lib/labor/helpers.rb | lib/labor/helpers.rb | module Labor
module Helpers
def classify(dashed_word)
dashed_word.split('-').each { |part| part[0] = part[0].chr.upcase }.join
end
def constantize(camel_cased_word)
camel_cased_word = camel_cased_word.to_s
if camel_cased_word.include?('-')
camel_cased_word = classify(camel_case... | module Labor
module Helpers
def classify(word)
word.split(/-_/).each { |part| part[0] = part[0].chr.upcase }.join
end
def constantize(camel_cased_word)
camel_cased_word = camel_cased_word.to_s
if camel_cased_word.include?('-')
camel_cased_word = classify(camel_cased_word)
... | Split on hyphen and underscores for job names | Split on hyphen and underscores for job names
| Ruby | mit | brettbuddin/labor | ruby | ## Code Before:
module Labor
module Helpers
def classify(dashed_word)
dashed_word.split('-').each { |part| part[0] = part[0].chr.upcase }.join
end
def constantize(camel_cased_word)
camel_cased_word = camel_cased_word.to_s
if camel_cased_word.include?('-')
camel_cased_word = cla... |
60d55eda5dfe6bf59a21e56f8f5a8a19d37ad8ec | app/initializers/ember-cli-accounting.js | app/initializers/ember-cli-accounting.js | import formatNumberHelper from 'accounting/helpers/format-number';
import formatMoneyHelper from 'accounting/helpers/format-money';
import Ember from 'ember';
var registerHelper = Ember.HTMLBars.registerHelper;
var makeBoundHelper = Ember.HTMLBars.makeBoundHelper;
export var initialize = function(/* container, app */... | import formatNumberHelper from 'accounting/helpers/format-number';
import formatMoneyHelper from 'accounting/helpers/format-money';
import Ember from 'ember';
var registerHelper = Ember.HTMLBars._registerHelper || Ember.HTMLBars.registerHelper;
var makeBoundHelper = Ember.HTMLBars.makeBoundHelper;
export var initiali... | Fix `Uncaught TypeError: undefined is not a function` | Fix `Uncaught TypeError: undefined is not a function`
For more information see the following:
https://github.com/cibernox/ember-cli-accounting/issues/7#issuecomment-73835187
https://github.com/emberjs/ember.js/commit/ad62ccfdfd9578884261c96a2af4a6a238bd3ae9
| JavaScript | mit | cibernox/ember-cli-accounting,cibernox/ember-cli-accounting,alexdiliberto/ember-cli-accounting,alexdiliberto/ember-cli-accounting | javascript | ## Code Before:
import formatNumberHelper from 'accounting/helpers/format-number';
import formatMoneyHelper from 'accounting/helpers/format-money';
import Ember from 'ember';
var registerHelper = Ember.HTMLBars.registerHelper;
var makeBoundHelper = Ember.HTMLBars.makeBoundHelper;
export var initialize = function(/* c... |
977ab27a3f9d3236d1eb821c27f8b0a6a26c0864 | db/migrate/20161014085122_add_builder_enabled_to_organizations.rb | db/migrate/20161014085122_add_builder_enabled_to_organizations.rb | Sequel.migration do
up do
alter_table :organizations do
add_column :builder_enabled, :boolean, null: false, default: false
end
Rails::Sequel.connection.run('UPDATE users SET builder_enabled = true WHERE builder_enabled IS NULL')
alter_table :users do
set_column_default :builder_enabled, f... | Sequel.migration do
up do
alter_table :organizations do
add_column :builder_enabled, :boolean, null: false, default: false
end
alter_table :users do
set_column_default :builder_enabled, false
end
end
down do
alter_table :organizations do
drop_column :builder_enabled
end... | Change migration, allow users nulls (inherit from org) | Change migration, allow users nulls (inherit from org)
| Ruby | bsd-3-clause | CartoDB/cartodb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb,CartoDB/cartodb,splashblot/dronedb | ruby | ## Code Before:
Sequel.migration do
up do
alter_table :organizations do
add_column :builder_enabled, :boolean, null: false, default: false
end
Rails::Sequel.connection.run('UPDATE users SET builder_enabled = true WHERE builder_enabled IS NULL')
alter_table :users do
set_column_default :bu... |
d30cb455eb066c5711b903b682f00dd752bedaf7 | main.js | main.js | const accounts = {};
$('#go').click(function () {
const networkId = $('#networkId').val();
const accessToken = $('#accessToken').val();
const filter = '!0S2A5ipm(pczxWJLGNzYzyy4l';
const key = 'c8aSGAR0rp5RUK)dVriyCA((';
$.getJSON(`http://api.stackexchange.com/2.2/users/${networkId}/associated`, function (j... | function getPosts(user, site, page, cb) {
const accessToken = $('#accessToken').val();
const filter = '!0S2A5ipm(pczxWJLGNzYzyy4l';
const key = 'c8aSGAR0rp5RUK)dVriyCA((';
$.getJSON(`https://api.stackexchange.com/2.2/users/${user}/posts?filter=${filter}&key=${key}&access_token=${accessToken}&site=${site}&page=... | Use more modern JS; Add pagination to SE API calls | Use more modern JS; Add pagination to SE API calls
| JavaScript | mit | shu8/SE-PostUrlDump,shu8/SE-PostUrlDump | javascript | ## Code Before:
const accounts = {};
$('#go').click(function () {
const networkId = $('#networkId').val();
const accessToken = $('#accessToken').val();
const filter = '!0S2A5ipm(pczxWJLGNzYzyy4l';
const key = 'c8aSGAR0rp5RUK)dVriyCA((';
$.getJSON(`http://api.stackexchange.com/2.2/users/${networkId}/associat... |
818de1d8ef32ef853d37e753cc0dc701d76d04ea | app/apis/search_api.py | app/apis/search_api.py | from flask import Blueprint, jsonify, request
from importlib import import_module
import re
blueprint = Blueprint('search_api', __name__, url_prefix='/search')
@blueprint.route('/<string:model>')
def api(model):
global Model
class_name = model.title() + 'Search'
model_name = model + '_search'
Model =... |
import sys
from flask import Blueprint, jsonify, request
from importlib import import_module
from unicodedata import normalize
reload(sys)
sys.setdefaultencoding('utf8')
def remove_accents(txt):
return normalize('NFKD', txt.decode('utf-8')).encode('ASCII','ignore')
blueprint = Blueprint('search_api', __name__, ... | Add support to search for word in search api | Add support to search for word in search api
| Python | mit | daniel1409/dataviva-api,DataViva/dataviva-api | python | ## Code Before:
from flask import Blueprint, jsonify, request
from importlib import import_module
import re
blueprint = Blueprint('search_api', __name__, url_prefix='/search')
@blueprint.route('/<string:model>')
def api(model):
global Model
class_name = model.title() + 'Search'
model_name = model + '_sea... |
e84b40572fa4d8f362df3fe2bebf00a326f67db6 | bin/grappa_srun_prolog.sh | bin/grappa_srun_prolog.sh |
export GLOG_logtostderr=1
export GLOG_v=1
export GASNET_BACKTRACE=1
export GASNET_FREEZE_SIGNAL=SIGUSR1
export GASNET_FREEZE_ON_ERROR=1
export GASNET_FREEZE=0
export GASNET_NETWORKDEPTH_PP=96
export GASNET_NETWORKDEPTH_TOTAL=1024
export GASNET_AMCREDITS_PP=48
export GASNET_PHYSMEM_MAX=1024M
export CPUPROFILE_FREQUENCY... |
export GLOG_logtostderr=1
export GLOG_v=1
export GASNET_BACKTRACE=1
export GASNET_FREEZE_SIGNAL=SIGUSR1
export GASNET_FREEZE_ON_ERROR=1
export GASNET_FREEZE=0
export GASNET_NETWORKDEPTH_PP=96
export GASNET_NETWORKDEPTH_TOTAL=1024
export GASNET_AMCREDITS_PP=48
export GASNET_PHYSMEM_MAX=1024M
export CPUPROFILE_FREQUENCY... | Set MV2_ON_DEMAND_THRESHOLD higher than default to run > 64 on pal. | Set MV2_ON_DEMAND_THRESHOLD higher than default to run > 64 on pal.
| Shell | bsd-3-clause | uwsampa/grappa,uwsampa/grappa,buaasun/grappa,uwsampa/grappa,buaasun/grappa,alexfrolov/grappa,uwsampa/grappa,alexfrolov/grappa,buaasun/grappa,buaasun/grappa,buaasun/grappa,alexfrolov/grappa,alexfrolov/grappa,alexfrolov/grappa,uwsampa/grappa,alexfrolov/grappa,buaasun/grappa,alexfrolov/grappa,uwsampa/grappa,buaasun/grappa... | shell | ## Code Before:
export GLOG_logtostderr=1
export GLOG_v=1
export GASNET_BACKTRACE=1
export GASNET_FREEZE_SIGNAL=SIGUSR1
export GASNET_FREEZE_ON_ERROR=1
export GASNET_FREEZE=0
export GASNET_NETWORKDEPTH_PP=96
export GASNET_NETWORKDEPTH_TOTAL=1024
export GASNET_AMCREDITS_PP=48
export GASNET_PHYSMEM_MAX=1024M
export CPUP... |
a59e3911a9173869697233bd4219dc6f6b9e8293 | package.json | package.json | {
"scripts": {
"test": "mocha",
"cli": "node demo/commandline.js",
"linter": "eslint .",
"coverage": "istanbul cover _mocha",
"pretest": "npm run --silent linter",
"bundler": "browserify src/engines/browser.js --s createWebshell -o webshell.js"
},
"devDependencies": {
"browserify": "^1... | {
"scripts": {
"test": "mocha",
"cli": "node demo/commandline.js",
"linter": "eslint .",
"coverage": "istanbul cover _mocha",
"pretest": "npm run --silent linter",
"bundler": "browserify src/engines/browser.js --s createWebshell -o webshell.js",
"bundler-watch": "watchify src/engines/brows... | Use watchify for convenience during dev | Use watchify for convenience during dev
| JSON | apache-2.0 | jotaen/webshell.js,jotaen/webshell.js | json | ## Code Before:
{
"scripts": {
"test": "mocha",
"cli": "node demo/commandline.js",
"linter": "eslint .",
"coverage": "istanbul cover _mocha",
"pretest": "npm run --silent linter",
"bundler": "browserify src/engines/browser.js --s createWebshell -o webshell.js"
},
"devDependencies": {
"... |
37b17100aaf00db790944b559fe19cc245a4fd6a | Cargo.toml | Cargo.toml | [package]
name = "pop3-rs"
version = "0.1.0"
authors = ["Darshit Shah <darnir@gmail.com>"]
build = "build.rs"
description = "A rust based library for handling the POP3 Protocol"
repository = "https://github.com/darnir/pop3-rs"
homepage = "https://github.com/darnir/pop3-rs"
documentation = ""
keywords = ["pop", "pop3", ... | [package]
name = "pop3-rs"
version = "0.1.0"
authors = ["Darshit Shah <darnir@gmail.com>"]
build = "build.rs"
description = "A rust based library for handling the POP3 Protocol"
repository = "https://github.com/darnir/pop3-rs"
homepage = "https://github.com/darnir/pop3-rs"
keywords = ["pop", "pop3", "mail", "protocol"]... | Add a basic readme file | Add a basic readme file
[ci skip]
| TOML | mit | darnir/pop3-rs | toml | ## Code Before:
[package]
name = "pop3-rs"
version = "0.1.0"
authors = ["Darshit Shah <darnir@gmail.com>"]
build = "build.rs"
description = "A rust based library for handling the POP3 Protocol"
repository = "https://github.com/darnir/pop3-rs"
homepage = "https://github.com/darnir/pop3-rs"
documentation = ""
keywords = ... |
f9763d21991b3556ddb086a4b036d5fca9414d2a | lib/dotenv/configuration.rb | lib/dotenv/configuration.rb | require "dotenv"
require "dotenv/parser"
require "dotenv/configuration/version"
module Dotenv
module Configuration
def configure(*args)
envfile, settings = nil, nil
case args.size
when 1
envfile, settings = '.env', args[0]
when 2
envfile, settings = *args
else
... | require "dotenv"
require "dotenv/parser"
require "tempfile"
require "dotenv/configuration/version"
module Dotenv
module Configuration
def configure(*args)
envfile, settings = nil, nil
case args.size
when 1
envfile, settings = '.env', args[0]
when 2
envfile, settings = *arg... | Handle if file is missing | Handle if file is missing
| Ruby | mit | udzura/dotenv-configuration | ruby | ## Code Before:
require "dotenv"
require "dotenv/parser"
require "dotenv/configuration/version"
module Dotenv
module Configuration
def configure(*args)
envfile, settings = nil, nil
case args.size
when 1
envfile, settings = '.env', args[0]
when 2
envfile, settings = *args
... |
865f1bc03d292ea1bf4687720d36314e99fc69df | lib/generators/g5_authenticatable/install_generator.rb | lib/generators/g5_authenticatable/install_generator.rb | require 'rails/generators/base'
module G5Authenticatable
class InstallGenerator < Rails::Generators::Base
namespace 'g5_authenticatable'
desc 'Creates a migration for the user model, copies the locale files,
and mounts the g5_authenticatable engine.'
hook_for :orm
def copy_locale
end... | require 'rails/generators/base'
module G5Authenticatable
class InstallGenerator < Rails::Generators::Base
namespace 'g5_authenticatable'
desc 'Installs the g5_authenticatable engine.'
def mount_engine
route "mount G5Authenticatable::Engine => '/g5_auth'"
end
end
end
| Remove orm hook from install generator for now | Remove orm hook from install generator for now
| Ruby | mit | G5/g5_authenticatable,G5/g5_authenticatable,G5/g5_authenticatable | ruby | ## Code Before:
require 'rails/generators/base'
module G5Authenticatable
class InstallGenerator < Rails::Generators::Base
namespace 'g5_authenticatable'
desc 'Creates a migration for the user model, copies the locale files,
and mounts the g5_authenticatable engine.'
hook_for :orm
def cop... |
56f8b8ca574e965a0a66fbb6997e1d8c485488ac | README.md | README.md |
> Git plugin for copy remote git repo to another remote destination
[]()
[](https://travis-ci.org/cybertk/git-copy)
## Getting Started
sudo gem install git-copy
git copy https://github.com/c... |
> Git plugin for copy remote git repo to another remote destination
[]()
[](https://travis-ci.org/cybertk/git-copy)
## Getting Started
sudo gem install git-copy
git copy https://github.c... | Add examples and cleanup readme | Add examples and cleanup readme
| Markdown | mit | cybertk/git-copy,cybertk/git-copy | markdown | ## Code Before:
> Git plugin for copy remote git repo to another remote destination
[]()
[](https://travis-ci.org/cybertk/git-copy)
## Getting Started
sudo gem install git-copy
git copy http... |
e735a093caade4c4106307935e25a42d7361c49a | semaphore.js | semaphore.js | (function (context) {
var _SEMAPOHRES = {};
var Semaphore = function (key) {
this.key = key;
if (_SEMAPOHRES[this.key] == undefined)
_SEMAPOHRES[this.key] = false;
return this;
};
Semaphore.prototype.isLocked = function() {
return _SEMAPOHRES[this.key];
};
Semaphore.prototype.lock =... | (function (context) {
var _SEMAPOHRES = {};
var Semaphore = function (key) {
this.key = key;
if (_SEMAPOHRES[this.key] == undefined)
_SEMAPOHRES[this.key] = false;
return this;
};
Semaphore.prototype.isLocked = function() {
return _SEMAPOHRES[this.key];
};
Semaphore.prototype.lock =... | Remove second Semaphore.wrap and pass in this. | Remove second Semaphore.wrap and pass in this.
| JavaScript | mit | RyanMcG/semaphore-js | javascript | ## Code Before:
(function (context) {
var _SEMAPOHRES = {};
var Semaphore = function (key) {
this.key = key;
if (_SEMAPOHRES[this.key] == undefined)
_SEMAPOHRES[this.key] = false;
return this;
};
Semaphore.prototype.isLocked = function() {
return _SEMAPOHRES[this.key];
};
Semaphore.... |
40edb65ee751dfe4cf6e04ee59891266d8b14f30 | spacy/tests/regression/test_issue1380.py | spacy/tests/regression/test_issue1380.py | import pytest
from ...language import Language
def test_issue1380_empty_string():
nlp = Language()
doc = nlp('')
assert len(doc) == 0
@pytest.mark.models('en')
def test_issue1380_en(EN):
doc = EN('')
assert len(doc) == 0
| from __future__ import unicode_literals
import pytest
from ...language import Language
def test_issue1380_empty_string():
nlp = Language()
doc = nlp('')
assert len(doc) == 0
@pytest.mark.models('en')
def test_issue1380_en(EN):
doc = EN('')
assert len(doc) == 0
| Make test work for Python 2.7 | Make test work for Python 2.7
| Python | mit | recognai/spaCy,aikramer2/spaCy,honnibal/spaCy,aikramer2/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,explosion/spaCy,aikramer2/spaCy,explosion/spaCy,recognai/spaCy,recognai/spaCy,honnibal/spaCy,explosion/spaCy,spacy-io/spaCy,aikramer2/spaCy,recognai/spaCy,honnibal/spaCy,spacy-io/spaCy,honnibal/spaCy,spacy-io/spa... | python | ## Code Before:
import pytest
from ...language import Language
def test_issue1380_empty_string():
nlp = Language()
doc = nlp('')
assert len(doc) == 0
@pytest.mark.models('en')
def test_issue1380_en(EN):
doc = EN('')
assert len(doc) == 0
## Instruction:
Make test work for Python 2.7
## Code Afte... |
381e26a02ee46437ea840babe6462f48c496f5fe | setup.py | setup.py | import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="1.0.3",
description=(
"Makes it easy to create a command line interface for any "... | import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="2.0.0",
description=(
"Makes it easy to create a command line interface for any "... | Update to v2.0.0 with py3 only support | Update to v2.0.0 with py3 only support
| Python | mit | bertrandvidal/parse_this | python | ## Code Before:
import os
from setuptools import setup
README_PATH = os.path.join(os.path.dirname(__file__), "README.md")
with open(README_PATH, "r") as README_FILE:
README = README_FILE.read()
setup(
name="parse_this",
version="1.0.3",
description=(
"Makes it easy to create a command line int... |
3a04afb4119bfa80976c429e2418a94fa03a424c | app/controllers/about_loa1_controller.rb | app/controllers/about_loa1_controller.rb | class AboutLoa1Controller < ApplicationController
layout 'slides', except: [:choosing_a_company]
def index
@tailored_text = current_transaction.tailored_text
render 'about/about'
end
def certified_companies
@loa1_idps = IDENTITY_PROVIDER_DISPLAY_DECORATOR.decorate_collection(current_identity_provi... | require 'partials/viewable_idp_partial_controller'
class AboutLoa1Controller < ApplicationController
include ViewableIdpPartialController
layout 'slides', except: [:choosing_a_company]
def index
@tailored_text = current_transaction.tailored_text
render 'about/about'
end
def certified_companies
... | Fix merge conflict by including ViewableIdpPartialController | TT-1766: Fix merge conflict by including ViewableIdpPartialController
Authors: 30e32bebb47edfdde2fee768480b7a9867c83640@rachelthecodesmith
| Ruby | mit | alphagov/verify-frontend,alphagov/verify-frontend,alphagov/verify-frontend,alphagov/verify-frontend | ruby | ## Code Before:
class AboutLoa1Controller < ApplicationController
layout 'slides', except: [:choosing_a_company]
def index
@tailored_text = current_transaction.tailored_text
render 'about/about'
end
def certified_companies
@loa1_idps = IDENTITY_PROVIDER_DISPLAY_DECORATOR.decorate_collection(curren... |
20b29ad94cca8e0636e23ff25c837dccc65386d0 | lib/conceptql/operators/vocabulary_operator.rb | lib/conceptql/operators/vocabulary_operator.rb | require_relative 'operator'
module ConceptQL
module Operators
class VocabularyOperator < Operator
category "Select by Clinical Codes"
basic_type :selection
validate_no_upstreams
validate_at_least_one_argument
ConceptCode = Struct.new(:vocabulary, :code, :description) do
def ... | require_relative 'operator'
module ConceptQL
module Operators
class VocabularyOperator < Operator
category "Select by Clinical Codes"
basic_type :selection
validate_no_upstreams
validate_at_least_one_argument
ConceptCode = Struct.new(:vocabulary, :code, :description) do
def ... | Use Operator.preferred_name for code lists | Use Operator.preferred_name for code lists
| Ruby | mit | outcomesinsights/conceptql,outcomesinsights/conceptql | ruby | ## Code Before:
require_relative 'operator'
module ConceptQL
module Operators
class VocabularyOperator < Operator
category "Select by Clinical Codes"
basic_type :selection
validate_no_upstreams
validate_at_least_one_argument
ConceptCode = Struct.new(:vocabulary, :code, :description)... |
d46620c9abf2e0d1fba925c0b0c3dc3422816fc1 | metadata/com.adityakamble49.dcipher.yml | metadata/com.adityakamble49.dcipher.yml | Categories:
- Security
License: Apache-2.0
SourceCode: https://github.com/adityakamble49/dcipher-app
IssueTracker: https://github.com/adityakamble49/dcipher-app/issues
Changelog: https://github.com/adityakamble49/dcipher-app/releases
AutoName: DCipher
Summary: secret Text with 100% offline Encryption
Description: |-... | Categories:
- Security
License: Apache-2.0
SourceCode: https://github.com/adityakamble49/dcipher-app
IssueTracker: https://github.com/adityakamble49/dcipher-app/issues
Changelog: https://github.com/adityakamble49/dcipher-app/releases
AutoName: DCipher
Summary: secret Text with 100% offline Encryption
Description: |-... | Update DCipher to 1.2.1 (9) | Update DCipher to 1.2.1 (9)
| YAML | agpl-3.0 | f-droid/fdroiddata,f-droid/fdroid-data,f-droid/fdroiddata | yaml | ## Code Before:
Categories:
- Security
License: Apache-2.0
SourceCode: https://github.com/adityakamble49/dcipher-app
IssueTracker: https://github.com/adityakamble49/dcipher-app/issues
Changelog: https://github.com/adityakamble49/dcipher-app/releases
AutoName: DCipher
Summary: secret Text with 100% offline Encryption... |
52dfaa41c3dbe8e5d74d0fd211bf2dd6adae7a7b | pwd-service/src/test/groovy/org/pwd/domain/websites/WebsiteRepositoryTest.groovy | pwd-service/src/test/groovy/org/pwd/domain/websites/WebsiteRepositoryTest.groovy | package org.pwd.domain.websites
import org.pwd.application.IntegrationTest
import org.pwd.domain.audit.AuditRepository
import org.springframework.beans.factory.annotation.Autowired
import spock.lang.Specification
/**
* @author bartosz.walacik
*/
class WebsiteRepositoryTest extends IntegrationTest {
@Autowired
... | package org.pwd.domain.websites
import org.pwd.application.IntegrationTest
import org.pwd.domain.audit.AuditRepository
import org.springframework.beans.factory.annotation.Autowired
import spock.lang.Specification
/**
* @author bartosz.walacik
*/
class WebsiteRepositoryTest extends IntegrationTest {
@Autowired
... | Add area code - error correction | Add area code - error correction
| Groovy | apache-2.0 | pwd-project/pwd,pwd-project/pwd,pwd-project/pwd | groovy | ## Code Before:
package org.pwd.domain.websites
import org.pwd.application.IntegrationTest
import org.pwd.domain.audit.AuditRepository
import org.springframework.beans.factory.annotation.Autowired
import spock.lang.Specification
/**
* @author bartosz.walacik
*/
class WebsiteRepositoryTest extends IntegrationTest {
... |
4aa444ca5671021bfaafcfeb8c3be1cb5d4ecd24 | BinaryGap.php | BinaryGap.php | <?php
class BinaryGap
{
private $number;
/**
* BinaryGap constructor.
* @param $number
*/
public function __construct($number)
{
$this->number = $number;
}
/**
* @return mixed
*/
public function getNumber() {
return $this->number;
}
private... | <?php
class BinaryGap
{
private $number;
/**
* BinaryGap constructor.
* @param $number
*/
public function __construct($number)
{
$this->number = $number;
}
/**
* @return mixed
*/
public function getNumber() {
return $this->number;
}
private... | Introduce additional empty array check. | Introduce additional empty array check.
| PHP | apache-2.0 | basit-saeed/Codility-Practice | php | ## Code Before:
<?php
class BinaryGap
{
private $number;
/**
* BinaryGap constructor.
* @param $number
*/
public function __construct($number)
{
$this->number = $number;
}
/**
* @return mixed
*/
public function getNumber() {
return $this->number;
... |
b1b30e84e419282b69c6d9fc7a33ea67f17a2cee | appveyor.yml | appveyor.yml | version: 1.0.0.{build}
os: Visual Studio 2015
shallow_clone: true
cache:
- packages -> **\packages.config
before_build: cd .. && git clone https://github.com/bowmark/allauth.lib.git Lib
build_script: .\build.bat clean release pkgWin
#test_script: .\build.bat releaseTest
artifacts:
- path: build\dist\**... | version: 1.0.0.{build}
os: Visual Studio 2015
shallow_clone: true
cache:
- packages -> **\packages.config
before_build: cd .. && git clone https://github.com/bowmark/allauth.lib.git Lib && cd %APPVEYOR_BUILD_FOLDER%
build_script: .\build.bat clean release pkgWin
#test_script: .\build.bat releaseTest
artif... | Move back into build dir after dep clone | Move back into build dir after dep clone
| YAML | apache-2.0 | bowmark/allauth.desktop,bowmark/allauth.desktop | yaml | ## Code Before:
version: 1.0.0.{build}
os: Visual Studio 2015
shallow_clone: true
cache:
- packages -> **\packages.config
before_build: cd .. && git clone https://github.com/bowmark/allauth.lib.git Lib
build_script: .\build.bat clean release pkgWin
#test_script: .\build.bat releaseTest
artifacts:
- path: build\di... |
e83b4c17b1689e531013a7177157a0e83713d832 | tools/driver/CMakeLists.txt | tools/driver/CMakeLists.txt | set(LLVM_NO_RTTI 1)
set( LLVM_USED_LIBS
clangDriver
clangFrontend
clangCodeGen
clangAnalysis
clangRewrite
clangSema
clangAST
clangParse
clangLex
clangBasic
)
set( LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
bitreader
bitwriter
codegen
ipo
selectiondag
)
add_clang_executable(clan... | set(LLVM_NO_RTTI 1)
set( LLVM_USED_LIBS
clangDriver
clangFrontend
clangCodeGen
clangAnalysis
clangRewrite
clangSema
clangAST
clangParse
clangLex
clangBasic
)
set( LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
bitreader
bitwriter
codegen
ipo
selectiondag
)
add_clang_executable(clan... | Make CMake's clang++ installation respect DESTDIR, based on a patch by Ingmar Vanhassel. Fixes PR6046. | Make CMake's clang++ installation respect DESTDIR, based on a patch by
Ingmar Vanhassel. Fixes PR6046.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@93741 91177308-0d34-0410-b5e6-96231b3b80d8
| Text | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... | text | ## Code Before:
set(LLVM_NO_RTTI 1)
set( LLVM_USED_LIBS
clangDriver
clangFrontend
clangCodeGen
clangAnalysis
clangRewrite
clangSema
clangAST
clangParse
clangLex
clangBasic
)
set( LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
bitreader
bitwriter
codegen
ipo
selectiondag
)
add_clang... |
ca0794d9fedb1803f609e6c06af24b480fe09818 | lib/server.js | lib/server.js | 'use strict';
import http from 'http';
import Promise from 'bluebird';
import * as dispatcher from './dispatcher';
import * as config from './config';
export default {
start(options, settings) {
const { appSettings, routes } = config.init(settings);
return startServer(options, appSettings, rou... | 'use strict';
import cluster from 'cluster';
import http from 'http';
import os from 'os';
import Promise from 'bluebird';
import * as dispatcher from './dispatcher';
import * as config from './config';
export default {
start(options, settings) {
const { appSettings, routes } = config.init(settings);
... | Use the node's cluster module | Use the node's cluster module
| JavaScript | agpl-3.0 | kikwit/kikwit,kikwit/kikwit | javascript | ## Code Before:
'use strict';
import http from 'http';
import Promise from 'bluebird';
import * as dispatcher from './dispatcher';
import * as config from './config';
export default {
start(options, settings) {
const { appSettings, routes } = config.init(settings);
return startServer(options, ... |
60b7a547a0ce59d2c3b7926122c0f73e11391dc2 | bin/add-modified-date-to-posts.rb | bin/add-modified-date-to-posts.rb | require 'yaml'
require 'fileutils'
# This matches the frotmatter block
YAML_FRONT_MATTER_REGEXP = /\A---(.|\n)*?---/m
def replacePostModifiedTime(filename)
file = File.open(filename, "a+")
content = file.read
# Stop when there's parsing errors
begin
yml = YAML.load(content)
rescue Psych:... | require 'yaml'
require 'fileutils'
# This matches the frotmatter block like:
# ---
# key: value
# ---
YAML_FRONT_MATTER_REGEXP = /\A---(.|\n)*?---/m
def replacePostModifiedTime(filename)
file = File.open(filename, "a+")
content = file.read
# Stop when there's parsing errors
begin
yml = YAML.... | Add better comments into git ruby hook | Add better comments into git ruby hook
| Ruby | mit | KeksiLabs/keksi.io,KeksiLabs/keksi.io,KeksiLabs/keksi.io,KeksiLabs/keksi.io | ruby | ## Code Before:
require 'yaml'
require 'fileutils'
# This matches the frotmatter block
YAML_FRONT_MATTER_REGEXP = /\A---(.|\n)*?---/m
def replacePostModifiedTime(filename)
file = File.open(filename, "a+")
content = file.read
# Stop when there's parsing errors
begin
yml = YAML.load(content)
... |
e379f2960a71067dd275b97196356841d74aa474 | index.jade | index.jade | extends _base
block content
h1 Matt McKellar-Spence
p I do the
a(href="https://github.com/MattMS") GitHub
| thing.
p On occassion, I indulge in some
a(href="https://twitter.com/MattMS") Twitter
| banter.
p I may have contributed to the
a(href="https://data.antarctica.gov.au/") Austral... | extends _base
block content
h1 Matt McKellar-Spence
p I do the
a(href="https://mattms.github.com/") GitHub
| thing.
p I enjoy some
a(href="https://twitter.com/MattMS") Twitter
| banter on occasion.
p Sometimes I happen across the
a(href="http://web.dev42.co/") Web Dev 42
| meet-... | Fix links and add spacing | Fix links and add spacing
| Jade | unlicense | MattMS/about.mattms.info | jade | ## Code Before:
extends _base
block content
h1 Matt McKellar-Spence
p I do the
a(href="https://github.com/MattMS") GitHub
| thing.
p On occassion, I indulge in some
a(href="https://twitter.com/MattMS") Twitter
| banter.
p I may have contributed to the
a(href="https://data.antarctica.g... |
3d5fa5ae896687d7cda9acc92a5e33bfb0a72192 | mq/fuse-mq/src/main/resources/etc/org.apache.karaf.features.cfg | mq/fuse-mq/src/main/resources/etc/org.apache.karaf.features.cfg | featuresRepositories=\
mvn:org.apache.karaf.assemblies.features/standard/${karaf-version}/xml/features,\
mvn:org.apache.karaf.assemblies.features/enterprise/${karaf-version}/xml/features,\
mvn:org.apache.camel.karaf/apache-camel/${camel-version}/xml/features,\
mvn:org.apache.activemq/act... | featuresRepositories=\
mvn:org.apache.karaf.assemblies.features/standard/${karaf-version}/xml/features,\
mvn:org.apache.karaf.assemblies.features/enterprise/${karaf-version}/xml/features,\
mvn:org.apache.camel.karaf/apache-camel/${camel-version}/xml/features,\
mvn:org.apache.activemq/act... | Add fabric commands to MQ distro | Add fabric commands to MQ distro
| INI | apache-2.0 | janstey/fuse,rajdavies/fabric8,rnc/fabric8,sobkowiak/fuse,opensourceconsultant/fuse,jludvice/fabric8,janstey/fuse,jboss-fuse/fuse,zmhassan/fabric8,jonathanchristison/fabric8,punkhorn/fuse,dejanb/fuse,hekonsek/fabric8,cunningt/fuse,punkhorn/fabric8,rajdavies/fabric8,jludvice/fabric8,mwringe/fabric8,sobkowiak/fuse,openso... | ini | ## Code Before:
featuresRepositories=\
mvn:org.apache.karaf.assemblies.features/standard/${karaf-version}/xml/features,\
mvn:org.apache.karaf.assemblies.features/enterprise/${karaf-version}/xml/features,\
mvn:org.apache.camel.karaf/apache-camel/${camel-version}/xml/features,\
mvn:org.apa... |
5ae3585eea773b4b3e64ff30ecc97ca156b1fa7c | assets/js/footer/footer.js | assets/js/footer/footer.js | import React, { PropTypes, Component } from "react";
import { LOGO_BACKGROUND_PATH } from "../constants/image_paths";
const BetterSelfAddress = () => (
<p className="address small">
BetterHealth, Inc.<br />99 St Marks, 3D<br />New York, NY, 10009
</p>
);
export default class Footer extends Component {
rende... | import React, { PropTypes, Component } from "react";
import { LOGO_BACKGROUND_PATH } from "../constants/image_paths";
const BetterSelfAddress = () => (
<p className="address small">
BetterHealth, Inc.
<br />
99 St Marks, 3D
<br />
New York, NY, 10009
<br />
jeffshek@gmail.com
</p>
);
... | Add Email Address for Contact | Add Email Address for Contact
| JavaScript | mit | jeffshek/betterself,jeffshek/betterself,jeffshek/betterself,jeffshek/betterself | javascript | ## Code Before:
import React, { PropTypes, Component } from "react";
import { LOGO_BACKGROUND_PATH } from "../constants/image_paths";
const BetterSelfAddress = () => (
<p className="address small">
BetterHealth, Inc.<br />99 St Marks, 3D<br />New York, NY, 10009
</p>
);
export default class Footer extends Com... |
a462c5ef0c9ec453570bb5e6a7b96c4058cf3a68 | .travis.yml | .travis.yml | language: php
php:
- 7.3
- 7.2
- 7.1
- hhvm
matrix:
fast_finish: true
allow_failures:
- php: hhvm
before_script:
- composer update --prefer-dist
script:
- ./vendor/bin/phpcs .
- ./vendor/bin/phpunit
after_script:
- php vendor/bin/php-coveralls -v
| language: php
php:
- 7.4
- 7.3
- 7.2
- 7.1
- hhvm
- nightly
matrix:
fast_finish: true
allow_failures:
- php: hhvm
- php: nightly
before_script:
- composer update --prefer-dist
script:
- ./vendor/bin/phpcs .
- ./vendor/bin/phpunit
after_script:
- php vendor/bin/php-coveralls -v
| Add php-7.4 and nightly version tests | Add php-7.4 and nightly version tests
| YAML | mit | bjeavons/zxcvbn-php,bjeavons/zxcvbn-php | yaml | ## Code Before:
language: php
php:
- 7.3
- 7.2
- 7.1
- hhvm
matrix:
fast_finish: true
allow_failures:
- php: hhvm
before_script:
- composer update --prefer-dist
script:
- ./vendor/bin/phpcs .
- ./vendor/bin/phpunit
after_script:
- php vendor/bin/php-coveralls -v
## Instruction:
Add php-7.4... |
f269b7b5c7b0bb0973f504db1c3605c9ff3ac6da | tutorials/2017/thursday/graphColouring.py | tutorials/2017/thursday/graphColouring.py | from boolean import *
def graphColouring2SAT(G, k):
conj = []
for i in range(len(G)):
conj.append(Or(*((i, j) for j in range(k))))
for j in range(k):
for jj in range(j+1, k):
conj.append(Or(Not((i, j)), Not((i, jj))))
for ii in G[i]:
for j in rang... | from boolean import *
def graphColouring2SAT(G, k):
conj = []
for i in range(len(G)):
conj.append(Or(*((i, j) for j in range(k))))
for j in range(k):
for jj in range(j+1, k):
conj.append(Or(Not((i, j)), Not((i, jj))))
for ii in G[i]:
for j in rang... | Add function to extract solution from valuation | Add function to extract solution from valuation
| Python | mit | jaanos/LVR-2016,jaanos/LVR-2016 | python | ## Code Before:
from boolean import *
def graphColouring2SAT(G, k):
conj = []
for i in range(len(G)):
conj.append(Or(*((i, j) for j in range(k))))
for j in range(k):
for jj in range(j+1, k):
conj.append(Or(Not((i, j)), Not((i, jj))))
for ii in G[i]:
... |
03885de12816099845d3ae95af1207dadb9b29bc | common/filesystem_dokan.cpp | common/filesystem_dokan.cpp |
struct FileSystemPrivate
{
FileSystemPrivate(FileOps* ops)
{
m_fileOps = ops;
}
FileOps* m_fileOps;
};
FileSystem::FileSystem(FileOps* ops)
: QThread(0)
, d(new FileSystemPrivate(ops))
{
}
FileSystem::~FileSystem()
{
delete d;
}
void FileSystem::stop()
{
QThread::exit(0);
}
... |
struct FileSystemPrivate
{
FileSystemPrivate(FileOps* ops)
{
m_fileOps = ops;
}
FileOps* m_fileOps;
};
FileSystem::FileSystem(FileOps* ops)
: QThread(0)
, d(new FileSystemPrivate(ops))
{
}
FileSystem::~FileSystem()
{
stop();
delete d;
}
void FileSystem::stop()
{
exit(0);... | Exit properly from the dokan filesystem thread. | Exit properly from the dokan filesystem thread.
| C++ | bsd-3-clause | manyoso/mob,manyoso/mob | c++ | ## Code Before:
struct FileSystemPrivate
{
FileSystemPrivate(FileOps* ops)
{
m_fileOps = ops;
}
FileOps* m_fileOps;
};
FileSystem::FileSystem(FileOps* ops)
: QThread(0)
, d(new FileSystemPrivate(ops))
{
}
FileSystem::~FileSystem()
{
delete d;
}
void FileSystem::stop()
{
QThr... |
3de0e6c97316eceb6f1a66188bbf52cfa489123f | test/test_helper.rb | test/test_helper.rb | ENV['RAILS_ENV'] ||= 'test'
require File.expand_path(File.dirname(__FILE__) + "/application/config/environment")
require 'test_help'
# From this point forward, we can assume that we have booted a generic Rails environment plus
# our (booted) plugin.
load(File.dirname(__FILE__) + "/schema.rb")
# Run the migrations (op... | RAILS_GEM_VERSION="2.2.2"
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path(File.dirname(__FILE__) + "/application/config/environment")
require 'test_help'
# From this point forward, we can assume that we have booted a generic Rails environment plus
# our (booted) plugin.
load(File.dirname(__FILE__) + "/schema.rb")... | Use Rails 2.2.2 gems by default for testing | Use Rails 2.2.2 gems by default for testing
| Ruby | mit | cch1/authorize,cch1/authorize | ruby | ## Code Before:
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path(File.dirname(__FILE__) + "/application/config/environment")
require 'test_help'
# From this point forward, we can assume that we have booted a generic Rails environment plus
# our (booted) plugin.
load(File.dirname(__FILE__) + "/schema.rb")
# Run th... |
c7f3b53fd8f61aa02aafb47f7cf799da9ed604b8 | .travis.yml | .travis.yml | sudo: false
language: python
python:
- 3.5
- 3.6
- 3.7
- 3.8-dev
# tmp fix until travis gets python3.7
dist: xenial
sudo: true
install:
- pip install -r requirements.txt
- pip install -e .
script:
- pytest
- pytest --cov=pythonanywhere --cov=scripts --cov-fail-under=65
| sudo: false
language: python
python:
- 3.5
- 3.6
- 3.7
# tmp fix until travis gets python3.7
dist: xenial
sudo: true
install:
- pip install -r requirements.txt
- pip install -e .
script:
- pytest
- pytest --cov=pythonanywhere --cov=scripts --cov-fail-under=65
| Revert "tests against python 3.8" | Revert "tests against python 3.8"
This reverts commit 860343d6c027254f3a86f6e25dc0618a37c1e1e7.
| YAML | mit | pythonanywhere/helper_scripts | yaml | ## Code Before:
sudo: false
language: python
python:
- 3.5
- 3.6
- 3.7
- 3.8-dev
# tmp fix until travis gets python3.7
dist: xenial
sudo: true
install:
- pip install -r requirements.txt
- pip install -e .
script:
- pytest
- pytest --cov=pythonanywhere --cov=scripts --cov-fail-under=65
## Instruct... |
fda022550dc1980ce2d8e255c8699b95432543ed | packages/matchbox-keyboard/mboxkbd-layouts-gui_git.bb | packages/matchbox-keyboard/mboxkbd-layouts-gui_git.bb | DESCRIPTION = "matchbox-keyboard layouts control application"
AUTHOR = "Sergey Lapin"
SECTION = "x11"
LICENSE = "GPL"
DEPENDS = "gtk+"
PR = "r4"
PV = "0.0+git5b42aeff36d930dc3a9b75eedc74dacfec45f43f"
SRC_URI = "git://ossfans.org/home/slapin/git/mk-layouts-gui.git;protocol=git;tag=5b42aeff36d930dc3a9b75eedc74dacfec45f... | DESCRIPTION = "matchbox-keyboard layouts control application"
AUTHOR = "Sergey Lapin"
SECTION = "x11"
LICENSE = "GPL"
DEPENDS = "gtk+"
PR = "r5"
PV = "0.0+git5b42aeff36d930dc3a9b75eedc74dacfec45f43f"
SRC_URI = "http://linux-h4000.sourceforge.net/mirror/mk-layouts-gui.git_5b42aeff36d930dc3a9b75eedc74dacfec45f43f.tar.g... | Use git snaphot tarball as repo is offline currently. | mboxkbd-layouts-gui: Use git snaphot tarball as repo is offline currently.
| BitBake | mit | demsey/openenigma2,JrCs/opendreambox,dellysunnymtech/sakoman-oe,nvl1109/openembeded,rascalmicro/openembedded-rascal,JrCs/opendreambox,dellysunnymtech/sakoman-oe,nx111/openembeded_openpli2.1_nx111,sampov2/audio-openembedded,sentient-energy/emsw-oe-mirror,thebohemian/openembedded,dave-billin/overo-ui-moos-auv,trini/opene... | bitbake | ## Code Before:
DESCRIPTION = "matchbox-keyboard layouts control application"
AUTHOR = "Sergey Lapin"
SECTION = "x11"
LICENSE = "GPL"
DEPENDS = "gtk+"
PR = "r4"
PV = "0.0+git5b42aeff36d930dc3a9b75eedc74dacfec45f43f"
SRC_URI = "git://ossfans.org/home/slapin/git/mk-layouts-gui.git;protocol=git;tag=5b42aeff36d930dc3a9b7... |
65786d7f325896d8723d882b05eeeb2aee5774ab | README.md | README.md | dotfiles I use on OS X and Ubuntu.
Running ```sh ./sync.sh``` will write dotfiles to ~/
Don't forget to back up existing files.
Feel free to fork, copy, share, etc. | [](https://github.com/rognan/dotfiles)
dotfiles I use on OS X and Ubuntu.
Running ```sh ./sync.sh``` will write dotfiles to ~/
Don't forget to back up existing files.
Feel free to fork, copy, share, etc.
| Add google analytics beacon for readme | Add google analytics beacon for readme
| Markdown | mit | rognan/dotfiles | markdown | ## Code Before:
dotfiles I use on OS X and Ubuntu.
Running ```sh ./sync.sh``` will write dotfiles to ~/
Don't forget to back up existing files.
Feel free to fork, copy, share, etc.
## Instruction:
Add google analytics beacon for readme
## Code After:
[" >/dev/null && pwd )"
main() {
S3_BASE="projects/rundeck/branch/${RUNDECK_BRANCH}/build/${RUNDECK_BUILD_NUMBER}/selenium-images/"
echo -e "Image output available at:\n"
echo -e "http://test.rundeck.org/$S3_BASE\n"
RET=0
docker-compos... | set -eou pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
main() {
S3_BASE="projects/rundeck/branch/${RUNDECK_BRANCH}/build/${RUNDECK_BUILD_NUMBER}/selenium-images/"
echo -e "Image output available at:\n"
echo -e "http://test.rundeck.org/$S3_BASE\n"
RET=0
docker-compos... | Add the missing public key into apt trusted list | RUN-1058: Add the missing public key into apt trusted list
| Shell | apache-2.0 | rundeck/rundeck,rundeck/rundeck,rundeck/rundeck,rundeck/rundeck,rundeck/rundeck | shell | ## Code Before:
set -eou pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
main() {
S3_BASE="projects/rundeck/branch/${RUNDECK_BRANCH}/build/${RUNDECK_BUILD_NUMBER}/selenium-images/"
echo -e "Image output available at:\n"
echo -e "http://test.rundeck.org/$S3_BASE\n"
RET=0
... |
27919e31e2dd2c605ec97ed1fc73e264524eb1a3 | lib/kafka.rb | lib/kafka.rb | require "kafka/version"
module Kafka
Error = Class.new(StandardError)
ConnectionError = Class.new(Error)
CorruptMessage = Class.new(Error)
UnknownError = Class.new(Error)
OffsetOutOfRange = Class.new(Error)
UnknownTopicOrPartition = Class.new(Error)
InvalidMessageSize = Class.new(Error)
LeaderNotAvaila... | require "kafka/version"
module Kafka
Error = Class.new(StandardError)
ProtocolError = Class.new(StandardError)
CorruptMessage = Class.new(ProtocolError)
UnknownError = Class.new(ProtocolError)
OffsetOutOfRange = Class.new(ProtocolError)
UnknownTopicOrPartition = Class.new(ProtocolError)
InvalidMessageSi... | Make protocol exceptions a subclass of ProtocolError | Make protocol exceptions a subclass of ProtocolError
| Ruby | apache-2.0 | crashlytics/ruby-kafka,zendesk/ruby-kafka,crashlytics/ruby-kafka,zendesk/ruby-kafka | ruby | ## Code Before:
require "kafka/version"
module Kafka
Error = Class.new(StandardError)
ConnectionError = Class.new(Error)
CorruptMessage = Class.new(Error)
UnknownError = Class.new(Error)
OffsetOutOfRange = Class.new(Error)
UnknownTopicOrPartition = Class.new(Error)
InvalidMessageSize = Class.new(Error)
... |
475333d56857ad7e3c9ee6eb9c831f676921d846 | phantom-js-loader.js | phantom-js-loader.js | // borrowed from https://github.com/keithamus/travis-ci-node-and-browser-qunit
var fs = require('fs'),
page = new WebPage(),
file = fs.absolute('test/test.html');
testResults = {};
page.onConsoleMessage = function(msg) {
console.log(page.lib + ': ' + msg);
if (/^Tests completed in/.test(ms... | // borrowed from https://github.com/keithamus/travis-ci-node-and-browser-qunit
var fs = require('fs'),
page = new WebPage(),
file = fs.absolute('test/test.html');
page.onConsoleMessage = function(msg) {
console.log(msg);
if (/^Tests completed in/.test(msg)) {
phantom.exit(page.evaluate(function... | Revert "Run both zepto and jQuery tests" | Revert "Run both zepto and jQuery tests"
This reverts commit e792e0e27236f601aa88c7c6cb78e3a383e99b44.
| JavaScript | bsd-2-clause | eaglesjava/raven-js,Mappy/raven-js,benoitg/raven-js,danse/raven-js,malandrew/raven-js,getsentry/raven-js,vladikoff/raven-js,vladikoff/raven-js,iodine/raven-js,malandrew/raven-js,grelas/raven-js,getsentry/raven-js,samgiles/raven-js,housinghq/main-raven-js,housinghq/main-raven-js,PureBilling/raven-js,Mappy/raven-js,PureB... | javascript | ## Code Before:
// borrowed from https://github.com/keithamus/travis-ci-node-and-browser-qunit
var fs = require('fs'),
page = new WebPage(),
file = fs.absolute('test/test.html');
testResults = {};
page.onConsoleMessage = function(msg) {
console.log(page.lib + ': ' + msg);
if (/^Tests compl... |
164444c7300190df1a61ca06afde06a61b2122b9 | tensorflow/tools/ci_build/nightly_release/windows/upload_nightly_pip.sh | tensorflow/tools/ci_build/nightly_release/windows/upload_nightly_pip.sh | set -e
set -x
source tensorflow/tools/ci_build/release/common.sh
# TODO(mihaimaruseac): Convert all builds to start from a virtualenv to isolate
# from Kokoro setup
python3 -m pip install --upgrade --user twine
# Copy and rename to tf_nightly
for f in $(ls "${KOKORO_GFILE_DIR}"/tf_nightly_gpu*dev*cp3*-cp3*-win_amd64... | set -e
set -x
source tensorflow/tools/ci_build/release/common.sh
# Use a virtual environment to get access to the latest pips
python3 -m venv venv && source venv/bin/activate
# Install a more recent version of twine
python -m pip install --upgrade 'twine >= 3.2.0'
# Copy and rename to tf_nightly
for f in $(ls "${KO... | Use a virtualenv in uploading windows pips | Use a virtualenv in uploading windows pips
Seems that by default the version of `twine` that gets installed is too old
PiperOrigin-RevId: 342733915
Change-Id: I2d644b9df02592adb764b1b7a240e4a5a3c17aa7
| Shell | apache-2.0 | yongtang/tensorflow,paolodedios/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,cxxgtxy/tensorflow,annarev/tensorflow,frreiss/tensorflow-fred,ten... | shell | ## Code Before:
set -e
set -x
source tensorflow/tools/ci_build/release/common.sh
# TODO(mihaimaruseac): Convert all builds to start from a virtualenv to isolate
# from Kokoro setup
python3 -m pip install --upgrade --user twine
# Copy and rename to tf_nightly
for f in $(ls "${KOKORO_GFILE_DIR}"/tf_nightly_gpu*dev*cp3... |
611817fedf300755a8253776cbe88a008295aedf | tests/PhpmndXmlDiffFilterTest.php | tests/PhpmndXmlDiffFilterTest.php | <?php
namespace exussum12\CoverageChecker\tests;
use PHPUnit\Framework\TestCase;
use exussum12\CoverageChecker\PhpMndXmlLoader;
class PhpmndXmlDiffFilterTest extends TestCase
{
public function testValidFiles()
{
$file = __DIR__ . "/fixtures/phpmnd.xml";
$mnd = new PhpMndXmlLoader($file);
... | <?php
namespace exussum12\CoverageChecker\tests;
use PHPUnit\Framework\TestCase;
use exussum12\CoverageChecker\PhpMndXmlLoader;
class PhpmndXmlDiffFilterTest extends TestCase
{
/** @var PhpMndXmlLoader */
private $mnd;
public function setUp()
{
parent::setUp();
$file = __DIR__ . "/fix... | Add missing line and refactor | Add missing line and refactor
| PHP | mit | exussum12/coverageChecker,exussum12/coverageChecker | php | ## Code Before:
<?php
namespace exussum12\CoverageChecker\tests;
use PHPUnit\Framework\TestCase;
use exussum12\CoverageChecker\PhpMndXmlLoader;
class PhpmndXmlDiffFilterTest extends TestCase
{
public function testValidFiles()
{
$file = __DIR__ . "/fixtures/phpmnd.xml";
$mnd = new PhpMndXmlLoa... |
7e18770a3185ab70a554012f65bb21558e26780d | samples/fishalive/README.md | samples/fishalive/README.md |
This project contains Python samples demonstrating how to use MQ Light
to write apps with can perform worker offload.
Check out the blog posts at [IBM Messaging](https://developer.ibm.com/messaging/blogs/)
for more info on these samples.
#Deployment
Run the backend app
```
python backend/python-backend.py
```
Run ... |
This project contains Python samples demonstrating how to use MQ Light
to write apps with can perform worker offload.
This sample is based on the original sample for Bluemix from https://github.com/ibm-messaging/mqlight-python-bluemix
Check out the blog posts at [IBM Messaging](https://developer.ibm.com/messaging/bl... | Add link to original sample | Add link to original sample
| Markdown | epl-1.0 | ibm-messaging/macaque | markdown | ## Code Before:
This project contains Python samples demonstrating how to use MQ Light
to write apps with can perform worker offload.
Check out the blog posts at [IBM Messaging](https://developer.ibm.com/messaging/blogs/)
for more info on these samples.
#Deployment
Run the backend app
```
python backend/python-back... |
32c1c9f55c7a5575aa462bcec9e00cd11273841a | src/test/run-pass/chan-poweroftwo.rs | src/test/run-pass/chan-poweroftwo.rs | // -*- rust -*-
// Regression test for circular_buffer initialization
use std;
import std.option;
import std._uint;
import std._vec;
// 12-byte unit for the channel buffer. Assuming that the default
// buffer size needs to hold 8 units, then the minimum buffer size
// needs to be 96. That's not a power of two so ne... | // -*- rust -*-
// Regression tests for circular_buffer when using a unit
// that has a size that is not a power of two
use std;
import std.option;
import std._uint;
import std._vec;
// A 12-byte unit to send over the channel
type record = rec(i32 val1, i32 val2, i32 val3);
// Assuming that the default buffer size... | Simplify the test for circular_buffer initialization | Simplify the test for circular_buffer initialization
| Rust | apache-2.0 | omasanori/rust,vhbit/rust,michaelballantyne/rust-gpu,KokaKiwi/rust,huonw/rand,mitsuhiko/rust,mahkoh/rust,reem/rust,l0kod/rust,ebfull/rust,XMPPwocky/rust,jbclements/rust,pczarn/rust,cllns/rust,aneeshusa/rust,quornian/rust,jashank/rust,ktossell/rust,rprichard/rust,richo/rust,nwin/rust,robertg/rust,kimroen/rust,dwillmer/r... | rust | ## Code Before:
// -*- rust -*-
// Regression test for circular_buffer initialization
use std;
import std.option;
import std._uint;
import std._vec;
// 12-byte unit for the channel buffer. Assuming that the default
// buffer size needs to hold 8 units, then the minimum buffer size
// needs to be 96. That's not a po... |
2ad21d67ccde2e25ea5c6d64cdee36dbc6425cbc | construct/tests/test_mapping.py | construct/tests/test_mapping.py | import unittest
from construct import Flag
class TestFlag(unittest.TestCase):
def test_parse(self):
flag = Flag("flag")
self.assertTrue(flag.parse("\x01"))
def test_parse_flipped(self):
flag = Flag("flag", truth=0, falsehood=1)
self.assertFalse(flag.parse("\x01"))
def te... | import unittest
from construct import Flag
class TestFlag(unittest.TestCase):
def test_parse(self):
flag = Flag("flag")
self.assertTrue(flag.parse("\x01"))
def test_parse_flipped(self):
flag = Flag("flag", truth=0, falsehood=1)
self.assertFalse(flag.parse("\x01"))
def te... | Add a couple more Flag tests. | tests: Add a couple more Flag tests.
| Python | mit | riggs/construct,mosquito/construct,gkonstantyno/construct,MostAwesomeDude/construct,0000-bigtree/construct,riggs/construct,mosquito/construct,0000-bigtree/construct,gkonstantyno/construct,MostAwesomeDude/construct | python | ## Code Before:
import unittest
from construct import Flag
class TestFlag(unittest.TestCase):
def test_parse(self):
flag = Flag("flag")
self.assertTrue(flag.parse("\x01"))
def test_parse_flipped(self):
flag = Flag("flag", truth=0, falsehood=1)
self.assertFalse(flag.parse("\x0... |
3451db885f685f8e3a43c822f965bfb0bbc5909b | user_acknowledge_aws_schedule_action.php | user_acknowledge_aws_schedule_action.php | <?php
include_once( "header.php" );
include_once( "methods.php" );
include_once( 'tohtml.php' );
include_once( "check_access_permissions.php" );
mustHaveAnyOfTheseRoles( Array( 'USER' ) );
echo userHTML( );
$user = $_SESSION[ 'user' ];
if( $_POST )
{
$data = array( 'speaker' => $user );
$data = array_merge( ... | <?php
include_once( "header.php" );
include_once( "methods.php" );
include_once( 'tohtml.php' );
include_once( "check_access_permissions.php" );
mustHaveAnyOfTheseRoles( Array( 'USER' ) );
echo userHTML( );
$user = $_SESSION[ 'user' ];
if( $_POST )
{
$data = array( 'speaker' => $user );
$data = array_merge( ... | Send email to acadoffice when user acknowledge his AWS. | Send email to acadoffice when user acknowledge his AWS.
Former-commit-id: 3285ac8554522192665d8a9d65ffd3d25240fd35
Former-commit-id: c262a061a641e53d217875a578a08ca0584cfc74 | PHP | mit | dilawar/ncbs-hippo,dilawar/ncbs-hippo,dilawar/ncbs-minion,dilawar/ncbs-hippo,dilawar/ncbs-minion,dilawar/ncbs-minion,dilawar/ncbs-minion,dilawar/ncbs-hippo,dilawar/ncbs-hippo,dilawar/ncbs-minion | php | ## Code Before:
<?php
include_once( "header.php" );
include_once( "methods.php" );
include_once( 'tohtml.php' );
include_once( "check_access_permissions.php" );
mustHaveAnyOfTheseRoles( Array( 'USER' ) );
echo userHTML( );
$user = $_SESSION[ 'user' ];
if( $_POST )
{
$data = array( 'speaker' => $user );
$data... |
38252980d2f4e12c403122bfd9d5b0d032f84482 | lib/instana/frameworks/rails.rb | lib/instana/frameworks/rails.rb | require "instana/rack"
if defined?(::Rails)
# In Rails, let's use the Rails logger
::Instana.logger = ::Rails.logger if ::Rails.logger
if ::Rails::VERSION::MAJOR < 3
::Rails.configuration.after_initialization do
::Instana.logger.warn "Instrumenting Rack"
::Rails.configuration.middleware.insert 0... | require "instana/rack"
if defined?(::Rails)
# In Rails, let's use the Rails logger
::Instana.logger = ::Rails.logger if ::Rails.logger
if ::Rails::VERSION::MAJOR < 3
::Rails.configuration.after_initialization do
::Instana.logger.warn "Instrumenting Rack"
::Rails.configuration.middleware.insert 0... | Load ActiveRecord instrumentation _after_ Rails initializes | Load ActiveRecord instrumentation _after_ Rails initializes
| Ruby | mit | nguyenquangminh0711/ruby-sensor,nguyenquangminh0711/ruby-sensor,nguyenquangminh0711/ruby-sensor | ruby | ## Code Before:
require "instana/rack"
if defined?(::Rails)
# In Rails, let's use the Rails logger
::Instana.logger = ::Rails.logger if ::Rails.logger
if ::Rails::VERSION::MAJOR < 3
::Rails.configuration.after_initialization do
::Instana.logger.warn "Instrumenting Rack"
::Rails.configuration.mid... |
3dcdbf1cee6ddc49948605363ec27185fe8b2543 | app/controllers/about_page.coffee | app/controllers/about_page.coffee | {Controller} = require 'spine'
template = require 'views/about_page'
$ = require 'jqueryify'
class AboutPage extends Controller
className: 'about-page content-page'
events:
'click nav button[name="turn-page"]': 'onClickNavButton'
elements:
'nav button[name="turn-page"]': 'navButtons'
constructor: ->... | {Controller} = require 'spine'
template = require 'views/about_page'
$ = require 'jqueryify'
class AboutPage extends Controller
className: 'about-page content-page'
events:
'click nav button[name="turn-page"]': 'onClickNavButton'
elements:
'nav button[name="turn-page"]': 'navButtons'
constructor: ->... | Clean up about page image loader | Clean up about page image loader
| CoffeeScript | apache-2.0 | alexbfree/Serengeti,zooniverse/Serengeti,zooniverse/Snapshot-Chicago,zooniverse/Wisconsin-Zoo,zooniverse/gorongosa,zooniverse/Serengeti,zooniverse/Wisconsin-Zoo,zooniverse/gorongosa,zooniverse/Snapshot-Chicago,alexbfree/Serengeti,zooniverse/Serengeti,alexbfree/Serengeti | coffeescript | ## Code Before:
{Controller} = require 'spine'
template = require 'views/about_page'
$ = require 'jqueryify'
class AboutPage extends Controller
className: 'about-page content-page'
events:
'click nav button[name="turn-page"]': 'onClickNavButton'
elements:
'nav button[name="turn-page"]': 'navButtons'
... |
454329c3cb6434dcdd2b4d89f127a87da8ee23ef | example/example_spin.py | example/example_spin.py |
from __future__ import absolute_import, print_function
import sys
import time
from pyspin import spin
def show(name, frames):
s = spin.Spinner(frames)
print(name)
for i in range(50):
time.sleep(0.1)
print("\r{0}".format(s.next()), end="")
sys.stdout.flush()
print('\n')
def... |
from __future__ import absolute_import, print_function
import sys
import time
from pyspin import spin
def show(name, frames):
s = spin.Spinner(frames)
print(name)
for i in range(50):
print(u"\r{0}".format(s.next()), end="")
sys.stdout.flush()
time.sleep(0.1)
print('\n')
de... | Fix unicode issue in example code for python2.x | Fix unicode issue in example code for python2.x
| Python | mit | lord63/py-spin | python | ## Code Before:
from __future__ import absolute_import, print_function
import sys
import time
from pyspin import spin
def show(name, frames):
s = spin.Spinner(frames)
print(name)
for i in range(50):
time.sleep(0.1)
print("\r{0}".format(s.next()), end="")
sys.stdout.flush()
p... |
938c9e965d14e6867f165b3be3391b0c15484bf5 | src/util/string.h | src/util/string.h |
char* strndup(const char* start, size_t len);
char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len);
#endif
| // This is sometimes a macro
char* strndup(const char* start, size_t len);
#endif
char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len);
#endif
| Fix build with strndup on some platforms | Util: Fix build with strndup on some platforms
| C | mpl-2.0 | mgba-emu/mgba,mgba-emu/mgba,libretro/mgba,nattthebear/mgba,MerryMage/mgba,AdmiralCurtiss/mgba,Iniquitatis/mgba,fr500/mgba,libretro/mgba,Anty-Lemon/mgba,matthewbauer/mgba,iracigt/mgba,cassos/mgba,askotx/mgba,nattthebear/mgba,fr500/mgba,sergiobenrocha2/mgba,sergiobenrocha2/mgba,Anty-Lemon/mgba,jeremyherbert/mgba,MerryMag... | c | ## Code Before:
char* strndup(const char* start, size_t len);
char* strnrstr(const char* restrict s1, const char* restrict s2, size_t len);
#endif
## Instruction:
Util: Fix build with strndup on some platforms
## Code After:
// This is sometimes a macro
char* strndup(const char* start, size_t len);
#endif
char* st... |
01e79f1297b94ddce9e9f31f16f8d05db6989d0d | lib/awspec/type/route53_hosted_zone.rb | lib/awspec/type/route53_hosted_zone.rb | module Awspec::Type
class Route53HostedZone < ResourceBase
def resource_via_client
@resource_via_client ||= find_hosted_zone(@display_name)
end
def id
@id ||= resource_via_client.id if resource_via_client
end
def resource_via_client_record_sets
@resource_via_client_record_sets ... | module Awspec::Type
class Route53HostedZone < ResourceBase
def resource_via_client
@resource_via_client ||= find_hosted_zone(@display_name)
end
def id
@id ||= resource_via_client.id if resource_via_client
end
def resource_via_client_record_sets
@resource_via_client_record_sets ... | Support "no order guarantee Route53 record value" | Support "no order guarantee Route53 record value"
| Ruby | mit | k1LoW/awspec,k1LoW/awspec | ruby | ## Code Before:
module Awspec::Type
class Route53HostedZone < ResourceBase
def resource_via_client
@resource_via_client ||= find_hosted_zone(@display_name)
end
def id
@id ||= resource_via_client.id if resource_via_client
end
def resource_via_client_record_sets
@resource_via_cli... |
41a52417feb4353cafcc79626ae6e18a403517f5 | pkgs/tools/graphics/jbig2enc/default.nix | pkgs/tools/graphics/jbig2enc/default.nix | {stdenv, fetchurl, leptonica, zlib, libwebp, giflib, libjpeg, libpng, libtiff }: stdenv.mkDerivation {
name = "jbig2enc-0.28";
src = fetchurl {
url = http://github.com/agl/jbig2enc/archive/0.28-dist.tar.gz;
sha256 = "1wc0lmqz4jag3rhhk1xczlqpfv2qqp3fz7wzic2lba3vsbi1rrw3";
};
propagatedBuildInputs = [ l... | {stdenv, fetchurl, leptonica, zlib, libwebp, giflib, libjpeg, libpng, libtiff }: stdenv.mkDerivation {
name = "jbig2enc-0.28";
src = fetchurl {
url = http://github.com/agl/jbig2enc/archive/0.28-dist.tar.gz;
sha256 = "1wc0lmqz4jag3rhhk1xczlqpfv2qqp3fz7wzic2lba3vsbi1rrw3";
};
propagatedBuildInputs = [ l... | Add meta attributes for jbig2enc | Add meta attributes for jbig2enc
| Nix | mit | NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,triton/triton,SymbiFlow/nixpkgs,triton/triton,triton/t... | nix | ## Code Before:
{stdenv, fetchurl, leptonica, zlib, libwebp, giflib, libjpeg, libpng, libtiff }: stdenv.mkDerivation {
name = "jbig2enc-0.28";
src = fetchurl {
url = http://github.com/agl/jbig2enc/archive/0.28-dist.tar.gz;
sha256 = "1wc0lmqz4jag3rhhk1xczlqpfv2qqp3fz7wzic2lba3vsbi1rrw3";
};
propagatedB... |
5fdb5000b059ad8abb2e5addf2dda20c332509ec | lib/component.coffee | lib/component.coffee | React = require 'react'
assign = require 'object-assign'
excludeMethods =
componentDidMount: true,
componentWillUnmount: true,
componentDidUpdate: true,
included: true
class Component extends React.Component
@include = (mixin, config = {}) ->
if typeof mixin == 'function'
mixin = mixin config
... | React = require 'react'
excludeMethods =
componentDidMount: true,
componentWillUnmount: true,
componentDidUpdate: true,
included: true
class Component extends React.Component
@include = (mixin, config = {}) ->
if typeof mixin == 'function'
mixin = mixin config
for name, _ of mixin when not ex... | Remove useless (and missing) require | Remove useless (and missing) require
| CoffeeScript | mit | jgraichen/molecule,jgraichen/molecule | coffeescript | ## Code Before:
React = require 'react'
assign = require 'object-assign'
excludeMethods =
componentDidMount: true,
componentWillUnmount: true,
componentDidUpdate: true,
included: true
class Component extends React.Component
@include = (mixin, config = {}) ->
if typeof mixin == 'function'
mixin = m... |
6c86fb419236551c28a2f32f27034aca21401c5b | features/renalware/pd/treating_a_peritonitis_episode.feature | features/renalware/pd/treating_a_peritonitis_episode.feature | @wip
Feature: Treating a peritonitis episode
Background:
Given Clyde is a clinician
And Patty is a patient
@web @javascript
Scenario: A clinician treated a peritonitis episode
When Clyde records a peritonitis episode for Patty
And records the organism for the episode
And records the medicati... | @wip
Feature: Treating a peritonitis episode
Background:
Given Clyde is a clinician
And Patty is a patient
@web @javascript
Scenario: A clinician treated a peritonitis episode
When Clyde records a peritonitis episode for Patty
And records the organism for the episode
And records the medicati... | Add scenario for terminating an organism related to an episode | Add scenario for terminating an organism related to an episode | Cucumber | mit | airslie/renalware-core,airslie/renalware-core,airslie/renalware-core,airslie/renalware-core | cucumber | ## Code Before:
@wip
Feature: Treating a peritonitis episode
Background:
Given Clyde is a clinician
And Patty is a patient
@web @javascript
Scenario: A clinician treated a peritonitis episode
When Clyde records a peritonitis episode for Patty
And records the organism for the episode
And reco... |
9cdd8aa05bb1ef565531dbc916ca6cff9dc3f204 | spec/spec_helper.rb | spec/spec_helper.rb |
require 'rom'
include ROM
if defined? JRUBY_VERSION
USING_JRUBY = true
else
USING_JRUBY = false
end
if USING_JRUBY
SEQUEL_TEST_DB_URI = "jdbc:sqlite::memory"
else
SEQUEL_TEST_DB_URI = "sqlite::memory"
end
DB = Sequel.connect(SEQUEL_TEST_DB_URI)
def seed(db = DB)
db.run("CREATE TABLE users (id INTEGER PR... |
require 'rom'
require 'rom/adapter/memory'
require 'rom/adapter/sequel'
require 'rom/adapter/mongo'
include ROM
if defined? JRUBY_VERSION
USING_JRUBY = true
else
USING_JRUBY = false
end
if USING_JRUBY
SEQUEL_TEST_DB_URI = "jdbc:sqlite::memory"
else
SEQUEL_TEST_DB_URI = "sqlite::memory"
end
DB = Sequel.conn... | Remove requires for all adapter files | Remove requires for all adapter files
Client code should require the needed adapters.
| Ruby | mit | rom-rb/rom-support | ruby | ## Code Before:
require 'rom'
include ROM
if defined? JRUBY_VERSION
USING_JRUBY = true
else
USING_JRUBY = false
end
if USING_JRUBY
SEQUEL_TEST_DB_URI = "jdbc:sqlite::memory"
else
SEQUEL_TEST_DB_URI = "sqlite::memory"
end
DB = Sequel.connect(SEQUEL_TEST_DB_URI)
def seed(db = DB)
db.run("CREATE TABLE user... |
93a8dfb6f81e6dca9c22df21b9279519e05304f6 | db/migrate/20100701183019_create_facility_accounts.rb | db/migrate/20100701183019_create_facility_accounts.rb | class CreateFacilityAccounts < ActiveRecord::Migration
def self.up
create_table :facility_accounts do |t|
t.references :facility, :null => false
t.string :account_number, :null => false, :limit => 50
t.boolean :is_active, :null => false
t.integer :created_by, :null... | class CreateFacilityAccounts < ActiveRecord::Migration
def self.up
create_table :facility_accounts do |t|
t.references :facility, :null => false
t.string :account_number, :null => false, :limit => 50
t.boolean :is_active, :null => false
t.integer :created_by, :null... | Fix migration from scratch issue | Fix migration from scratch issue
When running the migration for a new project, the `change_column
:products, :facility_account_id, :integer, null: false` was failing
because there was a foreign key attached to it. Oddly, it was only
failing when run on the stage server database; it worked fine locally.
This changes t... | Ruby | mit | tablexi/nucore-open,tablexi/nucore-open,tablexi/nucore-open,tablexi/nucore-open | ruby | ## Code Before:
class CreateFacilityAccounts < ActiveRecord::Migration
def self.up
create_table :facility_accounts do |t|
t.references :facility, :null => false
t.string :account_number, :null => false, :limit => 50
t.boolean :is_active, :null => false
t.integer :creat... |
df8241dc1d59064aedb72cbfcb1aed27862b1057 | README.md | README.md |
This cookbook installs the Non-Sucking Service Manager (http://nssm.cc), and exposes resources to `install` and `remove` Windows services.
Read [TLDR](TLDR.md) for more details about usage, chefspec matchers, and contributing.
## Requirements
### Platform
Should work under Windows 2000 or later.
### Cookbooks
-... |
[](https://travis-ci.org/dhoer/chef-nssm)
This cookbook installs the Non-Sucking Service Manager (http://nssm.cc), and exposes resources to `install` and `remove` Windows services.
Read [TLDR](TLDR.md) for more details about usage, chefspec matchers, and contr... | Add travis build status icon | Add travis build status icon
| Markdown | mit | criteo-forks/chef-nssm,dhoer/chef-nssm | markdown | ## Code Before:
This cookbook installs the Non-Sucking Service Manager (http://nssm.cc), and exposes resources to `install` and `remove` Windows services.
Read [TLDR](TLDR.md) for more details about usage, chefspec matchers, and contributing.
## Requirements
### Platform
Should work under Windows 2000 or later.
... |
3f5c3a919f1c94c3f00f7e1f43622dc6b92d80cd | lib/puppet-lint/plugins/check_nodes.rb | lib/puppet-lint/plugins/check_nodes.rb | PuppetLint.new_check(:unquoted_node_name) do
def check
tokens.select { |r|
r.type == :NODE && r.next_code_token.type == :NAME
}.each do |token|
value_token = token.next_code_token
unless value_token.value == 'default'
notify :warning, {
:message => 'unquoted node name found... | PuppetLint.new_check(:unquoted_node_name) do
def check
node_tokens = tokens.select { |token| token.type == :NODE }
node_tokens.each do |node|
node_token_idx = tokens.index(node)
node_lbrace_idx = tokens.index(tokens.find { |token| token.type == :LBRACE })
tokens[node_token_idx..node_lbrace_... | Add support for multiple node names in a block to unquoted_node_name | Add support for multiple node names in a block to unquoted_node_name
| Ruby | mit | rodjek/puppet-lint,raphink/puppet-lint,danzilio/puppet-lint,Rovanion/puppet-lint,yulis/puppet-lint,paulgeringer/puppet-lint,toby82/puppet-lint,keeleysam/puppet-lint,rothsa/puppet-lint | ruby | ## Code Before:
PuppetLint.new_check(:unquoted_node_name) do
def check
tokens.select { |r|
r.type == :NODE && r.next_code_token.type == :NAME
}.each do |token|
value_token = token.next_code_token
unless value_token.value == 'default'
notify :warning, {
:message => 'unquoted... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.