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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b75466868e2171dcc67b1db2666d186bf0afca89 | test/junit/scala/collection/immutable/PagedSeqTest.scala | test/junit/scala/collection/immutable/PagedSeqTest.scala | package scala.collection.immutable
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.Test
import org.junit.Assert._
@RunWith(classOf[JUnit4])
class PagedSeqTest {
// should not NPE, and should equal the given Seq
@Test
def test_SI6615(): Unit = {
assertEquals(Seq('a'), PagedSe... | package scala.collection.immutable
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.{Ignore, Test}
import org.junit.Assert._
@RunWith(classOf[JUnit4])
class PagedSeqTest {
// should not NPE, and should equal the given Seq
@Test
@Ignore("This tests a non-stack safe method in a dep... | Disable stack hungry test of deprecated PagedSeq | Disable stack hungry test of deprecated PagedSeq
| Scala | apache-2.0 | felixmulder/scala,martijnhoekstra/scala,jvican/scala,scala/scala,jvican/scala,lrytz/scala,shimib/scala,felixmulder/scala,shimib/scala,martijnhoekstra/scala,lrytz/scala,scala/scala,martijnhoekstra/scala,lrytz/scala,slothspot/scala,jvican/scala,scala/scala,jvican/scala,martijnhoekstra/scala,shimib/scala,slothspot/scala,f... | scala | ## Code Before:
package scala.collection.immutable
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
import org.junit.Test
import org.junit.Assert._
@RunWith(classOf[JUnit4])
class PagedSeqTest {
// should not NPE, and should equal the given Seq
@Test
def test_SI6615(): Unit = {
assertEquals(S... |
653fe70ba6b4a6fdd339fa5f2dc84e8b7a6ccf52 | app/assets/javascripts/pageflow/editor/views/configuration_editors/audio_loop.js | app/assets/javascripts/pageflow/editor/views/configuration_editors/audio_loop.js | pageflow.ConfigurationEditorView.register('audio_loop', {
configure: function() {
this.tab('general', function() {
this.group('general');
this.input('additional_title', pageflow.TextInputView);
this.input('additional_description', pageflow.TextAreaInputView, {size: 'short'});
});
this.... | pageflow.ConfigurationEditorView.register('audio_loop', {
configure: function() {
this.tab('general', function() {
this.group('general');
});
this.tab('files', function() {
this.input('audio_file_id', pageflow.FileInputView, {collection: pageflow.audioFiles});
this.input('background_ima... | Remove Additional Info Box Fields for Audio Loop Page | Remove Additional Info Box Fields for Audio Loop Page
Not supported by this page type. Copied over from audio page.
| JavaScript | mit | BenHeubl/pageflow,codevise/pageflow,BenHeubl/pageflow,tf/pageflow-dependabot-test,luatdolphin/pageflow,schoetty/pageflow,YoussefChafai/pageflow,luatdolphin/pageflow,YoussefChafai/pageflow,BenHeubl/pageflow,Modularfield/pageflow,tilsammans/pageflow,grgr/pageflow,tf/pageflow,codevise/pageflow,tilsammans/pageflow,grgr/pag... | javascript | ## Code Before:
pageflow.ConfigurationEditorView.register('audio_loop', {
configure: function() {
this.tab('general', function() {
this.group('general');
this.input('additional_title', pageflow.TextInputView);
this.input('additional_description', pageflow.TextAreaInputView, {size: 'short'});
... |
6845995f50fe524e8a66119955662c61e8fe8f35 | website/en/docs/types/modules.md | website/en/docs/types/modules.md | ---
layout: guide
---
### Importing and exporting types <a class="toc" id="toc-importing-and-exporting-types" href="#toc-importing-and-exporting-types"></a>
It is often useful to share types in between modules (files). In Flow, you can export type aliases, interfaces, and classes from one file and import them in anoth... | ---
layout: guide
---
### Importing and exporting types <a class="toc" id="toc-importing-and-exporting-types" href="#toc-importing-and-exporting-types"></a>
It is often useful to share types in between modules (files). In Flow, you can export type aliases, interfaces, and classes from one file and import them in anoth... | Fix an `export default const` mistake in the docs | [PR] Fix an `export default const` mistake in the docs
Summary:
See https://github.com/facebook/flow/issues/4203.
Closes https://github.com/facebook/flow/pull/4205
Differential Revision: D5297972
Pulled By: mroch
fbshipit-source-id: 6175c47b8361d645bc2f267cd16cf8e89710fa6d
| Markdown | mit | nmote/flow,samwgoldman/flow,JonathanUsername/flow,TiddoLangerak/flow,gabelevi/flow,TiddoLangerak/flow,TiddoLangerak/flow,ylu1317/flow,samwgoldman/flow,AgentME/flow,ylu1317/flow,samwgoldman/flow,JonathanUsername/flow,ylu1317/flow,samwgoldman/flow,claudiopro/flow,ylu1317/flow,popham/flow,jamesgpearce/flow,mroch/flow,samw... | markdown | ## Code Before:
---
layout: guide
---
### Importing and exporting types <a class="toc" id="toc-importing-and-exporting-types" href="#toc-importing-and-exporting-types"></a>
It is often useful to share types in between modules (files). In Flow, you can export type aliases, interfaces, and classes from one file and impo... |
3ef8e7783203f14665043f09539226a69a5ce594 | etc/pytest.ini | etc/pytest.ini | [pytest]
addopts =
--doctest-glob='*.rst'
--tb=native
--capture=fd
--splinter-implicit-wait=1
--splinter-speed=0
--splinter-socket-timeout=120
--splinter-webdriver=phantomjs
--splinter-session-scoped-browser
--cov=adhocracy
--cov=adhocracy_sample
--cov-report=html
--cov-r... | [pytest]
addopts =
--doctest-glob='*.rst'
--tb=native
--capture=fd
--splinter-implicit-wait=1
--splinter-speed=0
--splinter-socket-timeout=120
--splinter-webdriver=phantomjs
--splinter-session-scoped-browser
--cov=adhocracy
--cov=adhocracy_sample
--cov-report=html
--cov-r... | Revert "gardening: don't let pytes capture exceptions" | Revert "gardening: don't let pytes capture exceptions"
This reverts commit 9a8dfbb48d301ce3aa8f2c55b62591886cf086b8.
Reason: capture=fd is already defined above. If capture=no is desired,
just add -s in py.test command.
| INI | agpl-3.0 | xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maver... | ini | ## Code Before:
[pytest]
addopts =
--doctest-glob='*.rst'
--tb=native
--capture=fd
--splinter-implicit-wait=1
--splinter-speed=0
--splinter-socket-timeout=120
--splinter-webdriver=phantomjs
--splinter-session-scoped-browser
--cov=adhocracy
--cov=adhocracy_sample
--cov-report=... |
8aa76d03d77022e297f1ed925e40229ecf7413be | src/components/query_list.js | src/components/query_list.js | var React = require('react');
var actions = require('../actions');
var { Navigation } = require('react-router');
var QueryStore = require('../stores/query_store.js');
var QueryList = React.createClass({
mixins: [QueryStore.listenTo, Navigation],
getInitialState() {
return { queries: [] };
},
_o... | var React = require('react');
var actions = require('../actions');
var { Navigation } = require('react-router');
var QueryStore = require('../stores/query_store.js');
var QueryList = React.createClass({
mixins: [QueryStore.listenTo, Navigation],
getInitialState() {
return { queries: [] };
},
_o... | Add keys to query list | Add keys to query list
| JavaScript | isc | ernestrc/stickshift,ernestrc/stickshift,tmcw/stickshift,tmcw/stickshift | javascript | ## Code Before:
var React = require('react');
var actions = require('../actions');
var { Navigation } = require('react-router');
var QueryStore = require('../stores/query_store.js');
var QueryList = React.createClass({
mixins: [QueryStore.listenTo, Navigation],
getInitialState() {
return { queries: [] ... |
926ff341faaad92c85b3ca444813e7781709d519 | test/tests/tomcat-hello-world/run.sh | test/tests/tomcat-hello-world/run.sh | set -eo pipefail
dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
image="$1"
# since we have curl in the tomcat image, we'll use that
clientImage="$1"
serverImage="$1"
# Create an instance of the container-under-test
cid="$(docker run -d "$serverImage")"
trap "docker rm -vf $cid > /dev/null" EXIT
_request() {
lo... | set -eo pipefail
dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
image="$1"
# since we have curl in the tomcat image, we'll use that
clientImage="$1"
serverImage="$1"
# Create an instance of the container-under-test
cid="$(docker run -d "$serverImage")"
trap "docker rm -vf $cid > /dev/null" EXIT
_request() {
lo... | Swap curl to wget for tomcat:alpine test | Swap curl to wget for tomcat:alpine test
| Shell | apache-2.0 | docker-solr/official-images,dinogun/official-images,infosiftr/stackbrew,31z4/official-images,jperrin/official-images,jperrin/official-images,docker-library/official-images,chorrell/official-images,docker-solr/official-images,pesho/docker-official-images,robfrank/official-images,thresheek/official-images,docker-flink/of... | shell | ## Code Before:
set -eo pipefail
dir="$(dirname "$(readlink -f "$BASH_SOURCE")")"
image="$1"
# since we have curl in the tomcat image, we'll use that
clientImage="$1"
serverImage="$1"
# Create an instance of the container-under-test
cid="$(docker run -d "$serverImage")"
trap "docker rm -vf $cid > /dev/null" EXIT
... |
57c3daed4338e33fce5efade3d3afd23446a6988 | html/index.html | html/index.html | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Coding Math!</title>
<style type="text/css">
html, body {
margin: 0px;
height: 100%;
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
canvas {
display: b... | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Coding Math!</title>
<link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
<style type="text/css">
html, body {
margin: 0px;
height: 100%;
box-sizing: border-box;
... | Add roboto slab, cause it is the best font eva | Add roboto slab, cause it is the best font eva
| HTML | mit | michaelghinrichs/coding-math,michaelghinrichs/coding-math | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Coding Math!</title>
<style type="text/css">
html, body {
margin: 0px;
height: 100%;
box-sizing: border-box;
}
*, *:before, *:after {
box-sizing: inherit;
}
canvas {
... |
421a2b9f324795e1b153d394786e126ab7abe43b | autocomplete/cache/cache.go | autocomplete/cache/cache.go | package cache
import (
"encoding/json"
"github.com/centurylinkcloud/clc-go-cli/state"
"time"
)
const (
LONG_AUTOCOMPLETE_REFRESH_TIMEOUT = 30 // seconds
)
func Put(key string, opts []string) {
data, err := json.Marshal(opts)
if err == nil {
state.WriteToFile(data, key, 0666)
}
}
func Get(key string) ([]str... | package cache
import (
"encoding/json"
"github.com/centurylinkcloud/clc-go-cli/state"
"time"
)
var (
LONG_AUTOCOMPLETE_REFRESH_TIMEOUT = 30 // seconds
)
func Put(key string, opts []string) {
data, err := json.Marshal(opts)
if err == nil {
state.WriteToFile(data, key, 0666)
}
}
func Get(key string) ([]strin... | Make a variable out of the refresh timeout for testing purposes | Make a variable out of the refresh timeout for testing purposes
| Go | apache-2.0 | CenturyLinkCloud/clc-go-cli,CenturyLinkCloud/clc-go-cli | go | ## Code Before:
package cache
import (
"encoding/json"
"github.com/centurylinkcloud/clc-go-cli/state"
"time"
)
const (
LONG_AUTOCOMPLETE_REFRESH_TIMEOUT = 30 // seconds
)
func Put(key string, opts []string) {
data, err := json.Marshal(opts)
if err == nil {
state.WriteToFile(data, key, 0666)
}
}
func Get(ke... |
60c7f5fa6b57823f738ab6469d768bc302f260fc | lib/hamlbars/compiler_extension.rb | lib/hamlbars/compiler_extension.rb | module Hamlbars
module CompilerExtension
end
end
module Haml
module Compiler
class << self
# Overload build_attributes in Haml::Compiler to allow
# for the creation of handlebars bound attributes by
# adding :bind hash to the tag attributes.
def build_attributes_with_bindings (is_html... | module Hamlbars
module CompilerExtension
end
end
module Haml
module Compiler
class << self
# Overload build_attributes in Haml::Compiler to allow
# for the creation of handlebars bound attributes by
# adding :bind hash to the tag attributes.
def build_attributes_with_handlebars_attrib... | Add the event helper to tag attributes. | Add the event helper to tag attributes.
| Ruby | mit | jamesotron/hamlbars | ruby | ## Code Before:
module Hamlbars
module CompilerExtension
end
end
module Haml
module Compiler
class << self
# Overload build_attributes in Haml::Compiler to allow
# for the creation of handlebars bound attributes by
# adding :bind hash to the tag attributes.
def build_attributes_with_b... |
27aabe061199f1c1e04c6775fbd0dbf2f49fdbb6 | README.md | README.md |
A minimal microservices transport layer, based on Redis.
[](https://travis-ci.org/jmike/naomi) [](https://badge.fury.io/js/naomi)
#### Features
* PubSub, Queue and RPC functionality;
* Exposes promi... |
A minimal microservices transport layer, based on Redis.
[](https://travis-ci.org/visionmobile/redis-micro-transport) [](https://badge.fury.io/js/redis-micro-tra... | Update travis + fury.io badges | Update travis + fury.io badges
| Markdown | mit | visionmobile/redis-micro-transport | markdown | ## Code Before:
A minimal microservices transport layer, based on Redis.
[](https://travis-ci.org/jmike/naomi) [](https://badge.fury.io/js/naomi)
#### Features
* PubSub, Queue and RPC functionality;... |
00630f5b9dd4c15f356dbfd25daa02b49b64c626 | sencha-workspace/pages/src/Common.js | sencha-workspace/pages/src/Common.js | /*jslint browser: true, undef: true *//*global Ext*/
Ext.define('Site.Common', {
singleton: true,
requires: [],
constructor: function() {
Ext.onReady(this.onDocReady, this);
},
onDocReady: function() {
var me = this,
body = Ext.getBody();
}
}); | /*jslint browser: true, undef: true *//*global Ext*/
Ext.define('Site.Common', {
singleton: true,
requires: [
'Ext.dom.Element'
],
constructor: function() {
Ext.onReady(this.onDocReady, this);
},
onDocReady: function() {
var me = this,
body = Ext.getBody();
... | Add Ext.dom.Element as common requirement | Add Ext.dom.Element as common requirement
| JavaScript | mit | JarvusInnovations/Emergence-Skeleton,JarvusInnovations/Emergence-Skeleton,JarvusInnovations/Emergence-Skeleton,JarvusInnovations/Emergence-Skeleton | javascript | ## Code Before:
/*jslint browser: true, undef: true *//*global Ext*/
Ext.define('Site.Common', {
singleton: true,
requires: [],
constructor: function() {
Ext.onReady(this.onDocReady, this);
},
onDocReady: function() {
var me = this,
body = Ext.getBody();
}... |
0c35ee2a8a71bf776001ebebc186b236ab34e7d3 | library/src/main/java/com/novoda/downloadmanager/NotificationDispatcher.java | library/src/main/java/com/novoda/downloadmanager/NotificationDispatcher.java | package com.novoda.downloadmanager;
import static com.novoda.downloadmanager.DownloadBatchStatus.Status.DELETION;
import static com.novoda.downloadmanager.DownloadBatchStatus.Status.DOWNLOADED;
class NotificationDispatcher {
private final Object waitForDownloadService;
private final NotificationCreator<Downl... | package com.novoda.downloadmanager;
import android.support.annotation.WorkerThread;
import static com.novoda.downloadmanager.DownloadBatchStatus.Status.DELETION;
import static com.novoda.downloadmanager.DownloadBatchStatus.Status.DOWNLOADED;
class NotificationDispatcher {
private final Object waitForDownloadSer... | Add worker thread annotation to update notification. | Add worker thread annotation to update notification.
| Java | apache-2.0 | novoda/download-manager | java | ## Code Before:
package com.novoda.downloadmanager;
import static com.novoda.downloadmanager.DownloadBatchStatus.Status.DELETION;
import static com.novoda.downloadmanager.DownloadBatchStatus.Status.DOWNLOADED;
class NotificationDispatcher {
private final Object waitForDownloadService;
private final Notificat... |
6b4a8a3ba40213dd6635ef1d6ec91f4d54a6d556 | .travis.yml | .travis.yml | language: ruby
bundler_args: --without development
rvm:
- 2.0.0
- 1.9.3
- jruby
- rbx-19mode
gemfile:
- gemfiles/Gemfile.rails-4-0
- gemfiles/Gemfile.rails-3-2
- gemfiles/Gemfile.rails-3-1
services:
- rabbitmq
deploy:
provider: rubygems
api_key:
secure: gNudZK0JaRRweudmkpdkJjUMydItTSW5cXjpYdYCfahqd/cD0xPjxotr2T... | language: ruby
bundler_args: --without development
rvm:
- 2.0.0
- 1.9.3
- jruby
- rbx-19mode
gemfile:
- gemfiles/Gemfile.rails-4-0
- gemfiles/Gemfile.rails-3-2
- gemfiles/Gemfile.rails-3-1
services:
- rabbitmq
deploy:
provider: rubygems
api_key:
secure: gNudZK0JaRRweudmkpdkJjUMydItTSW5cXjpYdYCfahqd/cD0xPjxotr2T... | Remove deploy on gemfile option. | Remove deploy on gemfile option.
| YAML | mit | johannesjasper/acfs,dahoo/acfs,jgraichen/acfs | yaml | ## Code Before:
language: ruby
bundler_args: --without development
rvm:
- 2.0.0
- 1.9.3
- jruby
- rbx-19mode
gemfile:
- gemfiles/Gemfile.rails-4-0
- gemfiles/Gemfile.rails-3-2
- gemfiles/Gemfile.rails-3-1
services:
- rabbitmq
deploy:
provider: rubygems
api_key:
secure: gNudZK0JaRRweudmkpdkJjUMydItTSW5cXjpYdYCfa... |
d4d517611104a8b42ccc79a310c510edd5f0eae5 | numba/cuda/simulator/cudadrv/driver.py | numba/cuda/simulator/cudadrv/driver.py | '''
Most of the driver API is unsupported in the simulator, but some stubs are
provided to allow tests to import correctly.
'''
def device_memset(dst, val, size, stream=0):
dst.view('u1')[:size].fill(bytes([val])[0])
def host_to_device(dst, src, size, stream=0):
dst.view('u1')[:size] = src.view('u1')[:size]... | '''
Most of the driver API is unsupported in the simulator, but some stubs are
provided to allow tests to import correctly.
'''
def device_memset(dst, val, size, stream=0):
dst.view('u1')[:size].fill(bytes([val])[0])
def host_to_device(dst, src, size, stream=0):
dst.view('u1')[:size] = src.view('u1')[:size]... | Fix simulator by adding missing USE_NV_BINDING to simulator | CUDA: Fix simulator by adding missing USE_NV_BINDING to simulator
| Python | bsd-2-clause | cpcloud/numba,numba/numba,seibert/numba,IntelLabs/numba,cpcloud/numba,cpcloud/numba,seibert/numba,IntelLabs/numba,numba/numba,IntelLabs/numba,numba/numba,cpcloud/numba,seibert/numba,numba/numba,seibert/numba,IntelLabs/numba,numba/numba,cpcloud/numba,IntelLabs/numba,seibert/numba | python | ## Code Before:
'''
Most of the driver API is unsupported in the simulator, but some stubs are
provided to allow tests to import correctly.
'''
def device_memset(dst, val, size, stream=0):
dst.view('u1')[:size].fill(bytes([val])[0])
def host_to_device(dst, src, size, stream=0):
dst.view('u1')[:size] = src.v... |
ef98d1cca01ff912876c3758278394d4952caa7c | job-sites.md | job-sites.md |
[trampos.co](http://trampos.co/) |
[trampos.co](http://trampos.co/)
[contratado.me](http://devs.contratado.me/) | Add contratado.me to Jobs List | Add contratado.me to Jobs List
| Markdown | mit | woliveiras/front-end-career,woliveiras/front-end-career | markdown | ## Code Before:
[trampos.co](http://trampos.co/)
## Instruction:
Add contratado.me to Jobs List
## Code After:
[trampos.co](http://trampos.co/)
[contratado.me](http://devs.contratado.me/) |
9e4efa66038496ac1ac754d044c0a18a2c0edcdd | README.md | README.md |
A command-line toolkit for work on custom [WordPress](http://wordpress.org/) developments in an efficient way.
> This project is still at early (pre-alpha) stage.
> I'd love to hear from anyone who wish to contribute. Feel free to submit issues, feature requests and any suggestions you mind. PRs are welcome! :-)
> T... |
A command-line toolkit for work on custom [WordPress](http://wordpress.org/) developments in an efficient way.
> This project is still at early (pre-alpha) stage.
> I'd love to hear from anyone who wish to contribute. Feel free to submit issues, feature requests and any suggestions you mind. PRs are welcome! :-)
> T... | Remove the Installation section temporarily | Remove the Installation section temporarily | Markdown | mit | kodeflex/wp-artisan | markdown | ## Code Before:
A command-line toolkit for work on custom [WordPress](http://wordpress.org/) developments in an efficient way.
> This project is still at early (pre-alpha) stage.
> I'd love to hear from anyone who wish to contribute. Feel free to submit issues, feature requests and any suggestions you mind. PRs are w... |
9ced61716167505875d3938ae01c08b61acc9392 | randterrainpy/terrain.py | randterrainpy/terrain.py | """This module is for the Terrain class, used for storing randomly generated terrain."""
class Terrain(object):
"""Container for a randomly generated area of terrain.
Attributes:
width (int): Width of generated terrain.
length (int): Length of generated terrain.
height_map (list): Map... | """This module is for the Terrain class, used for storing randomly generated terrain."""
class Terrain(object):
"""Container for a randomly generated area of terrain.
Attributes:
width (int): Width of generated terrain.
length (int): Length of generated terrain.
height_map (list): Map... | Add addition method to Terrain | Add addition method to Terrain
| Python | mit | jackromo/RandTerrainPy | python | ## Code Before:
"""This module is for the Terrain class, used for storing randomly generated terrain."""
class Terrain(object):
"""Container for a randomly generated area of terrain.
Attributes:
width (int): Width of generated terrain.
length (int): Length of generated terrain.
height... |
aa21b9349ae7379b36be037e78940b5a27b357ca | .travis.yml | .travis.yml | language: php
php:
- '7.0'
- '7.1'
- hhvm
- nightly
install: composer install
script:
- vendor/bin/phpunit | language: php
php:
- '7.0'
- '7.1'
install: composer install
script:
- vendor/bin/phpunit | Remove HHVM and PHP nightly from Travis. The deprecation of each() in PHP 7.2 is a problem for PHPUnit at this stage. | Remove HHVM and PHP nightly from Travis. The deprecation of each() in PHP 7.2 is a problem for PHPUnit at this stage.
| YAML | mit | martin-georgiev/social-post-bundle | yaml | ## Code Before:
language: php
php:
- '7.0'
- '7.1'
- hhvm
- nightly
install: composer install
script:
- vendor/bin/phpunit
## Instruction:
Remove HHVM and PHP nightly from Travis. The deprecation of each() in PHP 7.2 is a problem for PHPUnit at this stage.
## Code After:
language: php
php:
- '7.0'
- '7.1... |
07646000428565f79c0ef2271e8ae8f9a9f2c314 | .devcontainer/Dockerfile | .devcontainer/Dockerfile | FROM python:3.8
RUN groupadd -g 1000 app
RUN useradd -u 1000 -g app -s /bin/sh -m app
USER app
ENV PATH="/home/app/.local/bin/:${PATH}"
| FROM python:3.8
RUN groupadd -g 1000 app
RUN useradd -u 1000 -g app -s /bin/sh -m app
USER app
ENV PATH="/home/app/.local/bin/:${PATH}"
CMD ["/bin/bash"]
| Set bash as default command | Set bash as default command
| unknown | mit | ltowarek/budget-supervisor | unknown | ## Code Before:
FROM python:3.8
RUN groupadd -g 1000 app
RUN useradd -u 1000 -g app -s /bin/sh -m app
USER app
ENV PATH="/home/app/.local/bin/:${PATH}"
## Instruction:
Set bash as default command
## Code After:
FROM python:3.8
RUN groupadd -g 1000 app
RUN useradd -u 1000 -g app -s /bin/sh -m app
USER app
ENV PATH... |
891ca8ee117f462a1648e954b756f1d29a5f527c | tests/test_errors.py | tests/test_errors.py | """Tests for errors.py"""
import aiohttp
def test_bad_status_line1():
err = aiohttp.BadStatusLine(b'')
assert str(err) == "b''"
def test_bad_status_line2():
err = aiohttp.BadStatusLine('Test')
assert str(err) == 'Test'
| """Tests for errors.py"""
import aiohttp
def test_bad_status_line1():
err = aiohttp.BadStatusLine(b'')
assert str(err) == "b''"
def test_bad_status_line2():
err = aiohttp.BadStatusLine('Test')
assert str(err) == 'Test'
def test_fingerprint_mismatch():
err = aiohttp.FingerprintMismatch('exp', ... | Add a test for FingerprintMismatch repr | Add a test for FingerprintMismatch repr
| Python | apache-2.0 | jettify/aiohttp,esaezgil/aiohttp,z2v/aiohttp,arthurdarcet/aiohttp,pfreixes/aiohttp,z2v/aiohttp,mind1master/aiohttp,KeepSafe/aiohttp,mind1master/aiohttp,juliatem/aiohttp,hellysmile/aiohttp,esaezgil/aiohttp,esaezgil/aiohttp,arthurdarcet/aiohttp,panda73111/aiohttp,pfreixes/aiohttp,z2v/aiohttp,alex-eri/aiohttp-1,singulared... | python | ## Code Before:
"""Tests for errors.py"""
import aiohttp
def test_bad_status_line1():
err = aiohttp.BadStatusLine(b'')
assert str(err) == "b''"
def test_bad_status_line2():
err = aiohttp.BadStatusLine('Test')
assert str(err) == 'Test'
## Instruction:
Add a test for FingerprintMismatch repr
## Cod... |
7449fa3cfd625754c4f82e2382b05f6c52251683 | src/main/java/com/github/davidcarboni/thetrain/json/request/Manifest.java | src/main/java/com/github/davidcarboni/thetrain/json/request/Manifest.java | package com.github.davidcarboni.thetrain.json.request;
import java.util.List;
public class Manifest {
public List<FileCopy> filesToCopy;
}
| package com.github.davidcarboni.thetrain.json.request;
import java.util.List;
public class Manifest {
public List<FileCopy> filesToCopy;
public List<String> urisToDelete;
}
| Add list of deletes to manifest. | Add list of deletes to manifest.
| Java | mit | Carboni/the-train-destination,ONSdigital/The-Train,ONSdigital/The-Train,Carboni/The-Train,Carboni/The-Train,Carboni/the-train-destination | java | ## Code Before:
package com.github.davidcarboni.thetrain.json.request;
import java.util.List;
public class Manifest {
public List<FileCopy> filesToCopy;
}
## Instruction:
Add list of deletes to manifest.
## Code After:
package com.github.davidcarboni.thetrain.json.request;
import java.util.List;
public class ... |
ac2c3285e99f48cf9b659c5f4ba2b7d0d3eeb88b | appveyor-docs.yml | appveyor-docs.yml | version: '{build}'
image: Visual Studio 2022
branches:
only:
- master
only_commits:
files:
- docfx/**/*
build_script:
- cmd: git checkout master
- cmd: docfx\build-site.cmd
environment:
access_token:
secure: E5yLQIoD1jEQiCI/I46b+DJx9vr7bSgprLOt9tC9OjJK7je3m5HC/QmX3PaxFBPm
on_success:
- git conf... | version: '{build}'
image: Visual Studio 2022
branches:
only:
- master
only_commits:
files:
- docfx/**/*
install:
- ps: Invoke-WebRequest 'https://dot.net/v1/dotnet-install.ps1' -OutFile 'dotnet-install.ps1';
- ps: ./dotnet-install.ps1 -Version 6.0.401 -InstallDir "dotnetcli"
build_script:
... | Install .Net Sdk 6.0.401 on document generation | Install .Net Sdk 6.0.401 on document generation
| YAML | mit | charlenni/Mapsui,charlenni/Mapsui | yaml | ## Code Before:
version: '{build}'
image: Visual Studio 2022
branches:
only:
- master
only_commits:
files:
- docfx/**/*
build_script:
- cmd: git checkout master
- cmd: docfx\build-site.cmd
environment:
access_token:
secure: E5yLQIoD1jEQiCI/I46b+DJx9vr7bSgprLOt9tC9OjJK7je3m5HC/QmX3PaxFBPm
on_succe... |
fb65279d991ba615d0e1d7f9a362dbb2aa8fc8ec | README.md | README.md |
Many triops are called "triops".
One triops is called a triops.
Tri-ops, lit. "three-eyes".
Calling a single specimen a "triop" is like saying "three-eye", which sounds dumb.
# Running
```bash
$ virtualenv .env
$ source .env/bin/activate
(.env)$ ./setup.py develop
(.env)$ autotriops-server &
(.env)$ open http://1... | [](https://travis-ci.org/cnelsonsic/optar)
# Semantics
Many triops are called "triops".
One triops is called a triops.
Tri-ops, lit. "three-eyes".
Calling a single specimen a "triop" is like saying "three-eye", which sounds dumb.
# Run... | Add the travis build button | Add the travis build button
| Markdown | agpl-3.0 | cnelsonsic/autotriops | markdown | ## Code Before:
Many triops are called "triops".
One triops is called a triops.
Tri-ops, lit. "three-eyes".
Calling a single specimen a "triop" is like saying "three-eye", which sounds dumb.
# Running
```bash
$ virtualenv .env
$ source .env/bin/activate
(.env)$ ./setup.py develop
(.env)$ autotriops-server &
(.env... |
5fc4baedf0bda93cb9f75e05e4e07abf0e24a9d5 | Casks/github.rb | Casks/github.rb | class Github < Cask
url 'https://central.github.com/mac/latest'
homepage 'http://mac.github.com'
version 'latest'
no_checksum
link 'GitHub.app'
after_install do
system '/usr/bin/defaults', 'write', 'com.github.GitHub', 'moveToApplicationsFolderAlertSuppress', '-bool', 'true'
end
end
| class Github < Cask
url 'https://central.github.com/mac/latest'
homepage 'http://mac.github.com'
version 'latest'
no_checksum
link 'GitHub.app'
binary 'GitHub.app/Contents/MacOS/github_cli', :target => 'github'
after_install do
system '/usr/bin/defaults', 'write', 'com.github.GitHub', 'moveToApplicati... | Fix CLI tool installation in GitHub for Mac | Fix CLI tool installation in GitHub for Mac
Symlinks the 'github' CLI binary that enables opening GitHub for Mac
from the command line. As per the defaults for the application, the
internal `github_cli` binary is symlinked simply as `github`.
Note this intetionally does *not* also symlink the bundled versions.
of `gi... | Ruby | bsd-2-clause | ninjahoahong/homebrew-cask,Whoaa512/homebrew-cask,mikem/homebrew-cask,rickychilcott/homebrew-cask,doits/homebrew-cask,jiashuw/homebrew-cask,hackhandslabs/homebrew-cask,qbmiller/homebrew-cask,joschi/homebrew-cask,cliffcotino/homebrew-cask,timsutton/homebrew-cask,crmne/homebrew-cask,reelsense/homebrew-cask,joshka/homebre... | ruby | ## Code Before:
class Github < Cask
url 'https://central.github.com/mac/latest'
homepage 'http://mac.github.com'
version 'latest'
no_checksum
link 'GitHub.app'
after_install do
system '/usr/bin/defaults', 'write', 'com.github.GitHub', 'moveToApplicationsFolderAlertSuppress', '-bool', 'true'
end
end
#... |
e6d941adc272e921fddf5d3b635c4abafa106dc1 | .circleci/config.yml | .circleci/config.yml | version: 2
jobs:
build:
docker:
- image: circleci/golang:1.8
working_directory: /go/src/github.com/cxmate/cxmate
steps:
- checkout
- run: go test $(go list ./... | grep -v /vendor/)
- deploy:
name: Github Release
command: |
go get github.com/mitchell... | version: 2
jobs:
build:
docker:
- image: circleci/golang:1.8
working_directory: /go/src/github.com/cxmate/cxmate
steps:
- checkout
- run: go test $(go list ./... | grep -v /vendor/)
- deploy:
name: Github Release
command: |
go get github.com/mitchell... | Remove build flags in gox | Remove build flags in gox
| YAML | mit | cxmate/cxmate,cxmate/cxmate | yaml | ## Code Before:
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.8
working_directory: /go/src/github.com/cxmate/cxmate
steps:
- checkout
- run: go test $(go list ./... | grep -v /vendor/)
- deploy:
name: Github Release
command: |
go get git... |
add2f6fd96bdef1e1f0faaebdc88af812d2e52e9 | CLTool/src/clunix.cpp | CLTool/src/clunix.cpp |
int main(int argc, char **argv) {
if(argc != 2) {
fprintf(stderr, "Usage: %s <imagefile>\n", argv[0]);
exit(1);
}
ImageFile file (argv[1]);
SCompressionSettings settings;
CompressedImage *ci = CompressImage(file, settings);
// Cleanup
delete ci;
return 0;
}
|
void PrintUsage() {
fprintf(stderr, "Usage: tc [-s|-t <num>] <imagefile>\n");
}
int main(int argc, char **argv) {
int fileArg = 1;
int quality = 50;
int numThreads = 1;
bool bUseSIMD = false;
bool knowArg = false;
do {
knowArg = false;
if(strcmp(argv[fileArg], "-s") == 0) {
file... | Add some more flag support to unix command line tool... | Add some more flag support to unix command line tool...
| C++ | apache-2.0 | GammaUNC/FasTC,GammaUNC/FasTC,GammaUNC/FasTC,GammaUNC/FasTC | c++ | ## Code Before:
int main(int argc, char **argv) {
if(argc != 2) {
fprintf(stderr, "Usage: %s <imagefile>\n", argv[0]);
exit(1);
}
ImageFile file (argv[1]);
SCompressionSettings settings;
CompressedImage *ci = CompressImage(file, settings);
// Cleanup
delete ci;
return 0;
}
## Instructio... |
a6f085e16febadfc5fb4107f8ce89b12bf1af25e | index.html | index.html | <!DOCTYPE html>
<head>
</head>
<body>
</body>
</html> | <!DOCTYPE html>
<head>
<!-- REQUIRED META TAGS -->
<title>The Planets</title>
<meta charset="utf-8"><!-- html5 version of http-equiv="Content-Type"... -->
<meta name="description" content="View the planets of the solar sytem in virtual reality and 360 degrees.">
<meta name="keywords" content="Pl... | Add meta tags to head | Add meta tags to head
| HTML | mit | as95/the-planets,as95/the-planets | html | ## Code Before:
<!DOCTYPE html>
<head>
</head>
<body>
</body>
</html>
## Instruction:
Add meta tags to head
## Code After:
<!DOCTYPE html>
<head>
<!-- REQUIRED META TAGS -->
<title>The Planets</title>
<meta charset="utf-8"><!-- html5 version of http-equiv="Content-Type"... -->
<m... |
f1a872a5937ddc6f211bff05dbf1acc396add4d1 | spec/version_spec.rb | spec/version_spec.rb | require 'spec_helper'
describe 'Launchy::VERSION' do
it "should have a #.#.# format" do
Launchy::VERSION.must_match( /\d+\.\d+\.\d+/ )
Launchy::Version.to_a.each do |n|
n.to_i.must_be :>=, 0
end
end
end
| require 'spec_helper'
describe 'Launchy::VERSION' do
it "should have a #.#.# format" do
Launchy::VERSION.must_match( /\d+\.\d+\.\d+/ )
Launchy::Version.to_s.must_match( /\d+\.\d+\.\d+/ )
Launchy::Version.to_a.each do |n|
n.to_i.must_be :>=, 0
end
end
end
| Add test coverage for Version. | Add test coverage for Version. | Ruby | isc | kapil-utexas/launchy,wstephenson/launchy,mecampbellsoup/launchy,copiousfreetime/launchy | ruby | ## Code Before:
require 'spec_helper'
describe 'Launchy::VERSION' do
it "should have a #.#.# format" do
Launchy::VERSION.must_match( /\d+\.\d+\.\d+/ )
Launchy::Version.to_a.each do |n|
n.to_i.must_be :>=, 0
end
end
end
## Instruction:
Add test coverage for Version.
## Code After:
require 'spec_h... |
eaf96be49a0c4d9e9952252fb580226f68c96450 | package.json | package.json | {
"name": "wstunnel",
"version": "1.2.1",
"description": "tcp tunnel over websocket",
"main": "./lib/wst.js",
"scripts": {
"test": "nodeunit test/test.js",
"testssh": "nodeunit test/testssh.js",
"decaffeinate" : "decaffeinate --keep-commonjs --prefer-const **/*.coffee"
},
"repository": "https:... | {
"name": "wstunnel",
"version": "1.2.2",
"description": "tunnel over websocket",
"main": "./lib/wst.js",
"scripts": {
"test": "nodeunit test/test.js",
"testssh": "nodeunit test/testssh.js",
"decaffeinate" : "decaffeinate --keep-commonjs --prefer-const **/*.coffee"
},
"repository": "https://gi... | Remove node engine version restriction | Remove node engine version restriction
| JSON | mit | mhzed/wstunnel,takuya-o/wstunnel | json | ## Code Before:
{
"name": "wstunnel",
"version": "1.2.1",
"description": "tcp tunnel over websocket",
"main": "./lib/wst.js",
"scripts": {
"test": "nodeunit test/test.js",
"testssh": "nodeunit test/testssh.js",
"decaffeinate" : "decaffeinate --keep-commonjs --prefer-const **/*.coffee"
},
"repo... |
d554a4b56416cd7b114882d125dfa81b0ebd8d69 | docs/requirements.rtd.txt | docs/requirements.rtd.txt | advancedhttpserver>=1.2.0
alembic>=0.8.5
boltons>=16.1.1
dnspython>=1.12.0
geoip2>=2.2.0
geojson>=1.3.2
icalendar>=3.9.2
ipaddress>=1.0.16
Jinja2>=2.8
markupsafe>=0.23
msgpack-python>=0.4.7
paramiko>=1.16.0
pyotp>=2.0.1
python-dateutil>=2.5.1
python-pam>=1.8.2
pytz>=2016.1
PyYAML>=3.11
requests>=2.9.1
six>=1.10.0
smoke... | advancedhttpserver>=1.2.0
alembic>=0.8.5
boltons>=16.1.1
dnspython>=1.12.0
geoip2>=2.2.0
geojson>=1.3.2
icalendar>=3.9.2
ipaddress>=1.0.16
Jinja2>=2.8
markupsafe>=0.23
msgpack-python>=0.4.7
paramiko>=1.16.0
pluginbase>=0.3
pyotp>=2.0.1
python-dateutil>=2.5.1
python-pam>=1.8.2
pytz>=2016.1
PyYAML>=3.11
requests>=2.9.1
s... | Add pluginbase to the RTD requirements file | Add pluginbase to the RTD requirements file
| Text | bsd-3-clause | securestate/king-phisher,hdemeyer/king-phisher,zeroSteiner/king-phisher,wolfthefallen/king-phisher,securestate/king-phisher,securestate/king-phisher,zeroSteiner/king-phisher,zeroSteiner/king-phisher,zeroSteiner/king-phisher,wolfthefallen/king-phisher,securestate/king-phisher,guitarmanj/king-phisher,securestate/king-phi... | text | ## Code Before:
advancedhttpserver>=1.2.0
alembic>=0.8.5
boltons>=16.1.1
dnspython>=1.12.0
geoip2>=2.2.0
geojson>=1.3.2
icalendar>=3.9.2
ipaddress>=1.0.16
Jinja2>=2.8
markupsafe>=0.23
msgpack-python>=0.4.7
paramiko>=1.16.0
pyotp>=2.0.1
python-dateutil>=2.5.1
python-pam>=1.8.2
pytz>=2016.1
PyYAML>=3.11
requests>=2.9.1
s... |
686d82dc92be619255669c99ad2d67eb3f8850b0 | src/math/p_sinh.c | src/math/p_sinh.c |
/*
* sinh z = (exp z - exp(-z)) / 2
*/
static inline float _p_sinh(const float z)
{
float exp_z;
p_exp_f32(&z, &exp_z, 1);
return 0.5f * (exp_z - 1.f / exp_z);
}
/**
*
* Calculates the hyperbolic sine of the vector 'a'. Angles are specified
* in radians.
*
* @param a Pointer to input vector
*
... |
/*
* sinh z = (exp z - exp(-z)) / 2
*/
static inline float _p_sinh(const float z)
{
float exp_z = _p_exp(z);
return 0.5f * (exp_z - 1.f / exp_z);
}
/**
*
* Calculates the hyperbolic sine of the vector 'a'. Angles are specified
* in radians.
*
* @param a Pointer to input vector
*
* @param c Po... | Use the inline exponential function. | math:sinh: Use the inline exponential function.
Signed-off-by: Mansour Moufid <ac5f6b12fab5e0d4efa7215e6c2dac9d55ab77dc@gmail.com>
| C | apache-2.0 | debug-de-su-ka/pal,mateunho/pal,Adamszk/pal3,olajep/pal,Adamszk/pal3,eliteraspberries/pal,aolofsson/pal,8l/pal,parallella/pal,eliteraspberries/pal,8l/pal,aolofsson/pal,aolofsson/pal,8l/pal,Adamszk/pal3,parallella/pal,aolofsson/pal,Adamszk/pal3,mateunho/pal,olajep/pal,olajep/pal,debug-de-su-ka/pal,olajep/pal,debug-de-su... | c | ## Code Before:
/*
* sinh z = (exp z - exp(-z)) / 2
*/
static inline float _p_sinh(const float z)
{
float exp_z;
p_exp_f32(&z, &exp_z, 1);
return 0.5f * (exp_z - 1.f / exp_z);
}
/**
*
* Calculates the hyperbolic sine of the vector 'a'. Angles are specified
* in radians.
*
* @param a Pointer to ... |
51f9644c76bfcde0072fe24848f85d30487e1b27 | package.json | package.json | {
"name": "interspan-server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build":"node build-client.ts",
"start": "node ./dist/index.js",
"client": "node start-client.ts"
},
"engines": {
"node": ">=4.3.... | {
"name": "interspan-server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build":"node build-client.ts && tsc src/index --outDir dist --lib es2015",
"start": "node ./dist/index.js",
"client": "node start-client... | Write script to built server code from command shell | Write script to built server code from command shell
| JSON | mit | TYLANDER/interspan,TYLANDER/interspan | json | ## Code Before:
{
"name": "interspan-server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build":"node build-client.ts",
"start": "node ./dist/index.js",
"client": "node start-client.ts"
},
"engines": {
... |
fbbc42fd0c023f6f5f603f9dfcc961d87ca6d645 | zou/app/blueprints/crud/custom_action.py | zou/app/blueprints/crud/custom_action.py | from zou.app.models.custom_action import CustomAction
from .base import BaseModelsResource, BaseModelResource
class CustomActionsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, CustomAction)
class CustomActionResource(BaseModelResource):
def __init__(self):
... | from zou.app.models.custom_action import CustomAction
from .base import BaseModelsResource, BaseModelResource
class CustomActionsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, CustomAction)
def check_permissions(self):
return True
class CustomActionRes... | Allow anyone to read custom actions | Allow anyone to read custom actions
| Python | agpl-3.0 | cgwire/zou | python | ## Code Before:
from zou.app.models.custom_action import CustomAction
from .base import BaseModelsResource, BaseModelResource
class CustomActionsResource(BaseModelsResource):
def __init__(self):
BaseModelsResource.__init__(self, CustomAction)
class CustomActionResource(BaseModelResource):
def __i... |
1426f4b72b9db8687dedc8182c13ba8fe050e9eb | pkgs/os-specific/linux/dmidecode/default.nix | pkgs/os-specific/linux/dmidecode/default.nix | { stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "dmidecode-2.11";
src = fetchurl {
url = "mirror://savannah/dmidecode/${name}.tar.bz2";
sha256 = "0l9v8985piykc98hmbg1cq5r4xwvp0jjl4li3avr3ddkg4s699bd";
};
makeFlags = "prefix=$(out)";
meta = {
homepage = http://www.nongnu.org/dmidecode/;
... | { stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "dmidecode-2.12";
src = fetchurl {
url = "mirror://savannah/dmidecode/${name}.tar.bz2";
sha256 = "122hgaw8mpqdfra159lfl6pyk3837giqx6vq42j64fjnbl2z6gwi";
};
makeFlags = "prefix=$(out)";
meta = {
homepage = http://www.nongnu.org/dmidecode/;
... | Upgrade dmidecode from 2.11 -> 2.12 | Upgrade dmidecode from 2.11 -> 2.12
| Nix | mit | NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,SymbiFlow/nixpkgs,triton/triton,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,SymbiFlow/nixpkgs,NixOS/nixpkgs,triton/triton,SymbiFlow/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,triton/triton,triton/triton,NixOS/nixpkg... | nix | ## Code Before:
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "dmidecode-2.11";
src = fetchurl {
url = "mirror://savannah/dmidecode/${name}.tar.bz2";
sha256 = "0l9v8985piykc98hmbg1cq5r4xwvp0jjl4li3avr3ddkg4s699bd";
};
makeFlags = "prefix=$(out)";
meta = {
homepage = http://www.nongnu.... |
7c70a75d264e561e3661b74674084fc6a1ffcc8b | stackdio/stackdio/management/saltdirs/core_states/core/stackdio_user.sls | stackdio/stackdio/management/saltdirs/core_states/core/stackdio_user.sls | {% set username=salt['pillar.get']('__stackdio__:username') %}
{% set publickey=salt['pillar.get']('__stackdio__:publickey') %}
{% if username and publickey %}
# Create the group
stackdio_group:
group.present:
- name: {{ username }}
- gid: 4000
# Create the user
stackdio_user:
user.present:
- name: {... | {% set username=salt['pillar.get']('__stackdio__:username') %}
{% set publickey=salt['pillar.get']('__stackdio__:publickey') %}
{% if username and publickey %}
# Create the group
stackdio_group:
group.present:
- name: {{ username }}
- gid: 4000
# Create the user
stackdio_user:
user.present:
- name: {... | Create sudoer file without dots | Create sudoer file without dots
| SaltStack | apache-2.0 | clarkperkins/stackdio,stackdio/stackdio,clarkperkins/stackdio,stackdio/stackdio,stackdio/stackdio,clarkperkins/stackdio,clarkperkins/stackdio,stackdio/stackdio | saltstack | ## Code Before:
{% set username=salt['pillar.get']('__stackdio__:username') %}
{% set publickey=salt['pillar.get']('__stackdio__:publickey') %}
{% if username and publickey %}
# Create the group
stackdio_group:
group.present:
- name: {{ username }}
- gid: 4000
# Create the user
stackdio_user:
user.presen... |
8eb0c2b536f932d6ef0fc0cd06dea33d3b5084cb | app/views/maps/index.html.erb | app/views/maps/index.html.erb | <p id="demo">Click the button to get your position.</p>
<button onclick="getLocation()">Try It</button>
<div id="mapholder"></div>
<div id="googleMap" style="width:500px;height:380px;"></div>
| <div id="googleMap" style="width:1024px;height:640px;"></div>
| Update map size in index | Update map size in index
| HTML+ERB | mit | nyc-mud-turtles-2015/Soap-Stone,nyc-mud-turtles-2015/Soap-Stone,nyc-mud-turtles-2015/Soap-Stone | html+erb | ## Code Before:
<p id="demo">Click the button to get your position.</p>
<button onclick="getLocation()">Try It</button>
<div id="mapholder"></div>
<div id="googleMap" style="width:500px;height:380px;"></div>
## Instruction:
Update map size in index
## Code After:
<div id="googleMap" style="width:1024px;height:640px... |
ce0db6a4aae09ced84479d273c4711318cc7e2f9 | libs/xcb_nvidia/CMakeLists.txt | libs/xcb_nvidia/CMakeLists.txt | include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXGL_PROTOTYPES")
add_library(xcb_nvidia STATIC xcb_nvidia.cpp)
target_link_libraries(xcb_nvidia)
| include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES -D_CRT_SECURE_NO_WARNINGS")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXGL_PROTOTYPES -D_CRT_SECURE_NO_WARNINGS")
add_library(xcb_nvidia STATIC xcb_nvidia.cpp)
target_link_libraries(x... | Remove compiler warnings with xcb_nvidia. | Win/xcb_nvidia: Remove compiler warnings with xcb_nvidia.
| Text | apache-2.0 | KhronosGroup/Vulkan-LoaderAndValidationLayers,sashinde/VulkanTools,critsec/Vulkan-LoaderAndValidationLayers,Radamanthe/VulkanSamples,elongbug/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers,KhronosGroup/Vulkan-LoaderAndValidationLayers,sashinde/VulkanTools,critsec/Vulkan-LoaderAndValidati... | text | ## Code Before:
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DXGL_PROTOTYPES")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DXGL_PROTOTYPES")
add_library(xcb_nvidia STATIC xcb_nvidia.cpp)
target_link_libraries(xcb_nvidia)
## Instruction:
Win/xcb_... |
0d170a8afc2a73fa37597a276fc7624d454983c6 | etc/config/zig.amazon.properties | etc/config/zig.amazon.properties | compilers=&zig
defaultCompiler=trunk
group.zig.compilers=trunk
group.zig.objdumper=/opt/compiler-explorer/gcc-8.1.0/bin/objdump
group.zig.isSemVer=true
group.zig.baseName=zig
compiler.trunk.exe=/opt/compiler-explorer/zig-master/zig
compiler.trunk.semver=trunk
#################################
#######################... | compilers=&zig
defaultCompiler=z030
group.zig.compilers=trunk:z020:z030
group.zig.objdumper=/opt/compiler-explorer/gcc-8.1.0/bin/objdump
group.zig.isSemVer=true
group.zig.baseName=zig
compiler.trunk.exe=/opt/compiler-explorer/zig-master/zig
compiler.trunk.semver=trunk
compiler.z020.exe=/opt/compiler-explorer/zig-0.2.... | Add zig 0.2.0 and 0.3.0 compiler | Add zig 0.2.0 and 0.3.0 compiler
| INI | bsd-2-clause | mattgodbolt/compiler-explorer,dkm/gcc-explorer,dkm/gcc-explorer,mattgodbolt/compiler-explorer,mattgodbolt/compiler-explorer,mattgodbolt/compiler-explorer,dkm/gcc-explorer,mattgodbolt/gcc-explorer,mattgodbolt/compiler-explorer,mattgodbolt/compiler-explorer,mattgodbolt/gcc-explorer,mattgodbolt/compiler-explorer,dkm/gcc-e... | ini | ## Code Before:
compilers=&zig
defaultCompiler=trunk
group.zig.compilers=trunk
group.zig.objdumper=/opt/compiler-explorer/gcc-8.1.0/bin/objdump
group.zig.isSemVer=true
group.zig.baseName=zig
compiler.trunk.exe=/opt/compiler-explorer/zig-master/zig
compiler.trunk.semver=trunk
#################################
#######... |
aaac1ae0667dabe6fd038c9f5a42c157b9457ef1 | tests/test_parse.py | tests/test_parse.py | from hypothesis_auto import auto_pytest_magic
from isort import parse
from isort.settings import default
TEST_CONTENTS = """
import xyz
import abc
def function():
pass
"""
def test_file_contents():
(
in_lines,
out_lines,
import_index,
place_imports,
import_placement... | from hypothesis_auto import auto_pytest_magic
from isort import parse
from isort.settings import Config
TEST_CONTENTS = """
import xyz
import abc
def function():
pass
"""
def test_file_contents():
(
in_lines,
out_lines,
import_index,
place_imports,
import_placements... | Fix use of default config to match new refactor | Fix use of default config to match new refactor
| Python | mit | PyCQA/isort,PyCQA/isort | python | ## Code Before:
from hypothesis_auto import auto_pytest_magic
from isort import parse
from isort.settings import default
TEST_CONTENTS = """
import xyz
import abc
def function():
pass
"""
def test_file_contents():
(
in_lines,
out_lines,
import_index,
place_imports,
... |
aa34d647542b6a7a4e4f4d15f32776cb7f975eb1 | lib/laravel/download.js | lib/laravel/download.js | (function(exports) {
"use strict";
var request = require('request');
var Sink = require('pipette').Sink;
var unzipper = require('../process-zip');
var fs = require('fs');
exports.downloadLaravel = function(grunt, init, done) {
unzipper.processZip(request('https://github.com/laravel/laravel/archive/mast... | (function(exports) {
"use strict";
var request = require('request');
var Sink = require('pipette').Sink;
var unzipper = require('../process-zip');
var fs = require('fs');
exports.downloadLaravel = function(grunt, init, done) {
unzipper.processZip(request('https://github.com/laravel/laravel/archive/mast... | Update Laravel .htaccess to fix redirect loop on DirectoryIndex pages such as /tests/ | Update Laravel .htaccess to fix redirect loop on DirectoryIndex pages such as /tests/
| JavaScript | mit | TheMonkeys/monkeybones,TheMonkeys/monkeybones,TheMonkeys/monkeybones | javascript | ## Code Before:
(function(exports) {
"use strict";
var request = require('request');
var Sink = require('pipette').Sink;
var unzipper = require('../process-zip');
var fs = require('fs');
exports.downloadLaravel = function(grunt, init, done) {
unzipper.processZip(request('https://github.com/laravel/lara... |
342e76e4791f6c194f745972b7d84cb908522573 | index.js | index.js | 'use strict';
const fs = require('fs');
const WebClient = require('@slack/client').WebClient;
const token = require('./config.js').apiToken;
const message = process.argv[2];
const web = new WebClient(token);
web.chat.postMessage('deployment', message, {as_user: true}, function (err, res) {
if (err) {
const f... | 'use strict';
const fs = require('fs');
const WebClient = require('@slack/client').WebClient;
const token = require('./config.js').apiToken;
let message, channel;
if (process.argv.length === 3) {
// Only a message was passed so we use default channel
channel = "deployment"
message = process.argv[2];
} else if... | Add functionality to post to custom channels | Add functionality to post to custom channels
| JavaScript | mit | thegazelle-ad/slack-deployment-bot | javascript | ## Code Before:
'use strict';
const fs = require('fs');
const WebClient = require('@slack/client').WebClient;
const token = require('./config.js').apiToken;
const message = process.argv[2];
const web = new WebClient(token);
web.chat.postMessage('deployment', message, {as_user: true}, function (err, res) {
if (er... |
b8d6d58c235f25f47dd08ec1ac742554e90b7652 | spec/controllers/api/league_requests_controller_spec.rb | spec/controllers/api/league_requests_controller_spec.rb |
require 'spec_helper'
describe Api::LeagueRequestsController do
render_views
before do
@user = create :user
@user.groups << Group.league_admin_group
@suspect_uid = 'suspect_uid'
@suspect_ip = '127.0.0.2'
@reservation_player = create(:reservation_player, steam_uid: @suspect_uid, ip: @suspect_i... |
require 'spec_helper'
describe Api::LeagueRequestsController do
render_views
before do
@user = create :user
@user.groups << Group.league_admin_group
@suspect_uid = 'suspect_uid'
@suspect_ip = '127.0.0.2'
@reservation_player = create(:reservation_player, steam_uid: @suspect_uid, ip: @suspect_i... | Add spec for league requests API | Add spec for league requests API
| Ruby | apache-2.0 | Arie/serveme,Arie/serveme,Arie/serveme,Arie/serveme | ruby | ## Code Before:
require 'spec_helper'
describe Api::LeagueRequestsController do
render_views
before do
@user = create :user
@user.groups << Group.league_admin_group
@suspect_uid = 'suspect_uid'
@suspect_ip = '127.0.0.2'
@reservation_player = create(:reservation_player, steam_uid: @suspect_uid... |
09a0360ad980e4108d753f94fd3e43c6293ea18d | .rubocop.yml | .rubocop.yml | Metrics/AbcSize:
Enabled: false
Metrics/BlockNesting:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ParameterLists:
Enabled: false... | Metrics/AbcSize:
Enabled: false
Metrics/BlockNesting:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ParameterLists:
Enabled: false... | Make RuboCop ignore numeric literals in examples | Make RuboCop ignore numeric literals in examples
| YAML | mit | Roughsketch/discordrb,megumisonoda/discordrb,Roughsketch/discordrb,meew0/discordrb,megumisonoda/discordrb,VxJasonxV/discordrb,VxJasonxV/discordrb,meew0/discordrb | yaml | ## Code Before:
Metrics/AbcSize:
Enabled: false
Metrics/BlockNesting:
Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/ModuleLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/LineLength:
Enabled: false
Metrics/MethodLength:
Enabled: false
Metrics/ParameterLists:
... |
08e5fdfa744071270523d9f23129255555fcbeea | data-model/src/main/java/org/pdxfinder/dao/PatientSnapshot.java | data-model/src/main/java/org/pdxfinder/dao/PatientSnapshot.java | package org.pdxfinder.dao;
import java.util.HashSet;
import org.neo4j.ogm.annotation.GraphId;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;
import java.util.Set;
/**
* Created by jmason on 16/03/2017.
*/
@NodeEntity
public class PatientSnapshot {
@GraphId
Long i... | package org.pdxfinder.dao;
import java.util.HashSet;
import org.neo4j.ogm.annotation.GraphId;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;
import java.util.Set;
/**
* Created by jmason on 16/03/2017.
*/
@NodeEntity
public class PatientSnapshot {
@GraphId
Long i... | Add getter and setter for Patient attribute | Add getter and setter for Patient attribute
| Java | apache-2.0 | PDXFinder/pdxfinder,PDXFinder/pdxfinder,PDXFinder/pdxfinder,PDXFinder/pdxfinder | java | ## Code Before:
package org.pdxfinder.dao;
import java.util.HashSet;
import org.neo4j.ogm.annotation.GraphId;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Relationship;
import java.util.Set;
/**
* Created by jmason on 16/03/2017.
*/
@NodeEntity
public class PatientSnapshot {
@Gr... |
b6a5d402ec675eb08b8f42ccc8d77ca7a73a64bc | lib/xeroid/objects/payment.rb | lib/xeroid/objects/payment.rb | module Xeroid
module Objects
class Payment
attr_reader :invoice, :account, :amount, :date, :currency_rate
def initialize(attributes)
@invoice = attributes[:invoice]
@account = attributes[:account]
@amount = attributes[:amount]
@date = attributes[:date]
@currenc... | require 'xeroid/objects/attributes'
module Xeroid
module Objects
class Payment
include Attributes
attribute :invoice, :account, :date
big_decimal :amount, :currency_rate
end
end
end
| Bring Payment object up to date | Bring Payment object up to date
| Ruby | mit | fidothe/xeroid | ruby | ## Code Before:
module Xeroid
module Objects
class Payment
attr_reader :invoice, :account, :amount, :date, :currency_rate
def initialize(attributes)
@invoice = attributes[:invoice]
@account = attributes[:account]
@amount = attributes[:amount]
@date = attributes[:date]
... |
3a78bba6e50425793a6634f1bcd48c174844193f | .screenlayout/ziyal/land.sh | .screenlayout/ziyal/land.sh | xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --off --output DP1-3 --off --output DP1-2 --mode 1920x1080 --pos 3840x0 --rotate normal --output DP1-1 --mode 1920x1080 --pos 1920x0 --rotate normal --output DP2 --off... | xrandr \
--output VIRTUAL1 --off \
--output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal \
--output DP1 --off \
--output HDMI2 --off \
--output HDMI1 --off \
--output DP1-3 --off \
--output DP1-2 --crtc 1 --mode 1920x1080 --pos 3840x0 --rotate normal \
--output DP1-1 --crtc ... | Include --crtc values in ziyal xrandr commands | Include --crtc values in ziyal xrandr commands
| Shell | bsd-3-clause | kneitinger/dotfiles,kneitinger/dotfiles,kneitinger/dotfiles | shell | ## Code Before:
xrandr --output VIRTUAL1 --off --output eDP1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP1 --off --output HDMI2 --off --output HDMI1 --off --output DP1-3 --off --output DP1-2 --mode 1920x1080 --pos 3840x0 --rotate normal --output DP1-1 --mode 1920x1080 --pos 1920x0 --rotate normal --... |
178b424e81d4853548e73853616dfe717f277560 | example/nodejs/README.md | example/nodejs/README.md | Client code examples demonstrating usage of aws-mock with AWS-SDK in JavaScript.
To run the examples, you must have aws-sdk installed by running `npm install -g aws-sdk`.
Import note: Endpoint for mock ec2 should be running on "/" (root context) as Amazon's node.js aws-sdk doesn't support endpoint in a directory (wh... | Client code examples demonstrating usage of aws-mock with AWS-SDK in JavaScript.
## Installation ##
1. Install aws-sdk by running `npm install -g aws-sdk`.
2. In your web server such as Nginx or Apache, add a reverse proxy route for actual backend endpoint url `http://localhost:8000/aws-mock/ec2-endpoint/` to a root d... | Improve explanation for proxying endpoint to root context for node.js | Improve explanation for proxying endpoint to root context for node.js
| Markdown | mit | treelogic-swe/aws-mock,treelogic-swe/aws-mock,yxd-hde/aws-mock,yxd-hde/aws-mock,Davinder2me/aws-mock,Davinder2me/aws-mock,dadoonet/aws-mock,dadoonet/aws-mock,dadoonet/aws-mock,treelogic-swe/aws-mock,Davinder2me/aws-mock,yxd-hde/aws-mock,Davinder2me/aws-mock,treelogic-swe/aws-mock,dadoonet/aws-mock,yxd-hde/aws-mock | markdown | ## Code Before:
Client code examples demonstrating usage of aws-mock with AWS-SDK in JavaScript.
To run the examples, you must have aws-sdk installed by running `npm install -g aws-sdk`.
Import note: Endpoint for mock ec2 should be running on "/" (root context) as Amazon's node.js aws-sdk doesn't support endpoint in... |
8d21dcec826b00882839b88a4bf4b164f7179e01 | tests/PerFiUnitTest/Domain/Transaction/CommandHandler/ExecuteTransactionTest.php | tests/PerFiUnitTest/Domain/Transaction/CommandHandler/ExecuteTransactionTest.php | <?php
declare(strict_types=1);
namespace PerFiUnitTest\Domain\Transaction\CommandHandler;
use PHPUnit\Framework\TestCase;
class ExecuteTransactionTest extends TestCase
{
/**
* @test
*/
public function when_invoked_adds_transaction_to_repository()
{
self::markTestIncomplete();
}
... | <?php
declare(strict_types=1);
namespace PerFiUnitTest\Domain\Transaction\CommandHandler;
use Mockery as m;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
use PHPUnit\Framework\TestCase;
use PerFi\Application\Transaction\InMemoryTransactionRepository;
use PerFi\Domain\Account\Account;
use PerFi\Domain\Command... | Test the transaction execution command handler | Test the transaction execution command handler
| PHP | mit | robertbasic/perfi,robertbasic/perfi | php | ## Code Before:
<?php
declare(strict_types=1);
namespace PerFiUnitTest\Domain\Transaction\CommandHandler;
use PHPUnit\Framework\TestCase;
class ExecuteTransactionTest extends TestCase
{
/**
* @test
*/
public function when_invoked_adds_transaction_to_repository()
{
self::markTestIncomple... |
c642f8b8474728d5926de4d722ccb3521d0774ca | scripting/src/index.js | scripting/src/index.js |
// Index page module.
module.exports = function(utils, $, _) {
console.log('index page module loaded');
}
|
// Index page module.
module.exports = function(utils, $, _) {
window.$ = $; window.jQuery = $;
console.log('jQuery added as window.$ for development');
}
| Make jQuery available outside webapp sandbox. | Make jQuery available outside webapp sandbox.
| JavaScript | agpl-3.0 | CamiloMM/Noumena,CamiloMM/Noumena,CamiloMM/Noumena | javascript | ## Code Before:
// Index page module.
module.exports = function(utils, $, _) {
console.log('index page module loaded');
}
## Instruction:
Make jQuery available outside webapp sandbox.
## Code After:
// Index page module.
module.exports = function(utils, $, _) {
window.$ = $; window.jQuery = $;
console.l... |
8e8e93843882468d1d1f832829049dd23b05d7f1 | lib/rbplusplus/builders/const.rb | lib/rbplusplus/builders/const.rb | module RbPlusPlus
module Builders
# Expose a const value
class ConstNode < Base
def build
add_child IncludeNode.new(self, code.file)
end
def write
prefix = parent.rice_variable ? "#{parent.rice_variable}." : "Rice::Module(rb_mKernel)."
registrations << "#{prefix}co... | module RbPlusPlus
module Builders
# Expose a const value
class ConstNode < Base
def build
add_child IncludeNode.new(self, code.file)
end
def write
# If this constant is initialized in the header, we need to set the constant to the initialized value
# If we just use... | Work around a compiler issue with g++ on Linux | Work around a compiler issue with g++ on Linux
| Ruby | mit | jasonroelofs/rbplusplus,jasonroelofs/rbplusplus,jasonroelofs/rbplusplus,jasonroelofs/rbplusplus | ruby | ## Code Before:
module RbPlusPlus
module Builders
# Expose a const value
class ConstNode < Base
def build
add_child IncludeNode.new(self, code.file)
end
def write
prefix = parent.rice_variable ? "#{parent.rice_variable}." : "Rice::Module(rb_mKernel)."
registrations... |
3d6185f8080906fbb19314bca634071be506292b | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='pycalico',
# Don't need a version until we publish to PIP or other forum.
# version='0.0.0',
description='A Python API to Calico',
# The project's main homepage.
url='https://github.com/projectcalico/libcalico/',
# Author details
... | from setuptools import setup, find_packages
setup(
name='pycalico',
# Don't need a version until we publish to PIP or other forum.
# version='0.0.0',
description='A Python API to Calico',
# The project's main homepage.
url='https://github.com/projectcalico/libcalico/',
# Author details
... | Add subprocess32 as package dependency | Add subprocess32 as package dependency | Python | apache-2.0 | L-MA/libcalico,alexhersh/libcalico,TrimBiggs/libcalico,projectcalico/libcalico,insequent/libcalico,tomdee/libcalico,djosborne/libcalico,caseydavenport/libcalico,plwhite/libcalico,Symmetric/libcalico | python | ## Code Before:
from setuptools import setup, find_packages
setup(
name='pycalico',
# Don't need a version until we publish to PIP or other forum.
# version='0.0.0',
description='A Python API to Calico',
# The project's main homepage.
url='https://github.com/projectcalico/libcalico/',
#... |
c4ce23e1ed48c0099bb6d0c277815cb328f45ba0 | topics/templates/includes/link.html | topics/templates/includes/link.html | <div class="link_block">
<img class="icon" src="{{ link.icon }}"/>
<a class="link_url" href="{{ link.link }}">
{{ link.title }}
</a>
{% if user.is_authenticated %}
<form action="" method="post" class="link-tag">
{% csrf_token %}
<input type="hidden" name="link_tag... | <div class="link_block">
<img class="icon" src="{{ link.icon }}"/>
<a class="link_url" href="{{ link.link }}">
{{ link.title }}
</a>
{% if user.is_authenticated %}
<form action="" method="post" class="link-tag">
{% csrf_token %}
<input type="hidden" name="link_tag... | Trim tags and use non-breaking spaces | Trim tags and use non-breaking spaces
| HTML | mit | andychase/codebook,andychase/codebook | html | ## Code Before:
<div class="link_block">
<img class="icon" src="{{ link.icon }}"/>
<a class="link_url" href="{{ link.link }}">
{{ link.title }}
</a>
{% if user.is_authenticated %}
<form action="" method="post" class="link-tag">
{% csrf_token %}
<input type="hidden... |
d58932961d33cab8d51436a5601f1ef80d82d108 | README.md | README.md | An iOS Network Traffic Counter, a Swift wrapper for ifaddrs
## Requirements
* iOS 8.0+
* Xcode 8.1+
* Swift 3.0.1+
## Support
* WiFi & WWAN Data
* current speed & total usage
## Examples
```swift
class ViewController: UIViewController, TrafficManagerDelegate {
override func viewDidLoad() {
super.... | An iOS Network Traffic Counter, a Swift wrapper for ifaddrs
## Requirements
* iOS 8.0+
* Xcode 8.1+
* Swift 3.0.1+
## Support
* WiFi & WWAN Data
* current speed & total usage
## Examples
```swift
class ViewController: UIViewController, TrafficManagerDelegate {
override func viewDidLoad() {
super.... | Add More information & fix mistake | Add More information & fix mistake
| Markdown | mit | anotheren/TrafficPolice,anotheren/TrafficPolice | markdown | ## Code Before:
An iOS Network Traffic Counter, a Swift wrapper for ifaddrs
## Requirements
* iOS 8.0+
* Xcode 8.1+
* Swift 3.0.1+
## Support
* WiFi & WWAN Data
* current speed & total usage
## Examples
```swift
class ViewController: UIViewController, TrafficManagerDelegate {
override func viewDidLoad() ... |
480eec749615962664d40bb6e7e2087dfbde7333 | spec/helper.rb | spec/helper.rb | require 'pathname'
require 'logger'
root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path = root_path.join('lib')
log_path = root_path.join('log')
moneta_path = root_path.join('vendor', 'moneta', 'lib')
log_path.mkpath
$:.unshift(lib_path, moneta_path)
require 'toy'
require 'spec'
require '... | require 'pathname'
require 'logger'
root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path = root_path.join('lib')
log_path = root_path.join('log')
moneta_path = root_path.join('vendor', 'moneta', 'lib')
log_path.mkpath
$:.unshift(lib_path, moneta_path)
require 'toy'
require 'spec'
require '... | Clear identity map before each spec. | Clear identity map before each spec. | Ruby | bsd-3-clause | jnunemaker/toystore | ruby | ## Code Before:
require 'pathname'
require 'logger'
root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path = root_path.join('lib')
log_path = root_path.join('log')
moneta_path = root_path.join('vendor', 'moneta', 'lib')
log_path.mkpath
$:.unshift(lib_path, moneta_path)
require 'toy'
require ... |
60ac59efe974d91a5ddebc19f9e14b5c8b51b0fe | requirements.txt | requirements.txt | enum34==1.1.6
pyuca==1.1.2
reportlab==3.3.0
xmltodict==0.10.1
| enum34==1.1.6
python-dateutil==2.5.3
pyuca==1.1.2
reportlab==3.3.0
xmltodict==0.10.1
| Add requirement for datetime parser | Add requirement for datetime parser
| Text | mit | bzaczynski/ogre | text | ## Code Before:
enum34==1.1.6
pyuca==1.1.2
reportlab==3.3.0
xmltodict==0.10.1
## Instruction:
Add requirement for datetime parser
## Code After:
enum34==1.1.6
python-dateutil==2.5.3
pyuca==1.1.2
reportlab==3.3.0
xmltodict==0.10.1
|
f59a1ee60743e13a80d6f09e48bc3bab11726c8e | spec/scientificNotationMapperSpec.js | spec/scientificNotationMapperSpec.js | var ScientificNotationMapper = require("../lib/mappers/ScientificNotationMapper");
describe("A Scientific Notation Mapper", function() {
it("has toDecimal and fromDecimal methods", function() {
var snm = new ScientificNotationMapper();
expect(typeof snm.toDecimal).toBe("function");
expect(typeof snm.fromDecim... | var ScientificNotationMapper = require("../lib/mappers/ScientificNotationMapper");
describe("A Scientific Notation Mapper", function() {
it("has toDecimal and fromDecimal methods", function() {
var snm = new ScientificNotationMapper();
expect(typeof snm.toDecimal).toBe("function");
expect(typeof snm.fromDecim... | Test conversion of fractional positive numbers to scientific notation | Test conversion of fractional positive numbers to scientific notation
| JavaScript | mit | brettmclean/number-converter,brettmclean/number-converter | javascript | ## Code Before:
var ScientificNotationMapper = require("../lib/mappers/ScientificNotationMapper");
describe("A Scientific Notation Mapper", function() {
it("has toDecimal and fromDecimal methods", function() {
var snm = new ScientificNotationMapper();
expect(typeof snm.toDecimal).toBe("function");
expect(type... |
12156ddce5ddf2a74645cf6837fcfb20e9f42344 | README.md | README.md | OMERO.web Virtual Microscope
============================
Virtual Microscope OMERO.web extension application
Requirements
============
* OMERO 5.6.0 or later
Installation
============
$ pip install omero-virtual-microscope
Add virtual-microscope custom app to your installed web apps:
$ bin/omero config ap... | OMERO.web Virtual Microscope
============================
Virtual Microscope OMERO.web extension application
Requirements
============
* OMERO 5.6.0 or later
Installation
============
$ pip install omero-virtual-microscope
Add virtual-microscope custom app to your installed web apps:
$ bin/omero config ap... | Revert "Provide values for "args" & "query_string" to login_redirect" | Revert "Provide values for "args" & "query_string" to login_redirect"
This reverts commit 39ca254ac59634f3018d921f678273db6d9bacc7
due to https://github.com/ome/openmicroscopy/pull/6061.
| Markdown | agpl-3.0 | openmicroscopy/virtual-microscope,openmicroscopy/virtual-microscope | markdown | ## Code Before:
OMERO.web Virtual Microscope
============================
Virtual Microscope OMERO.web extension application
Requirements
============
* OMERO 5.6.0 or later
Installation
============
$ pip install omero-virtual-microscope
Add virtual-microscope custom app to your installed web apps:
$ bin... |
ea82d61def4d3e9be56cc4a3c8f2b01c5ff4c3e1 | server/app.js | server/app.js | export default {};
var Twitter = require('twit-stream');
var keys =require('./authentication.js');
var stream = new Twitter(keys).stream('statuses/sample');
/// connection configuration for stream object to connect to API
stream.on('connected', function(msg) {
console.log('Connection successful.');
});
stream... | export default {};
var Twitter = require('twit-stream');
var keys =require('./authentication.js');
var stream = new Twitter(keys).stream('statuses/sample');
/// connection configuration for stream object to connect to API
stream.on('connected', function(msg) {
console.log('Connection successful.');
});
stream... | Add event return listeners for Twitter warning,limit and discnct | Add event return listeners for Twitter warning,limit and discnct
considering the amount of information you will be processing it
is more imperative for you to take into account and work on being
able to keep track of what twitters feedback is going to be. Thus
created a series of event listeners for message feedback f... | JavaScript | isc | edwardpark/d3withtwitterstream,edwardpark/d3withtwitterstream | javascript | ## Code Before:
export default {};
var Twitter = require('twit-stream');
var keys =require('./authentication.js');
var stream = new Twitter(keys).stream('statuses/sample');
/// connection configuration for stream object to connect to API
stream.on('connected', function(msg) {
console.log('Connection successful... |
1de801a7120e0e8a2c7614265880452a20a38a29 | test/Driver/clang-g-opts.c | test/Driver/clang-g-opts.c | // RUN: %clang -S -v -o %t %s 2>&1 | not grep -w -- -g
// RUN: %clang -S -v -o %t %s -g 2>&1 | grep -w -- -g
// RUN: %clang -S -v -o %t %s -g0 2>&1 | not grep -w -- -g
// RUN: %clang -S -v -o %t %s -g -g0 2>&1 | not grep -w -- -g
// RUN: %clang -S -v -o %t %s -g0 -g 2>&1 | grep -w -- -g
| // RUN: %clang -S -v -o %t %s 2>&1 | FileCheck %s
// CHECK-NOT: -g
// RUN: %clang -S -v -o %t %s -g 2>&1 | FileCheck %s
// CHECK: -g
// RUN: %clang -S -v -o %t %s -g0 2>&1 | FileCheck %s
// CHECK-NOT: -g
// RUN: %clang -S -v -o %t %s -g -g0 2>&1 | FileCheck %s
// CHECK-NOT: -g
// RUN: %clang -S -v -o ... | Move a non portable test to FileCheck, from Jonathan Gray! | Move a non portable test to FileCheck, from Jonathan Gray!
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@155874 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/cl... | c | ## Code Before:
// RUN: %clang -S -v -o %t %s 2>&1 | not grep -w -- -g
// RUN: %clang -S -v -o %t %s -g 2>&1 | grep -w -- -g
// RUN: %clang -S -v -o %t %s -g0 2>&1 | not grep -w -- -g
// RUN: %clang -S -v -o %t %s -g -g0 2>&1 | not grep -w -- -g
// RUN: %clang -S -v -o %t %s -g0 -g 2>&1 | grep -w -- -g
#... |
3437e530d9ed260d2b0a3aab495fe0d91c594ed4 | types/electron-store/electron-store-tests.ts | types/electron-store/electron-store-tests.ts | import ElectronStore = require('electron-store');
new ElectronStore({
defaults: {}
});
new ElectronStore({
name: 'myConfiguration',
cwd: 'unicorn'
});
const electronStore = new ElectronStore();
electronStore.set('foo', 'bar');
electronStore.set({
foo: 'bar',
foo2: 'bar2'
});
electronStore.delete('foo');
e... | import ElectronStore = require('electron-store');
new ElectronStore({
defaults: {}
});
new ElectronStore({
name: 'myConfiguration',
cwd: 'unicorn'
});
const electronStore = new ElectronStore();
electronStore.set('foo', 'bar');
electronStore.set({
foo: 'bar',
foo2: 'bar2'
});
electronStore.delete... | Add tests for typed store | Add tests for typed store
| TypeScript | mit | georgemarshall/DefinitelyTyped,arusakov/DefinitelyTyped,AgentME/DefinitelyTyped,magny/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/DefinitelyTyped,magny/DefinitelyTyped,borisyankov/DefinitelyTyped,chrootsu/DefinitelyTyped,one-pieces/DefinitelyTyped,rolandzwaga/DefinitelyTyped,markogresak/DefinitelyTyped,Ag... | typescript | ## Code Before:
import ElectronStore = require('electron-store');
new ElectronStore({
defaults: {}
});
new ElectronStore({
name: 'myConfiguration',
cwd: 'unicorn'
});
const electronStore = new ElectronStore();
electronStore.set('foo', 'bar');
electronStore.set({
foo: 'bar',
foo2: 'bar2'
});
electronStore.... |
67a3d8a5fb36dddc8fa0cf45cd218ace8acd5df6 | yum/defaults/main.yaml | yum/defaults/main.yaml | ---
#
# yum
#
v_yum_common_packages:
- bash-completion
- git
- lsof
- mailx
- net-tools
- nmap
- tmux
- tree
- vim
#
# yum-cron
#
v_yum_cron_update_cmd: "minimal"
v_yum_cron_update_cmd_hourly: "security"
v_yum_cron_update_messages: "yes"
v_yum_cron_download_updates: "yes"
v_yum_cron_apply_updates: "y... | ---
#
# yum
#
v_yum_common_packages:
- bash-completion
- bind-utils
- git
- lsof
- mailx
- net-tools
- nmap
- ruby
- rubygem-bundler
- tmux
- tree
- vim
- whois
#
# yum-cron
#
v_yum_cron_update_cmd: "minimal"
v_yum_cron_update_cmd_hourly: "security"
v_yum_cron_update_messages: "yes"
v_yum_cro... | Add extra commonly used utils. | Add extra commonly used utils.
| YAML | mit | craighurley/ansible-roles,craighurley/ansible-roles | yaml | ## Code Before:
---
#
# yum
#
v_yum_common_packages:
- bash-completion
- git
- lsof
- mailx
- net-tools
- nmap
- tmux
- tree
- vim
#
# yum-cron
#
v_yum_cron_update_cmd: "minimal"
v_yum_cron_update_cmd_hourly: "security"
v_yum_cron_update_messages: "yes"
v_yum_cron_download_updates: "yes"
v_yum_cron_a... |
85c8c5c630096aad070a7231c65e26998031e20d | Library/Homebrew/test/formula_test.rb | Library/Homebrew/test/formula_test.rb |
$:.push(File.expand_path(__FILE__+'/../..'))
require 'test/unit'
require 'global'
require 'formula'
require 'utils'
class WellKnownCodeIssues <Test::Unit::TestCase
def test_formula_names
# Formula names should be valid
nostdout do
Dir["#{HOMEBREW_PREFIX}/Library/Formula/*.rb"].each do |f|
ass... |
$:.push(File.expand_path(__FILE__+'/../..'))
require 'test/unit'
require 'global'
require 'formula'
require 'utils'
class WellKnownCodeIssues <Test::Unit::TestCase
def test_formula_names
# Formula names should be valid
nostdout do
Dir["#{HOMEBREW_PREFIX}/Library/Formula/*.rb"].each do |f|
ass... | Add formula check for crufy SourceForge URLs. | Add formula check for crufy SourceForge URLs.
| Ruby | bsd-2-clause | callahad/homebrew,bbhoss/homebrew,xb123456456/homebrew,tbeckham/homebrew,tomekr/homebrew,bukzor/homebrew,jcassiojr/homebrew,davydden/linuxbrew,jmtd/homebrew,romejoe/linuxbrew,erezny/homebrew,rosalsm/homebrew,tomyun/homebrew,cprecioso/homebrew,digiter/linuxbrew,shazow/homebrew,mobileoverlord/homebrew-1,thuai/boxen,robot... | ruby | ## Code Before:
$:.push(File.expand_path(__FILE__+'/../..'))
require 'test/unit'
require 'global'
require 'formula'
require 'utils'
class WellKnownCodeIssues <Test::Unit::TestCase
def test_formula_names
# Formula names should be valid
nostdout do
Dir["#{HOMEBREW_PREFIX}/Library/Formula/*.rb"].each do... |
d691798551ae3e894d683c5ea142ac1f6b64393b | lib/query_string_search/comparator.rb | lib/query_string_search/comparator.rb | module QueryStringSearch
module Comparator
def self.using(operator)
create_comparison
comparison.operator = operator
self
end
def self.does(subject)
create_comparison
comparison.subject = subject
self
end
def self.equal?(other)
comparison.operator = "="
... | module QueryStringSearch
module Comparator
def self.using(operator)
create_comparison
comparison.operator = operator
self
end
def self.does(subject)
create_comparison
comparison.subject = subject
self
end
def self.equal?(other)
comparison.operator = "="
... | Move from strings & eval to symbols and public_send | Move from strings & eval to symbols and public_send
Seems like an obvious change. This works, but it's obviously not in a
final state yet.
| Ruby | mit | umn-asr/query_string_search | ruby | ## Code Before:
module QueryStringSearch
module Comparator
def self.using(operator)
create_comparison
comparison.operator = operator
self
end
def self.does(subject)
create_comparison
comparison.subject = subject
self
end
def self.equal?(other)
comparison... |
17cbd84b9b5a4bd08123ff5f429be191b1bdf063 | polynomial.py | polynomial.py |
class Polynomial(object):
def __init__(self):
pass |
class Polynomial(object):
def __init__(self, coeffs):
"""
1 parameter:
coeff (list): coeff[n] = coefficient of nth degree term
"""
self.coeffs = coeffs
@property
def coeffs(self):
return self._coeffs
@property
def degree(self):
return len(... | Add __init__, coeffs and degree attributes | Add __init__, coeffs and degree attributes
| Python | mit | jackromo/mathLibPy | python | ## Code Before:
class Polynomial(object):
def __init__(self):
pass
## Instruction:
Add __init__, coeffs and degree attributes
## Code After:
class Polynomial(object):
def __init__(self, coeffs):
"""
1 parameter:
coeff (list): coeff[n] = coefficient of nth degree term
... |
b00876c7c5563839179364762053dfff7f74c124 | test/Permissions/Editor/Create/NotAvailable/FieldEditPermissionTest.php | test/Permissions/Editor/Create/NotAvailable/FieldEditPermissionTest.php | <?php namespace ProcessWire\GraphQL\Test\Permissions;
use ProcessWire\GraphQL\Test\GraphqlTestCase;
use ProcessWire\GraphQL\Utils;
use function ProcessWire\GraphQL\Test\Assert\assertTypePathNotExists;
class EditorCreateNotAvailableFieldEditPermissionTest extends GraphqlTestCase {
/**
* + For editor.
* + The... | <?php namespace ProcessWire\GraphQL\Test\Permissions;
use ProcessWire\GraphQL\Test\GraphqlTestCase;
use function ProcessWire\GraphQL\Test\Assert\assertTypePathNotExists;
class EditorCreateNotAvailableFieldEditPermissionTest extends GraphqlTestCase {
/**
* + For editor.
* + The template is legal.
* + The ... | Update test case create is not available because of field edit permission. | Update test case create is not available because of field edit permission.
| PHP | mit | dadish/ProcessGraphQL,dadish/ProcessGraphQL | php | ## Code Before:
<?php namespace ProcessWire\GraphQL\Test\Permissions;
use ProcessWire\GraphQL\Test\GraphqlTestCase;
use ProcessWire\GraphQL\Utils;
use function ProcessWire\GraphQL\Test\Assert\assertTypePathNotExists;
class EditorCreateNotAvailableFieldEditPermissionTest extends GraphqlTestCase {
/**
* + For ed... |
70fab2cf5426def9114bdd40727f4a72593df9e4 | src/core.js | src/core.js | (function(global) {
'use strict';
define([
], function() {
// $HEADER$
/**
* This will be the <code>warmsea</code> namespace.
* @namespace
* @alias warmsea
*/
var w = _.extend({}, _);
/**
* The unmodified underlying underscore object.
*/
w._ = w.underscore = _;
... | (function(global) {
'use strict';
define([
], function() {
// $HEADER$
/**
* This will be the <code>warmsea</code> namespace.
* @namespace
* @alias warmsea
*/
var w = _.extend({}, _);
/**
* The unmodified underlying underscore object.
*/
w._ = w.underscore = _;
... | Format support for w.error() if possible. | Format support for w.error() if possible.
| JavaScript | mit | warmsea/WarmseaJS | javascript | ## Code Before:
(function(global) {
'use strict';
define([
], function() {
// $HEADER$
/**
* This will be the <code>warmsea</code> namespace.
* @namespace
* @alias warmsea
*/
var w = _.extend({}, _);
/**
* The unmodified underlying underscore object.
*/
w._ = w.unde... |
8d62dc2f51ad817a42f65a8d5ea27fc7ddb89259 | ktlint-intellij-idea-integration/src/main/resources/config/codestyles/ktlint.xml | ktlint-intellij-idea-integration/src/main/resources/config/codestyles/ktlint.xml | <code_scheme name="ktlint">
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
</value>
</option>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
<option n... | <code_scheme name="ktlint">
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
</value>
</option>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" />
<option n... | Update intellij idea integration with no blank line before rbrace rule | Update intellij idea integration with no blank line before rbrace rule
| XML | mit | shyiko/ktlint,shyiko/ktlint,shyiko/ktlint,shyiko/ktlint | xml | ## Code Before:
<code_scheme name="ktlint">
<JetCodeStyleSettings>
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
<value>
<package name="kotlinx.android.synthetic" withSubpackages="true" static="false" />
</value>
</option>
<option name="NAME_COUNT_TO_USE_STAR_IMPORT" value="2147483647" ... |
7976bb55eae8435737cad2ce9058e670d1b1cbdf | lib/controllers/readingsController.js | lib/controllers/readingsController.js | 'use strict';
// Load modules
var Boom = require('boom');
var Joi = require('joi');
var Reading = require('../models/reading');
/**
* GET /readings
* Get readings
*
*/
exports.index = {
handler: function (request, reply) {
Reading.find(function (err, docs) {
if (err) {
return reply(Boom.badImp... | 'use strict';
// Load modules
var Boom = require('boom');
var Joi = require('joi');
var Reading = require('../models/reading');
/**
* GET /readings
* Get readings
*
*/
exports.index = {
handler: function (request, reply) {
Reading.find(function (err, docs) {
if (err) {
return reply(Boom.badImp... | Allow to create reading with specific time | Allow to create reading with specific time
| JavaScript | mit | intelliroads/intelliroads-api | javascript | ## Code Before:
'use strict';
// Load modules
var Boom = require('boom');
var Joi = require('joi');
var Reading = require('../models/reading');
/**
* GET /readings
* Get readings
*
*/
exports.index = {
handler: function (request, reply) {
Reading.find(function (err, docs) {
if (err) {
return r... |
cbbde0858f2ea91c0feab9c76213b0770c348dc7 | shell.nix | shell.nix | let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
poetry
rsync
];
shellHook = ''
export SOURCE_DATE_EPOCH=315532800
'';
}
| let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell {
buildInputs = with pkgs; [
libffi
nodejs
poetry
rsync
];
shellHook = ''
export SOURCE_DATE_EPOCH=315532800
'';
}
| Add libffi, needed for building keyring | Add libffi, needed for building keyring
| Nix | bsd-3-clause | ento/elm-doc,ento/elm-doc | nix | ## Code Before:
let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell {
buildInputs = with pkgs; [
nodejs
poetry
rsync
];
shellHook = ''
export SOURCE_DATE_EPOCH=315532800
'';
}
## Instruction:
Add libffi, needed for building keyring
## Code After:
let
pkgs = import <nixpkgs> {};
in
pkgs.mkShell... |
0ce5b267b7352870730607b6706850b9e547719e | Sources/App/Admin/Database/Preparations/v0/CreateProblemCase.swift | Sources/App/Admin/Database/Preparations/v0/CreateProblemCase.swift | import Foundation
import FluentProvider
extension ProblemCase: Preparation {
static func prepare(_ database: Database) throws {
try database.create(self) { builder in
builder.id()
builder.parent(Problem.self, optional: false)
builder.string("input")
buil... | import Foundation
import FluentProvider
extension ProblemCase: Preparation {
static func prepare(_ database: Database) throws {
try database.create(self) { builder in
builder.id()
builder.parent(Problem.self, optional: false)
builder.string("input", length: 2000)
... | Extend problem case input column to 2000 chars | Extend problem case input column to 2000 chars
| Swift | mit | antonyharfield/grader,antonyharfield/grader,antonyharfield/grader | swift | ## Code Before:
import Foundation
import FluentProvider
extension ProblemCase: Preparation {
static func prepare(_ database: Database) throws {
try database.create(self) { builder in
builder.id()
builder.parent(Problem.self, optional: false)
builder.string("input")
... |
2aacce141e11e2e30f566cad900c9fa1f4234d2b | tests/dummy/app/routes/nodes/detail/draft-registrations.js | tests/dummy/app/routes/nodes/detail/draft-registrations.js | import Ember from 'ember';
export default Ember.Route.extend({
model() {
let node = this.modelFor('nodes.detail');
return node.get('draftRegistrations');
}
});
| import Ember from 'ember';
export default Ember.Route.extend({
model() {
let node = this.modelFor('nodes.detail');
let drafts = node.get('draftRegistrations');
return Ember.RSVP.hash({
node: node,
drafts: drafts
});
},
});
| Make both node and draft model available in draft template. | Make both node and draft model available in draft template.
| JavaScript | apache-2.0 | crcresearch/ember-osf,CenterForOpenScience/ember-osf,pattisdr/ember-osf,hmoco/ember-osf,baylee-d/ember-osf,hmoco/ember-osf,jamescdavis/ember-osf,CenterForOpenScience/ember-osf,pattisdr/ember-osf,chrisseto/ember-osf,binoculars/ember-osf,binoculars/ember-osf,cwilli34/ember-osf,jamescdavis/ember-osf,crcresearch/ember-osf,... | javascript | ## Code Before:
import Ember from 'ember';
export default Ember.Route.extend({
model() {
let node = this.modelFor('nodes.detail');
return node.get('draftRegistrations');
}
});
## Instruction:
Make both node and draft model available in draft template.
## Code After:
import Ember from 'ember';... |
2faafebe66608521e193671d9979dd881a8449d4 | app/views/geckoboard_api/widgets/claims.jbuilder | app/views/geckoboard_api/widgets/claims.jbuilder | json.item do
json.array! [
{
value: @reporter.authorised_in_full,
text: 'Authorised'
},
{
value: @reporter.authorised_in_part,
text: 'Part authorised'
},
{
value: @reporter.rejected,
text: 'Rejected'
}
]
end
| json.item do
json.array! [
{
value: @reporter.rejected,
text: 'Rejected'
},
{
value: @reporter.authorised_in_part,
text: 'Part authorised'
},
{
value: @reporter.authorised_in_full,
text: 'Authorised'
}
]
end
| Change ordering for RAG widget | Change ordering for RAG widget
| Ruby | mit | ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments,ministryofjustice/advocate-defence-payments | ruby | ## Code Before:
json.item do
json.array! [
{
value: @reporter.authorised_in_full,
text: 'Authorised'
},
{
value: @reporter.authorised_in_part,
text: 'Part authorised'
},
{
value: @reporter.rejected,
text: 'Rejected'
}
]
end
## Instruction:
Change ordering... |
ac629272303ae1b8a8428c272d1aec2ab7b4b83f | lib/calendar.js | lib/calendar.js | var icalendar = require('icalendar');
var _ = require('underscore');
exports.generateIcal = function(currentUser, boards, params) {
var ical = new icalendar.iCalendar();
boards.each(function(board) {
board.cards().each(function(card) {
// no arm, no chocolate
if (!card.get('badg... | var icalendar = require('icalendar');
var _ = require('underscore');
exports.generateIcal = function(currentUser, boards, params) {
var ical = new icalendar.iCalendar();
boards.each(function(board) {
board.cards().each(function(card) {
// no arm, no chocolate
if (!card.get('badg... | Add url to the description field. | Add url to the description field.
Signed-off-by: François de Metz <5187da0b934cc25eb2201a3ec9206c24b13cb23b@stormz.me>
| JavaScript | agpl-3.0 | francois2metz/trello-calendar,francois2metz/trello-calendar | javascript | ## Code Before:
var icalendar = require('icalendar');
var _ = require('underscore');
exports.generateIcal = function(currentUser, boards, params) {
var ical = new icalendar.iCalendar();
boards.each(function(board) {
board.cards().each(function(card) {
// no arm, no chocolate
if ... |
937ef31977bd291709b3f434b542facdc164c799 | website-guts/templates/components/modals/signin_modal.hbs | website-guts/templates/components/modals/signin_modal.hbs | ---
layout: modal_wrapper.hbs
modal_title: Sign in to Optimizely
data_attr_value: signin
wrapper_id: sign-in-dialog
form_action: /account/signin
primary_button_text: Sign in
negative_button_text: Cancel
---
<label>
<span>Email address</span>
<input type="text" name="ema... | ---
layout: modal_wrapper.hbs
modal_title: Sign in to Optimizely
data_attr_value: signin
wrapper_id: sign-in-dialog
form_action: /account/signin
primary_button_text: Sign in
negative_button_text: Cancel
---
<label>
<span>Email address</span>
<input type="text" name="ema... | Add padding between modal links. | Add padding between modal links.
| Handlebars | mit | CilantroOrg/CilantroVegOrg,CilantroOrg/CilantroVegOrg,CilantroOrg/CilantroVegOrg | handlebars | ## Code Before:
---
layout: modal_wrapper.hbs
modal_title: Sign in to Optimizely
data_attr_value: signin
wrapper_id: sign-in-dialog
form_action: /account/signin
primary_button_text: Sign in
negative_button_text: Cancel
---
<label>
<span>Email address</span>
<input type=... |
7626054ed4e66d60d8d9dea5e23dcd5c3f8555f8 | nvim/settings/plugin-cosco.vim | nvim/settings/plugin-cosco.vim | autocmd FileType c,cpp,css,java,javascript,perl,php,jade,matlab nmap <silent> <Leader>; <Plug>(cosco-commaOrSemiColon)
autocmd FileType c,cpp,css,java,javascript,perl,php,jade,matlab imap <silent> <Leader>; <c-o><Plug>(cosco-commaOrSemiColon)
| autocmd FileType c,cpp,css,java,javascript,perl,php,jade,matlab nmap <silent> <Leader>; <Plug>(cosco-commaOrSemiColon)
autocmd FileType c,cpp,css,java,javascript,perl,php,jade,matlab imap <silent> <Leader>; <c-o><Plug>(cosco-commaOrSemiColon)
let g:cosco_ignore_comment_lines = 1
| Add cosco ignore comments option | Add cosco ignore comments option
| VimL | bsd-2-clause | lfilho/dotfiles,yjlintw/dotfiles,yjlintw/dotfiles,yjlintw/dotfiles,lfilho/dotfiles,lfilho/dotfiles | viml | ## Code Before:
autocmd FileType c,cpp,css,java,javascript,perl,php,jade,matlab nmap <silent> <Leader>; <Plug>(cosco-commaOrSemiColon)
autocmd FileType c,cpp,css,java,javascript,perl,php,jade,matlab imap <silent> <Leader>; <c-o><Plug>(cosco-commaOrSemiColon)
## Instruction:
Add cosco ignore comments option
## Code Af... |
8fc6ba648347a48065ab2fb26f940dc92919feeb | bands/__init__.py | bands/__init__.py | import shutil
from cherrypy.lib.static import serve_file
from uber.common import *
from panels import *
from bands._version import __version__
from bands.config import *
from bands.models import *
import bands.model_checks
import bands.automated_emails
static_overrides(join(bands_config['module_root'], 'static'))
te... | import shutil
from cherrypy.lib.static import serve_file
from uber.common import *
from panels import *
from bands._version import __version__
from bands.config import *
from bands.models import *
import bands.model_checks
import bands.automated_emails
static_overrides(join(bands_config['module_root'], 'static'))
te... | Implement new python-based menu format | Implement new python-based menu format
| Python | agpl-3.0 | magfest/bands,magfest/bands | python | ## Code Before:
import shutil
from cherrypy.lib.static import serve_file
from uber.common import *
from panels import *
from bands._version import __version__
from bands.config import *
from bands.models import *
import bands.model_checks
import bands.automated_emails
static_overrides(join(bands_config['module_root'... |
309042504df70c0d36e02c68e0956f9297d76c8c | README.md | README.md | A little app to prototype experiments with my Radio Thermostat
This is an app I've thrown together quickly with Spring Boot, in part just to play with some of its shiny looking
features, to try to get some quick progress on some automation for my thermostat.
I have an older "CT 30" model of the Radio Thermostat: http... |
[](https://travis-ci.org/pioto/thermostat)
A little app to prototype experiments with my Radio Thermostat
This is an app I've thrown together quickly with Spring Boot, in part just to play with some of its shiny looking
features, to try to get some quick pro... | Add Travis CI build status | Add Travis CI build status
| Markdown | mit | pioto/thermostat,pioto/thermostat | markdown | ## Code Before:
A little app to prototype experiments with my Radio Thermostat
This is an app I've thrown together quickly with Spring Boot, in part just to play with some of its shiny looking
features, to try to get some quick progress on some automation for my thermostat.
I have an older "CT 30" model of the Radio ... |
d5d303b3bad1c3451457acf6dc98d673f2e98f2f | java/example/default/index.html | java/example/default/index.html | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Hello MapReduce</title>
</head>
<body>
<h1>Hello MapReduce!</h1>
<table>
<tr>
<td>This is an example Map Reduce that demos parallel computation. <br /... | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Hello MapReduce</title>
</head>
<body>
<h1>MapReduce Sample Programs</h1>
<table>
<tr>
<td><Big>Random collisions example</Big><br />
This exa... | Add some formatting to landing page. | Java: Add some formatting to landing page.
Revision created by MOE tool push_codebase.
MOE_MIGRATION=6869
| HTML | apache-2.0 | soundofjw/appengine-mapreduce,vendasta/appengine-mapreduce,lordzuko/appengine-mapreduce,vendasta/appengine-mapreduce,rbruyere/appengine-mapreduce,VirusTotal/appengine-mapreduce,soundofjw/appengine-mapreduce,VirusTotal/appengine-mapreduce,lordzuko/appengine-mapreduce,Candreas/mapreduce,ankit318/appengine-mapreduce,rbruy... | html | ## Code Before:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Hello MapReduce</title>
</head>
<body>
<h1>Hello MapReduce!</h1>
<table>
<tr>
<td>This is an example Map Reduce that demos parallel co... |
073f4ddaff5efdd13f291280a8b46ce1d5e7b0c5 | src/DailySoccerSolution/DailySoccerMobile/package.json | src/DailySoccerSolution/DailySoccerMobile/package.json | {
"name": "dailysoccermobile",
"version": "1.1.1",
"description": "DailySoccerMobile: An Ionic project",
"dependencies": {
"gulp": "^3.5.6",
"gulp-sass": "^2.0.4",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0"
},
"devDependencies": {
"bower": "^1.3.3",... | {
"name": "dailysoccermobile",
"version": "1.1.1",
"description": "DailySoccerMobile: An Ionic project",
"dependencies": {
"gulp": "^3.5.6",
"gulp-sass": "^2.0.4",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0"
},
"devDependencies": {
"bower": "^1.3.3",... | Remove platforms from DailySoccerMobile, make it blank. | Remove platforms from DailySoccerMobile, make it blank.
Signed-off-by: Teerachai Laothong <a99983811b0545058c43897cab2c997528200432@perfenterprise.com>
| JSON | mit | tlaothong/xdailysoccer,tlaothong/xdailysoccer,tlaothong/xdailysoccer,tlaothong/xdailysoccer | json | ## Code Before:
{
"name": "dailysoccermobile",
"version": "1.1.1",
"description": "DailySoccerMobile: An Ionic project",
"dependencies": {
"gulp": "^3.5.6",
"gulp-sass": "^2.0.4",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0"
},
"devDependencies": {
"b... |
9d0c03be10423d6ffdc3e7bf6d000f8a9eac454b | .travis.yml | .travis.yml | language: objective-c
xcode_project: Socket.IO-Client-Swift.xcodeproj # path to your xcodeproj folder
xcode_scheme: SocketIO-iOS
osx_image: xcode8
branches:
only:
- master
- development
script: xctool -project Socket.IO-Client-Swift.xcodeproj -scheme SocketIO-Mac build test -parallelize
| language: objective-c
xcode_project: Socket.IO-Client-Swift.xcodeproj # path to your xcodeproj folder
xcode_scheme: SocketIO-iOS
osx_image: xcode8
branches:
only:
- master
- development
- travis-test
before_install:
- brew update
- brew outdated xctool || brew upgrade xctool
# script: xctool -project ... | Use xcodebuild until xctool is updated | Use xcodebuild until xctool is updated
| YAML | apache-2.0 | lightsprint09/socket.io-client-swift,lightsprint09/socket.io-client-swift | yaml | ## Code Before:
language: objective-c
xcode_project: Socket.IO-Client-Swift.xcodeproj # path to your xcodeproj folder
xcode_scheme: SocketIO-iOS
osx_image: xcode8
branches:
only:
- master
- development
script: xctool -project Socket.IO-Client-Swift.xcodeproj -scheme SocketIO-Mac build test -parallelize
## In... |
0f20480929ee6fc51e9373616160d00208518d71 | neovim/.config/nvim/modules/plugins/conjure.vim | neovim/.config/nvim/modules/plugins/conjure.vim | let g:conjure_log_direction = "horizontal"
let g:conjure_log_blacklist = ["up", "ret", "ret-multiline", "load-file", "eval"]
| let g:conjure_log_blacklist = ["up", "ret", "ret-multiline", "load-file", "eval"]
| Use vertical Conjure log again | Use vertical Conjure log again
| VimL | unlicense | Olical/dotfiles | viml | ## Code Before:
let g:conjure_log_direction = "horizontal"
let g:conjure_log_blacklist = ["up", "ret", "ret-multiline", "load-file", "eval"]
## Instruction:
Use vertical Conjure log again
## Code After:
let g:conjure_log_blacklist = ["up", "ret", "ret-multiline", "load-file", "eval"]
|
3c2e31c136a2b9fc766d4e19806e8cbfa1a88a26 | index.html | index.html | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sample Deployment</title>
<style>
body {
color: #ffffff;
background-color: #0188cc;
font-family: Arial, sans-serif;
font-size: 14px;
}
h1 {
font-size: 500%;
font-weight: normal;
margin-bottom: 0;... | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sample Deployment</title>
<style>
body {
color: #ffffff;
background-color: #0188cc;
font-family: Arial, sans-serif;
font-size: 14px;
}
h1 {
font-size: 500%;
font-weight: normal;
margin-bottom: 0;... | Index File Updated Take 2 | Index File Updated Take 2
| HTML | apache-2.0 | shri20/CodeDeployGitHubDemo,shri20/CodeDeployGitHubDemo | html | ## Code Before:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sample Deployment</title>
<style>
body {
color: #ffffff;
background-color: #0188cc;
font-family: Arial, sans-serif;
font-size: 14px;
}
h1 {
font-size: 500%;
font-weight: normal;
m... |
63fe2e8760e51a00de261e5ba058be9fdb93d14d | source/Plugins/Process/FreeBSD/CMakeLists.txt | source/Plugins/Process/FreeBSD/CMakeLists.txt | set(LLVM_NO_RTTI 1)
include_directories(.)
include_directories(../POSIX)
add_lldb_library(lldbPluginProcessFreeBSD
ProcessFreeBSD.cpp
FreeBSDThread.cpp
ProcessMonitor.cpp
)
| set(LLVM_NO_RTTI 1)
include_directories(.)
include_directories(../POSIX)
include_directories(../Utility)
add_lldb_library(lldbPluginProcessFreeBSD
ProcessFreeBSD.cpp
FreeBSDThread.cpp
ProcessMonitor.cpp
)
| Add Process/Utility include directory on FreeBSD | Add Process/Utility include directory on FreeBSD
Needed after r203667
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@203672 91177308-0d34-0410-b5e6-96231b3b80d8
| Text | apache-2.0 | apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | text | ## Code Before:
set(LLVM_NO_RTTI 1)
include_directories(.)
include_directories(../POSIX)
add_lldb_library(lldbPluginProcessFreeBSD
ProcessFreeBSD.cpp
FreeBSDThread.cpp
ProcessMonitor.cpp
)
## Instruction:
Add Process/Utility include directory on FreeBSD
Needed after r203667
git-svn-id: 4c4cc70b1ef44ba2b79... |
d1110620662cfdc2f320cd0519835907c8058919 | content/posts/2013-05-09-marilyn-monroe-on-women-equality.md | content/posts/2013-05-09-marilyn-monroe-on-women-equality.md | ---
layout: post
title: ""
author: Marilyn Monroe
source:
description: ""
category:
tags: []
---
{% include JB/setup %}
Women who seek to be equal with men lack ambition.
| ---
layout: post
title: "Women Equality"
author: Marilyn Monroe
source:
description: ""
category:
tags: []
---
{% include JB/setup %}
Women who seek to be equal with men lack ambition.
| Add title to Marilyn Monroe quote | Add title to Marilyn Monroe quote
| Markdown | mit | ghyde/quotes | markdown | ## Code Before:
---
layout: post
title: ""
author: Marilyn Monroe
source:
description: ""
category:
tags: []
---
{% include JB/setup %}
Women who seek to be equal with men lack ambition.
## Instruction:
Add title to Marilyn Monroe quote
## Code After:
---
layout: post
title: "Women Equality"
author: Marilyn Monroe
s... |
343ea049729e4b1798e500c039eb8c886c025b31 | README.rst | README.rst | cisco_olt_client
================
::
.. image:: https://img.shields.io/pypi/v/cisco-olt-client.svg
:target: https://pypi.python.org/pypi/cisco-olt-client
:alt: Latest PyPI version
.. image:: https://travis-ci.org/Vnet-as/cisco-olt-client.png
:target: https://travis-ci.org/Vnet-as/ci... | cisco_olt_client
================
.. image:: https://travis-ci.org/Vnet-as/cisco-olt-client.png
:target: https://travis-ci.org/Vnet-as/cisco-olt-client
:alt: Latest Travis CI build status
Python wrapper for cisco's olt boxes commands executed via ssh
Usage
-----
Installation
------------
Requirements
^^^^^^^... | Remove pypi badge for now | Remove pypi badge for now
| reStructuredText | mit | Vnet-as/cisco-olt-client | restructuredtext | ## Code Before:
cisco_olt_client
================
::
.. image:: https://img.shields.io/pypi/v/cisco-olt-client.svg
:target: https://pypi.python.org/pypi/cisco-olt-client
:alt: Latest PyPI version
.. image:: https://travis-ci.org/Vnet-as/cisco-olt-client.png
:target: https://travis-c... |
5d032f64242654e3156ccea970f100d9d9762872 | web/sites/all/themes/custom/lectionary_bootstrap/js/scripture_links.js | web/sites/all/themes/custom/lectionary_bootstrap/js/scripture_links.js | (function ($) {
$(function() {
/**
* Adds links to scripture references on song pages.
*/
$( "div.group-lectionary-scripture-ref" ).wrap(function() {
return "<a href='http://bible.oremus.org/?passage=" + $( this ).contents().text().replace(s/\s\s/g, "") + "'></a>";
... | (function ($) {
$(function() {
/**
* Adds links to scripture references on song pages.
*/
$( "div.field-group.field-group-inline.clearfix.group-lectionary-scripture-ref" ).wrap(function() {
return "<a href='http://bible.oremus.org/?passage=" + $( this ).contents().text... | Fix JS for lectionary scripture links. | Fix JS for lectionary scripture links.
| JavaScript | mit | claudinec/singingfromthelectionary,claudinec/singingfromthelectionary,claudinec/singingfromthelectionary,claudinec/singingfromthelectionary | javascript | ## Code Before:
(function ($) {
$(function() {
/**
* Adds links to scripture references on song pages.
*/
$( "div.group-lectionary-scripture-ref" ).wrap(function() {
return "<a href='http://bible.oremus.org/?passage=" + $( this ).contents().text().replace(s/\s\s/g, "")... |
08fbac7de6b30e821e98c0570b72f4d87911f00c | src/app/components/storage-modal/storageModal.scss | src/app/components/storage-modal/storageModal.scss | storage-modal {
.cards-group {
@extend %playing-cards;
float: left;
width: 40%;
card {
$rotate: -10;
$translate: 2.5;
@for $i from 1 through 3 {
&:nth-child(#{$i}) {
transform: rotate(#{$rotate}deg) translateX(#{$translate}rem);
}
$rotate: $rotate + 10;
$translate: $translate ... | .modal-dialog {
width: calc(100vw - 8rem);
}
storage-modal {
.cards-group {
@extend %playing-cards;
float: left;
height: rem-calc(map-get($card-height, 'medium'));
width: 25%;
card {
$rotate: -10;
$translate: 2.5;
@for $i from 1 through 3 {
&:nth-child(#{$i}) {
transform: rotate(#{$rot... | Fix styling of modal with player storage cards | Fix styling of modal with player storage cards
| SCSS | unlicense | ejwaibel/squarrels,ejwaibel/squarrels | scss | ## Code Before:
storage-modal {
.cards-group {
@extend %playing-cards;
float: left;
width: 40%;
card {
$rotate: -10;
$translate: 2.5;
@for $i from 1 through 3 {
&:nth-child(#{$i}) {
transform: rotate(#{$rotate}deg) translateX(#{$translate}rem);
}
$rotate: $rotate + 10;
$transl... |
abc95f3a10cd27ec67e982b187f7948d0dc83fe3 | corgi/sql.py | corgi/sql.py | from six.moves import configparser as CP
from sqlalchemy.engine.url import URL
from sqlalchemy.engine import create_engine
import os
import pandas as pd
def get_odbc_engine(name, odbc_filename='/etc/odbc.ini', database=None):
"""
Looks up the connection details in an odbc file and returns a SQLAlchemy engine i... | import os
from pathlib import Path
from six.moves import configparser as CP
import pandas as pd
from sqlalchemy.engine import create_engine
from sqlalchemy.engine.url import URL
home = str(Path.home())
def get_odbc_engine(name, odbc_filename=None, database=None):
"""
Looks up the connection details in an od... | Set the get_odbc_engine function to check etc, then user home for odbc file by default | Set the get_odbc_engine function to check etc, then user home for odbc file by default
| Python | mit | log0ymxm/corgi | python | ## Code Before:
from six.moves import configparser as CP
from sqlalchemy.engine.url import URL
from sqlalchemy.engine import create_engine
import os
import pandas as pd
def get_odbc_engine(name, odbc_filename='/etc/odbc.ini', database=None):
"""
Looks up the connection details in an odbc file and returns a SQL... |
92cce5ea7673443544b1d267305bc66466388b6e | src/main/java/com/clearspring/thetan/metricCatcher/MetricType.java | src/main/java/com/clearspring/thetan/metricCatcher/MetricType.java | package com.clearspring.thetan.metricCatcher;
import com.yammer.metrics.core.CounterMetric;
import com.yammer.metrics.core.GaugeMetric;
import com.yammer.metrics.core.HistogramMetric;
import com.yammer.metrics.core.MeterMetric;
import com.yammer.metrics.core.TimerMetric;
public enum MetricType {
GAUGE ("gauge", G... | package com.clearspring.thetan.metricCatcher;
import com.yammer.metrics.core.CounterMetric;
import com.yammer.metrics.core.GaugeMetric;
import com.yammer.metrics.core.HistogramMetric;
import com.yammer.metrics.core.MeterMetric;
import com.yammer.metrics.core.TimerMetric;
public enum MetricType {
GAUGE ("gauge", G... | Use proper names for histograms | Use proper names for histograms
git-svn-id: 44fcf16af2fc66d21718f1d95b6687233a8d45ae@105180 e872ca34-ba15-0410-9420-be5960fa97e5
| Java | apache-2.0 | addthis/MetricCatcher,addthis/MetricCatcher | java | ## Code Before:
package com.clearspring.thetan.metricCatcher;
import com.yammer.metrics.core.CounterMetric;
import com.yammer.metrics.core.GaugeMetric;
import com.yammer.metrics.core.HistogramMetric;
import com.yammer.metrics.core.MeterMetric;
import com.yammer.metrics.core.TimerMetric;
public enum MetricType {
G... |
a3d0455ed3b5e6c6206d633f6c176eb914c2176e | src/main/lambdalisp/prelude.ll | src/main/lambdalisp/prelude.ll | (progn
(nil: -999)
(zero?: [x] (= x 0))
(empty?: [l] (if (atom? l) (= l nil) 0))
(reverse: [l]
(let ((reverseaux [l res]
(tif (empty? l)
res
(recur (cdr l) (cons (car l) res)))))
(reverseaux l nil)))
(nth: [li n]
(tif (zero? n)
(car li)... | (progn
(nil: -999)
(seed: 1)
(zero?: [x] (= x 0))
(empty?: [l] (if (atom? l) (= l nil) 0))
(reverse: [l]
(let ((reverseaux [l res]
(tif (empty? l)
res
(recur (cdr l) (cons (car l) res)))))
(reverseaux l nil)))
(nth: [li n]
(tif (zero? n)
... | Add a pseudo-random number generator | Add a pseudo-random number generator
| LLVM | mit | ShiftForward/icfpc2014 | llvm | ## Code Before:
(progn
(nil: -999)
(zero?: [x] (= x 0))
(empty?: [l] (if (atom? l) (= l nil) 0))
(reverse: [l]
(let ((reverseaux [l res]
(tif (empty? l)
res
(recur (cdr l) (cons (car l) res)))))
(reverseaux l nil)))
(nth: [li n]
(tif (zero? n)
... |
08e4669d7ac743c152c552edf0617caa1d4934ad | tests/settings-djcelery.py | tests/settings-djcelery.py | __doc__ = """Minimal django settings to run manage.py test command"""
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': __name__,
'ATOMIC': True
}
}
BROKER_BACKEND = 'memory'
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = ('djcelery_transactions',
... | __doc__ = """Minimal django settings to run manage.py test command"""
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': __name__
}
}
BROKER_BACKEND = 'memory'
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = ('djcelery_transactions',
'test'
... | Make both test settings more similar | Make both test settings more similar
| Python | bsd-2-clause | roverdotcom/django-celery-transactions,stored/django-celery-transactions,fellowshipofone/django-celery-transactions | python | ## Code Before:
__doc__ = """Minimal django settings to run manage.py test command"""
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': __name__,
'ATOMIC': True
}
}
BROKER_BACKEND = 'memory'
ROOT_URLCONF = 'tests.urls'
INSTALLED_APPS = ('djcelery_transactions... |
5f537e8cc8906f02fcec7b972f31065562293234 | .scrutinizer.yml | .scrutinizer.yml | inherit: true
build:
environment:
php: '5.5.25'
dependencies:
override:
- { command: 'composer install --no-interaction --prefer-source', idle_timeout: 600 }
tests:
override:
- ./bin/phpspec run --format=dot
- ./bin/behat --format=pretty
proje... | inherit: true
build:
environment:
php: '5.5.25'
dependencies:
before:
- date -u +"%Y-%m-%dT%H:%M:%SZ" > /tmp/build-start-time.txt
override:
- { command: 'composer install --no-interaction --prefer-source', idle_timeout: 600 }
tests:
override:
... | Add Scrutinizer build time tracking and cache composer cache | Add Scrutinizer build time tracking and cache composer cache
As requested in this issue https://ibuildings.jira.com/browse/CONSULT-144 | YAML | mit | jon-acker/symfony-container-generator,inviqa/symfony-container-generator | yaml | ## Code Before:
inherit: true
build:
environment:
php: '5.5.25'
dependencies:
override:
- { command: 'composer install --no-interaction --prefer-source', idle_timeout: 600 }
tests:
override:
- ./bin/phpspec run --format=dot
- ./bin/behat --format=... |
179930370aabb17284a5de081eb6db42ab3d2c54 | android/app/src/main/java/com/funnyhatsoftware/spacedock/activity/DetailsActivity.java | android/app/src/main/java/com/funnyhatsoftware/spacedock/activity/DetailsActivity.java | package com.funnyhatsoftware.spacedock.activity;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.Fragment;
import com.funnyhatsoftware.spacedock.fragment.DetailsFragment;
public class DetailsActivity extends SinglePaneActivity {
private static final String EXTRA_TYPE ... | package com.funnyhatsoftware.spacedock.activity;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.Fragment;
import com.funnyhatsoftware.spacedock.fragment.DetailsFragment;
import com.funnyhatsoftware.spacedock.holder.ExpansionHolder;
public class DetailsActivity extends Si... | Fix expansion detail display on phones | Fix expansion detail display on phones
| Java | apache-2.0 | tblackwe/spacedock,tblackwe/spacedock,spacedockapp/spacedock,spacedockapp/spacedock,spacedockapp/spacedock,spacedockapp/spacedock,tblackwe/spacedock,spacedockapp/spacedock,tblackwe/spacedock,spacedockapp/spacedock,tblackwe/spacedock,tblackwe/spacedock | java | ## Code Before:
package com.funnyhatsoftware.spacedock.activity;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.Fragment;
import com.funnyhatsoftware.spacedock.fragment.DetailsFragment;
public class DetailsActivity extends SinglePaneActivity {
private static final St... |
7655929606adddff6182b68d57aaaca9dcd25665 | java-properties.gemspec | java-properties.gemspec | lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'java-properties/version'
Gem::Specification.new do |spec|
spec.name = 'java-properties'
spec.version = JavaProperties::VERSION.dup
spec.authors = ['Jonas Thiel']
spec.email =... |
require_relative 'lib/java-properties/version'
Gem::Specification.new do |spec|
spec.name = 'java-properties'
spec.version = JavaProperties::VERSION.dup
spec.authors = ['Jonas Thiel']
spec.email = ['jonas@thiel.io']
spec.summary = %q{Loader and writer for *.properties file... | Change gemspec to allow installation on Ruby 3.0 and all future versions | Change gemspec to allow installation on Ruby 3.0 and all future versions
This change allows the gem to be installed on Ruby 3.0 and all future
versions. It also loads the gem version directly using a relative path
and removes encoding comment as UTF-8 is a default encoding in Ruby 2.0.
| Ruby | mit | jnbt/java-properties | ruby | ## Code Before:
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'java-properties/version'
Gem::Specification.new do |spec|
spec.name = 'java-properties'
spec.version = JavaProperties::VERSION.dup
spec.authors = ['Jonas Thiel']
spec... |
036d70a64233000c26b75abcc5e695dda7a5fc7f | app/views/post/show_partials/_social_sharing.html.erb | app/views/post/show_partials/_social_sharing.html.erb | <!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
... | <!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_compact"></a>
... | Disable hover popup for addthis. | Disable hover popup for addthis.
| HTML+ERB | isc | nanaya/moebooru,nanaya/moebooru,moebooru/moebooru,moebooru/moebooru,euank/moebooru-thin,euank/moebooru-thin,euank/moebooru-thin,moebooru/moebooru,moebooru/moebooru,euank/moebooru-thin,nanaya/moebooru,moebooru/moebooru,euank/moebooru-thin,nanaya/moebooru,nanaya/moebooru | html+erb | ## Code Before:
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
<a class="addthis_button_preferred_3"></a>
<a class="addthis_button_preferred_4"></a>
<a class="addthis_button_co... |
734903c777fb237509c21a988f79318ec14e997d | st2api/st2api/controllers/sensors.py | st2api/st2api/controllers/sensors.py | import six
from pecan import abort
from pecan.rest import RestController
from mongoengine import ValidationError
from st2common import log as logging
from st2common.persistence.reactor import SensorType
from st2common.models.base import jsexpose
from st2common.models.api.reactor import SensorTypeAPI
http_client = six... | import six
from st2common import log as logging
from st2common.persistence.reactor import SensorType
from st2common.models.api.reactor import SensorTypeAPI
from st2api.controllers.resource import ResourceController
http_client = six.moves.http_client
LOG = logging.getLogger(__name__)
class SensorTypeController(Reso... | Use ResourceController instead of duplicating logic. | Use ResourceController instead of duplicating logic.
| Python | apache-2.0 | pinterb/st2,armab/st2,peak6/st2,pixelrebel/st2,Plexxi/st2,armab/st2,Plexxi/st2,punalpatel/st2,grengojbo/st2,jtopjian/st2,jtopjian/st2,StackStorm/st2,alfasin/st2,dennybaa/st2,lakshmi-kannan/st2,lakshmi-kannan/st2,pinterb/st2,grengojbo/st2,nzlosh/st2,StackStorm/st2,StackStorm/st2,pixelrebel/st2,alfasin/st2,emedvedev/st2,... | python | ## Code Before:
import six
from pecan import abort
from pecan.rest import RestController
from mongoengine import ValidationError
from st2common import log as logging
from st2common.persistence.reactor import SensorType
from st2common.models.base import jsexpose
from st2common.models.api.reactor import SensorTypeAPI
h... |
45c30a0ac0903c9aea94f989c47c08d435a9fd8f | composer.json | composer.json | {
"name": "slim/http-cache",
"type": "library",
"description": "Slim Framework HTTP cache middleware and service provider",
"keywords": ["slim","framework","middleware","cache"],
"homepage": "http://slimframework.com",
"license": "MIT",
"authors": [
{
"name": "Josh Lockha... | {
"name": "slim/http-cache",
"type": "library",
"description": "Slim Framework HTTP cache middleware and service provider",
"keywords": [
"slim",
"framework",
"middleware",
"cache"
],
"homepage": "https://www.slimframework.com",
"license": "MIT",
"authors": [
{
"name": "Josh Lo... | Update for slim 4 compatibility | Update for slim 4 compatibility
| JSON | mit | slimphp/Slim-HttpCache | json | ## Code Before:
{
"name": "slim/http-cache",
"type": "library",
"description": "Slim Framework HTTP cache middleware and service provider",
"keywords": ["slim","framework","middleware","cache"],
"homepage": "http://slimframework.com",
"license": "MIT",
"authors": [
{
"nam... |
95e923147785329e73e37bc3e3480a6fcd9f0dc4 | lib/uniform_notifier/appsignal.rb | lib/uniform_notifier/appsignal.rb |
class UniformNotifier
class AppsignalNotifier < Base
class << self
def active?
!!UniformNotifier.appsignal
end
protected
def _out_of_channel_notify(data)
opt = UniformNotifier.appsignal.is_a?(Hash) ? UniformNotifier.appsignal : {}
exception = Exception.new(data[... |
class UniformNotifier
class AppsignalNotifier < Base
class << self
def active?
!!UniformNotifier.appsignal
end
protected
def _out_of_channel_notify(data)
opt = UniformNotifier.appsignal.is_a?(Hash) ? UniformNotifier.appsignal : {}
exception = Exception.new("#{da... | Add body to Appsignal error message | Add body to Appsignal error message
| Ruby | mit | flyerhzm/uniform_notifier | ruby | ## Code Before:
class UniformNotifier
class AppsignalNotifier < Base
class << self
def active?
!!UniformNotifier.appsignal
end
protected
def _out_of_channel_notify(data)
opt = UniformNotifier.appsignal.is_a?(Hash) ? UniformNotifier.appsignal : {}
exception = Exc... |
8ea734e6422024ca8a9592a1a810d6bc20f219e4 | spec/spec_helper.rb | spec/spec_helper.rb | require 'pry'
require File.join(File.dirname(__FILE__), '/../lib/file_convert')
def configure_with_mock
FileConvert.configure do |config|
config['google_service_account'] = {
'email' => '<strange-hash>@developer.gserviceaccount.com',
'pkcs12_file_path' => 'config/file_convert_key.p12'
}
end
end... | require 'pry'
require File.expand_path('../../lib/file_convert', __FILE__)
RSpec.configure do |config|
config.mock_with :rspec do |mock_config|
mock_config.verify_doubled_constant_names = true
mock_config.syntax = [:expect]
end
end
def configure_with_mock
FileConvert.configure do |config|
config['go... | Add some strictness for conventions' sake | Add some strictness for conventions' sake
| Ruby | mit | tolingo/file-convert | ruby | ## Code Before:
require 'pry'
require File.join(File.dirname(__FILE__), '/../lib/file_convert')
def configure_with_mock
FileConvert.configure do |config|
config['google_service_account'] = {
'email' => '<strange-hash>@developer.gserviceaccount.com',
'pkcs12_file_path' => 'config/file_convert_key.p12'... |
864bbf8319039cdcd12870741f6b348a46e177e4 | config.js | config.js | var fs = require('fs');
// Require given configuration
if (fs.existsSync(__dirname + '/config/data.js')) {
exports = module.exports = require('./config/data.js');
}
else {
exports = module.exports = {};
}
| var fs = require('fs');
// Require given configuration
if (fs.existsSync(__dirname + '/config/data.js')) {
exports = module.exports = require(__dirname + '/config/data.js');
}
else {
exports = module.exports = {};
}
| Check and then use the same.. | Check and then use the same.. | JavaScript | mit | DualDev/node-transip,DeviaVir/node-transip | javascript | ## Code Before:
var fs = require('fs');
// Require given configuration
if (fs.existsSync(__dirname + '/config/data.js')) {
exports = module.exports = require('./config/data.js');
}
else {
exports = module.exports = {};
}
## Instruction:
Check and then use the same..
## Code After:
var fs = require('fs');
// Requ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.